summaryrefslogtreecommitdiff
path: root/src/nautilus-ui-utilities.c
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2018-01-04 14:11:49 +0200
committerErnestas Kulik <ernestask@gnome.org>2018-01-04 14:11:49 +0200
commitbf104ec9d99866ca9de122d8f691910591009940 (patch)
treec3a9e3c187f686975decba1c254a33cd0aacad7e /src/nautilus-ui-utilities.c
parent890760bbce7585943ac3eed9375eddd19ef4b932 (diff)
downloadnautilus-bf104ec9d99866ca9de122d8f691910591009940.tar.gz
files-view: use GLib for action name escaping
URI-encoding the strings takes care of all illegal characters and removes the need for our own escaping method. Fixes #69.
Diffstat (limited to 'src/nautilus-ui-utilities.c')
-rw-r--r--src/nautilus-ui-utilities.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/src/nautilus-ui-utilities.c b/src/nautilus-ui-utilities.c
index 754f0fb64..58958e5e4 100644
--- a/src/nautilus-ui-utilities.c
+++ b/src/nautilus-ui-utilities.c
@@ -189,80 +189,6 @@ nautilus_pop_up_context_menu (GtkWidget *parent,
g_object_unref (gtk_menu);
}
-char *
-nautilus_escape_action_name (const char *action_name,
- const char *prefix)
-{
- GString *s;
-
- if (action_name == NULL)
- {
- return NULL;
- }
-
- s = g_string_new (prefix);
-
- while (*action_name != 0)
- {
- switch (*action_name)
- {
- case '\\':
- {
- g_string_append (s, "\\\\");
- }
- break;
-
- case '/':
- {
- g_string_append (s, "\\s");
- }
- break;
-
- case '&':
- {
- g_string_append (s, "\\a");
- }
- break;
-
- case '"':
- {
- g_string_append (s, "\\q");
- }
- break;
-
- case ' ':
- {
- g_string_append (s, "+");
- }
- break;
-
- case '(':
- {
- g_string_append (s, "#");
- }
- break;
-
- case ')':
- {
- g_string_append (s, "^");
- }
- break;
-
- case ':':
- {
- g_string_append (s, "\\\\");
- }
- break;
-
- default:
- g_string_append_c (s, *action_name);
- }
-
- action_name++;
- }
- return g_string_free (s, FALSE);
-}
-
#define NAUTILUS_THUMBNAIL_FRAME_LEFT 3
#define NAUTILUS_THUMBNAIL_FRAME_TOP 3
#define NAUTILUS_THUMBNAIL_FRAME_RIGHT 3