diff options
author | Daniel Drake <dsd@laptop.org> | 2011-10-30 11:37:16 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2011-10-30 11:37:28 (GMT) |
commit | b39b7a621d611731e60ec2c183d3d085c07816c2 (patch) | |
tree | 7f99ad87545326792e1529055ed723a609e06326 | |
parent | 40a7094c0ad037bc3ff920e6005d956bbbbf5555 (diff) |
pack_start/pack_end fixes
-rw-r--r-- | src/sugar3/activity/namingalert.py | 20 | ||||
-rw-r--r-- | src/sugar3/graphics/alert.py | 8 | ||||
-rw-r--r-- | src/sugar3/graphics/combobox.py | 4 | ||||
-rw-r--r-- | src/sugar3/graphics/notebook.py | 4 | ||||
-rw-r--r-- | src/sugar3/graphics/toolcombobox.py | 2 |
5 files changed, 18 insertions, 20 deletions
diff --git a/src/sugar3/activity/namingalert.py b/src/sugar3/activity/namingalert.py index 865bdc6..764c76e 100644 --- a/src/sugar3/activity/namingalert.py +++ b/src/sugar3/activity/namingalert.py @@ -176,11 +176,11 @@ class NamingAlert(Gtk.Window): toolbar = NamingToolbar() toolbar.connect('keep-clicked', self.__keep_cb) - vbox.pack_start(toolbar, False) + vbox.pack_start(toolbar, False, False, 0) toolbar.show() body = self._create_body() - vbox.pack_start(body, expand=True, fill=True) + vbox.pack_start(body, True, True, 0) body.show() self._title.grab_focus() @@ -189,26 +189,24 @@ class NamingAlert(Gtk.Window): body = Gtk.VBox(spacing=style.DEFAULT_SPACING) body.set_border_width(style.DEFAULT_SPACING * 3) header = self._create_header() - body.pack_start(header, expand=False, padding=style.DEFAULT_PADDING) + body.pack_start(header, False, False, style.DEFAULT_PADDING) - body.pack_start(self._create_separator(style.DEFAULT_SPACING, True, True, 0), - expand=False) + body.pack_start(self._create_separator(style.DEFAULT_SPACING), False, False, 0) - body.pack_start(self._create_label(_('Description:', True, True, 0)), expand=False) + body.pack_start(self._create_label(_('Description:')), False, False, 0) description = self._activity.metadata.get('description', '') description_box, self._description = self._create_text_view(description) - body.pack_start(description_box, expand=True, fill=True) + body.pack_start(description_box, True, True, 0) - body.pack_start(self._create_separator(style.DEFAULT_PADDING, True, True, 0), - expand=False) + body.pack_start(self._create_separator(style.DEFAULT_PADDING), False, False, 0) - body.pack_start(self._create_label(_('Tags:', True, True, 0)), expand=False) + body.pack_start(self._create_label(_('Tags:')), False, False, 0) tags = self._activity.metadata.get('tags', '') tags_box, self._tags = self._create_text_view(tags) - body.pack_start(tags_box, expand=True, fill=True) + body.pack_start(tags_box, True, True, 0) body.show_all() return body diff --git a/src/sugar3/graphics/alert.py b/src/sugar3/graphics/alert.py index f2dd3b9..f72a2bd 100644 --- a/src/sugar3/graphics/alert.py +++ b/src/sugar3/graphics/alert.py @@ -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.ButtonBoxStyle.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): diff --git a/src/sugar3/graphics/combobox.py b/src/sugar3/graphics/combobox.py index b107c54..6bc84f1 100644 --- a/src/sugar3/graphics/combobox.py +++ b/src/sugar3/graphics/combobox.py @@ -94,12 +94,12 @@ class ComboBox(Gtk.ComboBox): settings, Gtk.IconSize.MENU) self._icon_renderer.props.stock_size = max(w, h) - self.pack_start(self._icon_renderer, False) + self.pack_start(self._icon_renderer, False, False, 0) self.add_attribute(self._icon_renderer, 'pixbuf', 2) if not self._text_renderer and text: self._text_renderer = Gtk.CellRendererText() - self.pack_end(self._text_renderer, True) + self.pack_end(self._text_renderer, True, False, 0) self.add_attribute(self._text_renderer, 'text', 1) if icon_name or file_name: diff --git a/src/sugar3/graphics/notebook.py b/src/sugar3/graphics/notebook.py index eed16b2..0d91c1c 100644 --- a/src/sugar3/graphics/notebook.py +++ b/src/sugar3/graphics/notebook.py @@ -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) diff --git a/src/sugar3/graphics/toolcombobox.py b/src/sugar3/graphics/toolcombobox.py index 7f02258..90bd1f4 100644 --- a/src/sugar3/graphics/toolcombobox.py +++ b/src/sugar3/graphics/toolcombobox.py @@ -43,7 +43,7 @@ class ToolComboBox(Gtk.ToolItem): hbox = Gtk.HBox(False, style.DEFAULT_SPACING) self.label = Gtk.Label(label=self._label_text) - hbox.pack_start(self.label, False) + hbox.pack_start(self.label, False, False, 0) self.label.show() if combo: |