diff -u classmate-tools-0.2/debian/control classmate-tools-0.2/debian/control --- classmate-tools-0.2/debian/control +++ classmate-tools-0.2/debian/control @@ -7,7 +7,7 @@ Package: classmate-tools Architecture: all -Depends: ${misc:Depends}, x11-xserver-utils, python-gtk2, python, python-eggtrayicon +Depends: ${misc:Depends}, x11-xserver-utils, python-gtk2 (>= 2.18), python Recommends: xserver-xorg-video-vesa Description: classmate specific gui tools Specific GUI tools for the classmatePC desktop, this includes a little applet diff -u classmate-tools-0.2/debian/changelog classmate-tools-0.2/debian/changelog --- classmate-tools-0.2/debian/changelog +++ classmate-tools-0.2/debian/changelog @@ -1,3 +1,9 @@ +classmate-tools (0.2-0ubuntu8) saucy; urgency=low + + * Port from python-eggtrayicon to gtk.StatusIcon. + + -- Colin Watson Tue, 01 Oct 2013 00:56:37 +0100 + classmate-tools (0.2-0ubuntu7) quantal; urgency=low * debian/control: added ${misc:Depends} to depends only in patch2: unchanged: --- classmate-tools-0.2.orig/usr/bin/classmate-screen-switch +++ classmate-tools-0.2/usr/bin/classmate-screen-switch @@ -21,7 +21,6 @@ # USA import gtk -import egg.trayicon import subprocess # constant string @@ -31,34 +30,26 @@ bigtxt = 'extended' smalltxt = 'normal' -class SwitchTrayIcon(egg.trayicon.TrayIcon): +class SwitchTrayIcon(gtk.StatusIcon): def __init__(self, name): - super(SwitchTrayIcon, self).__init__(name) + super(SwitchTrayIcon, self).__init__() + self.set_property("title", name) subprocess.Popen(['/usr/bin/xrandr', '-s', '800x480']) - self.box = gtk.EventBox() - self.tips = gtk.Tooltips() - self.image = gtk.Image() - - self.tips.enable() - - self.box.add(self.image) - self.box.connect("button_press_event", self.click_handler) - - self.add(self.box) + self.connect("activate", self.activate_handler) if self.isbig() == True: - self.switch_ui(smalltxt, 'gtk-leave-fullscreen') + self.switch_ui(smalltxt, gtk.STOCK_LEAVE_FULLSCREEN) else: - self.switch_ui(bigtxt, 'gtk-fullscreen') + self.switch_ui(bigtxt, gtk.STOCK_FULLSCREEN) - def click_handler(self, widget, event): + def activate_handler(self, status_icon): if self.isbig() == True: size = '800x480' - self.switch_ui(bigtxt, 'gtk-fullscreen') + self.switch_ui(bigtxt, gtk.STOCK_FULLSCREEN) else: - self.switch_ui(smalltxt, 'gtk-leave-fullscreen') + self.switch_ui(smalltxt, gtk.STOCK_LEAVE_FULLSCREEN) size = '800x600' subprocess.Popen(['/usr/bin/xrandr', '-s', size]) @@ -68,11 +59,10 @@ if int(data.stdout.read().split('x')[1].split()[0]) == 600: return True - def switch_ui(self, txt, img): - self.tips.set_tip(self, tipstring % txt) - self.image.set_from_stock(img, gtk.ICON_SIZE_MENU) + def switch_ui(self, txt, stock_id): + self.set_tooltip_text(tipstring % txt) + self.set_from_stock(stock_id) if __name__ == "__main__": icon = SwitchTrayIcon("Screen Status") - icon.show_all() gtk.main()