1

I've started to work with quickly and python (because I wanted to have some GTk3 integration and create and appindicator), and so I create the projecto like this :

quickly create ubuntu-application ualarm
cd ualarm
quickly run

And the application launched. But then I tried to add the appindicator like this :

quickly add indicator

And since then the application doesn't start anymore and this error appear :

aliasbody@BodyUbuntu-PC:~/Projectos/ualarm$ quickly run

(ualarm:8515): Gtk-WARNING **: Theme parsing error: gnome-panel.css:28:11: Not using units is deprecated. Assuming 'px'.
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `Window' can't be set after construction
Gtk.Window.__init__(self, type=type, **kwds)
Traceback (most recent call last):
File "bin/ualarm", line 33, in <module>
ualarm.main()
File "/home/aliasbody/Projectos/ualarm/ualarm/__init__.py", line 33, in main
window = UalarmWindow.UalarmWindow()
File "/home/aliasbody/Projectos/ualarm/ualarm_lib/Window.py", line 35, in __new__
new_object.finish_initializing(builder)
File "/home/aliasbody/Projectos/ualarm/ualarm/UalarmWindow.py", line 24, in finish_initializing
super(UalarmWindow, self).finish_initializing(builder)
File "/home/aliasbody/Projectos/ualarm/ualarm_lib/Window.py", line 75, in finish_initializing
self.indicator = indicator.new_application_indicator(self)
File "/home/aliasbody/Projectos/ualarm/ualarm/indicator.py", line 52, in new_application_indicator
ind = Indicator(window)
File "/home/aliasbody/Projectos/ualarm/ualarm/indicator.py", line 20, in __init__
self.indicator = AppIndicator3.Indicator('ualarm', '',      AppIndicator3.IndicatorCategory.APPLICATION_STATUS)
TypeError: GObject.__init__() takes exactly 0 arguments (3 given)

How can I solve this problem ?

1 Answer 1

10

The command quickly add indicator creates a file projectname/indicator.py where the indicator is created.

self.indicator = AppIndicator3.Indicator('projectname', '', AppIndicator3.IndicatorCategory.APPLICATION_STATUS)

change this line to:

self.indicator = AppIndicator3.Indicator.new('projectname', '', AppIndicator3.IndicatorCategory.APPLICATION_STATUS)

and it will work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .