Skip to content

Commit

Permalink
panel: Only display WM options prior to Gtk 3.16
Browse files Browse the repository at this point in the history
  • Loading branch information
ikeydoherty committed May 8, 2015
1 parent bcc60b9 commit 85dfee4
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions panel/Editor.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 85dfee4

Please sign in to comment.