From 85dfee4f04100a38b812e3616353e52f53546f6c Mon Sep 17 00:00:00 2001 From: Ikey Doherty Date: Fri, 8 May 2015 09:18:42 +0100 Subject: [PATCH] panel: Only display WM options prior to Gtk 3.16 --- panel/Editor.vala | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/panel/Editor.vala b/panel/Editor.vala index 231627e03..f559f769c 100644 --- a/panel/Editor.vala +++ b/panel/Editor.vala @@ -88,6 +88,8 @@ public class PanelEditor : Gtk.Window ulong pad_start_id; ulong pad_end_id; + bool wm_enabled = true; + public PanelEditor(Budgie.Panel parent_panel) { this.panel = parent_panel; @@ -96,6 +98,10 @@ public class PanelEditor : Gtk.Window icon_name = "preferences-desktop"; window_position = Gtk.WindowPosition.CENTER; + if (Gtk.MAJOR_VERSION >= 3 && Gtk.MINOR_VERSION >= 16) { + wm_enabled = false; + } + var header = new Gtk.HeaderBar(); header.set_show_close_button(true); set_titlebar(header); @@ -746,12 +752,14 @@ public class PanelEditor : Gtk.Window item = create_action_item(_("Widget theme"), _("Select a widget (GTK+) theme to use for applications"), combo); layout.pack_start(item, false, false, 0); - combo = new Gtk.ComboBoxText(); - group.add_widget(combo); - populate(ref combo, ThemeType.WM_THEME); - wm_settings.bind("theme", combo, "active-id", SettingsBindFlags.DEFAULT); - item = create_action_item(_("Window theme"), null, combo); - layout.pack_start(item, false, false, 0); + if (this.wm_enabled) { + combo = new Gtk.ComboBoxText(); + group.add_widget(combo); + populate(ref combo, ThemeType.WM_THEME); + wm_settings.bind("theme", combo, "active-id", SettingsBindFlags.DEFAULT); + item = create_action_item(_("Window theme"), null, combo); + layout.pack_start(item, false, false, 0); + } combo = new Gtk.ComboBoxText(); group.add_widget(combo);