~ubuntu-branches/debian/experimental/gtk+2.0/experimental

« back to all changes in this revision

Viewing changes to docs/reference/gtk/html/gtk-migrating-GtkFileChooser.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-09-17 11:15:05 UTC
  • mto: (72.1.1 lenny) (1.4.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 55.
  • Revision ID: james.westby@ubuntu.com-20070917111505-giz9c5xltxkb5y54
Tags: upstream-2.12.0
ImportĀ upstreamĀ versionĀ 2.12.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
5
<title>Migrating from GtkFileSelection to GtkFileChooser</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
7
<link rel="start" href="index.html" title="GTK+ Reference Manual">
8
8
<link rel="up" href="migrating.html" title="Part&#160;IV.&#160;Migrating from Previous Versions of GTK+">
9
9
<link rel="prev" href="gtk-changes-2-0.html" title="Changes from 1.2 to 2.0">
10
10
<link rel="next" href="gtkfilechooser-selection-modes.html" title="Selection Modes">
11
 
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="part" href="gtk.html" title="Part&#160;I.&#160;GTK+ Overview">
14
14
<link rel="part" href="gtkbase.html" title="Part&#160;II.&#160;GTK+ Core Reference">
76
76
<span class="firstname">Federico</span> <span class="surname">Mena-Quintero</span>
77
77
</h3>
78
78
<div class="affiliation"><div class="address"><p><br>
79
 
        &#160;&#160;<code class="email">&lt;<a href="mailto:federicoximian.com">federico<em class="parameter"><code>ximian.com</code></em></a>&gt;</code><br>
 
79
        &#160;&#160;<code class="email">&lt;<a class="email" href="mailto:federicoximian.com">federico<em class="parameter"><code>ximian.com</code></em></a>&gt;</code><br>
80
80
        </p></div></div>
81
81
</div></div>
82
82
</div></div>
88
88
<dt><span class="section"><a href="gtkfilechooser-new-features.html">New features</a></span></dt>
89
89
</dl></div>
90
90
<p>
91
 
    <a href="GtkFileChooser.html" title="GtkFileChooser"><span class="type">GtkFileChooser</span></a>, starting with GTK+ 2.4, is the new set of APIs for file 
92
 
    selection widgets and dialogs.  Previous versions of GTK+ used <a href="GtkFileSelection.html" title="GtkFileSelection"><span class="type">GtkFileSelection</span></a>, 
 
91
    <a class="link" href="GtkFileChooser.html" title="GtkFileChooser"><span class="type">GtkFileChooser</span></a>, starting with GTK+ 2.4, is the new set of APIs for file 
 
92
    selection widgets and dialogs.  Previous versions of GTK+ used <a class="link" href="GtkFileSelection.html" title="GtkFileSelection"><span class="type">GtkFileSelection</span></a>, 
93
93
    which has numerous problems.
94
94
  </p>
95
95
<p>
96
 
    <a href="GtkFileChooser.html" title="GtkFileChooser"><span class="type">GtkFileChooser</span></a> is an abstract interface that can be implemented by widgets 
 
96
    <a class="link" href="GtkFileChooser.html" title="GtkFileChooser"><span class="type">GtkFileChooser</span></a> is an abstract interface that can be implemented by widgets 
97
97
    that perform file selection tasks.  Two widgets in GTK+ implement this
98
 
    interface:  <a href="GtkFileChooserDialog.html" title="GtkFileChooserDialog"><span class="type">GtkFileChooserDialog</span></a> and <a href="GtkFileChooserWidget.html" title="GtkFileChooserWidget"><span class="type">GtkFileChooserWidget</span></a>. Most applications 
99
 
    simply need to use <a href="GtkFileChooserDialog.html" title="GtkFileChooserDialog"><span class="type">GtkFileChooserDialog</span></a>, which is a dialog box that allows the 
 
98
    interface:  <a class="link" href="GtkFileChooserDialog.html" title="GtkFileChooserDialog"><span class="type">GtkFileChooserDialog</span></a> and <a class="link" href="GtkFileChooserWidget.html" title="GtkFileChooserWidget"><span class="type">GtkFileChooserWidget</span></a>. Most applications 
 
99
    simply need to use <a class="link" href="GtkFileChooserDialog.html" title="GtkFileChooserDialog"><span class="type">GtkFileChooserDialog</span></a>, which is a dialog box that allows the 
100
100
    user to select existing files for opening them, or to pick new filenames for 
101
 
    saving documents. <a href="GtkFileChooserWidget.html" title="GtkFileChooserWidget"><span class="type">GtkFileChooserWidget</span></a> is for special applications that need to 
 
101
    saving documents. <a class="link" href="GtkFileChooserWidget.html" title="GtkFileChooserWidget"><span class="type">GtkFileChooserWidget</span></a> is for special applications that need to 
102
102
    embed a file selection widget inside a larger window.  In the context of GTK+, 
103
 
    <a href="GtkFileChooserDialog.html" title="GtkFileChooserDialog"><span class="type">GtkFileChooserDialog</span></a> is simply a <a href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> box with a <a href="GtkFileChooserWidget.html" title="GtkFileChooserWidget"><span class="type">GtkFileChooserWidget</span></a>.
 
103
    <a class="link" href="GtkFileChooserDialog.html" title="GtkFileChooserDialog"><span class="type">GtkFileChooserDialog</span></a> is simply a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> box with a <a class="link" href="GtkFileChooserWidget.html" title="GtkFileChooserWidget"><span class="type">GtkFileChooserWidget</span></a>.
104
104
    inside.
105
105
  </p>
106
106
<div class="section" lang="en">
107
107
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
108
108
<a name="gtkfilechooser-creating"></a>Creating a GtkFileChooserDialog</h2></div></div></div>
109
109
<p>
110
 
      To create a <a href="GtkFileChooserDialog.html" title="GtkFileChooserDialog"><span class="type">GtkFileChooserDialog</span></a>, you simply call <a href="GtkFileChooserDialog.html#gtk-file-chooser-dialog-new"><code class="function">gtk_file_chooser_dialog_new()</code></a>.
111
 
      This function is similar to <a href="GtkDialog.html#gtk-dialog-new"><code class="function">gtk_dialog_new()</code></a> in that it takes parameters for the
 
110
      To create a <a class="link" href="GtkFileChooserDialog.html" title="GtkFileChooserDialog"><span class="type">GtkFileChooserDialog</span></a>, you simply call <a class="link" href="GtkFileChooserDialog.html#gtk-file-chooser-dialog-new"><code class="function">gtk_file_chooser_dialog_new()</code></a>.
 
111
      This function is similar to <a class="link" href="GtkDialog.html#gtk-dialog-new"><code class="function">gtk_dialog_new()</code></a> in that it takes parameters for the
112
112
      title of the dialog box and its transient parent, as well as its
113
113
      buttons.  In addition, it takes in an argument that determines
114
114
      whether the file chooser dialog will be used for opening
115
115
      existing files or for saving to a possibly new file.
116
116
    </p>
117
117
<p>
118
 
      Please see <a href="GtkFileChooserDialog.html#gtkfilechooser-typical-usage" title="Example&#160;36.&#160;Typical usage">Example&#160;36, &#8220;Typical usage&#8221;</a> for
 
118
      Please see <a class="xref" href="GtkFileChooserDialog.html#gtkfilechooser-typical-usage" title="Example&#160;36.&#160;Typical usage">Example&#160;36, &#8220;Typical usage&#8221;</a> for
119
119
      how to create a simple file chooser dialog and extract the
120
120
      selected filename from it.
121
121
    </p>