From 36ee6c121996ede96f838964b51e950d3c957491 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Sun, 11 May 2014 18:38:36 +0200 Subject: MateColorSelectionDialog: Allow to use header bar with GTK 3.12 --- libmate-desktop/mate-colorseldialog.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'libmate-desktop/mate-colorseldialog.c') diff --git a/libmate-desktop/mate-colorseldialog.c b/libmate-desktop/mate-colorseldialog.c index ba72820..3f325c8 100644 --- a/libmate-desktop/mate-colorseldialog.c +++ b/libmate-desktop/mate-colorseldialog.c @@ -185,6 +185,24 @@ mate_color_selection_dialog_new (const gchar *title) return GTK_WIDGET (colorseldiag); } +// since 1.9.1 +#if GTK_CHECK_VERSION (3, 12, 0) +GtkWidget* +mate_color_selection_dialog_new_with_header_bar (const gchar *title) +{ + MateColorSelectionDialog *colorseldiag; + + colorseldiag = g_object_new (MATE_TYPE_COLOR_SELECTION_DIALOG, "use-header-bar", TRUE, NULL); + + if (title) + gtk_window_set_title (GTK_WINDOW (colorseldiag), title); + + gtk_window_set_resizable (GTK_WINDOW (colorseldiag), FALSE); + + return GTK_WIDGET (colorseldiag); +} +#endif + /** * mate_color_selection_dialog_get_color_selection: * @colorsel: a #MateColorSelectionDialog -- cgit v1.2.1