src/gtkblist.c

changeset 10968
7f5963c40b21
parent 10924
248233a58180
child 10992
ccf59743dae4
equal deleted inserted replaced
10967:0cf6ccaf10ec 10968:7f5963c40b21
58 58
59 #include <gdk/gdkkeysyms.h> 59 #include <gdk/gdkkeysyms.h>
60 #include <gtk/gtk.h> 60 #include <gtk/gtk.h>
61 #include <gdk/gdk.h> 61 #include <gdk/gdk.h>
62 62
63 #if (GTK_CHECK_VERSION(2,2,0) && !(defined(__APPLE__) && defined(__MACH__))) 63 /* if someone explicitly asked for drop shadows, we also need to make
64 #define WANT_DROP_SHADOW 64 sure that their environment can support it. If not, tough */
65 #ifdef WANT_DROP_SHADOW
66 # if !GTK_CHECK_VERSION(2,2,0) || (defined(__APPLE__) && defined(__MACH__))
67 # undef WANT_DROP_SHADOW
68 # endif
65 #endif 69 #endif
66 70
67 typedef struct 71 typedef struct
68 { 72 {
69 GaimAccount *account; 73 GaimAccount *account;
132 static void redo_buddy_list(GaimBuddyList *list, gboolean remove); 136 static void redo_buddy_list(GaimBuddyList *list, gboolean remove);
133 static void gaim_gtk_blist_collapse_contact_cb(GtkWidget *w, GaimBlistNode *node); 137 static void gaim_gtk_blist_collapse_contact_cb(GtkWidget *w, GaimBlistNode *node);
134 138
135 static void show_rename_group(GtkWidget *unused, GaimGroup *g); 139 static void show_rename_group(GtkWidget *unused, GaimGroup *g);
136 140
137 static gboolean xcomposite_is_present();
138
139 struct _gaim_gtk_blist_node { 141 struct _gaim_gtk_blist_node {
140 GtkTreeRowReference *row; 142 GtkTreeRowReference *row;
141 gboolean contact_expanded; 143 gboolean contact_expanded;
142 }; 144 };
145
143 146
144 #ifdef WANT_DROP_SHADOW 147 #ifdef WANT_DROP_SHADOW
145 /**************************** Weird drop shadow stuff *******************/ 148 /**************************** Weird drop shadow stuff *******************/
146 /* This is based on a patch for drop shadows in GTK+ menus available at 149 /* This is based on a patch for drop shadows in GTK+ menus available at
147 * http://www.xfce.org/gtkmenu-shadow/ 150 * http://www.xfce.org/gtkmenu-shadow/
415 418
416 return FALSE; 419 return FALSE;
417 } 420 }
418 421
419 /**************** END WEIRD DROP SHADOW STUFF ***********************************/ 422 /**************** END WEIRD DROP SHADOW STUFF ***********************************/
420 #endif 423 #endif /* ifdef WANT_DROP_SHADOW */
424
421 425
422 static char dim_grey_string[8] = ""; 426 static char dim_grey_string[8] = "";
423 static char *dim_grey() 427 static char *dim_grey()
424 { 428 {
425 if (!gtkblist) 429 if (!gtkblist)
2377 gtkblist->south_shadow = gdk_window_new(gtk_widget_get_root_window(gtkblist->tipwindow), &attr, 2381 gtkblist->south_shadow = gdk_window_new(gtk_widget_get_root_window(gtkblist->tipwindow), &attr,
2378 GDK_WA_NOREDIR | GDK_WA_VISUAL | GDK_WA_COLORMAP); 2382 GDK_WA_NOREDIR | GDK_WA_VISUAL | GDK_WA_COLORMAP);
2379 gdk_window_set_user_data (gtkblist->south_shadow, gtkblist->tipwindow); 2383 gdk_window_set_user_data (gtkblist->south_shadow, gtkblist->tipwindow);
2380 gdk_window_set_back_pixmap (gtkblist->south_shadow, NULL, FALSE); 2384 gdk_window_set_back_pixmap (gtkblist->south_shadow, NULL, FALSE);
2381 } 2385 }
2382 #endif 2386 #endif /* ifdef WANT_DROP_SHADOW */
2383 2387
2384 layout = gtk_widget_create_pango_layout (gtkblist->tipwindow, NULL); 2388 layout = gtk_widget_create_pango_layout (gtkblist->tipwindow, NULL);
2385 pango_layout_set_wrap(layout, PANGO_WRAP_WORD); 2389 pango_layout_set_wrap(layout, PANGO_WRAP_WORD);
2386 pango_layout_set_width(layout, 300000); 2390 pango_layout_set_width(layout, 300000);
2387 pango_layout_set_markup(layout, tooltiptext, strlen(tooltiptext)); 2391 pango_layout_set_markup(layout, tooltiptext, strlen(tooltiptext));

mercurial