summaryrefslogtreecommitdiff
path: root/libslab
diff options
context:
space:
mode:
Diffstat (limited to 'libslab')
-rw-r--r--libslab/slab-mate-util.c62
-rw-r--r--libslab/slab-mate-util.h6
2 files changed, 0 insertions, 68 deletions
diff --git a/libslab/slab-mate-util.c b/libslab/slab-mate-util.c
index 2acf9d0c..38d9f6e1 100644
--- a/libslab/slab-mate-util.c
+++ b/libslab/slab-mate-util.c
@@ -24,14 +24,6 @@
#include <gio/gio.h>
#include <string.h>
-void
-free_list_of_strings (GList * string_list)
-{
- g_assert (string_list != NULL);
- g_list_foreach (string_list, (GFunc) g_free, NULL);
- g_list_free (string_list);
-}
-
MateDesktopItem *
load_desktop_item_from_unknown (const gchar *id)
{
@@ -86,39 +78,6 @@ load_desktop_item_from_unknown (const gchar *id)
return NULL;
}
-gchar *
-get_package_name_from_desktop_item (MateDesktopItem * desktop_item)
-{
- gchar *argv[6];
- gchar *package_name;
- gint retval;
- GError *error;
-
- argv[0] = "rpm";
- argv[1] = "-qf";
- argv[2] = "--qf";
- argv[3] = "%{NAME}";
- argv[4] = g_filename_from_uri (mate_desktop_item_get_location (desktop_item), NULL, NULL);
- argv[5] = NULL;
-
- error = NULL;
-
- if (!g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &package_name, NULL,
- &retval, &error))
- {
- g_warning ("error: [%s]\n", error->message);
- g_error_free (error);
- retval = -1;
- }
-
- g_free (argv[4]);
-
- if (!retval)
- return package_name;
- else
- return NULL;
-}
-
gboolean
open_desktop_item_exec (MateDesktopItem * desktop_item)
{
@@ -176,27 +135,6 @@ open_desktop_item_help (MateDesktopItem * desktop_item)
return TRUE;
}
-gint
-desktop_item_location_compare (gconstpointer a_obj, gconstpointer b_obj)
-{
- const gchar *a;
- const gchar *b;
-
- gint offset;
-
- a = (const gchar *) a_obj;
- b = (const gchar *) b_obj;
-
- offset = strlen (a) - strlen (b);
-
- if (offset > 0)
- return strcmp (&a[offset], b);
- else if (offset < 0)
- return strcmp (a, &b[-offset]);
- else
- return strcmp (a, b);
-}
-
gboolean
slab_load_image (GtkImage * image, GtkIconSize size, const gchar * image_id)
{
diff --git a/libslab/slab-mate-util.h b/libslab/slab-mate-util.h
index 0ffa8c1e..1ecb4454 100644
--- a/libslab/slab-mate-util.h
+++ b/libslab/slab-mate-util.h
@@ -47,17 +47,11 @@ extern "C" {
#define SLAB_FILE_MANAGER_OPEN_CMD "/desktop/mate/applications/main-menu/file-area/file_mgr_open_cmd"
#define SLAB_FILE_SEND_TO_CMD "/desktop/mate/applications/main-menu/file-area/file_send_to_cmd"
-void free_list_of_strings (GList * list);
-
MateDesktopItem *load_desktop_item_from_unknown (const gchar * id);
-gchar *get_package_name_from_desktop_item (MateDesktopItem * desktop_item);
-
gboolean open_desktop_item_exec (MateDesktopItem * desktop_item);
gboolean open_desktop_item_help (MateDesktopItem * desktop_item);
-gint desktop_item_location_compare (gconstpointer a, gconstpointer b);
-
gboolean slab_load_image (GtkImage * image, GtkIconSize size, const gchar * image_id);
gchar *string_replace_once (const gchar * str_template, const gchar * key, const gchar * value);