diff options
Diffstat (limited to 'FileDialog.py')
-rw-r--r-- | FileDialog.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FileDialog.py b/FileDialog.py index 93457a8..ea6da02 100644 --- a/FileDialog.py +++ b/FileDialog.py @@ -15,12 +15,13 @@ class FileDialog(Gtk.Dialog): path = dialog.get_path() """ - def __init__(self, dirs, window=None): + def __init__(self, dirs, window=None, button=None): Gtk.Dialog.__init__(self, flags=Gtk.DialogFlags.DESTROY_WITH_PARENT) self.example_path = None self.expanders = [] self.dirs = dirs + self.button = button x, y = (Gdk.Screen.width() / 1.5, Gdk.Screen.height() / 1.5) self.set_size_request(x, y) @@ -51,6 +52,9 @@ class FileDialog(Gtk.Dialog): if sample: self.example_path = widget.get_tooltip_text() + if self.button: + self.button.set_icon_name("pippy-openoff") + self.destroy() def build_toolbar(self): |