summaryrefslogtreecommitdiff
path: root/libmate-desktop
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-05-11 18:38:36 +0200
committerStefano Karapetsas <[email protected]>2014-05-11 18:38:36 +0200
commit36ee6c121996ede96f838964b51e950d3c957491 (patch)
tree9f439ec230d2ec666d341bccc2ef053a78a87d54 /libmate-desktop
parentd80a75c3b9b4d453067386c6a8f3cc7506c0a401 (diff)
downloadmate-desktop-36ee6c121996ede96f838964b51e950d3c957491.tar.bz2
mate-desktop-36ee6c121996ede96f838964b51e950d3c957491.tar.xz
MateColorSelectionDialog: Allow to use header bar with GTK 3.12
Diffstat (limited to 'libmate-desktop')
-rw-r--r--libmate-desktop/mate-colorseldialog.c18
-rw-r--r--libmate-desktop/mate-colorseldialog.h3
2 files changed, 21 insertions, 0 deletions
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
diff --git a/libmate-desktop/mate-colorseldialog.h b/libmate-desktop/mate-colorseldialog.h
index 71a7873..0848c90 100644
--- a/libmate-desktop/mate-colorseldialog.h
+++ b/libmate-desktop/mate-colorseldialog.h
@@ -68,6 +68,9 @@ struct _MateColorSelectionDialogClass
/* ColorSelectionDialog */
GType mate_color_selection_dialog_get_type (void) G_GNUC_CONST;
GtkWidget* mate_color_selection_dialog_new (const gchar *title);
+#if GTK_CHECK_VERSION (3, 12, 0)
+GtkWidget* mate_color_selection_dialog_new_with_header_bar (const gchar *title);
+#endif
GtkWidget* mate_color_selection_dialog_get_color_selection (MateColorSelectionDialog *colorsel);