changeset 7662:63ac63ec4b46

[gaim-migrate @ 8306] Mac OS X already has drop shadows, and the drop shadows for the tooltips look kind of funny on OSX anyway... So this patch turns off drop shadows on OSX even if we're using Gtk2.2. At least, I assume it does, since I'm running 2.0 anyway. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Sat, 29 Nov 2003 17:03:21 +0000
parents 11cf58db372e
children 86be4a8dc0a5
files src/gtkblist.c
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkblist.c	Sat Nov 29 13:55:49 2003 +0000
+++ b/src/gtkblist.c	Sat Nov 29 17:03:21 2003 +0000
@@ -52,6 +52,10 @@
 #include <gtk/gtk.h>
 #include <gdk/gdk.h>
 
+#if (GTK_CHECK_VERSION(2,2,0) && !(defined(__APPLE__) && defined(__MACH__)))
+#define WANT_DROP_SHADOW
+#endif
+
 typedef struct
 {
 	GaimAccount *account;
@@ -113,7 +117,7 @@
 	gboolean contact_expanded;
 };
 
-#if GTK_CHECK_VERSION(2,2,0)
+#ifdef WANT_DROP_SHADOW
 /**************************** Weird drop shadow stuff *******************/
 /* This is based on a patch for drop shadows in GTK menus available at http://www.xfce.org/gtkmenu-shadow/ */
 
@@ -1291,7 +1295,7 @@
 	g_object_unref (layout);
 	g_free(tooltiptext);
 
-#if GTK_CHECK_VERSION(2,2,0)
+#ifdef WANT_DROP_SHADOW
 	shadow_paint(gtkblist, NULL, EAST_SIDE);	
 	shadow_paint(gtkblist, NULL, SOUTH_SIDE);	
 #endif
@@ -1310,7 +1314,7 @@
 	gboolean tooltip_top = FALSE;
 	char *tooltiptext = NULL;
 	struct _gaim_gtk_blist_node *gtknode;
-#if GTK_CHECK_VERSION(2,2,0)
+#ifdef WANT_DROP_SHADOW
 	GdkWindowAttr attr;
 #endif
 
@@ -1367,7 +1371,7 @@
 			G_CALLBACK(gaim_gtk_blist_paint_tip), node);
 	gtk_widget_ensure_style (gtkblist->tipwindow);
 	
-#if GTK_CHECK_VERSION(2,2,0)
+#ifdef WANT_DROP_SHADOW
 	attr.window_type = GDK_WINDOW_TEMP;
 	attr.override_redirect = TRUE;
 	attr.x = gtkblist->tipwindow->allocation.x;
@@ -1430,7 +1434,7 @@
 	gtk_window_move(GTK_WINDOW(gtkblist->tipwindow), x, y);
 	gtk_widget_show(gtkblist->tipwindow);
 
-#if GTK_CHECK_VERSION(2,2,0)
+#ifdef WANT_DROP_SHADOW
 	map_shadow_windows(gtkblist);
 #endif
 
@@ -1446,7 +1450,7 @@
 		/* We've left the cell.  Remove the timeout and create a new one below */
 		if (gtkblist->tipwindow) {
 			gtk_widget_destroy(gtkblist->tipwindow);
-#if GTK_CHECK_VERSION(2,2,0)
+#ifdef WANT_DROP_SHADOW
 			  gdk_window_set_user_data (gtkblist->east_shadow, NULL);
 			  gdk_window_destroy (gtkblist->east_shadow);
 			  gtkblist->east_shadow = NULL;
@@ -1485,7 +1489,7 @@
 	}
 	if (gtkblist->tipwindow) {
 		gtk_widget_destroy(gtkblist->tipwindow);
-#if GTK_CHECK_VERSION(2,2,0)
+#ifdef WANT_DROP_SHADOW
 		 gdk_window_set_user_data (gtkblist->east_shadow, NULL);
 			  gdk_window_destroy (gtkblist->east_shadow);
 			  gtkblist->east_shadow = NULL;