Impossible to inherit a class from AppIndicator*.Indicator in Python (gir)

Bug #730528 reported by Artem Popov on 2011-03-07
This bug affects 3 people
Affects Status Importance Assigned to Milestone
libappindicator (Ubuntu)

Bug Description

In Python it's currently impossible to inherit a class from AppIndicator*.Indicator. The following sample code leads to segfault:

from gi.repository import AppIndicator3

class MyIndicator(AppIndicator3.Indicator):
    def __init__(self):
        #also happens with self.__gobject_init__()

i = MyIndicator()

Artem Popov (artfwo) on 2011-03-07
summary: Impossible to inherit a class from AppIndicator*.Indicator in Python
+ (gir)
Martin Pitt (pitti) wrote :

I don't think that has got anything to do with the subclassing; you cannot currently instantiate an appindicator object:

$ python -c 'from gi.repository import AppIndicator3; i = AppIndicator3.Indicator(); print i'

(process:29515): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
-c:1: Warning: invalid (NULL) pointer instance
-c:1: Warning: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
Speicherzugriffsfehler (Speicherabzug geschrieben)

Artem Popov (artfwo) wrote :

Martin, this code works for me on a fully updated Natty system:

from gi.repository import AppIndicator3, Gtk

i ="testindicator", "indicator-messages", AppIndicator3.IndicatorCategory.HARDWARE)


Artem Popov (artfwo) wrote :

Oh yes, constructor does not work, you have to use

Changed in libappindicator (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
importance: Undecided → Low
Changed in libappindicator:
importance: Undecided → Low
Ted Gould (ted) on 2011-03-21
Changed in libappindicator:
status: New → Confirmed
Changed in libappindicator (Ubuntu):
status: New → Confirmed
Changed in libappindicator (Ubuntu):
milestone: none → ubuntu-11.04
Changed in libappindicator (Ubuntu):
milestone: ubuntu-11.04 → natty-updates
Changed in libappindicator (Ubuntu):
milestone: natty-updates → none
Changed in libappindicator (Ubuntu):
assignee: Ken VanDine (ken-vandine) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers