fix handling of secondary buttons

epel9
Matthias Clasen 16 years ago
parent a6b00c8468
commit 39e7faeea6

@ -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);
}

@ -5,7 +5,7 @@
Summary: The libglade library for loading user interfaces Summary: The libglade library for loading user interfaces
Name: libglade2 Name: libglade2
Version: 2.6.3 Version: 2.6.3
Release: 2%{?dist} Release: 3%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Libraries Group: System Environment/Libraries
Source: http://download.gnome.org/sources/libglade/2.6/libglade-%{version}.tar.bz2 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 # http://bugzilla.gnome.org/show_bug.cgi?id=121025
Patch1: libglade-2.0.1-nowarning.patch Patch1: libglade-2.0.1-nowarning.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=510736
Patch2: libglade-secondary.patch
%description %description
Libglade is a small library that allows a program to load its user 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} %setup -q -n libglade-%{version}
%patch1 -p1 -b .nowarning %patch1 -p1 -b .nowarning
%patch2 -p1 -b .secondary
%build %build
%configure --disable-gtk-doc %configure --disable-gtk-doc
@ -89,6 +92,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/gtk-doc/html/libglade %{_datadir}/gtk-doc/html/libglade
%changelog %changelog
* Fri Feb 20 2009 Matthias Clasen <mclasen@redhat.com> 2.6.3-3
- Treat help buttons in dialogs properly
* Sun Nov 09 2008 Debarshi Ray <rishi@fedoraproject.org> 2.6.3-2 * Sun Nov 09 2008 Debarshi Ray <rishi@fedoraproject.org> 2.6.3-2
- Create and own %%{_libdir}/libglade and %%{_libdir}/libglade/2.0. - Create and own %%{_libdir}/libglade and %%{_libdir}/libglade/2.0.

Loading…
Cancel
Save