[d-feet] Don't close dialog after method execution
- From: Thomas Bechtold <toabctl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [d-feet] Don't close dialog after method execution
- Date: Sat, 12 Jan 2013 08:58:29 +0000 (UTC)
commit d48687d41410be2fba2150b02ad66b3b5988e9c7
Author: Thomas Bechtold <thomasbechtold jpberlin de>
Date: Sat Jan 12 09:45:41 2013 +0100
Don't close dialog after method execution
The problem was introduced with
4b42bcaae5d2f6dffc385a5f879cdbf413dcb8a1
dfeet/_ui/executemethoddialog.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/dfeet/_ui/executemethoddialog.py b/dfeet/_ui/executemethoddialog.py
index 8e90f45..451d327 100644
--- a/dfeet/_ui/executemethoddialog.py
+++ b/dfeet/_ui/executemethoddialog.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import time
from pprint import pformat
-from gi.repository import GLib, Gio
+from gi.repository import GLib, Gio, Gtk
from dfeet._ui.uiloader import UILoader
@@ -32,7 +32,6 @@ class ExecuteMethodDialog:
self.label_min = ui.get_widget('label_min')
self.label_max = ui.get_widget('label_max')
ui.connect_signals(signal_dict)
-
self.label_method_name.set_markup("%s" % (self.method_obj.markup_str))
self.label_object_path.set_markup("%s" % (self.method_obj.object_path))
self.label_interface.set_markup("%s" % (self.method_obj.iface_info.name))
@@ -113,8 +112,9 @@ class ExecuteMethodDialog:
self.prettyprint_textview.get_buffer().set_text(pformat(str(e)))
def run(self):
- self.dialog.run()
- self.dialog.destroy()
+ response =self.dialog.run()
+ if response == Gtk.ResponseType.DELETE_EVENT or response == Gtk.ResponseType.CLOSE:
+ self.dialog.destroy()
def close_cb(self, widget):
self.dialog.destroy()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]