rpms/gtk2/devel allow-set-hint.patch, NONE, 1.1 compose-sequences.patch, NONE, 1.1 fresh-tooltips.patch, NONE, 1.1 icon-padding.patch, NONE, 1.1 iconview-hang.patch, NONE, 1.1 image-size-alloc.patch, NONE, 1.1 symbolic-color-parsing.patch, NONE, 1.1 toolbutton-assert.patch, NONE, 1.1 tooltip-positioning.patch, NONE, 1.1 gtk2.spec, 1.407, 1.408 appearance-crash.patch, 1.1, NONE csw-fixes.patch, 1.1, NONE dont-use-deprecated-api.patch, 1.6, NONE entry-include-fix.patch, 1.1, NONE fix-anchors.patch, 1.1, NONE gdm-background.patch, 1.1, NONE gtk-bell.patch, 1.1, NONE gtk2-fix-install.patch, 1.1, NONE gtk2-printing-nonblocking-printer-list.patch, 1.1, NONE gtk2-printing-smb-auth.patch, 1.1, NONE iconview-crash.patch, 1.1, NONE print_authentication.patch, 1.1, NONE root-event-mask.patch, 1.1, NONE set-cursor.patch, 1.2, NONE
Matthias Clasen
mclasen at fedoraproject.org
Mon Nov 2 04:22:13 UTC 2009
Author: mclasen
Update of /cvs/pkgs/rpms/gtk2/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20747
Modified Files:
gtk2.spec
Added Files:
allow-set-hint.patch compose-sequences.patch
fresh-tooltips.patch icon-padding.patch iconview-hang.patch
image-size-alloc.patch symbolic-color-parsing.patch
toolbutton-assert.patch tooltip-positioning.patch
Removed Files:
appearance-crash.patch csw-fixes.patch
dont-use-deprecated-api.patch entry-include-fix.patch
fix-anchors.patch gdm-background.patch gtk-bell.patch
gtk2-fix-install.patch
gtk2-printing-nonblocking-printer-list.patch
gtk2-printing-smb-auth.patch iconview-crash.patch
print_authentication.patch root-event-mask.patch
set-cursor.patch
Log Message:
Copy F12 work over
allow-set-hint.patch:
gtkwindow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE allow-set-hint.patch ---
--- gtk+-2.18.3/gtk/gtkwindow.c 2009-10-09 01:00:44.000000000 -0400
+++ hacked/gtk/gtkwindow.c 2009-10-28 11:45:33.583105288 -0400
@@ -2414,7 +2414,7 @@
GtkWindowPrivate *priv;
g_return_if_fail (GTK_IS_WINDOW (window));
- g_return_if_fail (!GTK_WIDGET_VISIBLE (window));
+ g_return_if_fail (!GTK_WIDGET_MAPPED (window));
priv = GTK_WINDOW_GET_PRIVATE (window);
compose-sequences.patch:
gtkimcontextsimple.c | 2 -
gtkimcontextsimpleseqs.h | 92 ++++++++++++++++++++++++++++++-----------------
2 files changed, 61 insertions(+), 33 deletions(-)
--- NEW FILE compose-sequences.patch ---
>From 4eb82ed9624da58cff9dd6c348b12d35967ae3c3 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu, 22 Oct 2009 15:25:19 +1000
Subject: [PATCH] Update compose sequences
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
gtk/gtkimcontextsimple.c | 2 +-
gtk/gtkimcontextsimpleseqs.h | 91 +++++++++++++++++++++++++++--------------
2 files changed, 61 insertions(+), 32 deletions(-)
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index 62bab7c..f36dcf5 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -61,7 +61,7 @@ struct _GtkComposeTableCompact
static const GtkComposeTableCompact gtk_compose_table_compact = {
gtk_compose_seqs_compact,
5,
- 23,
+ 24,
6
};
diff --git a/gtk/gtkimcontextsimpleseqs.h b/gtk/gtkimcontextsimpleseqs.h
index 9e3fc29..131b3db 100644
--- a/gtk/gtkimcontextsimpleseqs.h
+++ b/gtk/gtkimcontextsimpleseqs.h
@@ -18,10 +18,9 @@
*/
/*
- * File auto-generated from script found at gtk/compose-parse.py, with the --gtk parameter,
+ * File auto-generated from script found at http://bugzilla.gnome.org/show_bug.cgi?id=321896
* using the input files
* Input : http://gitweb.freedesktop.org/?p=xorg/lib/libX11.git;a=blob_plain;f=nls/en_US.UTF-8/Compose.pre
- * Input : http://svn.gnome.org/viewcvs/gtk%2B/trunk/gtk/gtk-compose-lookaside.txt
* Input : http://www.cl.cam.ac.uk/~mgk25/ucs/keysyms.txt
* Input : http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
*
@@ -68,29 +67,30 @@
*/
static const guint16 gtk_compose_seqs_compact[] = {
-GDK_dead_stroke, 138, 226, 235, 235, 235,
-GDK_Greek_accentdieresis, 235, 239, 239, 239, 239,
-GDK_dead_grave, 239, 299, 386, 598, 598,
-GDK_dead_acute, 598, 664, 760, 1036, 1036,
-GDK_dead_circumflex, 1036, 1176, 1176, 1376, 1376,
-GDK_dead_tilde, 1376, 1458, 1521, 1661, 1661,
-GDK_dead_macron, 1661, 1707, 1707, 1779, 1779,
-GDK_dead_breve, 1779, 1833, 1833, 1857, 1857,
-GDK_dead_abovedot, 1857, 1887, 1890, 1922, 1922,
-GDK_dead_diaeresis, 1922, 2010, 2019, 2043, 2043,
-GDK_dead_abovering, 2043, 2053, 2053, 2053, 2053,
-GDK_dead_doubleacute, 2053, 2063, 2063, 2063, 2063,
-GDK_dead_caron, 2063, 2089, 2089, 2097, 2097,
-GDK_dead_cedilla, 2097, 2111, 2111, 2111, 2111,
-GDK_dead_ogonek, 2111, 2121, 2121, 2121, 2121,
-GDK_dead_iota, 2121, 2143, 2242, 2674, 3334,
-GDK_dead_voiced_sound, 3334, 3380, 3380, 3380, 3380,
-GDK_dead_semivoiced_sound, 3380, 3390, 3390, 3390, 3390,
-GDK_dead_belowdot, 3390, 3400, 3400, 3416, 3416,
-GDK_dead_hook, 3416, 3494, 3494, 3550, 3550,
-GDK_dead_psili, 3550, 3578, 3578, 3578, 3578,
-GDK_dead_dasia, 3578, 3610, 3610, 3610, 3610,
-GDK_Multi_key, 3610, 3610, 9589, 13297, 15157,
+GDK_dead_stroke, 144, 232, 241, 241, 241,
+GDK_Greek_accentdieresis, 241, 245, 245, 245, 245,
+GDK_dead_grave, 245, 307, 394, 606, 606,
+GDK_dead_acute, 606, 674, 770, 1046, 1046,
+GDK_dead_circumflex, 1046, 1186, 1186, 1386, 1386,
+GDK_dead_tilde, 1386, 1470, 1533, 1673, 1673,
+GDK_dead_macron, 1673, 1719, 1719, 1791, 1791,
+GDK_dead_breve, 1791, 1845, 1845, 1869, 1869,
+GDK_dead_abovedot, 1869, 1899, 1902, 1934, 1934,
+GDK_dead_diaeresis, 1934, 2022, 2031, 2055, 2055,
+GDK_dead_abovering, 2055, 2065, 2065, 2065, 2065,
+GDK_dead_doubleacute, 2065, 2075, 2075, 2075, 2075,
+GDK_dead_caron, 2075, 2121, 2121, 2129, 2129,
+GDK_dead_cedilla, 2129, 2143, 2143, 2143, 2143,
+GDK_dead_ogonek, 2143, 2153, 2153, 2153, 2153,
+GDK_dead_iota, 2153, 2175, 2274, 2706, 3366,
+GDK_dead_voiced_sound, 3366, 3412, 3412, 3412, 3412,
+GDK_dead_semivoiced_sound, 3412, 3422, 3422, 3422, 3422,
+GDK_dead_belowdot, 3422, 3438, 3438, 3454, 3454,
+GDK_dead_hook, 3454, 3532, 3532, 3588, 3588,
+GDK_dead_horn, 3588, 3598, 3598, 3598, 3598,
+GDK_dead_psili, 3598, 3626, 3626, 3626, 3626,
+GDK_dead_dasia, 3626, 3658, 3658, 3658, 3658,
+GDK_Multi_key, 3658, 3658, 9658, 13366, 15231,
GDK_space, 0x002F,
GDK_2, 0x01BB,
GDK_A, 0x023A,
@@ -143,6 +143,7 @@ GDK_Greek_upsilon, 0x03B0,
GDK_space, 0x0060,
GDK_V, 0x01DB,
GDK_v, 0x01DC,
+GDK_nobreakspace, 0x0300,
GDK_Abreve, 0x1EB0,
GDK_abreve, 0x1EB1,
GDK_Emacron, 0x1E14,
@@ -255,6 +256,7 @@ GDK_Multi_key, GDK_macron, GDK_o, 0x1E51,
GDK_space, 0x0027,
GDK_V, 0x01D7,
GDK_v, 0x01D8,
+GDK_nobreakspace, 0x0301,
GDK_Abreve, 0x1EAE,
GDK_abreve, 0x1EAF,
GDK_Emacron, 0x1E16,
@@ -510,6 +512,7 @@ GDK_space, 0x007E,
GDK_less, 0x2272,
GDK_equal, 0x2243,
GDK_greater, 0x2273,
+GDK_nobreakspace, 0x0303,
GDK_Oacute, 0x1E4C,
GDK_Odiaeresis, 0x1E4E,
GDK_Uacute, 0x1E78,
@@ -769,6 +772,16 @@ GDK_parenleft, 0x208D,
GDK_parenright, 0x208E,
GDK_plus, 0x208A,
GDK_minus, 0x208B,
+GDK_0, 0x2080,
+GDK_1, 0x2081,
+GDK_2, 0x2082,
+GDK_3, 0x2083,
+GDK_4, 0x2084,
+GDK_5, 0x2085,
+GDK_6, 0x2086,
+GDK_7, 0x2087,
+GDK_8, 0x2088,
+GDK_9, 0x2088,
GDK_equal, 0x208C,
GDK_V, 0x01D9,
GDK_v, 0x01DA,
@@ -1103,11 +1116,14 @@ GDK_kana_HI, 0x30D4,
GDK_kana_FU, 0x30D7,
GDK_kana_HE, 0x30DA,
GDK_kana_HO, 0x30DD,
+GDK_space, 0x0323,
GDK_plus, 0x2A25,
GDK_minus, 0x2A2A,
GDK_equal, 0x2A66,
+GDK_nobreakspace, 0x0323,
GDK_Abreve, 0x1EB6,
GDK_abreve, 0x1EB7,
+GDK_dead_belowdot, 0x0323,
GDK_Multi_key, GDK_plus, GDK_O, 0x1EE2,
GDK_Multi_key, GDK_plus, GDK_U, 0x1EF0,
GDK_Multi_key, GDK_plus, GDK_o, 0x1EE3,
@@ -1165,6 +1181,11 @@ GDK_Multi_key, GDK_asciicircum, GDK_e, 0x1EC3,
GDK_Multi_key, GDK_asciicircum, GDK_o, 0x1ED5,
GDK_Multi_key, GDK_b, GDK_A, 0x1EB2,
GDK_Multi_key, GDK_b, GDK_a, 0x1EB3,
+GDK_space, 0x031B,
+GDK_nobreakspace, 0x031B,
+GDK_Utilde, 0x1EEE,
+GDK_utilde, 0x1EEF,
+GDK_dead_horn, 0x031B,
GDK_Greek_ALPHA, 0x1F08,
GDK_Greek_EPSILON, 0x1F18,
GDK_Greek_ETA, 0x1F28,
@@ -1368,7 +1389,7 @@ GDK_apostrophe, GDK_Idiaeresis, 0x1E2E,
GDK_apostrophe, GDK_Ocircumflex, 0x1ED0,
GDK_apostrophe, GDK_Otilde, 0x1E4C,
GDK_apostrophe, GDK_Ooblique, 0x01FE,
-GDK_apostrophe, 0x00DC, 0x01D7,
+GDK_apostrophe, GDK_Udiaeresis, 0x01D7,
GDK_apostrophe, GDK_acircumflex, 0x1EA5,
GDK_apostrophe, GDK_aring, 0x01FB,
GDK_apostrophe, GDK_ae, 0x01FD,
@@ -1529,6 +1550,7 @@ GDK_minus, GDK_parenright, 0x007D,
GDK_minus, GDK_plus, 0x00B1,
GDK_minus, GDK_comma, 0x00AC,
GDK_minus, GDK_colon, 0x00F7,
+GDK_minus, GDK_greater, 0x2192,
GDK_minus, GDK_A, 0x00C3,
GDK_minus, GDK_D, 0x0110,
GDK_minus, GDK_E, 0x0112,
@@ -1603,6 +1625,7 @@ GDK_period, 0x1E62, 0x1E68,
GDK_period, 0x1E63, 0x1E69,
GDK_slash, GDK_slash, 0x005C,
GDK_slash, GDK_less, 0x005C,
+GDK_slash, GDK_equal, 0x2260,
GDK_slash, GDK_C, 0x00A2,
GDK_slash, GDK_D, 0x0110,
GDK_slash, GDK_G, 0x01E4,
@@ -1682,8 +1705,11 @@ GDK_semicolon, GDK_u, 0x0173,
GDK_less, GDK_space, 0x02C7,
GDK_less, GDK_quotedbl, 0x201C,
GDK_less, GDK_apostrophe, 0x2018,
+GDK_less, GDK_minus, 0x2190,
GDK_less, GDK_slash, 0x005C,
+GDK_less, GDK_3, 0x2665,
GDK_less, GDK_less, 0x00AB,
+GDK_less, GDK_equal, 0x2264,
GDK_less, GDK_C, 0x010C,
GDK_less, GDK_D, 0x010E,
GDK_less, GDK_E, 0x011A,
@@ -1703,6 +1729,7 @@ GDK_less, GDK_s, 0x0161,
GDK_less, GDK_t, 0x0165,
GDK_less, GDK_z, 0x017E,
GDK_less, 0x0338, 0x226E,
+GDK_equal, GDK_slash, 0x2260,
GDK_equal, GDK_C, 0x20AC,
GDK_equal, GDK_E, 0x20AC,
GDK_equal, GDK_L, 0x00A3,
@@ -1725,6 +1752,7 @@ GDK_equal, GDK_Cyrillic_U, 0x04F2,
GDK_greater, GDK_space, 0x005E,
GDK_greater, GDK_quotedbl, 0x201D,
GDK_greater, GDK_apostrophe, 0x2019,
+GDK_greater, GDK_equal, 0x2265,
GDK_greater, GDK_greater, 0x00BB,
GDK_greater, GDK_A, 0x00C2,
GDK_greater, GDK_E, 0x00CA,
@@ -2068,7 +2096,7 @@ GDK_underscore, GDK_Adiaeresis, 0x01DE,
GDK_underscore, GDK_AE, 0x01E2,
GDK_underscore, GDK_Otilde, 0x022C,
GDK_underscore, GDK_Odiaeresis, 0x022A,
-GDK_underscore, 0x00DC, 0x01D5,
+GDK_underscore, GDK_Udiaeresis, 0x01D5,
GDK_underscore, GDK_adiaeresis, 0x01DF,
GDK_underscore, GDK_ae, 0x01E3,
GDK_underscore, GDK_otilde, 0x022D,
@@ -2128,7 +2156,7 @@ GDK_grave, GDK_y, 0x1EF3,
GDK_grave, GDK_Acircumflex, 0x1EA6,
GDK_grave, GDK_Ecircumflex, 0x1EC0,
GDK_grave, GDK_Ocircumflex, 0x1ED2,
-GDK_grave, 0x00DC, 0x01DB,
+GDK_grave, GDK_Udiaeresis, 0x01DB,
GDK_grave, GDK_acircumflex, 0x1EA7,
GDK_grave, GDK_ecircumflex, 0x1EC1,
GDK_grave, GDK_ocircumflex, 0x1ED3,
@@ -2279,7 +2307,7 @@ GDK_c, GDK_t, 0x0165,
GDK_c, GDK_u, 0x01D4,
GDK_c, GDK_z, 0x017E,
GDK_c, GDK_bar, 0x00A2,
-GDK_c, 0x00DC, 0x01D9,
+GDK_c, GDK_Udiaeresis, 0x01D9,
GDK_c, GDK_udiaeresis, 0x01DA,
GDK_c, 0x01B7, 0x01EE,
GDK_c, 0x0292, 0x01EF,
@@ -2517,7 +2545,7 @@ GDK_macron, GDK_Adiaeresis, 0x01DE,
GDK_macron, GDK_AE, 0x01E2,
GDK_macron, GDK_Otilde, 0x022C,
GDK_macron, GDK_Odiaeresis, 0x022A,
-GDK_macron, 0x00DC, 0x01D5,
+GDK_macron, GDK_Udiaeresis, 0x01D5,
GDK_macron, GDK_adiaeresis, 0x01DF,
GDK_macron, GDK_ae, 0x01E3,
GDK_macron, GDK_otilde, 0x022D,
@@ -2586,7 +2614,7 @@ GDK_acute, GDK_Idiaeresis, 0x1E2E,
GDK_acute, GDK_Ocircumflex, 0x1ED0,
GDK_acute, GDK_Otilde, 0x1E4C,
GDK_acute, GDK_Ooblique, 0x01FE,
-GDK_acute, 0x00DC, 0x01D7,
+GDK_acute, GDK_Udiaeresis, 0x01D7,
GDK_acute, GDK_acircumflex, 0x1EA5,
GDK_acute, GDK_aring, 0x01FB,
GDK_acute, GDK_ae, 0x01FD,
@@ -4320,6 +4348,7 @@ GDK_parenleft, GDK_KP_4, GDK_KP_7, GDK_parenright, 0x32BC,
GDK_parenleft, GDK_KP_4, GDK_KP_8, GDK_parenright, 0x32BD,
GDK_parenleft, GDK_KP_4, GDK_KP_9, GDK_parenright, 0x32BE,
GDK_parenleft, GDK_KP_5, GDK_KP_0, GDK_parenright, 0x32BF,
+GDK_C, GDK_C, GDK_C, GDK_P, 0x262D,
GDK_Greek_iota, GDK_apostrophe, GDK_parenleft, GDK_Greek_ALPHA, 0x1F8D,
GDK_Greek_iota, GDK_apostrophe, GDK_parenleft, GDK_Greek_ETA, 0x1F9D,
GDK_Greek_iota, GDK_apostrophe, GDK_parenleft, GDK_Greek_OMEGA, 0x1FAD,
--
1.6.5.rc2
fresh-tooltips.patch:
gtktooltip.c | 279 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
gtkwidget.c | 8 +
2 files changed, 268 insertions(+), 19 deletions(-)
--- NEW FILE fresh-tooltips.patch ---
diff -up gtk+-2.18.3/gtk/gtktooltip.c.fresh-tooltips gtk+-2.18.3/gtk/gtktooltip.c
--- gtk+-2.18.3/gtk/gtktooltip.c.fresh-tooltips 2009-10-16 10:35:45.000000000 -0400
+++ gtk+-2.18.3/gtk/gtktooltip.c 2009-10-31 14:53:37.120183113 -0400
@@ -29,6 +29,10 @@
#include "gtkhbox.h"
#include "gtkalignment.h"
+#ifdef GDK_WINDOWING_X11
+#include "gdk/x11/gdkx.h"
+#endif
+
#include "gtkalias.h"
#include <string.h>
@@ -95,6 +99,7 @@ static void gtk_tooltip_display_cl
GtkTooltip *tooltip);
static void gtk_tooltip_set_last_window (GtkTooltip *tooltip,
GdkWindow *window);
+static void update_shape (GtkTooltip *tooltip);
G_DEFINE_TYPE (GtkTooltip, gtk_tooltip, G_TYPE_OBJECT);
@@ -110,8 +115,43 @@ gtk_tooltip_class_init (GtkTooltipClass
}
static void
+on_composited_changed (GtkWidget *window,
+ GtkTooltip *tooltip)
+{
+ update_shape (tooltip);
+}
+
+static void
+on_screen_changed (GtkWidget *window,
+ GdkScreen *previous,
+ GtkTooltip *tooltip)
+{
+ GdkScreen *screen;
+ GdkColormap *cmap;
+
+ screen = gtk_widget_get_screen (window);
+
+ cmap = NULL;
+ if (gdk_screen_is_composited (screen))
+ cmap = gdk_screen_get_rgba_colormap (screen);
+ if (cmap == NULL)
+ cmap = gdk_screen_get_rgb_colormap (screen);
+
+ gtk_widget_set_colormap (window, cmap);
+}
+
+static void
+on_realized (GtkWidget *window,
+ GtkTooltip *tooltip)
+{
+ update_shape (tooltip);
+}
+
+static void
gtk_tooltip_init (GtkTooltip *tooltip)
{
+ GdkScreen *screen;
+
tooltip->timeout_id = 0;
tooltip->browse_mode_timeout_id = 0;
@@ -127,8 +167,12 @@ gtk_tooltip_init (GtkTooltip *tooltip)
tooltip->last_window = NULL;
tooltip->window = g_object_ref (gtk_window_new (GTK_WINDOW_POPUP));
+
+ on_screen_changed (tooltip->window, NULL, tooltip);
+
gtk_window_set_type_hint (GTK_WINDOW (tooltip->window),
GDK_WINDOW_TYPE_HINT_TOOLTIP);
+
gtk_widget_set_app_paintable (tooltip->window, TRUE);
gtk_window_set_resizable (GTK_WINDOW (tooltip->window), FALSE);
gtk_widget_set_name (tooltip->window, "gtk-tooltip");
@@ -145,7 +189,7 @@ gtk_tooltip_init (GtkTooltip *tooltip)
gtk_widget_show (tooltip->alignment);
g_signal_connect_swapped (tooltip->window, "style-set",
- G_CALLBACK (gtk_tooltip_window_style_set), tooltip);
+ G_CALLBACK (gtk_tooltip_window_style_set), tooltip);
g_signal_connect_swapped (tooltip->window, "expose-event",
G_CALLBACK (gtk_tooltip_paint_window), tooltip);
@@ -162,6 +206,13 @@ gtk_tooltip_init (GtkTooltip *tooltip)
gtk_box_pack_start (GTK_BOX (tooltip->box), tooltip->label,
FALSE, FALSE, 0);
+ g_signal_connect (tooltip->window, "composited-changed",
+ G_CALLBACK (on_composited_changed), tooltip);
+ g_signal_connect (tooltip->window, "screen-changed",
+ G_CALLBACK (on_screen_changed), tooltip);
+ g_signal_connect (tooltip->window, "realize",
+ G_CALLBACK (on_realized), tooltip);
+
tooltip->custom_widget = NULL;
}
@@ -318,9 +369,9 @@ gtk_tooltip_set_icon_from_stock (GtkTool
* Since: 2.14
*/
void
-gtk_tooltip_set_icon_from_icon_name(GtkTooltip *tooltip,
- const gchar *icon_name,
- GtkIconSize size)
+gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip,
+ const gchar *icon_name,
+ GtkIconSize size)
{
g_return_if_fail (GTK_IS_TOOLTIP (tooltip));
@@ -471,27 +522,217 @@ static void
gtk_tooltip_window_style_set (GtkTooltip *tooltip)
{
gtk_alignment_set_padding (GTK_ALIGNMENT (tooltip->alignment),
- tooltip->window->style->ythickness,
- tooltip->window->style->ythickness,
- tooltip->window->style->xthickness,
+ tooltip->window->style->ythickness,
+ tooltip->window->style->ythickness,
+ tooltip->window->style->xthickness,
tooltip->window->style->xthickness);
-
+ gtk_box_set_spacing (GTK_BOX (tooltip->box),
+ tooltip->window->style->xthickness);
gtk_widget_queue_draw (tooltip->window);
}
+static void
+draw_round_rect (cairo_t *cr,
+ gdouble aspect,
+ gdouble x,
+ gdouble y,
+ gdouble corner_radius,
+ gdouble width,
+ gdouble height)
+{
+ gdouble radius = corner_radius / aspect;
+
+ cairo_move_to (cr, x + radius, y);
+
+ /* top-right, left of the corner */
+ cairo_line_to (cr, x + width - radius, y);
+
+ /* top-right, below the corner */
+ cairo_arc (cr,
+ x + width - radius, y + radius, radius,
+ -90.0f * G_PI / 180.0f, 0.0f * G_PI / 180.0f);
+
+ /* bottom-right, above the corner */
+ cairo_line_to (cr, x + width, y + height - radius);
+
+ /* bottom-right, left of the corner */
+ cairo_arc (cr,
+ x + width - radius, y + height - radius, radius,
+ 0.0f * G_PI / 180.0f, 90.0f * G_PI / 180.0f);
+
+ /* bottom-left, right of the corner */
+ cairo_line_to (cr, x + radius, y + height);
+
+ /* bottom-left, above the corner */
+ cairo_arc (cr,
+ x + radius, y + height - radius, radius,
+ 90.0f * G_PI / 180.0f, 180.0f * G_PI / 180.0f);
+
+ /* top-left, below the corner */
+ cairo_line_to (cr, x, y + radius);
+
+ /* top-left, right of the corner */
+ cairo_arc (cr,
+ x + radius, y + radius, radius,
+ 180.0f * G_PI / 180.0f, 270.0f * G_PI / 180.0f);
+
+ cairo_close_path (cr);
+}
+
+static void
+fill_background (GtkWidget *widget,
+ cairo_t *cr)
+{
+ GdkColor color;
+ gdouble r, g, b;
+ gint radius;
+ gdouble background_alpha;
+
+ if (gdk_screen_is_composited (gtk_widget_get_screen (widget)))
+ background_alpha = 0.90;
+ else
+ background_alpha = 1.0;
+
+ radius = MIN (widget->style->xthickness, widget->style->ythickness);
+ radius = MAX (radius, 1);
+
+ cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
+ cairo_paint (cr);
+ cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+
+ draw_round_rect (cr,
+ 1.0, 0.5, 0.5, radius,
+ widget->allocation.width - 1,
+ widget->allocation.height - 1);
+
+ color = widget->style->bg [GTK_STATE_NORMAL];
+ r = (float)color.red / 65535.0;
+ g = (float)color.green / 65535.0;
+ b = (float)color.blue / 65535.0;
+ cairo_set_source_rgba (cr, r, g, b, background_alpha);
+ cairo_fill_preserve (cr);
+
+ color = widget->style->bg [GTK_STATE_SELECTED];
+ r = (float) color.red / 65535.0;
+ g = (float) color.green / 65535.0;
+ b = (float) color.blue / 65535.0;
+
+ cairo_set_source_rgba (cr, r, g, b, background_alpha);
+ cairo_set_line_width (cr, 1.0);
+ cairo_stroke (cr);
+}
+
+static void
+update_shape (GtkTooltip *tooltip)
+{
+ GdkScreen *screen;
+ GdkBitmap *mask;
+ cairo_t *cr;
+ gint width, height;
+ gboolean new_style;
+ gint radius;
+
+ gtk_widget_style_get (tooltip->window, "new-tooltip-style", &new_style, NULL);
+
+ if (!new_style)
+ {
+ gtk_widget_shape_combine_mask (tooltip->window, NULL, 0, 0);
+ return;
+ }
+
+ screen = gtk_widget_get_screen (tooltip->window);
+
+ gtk_window_get_size (GTK_WINDOW (tooltip->window), &width, &height);
+
+ if (gdk_screen_is_composited (screen))
+ {
+ GdkRectangle rect;
+ GdkRegion *region;
+ const char *wm;
+
+ gtk_widget_shape_combine_mask (tooltip->window, NULL, 0, 0);
+#ifdef GDK_WINDOWING_X11
+ /* This is a hack to keep the Metacity compositor from slapping a
+ * non-shaped shadow around the shaped tooltip
+ */
+ if (!GTK_WIDGET_MAPPED (tooltip->window))
+ {
+ wm = gdk_x11_screen_get_window_manager_name (screen);
+ if (g_strcmp0 (wm, "Metacity") == 0)
+ gtk_window_set_type_hint (GTK_WINDOW (tooltip->window),
+ GDK_WINDOW_TYPE_HINT_DND);
+ }
+#endif
+ return;
+ }
+
+ radius = MIN (tooltip->window->style->xthickness,
+ tooltip->window->style->ythickness);
+ radius = MAX (radius, 1);
+ mask = (GdkBitmap *) gdk_pixmap_new (NULL, width, height, 1);
+ cr = gdk_cairo_create (mask);
+ if (cairo_status (cr) == CAIRO_STATUS_SUCCESS)
+ {
+ cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
+ cairo_paint (cr);
+
+ cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+ cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
+ draw_round_rect (cr, 1.0, 0, 0, radius + 1, width, height);
+ cairo_fill (cr);
+
+ gtk_widget_shape_combine_mask (tooltip->window, mask, 0, 0);
+ }
+ cairo_destroy (cr);
+
+ g_object_unref (mask);
+}
+
static gboolean
gtk_tooltip_paint_window (GtkTooltip *tooltip)
{
- gtk_paint_flat_box (tooltip->window->style,
- tooltip->window->window,
- GTK_STATE_NORMAL,
- GTK_SHADOW_OUT,
- NULL,
- tooltip->window,
- "tooltip",
- 0, 0,
- tooltip->window->allocation.width,
- tooltip->window->allocation.height);
+ gboolean new_style;
+
+ gtk_widget_style_get (tooltip->window, "new-tooltip-style", &new_style, NULL);
+
+ if (new_style)
+ {
+ cairo_t *context;
+ cairo_surface_t *surface;
+ cairo_t *cr;
+
+ context = gdk_cairo_create (tooltip->window->window);
+
+ cairo_set_operator (context, CAIRO_OPERATOR_SOURCE);
+ surface = cairo_surface_create_similar (cairo_get_target (context),
+ CAIRO_CONTENT_COLOR_ALPHA,
+ tooltip->window->allocation.width,
+ tooltip->window->allocation.height);
+ cr = cairo_create (surface);
+
+ fill_background (tooltip->window, cr);
+
+ cairo_destroy (cr);
+ cairo_set_source_surface (context, surface, 0, 0);
+ cairo_paint (context);
+ cairo_surface_destroy (surface);
+ cairo_destroy (context);
+
+ update_shape (tooltip);
+ }
+ else
+ {
+ gtk_paint_flat_box (tooltip->window->style,
+ tooltip->window->window,
+ GTK_STATE_NORMAL,
+ GTK_SHADOW_OUT,
+ NULL,
+ tooltip->window,
+ "tooltip",
+ 0, 0,
+ tooltip->window->allocation.width,
+ tooltip->window->allocation.height);
+ }
return FALSE;
}
@@ -631,7 +872,7 @@ find_widget_under_pointer (GdkWindow *wi
#ifdef DEBUG_TOOLTIP
g_print ("event window %p (belonging to %p (%s)) (%d, %d)\n",
- window, event_widget, gtk_widget_get_name (event_widget),
+ gindow, event_widget, gtk_widget_get_name (event_widget),
*x, *y);
#endif
diff -up gtk+-2.18.3/gtk/gtkwidget.c.fresh-tooltips gtk+-2.18.3/gtk/gtkwidget.c
--- gtk+-2.18.3/gtk/gtkwidget.c.fresh-tooltips 2009-10-09 01:00:44.000000000 -0400
+++ gtk+-2.18.3/gtk/gtkwidget.c 2009-10-31 14:27:50.333957199 -0400
@@ -2386,6 +2386,14 @@ gtk_widget_class_init (GtkWidgetClass *k
P_("The length of vertical scroll arrows"),
1, G_MAXINT, 16,
GTK_PARAM_READABLE));
+
+ gtk_widget_class_install_style_property (klass,
+ g_param_spec_boolean ("new-tooltip-style",
+ NULL,
+ NULL,
+ FALSE,
+ GTK_PARAM_READABLE));
+
}
static void
icon-padding.patch:
gtkstatusicon.c | 25 ++++++++++++++
gtktrayicon-x11.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++---
gtktrayicon.h | 3 +
3 files changed, 114 insertions(+), 6 deletions(-)
--- NEW FILE icon-padding.patch ---
diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c
index 1cdb0c1..62b3913 100644
--- a/gtk/gtkstatusicon.c
+++ b/gtk/gtkstatusicon.c
@@ -170,6 +170,7 @@ static void gtk_status_icon_screen_changed (GtkStatusIcon *status_icon,
GdkScreen *old_screen);
static void gtk_status_icon_embedded_changed (GtkStatusIcon *status_icon);
static void gtk_status_icon_orientation_changed (GtkStatusIcon *status_icon);
+static void gtk_status_icon_padding_changed (GtkStatusIcon *status_icon);
static gboolean gtk_status_icon_scroll (GtkStatusIcon *status_icon,
GdkEventScroll *event);
static gboolean gtk_status_icon_query_tooltip (GtkStatusIcon *status_icon,
@@ -850,6 +851,8 @@ gtk_status_icon_init (GtkStatusIcon *status_icon)
G_CALLBACK (gtk_status_icon_embedded_changed), status_icon);
g_signal_connect_swapped (priv->tray_icon, "notify::orientation",
G_CALLBACK (gtk_status_icon_orientation_changed), status_icon);
+ g_signal_connect_swapped (priv->tray_icon, "notify::padding",
+ G_CALLBACK (gtk_status_icon_padding_changed), status_icon);
g_signal_connect_swapped (priv->tray_icon, "button-press-event",
G_CALLBACK (gtk_status_icon_button_press), status_icon);
g_signal_connect_swapped (priv->tray_icon, "button-release-event",
@@ -975,6 +978,8 @@ gtk_status_icon_finalize (GObject *object)
g_signal_handlers_disconnect_by_func (priv->tray_icon,
gtk_status_icon_orientation_changed, status_icon);
g_signal_handlers_disconnect_by_func (priv->tray_icon,
+ gtk_status_icon_padding_changed, status_icon);
+ g_signal_handlers_disconnect_by_func (priv->tray_icon,
gtk_status_icon_button_press, status_icon);
g_signal_handlers_disconnect_by_func (priv->tray_icon,
gtk_status_icon_button_release, status_icon);
@@ -1679,14 +1684,32 @@ gtk_status_icon_screen_changed (GtkStatusIcon *status_icon,
#ifdef GDK_WINDOWING_X11
static void
+gtk_status_icon_padding_changed (GtkStatusIcon *status_icon)
+{
+ GtkStatusIconPrivate *priv = status_icon->priv;
+ GtkOrientation orientation;
+ gint padding;
+
+ orientation = _gtk_tray_icon_get_orientation (GTK_TRAY_ICON (priv->tray_icon));
+ padding = _gtk_tray_icon_get_padding (GTK_TRAY_ICON (priv->tray_icon));
+
+ if (orientation == GTK_ORIENTATION_HORIZONTAL)
+ gtk_misc_set_padding (GTK_MISC (priv->image), padding, 0);
+ else
+ gtk_misc_set_padding (GTK_MISC (priv->image), 0, padding);
+}
+
+static void
gtk_status_icon_embedded_changed (GtkStatusIcon *status_icon)
{
+ gtk_status_icon_padding_changed (status_icon);
g_object_notify (G_OBJECT (status_icon), "embedded");
}
static void
gtk_status_icon_orientation_changed (GtkStatusIcon *status_icon)
{
+ gtk_status_icon_padding_changed (status_icon);
g_object_notify (G_OBJECT (status_icon), "orientation");
}
@@ -1804,7 +1827,7 @@ gtk_status_icon_reset_image_data (GtkStatusIcon *status_icon)
g_object_notify (G_OBJECT (status_icon), "stock");
break;
-
+
case GTK_IMAGE_ICON_NAME:
g_free (priv->image_data.icon_name);
priv->image_data.icon_name = NULL;
diff --git a/gtk/gtktrayicon-x11.c b/gtk/gtktrayicon-x11.c
index 32c3140..74413df 100644
--- a/gtk/gtktrayicon-x11.c
+++ b/gtk/gtktrayicon-x11.c
@@ -43,23 +43,26 @@
enum {
PROP_0,
- PROP_ORIENTATION
+ PROP_ORIENTATION,
+ PROP_PADDING
};
struct _GtkTrayIconPrivate
{
guint stamp;
-
+
Atom selection_atom;
Atom manager_atom;
Atom system_tray_opcode_atom;
Atom orientation_atom;
Atom visual_atom;
+ Atom padding_atom;
Window manager_window;
GdkVisual *manager_visual;
gboolean manager_visual_rgba;
GtkOrientation orientation;
+ gint padding;
};
static void gtk_tray_icon_constructed (GObject *object);
@@ -113,6 +116,16 @@ gtk_tray_icon_class_init (GtkTrayIconClass *class)
GTK_ORIENTATION_HORIZONTAL,
GTK_PARAM_READABLE));
+ g_object_class_install_property (gobject_class,
+ PROP_PADDING,
+ g_param_spec_int ("padding",
+ P_("Padding"),
+ P_("Padding that should be put around icons in the tray"),
+ 0,
+ G_MAXINT,
+ 0,
+ GTK_PARAM_READABLE));
+
g_type_class_add_private (class, sizeof (GtkTrayIconPrivate));
}
@@ -124,6 +137,7 @@ gtk_tray_icon_init (GtkTrayIcon *icon)
icon->priv->stamp = 1;
icon->priv->orientation = GTK_ORIENTATION_HORIZONTAL;
+ icon->priv->padding = 0;
gtk_widget_set_app_paintable (GTK_WIDGET (icon), TRUE);
gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK);
@@ -161,6 +175,10 @@ gtk_tray_icon_constructed (GObject *object)
"_NET_SYSTEM_TRAY_VISUAL",
False);
+ icon->priv->padding_atom = XInternAtom (xdisplay,
+ "_NET_SYSTEM_TRAY_PADDING",
+ False);
+
/* Add a root window filter so that we get changes on MANAGER */
gdk_window_add_filter (root_window,
gtk_tray_icon_manager_filter, icon);
@@ -212,6 +230,9 @@ gtk_tray_icon_get_property (GObject *object,
case PROP_ORIENTATION:
g_value_set_enum (value, icon->priv->orientation);
break;
+ case PROP_PADDING:
+ g_value_set_int (value, icon->priv->padding);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -372,9 +393,58 @@ gtk_tray_icon_get_visual_property (GtkTrayIcon *icon)
XFree (prop.prop);
}
+static void
+gtk_tray_icon_get_padding_property (GtkTrayIcon *icon)
+{
+ GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (icon));
+ GdkDisplay *display = gdk_screen_get_display (screen);
+ Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
+
+ Atom type;
+ int format;
+ union {
+ gulong *prop;
+ guchar *prop_ch;
+ } prop = { NULL };
+ gulong nitems;
+ gulong bytes_after;
+ int error, result;
+
+ g_assert (icon->priv->manager_window != None);
+
+ gdk_error_trap_push ();
+ type = None;
+ result = XGetWindowProperty (xdisplay,
+ icon->priv->manager_window,
+ icon->priv->padding_atom,
+ 0, G_MAXLONG, FALSE,
+ XA_CARDINAL,
+ &type, &format, &nitems,
+ &bytes_after, &(prop.prop_ch));
+ error = gdk_error_trap_pop ();
+
+ if (!error && result == Success &&
+ type == XA_CARDINAL && nitems == 1 && format == 32)
+ {
+ gint padding;
+
+ padding = prop.prop[0];
+
+ if (icon->priv->padding != padding)
+ {
+ icon->priv->padding = padding;
+
+ g_object_notify (G_OBJECT (icon), "padding");
+ }
+ }
+
+ if (type != None)
+ XFree (prop.prop);
+}
+
static GdkFilterReturn
-gtk_tray_icon_manager_filter (GdkXEvent *xevent,
- GdkEvent *event,
+gtk_tray_icon_manager_filter (GdkXEvent *xevent,
+ GdkEvent *event,
gpointer user_data)
{
GtkTrayIcon *icon = user_data;
@@ -399,6 +469,11 @@ gtk_tray_icon_manager_filter (GdkXEvent *xevent,
gtk_tray_icon_get_orientation_property (icon);
}
+ else if (xev->xany.type == PropertyNotify &&
+ xev->xproperty.atom == icon->priv->padding_atom)
+ {
+ gtk_tray_icon_get_padding_property (icon);
+ }
else if (xev->xany.type == DestroyNotify)
{
GTK_NOTE (PLUGSOCKET,
@@ -504,6 +579,7 @@ gtk_tray_icon_update_manager_window (GtkTrayIcon *icon)
gtk_tray_icon_get_orientation_property (icon);
gtk_tray_icon_get_visual_property (icon);
+ gtk_tray_icon_get_padding_property (icon);
if (GTK_WIDGET_REALIZED (icon))
{
@@ -740,6 +816,14 @@ _gtk_tray_icon_get_orientation (GtkTrayIcon *icon)
return icon->priv->orientation;
}
+gint
+_gtk_tray_icon_get_padding (GtkTrayIcon *icon)
+{
+ g_return_val_if_fail (GTK_IS_TRAY_ICON (icon), 0);
+
+ return icon->priv->padding;
+}
+
#define __GTK_TRAY_ICON_X11_C__
#include "gtkaliasdef.c"
diff --git a/gtk/gtktrayicon.h b/gtk/gtktrayicon.h
index 4c1e184..6dc9852 100644
--- a/gtk/gtktrayicon.h
+++ b/gtk/gtktrayicon.h
@@ -69,7 +69,8 @@ void _gtk_tray_icon_cancel_message (GtkTrayIcon *icon,
guint id);
GtkOrientation _gtk_tray_icon_get_orientation (GtkTrayIcon *icon);
-
+gint _gtk_tray_icon_get_padding (GtkTrayIcon *icon);
+
G_END_DECLS
#endif /* __GTK_TRAY_ICON_H__ */
iconview-hang.patch:
gtkiconview.c | 5 +++++
1 file changed, 5 insertions(+)
--- NEW FILE iconview-hang.patch ---
diff -up gtk+-2.18.3/gtk/gtkiconview.c.icon-view-hang gtk+-2.18.3/gtk/gtkiconview.c
--- gtk+-2.18.3/gtk/gtkiconview.c.icon-view-hang 2009-10-09 01:00:44.000000000 -0400
+++ gtk+-2.18.3/gtk/gtkiconview.c 2009-10-23 20:09:18.670311545 -0400
@@ -1545,6 +1545,11 @@ gtk_icon_view_expose (GtkWidget *widget,
if (expose->window != icon_view->priv->bin_window)
return FALSE;
+ /* If a layout has been scheduled, do it now so that all
+ * cell view items have valid sizes before we proceed. */
+ if (icon_view->priv->layout_idle_id != 0)
+ gtk_icon_view_layout (icon_view);
+
cr = gdk_cairo_create (icon_view->priv->bin_window);
cairo_set_line_width (cr, 1.);
image-size-alloc.patch:
gtkimage.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
--- NEW FILE image-size-alloc.patch ---
--- /home/mclasen/git.gnome.org/gtk+/gtk/gtkimage.c 2009-06-04 15:18:04.063943764 -0400
+++ gtk+-2.18.3/gtk/gtkimage.c 2009-10-18 01:31:00.705062264 -0400
@@ -45,6 +45,7 @@
gchar *filename;
gint pixel_size;
+ guint need_calc_size : 1;
};
#define GTK_IMAGE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_IMAGE, GtkImagePrivate))
@@ -1710,6 +1711,7 @@
{
GtkImage *image;
GtkMisc *misc;
+ GtkImagePrivate *priv;
GdkRectangle area, image_bound;
gfloat xalign;
gint x, y, mask_x, mask_y;
@@ -1719,6 +1721,7 @@
image = GTK_IMAGE (widget);
misc = GTK_MISC (widget);
+ priv = GTK_IMAGE_GET_PRIVATE (image);
area = event->area;
@@ -1727,7 +1730,7 @@
* and size_request() if something explicitely forces
* a redraw.
*/
- if (widget->requisition.width == 0 && widget->requisition.height == 0)
+ if (priv->need_calc_size)
gtk_image_calc_size (image);
if (!gdk_rectangle_intersect (&area, &widget->allocation, &area))
@@ -1737,7 +1740,7 @@
xalign = misc->xalign;
else
xalign = 1.0 - misc->xalign;
-
+
x = floor (widget->allocation.x + misc->xpad
+ ((widget->allocation.width - widget->requisition.width) * xalign));
y = floor (widget->allocation.y + misc->ypad
@@ -2149,8 +2152,13 @@
void
gtk_image_clear (GtkImage *image)
{
- gtk_image_reset (image);
+ GtkImagePrivate *priv;
+
+ priv = GTK_IMAGE_GET_PRIVATE (image);
+
+ priv->need_calc_size = 1;
+ gtk_image_reset (image);
gtk_image_update_size (image, 0, 0);
}
@@ -2159,7 +2167,12 @@
{
GtkWidget *widget = GTK_WIDGET (image);
GdkPixbuf *pixbuf = NULL;
-
+ GtkImagePrivate *priv;
+
+ priv = GTK_IMAGE_GET_PRIVATE (image);
+
+ priv->need_calc_size = 0;
+
/* We update stock/icon set on every size request, because
* the theme could have affected the size; for other kinds of
* image, we just update the requisition when the image data
symbolic-color-parsing.patch:
gtkrc.c | 16 +++++++++++-----
gtksettings.c | 49 +++++++++++++++++++++++++++++++++----------------
2 files changed, 44 insertions(+), 21 deletions(-)
--- NEW FILE symbolic-color-parsing.patch ---
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c
index a2ac58b..70540a3 100644
--- a/gtk/gtkrc.c
+++ b/gtk/gtkrc.c
@@ -659,11 +659,15 @@ gtk_rc_color_hash_changed (GtkSettings *settings,
GParamSpec *pspec,
GtkRcContext *context)
{
- if (context->color_hash)
- g_hash_table_unref (context->color_hash);
-
+ GHashTable *old_hash;
+
+ old_hash = context->color_hash;
+
g_object_get (settings, "color-hash", &context->color_hash, NULL);
+ if (old_hash)
+ g_hash_table_unref (old_hash);
+
gtk_rc_reparse_all_for_settings (settings, TRUE);
}
@@ -3148,8 +3152,10 @@ gtk_rc_parse_style (GtkRcContext *context,
break;
case GTK_RC_TOKEN_COLOR:
if (our_hash == NULL)
- gtk_rc_style_prepend_empty_color_hash (rc_style);
- our_hash = rc_priv->color_hashes->data;
+ {
+ gtk_rc_style_prepend_empty_color_hash (rc_style);
+ our_hash = rc_priv->color_hashes->data;
+ }
token = gtk_rc_parse_logical_color (scanner, rc_style, our_hash);
break;
case G_TOKEN_IDENTIFIER:
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 4917263..2b6b24e 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -2190,8 +2190,8 @@ settings_update_color_scheme (GtkSettings *settings)
}
static gboolean
-add_color_to_hash (gchar *name,
- GdkColor *color,
+add_color_to_hash (gchar *name,
+ GdkColor *color,
GHashTable *target)
{
GdkColor *old;
@@ -2200,7 +2200,7 @@ add_color_to_hash (gchar *name,
if (!old || !gdk_color_equal (old, color))
{
g_hash_table_insert (target, g_strdup (name), gdk_color_copy (color));
-
+
return TRUE;
}
@@ -2208,7 +2208,7 @@ add_color_to_hash (gchar *name,
}
static gboolean
-add_colors_to_hash_from_string (GHashTable *hash,
+add_colors_to_hash_from_string (GHashTable *hash,
const gchar *colors)
{
gchar *s, *p, *name;
@@ -2256,24 +2256,27 @@ add_colors_to_hash_from_string (GHashTable *hash,
static gboolean
update_color_hash (ColorSchemeData *data,
- const gchar *str,
+ const gchar *str,
GtkSettingsSource source)
{
gboolean changed = FALSE;
gint i;
GHashTable *old_hash;
+ GHashTableIter iter;
+ gchar *name;
+ GdkColor *color;
- if ((str == NULL || *str == '\0') &&
+ if ((str == NULL || *str == '\0') &&
(data->lastentry[source] == NULL || data->lastentry[source][0] == '\0'))
return FALSE;
if (str && data->lastentry[source] && strcmp (str, data->lastentry[source]) == 0)
return FALSE;
- /* For the RC_FILE source we merge the values rather than over-writing
+ /* For the RC_FILE source we merge the values rather than over-writing
* them, since multiple rc files might define independent sets of colors
*/
- if ((source != GTK_SETTINGS_SOURCE_RC_FILE) &&
+ if ((source != GTK_SETTINGS_SOURCE_RC_FILE) &&
data->tables[source] && g_hash_table_size (data->tables[source]) > 0)
{
g_hash_table_unref (data->tables[source]);
@@ -2282,22 +2285,36 @@ update_color_hash (ColorSchemeData *data,
}
if (data->tables[source] == NULL)
- data->tables[source] = g_hash_table_new_full (g_str_hash, g_str_equal,
+ data->tables[source] = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free,
(GDestroyNotify) gdk_color_free);
g_free (data->lastentry[source]);
data->lastentry[source] = g_strdup (str);
-
+
changed |= add_colors_to_hash_from_string (data->tables[source], str);
if (!changed)
return FALSE;
-
+
/* Rebuild the merged hash table. */
- old_hash = data->color_hash;
- data->color_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
- (GDestroyNotify) gdk_color_free);
+ if (data->color_hash)
+ {
+ old_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
+ (GDestroyNotify) gdk_color_free);
+
+ g_hash_table_iter_init (&iter, data->color_hash);
+ while (g_hash_table_iter_next (&iter, &name, &color))
+ {
+ g_hash_table_insert (old_hash, name, color);
+ g_hash_table_iter_steal (&iter);
+ }
+ }
+ else
+ {
+ old_hash = NULL;
+ }
+
for (i = 0; i <= GTK_SETTINGS_SOURCE_APPLICATION; i++)
{
if (data->tables[i])
@@ -2324,13 +2341,13 @@ update_color_hash (ColorSchemeData *data,
{
changed = TRUE;
break;
- }
+ }
}
}
g_hash_table_unref (old_hash);
}
- else
+ else
changed = TRUE;
return changed;
toolbutton-assert.patch:
gtktoolbutton.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--- NEW FILE toolbutton-assert.patch ---
diff -up gtk+-2.18.3/gtk/gtktoolbutton.c.toolbutton-assert gtk+-2.18.3/gtk/gtktoolbutton.c
--- gtk+-2.18.3/gtk/gtktoolbutton.c.toolbutton-assert 2009-10-16 10:38:56.000000000 -0400
+++ gtk+-2.18.3/gtk/gtktoolbutton.c 2009-10-26 01:12:26.146186990 -0400
@@ -916,11 +916,15 @@ gtk_tool_button_set_label (GtkToolButton
button->priv->label_text = g_strdup (label);
button->priv->contents_invalid = TRUE;
- elided_label = _gtk_toolbar_elide_underscores (label);
- accessible = gtk_widget_get_accessible (GTK_WIDGET (button->priv->button));
- atk_object_set_name (accessible, elided_label);
+ if (label)
+ {
+ elided_label = _gtk_toolbar_elide_underscores (label);
+ accessible = gtk_widget_get_accessible (GTK_WIDGET (button->priv->button));
+ atk_object_set_name (accessible, elided_label);
+
+ g_free (elided_label);
+ }
- g_free (elided_label);
g_free (old_label);
g_object_notify (G_OBJECT (button), "label");
tooltip-positioning.patch:
gtktooltip.c | 147 +++++++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 113 insertions(+), 34 deletions(-)
--- NEW FILE tooltip-positioning.patch ---
diff -up gtk+-2.18.3/gtk/gtktooltip.c.positioning gtk+-2.18.3/gtk/gtktooltip.c
--- gtk+-2.18.3/gtk/gtktooltip.c.positioning 2009-10-23 13:12:16.205437913 -0400
+++ gtk+-2.18.3/gtk/gtktooltip.c 2009-10-23 13:52:15.922749329 -0400
@@ -1023,57 +1023,134 @@ gtk_tooltip_position (GtkTooltip *toolti
GtkWidget *new_tooltip_widget)
{
gint x, y;
+ gint wx, wy;
GdkScreen *screen;
+ gint monitor_num;
+ GdkRectangle monitor;
+ GtkRequisition requisition;
+ guint cursor_size;
+
+#define MAX_DISTANCE 32
tooltip->tooltip_widget = new_tooltip_widget;
+ screen = gtk_widget_get_screen (new_tooltip_widget);
+
+ gtk_widget_size_request (GTK_WIDGET (tooltip->current_window), &requisition);
+
+ monitor_num = gdk_screen_get_monitor_at_point (screen,
+ tooltip->last_x,
+ tooltip->last_y);
+ gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+
+ gdk_window_get_origin (new_tooltip_widget->window, &wx, &wy);
+ if (GTK_WIDGET_NO_WINDOW (new_tooltip_widget))
+ {
+ wx += new_tooltip_widget->allocation.x;
+ wy += new_tooltip_widget->allocation.y;
+ }
+
/* Position the tooltip */
- /* FIXME: should we swap this when RTL is enabled? */
- if (tooltip->keyboard_mode_enabled)
+
+ cursor_size = gdk_display_get_default_cursor_size (display);
+
+ /* Try below */
+ x = wx + new_tooltip_widget->allocation.width / 2 - requisition.width / 2;
+ y = wy + new_tooltip_widget->allocation.height + 4;
+
+ if (y + requisition.height <= monitor.y + monitor.height)
{
- gdk_window_get_origin (new_tooltip_widget->window, &x, &y);
- if (GTK_WIDGET_NO_WINDOW (new_tooltip_widget))
+ if (tooltip->keyboard_mode_enabled)
+ goto found;
+
+ if (y <= tooltip->last_y + cursor_size + MAX_DISTANCE)
{
- x += new_tooltip_widget->allocation.x;
- y += new_tooltip_widget->allocation.y;
- }
+ if (tooltip->last_x + cursor_size + MAX_DISTANCE < x)
+ x = tooltip->last_x + cursor_size + MAX_DISTANCE;
+ else if (x + requisition.width < tooltip->last_x - MAX_DISTANCE)
+ x = tooltip->last_x - MAX_DISTANCE - requisition.width;
- /* For keyboard mode we position the tooltip below the widget,
- * right of the center of the widget.
- */
- x += new_tooltip_widget->allocation.width / 2;
- y += new_tooltip_widget->allocation.height + 4;
+ goto found;
+ }
+ }
+
+ /* Try above */
+ x = wx + new_tooltip_widget->allocation.width / 2 - requisition.width / 2;
+ y = wy - requisition.height - 4;
+
+ if (y >= monitor.y)
+ {
+ if (tooltip->keyboard_mode_enabled)
+ goto found;
+
+ if (y + requisition.height >= tooltip->last_y - MAX_DISTANCE)
+ {
+ if (tooltip->last_x + cursor_size + MAX_DISTANCE < x)
+ x = tooltip->last_x + cursor_size + MAX_DISTANCE;
+ else if (x + requisition.width < tooltip->last_x - MAX_DISTANCE)
+ x = tooltip->last_x - MAX_DISTANCE - requisition.width;
+
+ goto found;
+ }
}
- else
+
+ /* Try right FIXME: flip on rtl ? */
+ x = wx + new_tooltip_widget->allocation.width + 4;
+ y = wy + new_tooltip_widget->allocation.height / 2 - requisition.height / 2;
+
+ if (x + requisition.width <= monitor.x + monitor.width)
{
- guint cursor_size;
+ if (tooltip->keyboard_mode_enabled)
+ goto found;
- x = tooltip->last_x;
- y = tooltip->last_y;
+ if (x <= tooltip->last_x + cursor_size + MAX_DISTANCE)
+ {
+ if (tooltip->last_y + cursor_size + MAX_DISTANCE < y)
+ y = tooltip->last_y + cursor_size + MAX_DISTANCE;
+ else if (y + requisition.height < tooltip->last_y - MAX_DISTANCE)
+ y = tooltip->last_y - MAX_DISTANCE - requisition.height;
- /* For mouse mode, we position the tooltip right of the cursor,
- * a little below the cursor's center.
- */
- cursor_size = gdk_display_get_default_cursor_size (display);
- x += cursor_size / 2;
- y += cursor_size / 2;
+ goto found;
+ }
}
- screen = gtk_widget_get_screen (new_tooltip_widget);
+ /* Try left FIXME: flip on rtl ? */
+ x = wx - requisition.width - 4;
+ y = wy + new_tooltip_widget->allocation.height / 2 - requisition.height / 2;
- /* Show it */
- if (tooltip->current_window)
+ if (x >= monitor.x)
{
- gint monitor_num;
- GdkRectangle monitor;
- GtkRequisition requisition;
+ if (tooltip->keyboard_mode_enabled)
+ goto found;
- gtk_widget_size_request (GTK_WIDGET (tooltip->current_window),
- &requisition);
+ if (x + requisition.width >= tooltip->last_x - MAX_DISTANCE)
+ {
+ if (tooltip->last_y + cursor_size + MAX_DISTANCE < y)
+ y = tooltip->last_y + cursor_size + MAX_DISTANCE;
+ else if (y + requisition.height < tooltip->last_y - MAX_DISTANCE)
+ y = tooltip->last_y - MAX_DISTANCE - requisition.height;
- monitor_num = gdk_screen_get_monitor_at_point (screen, x, y);
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+ goto found;
+ }
+ }
+ /* Fallback */
+ if (tooltip->keyboard_mode_enabled)
+ {
+ x = wx + new_tooltip_widget->allocation.width / 2 - requisition.width / 2;
+ y = wy + new_tooltip_widget->allocation.height + 4;
+ }
+ else
+ {
+ /* At cursor */
+ x = tooltip->last_x + cursor_size * 3 / 4;
+ y = tooltip->last_y + cursor_size * 3 / 4;
+ }
+
+found:
+ /* Show it */
+ if (tooltip->current_window)
+ {
if (x + requisition.width > monitor.x + monitor.width)
x -= x - (monitor.x + monitor.width) + requisition.width;
else if (x < monitor.x)
@@ -1081,7 +1158,9 @@ gtk_tooltip_position (GtkTooltip *toolti
if (y + requisition.height > monitor.y + monitor.height)
y -= y - (monitor.y + monitor.height) + requisition.height;
-
+ else if (y < monitor.y)
+ y = monitor.y;
+
if (!tooltip->keyboard_mode_enabled)
{
/* don't pop up under the pointer */
@@ -1089,7 +1168,7 @@ gtk_tooltip_position (GtkTooltip *toolti
y <= tooltip->last_y && tooltip->last_y < y + requisition.height)
y = tooltip->last_y - requisition.height - 2;
}
-
+
gtk_window_move (GTK_WINDOW (tooltip->current_window), x, y);
gtk_widget_show (GTK_WIDGET (tooltip->current_window));
}
Index: gtk2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gtk2/devel/gtk2.spec,v
retrieving revision 1.407
retrieving revision 1.408
diff -u -p -r1.407 -r1.408
--- gtk2.spec 28 Sep 2009 16:47:25 -0000 1.407
+++ gtk2.spec 2 Nov 2009 04:22:13 -0000 1.408
@@ -11,13 +11,13 @@
%define libpng_version 2:1.2.2-16
%define xrandr_version 1.2.99.4-2
-%define base_version 2.18.0
+%define base_version 2.18.3
%define bin_version 2.10.0
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk2
Version: %{base_version}
-Release: 5%{?dist}
+Release: 16%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
Source: http://download.gnome.org/sources/gtk+/2.18/gtk+-%{version}.tar.bz2
@@ -27,15 +27,25 @@ Source3: im-cedilla.conf
# Biarch changes
Patch0: gtk+-2.13.5-lib64.patch
-
-# https://bugzilla.gnome.org/show_bug.cgi?id=566522
-Patch1: gtk2-printing-smb-auth.patch
-# https://bugzilla.gnome.org/show_bug.cgi?id=586207
-Patch2: gtk2-printing-nonblocking-printer-list.patch
+Patch1: system-python.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=583273
+Patch2: icon-padding.patch
+# from upstream
+Patch3: image-size-alloc.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=599617
+Patch4: fresh-tooltips.patch
+# from upstream
+Patch5: allow-set-hint.patch
# from upstream
-Patch3: fix-anchors.patch
+Patch6: compose-sequences.patch
# from upstream
-Patch4: iconview-crash.patch
+Patch7: symbolic-color-parsing.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=599618
+Patch8: tooltip-positioning.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=581150
+Patch9: iconview-hang.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=599446
+Patch10: toolbutton-assert.patch
BuildRequires: atk-devel >= %{atk_version}
BuildRequires: pango-devel >= %{pango_version}
@@ -147,15 +157,16 @@ This package contains developer document
%setup -q -n gtk+-%{version}
%patch0 -p1 -b .lib64
-%patch1 -p1 -b .printing-smb-auth
-%patch2 -p1 -b .printing-nonblocking-printer-list
-%patch3 -p1 -b .fix-anchors
-%patch4 -p1 -b .iconview-crash
-
-# make sure that gtkmarshalers.{c, h} get regenerated during the build
-# - caused by print_authentication.patch
-rm --force ./gtk/gtkmarshalers.c
-rm --force ./gtk/gtkmarshalers.h
+%patch1 -p1 -b .system-python
+%patch2 -p1 -b .icon-padding
+%patch3 -p1 -b .image-size-alloc
+%patch4 -p1 -b .fresh-tooltips
+%patch5 -p1 -b .allow-set-hint
+%patch6 -p1 -b .compose-sequences
+%patch7 -p1 -b .symbolic-color-parsing
+%patch8 -p1 -b .tooltip-positioning
+%patch9 -p1 -b .iconview-hang
+%patch10 -p1 -b .toolbutton-assert
%build
libtoolize --force --copy
@@ -392,6 +403,67 @@ fi
%changelog
+* Sat Oct 31 2009 Matthias Clasen <mclasen at redhta.com> - 2.18.3-16
+- Handle screen changes for tooltips (#531568)
+
+* Wed Oct 28 2009 Matthias Clasen <mclasen at redhta.com> - 2.18.3-15
+- Work around a bug in the X automatic compositor (#531443)
+
+* Wed Oct 28 2009 Matthias Clasen <mclasen at redhta.com> - 2.18.3-14
+- Make the new tooltips sharp
+- Improve the Metacity compositor workaround for new tooltips
+
+* Mon Oct 26 2009 Matthias Clasen <mclasen at redhta.com> - 2.18.3-12
+- Fix a possible assertion failure in GtkToolButton
+
+* Fri Oct 23 2009 Matthew Barnes <mbarnes at redhat.com> - 2.18.3-11
+- Fix a GtkIconView hang
+
+* Fri Oct 23 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.3-10
+- Tweak tooltip positioning
+- Make new tooltip style an opt-in theme choice
+
+* Thu Oct 22 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.3-9
+- Fix a problem with parsing symbolic colors in rc files (#528662)
+
+* Thu Oct 22 2009 Peter Hutterer <peter.hutterer at redhat.com> - 2.18.3-8
+- compose-sequences.patch: update compose sequences to what's currently in
+ libX11 git.
+
+* Wed Oct 21 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.3-7
+- Try to catch some nm-applet problems by rejecting requests to
+ load icons at size 0
+
+* Wed Oct 21 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.3-6
+- Hack around metacity compositor limitations
+
+* Wed Oct 21 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.3-5
+- Tweak tooltip appearance
+
+* Tue Oct 20 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.3-4
+- Make tooltips look nicer
+
+* Sun Oct 18 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.3-3
+- Fix a size allocation problem uncovered by the previous patch
+
+* Sat Oct 17 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.3-2
+- Support padding around status icons
+
+* Sat Oct 17 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.3-1
+- Update to 2.18.3
+
+* Tue Oct 13 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.2-3
+- Make gtk-builder-convert use system python
+
+* Fri Oct 9 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.2-2
+- Make selecting the final char work again (#528072)
+
+* Mon Oct 5 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.2-1
+- Update to 2.18.2
+
+* Wed Sep 30 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.1-1
+- Update to 2.18.1
+
* Mon Sep 28 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.0-3
- Fix a crash in the appearance capplet
--- appearance-crash.patch DELETED ---
--- csw-fixes.patch DELETED ---
--- dont-use-deprecated-api.patch DELETED ---
--- entry-include-fix.patch DELETED ---
--- fix-anchors.patch DELETED ---
--- gdm-background.patch DELETED ---
--- gtk-bell.patch DELETED ---
--- gtk2-fix-install.patch DELETED ---
--- gtk2-printing-nonblocking-printer-list.patch DELETED ---
--- gtk2-printing-smb-auth.patch DELETED ---
--- iconview-crash.patch DELETED ---
--- print_authentication.patch DELETED ---
--- root-event-mask.patch DELETED ---
--- set-cursor.patch DELETED ---
More information about the scm-commits
mailing list