Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 8155:77d1252b3803
[gaim-migrate @ 8867]
Patch by Etan Reisner. The tabs now stay green when they are supposed to,
and the offline accounts in account drop-down lists are now greyed, like in
the accounts window.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 21 Jan 2004 03:22:52 +0000 |
parents | 8633dc570442 |
children | e1e871897a4b |
comparison
equal
deleted
inserted
replaced
8154:064ecf11a36a | 8155:77d1252b3803 |
---|---|
5036 | 5036 |
5037 gtk_label_set_text(GTK_LABEL(gtkchat->count), tmp); | 5037 gtk_label_set_text(GTK_LABEL(gtkchat->count), tmp); |
5038 } | 5038 } |
5039 | 5039 |
5040 static void | 5040 static void |
5041 gaim_gtkconv_set_title(GaimConversation *conv, const char *title) | |
5042 { | |
5043 GaimGtkConversation *gtkconv; | |
5044 GaimConvWindow *win; | |
5045 GaimGtkWindow *gtkwin; | |
5046 | |
5047 win = gaim_conversation_get_window(conv); | |
5048 gtkwin = GAIM_GTK_WINDOW(win); | |
5049 gtkconv = GAIM_GTK_CONVERSATION(conv); | |
5050 | |
5051 gtk_label_set_text(GTK_LABEL(gtkconv->tab_label), title); | |
5052 gtk_label_set_text(GTK_LABEL(gtkconv->menu_label), title); | |
5053 | |
5054 if(conv == gaim_conv_window_get_active_conversation(win)) | |
5055 gtk_window_set_title(GTK_WINDOW(gtkwin->window), title); | |
5056 } | |
5057 | |
5058 static void | |
5059 update_tab_icon(GaimConversation *conv) | 5041 update_tab_icon(GaimConversation *conv) |
5060 { | 5042 { |
5061 GaimGtkConversation *gtkconv; | 5043 GaimGtkConversation *gtkconv; |
5062 GaimConvWindow *win = gaim_conversation_get_window(conv); | 5044 GaimConvWindow *win = gaim_conversation_get_window(conv); |
5063 GaimAccount *account; | 5045 GaimAccount *account; |
5108 smiley_themeize(gtkconv->imhtml); | 5090 smiley_themeize(gtkconv->imhtml); |
5109 | 5091 |
5110 update_tab_icon(conv); | 5092 update_tab_icon(conv); |
5111 } | 5093 } |
5112 else if (type == GAIM_CONV_UPDATE_TYPING || | 5094 else if (type == GAIM_CONV_UPDATE_TYPING || |
5113 type == GAIM_CONV_UPDATE_UNSEEN) | 5095 type == GAIM_CONV_UPDATE_UNSEEN || |
5096 type == GAIM_CONV_UPDATE_TITLE) | |
5114 { | 5097 { |
5115 const char *title; | 5098 const char *title; |
5116 GaimConvIm *im = NULL; | 5099 GaimConvIm *im = NULL; |
5117 char color[8]; | 5100 char color[8]; |
5118 | 5101 |
5150 if (*color != '\0') | 5133 if (*color != '\0') |
5151 { | 5134 { |
5152 char *label; | 5135 char *label; |
5153 | 5136 |
5154 label = g_strdup_printf("<span color=\"%s\">%s</span>", | 5137 label = g_strdup_printf("<span color=\"%s\">%s</span>", |
5155 color, title); | 5138 color, title); |
5156 gtk_label_set_markup(GTK_LABEL(gtkconv->tab_label), label); | 5139 gtk_label_set_markup(GTK_LABEL(gtkconv->tab_label), label); |
5157 g_free(label); | 5140 g_free(label); |
5158 } | 5141 } |
5159 else | 5142 else |
5160 gtk_label_set_text(GTK_LABEL(gtkconv->tab_label), title); | 5143 gtk_label_set_text(GTK_LABEL(gtkconv->tab_label), title); |
5161 | 5144 |
5162 if (conv == gaim_conv_window_get_active_conversation(win)) | 5145 if (conv == gaim_conv_window_get_active_conversation(win)) |
5163 update_typing_icon(conv); | 5146 update_typing_icon(conv); |
5147 | |
5148 if (type == GAIM_CONV_UPDATE_TITLE) { | |
5149 gtk_label_set_text(GTK_LABEL(gtkconv->menu_label), title); | |
5150 if (conv == gaim_conv_window_get_active_conversation(win)) | |
5151 gtk_window_set_title(GTK_WINDOW(gtkwin->window), title); | |
5152 } | |
5164 } | 5153 } |
5165 else if (type == GAIM_CONV_UPDATE_TOPIC) | 5154 else if (type == GAIM_CONV_UPDATE_TOPIC) |
5166 { | 5155 { |
5167 const char *topic; | 5156 const char *topic; |
5168 chat = GAIM_CONV_CHAT(conv); | 5157 chat = GAIM_CONV_CHAT(conv); |
5170 | 5159 |
5171 topic = gaim_conv_chat_get_topic(chat); | 5160 topic = gaim_conv_chat_get_topic(chat); |
5172 | 5161 |
5173 gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text),topic); | 5162 gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text),topic); |
5174 gtk_tooltips_set_tip(gtkconv->tooltips, gtkchat->topic_text, | 5163 gtk_tooltips_set_tip(gtkconv->tooltips, gtkchat->topic_text, |
5175 topic, NULL); | 5164 topic, NULL); |
5176 } | 5165 } |
5177 else if (type == GAIM_CONV_ACCOUNT_ONLINE || | 5166 else if (type == GAIM_CONV_ACCOUNT_ONLINE || |
5178 type == GAIM_CONV_ACCOUNT_OFFLINE) | 5167 type == GAIM_CONV_ACCOUNT_OFFLINE) |
5179 { | 5168 { |
5180 gray_stuff_out(gaim_conv_window_get_active_conversation(win)); | 5169 gray_stuff_out(gaim_conv_window_get_active_conversation(win)); |
5206 gaim_gtkconv_chat_add_user, /* chat_add_user */ | 5195 gaim_gtkconv_chat_add_user, /* chat_add_user */ |
5207 gaim_gtkconv_chat_add_users, /* chat_add_users */ | 5196 gaim_gtkconv_chat_add_users, /* chat_add_users */ |
5208 gaim_gtkconv_chat_rename_user, /* chat_rename_user */ | 5197 gaim_gtkconv_chat_rename_user, /* chat_rename_user */ |
5209 gaim_gtkconv_chat_remove_user, /* chat_remove_user */ | 5198 gaim_gtkconv_chat_remove_user, /* chat_remove_user */ |
5210 gaim_gtkconv_chat_remove_users, /* chat_remove_users */ | 5199 gaim_gtkconv_chat_remove_users, /* chat_remove_users */ |
5211 gaim_gtkconv_set_title, /* set_title */ | |
5212 NULL, /* update_progress */ | 5200 NULL, /* update_progress */ |
5213 gaim_gtkconv_updated /* updated */ | 5201 gaim_gtkconv_updated /* updated */ |
5214 }; | 5202 }; |
5215 | 5203 |
5216 GaimConversationUiOps * | 5204 GaimConversationUiOps * |