Updated ibus-anthy-HEAD.patch to unref pixbuf on destroy.

This commit is contained in:
Takao Fujiwara 2014-04-21 17:23:28 +09:00
parent 1f83a3f519
commit 51673816f2
2 changed files with 77 additions and 1 deletions

View File

@ -2408,3 +2408,76 @@ index dc5e7e1..edd6cfa 100644
-- --
1.8.0 1.8.0
From c13d52a823ee2b084e57bde3859ead64f94bd437 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
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

View File

@ -14,7 +14,7 @@
Name: ibus-anthy Name: ibus-anthy
Version: 1.5.5 Version: 1.5.5
Release: 2%{?dist} Release: 3%{?dist}
Summary: The Anthy engine for IBus input platform Summary: The Anthy engine for IBus input platform
License: GPLv2+ License: GPLv2+
Group: System Environment/Libraries Group: System Environment/Libraries
@ -157,6 +157,9 @@ touch --no-create %{_datadir}/icons/hicolor || :
%{_libdir}/libanthygobject-%{sub_version}.so %{_libdir}/libanthygobject-%{sub_version}.so
%changelog %changelog
* Mon Apr 21 2014 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.5-3
- Updated ibus-anthy-HEAD.patch to unref pixbuf on destroy.
* Thu Feb 27 2014 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.5-2 * Thu Feb 27 2014 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.5-2
- Updated ibus-anthy-HEAD.patch to enable property icon. - Updated ibus-anthy-HEAD.patch to enable property icon.