📄 gtkfilechooser.html
字号:
<tr><td><p><span class="term"><em class="parameter"><code>chooser</code></em> :</span></p></td><td> the object which received the signal. </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td> user data set when the signal handler was connected. </td></tr></tbody></table></div></div><div class="refsect3" lang="en"><a name="GtkFileChooserDefault-home-folder"></a><h4>The "GtkFileChooserDefault::home-folder" signal</h4><pre class="programlisting"> void user_function (GtkFileChooserDefault *chooser, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data); </pre><p> This is used to make the file chooser show the user's home folder in the file list. By default this is bound to <span class="keycap"><strong>Alt</strong></span>+<span class="keycap"><strong>Home</strong></span> (the Home key in the numeric keypad also works). </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>chooser</code></em> :</span></p></td><td> the object which received the signal. </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td> user data set when the signal handler was connected. </td></tr></tbody></table></div></div><div class="refsect3" lang="en"><a name="GtkFileChooserDefault-desktop-folder"></a><h4>The "GtkFileChooserDefault::desktop-folder" signal</h4><pre class="programlisting"> void user_function (GtkFileChooserDefault *chooser, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data); </pre><p> This is used to make the file chooser show the user's Desktop folder in the file list. By default this is bound to <span class="keycap"><strong>Alt</strong></span>+<span class="keycap"><strong>D</strong></span>. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>chooser</code></em> :</span></p></td><td> the object which received the signal. </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td> user data set when the signal handler was connected. </td></tr></tbody></table></div></div><div class="refsect3" lang="en"><a name="GtkFileChooserDefault-quick-bookmark"></a><h4>The "GtkFileChooserDefault::quick-bookmark" signal</h4><pre class="programlisting"> void user_function (GtkFileChooserDefault *chooser, gint bookmark_index, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data); </pre><p> This is used to make the file chooser switch to the bookmark specified in the <em class="parameter"><code>bookmark_index</code></em> parameter. For example, if you have three bookmarks, you can pass 0, 1, 2 to this signal to switch to each of them, respectively. By default this is bound to <span class="keycap"><strong>Alt</strong></span>+<span class="keycap"><strong>1</strong></span>, <span class="keycap"><strong>Alt</strong></span>+<span class="keycap"><strong>2</strong></span>, etc. until <span class="keycap"><strong>Alt</strong></span>+<span class="keycap"><strong>0</strong></span>. Note that in the default binding, that <span class="keycap"><strong>Alt</strong></span>+<span class="keycap"><strong>1</strong></span> is actually defined to switch to the bookmark at index 0, and so on successively; <span class="keycap"><strong>Alt</strong></span>+<span class="keycap"><strong>0</strong></span> is defined to switch to the bookmark at index 10. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>chooser</code></em> :</span></p></td><td> the object which received the signal. </td></tr><tr><td><p><span class="term"><em class="parameter"><code>bookmark_indes</code></em> :</span></p></td><td> index of the bookmark to switch to; the indices start at 0. </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td> user data set when the signal handler was connected. </td></tr></tbody></table></div></div></div></div><div class="refsect1" lang="en"><a name="id4013047"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id4013057"></a><h3><a name="GtkFileChooser-struct"></a>GtkFileChooser</h3><a class="indexterm" name="id4013071"></a><pre class="programlisting">typedef struct _GtkFileChooser GtkFileChooser;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id4013086"></a><h3><a name="GtkFileChooserAction"></a>enum GtkFileChooserAction</h3><a class="indexterm" name="id4013099"></a><pre class="programlisting">typedef enum{ GTK_FILE_CHOOSER_ACTION_OPEN, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER} GtkFileChooserAction;</pre><p> Describes whether a <a class="link" href="GtkFileChooser.html" title="GtkFileChooser"><span class="type">GtkFileChooser</span></a> is being used to open existing files or to save to a possibly new file. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="GTK-FILE-CHOOSER-ACTION-OPEN:CAPS"></a><code class="literal">GTK_FILE_CHOOSER_ACTION_OPEN</code></span></p></td><td>Indicates open mode. The file chooser will only let the user pick an existing file.</td></tr><tr><td><p><span class="term"><a name="GTK-FILE-CHOOSER-ACTION-SAVE:CAPS"></a><code class="literal">GTK_FILE_CHOOSER_ACTION_SAVE</code></span></p></td><td>Indicates save mode. The file chooser will let the user pick an existing file, or type in a new filename.</td></tr><tr><td><p><span class="term"><a name="GTK-FILE-CHOOSER-ACTION-SELECT-FOLDER:CAPS"></a><code class="literal">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</code></span></p></td><td>Indicates an Open mode for selecting folders. The file chooser will let the user pick an existing folder.</td></tr><tr><td><p><span class="term"><a name="GTK-FILE-CHOOSER-ACTION-CREATE-FOLDER:CAPS"></a><code class="literal">GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER</code></span></p></td><td>Indicates a mode for creating a new folder. The file chooser will let the user name an existing or new folder.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4013229"></a><h3><a name="GtkFileChooserConfirmation"></a>enum GtkFileChooserConfirmation</h3><a class="indexterm" name="id4013243"></a><pre class="programlisting">typedef enum{ GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM, GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME, GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN} GtkFileChooserConfirmation;</pre><p> Used as a return value of handlers for the <a class="link" href="GtkFileChooser.html#GtkFileChooser-confirm-overwrite">confirm-overwrite</a> signal of a <code class="classname">GtkFileChooser</code>. This value determines whether the file chooser will present the stock confirmation dialog, accept the user's choice of a filename, or let the user choose another filename. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="GTK-FILE-CHOOSER-CONFIRMATION-CONFIRM:CAPS"></a><code class="literal">GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM</code></span></p></td><td>The file chooser will present its stock dialog to confirm about overwriting an existing file.</td></tr><tr><td><p><span class="term"><a name="GTK-FILE-CHOOSER-CONFIRMATION-ACCEPT-FILENAME:CAPS"></a><code class="literal">GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME</code></span></p></td><td>The file chooser will terminate and accept the user's choice of a file name.</td></tr><tr><td><p><span class="term"><a name="GTK-FILE-CHOOSER-CONFIRMATION-SELECT-AGAIN:CAPS"></a><code class="literal">GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN</code></span></p></td><td>The file chooser will continue running, so as to let the user select another file name. <p> Since 2.8 </p></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4013360"></a><h3><a name="GTK-FILE-CHOOSER-ERROR:CAPS"></a>GTK_FILE_CHOOSER_ERROR</h3><a class="indexterm" name="id4013374"></a><pre class="programlisting">#define GTK_FILE_CHOOSER_ERROR (gtk_file_chooser_error_quark ())</pre><p> Used to get the <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> quark for <a class="link" href="GtkFileChooser.html" title="GtkFileChooser"><span class="type">GtkFileChooser</span></a> errors. </p></div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -