Branch: refs/heads/master Author: Frank Lanitz frank@frank.uvena.de Committer: Frank Lanitz frank@frank.uvena.de Date: Thu, 13 Dec 2012 18:30:20 UTC Commit: 327ce24adc15f24f4a7f36722aef99ff40913523 https://github.com/geany/geany-plugins/commit/327ce24adc15f24f4a7f36722aef99...
Log Message: ----------- Merge pull request #75 from sblatnick/treebrowser01
Added backspace keypress 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).