|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
xmlns:its="http://www.w3.org/2005/11/its"
|
|
Packit |
1470ea |
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
Packit |
1470ea |
type="guide" style="task"
|
|
Packit |
1470ea |
id="filechooserdialog.vala">
|
|
Packit |
1470ea |
<info>
|
|
Packit |
1470ea |
<title type="text">FileChooserDialog (Vala)</title>
|
|
Packit |
1470ea |
<link type="guide" xref="beginner.vala#file-selectors"/>
|
|
Packit |
1470ea |
<link type="seealso" xref="textview.vala"/>
|
|
Packit |
1470ea |
<link type="seealso" xref="menubar.vala"/>
|
|
Packit |
1470ea |
<link type="seealso" xref="scrolledwindow.vala"/>
|
|
Packit |
1470ea |
<revision version="0.1" date="2012-07-01" status="draft"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<credit type="author copyright">
|
|
Packit |
1470ea |
<name>Tiffany Antopolski</name>
|
|
Packit |
1470ea |
<email its:translate="no">tiffany.antopolski@gmail.com</email>
|
|
Packit |
1470ea |
<years>2012</years>
|
|
Packit |
1470ea |
</credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<desc>A dialog suitable for "Open" and "Save" commands.</desc>
|
|
Packit |
1470ea |
</info>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<title>FileChooserDialog</title>
|
|
Packit |
1470ea |
<links type="sections"/>
|
|
Packit |
1470ea |
<section id="overview"><title>Overview of the example</title>
|
|
Packit |
1470ea |
This example demonstrates how the FileChooserDialog can be used. It is incorporated into a very simple text editor application. All the <link xref="menubar.vala#win-app">actions</link>, including the "open", "save" and "save-as" commands can be found in the <link xref="gmenu.vala">app-menu</link>. Here, the app-menu is created using an XML UI file, which is then imported into the application using Gtk.Builder.
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
<section id="xml"><title>XML UI file which creates the app-menu</title>
|
|
Packit |
1470ea |
<xi:include href="samples/filechooserdialog.ui" parse="text"><xi:fallback/></xi:include>
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
<section id="vala-code"><title>Vala Code</title>
|
|
Packit |
1470ea |
<xi:include href="samples/filechooserdialog.vala" parse="text"><xi:fallback/></xi:include>
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
<section id="api"><title>Relevant API documentation</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
In this sample we used the following:
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<list>
|
|
Packit |
1470ea |
<item><link href="http://valadoc.org/gtk+-3.0/Gtk.FileChooser.html">FileChooser</link> </item>
|
|
Packit |
1470ea |
<item><link href="http://valadoc.org/gtk+-3.0/Gtk.FileChooserDialog.html">FileChooserDialog</link> </item>
|
|
Packit |
1470ea |
<item><link href="http://valadoc.org/gtk+-3.0/Gtk.Builder.html">Gtk.Builder</link> </item>
|
|
Packit |
1470ea |
<item><link href="http://valadoc.org/gio-2.0/GLib.ActionEntry.html">GLib.ActionEntry</link> </item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
</page>
|