summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Shattow <lucent@gmail.com>2013-06-13 16:56:01 -0700
committerCole Robinson <crobinso@redhat.com>2013-06-14 09:09:08 -0400
commitf2c0a77e3eac44b281b94407006d740a475b9a12 (patch)
tree7ceab65da0efb61e80f2fa9cc96ef8b4f12f7723
parent8a0bee44dceabb6bc42681f647ae98e35c1b9a8a (diff)
downloadvirt-manager-f2c0a77e3eac44b281b94407006d740a475b9a12.tar.gz
AppIndicator3 required with Gtk3 usage
$ ./virt-manager --debug /usr/lib/python2.7/dist-packages/gi/overrides/GLib.py:53: PyGIDeprecationWarning: threads_init longer needs to be called. See: https://bugzilla.gnome.org/show_bug.cgi?id=686914 PyGIDeprecationWarning) 2013-06-12 13:10:56,977 (cliutils:75): virt-manager startup 2013-06-12 13:10:56,978 (virt-manager:199): Launched as: ['./virt-manager', '--debug'] 2013-06-12 13:10:56,978 (virt-manager:200): virt-manager version: 0.9.100 2013-06-12 13:10:56,978 (virt-manager:201): virtManager import: <module 'virtManager' from '/home/es/software/pubscm/virt-manager/virtManager/__init__.pyc'> 2013-06-12 13:10:57,167 (virt-manager:247): GTK version: 3.8.2 /usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed import gobject._gobject /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: specified class size for type 'PyGtkGenericCellRenderer' is smaller than the parent type's 'GtkCellRenderer' class size from gtk import _gtk /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion 'node != NULL' failed from gtk import _gtk Segmentation fault (core dumped)
-rw-r--r--virtManager/systray.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/virtManager/systray.py b/virtManager/systray.py
index da2baa42..fe82eace 100644
--- a/virtManager/systray.py
+++ b/virtManager/systray.py
@@ -29,9 +29,9 @@ from virtManager.baseclass import vmmGObject
from virtManager.error import vmmErrorDialog
try:
- import appindicator # pylint: disable=F0401
+ from gi.repository import AppIndicator3 # pylint: disable=F0401
except:
- appindicator = None
+ AppIndicator3 = None
def build_image_menu_item(label):
@@ -79,7 +79,7 @@ class vmmSystray(vmmGObject):
engine.connect("conn-removed", self.conn_removed)
# Are we using Application Indicators?
- if appindicator is not None:
+ if AppIndicator3 is not None:
self.systray_indicator = True
self.init_systray_menu()
@@ -138,10 +138,10 @@ class vmmSystray(vmmGObject):
return
if self.systray_indicator:
- self.systray_icon = appindicator.Indicator("virt-manager",
+ self.systray_icon = AppIndicator3.Indicator("virt-manager",
"virt-manager-icon",
- appindicator.CATEGORY_OTHER)
- self.systray_icon.set_status(appindicator.STATUS_ACTIVE)
+ AppIndicator3.CATEGORY_OTHER)
+ self.systray_icon.set_status(AppIndicator3.STATUS_ACTIVE)
self.systray_icon.set_menu(self.systray_menu)
else:
@@ -162,9 +162,9 @@ class vmmSystray(vmmGObject):
else:
if self.systray_indicator:
if do_show:
- self.systray_icon.set_status(appindicator.STATUS_ACTIVE)
+ self.systray_icon.set_status(AppIndicator3.STATUS_ACTIVE)
else:
- self.systray_icon.set_status(appindicator.STATUS_PASSIVE)
+ self.systray_icon.set_status(AppIndicator3.STATUS_PASSIVE)
else:
self.systray_icon.set_visible(do_show)