summaryrefslogtreecommitdiff
path: root/src/gui/indicator.vala
diff options
context:
space:
mode:
authorAlessandro Ghedini <al3xbio@gmail.com>2012-03-19 16:35:31 +0100
committerAlessandro Ghedini <al3xbio@gmail.com>2012-03-19 16:35:31 +0100
commit29a84e1125d507fcaf5d0cb39148ccaaa2d7ae58 (patch)
tree7d1c8e1c1b1d89af3a962671f60a422aa62af890 /src/gui/indicator.vala
parent178b4f90e26d6240aeaf5e455e4e78b3f4883bba (diff)
parenta248b1597394b4ee9a5817bc95c3c116e76cdd8f (diff)
Merge tag 'upstream/0.5.2'
Upstream version 0.5.2
Diffstat (limited to 'src/gui/indicator.vala')
-rw-r--r--src/gui/indicator.vala17
1 files changed, 11 insertions, 6 deletions
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();