From: Peng Huang Date: Thu, 7 Jan 2010 05:02:44 +0000 (+0800) Subject: Only install signal handler for NORMAL, RADIO and TOGGLE X-Git-Tag: 1.2.0.20100111~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=363e7f76183473943199575db128deaa12936a20;p=platform%2Fupstream%2Fibus.git Only install signal handler for NORMAL, RADIO and TOGGLE --- diff --git a/ui/gtk/menu.py b/ui/gtk/menu.py index 3c789717..f4a5b53d 100644 --- a/ui/gtk/menu.py +++ b/ui/gtk/menu.py @@ -79,11 +79,14 @@ class Menu(gtk.Menu, PropItem): item.set_no_show_all(True) item.hide() - item.connect("property-activate", lambda w,n,s: self.emit("property-activate", n, s)) - self.append(item) self._sub_items.append(item) + if prop.type not in (ibus.PROP_TYPE_NORMAL, ibus.PROP_TYPE_TOGGLE, ibus.PROP_TYPE_RADIO): + continue + item.connect("property-activate", + lambda w,n,s: self.emit("property-activate", n, s)) + def popup(self, button, active_time, widget): gtk.Menu.popup(self, None, None, menu_position, button, active_time, widget)