Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 9472:362e92781b3f
[gaim-migrate @ 10297]
This puts parentheses around dead conversations' titles and tabs.
I didn't mark the parentheses as translatable, but someone can do that if
they feel the need.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Wed, 07 Jul 2004 06:24:58 +0000 |
parents | 37f7100e58e6 |
children | e7b312e90abb |
comparison
equal
deleted
inserted
replaced
9471:37f7100e58e6 | 9472:362e92781b3f |
---|---|
5403 } | 5403 } |
5404 else if (type == GAIM_CONV_UPDATE_TYPING || | 5404 else if (type == GAIM_CONV_UPDATE_TYPING || |
5405 type == GAIM_CONV_UPDATE_UNSEEN || | 5405 type == GAIM_CONV_UPDATE_UNSEEN || |
5406 type == GAIM_CONV_UPDATE_TITLE) | 5406 type == GAIM_CONV_UPDATE_TITLE) |
5407 { | 5407 { |
5408 const char *title; | 5408 char *title; |
5409 GaimConvIm *im = NULL; | 5409 GaimConvIm *im = NULL; |
5410 GaimConnection *gc = gaim_conversation_get_gc(conv); | |
5410 char color[8]; | 5411 char color[8]; |
5411 | 5412 |
5412 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) | 5413 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) |
5413 im = GAIM_CONV_IM(conv); | 5414 im = GAIM_CONV_IM(conv); |
5414 | 5415 |
5415 title = gaim_conversation_get_title(conv); | 5416 if (!gc || ((gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) |
5417 && gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)))) | |
5418 title = g_strdup_printf("(%s)", gaim_conversation_get_title(conv)); | |
5419 | |
5420 else | |
5421 title = g_strdup(gaim_conversation_get_title(conv)); | |
5416 | 5422 |
5417 *color = '\0'; | 5423 *color = '\0'; |
5418 | 5424 |
5419 if (!GTK_WIDGET_REALIZED(gtkconv->tab_label)) | 5425 if (!GTK_WIDGET_REALIZED(gtkconv->tab_label)) |
5420 gtk_widget_realize(gtkconv->tab_label); | 5426 gtk_widget_realize(gtkconv->tab_label); |
5461 if (type == GAIM_CONV_UPDATE_TITLE) { | 5467 if (type == GAIM_CONV_UPDATE_TITLE) { |
5462 gtk_label_set_text(GTK_LABEL(gtkconv->menu_label), title); | 5468 gtk_label_set_text(GTK_LABEL(gtkconv->menu_label), title); |
5463 if (conv == gaim_conv_window_get_active_conversation(win)) | 5469 if (conv == gaim_conv_window_get_active_conversation(win)) |
5464 gtk_window_set_title(GTK_WINDOW(gtkwin->window), title); | 5470 gtk_window_set_title(GTK_WINDOW(gtkwin->window), title); |
5465 } | 5471 } |
5472 | |
5473 g_free(title); | |
5466 } | 5474 } |
5467 else if (type == GAIM_CONV_UPDATE_TOPIC) | 5475 else if (type == GAIM_CONV_UPDATE_TOPIC) |
5468 { | 5476 { |
5469 const char *topic; | 5477 const char *topic; |
5470 chat = GAIM_CONV_CHAT(conv); | 5478 chat = GAIM_CONV_CHAT(conv); |
5480 type == GAIM_CONV_ACCOUNT_OFFLINE) | 5488 type == GAIM_CONV_ACCOUNT_OFFLINE) |
5481 { | 5489 { |
5482 gray_stuff_out(gaim_conv_window_get_active_conversation(win)); | 5490 gray_stuff_out(gaim_conv_window_get_active_conversation(win)); |
5483 generate_send_as_items(win, NULL); | 5491 generate_send_as_items(win, NULL); |
5484 update_tab_icon(conv); | 5492 update_tab_icon(conv); |
5493 gaim_conversation_autoset_title(conv); | |
5485 } | 5494 } |
5486 else if (type == GAIM_CONV_UPDATE_AWAY) | 5495 else if (type == GAIM_CONV_UPDATE_AWAY) |
5487 { | 5496 { |
5488 update_tab_icon(conv); | 5497 update_tab_icon(conv); |
5489 } | 5498 } |
5490 else if (type == GAIM_CONV_UPDATE_ADD || type == GAIM_CONV_UPDATE_REMOVE || | 5499 else if (type == GAIM_CONV_UPDATE_ADD || type == GAIM_CONV_UPDATE_REMOVE || |
5491 type == GAIM_CONV_UPDATE_CHATLEFT) | 5500 type == GAIM_CONV_UPDATE_CHATLEFT) |
5492 { | 5501 { |
5502 gaim_conversation_autoset_title(conv); | |
5493 gray_stuff_out(conv); | 5503 gray_stuff_out(conv); |
5494 } | 5504 } |
5495 else if (type == GAIM_CONV_UPDATE_ICON) | 5505 else if (type == GAIM_CONV_UPDATE_ICON) |
5496 { | 5506 { |
5497 gaim_gtkconv_update_buddy_icon(conv); | 5507 gaim_gtkconv_update_buddy_icon(conv); |