From 9e7372461a9b6282b4af3b98b7e45f9c68a47c7f Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 9 Sep 2016 19:14:36 +0900 Subject: [PATCH] Updated translations. Fixed radio button on PropertyPanel. --- ibus-HEAD.patch | 113 ++++++++++++++++++++++++++++++++++++++++++++++++ ibus.spec | 11 ++++- 2 files changed, 123 insertions(+), 1 deletion(-) diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch index e69de29..ed0dafa 100644 --- a/ibus-HEAD.patch +++ b/ibus-HEAD.patch @@ -0,0 +1,113 @@ +From 997e5cb1b100c6af267b8121445db1db7e580d5f Mon Sep 17 00:00:00 2001 +From: "Eric R. Schulz" +Date: Thu, 18 Aug 2016 11:17:11 +0900 +Subject: [PATCH 1/3] Fix GVariant leaks + +The expectation is that g_dbus_message_set_body() takes ownership of the +GVariant, but this does not happen if the BusInputContext connection is NULL. +Call g_variant_unref() in that case to free the memory. Alternatively, a +GVariantBuilder could be used. + +BUG=https://github.com/ibus/ibus/pull/1872 +R=Shawn.P.Huang@gmail.com + +Review URL: https://codereview.appspot.com/307050043 + +Patch from Eric R. Schulz . +--- + bus/inputcontext.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/bus/inputcontext.c b/bus/inputcontext.c +index 6c82e20..0612fac 100644 +--- a/bus/inputcontext.c ++++ b/bus/inputcontext.c +@@ -673,8 +673,10 @@ bus_input_context_send_signal (BusInputContext *context, + GVariant *parameters, + GError **error) + { +- if (context->connection == NULL) ++ if (context->connection == NULL) { ++ g_variant_unref (parameters); + return TRUE; ++ } + + GDBusMessage *message = g_dbus_message_new_signal (ibus_service_get_object_path ((IBusService *)context), + interface_name, +@@ -704,8 +706,10 @@ bus_input_context_emit_signal (BusInputContext *context, + GVariant *parameters, + GError **error) + { +- if (context->connection == NULL) ++ if (context->connection == NULL) { ++ g_variant_unref (parameters); + return TRUE; ++ } + + return bus_input_context_send_signal (context, + "org.freedesktop.IBus.InputContext", +-- +2.7.4 + +From ceb6a9b47deaa898d8151606831669a7446ad382 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 6 Sep 2016 13:05:35 +0900 +Subject: [PATCH 2/3] ui/gtk3: Fix radio buttons on Property Panel + +Use gtk_container_remove() instead g_object_unref() because +if an widget has a parent, it's not destroyed and the signal is not +sent to the parent since the parent was destroyed. + +R=shawn.p.huang@gmail.com + +Review URL: https://codereview.appspot.com/302650043 +--- + ui/gtk3/propertypanel.vala | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/ui/gtk3/propertypanel.vala b/ui/gtk3/propertypanel.vala +index 6d5fd81..ea960b8 100644 +--- a/ui/gtk3/propertypanel.vala ++++ b/ui/gtk3/propertypanel.vala +@@ -2,9 +2,9 @@ + * + * ibus - The Input Bus + * +- * Copyright(c) 2013-2015 Red Hat, Inc. ++ * Copyright(c) 2013-2016 Red Hat, Inc. + * Copyright(c) 2013-2015 Peng Huang +- * Copyright(c) 2013-2015 Takao Fujiwara ++ * Copyright(c) 2013-2016 Takao Fujiwara + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -85,7 +85,7 @@ public class PropertyPanel : Gtk.Box { + debug("set_properties()\n"); + + foreach (var item in m_items) +- (item as Gtk.Widget).destroy(); ++ remove((item as Gtk.Widget)); + m_items = {}; + + m_props = props; +@@ -481,6 +481,8 @@ public class PropMenu : Gtk.Menu, IPropToolItem { + + public override void destroy() { + m_parent_button = null; ++ foreach (var item in m_items) ++ remove((item as Gtk.Widget)); + m_items = {}; + base.destroy(); + } +@@ -739,7 +741,7 @@ public class PropMenuToolButton : PropToggleToolButton, IPropToolItem { + m_menu = new PropMenu(prop); + m_menu.deactivate.connect((m) => + set_active(false)); +- m_menu.property_activate.connect((w, k, s) => ++ m_menu.property_activate.connect((k, s) => + property_activate(k, s)); + + base.set_property(prop); +-- +2.7.4 + diff --git a/ibus.spec b/ibus.spec index 8bc4fce..cf85fd4 100644 --- a/ibus.spec +++ b/ibus.spec @@ -28,7 +28,7 @@ Name: ibus Version: 1.5.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Intelligent Input Bus for Linux OS License: LGPLv2+ Group: System Environment/Libraries @@ -36,8 +36,10 @@ URL: https://github.com/ibus/ibus/wiki Source0: https://github.com/ibus/ibus/releases/download/%{version}/%{name}-%{version}.tar.gz Source1: %{name}-xinput Source2: %{name}.conf.5 +Source3: https://fujiwara.fedorapeople.org/ibus/po/%{name}-po-1.5.14-20160909.tar.gz # Upstreamed patches. # Patch0: %%{name}-HEAD.patch +Patch0: %{name}-HEAD.patch BuildRequires: gettext-devel BuildRequires: libtool @@ -228,6 +230,8 @@ The ibus-devel-docs package contains developer documentation for IBus %setup -q # %%patch0 -p1 # cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c || +%patch0 -p1 +zcat %SOURCE3 | tar xfv - %build #autoreconf -f -i -v @@ -253,6 +257,7 @@ The ibus-devel-docs package contains developer documentation for IBus %endif %{nil} +make -C ui/gtk3 maintainer-clean-generic make %{?_smp_mflags} %install @@ -419,6 +424,10 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &> /dev/null || : %{_datadir}/gtk-doc/html/* %changelog +* Fri Sep 09 2016 Takao Fujiwara - 1.5.14-2 +- Fixed radio button on PropertyPanel. +- Updated translations. + * Fri Aug 05 2016 Takao Fujiwara - 1.5.14-1 - Bump to 1.5.14