From 8894c7ca5d86f59bc1c429153b329dddd4325842 Mon Sep 17 00:00:00 2001 From: rbuj Date: Tue, 1 Dec 2020 12:52:11 +0100 Subject: libslab-utils: Remove libslab_strcmp and use g_strcmp0 instead --- libslab/bookmark-agent.c | 8 ++++---- libslab/libslab-utils.c | 15 --------------- libslab/libslab-utils.h | 1 - 3 files changed, 4 insertions(+), 20 deletions(-) (limited to 'libslab') 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); -- cgit v1.2.1