]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkfilechooser.sgml
2.9.0
[~andy/gtk] / docs / reference / gtk / tmpl / gtkfilechooser.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkFileChooser
3
4 <!-- ##### SECTION Short_Description ##### -->
5 File chooser interface used by GtkFileChooserWidget and GtkFileChooserDialog
6
7 <!-- ##### SECTION Long_Description ##### -->
8     <para>
9       #GtkFileChooser is an interface that can be implemented by file
10       selection widgets.  In GTK+, the main objects that implement this
11       interface are #GtkFileChooserWidget, #GtkFileChooserDialog, and
12       #GtkFileChooserButton.  You do not need to write an object that
13       implements the #GtkFileChooser interface unless you are trying to
14       adapt an existing file selector to expose a standard programming
15       interface.
16     </para>
17
18     <para>
19       #GtkFileChooser allows for shortcuts to various places in the filesystem.
20       In the default implementation these are displayed in the left pane. It
21       may be a bit confusing at first taht these shortcuts come from various 
22       sources and in various flavours, so lets explain the terminology here:
23     </para>
24       <variablelist>
25          <varlistentry>
26            <term>Bookmarks</term>
27            <listitem><para>
28              are created by the user, by dragging folders from the 
29              right pane to the left pane, or by using the "Add". Bookmarks
30              can be renamed and deleted by the user.
31            </para></listitem>
32          </varlistentry>
33          <varlistentry>
34            <term>Shortcuts</term>
35            <listitem><para> 
36              can be provided by the application or by the underlying filesystem
37              abstraction (e.g. both the gnome-vfs and the Windows filesystems 
38              provide "Desktop" shortcuts). Shortcuts cannot be modified by the 
39              user.
40            </para></listitem>
41          </varlistentry>
42          <varlistentry> 
43            <term>Volumes</term>
44            <listitem><para>
45              are provided by the underlying filesystem abstraction. They are
46              the "roots" of the filesystem. 
47            </para></listitem>
48          </varlistentry>
49       </variablelist>
50
51     <refsect2 id="gtkfilechooser-encodings">
52       <title>File Names and Encodings</title>
53
54       <para>
55         When the user is finished selecting files in a
56         #GtkFileChooser, your program can get the selected names
57         either as filenames or as URIs.  For URIs, the normal escaping
58         rules are applied if the URI contains non-ASCII characters.
59         However, filenames are <emphasis>always</emphasis> returned in
60         the character set specified by the
61         <envar>G_FILENAME_ENCODING</envar> environment variable.
62         Please see the Glib documentation for more details about this
63         variable.
64       </para>
65
66       <important>
67         <para>
68           This means that while you can pass the result of
69           gtk_file_chooser_get_filename() to
70           <function>open(2)</function> or
71           <function>fopen(3)</function>, you may not be able to
72           directly set it as the text of a #GtkLabel widget unless you
73           convert it first to UTF-8, which all GTK+ widgets expect.
74           You should use g_filename_to_utf8() to convert filenames
75           into strings that can be passed to GTK+ widgets.
76         </para>
77       </important>
78     </refsect2>
79
80     <refsect2 id="gtkfilechooser-preview">
81       <title>Adding a Preview Widget</title>
82
83       <para>
84         You can add a custom preview widget to a file chooser and then
85         get notification about when the preview needs to be updated.
86         To install a preview widget, use
87         gtk_file_chooser_set_preview_widget().  Then, connect to the
88         #GtkFileChooser::update-preview signal to get notified when
89         you need to update the contents of the preview.
90       </para>
91
92       <para>
93         Your callback should use
94         gtk_file_chooser_get_preview_filename() to see what needs
95         previewing.  Once you have generated the preview for the
96         corresponding file, you must call
97         gtk_file_chooser_set_preview_widget_active() with a boolean
98         flag that indicates whether your callback could successfully
99         generate a preview.
100       </para>
101
102       <example id="example-gtkfilechooser-preview">
103         <title>Sample Usage</title>
104
105         <programlisting>
106 {
107   GtkImage *preview;
108
109   ...
110
111   preview = gtk_image_new (<!-- -->);
112
113   gtk_file_chooser_set_preview_widget (my_file_chooser, preview);
114   g_signal_connect (my_file_chooser, "update-preview",
115                     G_CALLBACK (update_preview_cb), preview);
116 }
117
118 static void
119 update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
120 {
121   GtkWidget *preview;
122   char *filename;
123   GdkPixbuf *pixbuf;
124   gboolean have_preview;
125
126   preview = GTK_WIDGET (data);
127   filename = gtk_file_chooser_get_preview_filename (file_chooser);
128
129   pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
130   have_preview = (pixbuf != NULL);
131   g_free (filename);
132
133   gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
134   if (pixbuf)
135     gobject_unref (pixbuf);
136
137   gtk_file_chooser_set_preview_widget_active (file_chooser, have_preview);
138 }
139         </programlisting>
140       </example>
141     </refsect2>
142
143     <refsect2 id="gtkfilechooser-extra">
144       <title>Adding Extra Widgets</title>
145
146       <para>
147         You can add extra widgets to a file chooser to provide options
148         that are not present in the default design.  For example, you
149         can add a toggle button to give the user the option to open a
150         file in read-only mode.  You can use
151         gtk_file_chooser_set_extra_widget() to insert additional
152         widgets in a file chooser.
153       </para>
154
155       <example id="example-gtkfilechooser-extra">
156         <title>Sample Usage</title>
157
158         <programlisting>
159 {
160   GtkWidget *toggle;
161
162   ...
163
164   toggle = gtk_check_button_new_with_label ("Open file read-only");
165   gtk_widget_show (toggle);
166   gtk_file_chooser_set_extra_widget (my_file_chooser, toggle);
167 }
168         </programlisting>
169       </example>
170
171       <note>
172         <para>
173           If you want to set more than one extra widget in the file
174           chooser, you can a container such as a GtkVBox or a GtkTable
175           and include your widgets in it.  Then, set the container as
176           the whole extra widget.
177         </para>
178       </note>
179     </refsect2>
180
181     <refsect2 id="gtkfilechooser-key-bindings">
182       <title>Key Bindings</title>
183
184       <para>
185         Internally, GTK+ implements a file chooser's graphical user
186         interface with the private
187         <classname>GtkFileChooserDefaultClass</classname>.  This
188         widget has several <link linkend="gtk-Bindings">key
189         bindings</link> and their associated signals.  This section
190         describes the available key binding signals.
191       </para>
192
193       <example id="gtkfilechooser-key-binding-example">
194         <title>GtkFileChooser key binding example</title>
195
196         <para>
197           The default keys that activate the key-binding signals in
198           <classname>GtkFileChooserDefaultClass</classname> are as
199           follows:
200         </para>
201
202         <informaltable>
203           <tgroup cols="2">
204             <tbody>
205               <row>
206                 <entry>Signal name</entry>
207                 <entry>Default key combinations</entry>
208               </row>
209               <row>
210                 <entry>location-popup</entry>
211                 <entry>
212                   <keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo> (empty path);
213                   <keycap>/</keycap> (path of "/")<footnote>
214                     <para>
215                       Both the individual <keycap>/</keycap> key and the
216                       numeric keypad's "divide" key are supported.
217                     </para>
218                   </footnote>;
219                   <keycap>~</keycap> (path of "~")
220                 </entry>
221               </row>
222               <row>
223                 <entry>up-folder</entry>
224                 <entry>
225                   <keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo><footnote>
226                     <para>
227                       Both the individual Up key and the numeric
228                       keypad's Up key are supported.
229                     </para>
230                   </footnote>
231                   ;
232                   <keycap>Backspace</keycap>
233                 </entry>
234               </row>
235               <row>
236                 <entry>down-folder</entry>
237                 <entry><keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo></entry>
238               </row>
239               <row>
240                 <entry>home-folder</entry>
241                 <entry><keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo></entry>
242               </row>
243               <row>
244                 <entry>desktop-folder</entry>
245                 <entry><keycombo><keycap>Alt</keycap><keycap>D</keycap></keycombo></entry>
246               </row>
247               <row>
248                 <entry>quick-bookmark</entry>
249                 <entry><keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo> through <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo></entry>
250               </row>
251             </tbody>
252           </tgroup>
253         </informaltable>
254
255         <para>
256           You can change these defaults to something else.  For
257           example, to add a <keycap>Shift</keycap> modifier to a few
258           of the default bindings, you can include the following
259           fragment in your <filename>.gtkrc-2.0</filename> file:
260         </para>
261
262         <programlisting>
263 binding "my-own-gtkfilechooser-bindings" {
264         bind "&lt;Alt&gt;&lt;Shift&gt;Up" {
265                 "up-folder" ()
266         }
267         bind "&lt;Alt&gt;&lt;Shift&gt;Down" {
268                 "down-folder" ()
269         }
270         bind "&lt;Alt&gt;&lt;Shift&gt;Home" {
271                 "home-folder" ()
272         }
273 }
274
275 class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
276         </programlisting>
277       </example>
278
279       <refsect3 id="GtkFileChooserDefault-location-popup">
280         <title>The &quot;GtkFileChooserDefault::location-popup&quot; signal</title>
281
282         <programlisting>
283           void user_function (GtkFileChooserDefault *chooser,
284                               const char            *path,
285                               <link linkend="gpointer">gpointer</link> user_data);
286         </programlisting>
287
288         <para>
289           This is used to make the file chooser show a "Location"
290           dialog which the user can use to manually type the name of
291           the file he wishes to select.  The
292           <parameter>path</parameter> argument is a string that gets
293           put in the text entry for the file name.  By default this is bound to
294           <keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>
295           with a <parameter>path</parameter> string of "" (the empty
296           string).  It is also bound to <keycap>/</keycap> with a
297           <parameter>path</parameter> string of "<literal>/</literal>"
298           (a slash):  this lets you type <keycap>/</keycap> and
299           immediately type a path name.  On Unix systems, this is bound to
300           <keycap>~</keycap> (tilde) with a <parameter>path</parameter> string
301           of "~" itself for access to home directories.
302         </para>
303
304         <variablelist role="params">
305           <varlistentry>
306             <term><parameter>chooser</parameter>&nbsp;:</term>
307             <listitem>
308               <simpara>
309                 the object which received the signal.
310               </simpara>
311             </listitem>
312           </varlistentry>
313           <varlistentry>
314             <term><parameter>path</parameter>&nbsp;:</term>
315             <listitem>
316               <simpara>
317                 default contents for the text entry for the file name
318               </simpara>
319             </listitem>
320           </varlistentry>
321           <varlistentry>
322             <term><parameter>user_data</parameter>&nbsp;:</term>
323             <listitem>
324               <simpara>
325                 user data set when the signal handler was connected.
326               </simpara>
327             </listitem>
328           </varlistentry>
329         </variablelist>
330
331         <tip>
332           <para>
333             You can create your own bindings for the
334             <symbol>location-popup</symbol> signal with custom
335             <parameter>path</parameter> strings, and have a crude form
336             of easily-to-type bookmarks.  For example, say you access
337             the path <filename>/home/username/misc</filename> very
338             frequently.  You could then create an <keycombo>
339             <keycap>Alt</keycap> <keycap>M</keycap> </keycombo>
340             shortcut by including the following in your
341             <filename>.gtkrc-2.0</filename>:
342           </para>
343
344           <programlisting>
345 binding "misc-shortcut" {
346         bind "&lt;Alt&gt;M" {
347                 "location-popup" ("/home/username/misc")
348         }
349 }
350
351 class "GtkFileChooserDefault" binding "misc-shortcut"
352           </programlisting>
353         </tip>
354       </refsect3>
355
356       <refsect3 id="GtkFileChooserDefault-up-folder">
357         <title>The &quot;GtkFileChooserDefault::up-folder&quot; signal</title>
358
359         <programlisting>
360           void user_function (GtkFileChooserDefault *chooser,
361                               <link linkend="gpointer">gpointer</link> user_data);
362         </programlisting>
363
364         <para>
365           This is used to make the file chooser go to the parent of
366           the current folder in the file hierarchy.  By default this
367           is bound to <keycap>Backspace</keycap> and
368           <keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo>
369           (the Up key in the numeric keypad also works).
370         </para>
371
372         <variablelist role="params">
373           <varlistentry>
374             <term><parameter>chooser</parameter>&nbsp;:</term>
375             <listitem>
376               <simpara>
377                 the object which received the signal.
378               </simpara>
379             </listitem>
380           </varlistentry>
381           <varlistentry>
382             <term><parameter>user_data</parameter>&nbsp;:</term>
383             <listitem>
384               <simpara>
385                 user data set when the signal handler was connected.
386               </simpara>
387             </listitem>
388           </varlistentry>
389         </variablelist>
390       </refsect3>
391
392       <refsect3 id="GtkFileChooserDefault-down-folder">
393         <title>The &quot;GtkFileChooserDefault::down-folder&quot; signal</title>
394
395         <programlisting>
396           void user_function (GtkFileChooserDefault *chooser,
397                               <link linkend="gpointer">gpointer</link> user_data);
398         </programlisting>
399
400         <para>
401           This is used to make the file chooser go to a child of the
402           current folder in the file hierarchy.  The subfolder that
403           will be used is displayed in the path bar widget of the file
404           chooser.  For example, if the path bar is showing
405           "/foo/<emphasis>bar/</emphasis>baz", then this will cause
406           the file chooser to switch to the "baz" subfolder.  By
407           default this is bound to
408           <keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo>
409           (the Down key in the numeric keypad also works).
410         </para>
411
412         <variablelist role="params">
413           <varlistentry>
414             <term><parameter>chooser</parameter>&nbsp;:</term>
415             <listitem>
416               <simpara>
417                 the object which received the signal.
418               </simpara>
419             </listitem>
420           </varlistentry>
421           <varlistentry>
422             <term><parameter>user_data</parameter>&nbsp;:</term>
423             <listitem>
424               <simpara>
425                 user data set when the signal handler was connected.
426               </simpara>
427             </listitem>
428           </varlistentry>
429         </variablelist>
430       </refsect3>
431
432       <refsect3 id="GtkFileChooserDefault-home-folder">
433         <title>The &quot;GtkFileChooserDefault::home-folder&quot; signal</title>
434
435         <programlisting>
436           void user_function (GtkFileChooserDefault *chooser,
437                               <link linkend="gpointer">gpointer</link> user_data);
438         </programlisting>
439
440         <para>
441           This is used to make the file chooser show the user's home
442           folder in the file list.  By default this is bound to
443           <keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo>
444           (the Home key in the numeric keypad also works).
445         </para>
446
447         <variablelist role="params">
448           <varlistentry>
449             <term><parameter>chooser</parameter>&nbsp;:</term>
450             <listitem>
451               <simpara>
452                 the object which received the signal.
453               </simpara>
454             </listitem>
455           </varlistentry>
456           <varlistentry>
457             <term><parameter>user_data</parameter>&nbsp;:</term>
458             <listitem>
459               <simpara>
460                 user data set when the signal handler was connected.
461               </simpara>
462             </listitem>
463           </varlistentry>
464         </variablelist>
465       </refsect3>
466
467       <refsect3 id="GtkFileChooserDefault-desktop-folder">
468         <title>The &quot;GtkFileChooserDefault::desktop-folder&quot; signal</title>
469
470         <programlisting>
471           void user_function (GtkFileChooserDefault *chooser,
472                               <link linkend="gpointer">gpointer</link> user_data);
473         </programlisting>
474
475         <para>
476           This is used to make the file chooser show the user's Desktop
477           folder in the file list.  By default this is bound to
478           <keycombo><keycap>Alt</keycap><keycap>D</keycap></keycombo>.
479         </para>
480
481         <variablelist role="params">
482           <varlistentry>
483             <term><parameter>chooser</parameter>&nbsp;:</term>
484             <listitem>
485               <simpara>
486                 the object which received the signal.
487               </simpara>
488             </listitem>
489           </varlistentry>
490           <varlistentry>
491             <term><parameter>user_data</parameter>&nbsp;:</term>
492             <listitem>
493               <simpara>
494                 user data set when the signal handler was connected.
495               </simpara>
496             </listitem>
497           </varlistentry>
498         </variablelist>
499       </refsect3>
500
501       <refsect3 id="GtkFileChooserDefault-quick-bookmark">
502         <title>The &quot;GtkFileChooserDefault::quick-bookmark&quot; signal</title>
503
504         <programlisting>
505           void user_function (GtkFileChooserDefault *chooser,
506                               gint bookmark_index,
507                               <link linkend="gpointer">gpointer</link> user_data);
508         </programlisting>
509
510         <para>
511           This is used to make the file chooser switch to the bookmark
512           specified in the <parameter>bookmark_index</parameter> parameter.
513           For example, if you have three bookmarks, you can pass 0, 1, 2 to
514           this signal to switch to each of them, respectively.  By default this is bound to
515           <keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo>,
516           <keycombo><keycap>Alt</keycap><keycap>2</keycap></keycombo>, 
517           etc. until
518           <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo>.  Note
519           that in the default binding,
520           that <keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo> is
521           actually defined to switch to the bookmark at index 0, and so on
522           successively;
523           <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo> is
524           defined to switch to the bookmark at index 10.
525         </para>
526
527         <variablelist role="params">
528           <varlistentry>
529             <term><parameter>chooser</parameter>&nbsp;:</term>
530             <listitem>
531               <simpara>
532                 the object which received the signal.
533               </simpara>
534             </listitem>
535           </varlistentry>
536           <varlistentry>
537             <term><parameter>bookmark_indes</parameter>&nbsp;:</term>
538             <listitem>
539               <simpara>
540                 index of the bookmark to switch to; the indices start at 0.
541               </simpara>
542             </listitem>
543           </varlistentry>
544           <varlistentry>
545             <term><parameter>user_data</parameter>&nbsp;:</term>
546             <listitem>
547               <simpara>
548                 user data set when the signal handler was connected.
549               </simpara>
550             </listitem>
551           </varlistentry>
552         </variablelist>
553       </refsect3>
554     </refsect2>
555
556 <!-- ##### SECTION See_Also ##### -->
557     <para>
558       #GtkFileChooserDialog, #GtkFileChooserWidget, #GtkFileChooserButton
559     </para>
560
561 <!-- ##### SECTION Stability_Level ##### -->
562
563
564 <!-- ##### STRUCT GtkFileChooser ##### -->
565 <para>
566
567 </para>
568
569
570 <!-- ##### SIGNAL GtkFileChooser::confirm-overwrite ##### -->
571     <para>
572       This signal gets emitted whenever it is appropriate to present a
573       confirmation dialog when the user has selected a file name that
574       already exists.  The signal only gets emitted when the file
575       chooser is in #GTK_FILE_CHOOSER_ACTION_SAVE mode.
576     </para>
577
578     <para>
579       Most applications just need to turn on the <link
580       linkend="GtkFileChooser--do-overwrite-confirmation">do-overwrite-confirmation</link>
581       property (or call the
582       gtk_file_chooser_set_do_overwrite_confirmation() function), and
583       they will automatically get a stock confirmation dialog.
584       Applications which need to customize this behavior should do
585       that, and also connect to the <symbol>confirm-overwrite</symbol>
586       signal.
587     </para>
588
589     <para>
590       A signal handler for this signal must return a
591       #GtkFileChooserConfirmation value, which indicates the action to
592       take.  If the handler determines that the user wants to select a
593       different filename, it should return
594       #GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN.  If it determines
595       that the user is satisfied with his choice of file name, it
596       should return #GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME.
597       On the other hand, if it determines that the stock confirmation
598       dialog should be used, it should return
599       #GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM.  The following example
600       illustrates this.
601     </para>
602
603     <example id="gtkfilechooser-confirmation">
604       <title>Custom confirmation</title>
605
606       <programlisting>
607 static GtkFileChooserConfirmation
608 confirm_overwrite_callback (GtkFileChooser *chooser, gpointer data)
609 {
610   char *uri;
611
612   uri = gtk_file_chooser_get_uri (chooser);
613
614   if (is_uri_read_only (uri))
615     {
616       if (user_wants_to_replace_read_only_file (uri))
617         return GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME;
618       else
619         return GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN;
620     } else
621       return GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM; /* fall back to the default dialog */
622 }
623
624 ...
625
626 chooser = gtk_file_chooser_dialog_new (...);
627
628 gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
629 g_signal_connect (chooser, "confirm-overwrite",
630                   G_CALLBACK (confirm_overwrite_callback), NULL);
631
632 if (gtk_dialog_run (chooser) == GTK_RESPONSE_ACCEPT)
633         save_to_file (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
634
635 gtk_widget_destroy (chooser);
636       </programlisting>
637     </example>
638
639 @filechooser: the object which received the signal.
640 @Returns: #GtkFileChooserConfirmation value that indicates which
641     action to take after emitting the signal.
642
643     <para>
644       Since 2.8
645     </para>
646
647 <!-- ##### SIGNAL GtkFileChooser::current-folder-changed ##### -->
648 <para>
649
650 </para>
651
652 @filechooser: the object which received the signal.
653
654 <!-- ##### SIGNAL GtkFileChooser::file-activated ##### -->
655 <para>
656
657 </para>
658
659 @filechooser: the object which received the signal.
660
661 <!-- ##### SIGNAL GtkFileChooser::selection-changed ##### -->
662 <para>
663
664 </para>
665
666 @filechooser: the object which received the signal.
667
668 <!-- ##### SIGNAL GtkFileChooser::update-preview ##### -->
669 <para>
670
671 </para>
672
673 @filechooser: the object which received the signal.
674
675 <!-- ##### ARG GtkFileChooser:action ##### -->
676 <para>
677
678 </para>
679
680 <!-- ##### ARG GtkFileChooser:do-overwrite-confirmation ##### -->
681 <para>
682
683 </para>
684
685 <!-- ##### ARG GtkFileChooser:extra-widget ##### -->
686 <para>
687
688 </para>
689
690 <!-- ##### ARG GtkFileChooser:file-system-backend ##### -->
691 <para>
692
693 </para>
694
695 <!-- ##### ARG GtkFileChooser:filter ##### -->
696 <para>
697
698 </para>
699
700 <!-- ##### ARG GtkFileChooser:local-only ##### -->
701 <para>
702
703 </para>
704
705 <!-- ##### ARG GtkFileChooser:preview-widget ##### -->
706 <para>
707
708 </para>
709
710 <!-- ##### ARG GtkFileChooser:preview-widget-active ##### -->
711 <para>
712
713 </para>
714
715 <!-- ##### ARG GtkFileChooser:select-multiple ##### -->
716 <para>
717
718 </para>
719
720 <!-- ##### ARG GtkFileChooser:show-hidden ##### -->
721 <para>
722
723 </para>
724
725 <!-- ##### ARG GtkFileChooser:use-preview-label ##### -->
726 <para>
727
728 </para>
729
730 <!-- ##### ENUM GtkFileChooserAction ##### -->
731     <para>
732       Describes whether a #GtkFileChooser is being used to open
733       existing files or to save to a possibly new file.
734     </para>
735
736 @GTK_FILE_CHOOSER_ACTION_OPEN: Indicates open mode.  The file chooser
737     will only let the user pick an existing file.
738 @GTK_FILE_CHOOSER_ACTION_SAVE: Indicates save mode.  The file chooser
739     will let the user pick an existing file, or type in a new
740     filename.
741 @GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER: Indicates an Open mode for
742     selecting folders.  The file chooser will let the user pick an
743     existing folder.
744 @GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER: Indicates a mode for creating a
745     new folder.  The file chooser will let the user name an existing or
746     new folder.
747
748 <!-- ##### ENUM GtkFileChooserConfirmation ##### -->
749     <para>
750       Used as a return value of handlers for the <link
751       linkend="GtkFileChooser-confirm-overwrite">confirm-overwrite</link>
752       signal of a <classname>GtkFileChooser</classname>.  This value
753       determines whether the file chooser will present the stock
754       confirmation dialog, accept the user's choice of a filename, or
755       let the user choose another filename.
756     </para>
757
758 @GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM: The file chooser will present
759     its stock dialog to confirm about overwriting an existing file.
760 @GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME: The file chooser will
761     terminate and accept the user's choice of a file name.
762 @GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN: The file chooser will
763     continue running, so as to let the user select another file name.
764
765     <para>
766       Since 2.8
767     </para>
768
769 <!-- ##### MACRO GTK_FILE_CHOOSER_ERROR ##### -->
770     <para>
771       Used to get the #GError quark for #GtkFileChooser errors.
772     </para>
773
774
775
776 <!-- ##### ENUM GtkFileChooserError ##### -->
777     <para>
778       These identify the various errors that can occur while calling
779       #GtkFileChooser functions.
780     </para>
781
782 @GTK_FILE_CHOOSER_ERROR_NONEXISTENT: Indicates that a file does not exist.
783 @GTK_FILE_CHOOSER_ERROR_BAD_FILENAME: Indicates a malformed filename.
784 @GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS: 
785
786 <!-- ##### FUNCTION gtk_file_chooser_set_action ##### -->
787 <para>
788
789 </para>
790
791 @chooser: 
792 @action: 
793
794
795 <!-- ##### FUNCTION gtk_file_chooser_get_action ##### -->
796 <para>
797
798 </para>
799
800 @chooser: 
801 @Returns: 
802
803
804 <!-- ##### FUNCTION gtk_file_chooser_set_local_only ##### -->
805 <para>
806
807 </para>
808
809 @chooser: 
810 @local_only: 
811
812
813 <!-- ##### FUNCTION gtk_file_chooser_get_local_only ##### -->
814 <para>
815
816 </para>
817
818 @chooser: 
819 @Returns: 
820
821
822 <!-- ##### FUNCTION gtk_file_chooser_set_select_multiple ##### -->
823 <para>
824
825 </para>
826
827 @chooser: 
828 @select_multiple: 
829
830
831 <!-- ##### FUNCTION gtk_file_chooser_get_select_multiple ##### -->
832 <para>
833
834 </para>
835
836 @chooser: 
837 @Returns: 
838
839
840 <!-- ##### FUNCTION gtk_file_chooser_set_show_hidden ##### -->
841 <para>
842
843 </para>
844
845 @chooser: 
846 @show_hidden: 
847
848
849 <!-- ##### FUNCTION gtk_file_chooser_get_show_hidden ##### -->
850 <para>
851
852 </para>
853
854 @chooser: 
855 @Returns: 
856
857
858 <!-- ##### FUNCTION gtk_file_chooser_set_do_overwrite_confirmation ##### -->
859 <para>
860
861 </para>
862
863 @chooser: 
864 @do_overwrite_confirmation: 
865
866
867 <!-- ##### FUNCTION gtk_file_chooser_get_do_overwrite_confirmation ##### -->
868 <para>
869
870 </para>
871
872 @chooser: 
873 @Returns: 
874
875
876 <!-- ##### FUNCTION gtk_file_chooser_set_current_name ##### -->
877 <para>
878
879 </para>
880
881 @chooser: 
882 @name: 
883
884
885 <!-- ##### FUNCTION gtk_file_chooser_get_filename ##### -->
886 <para>
887
888 </para>
889
890 @chooser: 
891 @Returns: 
892
893
894 <!-- ##### FUNCTION gtk_file_chooser_set_filename ##### -->
895 <para>
896
897 </para>
898
899 @chooser: 
900 @filename: 
901 @Returns: 
902
903
904 <!-- ##### FUNCTION gtk_file_chooser_select_filename ##### -->
905 <para>
906
907 </para>
908
909 @chooser: 
910 @filename: 
911 @Returns: 
912
913
914 <!-- ##### FUNCTION gtk_file_chooser_unselect_filename ##### -->
915 <para>
916
917 </para>
918
919 @chooser: 
920 @filename: 
921
922
923 <!-- ##### FUNCTION gtk_file_chooser_select_all ##### -->
924 <para>
925
926 </para>
927
928 @chooser: 
929
930
931 <!-- ##### FUNCTION gtk_file_chooser_unselect_all ##### -->
932 <para>
933
934 </para>
935
936 @chooser: 
937
938
939 <!-- ##### FUNCTION gtk_file_chooser_get_filenames ##### -->
940 <para>
941
942 </para>
943
944 @chooser: 
945 @Returns: 
946
947
948 <!-- ##### FUNCTION gtk_file_chooser_set_current_folder ##### -->
949 <para>
950
951 </para>
952
953 @chooser: 
954 @filename: 
955 @Returns: 
956
957
958 <!-- ##### FUNCTION gtk_file_chooser_get_current_folder ##### -->
959 <para>
960
961 </para>
962
963 @chooser: 
964 @Returns: 
965
966
967 <!-- ##### FUNCTION gtk_file_chooser_get_uri ##### -->
968 <para>
969
970 </para>
971
972 @chooser: 
973 @Returns: 
974
975
976 <!-- ##### FUNCTION gtk_file_chooser_set_uri ##### -->
977 <para>
978
979 </para>
980
981 @chooser: 
982 @uri: 
983 @Returns: 
984
985
986 <!-- ##### FUNCTION gtk_file_chooser_select_uri ##### -->
987 <para>
988
989 </para>
990
991 @chooser: 
992 @uri: 
993 @Returns: 
994
995
996 <!-- ##### FUNCTION gtk_file_chooser_unselect_uri ##### -->
997 <para>
998
999 </para>
1000
1001 @chooser: 
1002 @uri: 
1003
1004
1005 <!-- ##### FUNCTION gtk_file_chooser_get_uris ##### -->
1006 <para>
1007
1008 </para>
1009
1010 @chooser: 
1011 @Returns: 
1012
1013
1014 <!-- ##### FUNCTION gtk_file_chooser_set_current_folder_uri ##### -->
1015 <para>
1016
1017 </para>
1018
1019 @chooser: 
1020 @uri: 
1021 @Returns: 
1022
1023
1024 <!-- ##### FUNCTION gtk_file_chooser_get_current_folder_uri ##### -->
1025 <para>
1026
1027 </para>
1028
1029 @chooser: 
1030 @Returns: 
1031
1032
1033 <!-- ##### FUNCTION gtk_file_chooser_set_preview_widget ##### -->
1034 <para>
1035
1036 </para>
1037
1038 @chooser: 
1039 @preview_widget: 
1040
1041
1042 <!-- ##### FUNCTION gtk_file_chooser_get_preview_widget ##### -->
1043 <para>
1044
1045 </para>
1046
1047 @chooser: 
1048 @Returns: 
1049
1050
1051 <!-- ##### FUNCTION gtk_file_chooser_set_preview_widget_active ##### -->
1052 <para>
1053
1054 </para>
1055
1056 @chooser: 
1057 @active: 
1058
1059
1060 <!-- ##### FUNCTION gtk_file_chooser_get_preview_widget_active ##### -->
1061 <para>
1062
1063 </para>
1064
1065 @chooser: 
1066 @Returns: 
1067
1068
1069 <!-- ##### FUNCTION gtk_file_chooser_set_use_preview_label ##### -->
1070 <para>
1071
1072 </para>
1073
1074 @chooser: 
1075 @use_label: 
1076
1077
1078 <!-- ##### FUNCTION gtk_file_chooser_get_use_preview_label ##### -->
1079 <para>
1080
1081 </para>
1082
1083 @chooser: 
1084 @Returns: 
1085
1086
1087 <!-- ##### FUNCTION gtk_file_chooser_get_preview_filename ##### -->
1088 <para>
1089
1090 </para>
1091
1092 @chooser: 
1093 @Returns: 
1094
1095
1096 <!-- ##### FUNCTION gtk_file_chooser_get_preview_uri ##### -->
1097 <para>
1098
1099 </para>
1100
1101 @chooser: 
1102 @Returns: 
1103
1104
1105 <!-- ##### FUNCTION gtk_file_chooser_set_extra_widget ##### -->
1106 <para>
1107
1108 </para>
1109
1110 @chooser: 
1111 @extra_widget: 
1112
1113
1114 <!-- ##### FUNCTION gtk_file_chooser_get_extra_widget ##### -->
1115 <para>
1116
1117 </para>
1118
1119 @chooser: 
1120 @Returns: 
1121
1122
1123 <!-- ##### FUNCTION gtk_file_chooser_add_filter ##### -->
1124 <para>
1125
1126 </para>
1127
1128 @chooser: 
1129 @filter: 
1130
1131
1132 <!-- ##### FUNCTION gtk_file_chooser_remove_filter ##### -->
1133 <para>
1134
1135 </para>
1136
1137 @chooser: 
1138 @filter: 
1139
1140
1141 <!-- ##### FUNCTION gtk_file_chooser_list_filters ##### -->
1142 <para>
1143
1144 </para>
1145
1146 @chooser: 
1147 @Returns: 
1148
1149
1150 <!-- ##### FUNCTION gtk_file_chooser_set_filter ##### -->
1151 <para>
1152
1153 </para>
1154
1155 @chooser: 
1156 @filter: 
1157
1158
1159 <!-- ##### FUNCTION gtk_file_chooser_get_filter ##### -->
1160 <para>
1161
1162 </para>
1163
1164 @chooser: 
1165 @Returns: 
1166
1167
1168 <!-- ##### FUNCTION gtk_file_chooser_add_shortcut_folder ##### -->
1169 <para>
1170
1171 </para>
1172
1173 @chooser: 
1174 @folder: 
1175 @error: 
1176 @Returns: 
1177
1178
1179 <!-- ##### FUNCTION gtk_file_chooser_remove_shortcut_folder ##### -->
1180 <para>
1181
1182 </para>
1183
1184 @chooser: 
1185 @folder: 
1186 @error: 
1187 @Returns: 
1188
1189
1190 <!-- ##### FUNCTION gtk_file_chooser_list_shortcut_folders ##### -->
1191 <para>
1192
1193 </para>
1194
1195 @chooser: 
1196 @Returns: 
1197
1198
1199 <!-- ##### FUNCTION gtk_file_chooser_add_shortcut_folder_uri ##### -->
1200 <para>
1201
1202 </para>
1203
1204 @chooser: 
1205 @uri: 
1206 @error: 
1207 @Returns: 
1208
1209
1210 <!-- ##### FUNCTION gtk_file_chooser_remove_shortcut_folder_uri ##### -->
1211 <para>
1212
1213 </para>
1214
1215 @chooser: 
1216 @uri: 
1217 @error: 
1218 @Returns: 
1219
1220
1221 <!-- ##### FUNCTION gtk_file_chooser_list_shortcut_folder_uris ##### -->
1222 <para>
1223
1224 </para>
1225
1226 @chooser: 
1227 @Returns: 
1228
1229
1230
1231 <!--
1232 Local variables:
1233 mode: sgml
1234 sgml-parent-document: ("../gtk-docs.sgml" "book" "refentry")
1235 End:
1236 -->
1237
1238