From bd51b09f77e86e95e279d7a0e12d8389716c0d28 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 27 Jan 2006 17:22:17 +0000 Subject: [PATCH] Fixes bug #328820: 2006-01-27 Federico Mena Quintero Fixes bug #328820: * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_class_init): Make GDK_KP_Divide pop up the location dialog populated to "/". (tree_view_keybinding_cb): Likewise. (trap_activate_cb): Likewise. --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ docs/reference/ChangeLog | 5 +++++ docs/reference/gtk/tmpl/gtkfilechooser.sgml | 16 ++++++++++++---- gtk/gtkfilechooserdefault.c | 6 ++++++ 5 files changed, 43 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0029ee108..f30f8154e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-01-27 Federico Mena Quintero + + Fixes bug #328820: + + * gtk/gtkfilechooserdefault.c + (gtk_file_chooser_default_class_init): Make GDK_KP_Divide pop up + the location dialog populated to "/". + (tree_view_keybinding_cb): Likewise. + (trap_activate_cb): Likewise. + 2006-01-25 Behdad Esfahbod * gtk/gtkcalendar.c (gtk_calendar_size_request): Use translated format diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0029ee108..f30f8154e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2006-01-27 Federico Mena Quintero + + Fixes bug #328820: + + * gtk/gtkfilechooserdefault.c + (gtk_file_chooser_default_class_init): Make GDK_KP_Divide pop up + the location dialog populated to "/". + (tree_view_keybinding_cb): Likewise. + (trap_activate_cb): Likewise. + 2006-01-25 Behdad Esfahbod * gtk/gtkcalendar.c (gtk_calendar_size_request): Use translated format diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 683b133c5..c987c4e04 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2006-01-27 Federico Mena Quintero + + * gtk/tmpl/gtkfilechooser.sgml: Mention that ~ is also a default + key binding. + 2006-01-23 Matthias Clasen * gtk/gtk-sections.txt: diff --git a/docs/reference/gtk/tmpl/gtkfilechooser.sgml b/docs/reference/gtk/tmpl/gtkfilechooser.sgml index bf391b30a..a40982bd2 100644 --- a/docs/reference/gtk/tmpl/gtkfilechooser.sgml +++ b/docs/reference/gtk/tmpl/gtkfilechooser.sgml @@ -209,8 +209,14 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data) location-popup - ControlL; - / + ControlL (empty path); + / (path of "/") + + Both the individual / key and the + numeric keypad's "divide" key are supported. + + ; + ~ (path of "~") @@ -287,10 +293,12 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings" put in the text entry for the file name. By default this is bound to ControlL with a path string of "" (the empty - string); it is also bound to / with a + string). It is also bound to / with a path string of "/" (a slash): this lets you type / and - immediately type a path name. + immediately type a path name. On Unix systems, this is bound to + ~ (tilde) with a path string + of "~" itself for access to home directories. diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 2aee3341b..fde39133e 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -576,6 +576,10 @@ gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class) GDK_slash, 0, "location-popup", 1, G_TYPE_STRING, "/"); + gtk_binding_entry_add_signal (binding_set, + GDK_KP_Divide, 0, + "location-popup", + 1, G_TYPE_STRING, "/"); #ifdef G_OS_UNIX gtk_binding_entry_add_signal (binding_set, @@ -2938,6 +2942,7 @@ tree_view_keybinding_cb (GtkWidget *tree_view, GtkFileChooserDefault *impl) { if ((event->keyval == GDK_slash + || event->keyval == GDK_KP_Divide #ifdef G_OS_UNIX || event->keyval == GDK_asciitilde #endif @@ -3303,6 +3308,7 @@ trap_activate_cb (GtkWidget *widget, modifiers = gtk_accelerator_get_default_mod_mask (); if ((event->keyval == GDK_slash + || event->keyval == GDK_KP_Divide #ifdef G_OS_UNIX || event->keyval == GDK_asciitilde #endif