pidgin/gtkutils.c

changeset 41020
4cf487837afc
parent 40991
d92defc9ba95
child 41037
c2043b9692f6
equal deleted inserted replaced
41019:f1bdc43bf086 41020:4cf487837afc
915 *width = 100; 915 *width = 100;
916 if(*height > 100) 916 if(*height > 100)
917 *height = 100; 917 *height = 100;
918 } 918 }
919 919
920 static const char * 920 const gchar *
921 stock_id_from_status_primitive_idle(PurpleStatusPrimitive prim, gboolean idle) 921 pidgin_stock_id_from_status_primitive(PurpleStatusPrimitive prim) {
922 { 922 const gchar *stock = NULL;
923 const char *stock = NULL;
924 switch (prim) { 923 switch (prim) {
925 case PURPLE_STATUS_UNSET: 924 case PURPLE_STATUS_UNSET:
926 stock = NULL; 925 stock = NULL;
927 break; 926 break;
928 case PURPLE_STATUS_UNAVAILABLE: 927 case PURPLE_STATUS_UNAVAILABLE:
929 stock = idle ? PIDGIN_STOCK_STATUS_BUSY_I : PIDGIN_STOCK_STATUS_BUSY; 928 stock = PIDGIN_STOCK_STATUS_BUSY;
930 break; 929 break;
931 case PURPLE_STATUS_AWAY: 930 case PURPLE_STATUS_AWAY:
932 stock = idle ? PIDGIN_STOCK_STATUS_AWAY_I : PIDGIN_STOCK_STATUS_AWAY; 931 stock = PIDGIN_STOCK_STATUS_AWAY;
933 break; 932 break;
934 case PURPLE_STATUS_EXTENDED_AWAY: 933 case PURPLE_STATUS_EXTENDED_AWAY:
935 stock = idle ? PIDGIN_STOCK_STATUS_XA_I : PIDGIN_STOCK_STATUS_XA; 934 stock = PIDGIN_STOCK_STATUS_XA;
936 break; 935 break;
937 case PURPLE_STATUS_INVISIBLE: 936 case PURPLE_STATUS_INVISIBLE:
938 stock = PIDGIN_STOCK_STATUS_INVISIBLE; 937 stock = PIDGIN_STOCK_STATUS_INVISIBLE;
939 break; 938 break;
940 case PURPLE_STATUS_OFFLINE: 939 case PURPLE_STATUS_OFFLINE:
941 stock = idle ? PIDGIN_STOCK_STATUS_OFFLINE_I : PIDGIN_STOCK_STATUS_OFFLINE; 940 stock = PIDGIN_STOCK_STATUS_OFFLINE;
942 break; 941 break;
943 default: 942 default:
944 stock = idle ? PIDGIN_STOCK_STATUS_AVAILABLE_I : PIDGIN_STOCK_STATUS_AVAILABLE; 943 stock = PIDGIN_STOCK_STATUS_AVAILABLE;
945 break; 944 break;
946 } 945 }
947 return stock; 946 return stock;
948 }
949
950 const char *
951 pidgin_stock_id_from_status_primitive(PurpleStatusPrimitive prim)
952 {
953 return stock_id_from_status_primitive_idle(prim, FALSE);
954 } 947 }
955 948
956 GdkPixbuf * 949 GdkPixbuf *
957 pidgin_create_protocol_icon(PurpleAccount *account, PidginProtocolIconSize size) 950 pidgin_create_protocol_icon(PurpleAccount *account, PidginProtocolIconSize size)
958 { 951 {

mercurial