components/desktop/pidgin/patches/pidgin-11-gtkstatusicon.patch
author Rich Burridge <rich.burridge@oracle.com>
Mon, 16 Nov 2015 16:48:46 -0800
changeset 5091 81e5d6b75c3c
permissions -rw-r--r--
22185024 Move pidgin from Desktop to Userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5091
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
# date:2009-10-08 owner:migi type:bug bugster:6888304
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# Bug 15594310 SUNBT6888304 panel applets should use transparent background
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# These changes should be submitted upstream.
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
--- pidgin-2.7.0/pidgin/pidginstock.c.orig2	2010-05-13 15:50:55.216839611 +0800
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
+++ pidgin-2.7.0/pidgin/pidginstock.c	2010-05-13 16:01:04.013877323 +0800
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
@@ -334,7 +334,8 @@
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
 
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
 static void
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
 add_sized_icon(GtkIconSet *iconset, GtkIconSize sizeid, PidginIconTheme *theme,
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
-		const char *size, SizedStockIcon sized_icon, gboolean translucent)
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
+		const char *size, SizedStockIcon sized_icon, gboolean translucent,
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
+                gboolean size_wildcarded)
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
 {
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
 	char *filename;
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
 	GtkIconSource *source;
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
@@ -355,7 +356,7 @@
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
 	gtk_icon_source_set_direction(source, GTK_TEXT_DIR_LTR);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
 	gtk_icon_source_set_direction_wildcarded(source, !sized_icon.rtl);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
 	gtk_icon_source_set_size(source, sizeid);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
-	gtk_icon_source_set_size_wildcarded(source, FALSE);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
+	gtk_icon_source_set_size_wildcarded(source, size_wildcarded);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
 	gtk_icon_source_set_state_wildcarded(source, TRUE);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
 	gtk_icon_set_add_source(iconset, source);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
 	gtk_icon_source_free(source);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
@@ -365,7 +366,7 @@
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
 		gtk_icon_source_set_pixbuf(source, pixbuf);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
 		gtk_icon_source_set_direction_wildcarded(source, TRUE);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
 		gtk_icon_source_set_size(source, GTK_ICON_SIZE_MENU);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
-		gtk_icon_source_set_size_wildcarded(source, FALSE);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
+		gtk_icon_source_set_size_wildcarded(source, size_wildcarded);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
 		gtk_icon_source_set_state_wildcarded(source, TRUE);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
 		gtk_icon_set_add_source(iconset, source);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
 		gtk_icon_source_free(source);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
@@ -389,7 +390,7 @@
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
 		gtk_icon_source_set_filename(source, filename);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    38
 		gtk_icon_source_set_direction(source, GTK_TEXT_DIR_RTL);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    39
 		gtk_icon_source_set_size(source, sizeid);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
-		gtk_icon_source_set_size_wildcarded(source, FALSE);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41
+		gtk_icon_source_set_size_wildcarded(source, size_wildcarded);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
 		gtk_icon_source_set_state_wildcarded(source, TRUE);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
 		gtk_icon_set_add_source(iconset, source);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
 		g_free(filename);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
@@ -445,9 +446,9 @@
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
 
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
 #define ADD_SIZED_ICON(name, size) \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
 		if (sized_status_icons[i].name) { \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
-			add_sized_icon(normal, name, PIDGIN_ICON_THEME(theme), size, sized_status_icons[i], FALSE); \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    50
+			add_sized_icon(normal, name, PIDGIN_ICON_THEME(theme), size, sized_status_icons[i], FALSE,FALSE); \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    51
 			if (sized_status_icons[i].translucent_name) \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    52
-				add_sized_icon(translucent, name, PIDGIN_ICON_THEME(theme), size, sized_status_icons[i], TRUE); \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
+				add_sized_icon(translucent, name, PIDGIN_ICON_THEME(theme), size, sized_status_icons[i], TRUE,FALSE); \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    54
 		}
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    55
 		ADD_SIZED_ICON(microscopic, "11");
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
 		ADD_SIZED_ICON(extra_small, "16");
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    57
@@ -474,9 +475,9 @@
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    58
 
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
 #define ADD_SIZED_ICON(name, size) \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    60
 		if (sized_tray_icons[i].name) { \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    61
-			add_sized_icon(normal, name, PIDGIN_ICON_THEME(theme), size, sized_tray_icons[i], FALSE); \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    62
+			add_sized_icon(normal, name, PIDGIN_ICON_THEME(theme), size, sized_tray_icons[i], FALSE,TRUE); \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    63
 			if (sized_tray_icons[i].translucent_name) \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    64
-				add_sized_icon(translucent, name, PIDGIN_ICON_THEME(theme), size, sized_tray_icons[i], TRUE); \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    65
+				add_sized_icon(translucent, name, PIDGIN_ICON_THEME(theme), size, sized_tray_icons[i], TRUE,TRUE); \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    66
 		}
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
 		ADD_SIZED_ICON(extra_small, "16x16");
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    68
 		ADD_SIZED_ICON(small, "22x22");
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    69
@@ -564,7 +565,7 @@
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    70
 
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    71
 #define ADD_SIZED_ICON(name, size) \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    72
 		if (sized_stock_icons[i].name) \
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    73
-			add_sized_icon(iconset, name, PIDGIN_ICON_THEME(theme), size, sized_stock_icons[i], FALSE);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    74
+			add_sized_icon(iconset, name, PIDGIN_ICON_THEME(theme), size, sized_stock_icons[i], FALSE,FALSE);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    75
 		ADD_SIZED_ICON(microscopic, "11");
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    76
 		ADD_SIZED_ICON(extra_small, "16");
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    77
 		ADD_SIZED_ICON(small, "22");