Mercurial > pidgin.yaz
comparison pidgin/gtkblist.c @ 15436:9c0cf4db1f4d
Dialog icon changes
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 27 Jan 2007 11:11:26 +0000 |
parents | 29e443e0613f |
children | 42961709cb30 |
comparison
equal
deleted
inserted
replaced
15435:29e443e0613f | 15436:9c0cf4db1f4d |
---|---|
694 GaimGtkBuddyList *gtkblist; | 694 GaimGtkBuddyList *gtkblist; |
695 GtkWidget *img = NULL; | 695 GtkWidget *img = NULL; |
696 GaimGtkJoinChatData *data = NULL; | 696 GaimGtkJoinChatData *data = NULL; |
697 | 697 |
698 gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); | 698 gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); |
699 img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_QUESTION, | 699 img = gtk_image_new_from_stock(PIDGIN_STOCK_DIALOG_QUESTION, |
700 GTK_ICON_SIZE_DIALOG); | 700 gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE)); |
701 data = g_new0(GaimGtkJoinChatData, 1); | 701 data = g_new0(GaimGtkJoinChatData, 1); |
702 | 702 |
703 data->window = gtk_dialog_new_with_buttons(_("Join a Chat"), | 703 data->window = gtk_dialog_new_with_buttons(_("Join a Chat"), |
704 NULL, GTK_DIALOG_NO_SEPARATOR, | 704 NULL, GTK_DIALOG_NO_SEPARATOR, |
705 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, | 705 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, |
2644 /* Tools */ | 2644 /* Tools */ |
2645 { N_("/_Tools"), NULL, NULL, 0, "<Branch>", NULL }, | 2645 { N_("/_Tools"), NULL, NULL, 0, "<Branch>", NULL }, |
2646 { N_("/Tools/Buddy _Pounces"), NULL, gaim_gtk_pounces_manager_show, 0, "<StockItem>", GAIM_STOCK_POUNCE }, | 2646 { N_("/Tools/Buddy _Pounces"), NULL, gaim_gtk_pounces_manager_show, 0, "<StockItem>", GAIM_STOCK_POUNCE }, |
2647 { N_("/Tools/Plu_gins"), "<CTL>U", gaim_gtk_plugin_dialog_show, 0, "<StockItem>", GAIM_STOCK_PLUGIN }, | 2647 { N_("/Tools/Plu_gins"), "<CTL>U", gaim_gtk_plugin_dialog_show, 0, "<StockItem>", GAIM_STOCK_PLUGIN }, |
2648 { N_("/Tools/Pr_eferences"), "<CTL>P", gaim_gtk_prefs_show, 0, "<StockItem>", GTK_STOCK_PREFERENCES }, | 2648 { N_("/Tools/Pr_eferences"), "<CTL>P", gaim_gtk_prefs_show, 0, "<StockItem>", GTK_STOCK_PREFERENCES }, |
2649 { N_("/Tools/Pr_ivacy"), NULL, gaim_gtk_privacy_dialog_show, 0, "<StockItem>", GTK_STOCK_DIALOG_ERROR }, | 2649 { N_("/Tools/Pr_ivacy"), NULL, gaim_gtk_privacy_dialog_show, 0, "<StockItem>", PIDGIN_STOCK_DIALOG_ERROR }, |
2650 { "/Tools/sep2", NULL, NULL, 0, "<Separator>", NULL }, | 2650 { "/Tools/sep2", NULL, NULL, 0, "<Separator>", NULL }, |
2651 { N_("/Tools/_File Transfers"), "<CTL>T", gaim_gtkxfer_dialog_show, 0, "<StockItem>", GAIM_STOCK_FILE_TRANSFER }, | 2651 { N_("/Tools/_File Transfers"), "<CTL>T", gaim_gtkxfer_dialog_show, 0, "<StockItem>", GAIM_STOCK_FILE_TRANSFER }, |
2652 { N_("/Tools/R_oom List"), NULL, gaim_gtk_roomlist_dialog_show, 0, "<StockItem>", GTK_STOCK_INDEX }, | 2652 { N_("/Tools/R_oom List"), NULL, gaim_gtk_roomlist_dialog_show, 0, "<StockItem>", GTK_STOCK_INDEX }, |
2653 { N_("/Tools/System _Log"), NULL, gtk_blist_show_systemlog_cb, 0, "<StockItem>", GAIM_STOCK_LOG }, | 2653 { N_("/Tools/System _Log"), NULL, gtk_blist_show_systemlog_cb, 0, "<StockItem>", GAIM_STOCK_LOG }, |
2654 { "/Tools/sep3", NULL, NULL, 0, "<Separator>", NULL }, | 2654 { "/Tools/sep3", NULL, NULL, 0, "<Separator>", NULL }, |
2895 struct _gaim_gtk_blist_node *gtkbuddynode = NULL; | 2895 struct _gaim_gtk_blist_node *gtkbuddynode = NULL; |
2896 struct _emblem_data emblems[4] = {{NULL, 15, 15}, {NULL, 0, 15}, | 2896 struct _emblem_data emblems[4] = {{NULL, 15, 15}, {NULL, 0, 15}, |
2897 {NULL, 0, 0}, {NULL, 15, 0}}; | 2897 {NULL, 0, 0}, {NULL, 15, 0}}; |
2898 GaimBuddy *buddy = NULL; | 2898 GaimBuddy *buddy = NULL; |
2899 GaimChat *chat = NULL; | 2899 GaimChat *chat = NULL; |
2900 GtkIconSize icon_size = gtk_icon_size_from_name((size == GAIM_STATUS_ICON_LARGE) ? GAIM_ICON_SIZE_TANGO_MEDIUM : | 2900 GtkIconSize icon_size = gtk_icon_size_from_name((size == GAIM_STATUS_ICON_LARGE) ? PIDGIN_ICON_SIZE_TANGO_MEDIUM : |
2901 GAIM_ICON_SIZE_TANGO_EXTRA_SMALL); | 2901 PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL); |
2902 | 2902 |
2903 if(GAIM_BLIST_NODE_IS_CONTACT(node)) { | 2903 if(GAIM_BLIST_NODE_IS_CONTACT(node)) { |
2904 if(!gtknode->contact_expanded) { | 2904 if(!gtknode->contact_expanded) { |
2905 buddy = gaim_contact_get_priority_buddy((GaimContact*)node); | 2905 buddy = gaim_contact_get_priority_buddy((GaimContact*)node); |
2906 gtkbuddynode = ((GaimBlistNode*)buddy)->ui_data; | 2906 gtkbuddynode = ((GaimBlistNode*)buddy)->ui_data; |
2942 } | 2942 } |
2943 | 2943 |
2944 if(buddy) { | 2944 if(buddy) { |
2945 GaimPresence *p = gaim_buddy_get_presence(buddy); | 2945 GaimPresence *p = gaim_buddy_get_presence(buddy); |
2946 if (GAIM_BUDDY_IS_ONLINE(buddy) && gtkbuddynode && gtkbuddynode->recent_signonoff) | 2946 if (GAIM_BUDDY_IS_ONLINE(buddy) && gtkbuddynode && gtkbuddynode->recent_signonoff) |
2947 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), GAIM_STOCK_STATUS_LOGIN, | 2947 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_LOGIN, |
2948 icon_size, "GtkTreeView"); | 2948 icon_size, "GtkTreeView"); |
2949 else if (gtkbuddynode && gtkbuddynode->recent_signonoff) | 2949 else if (gtkbuddynode && gtkbuddynode->recent_signonoff) |
2950 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), GAIM_STOCK_STATUS_LOGOUT, | 2950 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_LOGOUT, |
2951 icon_size, "GtkTreeView"); | 2951 icon_size, "GtkTreeView"); |
2952 else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_UNAVAILABLE)) | 2952 else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_UNAVAILABLE)) |
2953 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), GAIM_STOCK_STATUS_BUSY, | 2953 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_BUSY, |
2954 icon_size, "GtkTreeView"); | 2954 icon_size, "GtkTreeView"); |
2955 else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_AWAY)) | 2955 else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_AWAY)) |
2956 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), GAIM_STOCK_STATUS_AWAY, | 2956 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_AWAY, |
2957 icon_size, "GtkTreeView"); | 2957 icon_size, "GtkTreeView"); |
2958 else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_EXTENDED_AWAY)) | 2958 else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_EXTENDED_AWAY)) |
2959 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), GAIM_STOCK_STATUS_XA, | 2959 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_XA, |
2960 icon_size, "GtkTreeView"); | 2960 icon_size, "GtkTreeView"); |
2961 else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_OFFLINE)) | 2961 else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_OFFLINE)) |
2962 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), GAIM_STOCK_STATUS_OFFLINE, | 2962 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_OFFLINE, |
2963 icon_size, "GtkTreeView"); | 2963 icon_size, "GtkTreeView"); |
2964 else | 2964 else |
2965 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), GAIM_STOCK_STATUS_AVAILABLE, | 2965 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_AVAILABLE, |
2966 icon_size, "GtkTreeView"); | 2966 icon_size, "GtkTreeView"); |
2967 } else if (chat) { | 2967 } else if (chat) { |
2968 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), GAIM_STOCK_STATUS_CHAT, | 2968 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_CHAT, |
2969 icon_size, "GtkTreeView"); | 2969 icon_size, "GtkTreeView"); |
2970 } else { | 2970 } else { |
2971 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), GAIM_STOCK_STATUS_PERSON, | 2971 ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_PERSON, |
2972 icon_size, "GtkTreeView"); | 2972 icon_size, "GtkTreeView"); |
2973 } | 2973 } |
2974 | 2974 |
2975 return ret; | 2975 return ret; |
2976 | 2976 |
5110 data->account = | 5110 data->account = |
5111 (account != NULL | 5111 (account != NULL |
5112 ? account | 5112 ? account |
5113 : gaim_connection_get_account(gaim_connections_get_all()->data)); | 5113 : gaim_connection_get_account(gaim_connections_get_all()->data)); |
5114 | 5114 |
5115 img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_QUESTION, | 5115 img = gtk_image_new_from_stock(PIDGIN_STOCK_DIALOG_QUESTION, |
5116 GTK_ICON_SIZE_DIALOG); | 5116 gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE)); |
5117 | 5117 |
5118 gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); | 5118 gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); |
5119 | 5119 |
5120 data->window = gtk_dialog_new_with_buttons(_("Add Buddy"), | 5120 data->window = gtk_dialog_new_with_buttons(_("Add Buddy"), |
5121 NULL, GTK_DIALOG_NO_SEPARATOR, | 5121 NULL, GTK_DIALOG_NO_SEPARATOR, |
5484 | 5484 |
5485 data = g_new0(GaimGtkAddChatData, 1); | 5485 data = g_new0(GaimGtkAddChatData, 1); |
5486 data->account = account; | 5486 data->account = account; |
5487 data->default_chat_name = g_strdup(name); | 5487 data->default_chat_name = g_strdup(name); |
5488 | 5488 |
5489 img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_QUESTION, | 5489 img = gtk_image_new_from_stock(PIDGIN_STOCK_DIALOG_QUESTION, |
5490 GTK_ICON_SIZE_DIALOG); | 5490 gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE)); |
5491 | 5491 |
5492 gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); | 5492 gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); |
5493 | 5493 |
5494 data->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | 5494 data->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
5495 | 5495 |