hamster-applet r729 - trunk/hamster



Author: tbaugis
Date: Mon Feb 16 10:18:32 2009
New Revision: 729
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=729&view=rev

Log:
do not allow to enter blank activity

Modified:
   trunk/hamster/add_custom_fact.py

Modified: trunk/hamster/add_custom_fact.py
==============================================================================
--- trunk/hamster/add_custom_fact.py	(original)
+++ trunk/hamster/add_custom_fact.py	Mon Feb 16 10:18:32 2009
@@ -63,6 +63,8 @@
         
         # handle the case when we get fact_id - that means edit!
         self.fact_id = fact_id
+        self.get_widget("ok").set_sensitive(False)
+
         if fact_id:
             fact = storage.get_fact(fact_id)
             print fact
@@ -216,6 +218,9 @@
     
     def on_ok_clicked(self, button):
         activity = self.get_widget("activity-list").get_child().get_text()
+        
+        if not activity:
+            return False
 
         # juggle with description - break into parts and then put together
         buf = self.get_widget('description').get_buffer()



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