On 17.07.2013 15:36, Cole Robinson wrote: > On 07/16/2013 12:37 PM, poma wrote: >> On 14.06.2013 15:10, Cole Robinson wrote: >>> On 06/13/2013 07:56 PM, Eric Shattow wrote: >>>> Please change as needed before commit; I'm unfamiliar with Python. >>>> Without the change, starting virt-manager results in a coredump on >>>> Ubuntu-next (13.10) >>>> >>>> Kind regards, Eric Shattow >>>> >>> >>> Thanks Eric! Tweaked the commit message a bit and pushed. >>> >>> - Cole >> >> 'Virtual Machine Manager' startup is broken with: >> - Eric's patch i.e. commits [1] & [2] >> - Enabled system tray icon i.e. >> [org/virt-manager/virt-manager] >> system-tray=true >> - Installed 'libappindicator-gtk3-12.10.0-2.fc19.x86_64' i.e. >> '/usr/lib64/girepository-1.0/AppIndicator3-0.1.typelib' >> >> virt-manager 0.10.0 - virt-manager-0.10.0-2.fc19.noarch >> >> <> >> Error starting Virtual Machine Manager: 'gi.repository.AppIndicator3' >> object has no attribute 'CATEGORY_OTHER' >> >> Traceback (most recent call last): >> File "/usr/share/virt-manager/virt-manager", line 303, in <module> >> main() >> File "/usr/share/virt-manager/virt-manager", line 279, in main >> engine = vmmEngine() >> File "/usr/share/virt-manager/virtManager/engine.py", line 125, in >> __init__ >> self.init_systray() >> File "/usr/share/virt-manager/virtManager/engine.py", line 159, in >> init_systray >> self.systray = vmmSystray(self) >> File "/usr/share/virt-manager/virtManager/systray.py", line 90, in >> __init__ >> self.show_systray() >> File "/usr/share/virt-manager/virtManager/systray.py", line 161, in >> show_systray >> self.init_systray() >> File "/usr/share/virt-manager/virtManager/systray.py", line 143, in >> init_systray >> AppIndicator3.CATEGORY_OTHER) >> File "/usr/lib64/python2.7/site-packages/gi/module.py", line 316, in >> __getattr__ >> return getattr(self._introspection_module, name) >> File "/usr/lib64/python2.7/site-packages/gi/module.py", line 135, in >> __getattr__ >> self.__name__, name)) >> AttributeError: 'gi.repository.AppIndicator3' object has no attribute >> 'CATEGORY_OTHER' >> <\> > > Thanks for the report. What's the output of: > > python -c 'from gi.repository import AppIndicator3; print dir(AppIndicator3)' > > - Cole Py print is here[1]. I've solved temporarily like this[2]. Thanks for your response. poma [1] 'py-import-AppIndicator3.txt' - attach [2] 'systray.diff' - attach
['INDICATOR_SIGNAL_CONNECTION_CHANGED', 'INDICATOR_SIGNAL_NEW_ATTENTION_ICON', 'INDICATOR_SIGNAL_NEW_ICON', 'INDICATOR_SIGNAL_NEW_ICON_THEME_PATH', 'INDICATOR_SIGNAL_NEW_LABEL', 'INDICATOR_SIGNAL_NEW_STATUS', 'INDICATOR_SIGNAL_SCROLL_EVENT', 'Indicator', 'IndicatorCategory', 'IndicatorClass', 'IndicatorPrivate', 'IndicatorStatus', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__file__', '__format__', '__getattr__', '__getattribute__', '__hash__', '__init__', '__loader__', '__module__', '__name__', '__new__', '__path__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_introspection_module', '_load', '_namespace', '_overrides_module', '_version']
diff --git a/virtManager/systray.py b/virtManager/systray.py index 992a59b..b1bd4f3 100644 --- a/virtManager/systray.py +++ b/virtManager/systray.py @@ -123,7 +123,7 @@ class vmmSystray(vmmGObject): self.systray_menu.add(Gtk.SeparatorMenuItem()) if self.systray_indicator: - hide_item = Gtk.MenuItem("_Show Virtual Machine Manager") + hide_item = Gtk.MenuItem("Toggle Virtual Machine Manager Window") hide_item.connect("activate", self.systray_activate) self.systray_menu.add(hide_item) @@ -138,13 +138,6 @@ class vmmSystray(vmmGObject): return if self.systray_indicator: - self.systray_icon = AppIndicator3.Indicator("virt-manager", - "virt-manager-icon", - AppIndicator3.CATEGORY_OTHER) - self.systray_icon.set_status(AppIndicator3.STATUS_ACTIVE) - self.systray_icon.set_menu(self.systray_menu) - - else: self.systray_icon = Gtk.StatusIcon() self.systray_icon.set_visible(True) self.systray_icon.set_property("icon-name", "virt-manager") @@ -152,6 +145,13 @@ class vmmSystray(vmmGObject): self.systray_icon.connect("popup-menu", self.systray_popup) self.systray_icon.set_tooltip_text(_("Virtual Machine Manager")) + else: + self.systray_icon = AppIndicator3.Indicator("virt-manager", + "virt-manager-icon", + AppIndicator3.CATEGORY_OTHER) + self.systray_icon.set_status(AppIndicator3.STATUS_ACTIVE) + self.systray_icon.set_menu(self.systray_menu) + def show_systray(self): do_show = self.config.get_view_system_tray() logging.debug("Showing systray: %s", do_show)
_______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list