diff options
author | James M. Cape <jcape@ignore-your.tv> | 2005-01-06 06:25:30 +0000 |
---|---|---|
committer | James M. Cape <jcape@src.gnome.org> | 2005-01-06 06:25:30 +0000 |
commit | 977a557a670272dbe97b5e4c7af48c3af0affcdd (patch) | |
tree | f570da245cbb7bf47f4129c8aa56aa1f5c4fdde7 /gtk | |
parent | 0e8c3f4a2fd558a41fe872d81a3e87e8b102989c (diff) | |
download | gdk-pixbuf-977a557a670272dbe97b5e4c7af48c3af0affcdd.tar.gz |
Use default title if NULL is passed.
2005-01-06 James M. Cape <jcape@ignore-your.tv>
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_new)
(gtk_file_chooser_button_new_with_backend): Use default title if
NULL is passed.
* docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml: Make examples
match API.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkfilechooserbutton.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index e05fd9a1d..46d8ccff1 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -62,6 +62,7 @@ #define GTK_FILE_CHOOSER_BUTTON_GET_PRIVATE(object) (GTK_FILE_CHOOSER_BUTTON ((object))->priv) +#define DEFAULT_TITLE N_("Select A File") #define HOME_DISPLAY_NAME N_("Home") #define DESKTOP_DISPLAY_NAME N_("Desktop") #define FALLBACK_DISPLAY_NAME N_("(None)") @@ -349,7 +350,7 @@ gtk_file_chooser_button_class_init (GtkFileChooserButtonClass * class) g_param_spec_string ("title", P_("Title"), P_("The title of the file chooser dialog."), - _("Select a File"), + _(DEFAULT_TITLE), G_PARAM_READWRITE)); /** @@ -2211,7 +2212,7 @@ gtk_file_chooser_button_new (const gchar *title, return g_object_new (GTK_TYPE_FILE_CHOOSER_BUTTON, "action", action, - "title", title, + "title", (title ? title : _(DEFAULT_TITLE)), NULL); } @@ -2236,15 +2237,15 @@ gtk_file_chooser_button_new_with_backend (const gchar *title, action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, NULL); return g_object_new (GTK_TYPE_FILE_CHOOSER_BUTTON, - "title", title, "action", action, + "title", (title ? title : _(DEFAULT_TITLE)), "file-system-backend", backend, NULL); } /** * gtk_file_chooser_button_new_with_dialog: - * @dialog: the #GtkDialog widget to use. + * @dialog: the #GtkFileChooserDialog widget to use. * * Creates a #GtkFileChooserButton widget which uses @dialog as it's * file-picking window. Note that @dialog must be a #GtkFileChooserDialog (or @@ -2323,7 +2324,7 @@ gtk_file_chooser_button_get_width_chars (GtkFileChooserButton *button) /** * gtk_file_chooser_button_set_width_chars: * @button: the button widget to examine. - * @n_chars: the new width, in chracters. + * @n_chars: the new width, in characters. * * Sets the width (in characters) that @button will use to @n_chars. * |