]> Pileus Git - ~andy/gtk/commitdiff
Use default title if NULL is passed.
authorJames M. Cape <jcape@ignore-your.tv>
Thu, 6 Jan 2005 06:25:30 +0000 (06:25 +0000)
committerJames M. Cape <jcape@src.gnome.org>
Thu, 6 Jan 2005 06:25:30 +0000 (06:25 +0000)
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.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml
gtk/gtkfilechooserbutton.c

index a99b0fa85c1b05fd134a31f3f515b2e46ee91f70..f9f4abddd69b2a9654dca3fa072560fa9ea4048a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
 2005-01-05  Federico Mena Quintero  <federico@ximian.com>
 
        Fix #161409:
index a99b0fa85c1b05fd134a31f3f515b2e46ee91f70..f9f4abddd69b2a9654dca3fa072560fa9ea4048a 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2005-01-05  Federico Mena Quintero  <federico@ximian.com>
 
        Fix #161409:
index a99b0fa85c1b05fd134a31f3f515b2e46ee91f70..f9f4abddd69b2a9654dca3fa072560fa9ea4048a 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2005-01-05  Federico Mena Quintero  <federico@ximian.com>
 
        Fix #161409:
index a99b0fa85c1b05fd134a31f3f515b2e46ee91f70..f9f4abddd69b2a9654dca3fa072560fa9ea4048a 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2005-01-05  Federico Mena Quintero  <federico@ximian.com>
 
        Fix #161409:
index a88eddf4813ed5ace40380dc8b09b45ef7831532..27e9757e179ce6fb8fd38bf5f3d5e6bf0f64b7e8 100644 (file)
@@ -20,7 +20,8 @@ property to %TRUE.
 {
   GtkWidget *button;
 
-  button = gtk_file_chooser_button_new (_("Select a file"));
+  button = gtk_file_chooser_button_new (_("Select a file"),
+                                        GTK_FILE_CHOOSER_ACTION_OPEN);
   gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
                                        "/etc");
 }
index e05fd9a1d7bd87e79a7417f5e36d3e084b0382e2..46d8ccff176cde331102aafb2c982ce472e3adf4 100644 (file)
@@ -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.
  *