From a248b1597394b4ee9a5817bc95c3c116e76cdd8f Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Mon, 19 Mar 2012 16:35:30 +0100 Subject: Imported Upstream version 0.5.2 --- src/gui/indicator.vala | 17 +++++++++++------ src/gui/piePreview.vala | 3 --- src/gui/preferencesWindow.vala | 4 ++-- src/gui/sliceTypeList.vala | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) (limited to 'src/gui') diff --git a/src/gui/indicator.vala b/src/gui/indicator.vala index dea4d3c..c8ef445 100644 --- a/src/gui/indicator.vala +++ b/src/gui/indicator.vala @@ -46,7 +46,6 @@ public class Indicator : GLib.Object { public bool active { get { - #if HAVE_APPINDICATOR return indicator.get_status() == AppIndicator.IndicatorStatus.ACTIVE; #else @@ -68,12 +67,18 @@ public class Indicator : GLib.Object { ///////////////////////////////////////////////////////////////////// public Indicator() { + string icon = ""; + + if (Gdk.X11Screen.get_window_manager_name(Gdk.Screen.get_default()) == "Mutter") + icon = "gnome-pie"; + else + icon = "gnome-pie-symbolic"; + #if HAVE_APPINDICATOR string path = ""; - string icon = "indicator-applet"; + try { path = GLib.Path.get_dirname(GLib.FileUtils.read_link("/proc/self/exe"))+"/resources"; - icon = "gnome-pie"; } catch (GLib.FileError e) { warning("Failed to get path of executable!"); } @@ -86,16 +91,16 @@ public class Indicator : GLib.Object { try { var file = GLib.File.new_for_path(GLib.Path.build_filename( GLib.Path.get_dirname(GLib.FileUtils.read_link("/proc/self/exe"))+"/resources", - "gnome-pie.svg" + icon + ".svg" )); if (!file.query_exists()) - this.indicator.set_from_icon_name("gnome-pie"); + this.indicator.set_from_icon_name(icon); else this.indicator.set_from_file(file.get_path()); } catch (GLib.FileError e) { warning("Failed to get path of executable!"); - this.indicator.set_from_icon_name("gnome-pie"); + this.indicator.set_from_icon_name(icon); } this.menu = new Gtk.Menu(); diff --git a/src/gui/piePreview.vala b/src/gui/piePreview.vala index 4963bb2..5745fcb 100644 --- a/src/gui/piePreview.vala +++ b/src/gui/piePreview.vala @@ -111,9 +111,6 @@ class PiePreview : Gtk.DrawingArea { this.new_slice_window.on_select.connect((new_action, as_new_slice, at_position) => { var pie = PieManager.all_pies[this.current_id]; - debug(new_action.actions[0].name); - debug(new_action.actions[0].real_command); - if (new_action.has_quickaction()) renderer.disable_quickactions(); diff --git a/src/gui/preferencesWindow.vala b/src/gui/preferencesWindow.vala index 933919b..3055bc5 100644 --- a/src/gui/preferencesWindow.vala +++ b/src/gui/preferencesWindow.vala @@ -174,7 +174,7 @@ public class PreferencesWindow : GLib.Object { this.id_label.label = ""; this.name_label.label = _("No Pie selected."); this.hotkey_label.set_markup(""); - this.icon.icon_name = "application-default-icon"; + this.icon.icon_name = "stock_unknown"; this.no_pie_label.show(); } else { @@ -212,7 +212,7 @@ public class PreferencesWindow : GLib.Object { ///////////////////////////////////////////////////////////////////// private void on_add_pie_button_clicked(Gtk.ToolButton button) { - var new_pie = PieManager.create_persistent_pie(_("New Pie"), "application-default-icon", null); + var new_pie = PieManager.create_persistent_pie(_("New Pie"), "stock_unknown", null); this.pie_list.reload_all(); this.pie_list.select(new_pie.id); } diff --git a/src/gui/sliceTypeList.vala b/src/gui/sliceTypeList.vala index b447dc3..a339e5e 100644 --- a/src/gui/sliceTypeList.vala +++ b/src/gui/sliceTypeList.vala @@ -140,7 +140,7 @@ class SliceTypeList : Gtk.TreeView { this.data.get(active, DataPos.ICON_NAME, out icon); this.on_select(id, icon); } else { - this.on_select("", "application-default-icon"); + this.on_select("", "stock_unknown"); } } -- cgit v1.2.3