summaryrefslogtreecommitdiff
path: root/src/gui/preferencesWindow.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/preferencesWindow.vala')
-rw-r--r--src/gui/preferencesWindow.vala23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/gui/preferencesWindow.vala b/src/gui/preferencesWindow.vala
index 1fedfb2..8c6c66c 100644
--- a/src/gui/preferencesWindow.vala
+++ b/src/gui/preferencesWindow.vala
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2011-2016 by Simon Schneegans
+// Copyright (c) 2011-2017 by Simon Schneegans
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -163,7 +163,7 @@ public class PreferencesWindow : GLib.Object {
(builder.get_object("theme-help-button") as Gtk.Button).clicked.connect(() => {
try{
- GLib.AppInfo.launch_default_for_uri("http://simmesimme.github.io/lessons/2015/04/26/themes-for-gnome-pie/", null);
+ GLib.AppInfo.launch_default_for_uri("http://simmesimme.github.io/lessons/2015/04/26/themes-for-gnome-pie", null);
} catch (Error e) {
warning(e.message);
}
@@ -281,9 +281,6 @@ public class PreferencesWindow : GLib.Object {
this.window.show_all();
this.pie_list.select_first();
- var style = this.preview_background.get_style_context();
- this.preview_background.override_background_color(Gtk.StateFlags.NORMAL, style.get_background_color(Gtk.StateFlags.NORMAL));
-
this.indicator.active = Config.global.show_indicator;
this.autostart.active = Config.global.auto_start;
this.captions.active = Config.global.show_captions;
@@ -532,15 +529,17 @@ public class PreferencesWindow : GLib.Object {
} else {
var pie = PieManager.all_pies[selected_id];
- this.preview.set_pie(id);
- this.preview_box.show();
+ if (pie != null) {
+ this.preview.set_pie(id);
+ this.preview_box.show();
- if (pie.action_groups.size == 0) {
- this.no_slice_label.show();
- }
+ if (pie.action_groups.size == 0) {
+ this.no_slice_label.show();
+ }
- this.remove_pie_button.sensitive = true;
- this.edit_pie_button.sensitive = true;
+ this.remove_pie_button.sensitive = true;
+ this.edit_pie_button.sensitive = true;
+ }
}
}