From 1add7a0ade190e42210803aa03ed44c61b5bf0ca Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 11 Dec 2007 19:02:16 +0000 Subject: [PATCH] fix yet another tab-label related crash --- gtk2.spec | 9 ++++++++- tab-label.patch | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 tab-label.patch diff --git a/gtk2.spec b/gtk2.spec index 8c71bb1..e7fd3d8 100644 --- a/gtk2.spec +++ b/gtk2.spec @@ -16,7 +16,7 @@ Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X Name: gtk2 Version: %{base_version} -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://download.gnome.org/sources/gtk+/2.12/gtk+-%{version}.tar.bz2 @@ -34,6 +34,9 @@ Patch2: workaround.patch # http://bugzilla.gnome.org/show_bug.cgi?id=488119 Patch3: system-log-crash.patch +# fixed in upstream svn +Patch4: tab-label.patch + BuildRequires: atk-devel >= %{atk_version} BuildRequires: pango-devel >= %{pango_version} BuildRequires: glib2-devel >= %{glib2_version} @@ -111,6 +114,7 @@ docs for the GTK+ widget toolkit. %patch1 -p1 -b .set-invisible-char-to-bullet %patch2 -p1 -b .workaround %patch3 -p1 -b .system-log-crash +%patch4 -p1 -b .tab-label for i in config.guess config.sub ; do test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i . @@ -294,6 +298,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/gtk-2.0 %changelog +* Tue Dec 11 2007 Matthias Clasen - 2.12.3-2 +- Fix yet another notebook tab related crash + * Wed Dec 5 2007 Matthias Clasen - 2.12.3-1 - Update to 2.12.3 diff --git a/tab-label.patch b/tab-label.patch new file mode 100644 index 0000000..c772c12 --- /dev/null +++ b/tab-label.patch @@ -0,0 +1,25 @@ +diff -up gtk+-2.12.3/gtk/gtknotebook.c.tab-label gtk+-2.12.3/gtk/gtknotebook.c +--- gtk+-2.12.3/gtk/gtknotebook.c.tab-label 2007-12-11 14:00:13.000000000 -0500 ++++ gtk+-2.12.3/gtk/gtknotebook.c 2007-12-11 14:00:34.000000000 -0500 +@@ -4349,12 +4349,15 @@ gtk_notebook_real_remove (GtkNotebook *n + gtk_widget_unparent (page->child); + + tab_label = page->tab_label; +- g_object_ref (tab_label); +- gtk_notebook_remove_tab_label (notebook, page); +- if (destroying) +- gtk_widget_destroy (tab_label); +- g_object_unref (tab_label); +- ++ if (tab_label) ++ { ++ g_object_ref (tab_label); ++ gtk_notebook_remove_tab_label (notebook, page); ++ if (destroying) ++ gtk_widget_destroy (tab_label); ++ g_object_unref (tab_label); ++ } ++ + if (notebook->menu) + { + gtk_container_remove (GTK_CONTAINER (notebook->menu),