Commit bf457d12 authored by Alberto Ruiz's avatar Alberto Ruiz Committed by Matthias Clasen

GtkFontChooserDialog: Add parent window as a parameter in the constructor

parent 523190f6
......@@ -140,7 +140,8 @@ gtk_font_chooser_dialog_init (GtkFontChooserDialog *fontchooserdiag)
* gtk_font_chooser_dialog_new:
* @title: (allow-none): the title of the dialog window
* @title: (allow-none): Title of the dialog, or %NULL
* @parent: (allow-none): Trasient parent of the dialog, or %NULL
* Creates a new #GtkFontChooserDialog.
......@@ -149,11 +150,15 @@ gtk_font_chooser_dialog_init (GtkFontChooserDialog *fontchooserdiag)
* Since: 3.2
gtk_font_chooser_dialog_new (const gchar *title)
gtk_font_chooser_dialog_new (const gchar *title,
GtkWindow *parent)
GtkFontChooserDialog *dialog;
dialog = g_object_new (GTK_TYPE_FONT_CHOOSER_DIALOG, "title", title, NULL);
dialog = g_object_new (GTK_TYPE_FONT_CHOOSER_DIALOG,
"title", title,
"transient-for", parent,
return GTK_WIDGET (dialog);
......@@ -59,7 +59,8 @@ struct _GtkFontChooserDialogClass
GType gtk_font_chooser_dialog_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_font_chooser_dialog_new (const gchar *title);
GtkWidget* gtk_font_chooser_dialog_new (const gchar *title,
GtkWindow *window);
GtkWidget* gtk_font_chooser_dialog_get_font_chooser (GtkFontChooserDialog *fcd);
......@@ -28,7 +28,7 @@ main (int argc, char *argv[])
gtk_init (&argc, &argv);
dialog = gtk_font_chooser_dialog_new (NULL);
dialog = gtk_font_chooser_dialog_new (NULL, NULL);
gtk_dialog_run (GTK_DIALOG (dialog));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment