gcompris r3749 - in trunk: . src/boards/python/admin



Author: bcoudoin
Date: Sat Feb 28 22:44:43 2009
New Revision: 3749
URL: http://svn.gnome.org/viewvc/gcompris?rev=3749&view=rev

Log:
	- Patch from Johan Cwiklinski <mailings x-tnd.be>
	  to support python 2.6



Modified:
   trunk/ChangeLog
   trunk/src/boards/python/admin/class_edit.py
   trunk/src/boards/python/admin/group_edit.py
   trunk/src/boards/python/admin/profile_edit.py

Modified: trunk/src/boards/python/admin/class_edit.py
==============================================================================
--- trunk/src/boards/python/admin/class_edit.py	(original)
+++ trunk/src/boards/python/admin/class_edit.py	Sat Feb 28 22:44:43 2009
@@ -223,10 +223,10 @@
     # If class_id is provided, only users in this class are inserted
     # If with = True, create a list only with the given class_id.
     #           False, create a list only without the given class_id
-    def __create_model(self, with, class_id):
+    def __create_model(self, _with, class_id):
 
         # Grab the user data
-        if(with):
+        if(_with):
             self.cur.execute('SELECT user_id,firstname,lastname FROM users where class_id=? ORDER BY login', (class_id,))
         else:
             self.cur.execute('SELECT user_id,firstname,lastname FROM users WHERE class_id!=? ORDER BY login', (class_id,))

Modified: trunk/src/boards/python/admin/group_edit.py
==============================================================================
--- trunk/src/boards/python/admin/group_edit.py	(original)
+++ trunk/src/boards/python/admin/group_edit.py	Sat Feb 28 22:44:43 2009
@@ -228,7 +228,7 @@
     # group_id: only users in this group are inserted
     # If with = True,  create a list only with user in the given class_id and group_id.
     #           False, create a list only with user in the given class_id but NOT this group_id
-    def __create_model(self, with, class_id, group_id):
+    def __create_model(self, _with, class_id, group_id):
 
         model = gtk.ListStore(
             gobject.TYPE_INT,
@@ -247,9 +247,9 @@
                              (group_id, user[0]))
             user_is_already = self.cur.fetchall()
 
-            if(with and user_is_already):
+            if(_with and user_is_already):
                 self.add_user_in_model(model, user)
-            elif(not with and not user_is_already):
+            elif(not _with and not user_is_already):
                 self.add_user_in_model(model, user)
 
 

Modified: trunk/src/boards/python/admin/profile_edit.py
==============================================================================
--- trunk/src/boards/python/admin/profile_edit.py	(original)
+++ trunk/src/boards/python/admin/profile_edit.py	Sat Feb 28 22:44:43 2009
@@ -223,7 +223,7 @@
     # profile_id: only groups in this profile are inserted
     # If with = True,  create a list only with groups in the given profile_id
     #           False, create a list only with groups NOT this profile_id
-    def __create_model(self, with, profile_id):
+    def __create_model(self, _with, profile_id):
 
         model = gtk.ListStore(
             gobject.TYPE_INT,
@@ -252,9 +252,9 @@
             # Insert the class name in the group
             group = (group[0], class_name, group[1], group[2])
 
-            if(with and group_is_already):
+            if(_with and group_is_already):
                 self.add_group_in_model(model, group)
-            elif(not with and not group_is_already):
+            elif(not _with and not group_is_already):
                 self.add_group_in_model(model, group)
 
         return model



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]