deskbar-applet r2028 - in trunk: . deskbar/ui/preferences



Author: sebp
Date: Thu Mar 20 09:59:24 2008
New Revision: 2028
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2028&view=rev

Log:
Fixed NoneType error in preferences when the module is moved with DnD

Modified:
   trunk/ChangeLog
   trunk/deskbar/ui/preferences/DeskbarPreferences.py

Modified: trunk/deskbar/ui/preferences/DeskbarPreferences.py
==============================================================================
--- trunk/deskbar/ui/preferences/DeskbarPreferences.py	(original)
+++ trunk/deskbar/ui/preferences/DeskbarPreferences.py	Thu Mar 20 09:59:24 2008
@@ -265,9 +265,11 @@
         and set button (in)sensitive
         """
         module = self.moduleview.get_selected_module()
-            
+          
+        # Check if module is not None, because the signal
+        # is emitted when the user moves a module, too  
         # Check if we can update
-        if self.has_capuchin:
+        if module != None and self.has_capuchin:
             self.update.set_sensitive(module.is_updateable())                
     
     def set_buttons(self, selection):



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