[gtk+/font-chooser] GtkFontChooserDialog: Use g_object_new to set initial values in the dialog constructor
- From: Alberto Ruiz <aruiz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/font-chooser] GtkFontChooserDialog: Use g_object_new to set initial values in the dialog constructor
- Date: Mon, 25 Jul 2011 15:12:30 +0000 (UTC)
commit f23f2f98485e1901a170823646639f38d7c2a83f
Author: Alberto Ruiz <aruiz gnome org>
Date: Mon Jul 25 16:08:23 2011 +0100
GtkFontChooserDialog: Use g_object_new to set initial values in the dialog constructor
gtk/gtkfontchooserdialog.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkfontchooserdialog.c b/gtk/gtkfontchooserdialog.c
index bd0d7ca..08c529f 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);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]