Skip to content
Browse files

Fixed status icon in gnome-shell

  • Loading branch information...
1 parent ee01bad commit 48842dbf07214213e4d26f35edfc0a9a16b8b5fd @chuchiperriman committed May 13, 2012
Showing with 11 additions and 11 deletions.
  1. +1 −1 cloudsn-local
  2. +10 −10 src/cloudsn/ui/indicators/statusicon.py
View
2 cloudsn-local
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
import os, sys
srcpath = os.path.abspath("src")
sys.path.insert(0,srcpath)
View
20 src/cloudsn/ui/indicators/statusicon.py
@@ -1,4 +1,4 @@
-from gi.repository import Gtk, Gdk
+from gi.repository import Gtk, Gdk, GdkPixbuf
from cloudsn import const
from cloudsn.core import config, controller, utils
from cloudsn.ui import window, about
@@ -14,7 +14,7 @@ def set_active(self, active):
self.statusIcon = Gtk.StatusIcon()
self.statusIcon.set_from_pixbuf(config.get_cloudsn_icon())
self.statusIcon.set_visible(True)
- self.statusIcon.set_tooltip(APP_LONG_NAME)
+ self.statusIcon.set_tooltip_text(APP_LONG_NAME)
self.statusIcon.connect('activate', self.main_cb, self.statusIcon)
self.menu = self.create_pref_menu()
@@ -70,11 +70,11 @@ def create_indicator(self, acc):
"""
indmenuItem = Gtk.MenuItem()
box = Gtk.HBox()
- menu_icon = Gtk.image_new_from_pixbuf(pix)
- box.pack_start(menu_icon, False, False)
+ menu_icon = Gtk.Image.new_from_pixbuf(pix)
+ box.pack_start(menu_icon, False, False, 0)
box.pack_start(Gtk.Label(acc.get_name()), False, True, 10)
total_label = Gtk.Label(("(%i)") % (acc.get_total_unread()))
- box.pack_end(total_label, False, False)
+ box.pack_end(total_label, False, False, 0)
indmenuItem.add(box)
indmenuItem.connect('activate', self.acc_activate_cb, acc)
self.indmenu.append(indmenuItem)
@@ -118,8 +118,8 @@ def acc_activate_cb(self, widget, acc = None):
def main_cb(self, widget, data = None):
self.indmenu.show_all()
- self.indmenu.popup(None, None, Gtk.status_icon_position_menu,
- 1, Gtk.get_current_event_time(), self.statusIcon)
+ self.indmenu.popup(None, None, Gtk.StatusIcon.position_menu,
+ self.statusIcon, 1, Gtk.get_current_event_time())
def quit_cb(self, widget, data = None):
Gtk.main_quit()
@@ -131,8 +131,8 @@ def popup_menu_cb(self, widget, button, time, data = None):
if button == 3:
if data:
data.show_all()
- data.popup(None, None, Gtk.status_icon_position_menu,
- 3, time, self.statusIcon)
+ data.popup(None, None, Gtk.StatusIcon.position_menu,
+ self.statusIcon, 3, time)
def scale_pixbuf (self, pix):
- return pix.scale_simple(16,16,Gdk.INTERP_BILINEAR)
+ return pix.scale_simple(16,16,GdkPixbuf.InterpType.BILINEAR)

0 comments on commit 48842db

Please sign in to comment.
Something went wrong with that request. Please try again.