hamster-applet r730 - branches/gnome-2-26/hamster



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

Log:
do not allow to enter blank activity

Modified:
   branches/gnome-2-26/hamster/add_custom_fact.py

Modified: branches/gnome-2-26/hamster/add_custom_fact.py
==============================================================================
--- branches/gnome-2-26/hamster/add_custom_fact.py	(original)
+++ branches/gnome-2-26/hamster/add_custom_fact.py	Mon Feb 16 10:18:52 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]