GtkFontChooserDialog: Use g_object_new to set initial values in the dialog constructor
This commit is contained in:
committed by
Matthias Clasen
parent
01f279338f
commit
a55d2f67b0
@ -151,14 +151,11 @@ gtk_font_chooser_dialog_init (GtkFontChooserDialog *fontchooserdiag)
|
|||||||
GtkWidget*
|
GtkWidget*
|
||||||
gtk_font_chooser_dialog_new (const gchar *title)
|
gtk_font_chooser_dialog_new (const gchar *title)
|
||||||
{
|
{
|
||||||
GtkFontChooserDialog *fontchooserdiag;
|
GtkFontChooserDialog *dialog;
|
||||||
|
|
||||||
fontchooserdiag = g_object_new (GTK_TYPE_FONT_CHOOSER_DIALOG, NULL);
|
dialog = g_object_new (GTK_TYPE_FONT_CHOOSER_DIALOG, "title", title, NULL);
|
||||||
|
|
||||||
if (title)
|
return GTK_WIDGET (dialog);
|
||||||
gtk_window_set_title (GTK_WINDOW (fontchooserdiag), title);
|
|
||||||
|
|
||||||
return GTK_WIDGET (fontchooserdiag);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user