From 8e1c3f9f01edf01e544514056ad5ef4dffb362c7 Mon Sep 17 00:00:00 2001 From: Antoine van Gelder Date: Sun, 13 Jan 2008 12:06:43 +0000 Subject: * Widget rendering ** Fix: Widgets not rendering on first expose on XO hardware *** XO Hardware doesn't like GtkButton::inner-border property in gtkrc ** Fix: Background color of sound selector is black on XO hardware *** XO Hardware sets default widget background of RoundBox to black for some reason ** Fix: Lesson plans are being opened as text by AbiWord on XO hardware *** Abiword is now quite insistent upon application/x-abiword. * Fix: Cursor now changes to hand icon when over sound selector * Added: AUTHORS file * Fix: Modified copyright header on source files --- (limited to 'gui') diff --git a/gui/canvaslistbox.py b/gui/canvaslistbox.py index feb21c0..126e4f0 100644 --- a/gui/canvaslistbox.py +++ b/gui/canvaslistbox.py @@ -1,3 +1,5 @@ +# Copyright 2007 World Wide Workshop Foundation +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -12,6 +14,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # +# If you find this activity useful or end up using parts of it in one of your +# own creations we would love to hear from you at info@WorldWideWorkshop.org ! +# import gtk import hippo diff --git a/gui/frame.py b/gui/frame.py index 7da5540..8a16fe8 100644 --- a/gui/frame.py +++ b/gui/frame.py @@ -1,3 +1,5 @@ +# Copyright 2007 World Wide Workshop Foundation +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -12,6 +14,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # +# If you find this activity useful or end up using parts of it in one of your +# own creations we would love to hear from you at info@WorldWideWorkshop.org ! +# import gobject import gtk diff --git a/gui/lessonplanwidget.py b/gui/lessonplanwidget.py index 5b6e021..3d4a100 100644 --- a/gui/lessonplanwidget.py +++ b/gui/lessonplanwidget.py @@ -1,3 +1,5 @@ +# Copyright 2007 World Wide Workshop Foundation +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -12,6 +14,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # +# If you find this activity useful or end up using parts of it in one of your +# own creations we would love to hear from you at info@WorldWideWorkshop.org ! +# import os import locale @@ -56,7 +61,7 @@ class LessonPlanWidget(gtk.Notebook): files = filter(lambda x: os.path.exists(x), files) # On jhbuild, the first works, on XO image 432 the second works: try: - canvas.load_file('file://%s' % files[0], 'text/plain') + canvas.load_file('file://%s' % files[0], 'application/x-abiword') except: canvas.load_file('file://%s' % files[0]) canvas.view_online_layout() diff --git a/gui/page.py b/gui/page.py index 74ac506..0d83449 100644 --- a/gui/page.py +++ b/gui/page.py @@ -1,3 +1,5 @@ +# Copyright 2007 World Wide Workshop Foundation +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -12,6 +14,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # +# If you find this activity useful or end up using parts of it in one of your +# own creations we would love to hear from you at info@WorldWideWorkshop.org ! +# import os import gtk @@ -109,8 +114,10 @@ class Page(hippo.CanvasBox): sound_box.props.box_width = width sound_box.props.border=theme.BORDER_WIDTH_CONTROL / 2 sound_box.props.border_color=theme.COLOR_DARK_GREEN.get_int() + sound_box.props.background_color = theme.COLOR_WHITE.get_int() sound_box.props.orientation=hippo.ORIENTATION_HORIZONTAL sound_box.props.xalign=hippo.ALIGNMENT_START + sound_box.set_clickable(True) sound_box.append(preview_sound) sound_box.append(choose_sound) @@ -291,9 +298,9 @@ class Page(hippo.CanvasBox): def __do_clicked_image(self, control, event, obj, property): # Courtesy of Write.activity - toolbar.py - chooser = ObjectChooser(_('Choose image'), - Globals.JokeMachineActivity, #._parent, - gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) + chooser = ObjectChooser(title=_('Choose image'), + parent=Globals.JokeMachineActivity, #._parent, + flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) try: result = chooser.run() if result == gtk.RESPONSE_ACCEPT: @@ -312,16 +319,16 @@ class Page(hippo.CanvasBox): surface = cairo.ImageSurface.create_from_png(image_file) control.props.image = surface finally: - chooser.hide() + #chooser.hide() chooser.destroy() del chooser def __do_clicked_choose_sound(self, control, event, obj, property): logging.debug('choosing sound file') - chooser = ObjectChooser(_('Choose Sound'), - Globals.JokeMachineActivity, #._parent, - gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) + chooser = ObjectChooser(title=_('Choose Sound'), + parent=Globals.JokeMachineActivity, #._parent, + flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) try: result = chooser.run() if result == gtk.RESPONSE_ACCEPT: @@ -337,7 +344,7 @@ class Page(hippo.CanvasBox): obj.sound_blob = raw control.props.text = obj.sound finally: - chooser.hide() + #chooser.hide() chooser.destroy() del chooser @@ -354,4 +361,4 @@ class Page(hippo.CanvasBox): player.play() - \ No newline at end of file + diff --git a/gui/theme.py b/gui/theme.py index 9e3d393..22c6f30 100644 --- a/gui/theme.py +++ b/gui/theme.py @@ -1,3 +1,23 @@ +# Copyright 2007 World Wide Workshop Foundation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# If you find this activity useful or end up using parts of it in one of your +# own creations we would love to hear from you at info@WorldWideWorkshop.org ! +# + import gtk from sugar.graphics import style -- cgit v0.9.1