Mercurial > pidgin
comparison src/gtkconv.c @ 13994:626977ae8869
[gaim-migrate @ 16572]
Now that we've killed convo and blist toolbars, the chatlist toolbar seems out-of-place to me
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 25 Jul 2006 17:30:03 +0000 |
parents | 0567de116699 |
children | ef338033b138 |
comparison
equal
deleted
inserted
replaced
13993:e6977f9435a1 | 13994:626977ae8869 |
---|---|
3867 GaimConnection *gc; | 3867 GaimConnection *gc; |
3868 GtkWidget *vpaned, *hpaned; | 3868 GtkWidget *vpaned, *hpaned; |
3869 GtkWidget *vbox, *hbox, *frame; | 3869 GtkWidget *vbox, *hbox, *frame; |
3870 GtkWidget *imhtml_sw; | 3870 GtkWidget *imhtml_sw; |
3871 GtkPolicyType imhtml_sw_hscroll; | 3871 GtkPolicyType imhtml_sw_hscroll; |
3872 GtkWidget *lbox, *bbox; | 3872 GtkWidget *lbox; |
3873 GtkWidget *label; | 3873 GtkWidget *label; |
3874 GtkWidget *list; | 3874 GtkWidget *list; |
3875 GtkWidget *button; | |
3876 GtkWidget *sw; | 3875 GtkWidget *sw; |
3877 GtkListStore *ls; | 3876 GtkListStore *ls; |
3878 GtkCellRenderer *rend; | 3877 GtkCellRenderer *rend; |
3879 GtkTreeViewColumn *col; | 3878 GtkTreeViewColumn *col; |
3880 void *blist_handle = gaim_blist_get_handle(); | 3879 void *blist_handle = gaim_blist_get_handle(); |
4017 gtk_widget_show(list); | 4016 gtk_widget_show(list); |
4018 | 4017 |
4019 gtkchat->list = list; | 4018 gtkchat->list = list; |
4020 | 4019 |
4021 gtk_container_add(GTK_CONTAINER(sw), list); | 4020 gtk_container_add(GTK_CONTAINER(sw), list); |
4022 | |
4023 /* Setup the user list toolbar. */ | |
4024 bbox = gtk_hbox_new(TRUE, GAIM_HIG_BOX_SPACE); | |
4025 gtk_box_pack_start(GTK_BOX(lbox), bbox, FALSE, FALSE, 0); | |
4026 gtk_widget_show(bbox); | |
4027 | |
4028 /* IM */ | |
4029 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_IM, | |
4030 GAIM_BUTTON_VERTICAL); | |
4031 gtkchat->userlist_im = button; | |
4032 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
4033 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
4034 gtk_tooltips_set_tip(gtkconv->tooltips, button, _("IM the user"), NULL); | |
4035 g_signal_connect(G_OBJECT(button), "clicked", | |
4036 G_CALLBACK(chat_im_button_cb), gtkconv); | |
4037 | |
4038 gtk_widget_show(button); | |
4039 | |
4040 /* Ignore */ | |
4041 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_IGNORE, | |
4042 GAIM_BUTTON_VERTICAL); | |
4043 gtkchat->userlist_ignore = button; | |
4044 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
4045 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
4046 gtk_tooltips_set_tip(gtkconv->tooltips, button, | |
4047 _("Ignore the user"), NULL); | |
4048 g_signal_connect(G_OBJECT(button), "clicked", | |
4049 G_CALLBACK(ignore_cb), gtkconv); | |
4050 gtk_widget_show(button); | |
4051 | |
4052 /* Info */ | |
4053 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_INFO, | |
4054 GAIM_BUTTON_VERTICAL); | |
4055 gtkchat->userlist_info = button; | |
4056 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
4057 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
4058 gtk_tooltips_set_tip(gtkconv->tooltips, button, | |
4059 _("Get the user's information"), NULL); | |
4060 g_signal_connect(G_OBJECT(button), "clicked", | |
4061 G_CALLBACK(info_cb), gtkconv); | |
4062 | |
4063 gtk_widget_show(button); | |
4064 | 4021 |
4065 /* Setup the bottom half of the conversation window */ | 4022 /* Setup the bottom half of the conversation window */ |
4066 vbox = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); | 4023 vbox = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
4067 gtk_paned_pack2(GTK_PANED(vpaned), vbox, FALSE, TRUE); | 4024 gtk_paned_pack2(GTK_PANED(vpaned), vbox, FALSE, TRUE); |
4068 gtk_widget_show(vbox); | 4025 gtk_widget_show(vbox); |
5584 gtk_widget_set_sensitive(win->menu.alias, | 5541 gtk_widget_set_sensitive(win->menu.alias, |
5585 (account != NULL) && | 5542 (account != NULL) && |
5586 (gaim_blist_find_chat(account, gaim_conversation_get_name(conv)) != NULL)); | 5543 (gaim_blist_find_chat(account, gaim_conversation_get_name(conv)) != NULL)); |
5587 } | 5544 } |
5588 | 5545 |
5589 /* Deal with chat userlist buttons */ | 5546 |
5590 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) | |
5591 { | |
5592 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, TRUE); | |
5593 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, TRUE); | |
5594 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, (prpl_info->get_info != NULL)); | |
5595 } | |
5596 } else { | 5547 } else { |
5597 /* Account is offline */ | 5548 /* Account is offline */ |
5598 /* Or it's a chat that we've left. */ | 5549 /* Or it's a chat that we've left. */ |
5599 | 5550 |
5600 /* Then deal with menu items */ | 5551 /* Then deal with menu items */ |
5606 gtk_widget_set_sensitive(win->menu.alias, FALSE); | 5557 gtk_widget_set_sensitive(win->menu.alias, FALSE); |
5607 gtk_widget_set_sensitive(win->menu.add, FALSE); | 5558 gtk_widget_set_sensitive(win->menu.add, FALSE); |
5608 gtk_widget_set_sensitive(win->menu.remove, FALSE); | 5559 gtk_widget_set_sensitive(win->menu.remove, FALSE); |
5609 gtk_widget_set_sensitive(win->menu.insert_link, TRUE); | 5560 gtk_widget_set_sensitive(win->menu.insert_link, TRUE); |
5610 gtk_widget_set_sensitive(win->menu.insert_image, FALSE); | 5561 gtk_widget_set_sensitive(win->menu.insert_image, FALSE); |
5611 | |
5612 /* Deal with chat userlist buttons */ | |
5613 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) | |
5614 { | |
5615 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, FALSE); | |
5616 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, FALSE); | |
5617 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, FALSE); | |
5618 } | |
5619 } | 5562 } |
5620 | 5563 |
5621 /* | 5564 /* |
5622 * Update the window's icon | 5565 * Update the window's icon |
5623 */ | 5566 */ |
6573 "GaimGtkWindow *"), | 6516 "GaimGtkWindow *"), |
6574 gaim_value_new(GAIM_TYPE_BOXED, | 6517 gaim_value_new(GAIM_TYPE_BOXED, |
6575 "GaimGtkWindow *")); | 6518 "GaimGtkWindow *")); |
6576 | 6519 |
6577 gaim_signal_register(handle, "conversation-timestamp", | 6520 gaim_signal_register(handle, "conversation-timestamp", |
6578 #if SIZEOF_TIME_T == 4 | |
6579 gaim_marshal_POINTER__POINTER_INT, | 6521 gaim_marshal_POINTER__POINTER_INT, |
6580 #elif SIZEOF_TIME_T == 8 | |
6581 gaim_marshal_POINTER__POINTER_INT64, | |
6582 #else | |
6583 # error Unknown size of time_t | |
6584 #endif | |
6585 gaim_value_new(GAIM_TYPE_POINTER), 2, | 6522 gaim_value_new(GAIM_TYPE_POINTER), 2, |
6586 gaim_value_new(GAIM_TYPE_SUBTYPE, | 6523 gaim_value_new(GAIM_TYPE_SUBTYPE, |
6587 GAIM_SUBTYPE_LOG), | 6524 GAIM_SUBTYPE_LOG), |
6588 #if SIZEOF_TIME_T == 4 | 6525 #if SIZEOF_TIME_T == 4 |
6589 gaim_value_new(GAIM_TYPE_INT)); | 6526 gaim_value_new(GAIM_TYPE_INT)); |