It result that doesn't matter if the application can find the icon,
because the systray is *other* app.

But setting the icon theme path (globally or for the indicator), using a
*full path*, works.

I finally did:

    ind = appindicator.Indicator.new("example", "",
                             appindicator.IndicatorCategory.APPLICATION_STATUS)
    ind.set_icon_theme_path("/home/facundo/temp/bugappind/")
    ind.set_icon("nice-test-icon")

Marking this as invalid.

** Changed in: pygobject (Ubuntu)
       Status: New => Invalid

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

Title:
  appindicator does not use custom icon

Status in “pygobject” package in Ubuntu:
  Invalid

Bug description:
  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)

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

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to