[Mumps2Py:] [180] more UI tweaking.

[ Thread Index | Date Index | More lists.mumps2py.org/discuss Archives ]


Revision: 180
Author:   pgallot
Date:     2008-03-18 05:35:06 +0100 (Tue, 18 Mar 2008)

Log Message:
-----------
more UI tweaking.

Modified Paths:
--------------
    trunk/mumps2py_ui.pyw


Modified: trunk/mumps2py_ui.pyw
===================================================================
--- trunk/mumps2py_ui.pyw	2008-03-18 01:40:19 UTC (rev 179)
+++ trunk/mumps2py_ui.pyw	2008-03-18 04:35:06 UTC (rev 180)
@@ -101,14 +101,14 @@
     def busy(self, busy_state = True):
         """ sets a wait cursor """
         if busy_state:
-            busy = "watch"
+            busy_cursor = "watch"
         else:
-            busy = ""
+            busy_cursor = ""
 
         child_list = [self.root, ]
         for child_widget in child_list:
             child_list.extend(child_widget.winfo_children())
-            child_widget.config(cursor = busy)
+            child_widget.config(cursor = busy_cursor)
         self.root.update_idletasks()
 
 
@@ -135,7 +135,11 @@
                        ("Enter the name of the module at which to stop:", 32, \
                         self.parseuntilmodule) \
                        }
+        self.filetypes = [ ("m2p files","*.m2p"), ("MUMPS files", "*.mps"),
+                          ("Mumps Routines as Text", "*.mrt"),
+                          ("RSA files","*.rsa"), ("RTN files","*.rtn")]
 
+
     def popup_query(self, key):
         """pops up a pre-defined query for a value to launch a function with"""
         msg, entry_width, callback = self.query[key]
@@ -649,9 +653,7 @@
         """ open a file of Mumps code"""
         mumps_file = tkFileDialog.askopenfilename(\
             parent = self.root,
-            filetypes = [ ("m2p files","*.m2p"), ("MUMPS files", "*.mps"),
-                          ("Mumps Routines as Text", "*.mrt"),
-                          ("RSA files","*.rsa"), ("RTN files","*.rtn")], 
+            filetypes = self.filetypes,
             initialdir = "./testfiles")
             #initialfile = "VistA.m2p")
         m2py_dir = "./out"
@@ -703,7 +705,7 @@
         input_fname = tkFileDialog.askopenfilename(\
             parent = self.root,
             title = dlg_title,
-            filetypes = [ ("RSA files","*.rsa"), ("RTN files","*.rtn")],
+            filetypes = self.filetypes[1:],
             initialdir = os.path.abspath(base_fname),
             initialfile = os.path.basename(base_fname))
         
@@ -871,7 +873,6 @@
             after_frame.pack(anchor = NE, side = RIGHT, expand = YES)
             self.after_window = window2
 
-
 UI = Mumps2pyUI(ROOT)
 UI.make_dialog()
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/