diff options
author | Paolo Borelli <pborelli@katamail.com> | 2006-03-25 11:47:31 +0000 |
---|---|---|
committer | Paolo Borelli <pborelli@src.gnome.org> | 2006-03-25 11:47:31 +0000 |
commit | 09a5c23585ee0c52d22d13cade5ee91027d9af9d (patch) | |
tree | e3c9bb7157a6ebfda11b997ed31b6e0a676091b4 /src/prefs.c | |
parent | 8f59776087f5f4777fcf1f5f35aa53a405338514 (diff) | |
download | metacity-09a5c23585ee0c52d22d13cade5ee91027d9af9d.tar.gz |
use g_str_has_prefix instead of a local copy of the function.
2006-03-25 Paolo Borelli <pborelli@katamail.com>
* src/prefs.c: use g_str_has_prefix instead of a local copy
of the function.
Diffstat (limited to 'src/prefs.c')
-rw-r--r-- | src/prefs.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/prefs.c b/src/prefs.c index 8e762fb6..eb2b2d0f 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -525,26 +525,6 @@ meta_prefs_init (void) } #ifdef HAVE_GCONF -/* from eel */ -static gboolean -str_has_prefix (const char *haystack, const char *needle) -{ - const char *h, *n; - - /* Eat one character at a time. */ - h = haystack == NULL ? "" : haystack; - n = needle == NULL ? "" : needle; - do - { - if (*n == '\0') - return TRUE; - if (*h == '\0') - return FALSE; - } - while (*h++ == *n++); - - return FALSE; -} static void change_notify (GConfClient *client, @@ -706,7 +686,7 @@ change_notify (GConfClient *client, if (update_disable_workarounds (b)) queue_changed (META_PREF_DISABLE_WORKAROUNDS); } - else if (str_has_prefix (key, KEY_WINDOW_BINDINGS_PREFIX)) + else if (g_str_has_prefix (key, KEY_WINDOW_BINDINGS_PREFIX)) { const char *str; @@ -722,7 +702,7 @@ change_notify (GConfClient *client, if (update_window_binding (key, str)) queue_changed (META_PREF_WINDOW_KEYBINDINGS); } - else if (str_has_prefix (key, KEY_SCREEN_BINDINGS_PREFIX)) + else if (g_str_has_prefix (key, KEY_SCREEN_BINDINGS_PREFIX)) { const char *str; @@ -787,7 +767,7 @@ change_notify (GConfClient *client, queue_changed (META_PREF_AUTO_RAISE_DELAY); } - else if (str_has_prefix (key, KEY_COMMAND_PREFIX)) + else if (g_str_has_prefix (key, KEY_COMMAND_PREFIX)) { const char *str; @@ -819,7 +799,7 @@ change_notify (GConfClient *client, if (update_terminal_command (str)) queue_changed (META_PREF_TERMINAL_COMMAND); } - else if (str_has_prefix (key, KEY_WORKSPACE_NAME_PREFIX)) + else if (g_str_has_prefix (key, KEY_WORKSPACE_NAME_PREFIX)) { const char *str; |