Public bug reported:

I have the following code snipet where I use a custom icon (see the
'assert', the icon *is there* in the theme), but then appindicator
doesn't really use it.

I put a commented out line for you to try it and see that the rest of
the code is OK... if you use the icon name "indicator-messages", all
works ok... if you use "nice-test-icon", it won't show the icon in the
systray, :(

Here's the code for a quick look, attached is a zip with both the code
and the icon (a standard 16px PNG that I use in other project to put it
in a systray, in gtk2 from python).

Thanks for the help!!


"""
from gi.repository import Gtk
from gi.repository import AppIndicator3 as appindicator

# add the icon
icons = Gtk.IconTheme.get_default()
icons.append_search_path(".")
assert icons.has_icon("nice-test-icon")

# indicator
#ind = appindicator.Indicator.new("example", "indicator-messages",
ind = appindicator.Indicator.new("example", "nice-test-icon",
                    appindicator.IndicatorCategory.APPLICATION_STATUS)
ind.set_status(appindicator.IndicatorStatus.ACTIVE)

# create a menu
menu = Gtk.Menu()
menu_items = Gtk.MenuItem("quit")
menu.append(menu_items)
menu_items.connect("activate", lambda *a: Gtk.main_quit(), "quit")
menu_items.show()

ind.set_menu(menu)
Gtk.main()
"""

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: python-gi 3.2.2-1~precise
ProcVersionSignature: Ubuntu 3.2.0-25.40-generic-pae 3.2.18
Uname: Linux 3.2.0-25-generic-pae i686
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu8
Architecture: i386
Date: Wed Jun 20 19:10:33 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta i386 (20120328)
ProcEnviron:
 LANGUAGE=es_AR:es
 TERM=xterm
 PATH=(custom, user)
 LANG=es_AR.UTF-8
 SHELL=/bin/bash
SourcePackage: pygobject
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: pygobject (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 precise

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1015820

Title:
  appindicator does not use custom icon

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/1015820/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to