gtkrecentchooserdialog.html

来自「最新gtk中文资料集」· HTML 代码 · 共 348 行 · 第 1/2 页

HTML
348
字号
  {    GtkRecentInfo *info;    info = gtk_recent_chooser_get_current_item (GTK_RECENT_CHOOSER (dialog));    open_file (gtk_recent_info_get_uri (info));    gtk_recent_info_unref (info);  }gtk_widget_destroy (dialog);  </pre></div></div><br class="example-break"><p>Recently used files are supported since GTK+ 2.10.</p></div><div class="refsect1" lang="en"><a name="id4438251"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id4438261"></a><h3><a name="GtkRecentChooserDialog-struct"></a>GtkRecentChooserDialog</h3><a class="indexterm" name="id4438276"></a><pre class="programlisting">typedef struct _GtkRecentChooserDialog GtkRecentChooserDialog;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id4438292"></a><h3><a name="gtk-recent-chooser-dialog-new"></a>gtk_recent_chooser_dialog_new ()</h3><a class="indexterm" name="id4438307"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_recent_chooser_dialog_new       (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *title,                                                         <a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a> *parent,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *first_button_text,                                                         ...);</pre><p>Creates a new <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a>.  This function is analogous to<a class="link" href="GtkDialog.html#gtk-dialog-new-with-buttons"><code class="function">gtk_dialog_new_with_buttons()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>title</code></em>&#160;:</span></p></td><td> Title of the dialog, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>parent</code></em>&#160;:</span></p></td><td> Transient parent of the dialog, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>,</td></tr><tr><td><p><span class="term"><em class="parameter"><code>first_button_text</code></em>&#160;:</span></p></td><td> stock ID or text to go in the first button, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td><td> response ID for the first button, then additional (button, id)  pairs, ending with <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a new <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a></td></tr></tbody></table></div><p class="since">Since  2.10</p></div><hr><div class="refsect2" lang="en"><a name="id4438504"></a><h3><a name="gtk-recent-chooser-dialog-new-for-manager"></a>gtk_recent_chooser_dialog_new_for_manager ()</h3><a class="indexterm" name="id4438522"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_recent_chooser_dialog_new_for_manager                                                        (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *title,                                                         <a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a> *parent,                                                         <a class="link" href="GtkRecentManager.html" title="GtkRecentManager">GtkRecentManager</a> *manager,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *first_button_text,                                                         ...);</pre><p>Creates a new <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a> with a specified recent manager.</p><p>This is useful if you have implemented your own recent manager, or if youhave a customized instance of a <a class="link" href="GtkRecentManager.html" title="GtkRecentManager"><span class="type">GtkRecentManager</span></a> object.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>title</code></em>&#160;:</span></p></td><td> Title of the dialog, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>parent</code></em>&#160;:</span></p></td><td> Transient parent of the dialog, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>,</td></tr><tr><td><p><span class="term"><em class="parameter"><code>manager</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkRecentManager.html" title="GtkRecentManager"><span class="type">GtkRecentManager</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>first_button_text</code></em>&#160;:</span></p></td><td> stock ID or text to go in the first button, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td><td> response ID for the first button, then additional (button, id)  pairs, ending with <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a new <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a></td></tr></tbody></table></div><p class="since">Since  2.10</p></div></div><div class="refsect1" lang="en"><a name="id4438753"></a><h2>See Also</h2><p><a class="link" href="GtkRecentChooser.html" title="GtkRecentChooser"><span class="type">GtkRecentChooser</span></a>, <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></div><div class="refsect1" lang="en"><a name="id4438778"></a><div class="refsect2" lang="en"><a name="id4438780"></a></div><hr><div class="refsect2" lang="en"><a name="id4438781"></a></div></div></div></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?