diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/python2/engine.py | 1 | ||||
-rw-r--r-- | engine/python2/propertyicon.py | 6 | ||||
-rw-r--r-- | engine/python3/engine.py | 1 | ||||
-rw-r--r-- | engine/python3/propertyicon.py | 6 |
4 files changed, 14 insertions, 0 deletions
diff --git a/engine/python2/engine.py b/engine/python2/engine.py index 3339eda..5995375 100644 --- a/engine/python2/engine.py +++ b/engine/python2/engine.py @@ -1104,6 +1104,7 @@ class Engine(IBus.EngineSimple): # It seems do_destroy() is called when launch_engine() is called. #self.__remove_dict_files() # It seems super.destroy() does not unref the engine. + self.__input_mode_icon.clear() self.__input_mode_icon = None def __join_all_segments(self): diff --git a/engine/python2/propertyicon.py b/engine/python2/propertyicon.py index fa5f34f..437e94c 100644 --- a/engine/python2/propertyicon.py +++ b/engine/python2/propertyicon.py @@ -76,6 +76,12 @@ class PropertyIcon(Gtk.StatusIcon): self.__xkb_icon_pixbufs[symbol] = pixbuf return pixbuf + def clear(self): + self.set_from_icon_name('') + self.set_visible(False) + self.__xkb_icon_pixbufs = {} + self.__xkb_icon_rgba = None + def set_from_symbol(self, symbol): pixbuf = self.__create_icon_pixbuf_with_string(symbol) self.set_from_pixbuf(pixbuf) diff --git a/engine/python3/engine.py b/engine/python3/engine.py index ab9e8fa..73de005 100644 --- a/engine/python3/engine.py +++ b/engine/python3/engine.py @@ -1099,6 +1099,7 @@ class Engine(IBus.EngineSimple): # It seems do_destroy() is called when launch_engine() is called. #self.__remove_dict_files() # It seems super.destroy() does not unref the engine. + self.__input_mode_icon.clear() self.__input_mode_icon = None def __join_all_segments(self): diff --git a/engine/python3/propertyicon.py b/engine/python3/propertyicon.py index fa5f34f..437e94c 100644 --- a/engine/python3/propertyicon.py +++ b/engine/python3/propertyicon.py @@ -76,6 +76,12 @@ class PropertyIcon(Gtk.StatusIcon): self.__xkb_icon_pixbufs[symbol] = pixbuf return pixbuf + def clear(self): + self.set_from_icon_name('') + self.set_visible(False) + self.__xkb_icon_pixbufs = {} + self.__xkb_icon_rgba = None + def set_from_symbol(self, symbol): pixbuf = self.__create_icon_pixbuf_with_string(symbol) self.set_from_pixbuf(pixbuf) |