pidgin/gtkstatusbox.c

changeset 30707
cdaabb0e9f13
parent 30706
612b36b49058
child 31321
1fef3832cfa2
child 31326
c253c498a60e
child 32394
f883709bdba4
equal deleted inserted replaced
30706:612b36b49058 30707:cdaabb0e9f13
964 for (cur = list; cur != NULL; cur = cur->next) 964 for (cur = list; cur != NULL; cur = cur->next)
965 { 965 {
966 PurpleSavedStatus *saved = cur->data; 966 PurpleSavedStatus *saved = cur->data;
967 const gchar *message; 967 const gchar *message;
968 gchar *stripped = NULL; 968 gchar *stripped = NULL;
969 PidginStatusBoxItemType type = PIDGIN_STATUS_BOX_TYPE_POPULAR; 969 PidginStatusBoxItemType type;
970 970
971 if (purple_savedstatus_is_transient(saved)) 971 if (purple_savedstatus_is_transient(saved))
972 { 972 {
973 /* 973 /*
974 * Transient statuses do not have a title, so the savedstatus 974 * Transient statuses do not have a title, so the savedstatus
975 * API returns the message when purple_savedstatus_get_title() is 975 * API returns the message when purple_savedstatus_get_title() is
976 * called, so we don't need to get the message a second time. 976 * called, so we don't need to get the message a second time.
977 */ 977 */
978 type = PIDGIN_STATUS_BOX_TYPE_POPULAR;
978 } 979 }
979 else 980 else
980 { 981 {
982 type = PIDGIN_STATUS_BOX_TYPE_SAVED_POPULAR;
983
981 message = purple_savedstatus_get_message(saved); 984 message = purple_savedstatus_get_message(saved);
982 if (message != NULL) 985 if (message != NULL)
983 { 986 {
984 stripped = purple_markup_strip_html(message); 987 stripped = purple_markup_strip_html(message);
985 purple_util_chrreplace(stripped, '\n', ' '); 988 purple_util_chrreplace(stripped, '\n', ' ');
986 } 989 }
987 type = PIDGIN_STATUS_BOX_TYPE_SAVED_POPULAR;
988 } 990 }
989 991
990 pidgin_status_box_add(statusbox, type, 992 pidgin_status_box_add(statusbox, type,
991 NULL, purple_savedstatus_get_title(saved), stripped, 993 NULL, purple_savedstatus_get_title(saved), stripped,
992 GINT_TO_POINTER(purple_savedstatus_get_creation_time(saved))); 994 GINT_TO_POINTER(purple_savedstatus_get_creation_time(saved)));

mercurial