Branch: refs/heads/master Author: Steven Blatnick sblatnick@proofpoint.com Committer: Steven Blatnick sblatnick@proofpoint.com Date: Wed, 12 Dec 2012 22:07:05 UTC Commit: 67130ada8558c997fc6f30a95e9ce48d2232e785 https://github.com/geany/geany-plugins/commit/67130ada8558c997fc6f30a95e9ce4...
Log Message: ----------- Added backspace to treebrowser plugin to browse up a directory.
Modified Paths: -------------- treebrowser/src/treebrowser.c
Modified: treebrowser/src/treebrowser.c 14 files changed, 14 insertions(+), 0 deletions(-) =================================================================== @@ -14,6 +14,7 @@ #include <fcntl.h> #include <glib.h> #include <glib/gstdio.h> +#include <gdk/gdkkeysyms.h>
#include "geany.h" #include "geanyplugin.h" @@ -1418,6 +1419,18 @@ enum return FALSE; }
+static gboolean +on_treeview_keypress(GtkWidget *widget, GdkEventKey *event) +{ + if (event->keyval == GDK_KEY_BackSpace) + { + on_button_go_up(); + return TRUE; + } + + return FALSE; +} + static void on_treeview_changed(GtkWidget *widget, gpointer user_data) { @@ -1721,6 +1734,7 @@ enum g_signal_connect(treeview, "row-activated", G_CALLBACK(on_treeview_row_activated), NULL); g_signal_connect(treeview, "row-collapsed", G_CALLBACK(on_treeview_row_collapsed), NULL); g_signal_connect(treeview, "row-expanded", G_CALLBACK(on_treeview_row_expanded), NULL); + g_signal_connect(treeview, "key-release-event", G_CALLBACK(on_treeview_keypress), NULL); g_signal_connect(addressbar, "activate", G_CALLBACK(on_addressbar_activate), NULL); g_signal_connect(filter, "activate", G_CALLBACK(on_filter_activate), NULL);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
plugins-commits@lists.geany.org