aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-04-07 13:18:14 -0500
committerTed Gould <ted@canonical.com>2009-04-07 13:18:14 -0500
commit81194efc2e8b54fe3ab25604981ac03f4ad0bb4d (patch)
tree44fad6359c23ca3d185cccc8b0a8f5e968ff3db9
parent33aaf28aafac744cde4375df44db4bd1c9a02696 (diff)
downloadayatana-indicator-messages-81194efc2e8b54fe3ab25604981ac03f4ad0bb4d.tar.gz
ayatana-indicator-messages-81194efc2e8b54fe3ab25604981ac03f4ad0bb4d.tar.bz2
ayatana-indicator-messages-81194efc2e8b54fe3ab25604981ac03f4ad0bb4d.zip
Should have been using g_strcmp0 all along. No reason not to use the safer one.
-rw-r--r--src/im-menu-item.c12
-rw-r--r--src/indicator-messages.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/im-menu-item.c b/src/im-menu-item.c
index 7a139fd..737c609 100644
--- a/src/im-menu-item.c
+++ b/src/im-menu-item.c
@@ -265,7 +265,7 @@ time_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateL
return;
}
- if (property == NULL || strcmp(property, "time")) {
+ if (property == NULL || g_strcmp0(property, "time")) {
g_warning("Time callback called without being sent the time.");
return;
}
@@ -295,7 +295,7 @@ sender_cb (IndicateListener * listener, IndicateListenerServer * server, Indicat
return;
}
- if (property == NULL || strcmp(property, "sender")) {
+ if (property == NULL || g_strcmp0(property, "sender")) {
g_warning("Sender callback called without being sent the sender. We got '%s' with value '%s'.", property, propertydata);
return;
}
@@ -326,13 +326,13 @@ indicator_modified_cb (IndicateListener * listener, IndicateListenerServer * ser
/* Not meant for us */
if (INDICATE_LISTENER_INDICATOR_ID(indicator) != INDICATE_LISTENER_INDICATOR_ID(priv->indicator)) return;
- if (strcmp(INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_SERVER_DBUS_NAME(priv->server))) return;
+ if (g_strcmp0(INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_SERVER_DBUS_NAME(priv->server))) return;
- if (!strcmp(property, "sender")) {
+ if (!g_strcmp0(property, "sender")) {
indicate_listener_get_property(listener, server, indicator, "sender", sender_cb, self);
- } else if (!strcmp(property, "time")) {
+ } else if (!g_strcmp0(property, "time")) {
indicate_listener_get_property_time(listener, server, indicator, "time", time_cb, self);
- } else if (!strcmp(property, "icon")) {
+ } else if (!g_strcmp0(property, "icon")) {
indicate_listener_get_property_icon(listener, server, indicator, "icon", icon_cb, self);
}
diff --git a/src/indicator-messages.c b/src/indicator-messages.c
index 66519f4..5d7084e 100644
--- a/src/indicator-messages.c
+++ b/src/indicator-messages.c
@@ -98,7 +98,7 @@ imList_equal (gconstpointer a, gconstpointer b)
g_debug("\tComparing (%s %d) to (%s %d)", pas, pai, pbs, pbi);
- return !((!strcmp(pas, pbs)) && (pai == pbi));
+ return !((!g_strcmp0(pas, pbs)) && (pai == pbi));
}
static gint
@@ -327,7 +327,7 @@ subtype_cb (IndicateListener * listener, IndicateListenerServer * server, Indica
return;
}
- if (property == NULL || strcmp(property, "subtype")) {
+ if (property == NULL || g_strcmp0(property, "subtype")) {
/* We should only ever get subtypes, but just in case */
g_warning("Subtype callback got a property '%s'", property);
return;
@@ -342,13 +342,13 @@ subtype_cb (IndicateListener * listener, IndicateListenerServer * server, Indica
g_debug("Message subtype: %s", propertydata);
- if (!strcmp(propertydata, "im") || !strcmp(propertydata, "login")) {
+ if (!g_strcmp0(propertydata, "im") || !g_strcmp0(propertydata, "login")) {
imList_t * listItem = g_new0(imList_t, 1);
listItem->server = server;
listItem->indicator = indicator;
g_debug("Building IM Item");
- ImMenuItem * menuitem = im_menu_item_new(listener, server, indicator, !strcmp(propertydata, "im"));
+ ImMenuItem * menuitem = im_menu_item_new(listener, server, indicator, !g_strcmp0(propertydata, "im"));
g_object_ref(G_OBJECT(menuitem));
listItem->menuitem = GTK_WIDGET(menuitem);
@@ -396,7 +396,7 @@ subtype_cb (IndicateListener * listener, IndicateListenerServer * server, Indica
static void
indicator_added (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data)
{
- if (type == NULL || strcmp(type, "message")) {
+ if (type == NULL || g_strcmp0(type, "message")) {
/* We only care about message type indicators
all of the others can go to the bit bucket */
g_debug("Ignoreing indicator of type '%s'", type);
@@ -412,7 +412,7 @@ static void
indicator_removed (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data)
{
g_debug("Removing %s %d", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator));
- if (type == NULL || strcmp(type, "message")) {
+ if (type == NULL || g_strcmp0(type, "message")) {
/* We only care about message type indicators
all of the others can go to the bit bucket */
g_debug("Ignoreing indicator of type '%s'", type);