[Geany-Devel] Bug: Conflicting Keyboard shortcut in "reload file" dialog - ID: 3587465
Amit Sengupta
itsjishu at gmail.com
Tue Nov 27 13:27:50 UTC 2012
hey! It's about the bug
http://sourceforge.net/tracker/?func=detail&aid=3587465&group_id=153444&atid=787791
i tried to debug it by changing the buttons to YES No buttons, I figured
out that the document.c is the file associated with this bug.
original code
static void monitor_reload_file(GeanyDocument *doc)
{
gchar *base_name = g_path_get_basename(doc->file_name);
gint ret;
ret = dialogs_show_prompt(NULL,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
_("_Reload"), GTK_RESPONSE_ACCEPT,
_("Do you want to reload it?"),
_("The file '%s' on the disk is more recent than\nthe current buffer."),
base_name);
g_free(base_name);
if (ret == GTK_RESPONSE_ACCEPT)
document_reload_file(doc, doc->encoding);
else if (ret == GTK_RESPONSE_CLOSE)
document_close(doc);
}
Modified code
static void monitor_reload_file(GeanyDocument *doc)
{
gchar *base_name = g_path_get_basename(doc->file_name);
gint ret;
ret = dialogs_show_prompt(NULL,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
GTK_STOCK_NO, GTK_RESPONSE_NO,
GTK_STOCK_YES, GTK_RESPONSE_YES,
_("Do you want to reload it?"),
_("The file '%s' on the disk is more recent than\nthe current buffer."),
base_name);
g_free(base_name);
if (ret == GTK_RESPONSE_YES)
document_reload_file(doc, doc->encoding);
else if (ret == GTK_RESPONSE_CLOSE)
document_close(doc);
}
How to test this code locally
when I try
make install
I get this output
[amit at localhost geany-1.22]$ make install
Making install in tagmanager
make[1]: Entering directory
`/home/amit/Programming/Geany/geany-1.22/tagmanager'
Making install in mio
make[2]: Entering directory
`/home/amit/Programming/Geany/geany-1.22/tagmanager/mio'
make[3]: Entering directory
`/home/amit/Programming/Geany/geany-1.22/tagmanager/mio'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory
`/home/amit/Programming/Geany/geany-1.22/tagmanager/mio'
make[2]: Leaving directory
`/home/amit/Programming/Geany/geany-1.22/tagmanager/mio'
Making install in include
make[2]: Entering directory
`/home/amit/Programming/Geany/geany-1.22/tagmanager/include'
make[3]: Entering directory
`/home/amit/Programming/Geany/geany-1.22/tagmanager/include'
make[3]: Nothing to be done for `install-exec-am'.
/usr/bin/mkdir -p '/usr/local/include/geany/tagmanager'
/usr/bin/mkdir: cannot create directory `/usr/local/include/geany':
Permission denied
make[3]: *** [install-tagmanager_includeHEADERS] Error 1
make[3]: Leaving directory
`/home/amit/Programming/Geany/geany-1.22/tagmanager/include'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory
`/home/amit/Programming/Geany/geany-1.22/tagmanager/include'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory
`/home/amit/Programming/Geany/geany-1.22/tagmanager'
make: *** [install-recursive] Error 1
Can anyone please help me with this so that I can test this, also how to
submit the code (ie if I get it right)
ps: attaching the modified document.c.
Thanks
Regards
Amit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20121127/853e3a0c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: document.c
Type: text/x-csrc
Size: 86939 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20121127/853e3a0c/attachment-0001.c>
More information about the Devel
mailing list