From fef8bce0432719ca8ad4fe3d8df5952be5988ce4 Mon Sep 17 00:00:00 2001 From: flavio Date: Fri, 09 Nov 2012 22:21:25 +0000 Subject: Corrections --- diff --git a/activity.py b/activity.py index efeb157..db6d983 100755 --- a/activity.py +++ b/activity.py @@ -70,7 +70,7 @@ class CartoonBuilderActivity(SharedActivity): lessons_button = ToggleToolButton('mamamedia') lessons_button.connect('toggled', self.__toggled_lessons_button_cb) - lessons_button.set_tooltip(_('Lessons')) + lessons_button.set_tooltip_text(_('Lessons')) toolbox.toolbar.insert(lessons_button, -1) separator = Gtk.SeparatorToolItem() @@ -133,7 +133,7 @@ class CartoonBuilderActivity(SharedActivity): self.playButton.connect('toggled', self.__play_cb, playButtonImg, pauseButtonImg) toolbar.insert(self.playButton, -1) - self.playButton.set_tooltip(_('Play / Pause')) + self.playButton.set_tooltip_text(_('Play / Pause')) tempo = TempoSlider(0, 10) tempo.adjustment.connect("value-changed", self.__tempo_cb) @@ -148,7 +148,7 @@ class CartoonBuilderActivity(SharedActivity): clear_tape = ToolButton('sl-reset') clear_tape.connect('clicked', self.__clear_tape_cb) - clear_tape.set_tooltip(_('Reset')) + clear_tape.set_tooltip_text(_('Reset')) toolbar.insert(clear_tape, -1) toolbar.show_all() diff --git a/montage.py b/montage.py index f01eebf..f34abdc 100644 --- a/montage.py +++ b/montage.py @@ -184,12 +184,12 @@ class View(Gtk.EventBox): # frames box table_scroll = VScrolledBox() table_scroll.set_viewport(self.table) - table_scroll.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('BUTTON_BACKGROUND')) + table_scroll.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.BUTTON_BACKGROUND)) yellow_frames = Gtk.EventBox() - yellow_frames.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('YELLOW')) + yellow_frames.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.YELLOW)) table_frames = Gtk.EventBox() - table_frames.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('BACKGROUND')) + table_frames.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.BACKGROUND)) table_frames.set_border_width(5) table_frames.add(table_scroll) yellow_frames.add(table_frames) @@ -205,7 +205,7 @@ class View(Gtk.EventBox): # screen screen_pink = Gtk.EventBox() - screen_pink.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('PINK')) + screen_pink.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.PINK)) screen_box = Gtk.EventBox() screen_box.set_border_width(5) screen_box.add(self._screen) @@ -229,8 +229,8 @@ class View(Gtk.EventBox): frame = Gtk.EventBox() frame.set_events(Gdk.EventMask.BUTTON_PRESS_MASK) frame.connect('button_press_event', self._tape_cb, i) - frame.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('BLACK')) - frame.modify_bg(Gtk.StateType.PRELIGHT, Gdk.color_parse('BLACK')) + frame.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.BLACK)) + frame.modify_bg(Gtk.StateType.PRELIGHT, Gdk.color_parse(theme.BLACK)) frame.props.border_width = 2 frame.set_size_request(theme.THUMB_SIZE, theme.THUMB_SIZE) frame_box.pack_start(frame, True, True, 0) @@ -265,7 +265,7 @@ class View(Gtk.EventBox): screen_alignment.add(screen_pink) box = Gtk.EventBox() - box.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('BACKGROUND')) + box.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.BACKGROUND)) box.connect('size-allocate', self._screen_size_cb, screen_pink) box.add(screen_alignment) # << Drawing Central Area @@ -282,9 +282,9 @@ class View(Gtk.EventBox): arrow = Gtk.Image() arrow.set_from_file(theme.path('icons', 'pink_arrow.png')) tape_pink = Gtk.EventBox() - tape_pink.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('PINK')) + tape_pink.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.PINK)) tape_bg = Gtk.EventBox() - tape_bg.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('BACKGROUND')) + tape_bg.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.BACKGROUND)) tape_bg.set_border_width(5) tape_bg.add(tape) tape_pink.add(tape_bg) @@ -303,11 +303,11 @@ class View(Gtk.EventBox): desktop.pack_start(tape_box, False, False, 0) greenbox = Gtk.EventBox() - greenbox.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('BACKGROUND')) + greenbox.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.BACKGROUND)) greenbox.set_border_width(5) greenbox.add(desktop) - self.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('YELLOW')) + self.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.YELLOW)) self.add(greenbox) self.show_all() @@ -360,8 +360,8 @@ class View(Gtk.EventBox): image_box = Gtk.EventBox() image_box.set_events(Gdk.EventMask.BUTTON_PRESS_MASK) image_box.connect('button_press_event', self._frame_cb, index) - image_box.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('BLACK')) - image_box.modify_bg(Gtk.StateType.PRELIGHT, Gdk.color_parse('BLACK')) + image_box.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.BLACK)) + image_box.modify_bg(Gtk.StateType.PRELIGHT, Gdk.color_parse(theme.BLACK)) image_box.props.border_width = 2 image_box.set_size_request(theme.THUMB_SIZE, theme.THUMB_SIZE) image_box.add(image) @@ -380,16 +380,16 @@ class View(Gtk.EventBox): return tape = self._tape[index] - tape.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('YELLOW')) - tape.modify_bg(Gtk.StateType.PRELIGHT, Gdk.color_parse('YELLOW')) + tape.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse(theme.YELLOW)) + tape.modify_bg(Gtk.StateType.PRELIGHT, Gdk.color_parse(theme.YELLOW)) if self._tape_selected != index: if self._tape_selected != -1: old_tape = self._tape[self._tape_selected] old_tape.modify_bg(Gtk.StateType.NORMAL, - Gdk.color_parse('BLACK')) + Gdk.color_parse(theme.BLACK)) old_tape.modify_bg(Gtk.StateType.PRELIGHT, - Gdk.color_parse('BLACK')) + Gdk.color_parse(theme.BLACK)) self._tape_selected = index self._screen.fgpixbuf = Document.tape[index].orig() diff --git a/toolkit/activity_widgets.py b/toolkit/activity_widgets.py index 385129c..e58f368 100644 --- a/toolkit/activity_widgets.py +++ b/toolkit/activity_widgets.py @@ -22,7 +22,7 @@ from gi.repository import GObject from gi.repository import GdkX11 import gettext -from sugar import profile +from sugar3 import profile from sugar3.graphics.toolbutton import ToolButton from sugar3.graphics.radiotoolbutton import RadioToolButton from sugar3.graphics.toolbox import Toolbox @@ -235,7 +235,7 @@ class DescriptionItem(Gtk.ToolItem): description_button = ToolButton('edit-description') description_button.show() - description_button.set_tooltip(_('Description')) + description_button.set_tooltip_text(_('Description')) self._palette = description_button.get_palette() description_box = Gtk.HBox() diff --git a/toolkit/combobox.py b/toolkit/combobox.py index 28e6f04..ff0ab3f 100644 --- a/toolkit/combobox.py +++ b/toolkit/combobox.py @@ -142,12 +142,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, True, 0) self.add_attribute(self._text_renderer, 'text', 1) if icon_name or file_name: diff --git a/toolkit/radiopalette.py b/toolkit/radiopalette.py index 6357414..ccbaa6e 100644 --- a/toolkit/radiopalette.py +++ b/toolkit/radiopalette.py @@ -91,7 +91,7 @@ class RadioPalette(Palette): button.show() button.connect('clicked', self.__clicked_cb) - self.button_box.pack_start(button, fill=False) + self.button_box.pack_start(button, False, False, 0) button.palette_label = label if not children: diff --git a/toolkit/toolitem.py b/toolkit/toolitem.py index b2a7407..945495e 100644 --- a/toolkit/toolitem.py +++ b/toolkit/toolitem.py @@ -61,7 +61,7 @@ class ToolWidget(Gtk.ToolItem): self._box.remove(self._label) self._label = label - self._box.pack_start(label, False) + self._box.pack_start(label, False, False, 0) self._box.reorder_child(label, 0) label.show() self.set_label_text(self._label_text) @@ -77,7 +77,7 @@ class ToolWidget(Gtk.ToolItem): self._box.remove(self._widget) self._widget = widget - self._box.pack_end(widget) + self._box.pack_end(widget, False, False, 0) widget.show() widget = GObject.property(getter=get_widget, setter=set_widget) -- cgit v0.9.1