[gnome-commander] Toggle path/basename/filename selections in F7 dialog
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Toggle path/basename/filename selections in F7 dialog
- Date: Sun, 12 Dec 2010 22:15:38 +0000 (UTC)
commit dedbbc7b6b407f1793427e6d2b203a29df2959ff
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sun Dec 12 23:12:22 2010 +0100
Toggle path/basename/filename selections in F7 dialog
src/dialogs/gnome-cmd-mkdir-dialog.cc | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-mkdir-dialog.cc b/src/dialogs/gnome-cmd-mkdir-dialog.cc
index 2938384..fbd90a3 100644
--- a/src/dialogs/gnome-cmd-mkdir-dialog.cc
+++ b/src/dialogs/gnome-cmd-mkdir-dialog.cc
@@ -72,6 +72,19 @@ inline GSList *make_uri_list (GnomeCmdDir *dir, string filename)
}
+static gboolean on_name_entry_keypressed (GtkEntry *entry, GdkEventKey *event, gpointer unused)
+{
+ switch (event->keyval)
+ {
+ case GDK_F7:
+ gnome_cmd_toggle_file_name_selection (GTK_WIDGET (entry));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
static void response_callback (GtkDialog *dialog, int response_id, GnomeCmdDir *dir)
{
switch (response_id)
@@ -209,6 +222,7 @@ gboolean gnome_cmd_mkdir_dialog_new (GnomeCmdDir *dir, GnomeCmdFile *selected_fi
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+ g_signal_connect (entry, "key-press-event", G_CALLBACK (on_name_entry_keypressed), NULL);
g_signal_connect (dialog, "response", G_CALLBACK (response_callback), dir);
gint result = gtk_dialog_run (GTK_DIALOG (dialog));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]