]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkfontchooserdialog.c
GtkFontChooserDialog: Add parent window as a parameter in the constructor
[~andy/gtk] / gtk / gtkfontchooserdialog.c
index 08c529f8dd5bece4b0e1389413d21f94c2b5379a..6d90e159d63593a7007ec8276cbab94edb3d4b86 100644 (file)
@@ -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
  */
 GtkWidget*
-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,
+                         NULL);
 
   return GTK_WIDGET (dialog);
 }