comparison src/gtkstatusbox.c @ 13012:e3b9c6c7bcf6

[gaim-migrate @ 15365] Don't create duplicate transient statuses. So like, if you switch between "Available" and "Away" a bunch of times and use the same message everywhere, you'll only have one of each in your list of recent statuses committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 23 Jan 2006 04:54:37 +0000
parents d7b9fa3b7baf
children e8adf8183cf4
comparison
equal deleted inserted replaced
13011:5e14039d0415 13012:e3b9c6c7bcf6
1065 changed = FALSE; 1065 changed = FALSE;
1066 } 1066 }
1067 1067
1068 if (changed) 1068 if (changed)
1069 { 1069 {
1070 /* Create a new transient saved status */ 1070 /* If we've used this type+message before, lookup the transient status */
1071 saved_status = gaim_savedstatus_new(NULL, GPOINTER_TO_INT(data)); 1071 saved_status = gaim_savedstatus_find_by_type_and_message(
1072 gaim_savedstatus_set_message(saved_status, message); 1072 GPOINTER_TO_INT(data), message);
1073
1074
1075 /* If this type+message is unique then create a new transient saved status */
1076 if (saved_status == NULL)
1077 {
1078 saved_status = gaim_savedstatus_new(NULL, GPOINTER_TO_INT(data));
1079 gaim_savedstatus_set_message(saved_status, message);
1080 }
1073 1081
1074 /* Set the status for each account */ 1082 /* Set the status for each account */
1075 gaim_savedstatus_activate(saved_status); 1083 gaim_savedstatus_activate(saved_status);
1076 } 1084 }
1077 } else { 1085 } else {