From 309d161f6d464fcea2de200bb3cb5a7cb784b6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 24 Jul 2017 19:58:27 +0200 Subject: New upstream version 0.7.1 --- src/gui/preferencesWindow.vala | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/gui/preferencesWindow.vala') 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; + } } } -- cgit v1.2.3