summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-01-25 00:20:10 +0100
committerStefano Karapetsas <[email protected]>2013-01-25 00:20:10 +0100
commitee1e872ab1e1ae04f37b3e960500372082032f50 (patch)
tree57ba5254c427b523d5d71f6a851ff5025a3736dd
parent1437ee59c850d8057fd468b2773c971ff2ad34ce (diff)
downloadmate-terminal-ee1e872ab1e1ae04f37b3e960500372082032f50.tar.bz2
mate-terminal-ee1e872ab1e1ae04f37b3e960500372082032f50.tar.xz
Remove unused function from terminal-gsettings
-rw-r--r--src/terminal-gsettings.c67
-rw-r--r--src/terminal-gsettings.h3
2 files changed, 0 insertions, 70 deletions
diff --git a/src/terminal-gsettings.c b/src/terminal-gsettings.c
index e13b3c7..8cbd35e 100644
--- a/src/terminal-gsettings.c
+++ b/src/terminal-gsettings.c
@@ -33,73 +33,6 @@
#include <glib.h>
#include <gio/gio.h>
-/* (copied from gnome-panel)
- * Adapted from is_valid_keyname() in glib (gio/glib-compile-schemas.c)
- * Differences:
- * - gettext support removed (we don't need translations here)
- * - remove support for allow_any_name
- */
-gboolean
-terminal_gsettings_is_valid_keyname (const gchar *key,
- GError **error)
-{
- gint i;
-
- if (key[0] == '\0')
- {
- g_set_error_literal (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
- "empty names are not permitted");
- return FALSE;
- }
-
- if (!g_ascii_islower (key[0]))
- {
- g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
- "invalid name '%s': names must begin "
- "with a lowercase letter", key);
- return FALSE;
- }
-
- for (i = 1; key[i]; i++)
- {
- if (key[i] != '-' &&
- !g_ascii_islower (key[i]) &&
- !g_ascii_isdigit (key[i]))
- {
- g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
- "invalid name '%s': invalid character '%c'; "
- "only lowercase letters, numbers and dash ('-') "
- "are permitted.", key, key[i]);
- return FALSE;
- }
-
- if (key[i] == '-' && key[i + 1] == '-')
- {
- g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
- "invalid name '%s': two successive dashes ('--') "
- "are not permitted.", key);
- return FALSE;
- }
- }
-
- if (key[i - 1] == '-')
- {
- g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
- "invalid name '%s': the last character may not be a "
- "dash ('-').", key);
- return FALSE;
- }
-
- if (i > 32)
- {
- g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
- "invalid name '%s': maximum length is 32", key);
- return FALSE;
- }
-
- return TRUE;
-}
-
/* copied from gnome-panel */
gboolean
terminal_gsettings_append_strv (GSettings *settings,
diff --git a/src/terminal-gsettings.h b/src/terminal-gsettings.h
index f8afb3d..1e7c363 100644
--- a/src/terminal-gsettings.h
+++ b/src/terminal-gsettings.h
@@ -33,9 +33,6 @@
G_BEGIN_DECLS
-gboolean terminal_gsettings_is_valid_keyname (const gchar *key,
- GError **error);
-
gboolean terminal_gsettings_append_strv (GSettings *settings,
const gchar *key,
const gchar *value);