diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-03-15 16:10:12 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-03-15 16:10:12 (GMT) |
commit | fbeaf5fb663b7a23da1cf105a76d346ca66f6843 (patch) | |
tree | fcab50d272be989c730a36d6a301f2b55cc92fae | |
parent | 4fbfd1625ca371137a75d3be587214625e2368db (diff) |
Add a filechooser subclass which sizes correctly on the OLPC.
This is temporary, gtk needs to be fixed.
-rw-r--r-- | sugar/graphics/Makefile.am | 1 | ||||
-rw-r--r-- | sugar/graphics/filechooser.py | 10 |
2 files changed, 11 insertions, 0 deletions
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)) |