[virt-tools-list] AppIndicator3 not appindicator
Cole Robinson
crobinso at redhat.com
Tue Jul 30 12:49:17 UTC 2013
On 07/29/2013 09:22 PM, poma wrote:
> On 30.07.2013 01:19, Marc Deslauriers wrote:
>> On 13-07-29 07:09 PM, poma wrote:
>>> On 29.07.2013 20:45, Cole Robinson wrote:
>>>> On 07/29/2013 02:38 PM, Marc Deslauriers wrote:
>>>>> On 13-07-29 07:29 AM, Cole Robinson wrote:
>>>>>> Thanks for trying this out and fixing my typo. Unfortunate that this is still
>>>>>> an issue.
>>>>>>
>>>>>> Marc, you did the original appindicators patch, any chance you can give
>>>>>> virt-manager git a spin and fix the issues with appindicator3 ? My guess is
>>>>>> they are minor. If I don't hear back for a week I'll likely drop the
>>>>>> appindicators support since it is currently broken, but I'm happy to revive it
>>>>>> later when someone has it working.
>>>>>>
>>>>>> git clone git://git.fedorahosted.org/virt-manager.git
>>>>>> cd virt-manager
>>>>>> ./virt-manager --debug
>>>>>> Preferences->Enable tray icon
>>>>>
>>>>>
>>>>> Here you go:
>>>>>
>>>>>
>>>>> From bcb0993cc9902574da2ec2e21ae960503ddfc6db Mon Sep 17 00:00:00 2001
>>>>> From: Marc Deslauriers <marc.deslauriers at ubuntu.com>
>>>>> Date: Mon, 29 Jul 2013 14:25:07 -0400
>>>>> Subject: [PATCH] systray: Switch AppIndicator code to GIR
>>>>>
>>>>> Switch AppIndicator code to use GObject introspection.
>>>>> ---
>>>>> virtManager/systray.py | 15 +++++++++------
>>>>> 1 file changed, 9 insertions(+), 6 deletions(-)
>>>>>
>>>>> diff --git a/virtManager/systray.py b/virtManager/systray.py
>>>>> index 992a59b..d504495 100644
>>>>> --- a/virtManager/systray.py
>>>>> +++ b/virtManager/systray.py
>>>>> @@ -123,7 +123,8 @@ 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.new_with_mnemonic(
>>>>> + _("_Show Virtual Machine Manager"))
>>>>> hide_item.connect("activate", self.systray_activate)
>>>>> self.systray_menu.add(hide_item)
>>>>>
>>>>> @@ -138,10 +139,10 @@ class vmmSystray(vmmGObject):
>>>>> return
>>>>>
>>>>> if self.systray_indicator:
>>>>> - self.systray_icon = AppIndicator3.Indicator("virt-manager",
>>>>> + self.systray_icon = AppIndicator3.Indicator.new("virt-manager",
>>>>> "virt-manager-icon",
>>>>> - AppIndicator3.CATEGORY_OTHER)
>>>>> - self.systray_icon.set_status(AppIndicator3.STATUS_ACTIVE)
>>>>> + AppIndicator3.IndicatorCategory.OTHER)
>>>>> + self.systray_icon.set_status(AppIndicator3.IndicatorStatus.ACTIVE)
>>>>> self.systray_icon.set_menu(self.systray_menu)
>>>>>
>>>>> else:
>>>>> @@ -162,9 +163,11 @@ class vmmSystray(vmmGObject):
>>>>> else:
>>>>> if self.systray_indicator:
>>>>> if do_show:
>>>>> - self.systray_icon.set_status(AppIndicator3.STATUS_ACTIVE)
>>>>> + self.systray_icon.set_status(
>>>>> + AppIndicator3.IndicatorStatus.ACTIVE)
>>>>> else:
>>>>> - self.systray_icon.set_status(AppIndicator3.STATUS_PASSIVE)
>>>>> + self.systray_icon.set_status(
>>>>> + AppIndicator3.IndicatorStatus.PASSIVE)
>>>>> else:
>>>>> self.systray_icon.set_visible(do_show)
>>>>>
>>>>
>>>> Thanks Marc! Pushed now.
>>>>
>>>> - Cole
>>>>
>>>
>>> With 'systray-fedora.patch' - attach,
>>> - systray icon is displayed correctly
>>> - left mouse button single-click on the systray icon opens and closes
>>> the virtual manager window
>>> - right mouse button single-click on the systray icon displays menu
>>> correctly
>>>
>>> With Marc's original patch isn't entirely the same case, on Fedora 19. ;)
>>>
>>> http://goo.gl/FfiF89
>>>
>>
>> This patch doesn't make sense. self.systray_indicator should be True only on
>> systems that have AppIndicator3, which isn't the case on Fedora.
>>
>> Marc.
>>
>>
>
> It is a matter of perspective. :)
>
> https://www.redhat.com/archives/virt-tools-list/2013-July/msg00106.html
>
> http://pkgs.fedoraproject.org/cgit/libappindicator.git
>
> $ rpm -qi libappindicator-gtk3
> Name : libappindicator-gtk3
> Version : 12.10.0
> Release : 2.fc19
> Architecture: x86_64
> Install Date: Mon 15 Jul 2013 10:46:08 AM CEST
> Group : System Environment/Libraries
> Size : 95744
> License : LGPLv2 and LGPLv3
> Signature : RSA/SHA256, Fri 14 Jun 2013 05:43:00 PM CEST, Key ID
> 07477e65fb4b18e6
> Source RPM : libappindicator-12.10.0-2.fc19.src.rpm
> Build Date : Thu 13 Jun 2013 06:19:20 PM CEST
> Build Host : buildvm-16.phx2.fedoraproject.org
> Relocations : (not relocatable)
> Packager : Fedora Project
> Vendor : Fedora Project
> URL : https://launchpad.net/libappindicator
> Summary : Application indicators library - GTK 3
> Description :
> A library to allow applications to export a menu into the Unity Menu
> bar. Based
> on KSNI it also works in KDE and will fallback to generic Systray support if
> none of those are available.
>
> This package contains the GTK 3 version of this library.
>
Huh, I didn't realize we have appindicator in fedora. Nothing seems to depend
on libappindicator-gtk3, so if you don't want to use it, just uninstall it. At
least on gnome it seems to fallback to stock statusicon behavior anyways.
- Cole
More information about the virt-tools-list
mailing list