Pass all parameters to Box.pack_start() and ...pack_end()
With PyGTK, several Box.pack_{start,end}() parameters had defaults [1,2].
With GTK3+pygi all values must be passed [3,4].
[1] http://developer.gnome.org/pygtk/stable/class-gtkbox.html#method-gtkbox--pack-start
[2] http://developer.gnome.org/pygtk/stable/class-gtkbox.html#method-gtkbox--pack-end
[3] http://developer.gnome.org/gtk/stable/GtkBox.html#gtk-box-pack-start
[4] http://developer.gnome.org/gtk/stable/GtkBox.html#gtk-box-pack-end
[assembled from several patches; replaced description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
This commit is contained in:
committed by
Simon Schampijer
parent
89ef6304a1
commit
2f7f95f9af
@@ -104,12 +104,12 @@ class Alert(gtk.EventBox):
|
||||
self._msg_box = gtk.VBox()
|
||||
self._title_label = gtk.Label()
|
||||
self._title_label.set_alignment(0, 0.5)
|
||||
self._msg_box.pack_start(self._title_label, False)
|
||||
self._msg_box.pack_start(self._title_label, False, False, 0)
|
||||
|
||||
self._msg_label = gtk.Label()
|
||||
self._msg_label.set_alignment(0, 0.5)
|
||||
self._msg_box.pack_start(self._msg_label, False)
|
||||
self._hbox.pack_start(self._msg_box, False)
|
||||
self._msg_box.pack_start(self._msg_label, False, False, 0)
|
||||
self._hbox.pack_start(self._msg_box, False, False, 0)
|
||||
|
||||
self._buttons_box = gtk.HButtonBox()
|
||||
self._buttons_box.set_layout(gtk.BUTTONBOX_END)
|
||||
@@ -154,7 +154,7 @@ class Alert(gtk.EventBox):
|
||||
elif pspec.name == 'icon':
|
||||
if self._icon != value:
|
||||
self._icon = value
|
||||
self._hbox.pack_start(self._icon, False)
|
||||
self._hbox.pack_start(self._icon, False, False, 0)
|
||||
self._hbox.reorder_child(self._icon, 0)
|
||||
|
||||
def do_get_property(self, pspec):
|
||||
|
||||
@@ -104,8 +104,8 @@ class Notebook(gtk.Notebook):
|
||||
tab_button.show()
|
||||
tab_label.show()
|
||||
|
||||
tab_box.pack_start(tab_label, True)
|
||||
tab_box.pack_start(tab_button, True)
|
||||
tab_box.pack_start(tab_label, True, False, 0)
|
||||
tab_box.pack_start(tab_button, True, False, 0)
|
||||
|
||||
tab_box.show_all()
|
||||
event_box.add(tab_box)
|
||||
|
||||
@@ -43,7 +43,7 @@ class ToolComboBox(gtk.ToolItem):
|
||||
hbox = gtk.HBox(False, style.DEFAULT_SPACING)
|
||||
|
||||
self.label = gtk.Label(self._label_text)
|
||||
hbox.pack_start(self.label, False)
|
||||
hbox.pack_start(self.label, False, False, 0)
|
||||
self.label.show()
|
||||
|
||||
if combo:
|
||||
|
||||
@@ -233,14 +233,14 @@ class HTray(gtk.HBox):
|
||||
gobject.GObject.__init__(self, **kwargs)
|
||||
|
||||
scroll_left = _TrayScrollButton('go-left', _PREVIOUS_PAGE)
|
||||
self.pack_start(scroll_left, False)
|
||||
self.pack_start(scroll_left, False, False, 0)
|
||||
|
||||
self._viewport = _TrayViewport(gtk.ORIENTATION_HORIZONTAL)
|
||||
self.pack_start(self._viewport)
|
||||
self._viewport.show()
|
||||
|
||||
scroll_right = _TrayScrollButton('go-right', _NEXT_PAGE)
|
||||
self.pack_start(scroll_right, False)
|
||||
self.pack_start(scroll_right, False, False, 0)
|
||||
|
||||
scroll_left.viewport = self._viewport
|
||||
scroll_right.viewport = self._viewport
|
||||
@@ -319,14 +319,14 @@ class VTray(gtk.VBox):
|
||||
gobject.GObject.__init__(self, **kwargs)
|
||||
|
||||
scroll_up = _TrayScrollButton('go-up', _PREVIOUS_PAGE)
|
||||
self.pack_start(scroll_up, False)
|
||||
self.pack_start(scroll_up, False, False, 0)
|
||||
|
||||
self._viewport = _TrayViewport(gtk.ORIENTATION_VERTICAL)
|
||||
self.pack_start(self._viewport)
|
||||
self._viewport.show()
|
||||
|
||||
scroll_down = _TrayScrollButton('go-down', _NEXT_PAGE)
|
||||
self.pack_start(scroll_down, False)
|
||||
self.pack_start(scroll_down, False, False, 0)
|
||||
|
||||
scroll_up.viewport = self._viewport
|
||||
scroll_down.viewport = self._viewport
|
||||
|
||||
Reference in New Issue
Block a user