fix a gtk bug from gaim cvs, reported and tested by jolan luff

This commit is contained in:
jcs 2002-11-03 02:03:24 +00:00
parent d1ec188891
commit f5af625085

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-src_buddy_c,v 1.1 2002/11/03 02:03:24 jcs Exp $
--- src/buddy.c.orig Mon Oct 14 17:23:58 2002
+++ src/buddy.c Sat Nov 2 19:44:13 2002
@@ -2200,7 +2200,7 @@
time_t t;
int ihrs, imin;
struct buddy *b;
- GtkStyle *style;
+ GtkStyle *style = NULL;
char infotip[2048];
char warn[256];
@@ -2231,10 +2231,13 @@
if (blist_options & OPT_BLIST_SHOW_IDLETIME)
gtk_widget_show(bs->idle);
- style = gtk_style_copy( gtk_rc_get_style(bs->label) );
- for (i = 0; i < 5; i++)
- style->fg[i] = bs->idle->style->fg[i];
+ if(gtk_rc_get_style(bs->label))
+ style = gtk_style_copy( gtk_rc_get_style(bs->label) );
+ if(!style)
+ style = gtk_style_new();
if ((blist_options & OPT_BLIST_GREY_IDLERS) && (b->idle)) {
+ for (i = 0; i < 5; i++)
+ style->fg[i] = bs->idle->style->fg[i];
style->fg[GTK_STATE_NORMAL].red =
(style->fg[GTK_STATE_NORMAL].red / 2) + (style->base[GTK_STATE_NORMAL].red / 2);
style->fg[GTK_STATE_NORMAL].green =