From 39e7faeea6a04ac9abea9d7078a1bc813eedc9d5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Feb 20 2009 05:25:03 +0000 Subject: fix handling of secondary buttons --- diff --git a/libglade-secondary.patch b/libglade-secondary.patch new file mode 100644 index 0000000..04f1b6e --- /dev/null +++ b/libglade-secondary.patch @@ -0,0 +1,39 @@ +diff -up libglade-2.6.3/glade/glade-gtk.c.secondary libglade-2.6.3/glade/glade-gtk.c +--- libglade-2.6.3/glade/glade-gtk.c.secondary 2009-02-20 00:21:52.433916022 -0500 ++++ libglade-2.6.3/glade/glade-gtk.c 2009-02-20 00:22:02.065954023 -0500 +@@ -544,7 +544,7 @@ gtk_dialog_build_children(GladeXML *self + + { + GtkDialog *dialog = GTK_DIALOG (w); +- GList *children, *list; ++ GList *children, *list, *secondary; + + glade_standard_build_children (self, w, info); + +@@ -553,10 +553,13 @@ gtk_dialog_build_children(GladeXML *self + + /* repack children of action_area */ + children = gtk_container_get_children(GTK_CONTAINER(dialog->action_area)); ++ secondary = NULL; + for (list = children; list; list = list->next) { + GtkWidget *child = GTK_WIDGET(list->data); + + g_object_ref(child); ++ if (gtk_button_box_get_child_secondary (GTK_BUTTON_BOX (dialog->action_area), child)) ++ secondary = g_list_prepend (secondary, child); + gtk_container_remove (GTK_CONTAINER (dialog->action_area), child); + } + for (list = children; list; list = list->next) { +@@ -569,7 +572,12 @@ gtk_dialog_build_children(GladeXML *self + g_object_unref(child); + + } ++ for (list = secondary; list; list = list->next) { ++ GtkWidget *child = GTK_WIDGET(list->data); ++ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (dialog->action_area), child, TRUE); ++ } + g_list_free (children); ++ g_list_free (secondary); + } + + diff --git a/libglade2.spec b/libglade2.spec index 0472108..010bcde 100644 --- a/libglade2.spec +++ b/libglade2.spec @@ -5,7 +5,7 @@ Summary: The libglade library for loading user interfaces Name: libglade2 Version: 2.6.3 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://download.gnome.org/sources/libglade/2.6/libglade-%{version}.tar.bz2 @@ -22,6 +22,8 @@ BuildRequires: gettext-devel # http://bugzilla.gnome.org/show_bug.cgi?id=121025 Patch1: libglade-2.0.1-nowarning.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=510736 +Patch2: libglade-secondary.patch %description Libglade is a small library that allows a program to load its user @@ -52,6 +54,7 @@ that you can use to develop libglade applications. %setup -q -n libglade-%{version} %patch1 -p1 -b .nowarning +%patch2 -p1 -b .secondary %build %configure --disable-gtk-doc @@ -89,6 +92,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/gtk-doc/html/libglade %changelog +* Fri Feb 20 2009 Matthias Clasen 2.6.3-3 +- Treat help buttons in dialogs properly + * Sun Nov 09 2008 Debarshi Ray 2.6.3-2 - Create and own %%{_libdir}/libglade and %%{_libdir}/libglade/2.0.