summaryrefslogtreecommitdiff
path: root/gtk/gtkfontchooserdialog.c
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@gnome.org>2011-07-25 16:08:23 +0100
committerMatthias Clasen <mclasen@redhat.com>2011-08-15 18:57:56 -0400
commita55d2f67b0fb5abca51e4a581fa33fb31602a106 (patch)
tree2c5ed77cb7d5b3d2490468c3a7707898a76f2df9 /gtk/gtkfontchooserdialog.c
parent01f279338fd16471d1000688cf55c1830b19cd3d (diff)
downloadgtk+-a55d2f67b0fb5abca51e4a581fa33fb31602a106.tar.gz
GtkFontChooserDialog: Use g_object_new to set initial values in the dialog constructor
Diffstat (limited to 'gtk/gtkfontchooserdialog.c')
-rw-r--r--gtk/gtkfontchooserdialog.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gtk/gtkfontchooserdialog.c b/gtk/gtkfontchooserdialog.c
index bd0d7ca390..08c529f8dd 100644
--- a/gtk/gtkfontchooserdialog.c
+++ b/gtk/gtkfontchooserdialog.c
@@ -151,14 +151,11 @@ gtk_font_chooser_dialog_init (GtkFontChooserDialog *fontchooserdiag)
GtkWidget*
gtk_font_chooser_dialog_new (const gchar *title)
{
- GtkFontChooserDialog *fontchooserdiag;
-
- fontchooserdiag = g_object_new (GTK_TYPE_FONT_CHOOSER_DIALOG, NULL);
-
- if (title)
- gtk_window_set_title (GTK_WINDOW (fontchooserdiag), title);
-
- return GTK_WIDGET (fontchooserdiag);
+ GtkFontChooserDialog *dialog;
+
+ dialog = g_object_new (GTK_TYPE_FONT_CHOOSER_DIALOG, "title", title, NULL);
+
+ return GTK_WIDGET (dialog);
}
/**