From 9fe8aa7720d9d2adda698ce4b67ee2c87d1e1573 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 15 Sep 2005 17:16:45 +0000 Subject: [PATCH] List all the default key bindings. Fix the documentation for the 2005-09-15 Federico Mena Quintero * gtk/tmpl/gtkfilechooser.sgml: List all the default key bindings. Fix the documentation for the "location-popup" binding signal; its "path" argument was not listed. Mention a tip to have a crude form of bookmarks accessible through key bindings. --- docs/reference/ChangeLog | 7 ++ docs/reference/gtk/tmpl/gtkfilechooser.sgml | 85 +++++++++++++++++---- 2 files changed, 76 insertions(+), 16 deletions(-) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 500e434c2a..0009fc2a39 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,10 @@ +2005-09-15 Federico Mena Quintero + + * gtk/tmpl/gtkfilechooser.sgml: List all the default key bindings. + Fix the documentation for the "location-popup" binding signal; its + "path" argument was not listed. Mention a tip to have a crude + form of bookmarks accessible through key bindings. + 2005-09-13 Matthias Clasen * gtk/tmpl/gtkeditable.sgml: Clarify docs diff --git a/docs/reference/gtk/tmpl/gtkfilechooser.sgml b/docs/reference/gtk/tmpl/gtkfilechooser.sgml index 4b48dfbc0f..567cb9fb4e 100644 --- a/docs/reference/gtk/tmpl/gtkfilechooser.sgml +++ b/docs/reference/gtk/tmpl/gtkfilechooser.sgml @@ -204,15 +204,27 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data) Signal name - Key + Default key combinations location-popup - ControlL + + ControlL; + / + up-folder - AltUp + + AltUp + + Both the individual Up key and the numeric + keypad's Up key are supported. + + + ; + Backspace + down-folder @@ -227,16 +239,14 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data) - To change these defaults to something else, you could - include the following fragment in your - .gtkrc-2.0 file: + You can change these defaults to something else. For + example, to add a Shift modifier to a few + of the default bindings, you can include the following + fragment in your .gtkrc-2.0 file: binding "my-own-gtkfilechooser-bindings" { - bind "<Alt><Shift>l" { - "location-popup" () - } bind "<Alt><Shift>Up" { "up-folder" () } @@ -244,7 +254,7 @@ binding "my-own-gtkfilechooser-bindings" { "down-folder" () } bind "<Alt><Shift>Home" { - "home-folder-folder" () + "home-folder" () } } @@ -257,14 +267,22 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings" void user_function (GtkFileChooserDefault *chooser, + const char *path, gpointer user_data); This is used to make the file chooser show a "Location" dialog which the user can use to manually type the name of - the file he wishes to select. By default this is bound to - ControlL. + the file he wishes to select. The + path argument is a string that gets + 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 + path string of "/" + (a slash): this lets you type / and + immediately type a path name. @@ -276,6 +294,14 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings" + + path : + + + default contents for the text entry for the file name + + + user_data : @@ -285,6 +311,30 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings" + + + + You can create your own bindings for the + location-popup signal with custom + path strings, and have a crude form + of easily-to-type bookmarks. For example, say you access + the path /home/username/misc very + frequently. You could then create an + Alt M + shortcut by including the following in your + .gtkrc-2.0: + + + +binding "misc-shortcut" { + bind "<Alt>M" { + "location-popup" ("/home/username/misc") + } +} + +class "GtkFileChooserDefault" binding "misc-shortcut" + + @@ -298,8 +348,9 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings" This is used to make the file chooser go to the parent of the current folder in the file hierarchy. By default this - is bound to - AltUp. + is bound to Backspace and + AltUp + (the Up key in the numeric keypad also works). @@ -338,7 +389,8 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings" "/foo/bar/baz", then this will cause the file chooser to switch to the "baz" subfolder. By default this is bound to - AltDown. + AltDown + (the Down key in the numeric keypad also works). @@ -372,7 +424,8 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings" This is used to make the file chooser show the user's home folder in the file list. By default this is bound to - AltHome. + AltHome + (the Home key in the numeric keypad also works).