From 2578d1cbb289cbe97b3c4791d8a0b57746e3561e Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Wed, 23 Jan 2013 13:21:08 +0000 Subject: pack_start/pack_end: we have to pass all arguments now with the dynamic bindings --- diff --git a/activity.py b/activity.py index c66125e..a6a5428 100644 --- a/activity.py +++ b/activity.py @@ -305,7 +305,7 @@ class MemorizeActivity(Activity): if self.play_mode == True: self.hbox.remove(self.scoreboard) self.hbox.remove(self.table) - self.hbox.pack_start(self.createcardpanel, False) + self.hbox.pack_start(self.createcardpanel, False, False, 0) self.hbox.pack_start(self.cardlist, True, True, 0) self.cardlist.load_game(self.game) self.game.model.create_temp_directories() @@ -326,7 +326,7 @@ class MemorizeActivity(Activity): self.hbox.remove(self.cardlist) if self.play_mode in (False, None): self.hbox.pack_start(self.scoreboard, True, True, 0) - self.hbox.pack_start(self.table, False) + self.hbox.pack_start(self.table, False, False, 0) self.play_mode = True self._memorizeToolbarBuilder.update_controls(mode == _MODE_PLAY) self._createToolbarBuilder.update_controls(mode == _MODE_CREATE) diff --git a/cardlist.py b/cardlist.py index 4a8d37e..e645264 100644 --- a/cardlist.py +++ b/cardlist.py @@ -16,6 +16,7 @@ # from gi.repository import Gtk +from gi.repository import Gdk from gi.repository import GObject from gi.repository import GdkPixbuf @@ -57,7 +58,7 @@ class CardList(Gtk.EventBox): fill_box = Gtk.Label() fill_box.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('#000000')) fill_box.show() - self.vbox.pack_end(fill_box, True, True) + self.vbox.pack_end(fill_box, True, True, 0) scroll = Gtk.ScrolledWindow() scroll.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) @@ -192,7 +193,7 @@ class CardList(Gtk.EventBox): aspeak, bspeak, font_name1, font_name2, show=True, load=False): pair = CardPair(achar, bchar, aimg, bimg, asnd, bsnd, aspeak, bspeak, font_name1, font_name2) - self.vbox.pack_end(pair, False, True) + self.vbox.pack_end(pair, False, True, 0) self.pairs.append(pair) pair.connect('pair-selected', self.set_selected) pair.connect('pair-closed', self.rem_pair) diff --git a/cardtable.py b/cardtable.py index bcb44e4..58b62e2 100644 --- a/cardtable.py +++ b/cardtable.py @@ -55,7 +55,6 @@ class CardTable(Gtk.EventBox): self.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('#000000')) self.table = Gtk.Table() self.table.grab_focus() - self.table.set_focus(True) self.table.set_can_default(True) self.table.set_row_spacings(theme.CARD_PAD) self.table.set_col_spacings(theme.CARD_PAD) diff --git a/createcardpanel.py b/createcardpanel.py index c5786d1..c2e04fa 100644 --- a/createcardpanel.py +++ b/createcardpanel.py @@ -60,7 +60,7 @@ class CreateCardPanel(Gtk.EventBox): icon = Icon( icon_name=icon_name, icon_size=Gtk.IconSize.LARGE_TOOLBAR) - label_box.pack_start(icon, False) + label_box.pack_start(icon, False, False, 0) label = Gtk.Label(label=label) label.modify_fg(Gtk.StateType.NORMAL, style.COLOR_TOOLBAR_GREY.get_gdk_color()) @@ -86,7 +86,7 @@ class CreateCardPanel(Gtk.EventBox): self._addbutton.set_icon_widget( make_label('pair-add', ' ' + _('Add'))) self._addbutton.connect('clicked', self.emit_add_pair) - buttons_bar.pack_start(self._addbutton, False) + buttons_bar.pack_start(self._addbutton, False, False, 0) self._updatebutton = ToolButton( tooltip=_('Update selected pair'), @@ -94,7 +94,7 @@ class CreateCardPanel(Gtk.EventBox): self._updatebutton.set_icon_widget( make_label('pair-update', ' ' + _('Update'))) self._updatebutton.connect('clicked', self.emit_update_pair) - buttons_bar.pack_start(self._updatebutton, False) + buttons_bar.pack_start(self._updatebutton, False, False, 0) # Set card editors @@ -117,8 +117,8 @@ class CreateCardPanel(Gtk.EventBox): self.card_box.pack_start(self.cardeditor2, True, True, 0) box = Gtk.VBox() - box.pack_start(self.card_box, False) - box.pack_start(buttons_bar, False) + box.pack_start(self.card_box, False, False, 0) + box.pack_start(buttons_bar, False, False, 0) self.add(box) self.show_all() @@ -293,7 +293,7 @@ class CardEditor(Gtk.EventBox): self.previewlabel = Gtk.Label(label=_('Preview:')) self.previewlabel.set_alignment(0, 1) - box.pack_start(self.previewlabel, False) + box.pack_start(self.previewlabel, False, False, 0) self.card = svgcard.SvgCard(-1, {'front_text': {'card_text': '', @@ -305,15 +305,15 @@ class CardEditor(Gtk.EventBox): self.card.flip() card_align = Gtk.Alignment.new(.5, .5, 0, 0) card_align.add(self.card) - box.pack_start(card_align, False) + box.pack_start(card_align, False, False, 0) textlabel = Gtk.Label(label=_('Text:')) textlabel.set_alignment(0, 1) - box.pack_start(textlabel, False) + box.pack_start(textlabel, False, False, 0) self.textentry = Gtk.Entry() self.textentry.connect('changed', self.update_text) - box.pack_start(self.textentry, False) + box.pack_start(self.textentry, False, False, 0) toolbar = RoundBox() @@ -492,10 +492,10 @@ class SpeakPalette(Palette): usespeak_play = ToolButton(icon_name='media-playback-start') usespeak_play.connect('clicked', lambda button: self.face.say(editor.get_text())) - toolbar.pack_start(usespeak_play, False) + toolbar.pack_start(usespeak_play, False, False, 0) self.voices = speak.widgets.Voices(self.face) - toolbar.pack_start(ToolComboBox(self.voices, True, True, 0)) + toolbar.pack_start(ToolComboBox(self.voices), True, True, 0) toolbar.show_all() self.set_content(toolbar) diff --git a/fontcombobox.py b/fontcombobox.py index 1dd5236..6dc7511 100644 --- a/fontcombobox.py +++ b/fontcombobox.py @@ -28,7 +28,7 @@ class FontComboBox(Gtk.ComboBox): Gtk.ComboBox.__init__(self) font_renderer = Gtk.CellRendererText() - self.pack_start(font_renderer, True, True, 0) + self.pack_start(font_renderer, True) self.add_attribute(font_renderer, 'text', 0) self.add_attribute(font_renderer, 'font', 0) font_model = Gtk.ListStore(str) diff --git a/scoreboard.py b/scoreboard.py index e01ede4..d57543c 100644 --- a/scoreboard.py +++ b/scoreboard.py @@ -37,7 +37,7 @@ class Scoreboard(Gtk.EventBox): fill_box = Gtk.EventBox() fill_box.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('#4c4d4f')) fill_box.show() - self.vbox.pack_end(fill_box, True, True) + self.vbox.pack_end(fill_box, True, True, 0) scroll = Gtk.ScrolledWindow() scroll.props.shadow_type = Gtk.ShadowType.NONE @@ -59,7 +59,7 @@ class Scoreboard(Gtk.EventBox): player = PlayerScoreboard(nick, fill_color, stroke_color, score) player.show() self.players[buddy] = player - self.vbox.pack_start(player, False, False) + self.vbox.pack_start(player, False, False, 0) if score == -1: player.set_wait_mode(True) self.show_all() diff --git a/speak/face.py b/speak/face.py index 47091ec..ded1307 100644 --- a/speak/face.py +++ b/speak/face.py @@ -116,7 +116,7 @@ class View(Gtk.EventBox): # layout the screen box = Gtk.VBox(homogeneous=False) box.pack_start(self._eyebox, True, True, 0) - box.pack_start(self._mouthbox, False) + box.pack_start(self._mouthbox, False, False, 0) box.set_border_width(FACE_PAD) self.modify_bg(Gtk.StateType.NORMAL, self.fill_color.get_gdk_color()) self.add(box) -- cgit v0.9.1