1 --- fluxgui.orig/src/fluxgui/fluxgui.py 2010-09-08 12:13:14.000000000 +0200
2 +++ fluxgui/src/fluxgui/fluxgui.py 2010-09-28 21:15:06.000000000 +0200
13 @@ -14,7 +14,7 @@ VERSION = "1.1.8"
17 - self.indicator = Indicator(self)
18 + self.statusIcon = StatIco(self)
21 self.settings = Settings(self)
22 @@ -56,8 +56,8 @@ class Fluxgui:
25 def stop_xflux(self, item):
26 - self.indicator.item_turn_off.hide()
27 - self.indicator.item_turn_on.show()
28 + self.statusIcon.item_turn_off.hide()
29 + self.statusIcon.item_turn_on.show()
32 # xflux is not running
33 @@ -68,13 +68,13 @@ class Fluxgui:
36 def pause_xflux(self, item):
37 - self.indicator.item_turn_off.hide()
38 - self.indicator.item_turn_on.show()
39 + self.statusIcon.item_turn_off.hide()
40 + self.statusIcon.item_turn_on.show()
41 self.update_xflux("k=" + self.settings.get_color("4"))
43 def unpause_xflux(self, item):
44 - self.indicator.item_turn_off.show()
45 - self.indicator.item_turn_on.hide()
46 + self.statusIcon.item_turn_off.show()
47 + self.statusIcon.item_turn_on.hide()
48 self.update_xflux("k=" + self.settings.color)
50 def update_xflux(self, command):
51 @@ -142,31 +142,11 @@ class Fluxgui:
58 def __init__(self, main):
60 - self.setup_indicator()
62 - def setup_indicator(self):
63 - self.indicator = appindicator.Indicator(
64 - "fluxgui-indicator",
66 - appindicator.CATEGORY_APPLICATION_STATUS)
67 - self.indicator.set_status(appindicator.STATUS_ACTIVE)
69 - # Check for special Ubuntu themes. copied from lookit
70 - self.indicator.set_icon('fluxgui')
71 - if gtk.gdk.screen_get_default():
72 - theme = gtk.gdk.screen_get_default().get_setting(
73 - 'gtk-icon-theme-name')
74 - if theme == 'ubuntu-mono-dark':
75 - self.indicator.set_icon('fluxgui-dark')
76 - elif theme == 'ubuntu-mono-light':
77 - self.indicator.set_icon('fluxgui-light')
79 - self.indicator.set_menu(self.setup_menu())
86 @@ -195,10 +175,25 @@ class Indicator:
92 + def popup_menu_cb(self, widget, button, time, data = None):
96 + data.popup(None, None, gtk.status_icon_position_menu,3, time, self.staticon)
99 + def create_icon(self):
100 + # create a new Status Icon
101 + self.staticon = gtk.StatusIcon()
102 + self.staticon.set_from_icon_name('fluxgui')
103 + self.staticon.set_tooltip("fluxgui")
104 + self.staticon.connect('popup-menu', self.popup_menu_cb, self.setup_menu())
105 + self.staticon.set_visible(True)
110 + # invoking the main()