Fwd: gnome-dvb-control: TypeError: __init__() got an unexpected keyword argument 'icon_widget'



Hi,

We're seeing problems with gnome-dvb-control - tested with versions 0.2.7 and 0.2.8 - on Arch Linux:

$ gnome-dvb-control
Traceback (most recent call last):
  File "/usr/bin/gnome-dvb-control", line 26, in <module>
    w = ControlCenterWindow(model)
  File "/usr/lib/python2.7/site-packages/gnomedvb/ui/controlcenter/ControlCenterWindow.py", line 64, in __init__
    self.__create_toolbar()
  File "/usr/lib/python2.7/site-packages/gnomedvb/ui/controlcenter/ControlCenterWindow.py", line 267, in __create_toolbar
    self.button_display_timers = Gtk.ToolButton(icon_widget=timers_image, label=_("Recording schedule"))
TypeError: __init__() got an unexpected keyword argument 'icon_widget'

and I can find bug reports with the same error, but no resolution, for Ubuntu and Debian.

One user has created a patch that works around the problem (attached) and allows gnome-dvb-control to start but I'm not certain that this is a bug in gnome-dvb-control.   Arch's versions of gnome-dvb-daemon's UI dependencies are:
  • Python =  2.7.3

  • pygobject = 3.2.0

  • gobject-introspection = 1.32.1

David Spicer



--- ControlCenterWindow.py	2012-04-28 20:53:57.000000000 +0200
+++ ControlCenterWindow.py	2012-05-05 15:50:36.975878328 +0200
@@ -264,7 +264,9 @@
         timers_image = Gtk.Image.new_from_icon_name("appointment-soon", Gtk.IconSize.MENU)
         timers_image.show()
         
-        self.button_display_timers = Gtk.ToolButton(icon_widget=timers_image, label=_("Recording schedule"))
+        self.button_display_timers = Gtk.ToolButton()
+        self.button_display_timers.set_icon_widget(timers_image)
+        self.button_display_timers.set_label(_("Recording schedule"))
         self.button_display_timers.set_is_important(True)
         self.button_display_timers.set_sensitive(False)
         self.button_display_timers.connect("clicked", self._on_button_display_timers_clicked)
@@ -274,8 +276,10 @@
         
         recordings_image = Gtk.Image.new_from_icon_name("video", Gtk.IconSize.MENU)
         recordings_image.show()
-        
-        button_recordings = Gtk.ToolButton(icon_widget=recordings_image, label=_("Recordings"))
+
+        button_recordings = Gtk.ToolButton()
+        button_recordings.set_icon_widget(recordings_image)
+        button_recordings.set_label(_("Recordings"))
         button_recordings.set_is_important(True)
         button_recordings.connect("clicked", self._on_button_recordings_clicked)
         button_recordings.show()
@@ -283,8 +287,10 @@
         
         whatson_image = Gtk.Image.new_from_stock(Gtk.STOCK_INDEX, Gtk.IconSize.LARGE_TOOLBAR)
         whatson_image.show()
-        
-        self.button_whatson = Gtk.ToolButton(icon_widget=whatson_image, label=_("What's on now"))
+
+        self.button_whatson = Gtk.ToolButton()
+        self.button_whatson.set_icon_widget(whatson_image)
+        self.button_whatson.set_label(_("What's on now"))
         self.button_whatson.set_is_important(True)
         self.button_whatson.set_sensitive(False)
         self.button_whatson.connect("clicked", self._on_whats_on_now_clicked)
@@ -303,7 +309,9 @@
         
         prev_image = Gtk.Image.new_from_stock(Gtk.STOCK_GO_BACK, Gtk.IconSize.LARGE_TOOLBAR)
         prev_image.show()
-        self.button_prev_day = Gtk.ToolButton(icon_widget=prev_image, label=_("Previous Day"))
+        self.button_prev_day = Gtk.ToolButton()
+        self.button_prev_day.set_icon_widget(prev_image)
+        self.button_prev_day.set_label(_("Previous Day"))
         self.button_prev_day.connect("clicked", self._on_button_prev_day_clicked)
         self.button_prev_day.set_tooltip_markup(_("Go to previous day"))
         self.button_prev_day.set_sensitive(False)
@@ -312,7 +320,9 @@
         
         next_image = Gtk.Image.new_from_stock(Gtk.STOCK_GO_FORWARD, Gtk.IconSize.LARGE_TOOLBAR)
         next_image.show()
-        self.button_next_day = Gtk.ToolButton(icon_widget=next_image, label=_("Next Day"))
+        self.button_next_day = Gtk.ToolButton()
+        self.button_next_day.set_icon_widget(next_image)
+        self.button_next_day.set_label(_("Next Day"))
         self.button_next_day.connect("clicked", self._on_button_next_day_clicked)
         self.button_next_day.set_tooltip_markup(_("Go to next day"))
         self.button_next_day.set_sensitive(False)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]