From 51e7ffbcb6622bfa3babc811f0dc86d0b9a493bd Mon Sep 17 00:00:00 2001 From: Ignacio Rodríguez Date: Sat, 07 Dec 2013 15:18:23 +0000 Subject: Add examples icon --- (limited to 'FileDialog.py') 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): -- cgit v0.9.1