aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-04-07 13:18:50 -0500
committerTed Gould <ted@canonical.com>2009-04-07 13:18:50 -0500
commite1988e0509e361b56fd4d48d0bfcbbca5f44ba25 (patch)
tree44090fbe302eaf96a94bb8f612b9708beb15c189
parente6565d2bf8f65c2da616d4e5a6b04adc8ee382fe (diff)
parent81194efc2e8b54fe3ab25604981ac03f4ad0bb4d (diff)
downloadayatana-indicator-messages-e1988e0509e361b56fd4d48d0bfcbbca5f44ba25.tar.gz
ayatana-indicator-messages-e1988e0509e361b56fd4d48d0bfcbbca5f44ba25.tar.bz2
ayatana-indicator-messages-e1988e0509e361b56fd4d48d0bfcbbca5f44ba25.zip
g_strcmp0
-rw-r--r--debian/changelog1
-rw-r--r--src/im-menu-item.c12
-rw-r--r--src/indicator-messages.c12
3 files changed, 13 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog
index 65ea31a..e99eec0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ indicator-messages (0.1.4-0ubuntu2~ppa3) UNRELEASED; urgency=low
* Now with better linkage.
* Bah, right symbol
* More upstream.
+ * g_strcmp0
-- Ted Gould <ted@ubuntu.com> Fri, 03 Apr 2009 16:32:49 -0500
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);