fix sporadic panel crashes
This commit is contained in:
parent
c55fd8ea94
commit
37b8c537a3
@ -16,7 +16,7 @@
|
||||
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
|
||||
Name: gtk2
|
||||
Version: %{base_version}
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
Source: http://download.gnome.org/sources/gtk+/2.13/gtk+-%{version}.tar.bz2
|
||||
@ -34,6 +34,8 @@ Patch2: workaround.patch
|
||||
Patch3: menu-breakage.patch
|
||||
# from upstream svn
|
||||
Patch4: evo-composer.patch
|
||||
# from upstream svn
|
||||
Patch5: panel-crash.patch
|
||||
|
||||
BuildRequires: atk-devel >= %{atk_version}
|
||||
BuildRequires: pango-devel >= %{pango_version}
|
||||
@ -121,6 +123,7 @@ docs for the GTK+ widget toolkit.
|
||||
%patch2 -p1 -b .workaround
|
||||
%patch3 -p1 -b .menu-breakage
|
||||
%patch4 -p1 -b .evo-composer
|
||||
%patch5 -p1 -b .panel-crash
|
||||
|
||||
for i in config.guess config.sub ; do
|
||||
test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i .
|
||||
@ -304,6 +307,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/gtk-2.0
|
||||
|
||||
%changelog
|
||||
* Wed Aug 13 2008 Matthias Clasen <mclasen@redhat.com> - 2.13.6-4
|
||||
- Fix sporadic panel crashes
|
||||
|
||||
* Mon Aug 11 2008 Matthias Clasen <mclasen@redhat.com> - 2.13.6-3
|
||||
- Fix evolution composer breakage
|
||||
|
||||
|
103
panel-crash.patch
Normal file
103
panel-crash.patch
Normal file
@ -0,0 +1,103 @@
|
||||
diff -up gtk+-2.13.6/gtk/gtkimagemenuitem.c.panel-crash gtk+-2.13.6/gtk/gtkimagemenuitem.c
|
||||
--- gtk+-2.13.6/gtk/gtkimagemenuitem.c.panel-crash 2008-08-13 00:53:00.000000000 -0400
|
||||
+++ gtk+-2.13.6/gtk/gtkimagemenuitem.c 2008-08-13 00:53:10.000000000 -0400
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
+static void gtk_image_menu_item_destroy (GtkObject *object);
|
||||
static void gtk_image_menu_item_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_image_menu_item_size_allocate (GtkWidget *widget,
|
||||
@@ -73,16 +74,14 @@ G_DEFINE_TYPE (GtkImageMenuItem, gtk_ima
|
||||
static void
|
||||
gtk_image_menu_item_class_init (GtkImageMenuItemClass *klass)
|
||||
{
|
||||
- GObjectClass *gobject_class;
|
||||
- GtkWidgetClass *widget_class;
|
||||
- GtkMenuItemClass *menu_item_class;
|
||||
- GtkContainerClass *container_class;
|
||||
-
|
||||
- gobject_class = (GObjectClass*) klass;
|
||||
- widget_class = (GtkWidgetClass*) klass;
|
||||
- menu_item_class = (GtkMenuItemClass*) klass;
|
||||
- container_class = (GtkContainerClass*) klass;
|
||||
-
|
||||
+ GObjectClass *gobject_class = (GObjectClass*) klass;
|
||||
+ GtkObjectClass *object_class = (GtkObjectClass*) klass;
|
||||
+ GtkWidgetClass *widget_class = (GtkWidgetClass*) klass;
|
||||
+ GtkMenuItemClass *menu_item_class = (GtkMenuItemClass*) klass;
|
||||
+ GtkContainerClass *container_class = (GtkContainerClass*) klass;
|
||||
+
|
||||
+ object_class->destroy = gtk_image_menu_item_destroy;
|
||||
+
|
||||
widget_class->screen_changed = gtk_image_menu_item_screen_changed;
|
||||
widget_class->size_request = gtk_image_menu_item_size_request;
|
||||
widget_class->size_allocate = gtk_image_menu_item_size_allocate;
|
||||
@@ -173,6 +172,18 @@ show_image (GtkImageMenuItem *image_menu
|
||||
}
|
||||
|
||||
static void
|
||||
+gtk_image_menu_item_destroy (GtkObject *object)
|
||||
+{
|
||||
+ GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (object);
|
||||
+
|
||||
+ if (image_menu_item->image)
|
||||
+ gtk_container_remove (GTK_CONTAINER (image_menu_item),
|
||||
+ image_menu_item->image);
|
||||
+
|
||||
+ GTK_OBJECT_CLASS (gtk_image_menu_item_parent_class)->destroy (object);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
gtk_image_menu_item_toggle_size_request (GtkMenuItem *menu_item,
|
||||
gint *requisition)
|
||||
{
|
||||
@@ -239,8 +250,8 @@ gtk_image_menu_item_size_request (GtkWid
|
||||
child_width = child_requisition.width;
|
||||
child_height = child_requisition.height;
|
||||
}
|
||||
-
|
||||
- (* GTK_WIDGET_CLASS (gtk_image_menu_item_parent_class)->size_request) (widget, requisition);
|
||||
+
|
||||
+ GTK_WIDGET_CLASS (gtk_image_menu_item_parent_class)->size_request (widget, requisition);
|
||||
|
||||
/* not done with height since that happens via the
|
||||
* toggle_size_request
|
||||
@@ -270,8 +281,8 @@ gtk_image_menu_item_size_allocate (GtkWi
|
||||
pack_dir = GTK_PACK_DIRECTION_LTR;
|
||||
|
||||
image_menu_item = GTK_IMAGE_MENU_ITEM (widget);
|
||||
-
|
||||
- (* GTK_WIDGET_CLASS (gtk_image_menu_item_parent_class)->size_allocate) (widget, allocation);
|
||||
+
|
||||
+ GTK_WIDGET_CLASS (gtk_image_menu_item_parent_class)->size_allocate (widget, allocation);
|
||||
|
||||
if (image_menu_item->image && show_image (image_menu_item))
|
||||
{
|
||||
@@ -346,11 +357,11 @@ gtk_image_menu_item_forall (GtkContainer
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (container);
|
||||
-
|
||||
- (* GTK_CONTAINER_CLASS (gtk_image_menu_item_parent_class)->forall) (container,
|
||||
- include_internals,
|
||||
- callback,
|
||||
- callback_data);
|
||||
+
|
||||
+ GTK_CONTAINER_CLASS (gtk_image_menu_item_parent_class)->forall (container,
|
||||
+ include_internals,
|
||||
+ callback,
|
||||
+ callback_data);
|
||||
|
||||
if (include_internals && image_menu_item->image)
|
||||
(* callback) (image_menu_item->image, callback_data);
|
||||
@@ -555,7 +566,7 @@ gtk_image_menu_item_remove (GtkContainer
|
||||
}
|
||||
else
|
||||
{
|
||||
- (* GTK_CONTAINER_CLASS (gtk_image_menu_item_parent_class)->remove) (container, child);
|
||||
+ GTK_CONTAINER_CLASS (gtk_image_menu_item_parent_class)->remove (container, child);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user