[Python-checkins] r64575 - sandbox/trunk/ttk-gsoc/samples/theming.py

guilherme.polo python-checkins at python.org
Sat Jun 28 19:08:34 CEST 2008


Author: guilherme.polo
Date: Sat Jun 28 19:08:25 2008
New Revision: 64575

Log:
A new element was being added to the elements list even if it couldn't be
created, fixed now.

Increased a bit more the ToDo list;


Modified:
   sandbox/trunk/ttk-gsoc/samples/theming.py

Modified: sandbox/trunk/ttk-gsoc/samples/theming.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/samples/theming.py	(original)
+++ sandbox/trunk/ttk-gsoc/samples/theming.py	Sat Jun 28 19:08:25 2008
@@ -7,6 +7,8 @@
 
 # ToDO: Add a way to remove options.
 #       Add a way to edit images/elements.
+#       Add sublayouts.
+#       Add pre-defined elements for the current theme.
 #       Handling element options.
 #       ...
 
@@ -546,10 +548,10 @@
                 showwarning("Element couldn't be created",
                     "The specified element couldn'be created, reason: "
                     "\n%s" % err, parent=self.master)
-
-            # add it to the list
-            self._elems.set(name)
-            self._elems['values'] = (self._elems['values'] or ()) + (name, )
+            else:
+                # add it to the list
+                self._elems.set(name)
+                self._elems['values'] = (self._elems['values'] or ()) + (name, )
 
     def _ask_new_image(self):
         """Add a new image to the image combobox. This image can be used


More information about the Python-checkins mailing list