Add a filechooser subclass which sizes correctly on the OLPC.

This is temporary, gtk needs to be fixed.
This commit is contained in:
Marco Pesenti Gritti 2007-03-15 17:10:12 +01:00
parent 4fbfd1625c
commit fbeaf5fb66
2 changed files with 11 additions and 0 deletions

View File

@ -9,6 +9,7 @@ sugar_PYTHON = \
color.py \
ClipboardBubble.py \
entry.py \
filechooser.py \
font.py \
frame.py \
label.py \

View File

@ -0,0 +1,10 @@
import gtk
from sugar.graphics import units
class FileChooserDialog(gtk.FileChooserDialog):
def __init__(self, title=None, parent=None,
action=gtk.FILE_CHOOSER_ACTION_OPEN, buttons=None):
gtk.FileChooserDialog.__init__(self)
self.resize(units.points_to_pixels(7 * 40),
units.points_to_pixels(7 * 30))