summaryrefslogtreecommitdiff
path: root/src/gui/indicator.vala
diff options
context:
space:
mode:
authorAlessandro Ghedini <al3xbio@gmail.com>2012-03-19 16:35:30 +0100
committerAlessandro Ghedini <al3xbio@gmail.com>2012-03-19 16:35:30 +0100
commita248b1597394b4ee9a5817bc95c3c116e76cdd8f (patch)
tree338596cb8c179435c51b8954adb933462c54a5d6 /src/gui/indicator.vala
parent662bede321e96bef873eadb7882dbcad5f68ba95 (diff)
Imported 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();