From 5e99cbb157734309171858d07ebcdcd3768e8880 Mon Sep 17 00:00:00 2001 From: iovar Date: Sat, 12 Jul 2008 17:45:50 +0000 Subject: patch by freedo, to Replace GtkFileSelection with GtkFileChooserDialog git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@498 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- gtk-recordmydesktop/src/rmdSimple.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gtk-recordmydesktop/src/rmdSimple.py') diff --git a/gtk-recordmydesktop/src/rmdSimple.py b/gtk-recordmydesktop/src/rmdSimple.py index ffaf5da..1cdf17d 100644 --- a/gtk-recordmydesktop/src/rmdSimple.py +++ b/gtk-recordmydesktop/src/rmdSimple.py @@ -204,14 +204,18 @@ class simpleWidget(object): def __fileSelOk__(self,Event=None): self.values[4]=self.fileSel.get_filename() #self.pathEntry.set_text(self.fileSel.get_filename()) - self.fileSel.destroy() def __fileSelect__(self,Event=None): - self.fileSel = gtk.FileSelection(title=None) - self.fileSel.ok_button.connect("clicked", self.__fileSelOk__) - self.fileSel.cancel_button.connect("clicked", self.__fileSelQuit__) + self.fileSel = gtk.FileChooserDialog(title=None, + action=gtk.FILE_CHOOSER_ACTION_SAVE, + buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL, + gtk.STOCK_SAVE,gtk.RESPONSE_OK)) self.fileSel.set_filename(self.values[4]) self.fileSel.show() + if self.fileSel.run() == gtk.RESPONSE_OK: + self.__fileSelOk__() + self.__fileSelQuit__() + def __select_window__(self,button): xwininfo_com=['xwininfo','-frame'] if self.values[21]==1: -- cgit v1.2.3