Branch: refs/heads/master Author: Pallai Roland pallair@magex.hu Committer: Pallai Roland pallair@magex.hu Date: Sun, 26 May 2013 10:08:35 UTC Commit: 5cec0bc53322429046992d712a45bddde08de42c https://github.com/geany/geany-plugins/commit/5cec0bc53322429046992d712a45bd...
Log Message: ----------- treebrowser: menu key brings up the context menu
Modified Paths: -------------- treebrowser/src/treebrowser.c
Modified: treebrowser/src/treebrowser.c 22 files changed, 22 insertions(+), 0 deletions(-) =================================================================== @@ -1446,6 +1446,28 @@ enum on_button_go_up(); return TRUE; } + if (event->keyval == GDK_Menu) + { + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + gchar *name = NULL, *uri = NULL; + GtkWidget *menu; + + if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)), &model, &iter)) + gtk_tree_model_get(GTK_TREE_MODEL(treestore), &iter, + TREEBROWSER_COLUMN_NAME, &name, + TREEBROWSER_COLUMN_URI, &uri, + -1); + + menu = create_popup_menu(name != NULL ? name : "", uri != NULL ? uri : ""); + gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, event->time); + + g_free(name); + g_free(uri); + + return TRUE; + }
return FALSE; }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).