From 51673816f263aa641d8621779d03799709c4df89 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Mon, 21 Apr 2014 17:23:28 +0900 Subject: [PATCH] Updated ibus-anthy-HEAD.patch to unref pixbuf on destroy. --- ibus-anthy-HEAD.patch | 73 +++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 5 ++- 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index c12862d..9f66c40 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -2408,3 +2408,76 @@ index dc5e7e1..edd6cfa 100644 -- 1.8.0 +From c13d52a823ee2b084e57bde3859ead64f94bd437 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Mon, 21 Apr 2014 17:05:19 +0900 +Subject: [PATCH] Fix to unref pixbuf when propery icon is unrefed. + +--- + engine/python2/engine.py | 1 + + engine/python2/propertyicon.py | 6 ++++++ + engine/python3/engine.py | 1 + + engine/python3/propertyicon.py | 6 ++++++ + 4 files changed, 14 insertions(+) + +diff --git a/engine/python2/engine.py b/engine/python2/engine.py +index c7a6fb3..68a4b48 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 6563087..67370d8 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) +-- +1.8.5.3 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 2ad29d4..e398500 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -14,7 +14,7 @@ Name: ibus-anthy Version: 1.5.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ Group: System Environment/Libraries @@ -157,6 +157,9 @@ touch --no-create %{_datadir}/icons/hicolor || : %{_libdir}/libanthygobject-%{sub_version}.so %changelog +* Mon Apr 21 2014 Takao Fujiwara - 1.5.5-3 +- Updated ibus-anthy-HEAD.patch to unref pixbuf on destroy. + * Thu Feb 27 2014 Takao Fujiwara - 1.5.5-2 - Updated ibus-anthy-HEAD.patch to enable property icon.