summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@gnome.org>2011-07-25 17:14:49 +0100
committerMatthias Clasen <mclasen@redhat.com>2011-08-15 18:57:56 -0400
commitbf457d129ea59b081b4caed91532b16fdc3d8887 (patch)
treeb55e939f64a7b65f163df865caf118532f411b35 /gtk
parent523190f69a1c52a99e9bfc9493232b83a12a8858 (diff)
downloadgtk+-bf457d129ea59b081b4caed91532b16fdc3d8887.tar.gz
GtkFontChooserDialog: Add parent window as a parameter in the constructor
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkfontchooserdialog.c11
-rw-r--r--gtk/gtkfontchooserdialog.h3
2 files changed, 10 insertions, 4 deletions
diff --git a/gtk/gtkfontchooserdialog.c b/gtk/gtkfontchooserdialog.c
index 08c529f8dd..6d90e159d6 100644
--- a/gtk/gtkfontchooserdialog.c
+++ b/gtk/gtkfontchooserdialog.c
@@ -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);
}
diff --git a/gtk/gtkfontchooserdialog.h b/gtk/gtkfontchooserdialog.h
index 5a7b3d0032..b127f66b2d 100644
--- a/gtk/gtkfontchooserdialog.h
+++ b/gtk/gtkfontchooserdialog.h
@@ -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);