From dfc76f0b8dc3e9683acf8c192a5e037ea43c633c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Jul 16 2009 03:29:54 +0000 Subject: Deal with some stubborn button images. --- diff --git a/button-images.patch b/button-images.patch new file mode 100644 index 0000000..79ef833 --- /dev/null +++ b/button-images.patch @@ -0,0 +1,29 @@ +--- gucharmap-2.26.3.1/gucharmap/gucharmap-search-dialog.c 2009-06-29 09:06:14.000000000 -0400 ++++ hacked/gucharmap/gucharmap-search-dialog.c 2009-07-15 23:16:51.587067979 -0400 +@@ -711,22 +711,12 @@ + gchar *stock_id, + gchar *mnemonic) + { +- GtkWidget *hbox, *image, *label, *align; +- +- align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); +- gtk_container_add (GTK_CONTAINER (button), align); +- +- hbox = gtk_hbox_new (FALSE, 2); +- gtk_container_add (GTK_CONTAINER (align), hbox); ++ GtkWidget *image; + + image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON); +- gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); +- +- label = gtk_label_new_with_mnemonic (mnemonic); +- gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET (button)); +- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); +- +- gtk_widget_show_all (align); ++ gtk_button_set_image (button, image); ++ gtk_button_set_label (button, mnemonic); ++ gtk_button_set_use_underline (button, TRUE); + } + + static void diff --git a/gucharmap.spec b/gucharmap.spec index a727969..fde1121 100644 --- a/gucharmap.spec +++ b/gucharmap.spec @@ -12,6 +12,9 @@ License: GPLv2+ and GFDL and MIT # GPL for the source code, GFDL for the docs, MIT for Unicode data URL: http://live.gnome.org/Gucharmap Source: http://download.gnome.org/sources/gucharmap/2.26/gucharmap-%{version}.tar.bz2 + +# http://bugzilla.gnome.org/show_bug.cgi?id=588734 +Patch0: button-images.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gnome-doc-utils >= 0.3.2 @@ -48,7 +51,7 @@ needed to use the libgucharmap library. %prep %setup -q - +%patch0 -p1 -b .button-images %build %configure --disable-gtk-immodules --disable-scrollkeeper @@ -143,6 +146,9 @@ fi %changelog +* Wed Jul 15 2009 Matthias Clasen - 2.26.3.1-2 +- Fix some stubborn button images + * Sun Jul 12 2009 Matthias Clasen - 2.26.3.1-1 - Update to 2.26.3.1