[fcitx-configtool] Fix Segenttation Fault on GTK3
Liang Suilong
liangsuilong at fedoraproject.org
Tue May 29 14:23:27 UTC 2012
commit 445d9fc7e4a726b7917079a8ab6d0a1bbb929b28
Author: Fedora <fedora at fedora-desktop.(none)>
Date: Tue May 29 22:17:26 2012 +0800
Fix Segenttation Fault on GTK3
fcitx-configtool.spec | 9 ++++++-
fix_segenttation_fault_on_gtk3.patch | 36 ++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 2 deletions(-)
---
diff --git a/fcitx-configtool.spec b/fcitx-configtool.spec
index c430a5b..c0fcb46 100644
--- a/fcitx-configtool.spec
+++ b/fcitx-configtool.spec
@@ -1,11 +1,12 @@
Name: fcitx-configtool
Version: 0.4.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Gtk configuretool for Fcitx
Group: System Environment/Libraries
License: GPLv2+
URL: http://code.google.com/p/fcitx/
Source0: http://fcitx.googlecode.com/files/%{name}-%{version}.tar.xz
+Patch0: fix_segenttation_fault_on_gtk3.patch
BuildRequires: cmake, fcitx-devel, gettext, intltool, libxml2-devel
BuildRequires: gtk2-devel, iso-codes-devel, libtool, unique-devel
@@ -21,6 +22,7 @@ KDE Version see fcitx-config-kde4 or kcm-fcitx.
%prep
%setup -q -n %{name}-%{version}
+%patch0 -p1
%build
@@ -45,11 +47,14 @@ rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-,root,root,-)
-%doc README COPYING
+%doc
%{_bindir}/*
%changelog
+* Tue May 12 2012 Liang Suilong <liangsuilong at gmail.com> - 0.4.3-2
+- Fix Segenttation Fault on GTK3
+
* Sat May 12 2012 Liang Suilong <liangsuilong at gmail.com> - 0.4.3-1
- Upstream to 0.4.3
diff --git a/fix_segenttation_fault_on_gtk3.patch b/fix_segenttation_fault_on_gtk3.patch
new file mode 100644
index 0000000..2c1b825
--- /dev/null
+++ b/fix_segenttation_fault_on_gtk3.patch
@@ -0,0 +1,36 @@
+diff --git a/gtk3/main_window.c b/gtk3/main_window.c
+index c81dd4d..751710c 100644
+--- a/gtk3/main_window.c
++++ b/gtk3/main_window.c
+@@ -291,6 +291,15 @@ void _fcitx_main_window_add_addon_page(FcitxMainWindow* self)
+ GtkListStore *store;
+ store = gtk_list_store_new(N_COLUMNS, G_TYPE_POINTER);
+
++ for (addon = (FcitxAddon *) utarray_front(self->addons);
++ addon != NULL;
++ addon = (FcitxAddon *) utarray_next(self->addons, addon)) {
++ GtkTreeIter iter;
++ store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(self->addonview)));
++ gtk_list_store_append(store, &iter);
++ gtk_list_store_set(store, &iter, LIST_ADDON, addon, -1);
++ }
++
+ GtkWidget* swin = gtk_scrolled_window_new(NULL, NULL);
+ gtk_box_pack_start(GTK_BOX(vbox), swin, TRUE, TRUE, 0);
+ g_object_set(swin, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
+@@ -325,15 +334,6 @@ void _fcitx_main_window_add_addon_page(FcitxMainWindow* self)
+
+ g_object_unref(store);
+
+- for (addon = (FcitxAddon *) utarray_front(self->addons);
+- addon != NULL;
+- addon = (FcitxAddon *) utarray_next(self->addons, addon)) {
+- GtkTreeIter iter;
+- store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(self->addonview)));
+- gtk_list_store_append(store, &iter);
+- gtk_list_store_set(store, &iter, LIST_ADDON, addon, -1);
+- }
+-
+ GtkWidget* hbuttonbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
+ gtk_box_pack_start(GTK_BOX(vbox), hbuttonbox, FALSE, TRUE, 0);
+
More information about the scm-commits
mailing list