summaryrefslogtreecommitdiff
path: root/libslab
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-12-01 12:52:11 +0100
committerraveit65 <[email protected]>2020-12-09 21:18:28 +0100
commit8894c7ca5d86f59bc1c429153b329dddd4325842 (patch)
treed773d034e6256535ad6aad5e89a184aadd3dfa17 /libslab
parent150b16e3a317156bdde26ba7f972811f8bb3e5f7 (diff)
downloadmate-control-center-8894c7ca5d86f59bc1c429153b329dddd4325842.tar.bz2
mate-control-center-8894c7ca5d86f59bc1c429153b329dddd4325842.tar.xz
libslab-utils: Remove libslab_strcmp and use g_strcmp0 instead
Diffstat (limited to 'libslab')
-rw-r--r--libslab/bookmark-agent.c8
-rw-r--r--libslab/libslab-utils.c15
-rw-r--r--libslab/libslab-utils.h1
3 files changed, 4 insertions, 20 deletions
diff --git a/libslab/bookmark-agent.c b/libslab/bookmark-agent.c
index 478fd54a..146b9ff6 100644
--- a/libslab/bookmark-agent.c
+++ b/libslab/bookmark-agent.c
@@ -997,7 +997,7 @@ update_user_spec_path (BookmarkAgent *this)
}
}
- if (libslab_strcmp (priv->store_path, path)) {
+ if (g_strcmp0 (priv->store_path, path)) {
g_free (priv->store_path);
priv->store_path = path;
@@ -1060,7 +1060,7 @@ create_app_item (BookmarkAgent *this, const gchar *uri)
if (! uri_new)
return;
- if (libslab_strcmp (uri, uri_new))
+ if (g_strcmp0 (uri, uri_new))
g_bookmark_file_move_item (priv->store, uri, uri_new, NULL);
g_free (uri_new);
@@ -1119,7 +1119,7 @@ create_doc_item (BookmarkAgent *this, const gchar *uri)
if (!uri_new)
return;
- if (libslab_strcmp (uri, uri_new))
+ if (g_strcmp0 (uri, uri_new))
g_bookmark_file_move_item (priv->store, uri, uri_new, NULL);
g_free (uri_new);
@@ -1203,7 +1203,7 @@ create_dir_item (BookmarkAgent *this, const gchar *uri)
if (name)
g_bookmark_file_set_title (priv->store, uri, name);
- if (uri_new && libslab_strcmp (uri, uri_new))
+ if (uri_new && g_strcmp0 (uri, uri_new))
g_bookmark_file_move_item (priv->store, uri, uri_new, NULL);
if (gotta_free_name) {
diff --git a/libslab/libslab-utils.c b/libslab/libslab-utils.c
index 557217f0..5a8b862f 100644
--- a/libslab/libslab-utils.c
+++ b/libslab/libslab-utils.c
@@ -92,18 +92,3 @@ libslab_get_current_screen (void)
return screen;
}
-
-gint
-libslab_strcmp (const gchar *a, const gchar *b)
-{
- if (! a && ! b)
- return 0;
-
- if (! a)
- return strcmp ("", b);
-
- if (! b)
- return strcmp (a, "");
-
- return strcmp (a, b);
-}
diff --git a/libslab/libslab-utils.h b/libslab/libslab-utils.h
index 0aef150c..466e2e9c 100644
--- a/libslab/libslab-utils.h
+++ b/libslab/libslab-utils.h
@@ -8,7 +8,6 @@
G_BEGIN_DECLS
MateDesktopItem *libslab_mate_desktop_item_new_from_unknown_id (const gchar *id);
-gint libslab_strcmp (const gchar *a, const gchar *b);
GdkScreen *libslab_get_current_screen (void);