From fbeaf5fb663b7a23da1cf105a76d346ca66f6843 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 15 Mar 2007 16:10:12 +0000 Subject: Add a filechooser subclass which sizes correctly on the OLPC. This is temporary, gtk needs to be fixed. --- (limited to 'sugar') diff --git a/sugar/graphics/Makefile.am b/sugar/graphics/Makefile.am index 5ddab48..8a077e9 100644 --- a/sugar/graphics/Makefile.am +++ b/sugar/graphics/Makefile.am @@ -9,6 +9,7 @@ sugar_PYTHON = \ color.py \ ClipboardBubble.py \ entry.py \ + filechooser.py \ font.py \ frame.py \ label.py \ diff --git a/sugar/graphics/filechooser.py b/sugar/graphics/filechooser.py new file mode 100644 index 0000000..8ebda65 --- /dev/null +++ b/sugar/graphics/filechooser.py @@ -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)) -- cgit v0.9.1