[Geany-Devel] open selected file
marius buzea
magnetudinbuda at xxxxx
Fri Jun 26 19:04:36 UTC 2015
Hello,
This week, I copied following text:
<VERBATIM>
Breakpoint 1, g_signal_handler_disconnect (instance=0x1cfa540, handler_id=2691) at /build/buildd/glib2.0-2.40.2/./gobject/gsignal.c:2580
2580 g_warning ("%s: instance '%p' has no handler with id '%lu'", G_STRLOC, instance, handler_id);
(gdb) bt
#0 g_signal_handler_disconnect (instance=0x1cfa540, handler_id=2691) at /build/buildd/glib2.0-2.40.2/./gobject/gsignal.c:2580
#1 0x00007f88079ad53d in gtk_notebook_remove_tab_label (page=0x1cf5370, page=0x1cf5370, notebook=<optimized out>) at /build/buildd/gtk+2.0-2.24.23/gtk/gtknotebook.c:4636
</VERBATIM>
, in a Geany document, to open gtknotebook.c by using ctrl+shift+o with cursor is positioned into the gtknotebook.c file path.
The file did not opened, but after a little while, I found what to change in Geany's code so that ctrl+shift+o opens the file.
Is it a good idea that someone changes Geany so that Ctrl+Shift+o opens file paths like
/build/buildd/gtk+2.0-2.24.23/gtk/gtknotebook.c ?
Changing would be easy, just add a '+' in the string going into the editor_get_default_selection call in the
on_menu_open_selected_file1_activate function from the callbacks.c Geany file.
My local change:
<VERBATIM>
G_MODULE_EXPORT void on_menu_open_selected_file1_activate(GtkMenuItem *menuitem, gpointer user_data)
{
GeanyDocument *doc = document_get_current();
gchar *sel = NULL;
const gchar *wc;
#ifdef G_OS_WIN32
wc = GEANY_WORDCHARS "./-" "\\";
#else
wc = GEANY_WORDCHARS "./-+";
#endif
g_return_if_fail(doc != NULL);
sel = editor_get_default_selection(doc->editor, TRUE, wc);
...
</VERBATIM>
Have a great day,
Marius-Ioan Buzea
More information about the Devel
mailing list