Mercurial > pidgin
comparison src/conversation.c @ 4147:78eeef03b419
[gaim-migrate @ 4365]
reverting to somethign that both works and compiles
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 27 Dec 2002 00:52:27 +0000 |
parents | 06427e5560a4 |
children | fcc6db86f5c7 |
comparison
equal
deleted
inserted
replaced
4146:06427e5560a4 | 4147:78eeef03b419 |
---|---|
2655 } | 2655 } |
2656 | 2656 |
2657 void convo_switch(GtkNotebook *notebook, GtkWidget *page, gint page_num, gpointer data) | 2657 void convo_switch(GtkNotebook *notebook, GtkWidget *page, gint page_num, gpointer data) |
2658 { | 2658 { |
2659 GtkWidget *label = NULL; | 2659 GtkWidget *label = NULL; |
2660 GdkColor color; | 2660 GtkStyle *style; |
2661 struct conversation *c; | 2661 struct conversation *c; |
2662 | 2662 |
2663 if ((convo_options & OPT_CONVO_COMBINE) && | 2663 if ((convo_options & OPT_CONVO_COMBINE) && |
2664 (im_options & OPT_IM_ONE_WINDOW) && | 2664 (im_options & OPT_IM_ONE_WINDOW) && |
2665 (chat_options & OPT_CHAT_ONE_WINDOW)) { | 2665 (chat_options & OPT_CHAT_ONE_WINDOW)) { |
2685 return; | 2685 return; |
2686 style = gtk_style_new(); | 2686 style = gtk_style_new(); |
2687 gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); | 2687 gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); |
2688 gtk_widget_set_style(label, style); | 2688 gtk_widget_set_style(label, style); |
2689 gtk_style_unref(style); | 2689 gtk_style_unref(style); |
2690 /* color.red = 0x0000; | |
2691 color.green = 0x0000; | |
2692 color.blue = 0x0000; | |
2693 gtk_widget_modify_fg(label, GTK_STATE_NORMAL, &color); | |
2694 */ | |
2695 if (c) | 2690 if (c) |
2696 c->unseen = 0; | 2691 c->unseen = 0; |
2697 | 2692 |
2698 if (!c->is_chat) { | 2693 if (!c->is_chat) { |
2699 GtkWidget *menubar; | 2694 GtkWidget *menubar; |
2723 void update_convo_status(struct conversation *c) { | 2718 void update_convo_status(struct conversation *c) { |
2724 if(!c) | 2719 if(!c) |
2725 return; | 2720 return; |
2726 debug_printf("update_convo_status called for %s\n", c->name); | 2721 debug_printf("update_convo_status called for %s\n", c->name); |
2727 if (im_options & OPT_IM_ONE_WINDOW) { /* We'll make the tab green */ | 2722 if (im_options & OPT_IM_ONE_WINDOW) { /* We'll make the tab green */ |
2723 GtkStyle *style; | |
2728 GtkWidget *label = c->tab_label; | 2724 GtkWidget *label = c->tab_label; |
2729 GdkColor color; | 2725 style = gtk_style_new(); |
2726 if (!GTK_WIDGET_REALIZED(label)) | |
2727 gtk_widget_realize(label); | |
2728 gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); | |
2730 if(c->typing_state == TYPING) { | 2729 if(c->typing_state == TYPING) { |
2731 color.red = 0x0000; | 2730 style->fg[0].red = 0x0000; |
2732 color.green = 0x9999; | 2731 style->fg[0].green = 0x9999; |
2733 color.blue = 0x0000; | 2732 style->fg[0].blue = 0x0000; |
2734 } else if(c->typing_state == TYPED) { | 2733 } else if(c->typing_state == TYPED) { |
2735 color.red = 0xffff; | 2734 style->fg[0].red = 0xffff; |
2736 color.green = 0xbbbb; | 2735 style->fg[0].green = 0xbbbb; |
2737 color.blue = 0x2222; | 2736 style->fg[0].blue = 0x2222; |
2738 } else if(c->unseen == 2) { | 2737 } else if(c->unseen == 2) { |
2739 color.red = 0x0000; | 2738 style->fg[0].red = 0x0000; |
2740 color.green = 0x0000; | 2739 style->fg[0].green = 0x0000; |
2741 color.blue = 0xcccc; | 2740 style->fg[0].blue = 0xcccc; |
2742 } else if(c->unseen == 1) { | 2741 } else if(c->unseen == 1) { |
2743 color.red = 0xcccc; | 2742 style->fg[0].red = 0xcccc; |
2744 color.green = 0x0000; | 2743 style->fg[0].green = 0x0000; |
2745 color.blue = 0x0000; | 2744 style->fg[0].blue = 0x0000; |
2746 } else { | 2745 } |
2747 style = gtk_style_new(); | 2746 gtk_widget_set_style(label, style); |
2748 gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); | |
2749 gtk_widget_set_style(label, style); | |
2750 gtk_style_unref(style); | |
2751 /* | |
2752 color.red = 0x0000; | |
2753 color.green = 0x0000; | |
2754 color.blue = 0x0000; | |
2755 */ | |
2756 } | |
2757 gtk_widget_modify_fg(label, GTK_STATE_NORMAL, &color); | |
2758 debug_printf("setting style\n"); | 2747 debug_printf("setting style\n"); |
2748 gtk_style_unref(style); | |
2759 } else { | 2749 } else { |
2760 GtkWindow *win = (GtkWindow *)c->window; | 2750 GtkWindow *win = (GtkWindow *)c->window; |
2761 char *buf, *buf2; | 2751 char *buf, *buf2; |
2762 int len; | 2752 int len; |
2763 if(strstr(win->title, _(" [TYPING]"))) { | 2753 if(strstr(win->title, _(" [TYPING]"))) { |