| 2510 } |
2510 } |
| 2511 |
2511 |
| 2512 return get_prpl_icon_list(account); |
2512 return get_prpl_icon_list(account); |
| 2513 } |
2513 } |
| 2514 |
2514 |
| |
2515 static const char * |
| |
2516 pidgin_conv_get_icon_stock(PurpleConversation *conv) |
| |
2517 { |
| |
2518 PurpleAccount *account = NULL; |
| |
2519 const char *stock = NULL; |
| |
2520 |
| |
2521 g_return_val_if_fail(conv != NULL, NULL); |
| |
2522 |
| |
2523 account = purple_conversation_get_account(conv); |
| |
2524 g_return_val_if_fail(account != NULL, NULL); |
| |
2525 |
| |
2526 /* Use the buddy icon, if possible */ |
| |
2527 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { |
| |
2528 const char *name = NULL; |
| |
2529 PurpleBuddy *b; |
| |
2530 name = purple_conversation_get_name(conv); |
| |
2531 b = purple_find_buddy(account, name); |
| |
2532 if (b != NULL) { |
| |
2533 PurplePresence *p = purple_buddy_get_presence(b); |
| |
2534 PurpleStatus *active = purple_presence_get_active_status(p); |
| |
2535 PurpleStatusType *type = purple_status_get_type(active); |
| |
2536 PurpleStatusPrimitive prim = purple_status_type_get_primitive(type); |
| |
2537 |
| |
2538 switch (prim) { |
| |
2539 case PURPLE_STATUS_UNAVAILABLE: |
| |
2540 stock = PIDGIN_STOCK_STATUS_BUSY; |
| |
2541 break; |
| |
2542 case PURPLE_STATUS_AWAY: |
| |
2543 stock = PIDGIN_STOCK_STATUS_AWAY; |
| |
2544 break; |
| |
2545 case PURPLE_STATUS_EXTENDED_AWAY: |
| |
2546 stock = PIDGIN_STOCK_STATUS_XA; |
| |
2547 break; |
| |
2548 case PURPLE_STATUS_INVISIBLE: |
| |
2549 stock = PIDGIN_STOCK_STATUS_INVISIBLE; |
| |
2550 break; |
| |
2551 case PURPLE_STATUS_OFFLINE: |
| |
2552 stock = PIDGIN_STOCK_STATUS_OFFLINE; |
| |
2553 break; |
| |
2554 default: |
| |
2555 stock = PIDGIN_STOCK_STATUS_AVAILABLE; |
| |
2556 break; |
| |
2557 } |
| |
2558 } else { |
| |
2559 stock = PIDGIN_STOCK_STATUS_PERSON; |
| |
2560 } |
| |
2561 } else { |
| |
2562 stock = PIDGIN_STOCK_STATUS_CHAT; |
| |
2563 } |
| |
2564 |
| |
2565 return stock; |
| |
2566 } |
| |
2567 |
| 2515 static GdkPixbuf * |
2568 static GdkPixbuf * |
| 2516 pidgin_conv_get_icon(PurpleConversation *conv, GtkWidget *parent, const char *icon_size) |
2569 pidgin_conv_get_icon(PurpleConversation *conv, GtkWidget *parent, const char *icon_size) |
| 2517 { |
2570 { |
| 2518 PurpleAccount *account = NULL; |
2571 PurpleAccount *account = NULL; |
| 2519 const char *name = NULL; |
2572 const char *name = NULL; |
| |
2573 const char *stock = NULL; |
| 2520 GdkPixbuf *status = NULL; |
2574 GdkPixbuf *status = NULL; |
| 2521 PurpleBlistUiOps *ops = purple_blist_get_ui_ops(); |
2575 PurpleBlistUiOps *ops = purple_blist_get_ui_ops(); |
| |
2576 GtkIconSize size; |
| |
2577 |
| 2522 g_return_val_if_fail(conv != NULL, NULL); |
2578 g_return_val_if_fail(conv != NULL, NULL); |
| 2523 |
2579 |
| 2524 account = purple_conversation_get_account(conv); |
2580 account = purple_conversation_get_account(conv); |
| 2525 name = purple_conversation_get_name(conv); |
2581 name = purple_conversation_get_name(conv); |
| 2526 |
2582 |
| 2529 |
2585 |
| 2530 /* Use the buddy icon, if possible */ |
2586 /* Use the buddy icon, if possible */ |
| 2531 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { |
2587 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { |
| 2532 PurpleBuddy *b = purple_find_buddy(account, name); |
2588 PurpleBuddy *b = purple_find_buddy(account, name); |
| 2533 if (b != NULL) { |
2589 if (b != NULL) { |
| 2534 PurplePresence *p = purple_buddy_get_presence(b); |
|
| 2535 /* I hate this hack. It fixes a bug where the pending message icon |
2590 /* I hate this hack. It fixes a bug where the pending message icon |
| 2536 * displays in the conv tab even though it shouldn't. |
2591 * displays in the conv tab even though it shouldn't. |
| 2537 * A better solution would be great. */ |
2592 * A better solution would be great. */ |
| 2538 if (ops && ops->update) |
2593 if (ops && ops->update) |
| 2539 ops->update(NULL, (PurpleBlistNode*)b); |
2594 ops->update(NULL, (PurpleBlistNode*)b); |
| 2540 |
|
| 2541 /* XXX Seanegan: We really need a util function to return a pixbuf for a Presence to avoid all this switching */ |
|
| 2542 if (purple_presence_is_status_primitive_active(p, PURPLE_STATUS_AWAY)) |
|
| 2543 status = pidgin_create_status_icon(PURPLE_STATUS_AWAY, parent, icon_size); |
|
| 2544 else if (purple_presence_is_status_primitive_active(p, PURPLE_STATUS_EXTENDED_AWAY)) |
|
| 2545 status = pidgin_create_status_icon(PURPLE_STATUS_EXTENDED_AWAY, parent, icon_size); |
|
| 2546 else if (purple_presence_is_status_primitive_active(p, PURPLE_STATUS_OFFLINE)) |
|
| 2547 status = pidgin_create_status_icon(PURPLE_STATUS_OFFLINE, parent, icon_size); |
|
| 2548 else if (purple_presence_is_status_primitive_active(p, PURPLE_STATUS_AVAILABLE)) |
|
| 2549 status = pidgin_create_status_icon(PURPLE_STATUS_AVAILABLE, parent, icon_size); |
|
| 2550 else if (purple_presence_is_status_primitive_active(p, PURPLE_STATUS_INVISIBLE)) |
|
| 2551 status = pidgin_create_status_icon(PURPLE_STATUS_INVISIBLE, parent, icon_size); |
|
| 2552 else if (purple_presence_is_status_primitive_active(p, PURPLE_STATUS_UNAVAILABLE)) |
|
| 2553 status = pidgin_create_status_icon(PURPLE_STATUS_UNAVAILABLE, parent, icon_size); |
|
| 2554 } |
2595 } |
| 2555 } |
2596 } |
| 2556 |
2597 |
| 2557 /* If they don't have a buddy icon, then use the PRPL icon */ |
2598 stock = pidgin_conv_get_icon_stock(conv); |
| 2558 if (status == NULL) { |
2599 size = gtk_icon_size_from_name(icon_size); |
| 2559 GtkIconSize size = gtk_icon_size_from_name(icon_size); |
2600 status = gtk_widget_render_icon (parent, stock, size, "GtkWidget"); |
| 2560 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { |
|
| 2561 status = gtk_widget_render_icon (parent, PIDGIN_STOCK_STATUS_PERSON, |
|
| 2562 size, "GtkWidget"); |
|
| 2563 } else { |
|
| 2564 status = gtk_widget_render_icon (parent, PIDGIN_STOCK_STATUS_CHAT, |
|
| 2565 size, "GtkWidget"); |
|
| 2566 } |
|
| 2567 } |
|
| 2568 return status; |
2601 return status; |
| 2569 } |
2602 } |
| 2570 |
2603 |
| 2571 GdkPixbuf * |
2604 GdkPixbuf * |
| 2572 pidgin_conv_get_tab_icon(PurpleConversation *conv, gboolean small_icon) |
2605 pidgin_conv_get_tab_icon(PurpleConversation *conv, gboolean small_icon) |
| 2581 { |
2614 { |
| 2582 PidginConversation *gtkconv; |
2615 PidginConversation *gtkconv; |
| 2583 PidginWindow *win; |
2616 PidginWindow *win; |
| 2584 GList *l; |
2617 GList *l; |
| 2585 GdkPixbuf *status = NULL; |
2618 GdkPixbuf *status = NULL; |
| 2586 GdkPixbuf *infopane_status = NULL; |
|
| 2587 GdkPixbuf *emblem = NULL; |
2619 GdkPixbuf *emblem = NULL; |
| |
2620 const char *infopane_status = NULL; |
| 2588 |
2621 |
| 2589 g_return_if_fail(conv != NULL); |
2622 g_return_if_fail(conv != NULL); |
| 2590 |
2623 |
| 2591 gtkconv = PIDGIN_CONVERSATION(conv); |
2624 gtkconv = PIDGIN_CONVERSATION(conv); |
| 2592 win = gtkconv->win; |
2625 win = gtkconv->win; |
| 2593 if (conv != gtkconv->active_conv) |
2626 if (conv != gtkconv->active_conv) |
| 2594 return; |
2627 return; |
| 2595 |
2628 |
| 2596 status = pidgin_conv_get_tab_icon(conv, TRUE); |
2629 status = pidgin_conv_get_tab_icon(conv, TRUE); |
| 2597 infopane_status = pidgin_conv_get_tab_icon(conv, FALSE); |
2630 infopane_status = pidgin_conv_get_icon_stock(conv); |
| 2598 |
2631 |
| 2599 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { |
2632 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { |
| 2600 PurpleBuddy *b = purple_find_buddy(conv->account, conv->name); |
2633 PurpleBuddy *b = purple_find_buddy(conv->account, conv->name); |
| 2601 if (b) |
2634 if (b) |
| 2602 emblem = pidgin_blist_get_emblem((PurpleBlistNode*)b); |
2635 emblem = pidgin_blist_get_emblem((PurpleBlistNode*)b); |
| 3939 if (!group) |
3972 if (!group) |
| 3940 gtk_widget_set_sensitive(win->menu.send_to, FALSE); |
3973 gtk_widget_set_sensitive(win->menu.send_to, FALSE); |
| 3941 update_send_to_selection(win); |
3974 update_send_to_selection(win); |
| 3942 } |
3975 } |
| 3943 |
3976 |
| 3944 static GdkPixbuf * |
3977 static const char * |
| 3945 get_chat_buddy_status_icon(PurpleConvChat *chat, const char *name, PurpleConvChatBuddyFlags flags) |
3978 get_chat_buddy_status_icon(PurpleConvChat *chat, const char *name, PurpleConvChatBuddyFlags flags) |
| 3946 { |
3979 { |
| 3947 PidginConversation *gtkconv = PIDGIN_CONVERSATION(chat->conv); |
|
| 3948 GdkPixbuf *pixbuf, *scale, *scale2; |
|
| 3949 char *filename; |
|
| 3950 const char *image = NULL; |
3980 const char *image = NULL; |
| 3951 |
3981 |
| 3952 if (flags & PURPLE_CBFLAGS_FOUNDER) { |
3982 if (flags & PURPLE_CBFLAGS_FOUNDER) { |
| 3953 image = PIDGIN_STOCK_STATUS_FOUNDER; |
3983 image = PIDGIN_STOCK_STATUS_FOUNDER; |
| 3954 } else if (flags & PURPLE_CBFLAGS_OP) { |
3984 } else if (flags & PURPLE_CBFLAGS_OP) { |
| 3960 } else if ((!flags) && purple_conv_chat_is_user_ignored(chat, name)) { |
3990 } else if ((!flags) && purple_conv_chat_is_user_ignored(chat, name)) { |
| 3961 image = PIDGIN_STOCK_STATUS_IGNORED; |
3991 image = PIDGIN_STOCK_STATUS_IGNORED; |
| 3962 } else { |
3992 } else { |
| 3963 return NULL; |
3993 return NULL; |
| 3964 } |
3994 } |
| 3965 |
3995 return image; |
| 3966 pixbuf = gtk_widget_render_icon (gtkconv->tab_cont, image, gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL), |
|
| 3967 "GtkTreeView"); |
|
| 3968 |
|
| 3969 if (!pixbuf) |
|
| 3970 return NULL; |
|
| 3971 |
|
| 3972 scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16, GDK_INTERP_BILINEAR); |
|
| 3973 g_object_unref(pixbuf); |
|
| 3974 |
|
| 3975 if (flags && purple_conv_chat_is_user_ignored(chat, name)) { |
|
| 3976 /* TODO: the .../status/default directory isn't installed, should it be? */ |
|
| 3977 filename = g_build_filename(DATADIR, "pixmaps", "pidgin", "status", "default", "ignored.png", NULL); |
|
| 3978 pixbuf = gdk_pixbuf_new_from_file(filename, NULL); |
|
| 3979 g_free(filename); |
|
| 3980 scale2 = gdk_pixbuf_scale_simple(pixbuf, 16, 16, GDK_INTERP_BILINEAR); |
|
| 3981 g_object_unref(pixbuf); |
|
| 3982 gdk_pixbuf_composite(scale2, scale, 0, 0, 16, 16, 0, 0, 1, 1, GDK_INTERP_BILINEAR, 192); |
|
| 3983 g_object_unref(scale2); |
|
| 3984 } |
|
| 3985 |
|
| 3986 return scale; |
|
| 3987 } |
3996 } |
| 3988 |
3997 |
| 3989 static void |
3998 static void |
| 3990 add_chat_buddy_common(PurpleConversation *conv, PurpleConvChatBuddy *cb, const char *old_name) |
3999 add_chat_buddy_common(PurpleConversation *conv, PurpleConvChatBuddy *cb, const char *old_name) |
| 3991 { |
4000 { |
| 4015 if (!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl))) |
4024 if (!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl))) |
| 4016 return; |
4025 return; |
| 4017 |
4026 |
| 4018 ls = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list))); |
4027 ls = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list))); |
| 4019 |
4028 |
| 4020 pixbuf = get_chat_buddy_status_icon(chat, name, flags); |
4029 stock = get_chat_buddy_status_icon(chat, name, flags); |
| 4021 |
4030 |
| 4022 if (!strcmp(chat->nick, purple_normalize(conv->account, old_name != NULL ? old_name : name))) |
4031 if (!strcmp(chat->nick, purple_normalize(conv->account, old_name != NULL ? old_name : name))) |
| 4023 is_me = TRUE; |
4032 is_me = TRUE; |
| 4024 |
4033 |
| 4025 is_buddy = cb->buddy; |
4034 is_buddy = cb->buddy; |
| 4050 * It *might* be faster to search the gtk_list_store and set row accurately, |
4059 * It *might* be faster to search the gtk_list_store and set row accurately, |
| 4051 * but no one in #gtk+ seems to know anything about it either. |
4060 * but no one in #gtk+ seems to know anything about it either. |
| 4052 * Inserting in the "wrong" location has no visible ill effects. - F.P. |
4061 * Inserting in the "wrong" location has no visible ill effects. - F.P. |
| 4053 */ |
4062 */ |
| 4054 -1, /* "row" */ |
4063 -1, /* "row" */ |
| 4055 CHAT_USERS_ICON_COLUMN, pixbuf, |
4064 CHAT_USERS_ICON_STOCK_COLUMN, stock, |
| 4056 CHAT_USERS_ALIAS_COLUMN, alias, |
4065 CHAT_USERS_ALIAS_COLUMN, alias, |
| 4057 CHAT_USERS_ALIAS_KEY_COLUMN, alias_key, |
4066 CHAT_USERS_ALIAS_KEY_COLUMN, alias_key, |
| 4058 CHAT_USERS_NAME_COLUMN, name, |
4067 CHAT_USERS_NAME_COLUMN, name, |
| 4059 CHAT_USERS_FLAGS_COLUMN, flags, |
4068 CHAT_USERS_FLAGS_COLUMN, flags, |
| 4060 CHAT_USERS_COLOR_COLUMN, color, |
4069 CHAT_USERS_COLOR_COLUMN, color, |
| 4061 CHAT_USERS_WEIGHT_COLUMN, is_buddy ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL, |
4070 CHAT_USERS_WEIGHT_COLUMN, is_buddy ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL, |
| 4062 -1); |
4071 -1); |
| 4063 #else |
4072 #else |
| 4064 gtk_list_store_append(ls, &iter); |
4073 gtk_list_store_append(ls, &iter); |
| 4065 gtk_list_store_set(ls, &iter, |
4074 gtk_list_store_set(ls, &iter, |
| 4066 CHAT_USERS_ICON_COLUMN, pixbuf, |
4075 CHAT_USERS_ICON_STOCK_COLUMN, stock, |
| 4067 CHAT_USERS_ALIAS_COLUMN, alias, |
4076 CHAT_USERS_ALIAS_COLUMN, alias, |
| 4068 CHAT_USERS_ALIAS_KEY_COLUMN, alias_key, |
4077 CHAT_USERS_ALIAS_KEY_COLUMN, alias_key, |
| 4069 CHAT_USERS_NAME_COLUMN, name, |
4078 CHAT_USERS_NAME_COLUMN, name, |
| 4070 CHAT_USERS_FLAGS_COLUMN, flags, |
4079 CHAT_USERS_FLAGS_COLUMN, flags, |
| 4071 CHAT_USERS_COLOR_COLUMN, color, |
4080 CHAT_USERS_COLOR_COLUMN, color, |
| 4072 CHAT_USERS_WEIGHT_COLUMN, is_buddy ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL, |
4081 CHAT_USERS_WEIGHT_COLUMN, is_buddy ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL, |
| 4073 -1); |
4082 -1); |
| 4074 #endif |
4083 #endif |
| 4075 |
4084 |
| 4076 if (pixbuf) |
|
| 4077 g_object_unref(pixbuf); |
|
| 4078 if (is_me && color) |
4085 if (is_me && color) |
| 4079 gdk_color_free(color); |
4086 gdk_color_free(color); |
| 4080 g_free(alias_key); |
4087 g_free(alias_key); |
| 4081 } |
4088 } |
| 4082 |
4089 |
| 4719 gtk_box_pack_start(GTK_BOX(lbox), sw, TRUE, TRUE, 0); |
4726 gtk_box_pack_start(GTK_BOX(lbox), sw, TRUE, TRUE, 0); |
| 4720 gtk_widget_show(sw); |
4727 gtk_widget_show(sw); |
| 4721 |
4728 |
| 4722 ls = gtk_list_store_new(CHAT_USERS_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING, |
4729 ls = gtk_list_store_new(CHAT_USERS_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING, |
| 4723 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, |
4730 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, |
| 4724 GDK_TYPE_COLOR, G_TYPE_INT); |
4731 GDK_TYPE_COLOR, G_TYPE_INT, G_TYPE_STRING); |
| 4725 gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(ls), CHAT_USERS_ALIAS_KEY_COLUMN, |
4732 gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(ls), CHAT_USERS_ALIAS_KEY_COLUMN, |
| 4726 sort_chat_users, NULL, NULL); |
4733 sort_chat_users, NULL, NULL); |
| 4727 |
4734 |
| 4728 list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(ls)); |
4735 list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(ls)); |
| 4729 |
4736 |
| 4730 rend = gtk_cell_renderer_pixbuf_new(); |
4737 rend = gtk_cell_renderer_pixbuf_new(); |
| 4731 |
4738 g_object_set(G_OBJECT(rend), |
| |
4739 "stock-size", gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL), |
| |
4740 NULL); |
| 4732 col = gtk_tree_view_column_new_with_attributes(NULL, rend, |
4741 col = gtk_tree_view_column_new_with_attributes(NULL, rend, |
| 4733 "pixbuf", CHAT_USERS_ICON_COLUMN, NULL); |
4742 "stock-id", CHAT_USERS_ICON_STOCK_COLUMN, NULL); |
| 4734 gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_AUTOSIZE); |
4743 gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_AUTOSIZE); |
| 4735 gtk_tree_view_append_column(GTK_TREE_VIEW(list), col); |
4744 gtk_tree_view_append_column(GTK_TREE_VIEW(list), col); |
| 4736 ul_width = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/userlist_width"); |
4745 ul_width = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/userlist_width"); |
| 4737 gtk_widget_set_size_request(lbox, ul_width, -1); |
4746 gtk_widget_set_size_request(lbox, ul_width, -1); |
| 4738 |
4747 |
| 4755 rend = gtk_cell_renderer_text_new(); |
4764 rend = gtk_cell_renderer_text_new(); |
| 4756 g_object_set(rend, |
4765 g_object_set(rend, |
| 4757 "foreground-set", TRUE, |
4766 "foreground-set", TRUE, |
| 4758 "weight-set", TRUE, |
4767 "weight-set", TRUE, |
| 4759 NULL); |
4768 NULL); |
| 4760 g_object_set(G_OBJECT(rend), "editable", TRUE, NULL); |
4769 g_object_set(G_OBJECT(rend), "editable", TRUE, NULL); |
| 4761 |
4770 |
| 4762 col = gtk_tree_view_column_new_with_attributes(NULL, rend, |
4771 col = gtk_tree_view_column_new_with_attributes(NULL, rend, |
| 4763 "text", CHAT_USERS_ALIAS_COLUMN, |
4772 "text", CHAT_USERS_ALIAS_COLUMN, |
| 4764 "foreground-gdk", CHAT_USERS_COLOR_COLUMN, |
4773 "foreground-gdk", CHAT_USERS_COLOR_COLUMN, |
| 4765 "weight", CHAT_USERS_WEIGHT_COLUMN, |
4774 "weight", CHAT_USERS_WEIGHT_COLUMN, |
| 4846 |
4855 |
| 4847 pidgin_tooltip_setup_for_widget(event_box, gtkconv, |
4856 pidgin_tooltip_setup_for_widget(event_box, gtkconv, |
| 4848 pidgin_conv_create_tooltip, NULL); |
4857 pidgin_conv_create_tooltip, NULL); |
| 4849 |
4858 |
| 4850 gtkconv->infopane = gtk_cell_view_new(); |
4859 gtkconv->infopane = gtk_cell_view_new(); |
| 4851 gtkconv->infopane_model = gtk_list_store_new(CONV_NUM_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING, GDK_TYPE_PIXBUF, GDK_TYPE_PIXBUF); |
4860 gtkconv->infopane_model = gtk_list_store_new(CONV_NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF, GDK_TYPE_PIXBUF); |
| 4852 gtk_cell_view_set_model(GTK_CELL_VIEW(gtkconv->infopane), |
4861 gtk_cell_view_set_model(GTK_CELL_VIEW(gtkconv->infopane), |
| 4853 GTK_TREE_MODEL(gtkconv->infopane_model)); |
4862 GTK_TREE_MODEL(gtkconv->infopane_model)); |
| 4854 g_object_unref(gtkconv->infopane_model); |
4863 g_object_unref(gtkconv->infopane_model); |
| 4855 gtk_list_store_append(gtkconv->infopane_model, &(gtkconv->infopane_iter)); |
4864 gtk_list_store_append(gtkconv->infopane_model, &(gtkconv->infopane_iter)); |
| 4856 gtk_box_pack_start(GTK_BOX(gtkconv->infopane_hbox), gtkconv->infopane, TRUE, TRUE, 0); |
4865 gtk_box_pack_start(GTK_BOX(gtkconv->infopane_hbox), gtkconv->infopane, TRUE, TRUE, 0); |
| 4869 gtk_widget_set_size_request(gtkconv->infopane_hbox, -1, buddyicon_size); |
4878 gtk_widget_set_size_request(gtkconv->infopane_hbox, -1, buddyicon_size); |
| 4870 gtk_widget_show(gtkconv->infopane); |
4879 gtk_widget_show(gtkconv->infopane); |
| 4871 |
4880 |
| 4872 rend = gtk_cell_renderer_pixbuf_new(); |
4881 rend = gtk_cell_renderer_pixbuf_new(); |
| 4873 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(gtkconv->infopane), rend, FALSE); |
4882 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(gtkconv->infopane), rend, FALSE); |
| 4874 gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(gtkconv->infopane), rend, "pixbuf", CONV_ICON_COLUMN, NULL); |
4883 gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(gtkconv->infopane), rend, "stock-id", CONV_ICON_COLUMN, NULL); |
| 4875 g_object_set(rend, "xalign", 0.0, "xpad", 6, "ypad", 0, NULL); |
4884 g_object_set(rend, "xalign", 0.0, "xpad", 6, "ypad", 0, |
| |
4885 "stock-size", gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL), |
| |
4886 NULL); |
| 4876 |
4887 |
| 4877 rend = gtk_cell_renderer_text_new(); |
4888 rend = gtk_cell_renderer_text_new(); |
| 4878 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(gtkconv->infopane), rend, TRUE); |
4889 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(gtkconv->infopane), rend, TRUE); |
| 4879 gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(gtkconv->infopane), rend, "markup", CONV_TEXT_COLUMN, NULL); |
4890 gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(gtkconv->infopane), rend, "markup", CONV_TEXT_COLUMN, NULL); |
| 4880 g_object_set(rend, "ypad", 0, "yalign", 0.5, NULL); |
4891 g_object_set(rend, "ypad", 0, "yalign", 0.5, NULL); |