pidgin: d2a83c24: there's no reason for message_changed to...
khc at pidgin.im
khc at pidgin.im
Tue Oct 27 04:01:34 EDT 2009
-----------------------------------------------------------------
Revision: d2a83c24d5259ded6b515c57d72cd9ad7cc92975
Ancestor: 95730d90c9ec4fc3eb3025b9c16a3d0129c829c5
Author: khc at pidgin.im
Date: 2009-10-25T23:04:19
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d2a83c24d5259ded6b515c57d72cd9ad7cc92975
Modified files:
pidgin/gtkstatusbox.c
ChangeLog:
there's no reason for message_changed to use g_utf8_collate, and also
no reason why it can't be replaced by purple_strequal
-------------- next part --------------
============================================================
--- pidgin/gtkstatusbox.c e46d469c3fee24adc56c56660bb42df79ac6016e
+++ pidgin/gtkstatusbox.c 7d75835995d0881fa5177adde19e92a0b592b875
@@ -2324,18 +2324,6 @@ pidgin_status_box_pulse_typing(PidginSta
pidgin_status_box_refresh(status_box);
}
-static gboolean
-message_changed(const char *one, const char *two)
-{
- if (one == NULL && two == NULL)
- return FALSE;
-
- if (one == NULL || two == NULL)
- return TRUE;
-
- return (g_utf8_collate(one, two) != 0);
-}
-
static void
activate_currently_selected_status(PidginStatusBox *status_box)
{
@@ -2408,7 +2396,7 @@ activate_currently_selected_status(Pidgi
if (strncmp(id, purple_status_get_id(status), strlen(id)) == 0)
{
/* Selected status and previous status is the same */
- if (!message_changed(message, purple_status_get_attr_string(status, "message")))
+ if (purple_strequal(message, purple_status_get_attr_string(status, "message")))
{
PurpleSavedStatus *ss = purple_savedstatus_get_current();
/* Make sure that statusbox displays the correct thing.
@@ -2425,7 +2413,7 @@ activate_currently_selected_status(Pidgi
if (purple_savedstatus_get_type(saved_status) == primitive &&
!purple_savedstatus_has_substatuses(saved_status))
{
- if (!message_changed(purple_savedstatus_get_message(saved_status), message))
+ if (purple_strequal(purple_savedstatus_get_message(saved_status), message))
changed = FALSE;
}
}
@@ -2442,7 +2430,7 @@ activate_currently_selected_status(Pidgi
const char *ss_msg = purple_savedstatus_get_message(ss);
if ((purple_savedstatus_get_type(ss) == primitive) && purple_savedstatus_is_transient(ss) &&
purple_savedstatus_has_substatuses(ss) && /* Must have substatuses */
- !message_changed(ss_msg, message))
+ purple_strequal(ss_msg, message))
{
gboolean found = FALSE;
/* The currently enabled accounts must have substatuses for all the active accts */
@@ -2509,7 +2497,7 @@ activate_currently_selected_status(Pidgi
if (strncmp(id, purple_status_get_id(status), strlen(id)) == 0)
{
/* Selected status and previous status is the same */
- if (!message_changed(message, purple_status_get_attr_string(status, "message")))
+ if (purple_strequal(message, purple_status_get_attr_string(status, "message")))
changed = FALSE;
}
More information about the Commits
mailing list