]> Pileus Git - ~andy/gtk/commitdiff
Added an .gtkrc-2.0 example of how to actually change the key bindings.
authorFederico Mena Quintero <federico@ximian.com>
Thu, 29 Apr 2004 21:13:12 +0000 (21:13 +0000)
committerFederico Mena Quintero <federico@src.gnome.org>
Thu, 29 Apr 2004 21:13:12 +0000 (21:13 +0000)
2004-04-29  Federico Mena Quintero  <federico@ximian.com>

* gtk/tmpl/gtkfilechooser.sgml: Added an .gtkrc-2.0 example of how
to actually change the key bindings.

docs/reference/ChangeLog
docs/reference/gtk/tmpl/gtkfilechooser.sgml
docs/reference/gtk/tmpl/gtkfilechooserdialog.sgml

index e57060321cd8d59814bc3a8cf93350b7db6f2c36..4fa9a4822043c4c4c6555b44fbbcbece5f76d906 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-29  Federico Mena Quintero  <federico@ximian.com>
+
+       * gtk/tmpl/gtkfilechooser.sgml: Added an .gtkrc-2.0 example of how
+       to actually change the key bindings.
+
 2004-04-23  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/tmpl/gtkdialog.sgml: 
index f8a003f9c37934da25a92f4c70b982de76e63211..177e91aeaa29c709d69f13d09c13ccdc1f66c894 100644 (file)
@@ -157,6 +157,68 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
        describes the available key binding signals.
       </para>
 
+      <example id="gtkfilechooser-key-binding-example">
+       <title>GtkFileChooser key binding example</title>
+
+       <para>
+         The default keys that activate the key-binding signals in
+         <classname>GtkFileChooserDefaultClass</classname> are as
+         follows:
+       </para>
+
+       <informaltable>
+         <tgroup cols="2">
+           <tbody>
+             <row>
+               <entry>Signal name</entry>
+               <entry>Key</entry>
+             </row>
+             <row>
+               <entry>location-popup</entry>
+               <entry><keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo></entry>
+             </row>
+             <row>
+               <entry>up-folder</entry>
+               <entry><keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo></entry>
+             </row>
+             <row>
+               <entry>down-folder</entry>
+               <entry><keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo></entry>
+             </row>
+             <row>
+               <entry>home-folder</entry>
+               <entry><keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo></entry>
+             </row>
+           </tbody>
+         </tgroup>
+       </informaltable>
+
+       <para>
+         To change these defaults to something else, you could
+         include the following fragment in your
+         <filename>.gtkrc-2.0</filename> file:
+       </para>
+
+       <programlisting>
+binding "my-own-gtkfilechooser-bindings" {
+       bind "&lt;Alt&gt;&lt;Shift&gt;l" {
+               "location-popup" ()
+       }
+       bind "&lt;Alt&gt;&lt;Shift&gt;Up" {
+               "up-folder" ()
+       }
+       bind "&lt;Alt&gt;&lt;Shift&gt;Down" {
+               "down-folder" ()
+       }
+       bind "&lt;Alt&gt;&lt;Shift&gt;Home" {
+               "home-folder-folder" ()
+       }
+}
+
+class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
+       </programlisting>
+      </example>
+
       <refsect3 id="GtkFileChooserDefault-location-popup">
        <title>The &quot;GtkFileChooserDefault::location-popup&quot; signal</title>
 
index 0fd748a7b68f01f35c1dc5f16563863f9390ee06..dac3203e976d74ad323d29cd50535804c960ecf1 100644 (file)
@@ -130,7 +130,6 @@ dialog = gtk_file_chooser_dialog_new ("Open File",
 @Returns: 
 
 
-
 <!-- ##### FUNCTION gtk_file_chooser_dialog_new_with_backend ##### -->
 <para>
 
@@ -151,3 +150,5 @@ mode: sgml
 sgml-parent-document: ("../gtk-docs.sgml" "book" "refsect1")
 End:
 -->
+
+