Mercurial > pidgin.yaz
comparison pidgin/gtkblist.c @ 21660:c29f2e3a3b99
Had this laying around. Weeks (months?) ago all the small listers and Hylke agreed that Small list looks better with conversation tab sized icons
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 27 Nov 2007 07:47:20 +0000 |
parents | aa5c2e52da02 |
children | 231a425c3930 |
comparison
equal
deleted
inserted
replaced
21659:aa5c2e52da02 | 21660:c29f2e3a3b99 |
---|---|
2535 * | | | 2535 * | | |
2536 * +---- TOOLTIP_BORDER +---- TOOLTIP_BORDER | 2536 * +---- TOOLTIP_BORDER +---- TOOLTIP_BORDER |
2537 * | 2537 * |
2538 * | 2538 * |
2539 */ | 2539 */ |
2540 #define STATUS_SIZE 22 | 2540 #define STATUS_SIZE 16 |
2541 #define TOOLTIP_BORDER 12 | 2541 #define TOOLTIP_BORDER 12 |
2542 #define SMALL_SPACE 6 | 2542 #define SMALL_SPACE 6 |
2543 #define LARGE_SPACE 12 | 2543 #define LARGE_SPACE 12 |
2544 #define PRPL_SIZE 16 | 2544 #define PRPL_SIZE 16 |
2545 struct tooltip_data { | 2545 struct tooltip_data { |
3449 const char *icon = NULL; | 3449 const char *icon = NULL; |
3450 struct _pidgin_blist_node *gtknode = node->ui_data; | 3450 struct _pidgin_blist_node *gtknode = node->ui_data; |
3451 struct _pidgin_blist_node *gtkbuddynode = NULL; | 3451 struct _pidgin_blist_node *gtkbuddynode = NULL; |
3452 PurpleBuddy *buddy = NULL; | 3452 PurpleBuddy *buddy = NULL; |
3453 PurpleChat *chat = NULL; | 3453 PurpleChat *chat = NULL; |
3454 GtkIconSize icon_size = gtk_icon_size_from_name((size == PIDGIN_STATUS_ICON_LARGE) ? PIDGIN_ICON_SIZE_TANGO_SMALL : | 3454 GtkIconSize icon_size = gtk_icon_size_from_name((size == PIDGIN_STATUS_ICON_LARGE) ? PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL : |
3455 PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL); | 3455 PIDGIN_ICON_SIZE_TANGO_MICROSCOPIC); |
3456 | 3456 |
3457 if(PURPLE_BLIST_NODE_IS_CONTACT(node)) { | 3457 if(PURPLE_BLIST_NODE_IS_CONTACT(node)) { |
3458 if(!gtknode->contact_expanded) { | 3458 if(!gtknode->contact_expanded) { |
3459 buddy = purple_contact_get_priority_buddy((PurpleContact*)node); | 3459 buddy = purple_contact_get_priority_buddy((PurpleContact*)node); |
3460 if (buddy != NULL) | 3460 if (buddy != NULL) |
5735 | 5735 |
5736 if (editing_blist) | 5736 if (editing_blist) |
5737 return; | 5737 return; |
5738 | 5738 |
5739 status = pidgin_blist_get_status_icon((PurpleBlistNode*)buddy, | 5739 status = pidgin_blist_get_status_icon((PurpleBlistNode*)buddy, |
5740 PIDGIN_STATUS_ICON_SMALL); | 5740 biglist ? PIDGIN_STATUS_ICON_LARGE : PIDGIN_STATUS_ICON_SMALL); |
5741 | 5741 |
5742 /* Speed it up if we don't want buddy icons. */ | 5742 /* Speed it up if we don't want buddy icons. */ |
5743 if(biglist) | 5743 if(biglist) |
5744 avatar = pidgin_blist_get_buddy_icon((PurpleBlistNode *)buddy, TRUE, TRUE); | 5744 avatar = pidgin_blist_get_buddy_icon((PurpleBlistNode *)buddy, TRUE, TRUE); |
5745 else | 5745 else |
5819 static void pidgin_blist_update_contact(PurpleBuddyList *list, PurpleBlistNode *node) | 5819 static void pidgin_blist_update_contact(PurpleBuddyList *list, PurpleBlistNode *node) |
5820 { | 5820 { |
5821 PurpleBlistNode *cnode; | 5821 PurpleBlistNode *cnode; |
5822 PurpleContact *contact; | 5822 PurpleContact *contact; |
5823 PurpleBuddy *buddy; | 5823 PurpleBuddy *buddy; |
5824 gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons"); | |
5824 struct _pidgin_blist_node *gtknode; | 5825 struct _pidgin_blist_node *gtknode; |
5825 | 5826 |
5826 if (editing_blist) | 5827 if (editing_blist) |
5827 return; | 5828 return; |
5828 | 5829 |
5854 if(gtknode->contact_expanded) { | 5855 if(gtknode->contact_expanded) { |
5855 GdkPixbuf *status; | 5856 GdkPixbuf *status; |
5856 char *mark; | 5857 char *mark; |
5857 | 5858 |
5858 status = pidgin_blist_get_status_icon(cnode, | 5859 status = pidgin_blist_get_status_icon(cnode, |
5859 PIDGIN_STATUS_ICON_SMALL); | 5860 biglist? PIDGIN_STATUS_ICON_LARGE : PIDGIN_STATUS_ICON_SMALL); |
5860 | 5861 |
5861 mark = g_markup_escape_text(purple_contact_get_alias(contact), -1); | 5862 mark = g_markup_escape_text(purple_contact_get_alias(contact), -1); |
5862 gtk_tree_store_set(gtkblist->treemodel, &iter, | 5863 gtk_tree_store_set(gtkblist->treemodel, &iter, |
5863 STATUS_ICON_COLUMN, status, | 5864 STATUS_ICON_COLUMN, status, |
5864 STATUS_ICON_VISIBLE_COLUMN, TRUE, | 5865 STATUS_ICON_VISIBLE_COLUMN, TRUE, |
5933 if(purple_account_is_connected(chat->account)) { | 5934 if(purple_account_is_connected(chat->account)) { |
5934 GtkTreeIter iter; | 5935 GtkTreeIter iter; |
5935 GdkPixbuf *status, *avatar, *emblem, *prpl_icon; | 5936 GdkPixbuf *status, *avatar, *emblem, *prpl_icon; |
5936 char *mark; | 5937 char *mark; |
5937 gboolean showicons = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons"); | 5938 gboolean showicons = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons"); |
5939 gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons"); | |
5938 PidginBlistNode *ui; | 5940 PidginBlistNode *ui; |
5939 PurpleConversation *conv; | 5941 PurpleConversation *conv; |
5940 gboolean hidden; | 5942 gboolean hidden; |
5941 | 5943 |
5942 if (!insert_node(list, node, &iter)) | 5944 if (!insert_node(list, node, &iter)) |
5945 ui = node->ui_data; | 5947 ui = node->ui_data; |
5946 conv = ui->conv.conv; | 5948 conv = ui->conv.conv; |
5947 hidden = (conv && (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE)); | 5949 hidden = (conv && (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE)); |
5948 | 5950 |
5949 status = pidgin_blist_get_status_icon(node, | 5951 status = pidgin_blist_get_status_icon(node, |
5950 PIDGIN_STATUS_ICON_SMALL); | 5952 biglist ? PIDGIN_STATUS_ICON_LARGE : PIDGIN_STATUS_ICON_SMALL); |
5951 emblem = pidgin_blist_get_emblem(node); | 5953 emblem = pidgin_blist_get_emblem(node); |
5952 | 5954 |
5953 /* Speed it up if we don't want buddy icons. */ | 5955 /* Speed it up if we don't want buddy icons. */ |
5954 if(showicons) | 5956 if(showicons) |
5955 avatar = pidgin_blist_get_buddy_icon(node, TRUE, FALSE); | 5957 avatar = pidgin_blist_get_buddy_icon(node, TRUE, FALSE); |