summaryrefslogtreecommitdiff
path: root/libslab/slab-mate-util.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-12-22 21:01:59 +0300
committermonsta <[email protected]>2017-12-22 21:01:59 +0300
commitd12302def2b23e124509f54afd0d9da49651d9f3 (patch)
treeea045e8c8fbf1aabbd7d9580387ae7b67342497f /libslab/slab-mate-util.c
parent8d737c695f37a5bb0ad5ded56a44777249624cea (diff)
downloadmate-control-center-d12302def2b23e124509f54afd0d9da49651d9f3.tar.bz2
mate-control-center-d12302def2b23e124509f54afd0d9da49651d9f3.tar.xz
libslab: remove a bunch of unused code
Diffstat (limited to 'libslab/slab-mate-util.c')
-rw-r--r--libslab/slab-mate-util.c90
1 files changed, 0 insertions, 90 deletions
diff --git a/libslab/slab-mate-util.c b/libslab/slab-mate-util.c
index 15a61ddb..efb4a535 100644
--- a/libslab/slab-mate-util.c
+++ b/libslab/slab-mate-util.c
@@ -139,96 +139,6 @@ open_desktop_item_help (MateDesktopItem * desktop_item)
return TRUE;
}
-gboolean
-slab_load_image (GtkImage * image, GtkIconSize size, const gchar * image_id)
-{
- GdkPixbuf *pixbuf;
- gint width;
- gint height;
-
- gchar *id;
-
- if (!image_id)
- return FALSE;
-
- id = g_strdup (image_id);
-
- gtk_icon_size_lookup (size, &width, &height);
-
- if (g_path_is_absolute (id))
- pixbuf = gdk_pixbuf_new_from_file_at_size (id, width, height, NULL);
- else
- {
- if ( /* file extensions are not copesetic with loading by "name" */
- g_str_has_suffix (id, ".png") ||
- g_str_has_suffix (id, ".svg") ||
- g_str_has_suffix (id, ".xpm")
- )
-
- id[strlen (id) - 4] = '\0';
-
- pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), id, width, 0,
- NULL);
- }
-
- if (pixbuf)
- {
- gtk_image_set_from_pixbuf (image, pixbuf);
-
- g_object_unref (pixbuf);
-
- g_free (id);
-
- return TRUE;
- }
- else
- { /* This will make it show the "broken image" icon */
- gtk_image_set_from_file (image, id);
-
- g_free (id);
-
- return FALSE;
- }
-}
-
-gchar *
-string_replace_once (const gchar * str_template, const gchar * key, const gchar * value)
-{
- GString *str_built;
- gint pivot;
-
- pivot = strstr (str_template, key) - str_template;
-
- str_built = g_string_new_len (str_template, pivot);
- g_string_append (str_built, value);
- g_string_append (str_built, &str_template[pivot + strlen (key)]);
-
- return g_string_free (str_built, FALSE);
-}
-
-void
-spawn_process (const gchar *command)
-{
- gchar **argv;
- GError *error = NULL;
-
- if (!command || strlen (command) < 1)
- return;
-
- argv = g_strsplit (command, " ", -1);
-
- g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error);
-
- if (error)
- {
- g_warning ("error spawning [%s]: [%s]\n", command, error->message);
-
- g_error_free (error);
- }
-
- g_strfreev (argv);
-}
-
void
copy_file (const gchar * src_uri, const gchar * dst_uri)
{