diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index e4e5709548671ff7cfc245762b5804378b0cdaf6..dc695474afcf7689e3b11dab07150d790032de85 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,14 @@ +2003-10-23 Federico Mena Quintero + + * gtk/tmpl/gtkfilechooser.sgml: Added the text for the initial + section, and descriptions for the signals and enumerations. + + * gtk/tmpl/gtkfilechooserdialog.sgml: Added the text for the + initial section, and a short example. + + * gtk/tmpl/gtkfilechooserwidget.sgml: Added the text for the + initial section. + Fri Oct 24 00:25:07 2003 Matthias Clasen * gtk/tmpl/gtkfilefilter.sgml: diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt index 959742b58713f5fa3696227b24e0b409613d2973..96b7d83e88e0530204296906da0177a49578e967 100644 --- a/docs/reference/gtk/gtk-sections.txt +++ b/docs/reference/gtk/gtk-sections.txt @@ -1067,7 +1067,6 @@ GtkExpanderPrivate
gtkfilechooser GtkFileChooser -GtkFileChooser GtkFileChooserAction GTK_FILE_CHOOSER_ERROR GtkFileChooserError @@ -1121,6 +1120,7 @@ GTK_FILE_CHOOSER GTK_IS_FILE_CHOOSER GTK_TYPE_FILE_CHOOSER +GtkFileChooser gtk_file_chooser_get_type
diff --git a/docs/reference/gtk/tmpl/gtkfilechooser.sgml b/docs/reference/gtk/tmpl/gtkfilechooser.sgml index b93a65b884fe0d255ea394d439eb56e530dd8e57..f989347e6a317e55512f1e6fab20b94554725f54 100644 --- a/docs/reference/gtk/tmpl/gtkfilechooser.sgml +++ b/docs/reference/gtk/tmpl/gtkfilechooser.sgml @@ -2,74 +2,51 @@ GtkFileChooser -an interface that represents a graphical file selector +File chooser interface used by #GtkFileChooserWidget and #GtkFileChooserDialog. - - - + + #GtkFileChooser is an interface that can be implemented by file + selection widgets. In GTK+, the main objects that implement + this interface are #GtkFileChooserWidget and + #GtkFileChooserDialog. You do not need to write an object that + implements the #GtkFileChooser interface unless you are trying + to adapt an existing file selector to expose a standard + programming interface. + - - - - - - - - - - - - - - - -@filechooser: the object which received the signal. - - - - - - -@filechooser: the object which received the signal. - - - - - - -@filechooser: the object which received the signal. - - - - - - -@filechooser: the object which received the signal. + + #GtkFileChooserDialog, #GtkFileChooserWidget + - + + Describes whether a #GtkFileChooser is being used to open + existing files or to save to a possibly new file. + - - -@GTK_FILE_CHOOSER_ACTION_OPEN: -@GTK_FILE_CHOOSER_ACTION_SAVE: +@GTK_FILE_CHOOSER_ACTION_OPEN: Indicates Open mode. The file chooser + will only let the user pick an existing file. +@GTK_FILE_CHOOSER_ACTION_SAVE: Indicates Save mode. The file chooser + will let the user pick an existing file, or type in a new + filename. - - - + + Used to get the #GError quark for #GtkFileChooser errors. + - + + These identify the various errors that can occur while calling + #GtkFileChooser functions. + - - -@GTK_FILE_CHOOSER_ERROR_NONEXISTENT: -@GTK_FILE_CHOOSER_ERROR_BAD_FILENAME: +@GTK_FILE_CHOOSER_ERROR_NONEXISTENT: Indicates that a file does not exist. +@GTK_FILE_CHOOSER_ERROR_BAD_FILENAME: Indicates a malformed filename. @@ -481,3 +458,12 @@ an interface that represents a graphical file selector @Returns: + + + + diff --git a/docs/reference/gtk/tmpl/gtkfilechooserdialog.sgml b/docs/reference/gtk/tmpl/gtkfilechooserdialog.sgml index 1863aa1cf1c88fadaf6b6032fb7ea05b56f12eda..1c82b9cb990d108df6daf749f4db5318674bb290 100644 --- a/docs/reference/gtk/tmpl/gtkfilechooserdialog.sgml +++ b/docs/reference/gtk/tmpl/gtkfilechooserdialog.sgml @@ -2,18 +2,59 @@ GtkFileChooserDialog -implements GtkFileChooser as a dialog - +A file chooser dialog, suitable for "File/Open" or "File/Save" commands. - + + #GtkFileChooserDialog is a dialog box suitable for use with + "File/Open" or "File/Save as" commands. This widget works by + putting a #GtkFileChooserWidget inside a #GtkDialog. It exposes + the #GtkFileChooserIface interface, so you can use all of the + #GtkFileChooser functions on the file chooser dialog as well as + those for #GtkDialog. + - + + Note that #GtkFileChooserDialog does not have any methods of its + own. Instead, you should use the functions that work on a + #GtkFileChooser. + - - + + Typical usage - + + In the simplest of cases, you can use #GtkFileChooserDialog + as in the following code: + + + +GtkWidget *dialog; + +dialog = gtk_file_chooser_dialog_new ("Open File", + parent_window, + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + NULL); + +if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) + { + char *filename; + + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); + open_file (filename); + g_free (filename); + } + +gtk_widget_destroy (dialog); + + + + + + #GtkFileChooser, #GtkDialog + @@ -28,3 +69,11 @@ implements GtkFileChooser as a dialog @Returns: + + + diff --git a/docs/reference/gtk/tmpl/gtkfilechooserwidget.sgml b/docs/reference/gtk/tmpl/gtkfilechooserwidget.sgml index c61e5a527711713f7afd622a307ce97e7c8918d1..9cd98808828ec38ff988b52fad957e5cfd3ae9da 100644 --- a/docs/reference/gtk/tmpl/gtkfilechooserwidget.sgml +++ b/docs/reference/gtk/tmpl/gtkfilechooserwidget.sgml @@ -2,17 +2,27 @@ GtkFileChooserWidget -implements GtkFileChooser as an embeddable widget +File chooser widget that can be embedded in other widgets. - - - + + #GtkFileChooserWidget is a widget suitable for selecting files. + It is the main building block of a #GtkFileChooserDialog. Most + applications will only need to use the latter; you can use + #GtkFileChooserWidget as part of a larger window if you have + special needs. + + + + Note that #GtkFileChooserWidget does not have any methods of its + own. Instead, you should use the functions that work on a + #GtkFileChooser. + - - - + + #GtkFileChooser, #GtkFileChooserDialog + @@ -23,3 +33,13 @@ implements GtkFileChooser as an embeddable widget @Returns: + + + + +