# HG changeset patch # User Luke Schierer # Date 1040950347 0 # Node ID 78eeef03b4192fbb6b1e221775bba4b55049928a # Parent 06427e5560a465f7a3d16e40eba5dd3fd7b200b6 [gaim-migrate @ 4365] reverting to somethign that both works and compiles committer: Tailor Script diff -r 06427e5560a4 -r 78eeef03b419 src/conversation.c --- a/src/conversation.c Thu Dec 26 16:16:59 2002 +0000 +++ b/src/conversation.c Fri Dec 27 00:52:27 2002 +0000 @@ -2657,7 +2657,7 @@ void convo_switch(GtkNotebook *notebook, GtkWidget *page, gint page_num, gpointer data) { GtkWidget *label = NULL; - GdkColor color; + GtkStyle *style; struct conversation *c; if ((convo_options & OPT_CONVO_COMBINE) && @@ -2687,11 +2687,6 @@ gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); gtk_widget_set_style(label, style); gtk_style_unref(style); -/* color.red = 0x0000; - color.green = 0x0000; - color.blue = 0x0000; - gtk_widget_modify_fg(label, GTK_STATE_NORMAL, &color); -*/ if (c) c->unseen = 0; @@ -2725,37 +2720,32 @@ return; debug_printf("update_convo_status called for %s\n", c->name); if (im_options & OPT_IM_ONE_WINDOW) { /* We'll make the tab green */ + GtkStyle *style; GtkWidget *label = c->tab_label; - GdkColor color; + style = gtk_style_new(); + if (!GTK_WIDGET_REALIZED(label)) + gtk_widget_realize(label); + gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); if(c->typing_state == TYPING) { - color.red = 0x0000; - color.green = 0x9999; - color.blue = 0x0000; + style->fg[0].red = 0x0000; + style->fg[0].green = 0x9999; + style->fg[0].blue = 0x0000; } else if(c->typing_state == TYPED) { - color.red = 0xffff; - color.green = 0xbbbb; - color.blue = 0x2222; + style->fg[0].red = 0xffff; + style->fg[0].green = 0xbbbb; + style->fg[0].blue = 0x2222; } else if(c->unseen == 2) { - color.red = 0x0000; - color.green = 0x0000; - color.blue = 0xcccc; + style->fg[0].red = 0x0000; + style->fg[0].green = 0x0000; + style->fg[0].blue = 0xcccc; } else if(c->unseen == 1) { - color.red = 0xcccc; - color.green = 0x0000; - color.blue = 0x0000; - } else { - style = gtk_style_new(); - gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); - gtk_widget_set_style(label, style); - gtk_style_unref(style); - /* - color.red = 0x0000; - color.green = 0x0000; - color.blue = 0x0000; - */ + style->fg[0].red = 0xcccc; + style->fg[0].green = 0x0000; + style->fg[0].blue = 0x0000; } - gtk_widget_modify_fg(label, GTK_STATE_NORMAL, &color); + gtk_widget_set_style(label, style); debug_printf("setting style\n"); + gtk_style_unref(style); } else { GtkWindow *win = (GtkWindow *)c->window; char *buf, *buf2;