Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 4370:d856987c72ca
[gaim-migrate @ 4636]
- The add/remove button no longer jumps around.
- Fixed the tooltips on the remove and warn buttons.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 20 Jan 2003 22:59:40 +0000 |
parents | 7e1fb422e5fd |
children | dcc6c130c6d9 |
comparison
equal
deleted
inserted
replaced
4369:7e1fb422e5fd | 4370:d856987c72ca |
---|---|
2505 if (find_buddy(gaim_conversation_get_gc(conv)->user, | 2505 if (find_buddy(gaim_conversation_get_gc(conv)->user, |
2506 gaim_conversation_get_name(conv)) == NULL) { | 2506 gaim_conversation_get_name(conv)) == NULL) { |
2507 gtkim->add = gaim_gtk_change_text(_("Add"), gtkim->add, | 2507 gtkim->add = gaim_gtk_change_text(_("Add"), gtkim->add, |
2508 GTK_STOCK_ADD, type); | 2508 GTK_STOCK_ADD, type); |
2509 gtk_tooltips_set_tip(gtkconv->tooltips, gtkim->add, | 2509 gtk_tooltips_set_tip(gtkconv->tooltips, gtkim->add, |
2510 _("Add buddy"), NULL); | 2510 _("Add the user to your buddy list"), NULL); |
2511 } | 2511 } |
2512 else { | 2512 else { |
2513 gtkim->add = gaim_gtk_change_text(_("Remove"), gtkim->add, | 2513 gtkim->add = gaim_gtk_change_text(_("Remove"), gtkim->add, |
2514 GTK_STOCK_REMOVE, type); | 2514 GTK_STOCK_REMOVE, type); |
2515 gtk_tooltips_set_tip(gtkconv->tooltips, gtkim->add, | 2515 gtk_tooltips_set_tip(gtkconv->tooltips, gtkim->add, |
2516 _("Remove buddy"), NULL); | 2516 _("Remove the user from your buddy list"), NULL); |
2517 } | 2517 } |
2518 | 2518 |
2519 gtk_box_pack_start(GTK_BOX(parent), gtkim->add, | 2519 gtk_box_pack_start(GTK_BOX(parent), gtkim->add, |
2520 FALSE, FALSE, 0); | 2520 FALSE, FALSE, 0); |
2521 | 2521 |
2522 /* Warn button */ | 2522 /* Warn button */ |
2523 gtkim->warn = gaim_gtk_change_text(_("Warn"), gtkim->warn, | 2523 gtkim->warn = gaim_gtk_change_text(_("Warn"), gtkim->warn, |
2524 GAIM_STOCK_WARN, type); | 2524 GAIM_STOCK_WARN, type); |
2525 gtk_box_pack_start(GTK_BOX(parent), gtkim->warn, FALSE, FALSE, 0); | 2525 gtk_box_pack_start(GTK_BOX(parent), gtkim->warn, FALSE, FALSE, 0); |
2526 gtk_tooltips_set_tip(gtkconv->tooltips, gtkim->warn, | |
2527 _("Warn the user"), NULL); | |
2526 | 2528 |
2527 /* Info button */ | 2529 /* Info button */ |
2528 gtkconv->info = gaim_gtk_change_text(_("Info"), gtkconv->info, | 2530 gtkconv->info = gaim_gtk_change_text(_("Info"), gtkconv->info, |
2529 GAIM_STOCK_INFO, type); | 2531 GAIM_STOCK_INFO, type); |
2530 gtk_box_pack_start(GTK_BOX(parent), gtkconv->info, FALSE, FALSE, 0); | 2532 gtk_box_pack_start(GTK_BOX(parent), gtkconv->info, FALSE, FALSE, 0); |
2531 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->info, | 2533 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->info, |
2532 _("Get user information"), NULL); | 2534 _("Get the user's information"), NULL); |
2533 | 2535 |
2534 /* Block button */ | 2536 /* Block button */ |
2535 gtkim->block = gaim_gtk_change_text(_("Block"), gtkim->block, | 2537 gtkim->block = gaim_gtk_change_text(_("Block"), gtkim->block, |
2536 GAIM_STOCK_BLOCK, type); | 2538 GAIM_STOCK_BLOCK, type); |
2537 gtk_box_pack_start(GTK_BOX(parent), gtkim->block, FALSE, FALSE, 0); | 2539 gtk_box_pack_start(GTK_BOX(parent), gtkim->block, FALSE, FALSE, 0); |
2538 gtk_tooltips_set_tip(gtkconv->tooltips, gtkim->block, | 2540 gtk_tooltips_set_tip(gtkconv->tooltips, gtkim->block, |
2539 _("Block user"), NULL); | 2541 _("Block the user"), NULL); |
2540 | 2542 |
2541 gtk_button_set_relief(GTK_BUTTON(gtkconv->info), GTK_RELIEF_NONE); | 2543 gtk_button_set_relief(GTK_BUTTON(gtkconv->info), GTK_RELIEF_NONE); |
2542 gtk_button_set_relief(GTK_BUTTON(gtkim->add), GTK_RELIEF_NONE); | 2544 gtk_button_set_relief(GTK_BUTTON(gtkim->add), GTK_RELIEF_NONE); |
2543 gtk_button_set_relief(GTK_BUTTON(gtkim->warn), GTK_RELIEF_NONE); | 2545 gtk_button_set_relief(GTK_BUTTON(gtkim->warn), GTK_RELIEF_NONE); |
2544 gtk_button_set_relief(GTK_BUTTON(gtkconv->send), GTK_RELIEF_NONE); | 2546 gtk_button_set_relief(GTK_BUTTON(gtkconv->send), GTK_RELIEF_NONE); |
2550 gtk_size_group_add_widget(gtkconv->sg, gtkconv->send); | 2552 gtk_size_group_add_widget(gtkconv->sg, gtkconv->send); |
2551 gtk_size_group_add_widget(gtkconv->sg, gtkim->block); | 2553 gtk_size_group_add_widget(gtkconv->sg, gtkim->block); |
2552 | 2554 |
2553 gtk_box_reorder_child(GTK_BOX(parent), gtkim->warn, 1); | 2555 gtk_box_reorder_child(GTK_BOX(parent), gtkim->warn, 1); |
2554 gtk_box_reorder_child(GTK_BOX(parent), gtkim->block, 2); | 2556 gtk_box_reorder_child(GTK_BOX(parent), gtkim->block, 2); |
2557 gtk_box_reorder_child(GTK_BOX(parent), gtkim->add, 3); | |
2555 gtk_box_reorder_child(GTK_BOX(parent), gtkconv->info, 4); | 2558 gtk_box_reorder_child(GTK_BOX(parent), gtkconv->info, 4); |
2556 | 2559 |
2557 gaim_gtkconv_update_buttons_by_protocol(conv); | 2560 gaim_gtkconv_update_buttons_by_protocol(conv); |
2558 | 2561 |
2559 g_signal_connect(G_OBJECT(gtkconv->send), "clicked", | 2562 g_signal_connect(G_OBJECT(gtkconv->send), "clicked", |
2915 /* IM */ | 2918 /* IM */ |
2916 button = gaim_pixbuf_button_from_stock(NULL, GTK_STOCK_REDO, | 2919 button = gaim_pixbuf_button_from_stock(NULL, GTK_STOCK_REDO, |
2917 GAIM_BUTTON_VERTICAL); | 2920 GAIM_BUTTON_VERTICAL); |
2918 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 2921 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
2919 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 2922 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
2920 gtk_tooltips_set_tip(gtkconv->tooltips, button, _("IM"), NULL); | 2923 gtk_tooltips_set_tip(gtkconv->tooltips, button, _("IM the user"), NULL); |
2921 g_signal_connect(G_OBJECT(button), "clicked", | 2924 g_signal_connect(G_OBJECT(button), "clicked", |
2922 G_CALLBACK(im_cb), conv); | 2925 G_CALLBACK(im_cb), conv); |
2923 | 2926 |
2924 gtk_widget_show(button); | 2927 gtk_widget_show(button); |
2925 | 2928 |
2926 /* Ignore */ | 2929 /* Ignore */ |
2927 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_IGNORE, | 2930 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_IGNORE, |
2928 GAIM_BUTTON_VERTICAL); | 2931 GAIM_BUTTON_VERTICAL); |
2929 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 2932 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
2930 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 2933 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
2931 gtk_tooltips_set_tip(gtkconv->tooltips, button, _("Ignore user"), NULL); | 2934 gtk_tooltips_set_tip(gtkconv->tooltips, button, |
2935 _("Ignore the user"), NULL); | |
2932 g_signal_connect(G_OBJECT(button), "clicked", | 2936 g_signal_connect(G_OBJECT(button), "clicked", |
2933 G_CALLBACK(ignore_cb), conv); | 2937 G_CALLBACK(ignore_cb), conv); |
2934 gtk_widget_show(button); | 2938 gtk_widget_show(button); |
2935 | 2939 |
2936 /* Info */ | 2940 /* Info */ |
2937 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_INFO, | 2941 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_INFO, |
2938 GAIM_BUTTON_VERTICAL); | 2942 GAIM_BUTTON_VERTICAL); |
2939 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 2943 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
2940 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 2944 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
2941 gtk_tooltips_set_tip(gtkconv->tooltips, button, | 2945 gtk_tooltips_set_tip(gtkconv->tooltips, button, |
2942 _("Get user information"), NULL); | 2946 _("Get the user's information"), NULL); |
2943 g_signal_connect(G_OBJECT(button), "clicked", | 2947 g_signal_connect(G_OBJECT(button), "clicked", |
2944 G_CALLBACK(info_cb), conv); | 2948 G_CALLBACK(info_cb), conv); |
2945 | 2949 |
2946 gtk_widget_show(button); | 2950 gtk_widget_show(button); |
2947 | 2951 |
3493 if (find_buddy(gc->user, gaim_conversation_get_name(conv))) { | 3497 if (find_buddy(gc->user, gaim_conversation_get_name(conv))) { |
3494 if (!g_object_get_data(G_OBJECT(gtkconv->u.im->add), "user_data")) { | 3498 if (!g_object_get_data(G_OBJECT(gtkconv->u.im->add), "user_data")) { |
3495 gtkconv->u.im->add = | 3499 gtkconv->u.im->add = |
3496 gaim_gtk_change_text(_("Remove"), gtkconv->u.im->add, | 3500 gaim_gtk_change_text(_("Remove"), gtkconv->u.im->add, |
3497 GTK_STOCK_REMOVE, type); | 3501 GTK_STOCK_REMOVE, type); |
3502 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->u.im->add, | |
3503 _("Remove the user from your buddy list"), NULL); | |
3498 | 3504 |
3499 rebuild = TRUE; | 3505 rebuild = TRUE; |
3500 } | 3506 } |
3501 | 3507 |
3502 gtk_widget_set_sensitive(gtkconv->u.im->add, | 3508 gtk_widget_set_sensitive(gtkconv->u.im->add, |
3507 } else { | 3513 } else { |
3508 if (g_object_get_data(G_OBJECT(gtkconv->u.im->add), "user_data")) { | 3514 if (g_object_get_data(G_OBJECT(gtkconv->u.im->add), "user_data")) { |
3509 gtkconv->u.im->add = | 3515 gtkconv->u.im->add = |
3510 gaim_gtk_change_text(_("Add"), gtkconv->u.im->add, | 3516 gaim_gtk_change_text(_("Add"), gtkconv->u.im->add, |
3511 GTK_STOCK_ADD, type); | 3517 GTK_STOCK_ADD, type); |
3518 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->u.im->add, | |
3519 _("Add the user to your buddy list"), NULL); | |
3512 | 3520 |
3513 rebuild = TRUE; | 3521 rebuild = TRUE; |
3514 } | 3522 } |
3515 | 3523 |
3516 gtk_widget_set_sensitive(gtkconv->u.im->add, | 3524 gtk_widget_set_sensitive(gtkconv->u.im->add, |