diff options
author | Ted Gould <ted@canonical.com> | 2009-08-04 00:23:05 +0100 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-08-04 00:23:05 +0100 |
commit | a1fa7baf4cdc6b0a29ba2d04e89691e6f1f02b72 (patch) | |
tree | 564c261e3d8cacb45e7b2fe36be8c7ef6e8a4c58 /src/applet-main.c | |
parent | 064740bd411abe73a67a9c75f469f04d8259afdb (diff) | |
parent | 475cf3d1bc5ede2ba3e9388edf1b12345ebf5986 (diff) | |
download | libayatana-indicator-a1fa7baf4cdc6b0a29ba2d04e89691e6f1f02b72.tar.gz libayatana-indicator-a1fa7baf4cdc6b0a29ba2d04e89691e6f1f02b72.tar.bz2 libayatana-indicator-a1fa7baf4cdc6b0a29ba2d04e89691e6f1f02b72.zip |
Merging in upstream code to split out libindicate-gtk
Diffstat (limited to 'src/applet-main.c')
-rw-r--r-- | src/applet-main.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/applet-main.c b/src/applet-main.c index feb1b4d..5af2763 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -62,16 +62,10 @@ load_module (const gchar * name, GtkWidget * menu) g_debug("Looking at Module: %s", name); g_return_val_if_fail(name != NULL, FALSE); - guint suffix_len = strlen(G_MODULE_SUFFIX); - guint name_len = strlen(name); - - g_return_val_if_fail(name_len > suffix_len, FALSE); - - int i; - for (i = 0; i < suffix_len; i++) { - if (name[(name_len - suffix_len) + i] != (G_MODULE_SUFFIX)[i]) - return FALSE; + if (!g_str_has_suffix(name, G_MODULE_SUFFIX)) { + return FALSE; } + g_debug("Loading Module: %s", name); gchar * fullpath = g_build_filename(INDICATOR_DIR, name, NULL); |