BugFix for 7071154 imf-selector] - imf-selector cannot close when enable/disable input method framework
authormkaz
Thu, 28 Jul 2011 02:03:59 +0900
changeset 700 ba8c8c8eae20
parent 699 4823738194c6
child 701 21c32b071f44
BugFix for 7071154 imf-selector] - imf-selector cannot close when enable/disable input method framework
imf-selector/src/imf-selector
specs/ext-sources/imf-selector-1.0.tar.gz
--- a/imf-selector/src/imf-selector	Sat Jul 16 03:06:06 2011 +0900
+++ b/imf-selector/src/imf-selector	Thu Jul 28 02:03:59 2011 +0900
@@ -205,16 +205,20 @@
         return None
 
     def __apply(self, widget=None, data=None):
-        selection = self.tv.get_selection()
-        iter = selection.get_selected()[1]
-        if((not iter) and self.ENABLE_FLAG):
-            return
-        id = self.__exec_script('-id', self.lst.get_value(iter, 2))
+
         msg = _("Do you update your configuration ?\n"\
                 "This configuration becomes effective "\
                 "from next desktop login.")
-        if(id in self.MSGS and self.ENABLE_FLAG):
-            msg = msg+"\n\n"+self.MSGS[id]
+
+        selection = self.tv.get_selection()
+        iter = selection.get_selected()[1]
+        if(self.ENABLE_FLAG):
+            if(iter):
+                id = self.__exec_script('-id', self.lst.get_value(iter, 2))
+                if(id in self.MSGS):
+                    msg = msg+"\n\n"+self.MSGS[id]
+            else:
+                return
         dlg = gtk.MessageDialog(type = gtk.MESSAGE_INFO,
                     buttons = gtk.BUTTONS_YES_NO,
                     message_format = msg)
Binary file specs/ext-sources/imf-selector-1.0.tar.gz has changed