Revision: 3565 http://geany.svn.sourceforge.net/geany/?rev=3565&view=rev Author: eht16 Date: 2009-02-08 19:51:31 +0000 (Sun, 08 Feb 2009)
Log Message: ----------- Make Menu key and Shift-F10 working on the filebrowser treeview. Return TRUE if appropriate in the event handlers.
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/filebrowser.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-02-08 18:27:20 UTC (rev 3564) +++ trunk/ChangeLog 2009-02-08 19:51:31 UTC (rev 3565) @@ -1,3 +1,10 @@ +2009-02-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * plugins/filebrowser.c: + Make Menu key and Shift-F10 working on the filebrowser treeview. + Return TRUE if appropriate in the event handlers. + + 2009-02-08 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* src/editor.c:
Modified: trunk/plugins/filebrowser.c =================================================================== --- trunk/plugins/filebrowser.c 2009-02-08 18:27:20 UTC (rev 3564) +++ trunk/plugins/filebrowser.c 2009-02-08 19:51:31 UTC (rev 3565) @@ -605,7 +605,10 @@ static gboolean on_button_press(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) + { on_open_clicked(NULL, NULL); + return TRUE; + } else if (event->button == 3) { static GtkWidget *popup_menu = NULL; @@ -613,8 +616,8 @@ if (popup_menu == NULL) popup_menu = create_popup_menu();
- gtk_menu_popup(GTK_MENU(popup_menu), NULL, NULL, NULL, NULL, - event->button, event->time); + gtk_menu_popup(GTK_MENU(popup_menu), NULL, NULL, NULL, NULL, event->button, event->time); + /* don't return TRUE here, unless the selection won't be changed */ } return FALSE; } @@ -626,12 +629,30 @@ || event->keyval == GDK_ISO_Enter || event->keyval == GDK_KP_Enter || event->keyval == GDK_space) + { on_open_clicked(NULL, NULL); + return TRUE; + }
if ((event->keyval == GDK_Up || event->keyval == GDK_KP_Up) && (event->state & GDK_MOD1_MASK)) /* FIXME: Alt-Up doesn't seem to work! */ + { on_go_up(); + return TRUE; + } + + if ((event->keyval == GDK_F10 && event->state & GDK_SHIFT_MASK) || event->keyval == GDK_Menu) + { + GdkEventButton button_event; + + button_event.time = event->time; + button_event.button = 3; + + on_button_press(widget, &button_event, data); + return TRUE; + } + return FALSE; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.