Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/gui/page.py
diff options
context:
space:
mode:
authorAntoine van Gelder <antoine@g7.org.za>2008-01-13 12:06:43 (GMT)
committer Antoine van Gelder <antoine@g7.org.za>2008-01-13 12:06:43 (GMT)
commit8e1c3f9f01edf01e544514056ad5ef4dffb362c7 (patch)
treeb234e99b1391d6c875a5268d622be29d0436be63 /gui/page.py
parentfd1864cbb1a643d02bc18055f00eb9ed28f75d45 (diff)
* 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
Diffstat (limited to 'gui/page.py')
-rw-r--r--gui/page.py25
1 files changed, 16 insertions, 9 deletions
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
+