aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-08-04 10:27:08 +0100
committerTed Gould <ted@canonical.com>2009-08-04 10:27:08 +0100
commit5909ee4172e2913f7ef65b4632c4a283431adae4 (patch)
tree977b8970244ec952fc55ddaf7a9cb9aec8e794e9 /src
parent064740bd411abe73a67a9c75f469f04d8259afdb (diff)
parent63ed0ba9f0de5d60f31e5c52849cb6fb7a070cd9 (diff)
downloadlibayatana-indicator-5909ee4172e2913f7ef65b4632c4a283431adae4.tar.gz
libayatana-indicator-5909ee4172e2913f7ef65b4632c4a283431adae4.tar.bz2
libayatana-indicator-5909ee4172e2913f7ef65b4632c4a283431adae4.zip
* Merging in upstream code to split out libindicate-gtk
* debian/control: * Changing the version number of libindcate to 2 to match the .so numbering. * Creating packages for libindicate-gtk * Added libindicate-gtk-dev.install and libindicate-gtk0.install for the new library. * Renamed libindicate1.install to libindicate2.install to match the package name change. * Modified libindicate-dev to be more specific about the header files that it grabs.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am1
-rw-r--r--src/applet-main.c12
2 files changed, 4 insertions, 9 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 02b70c1..97af739 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,6 +6,7 @@ indicator_applet_CFLAGS = \
-DG_LOG_DOMAIN=\""Indicator-Applet"\" \
-DDATADIR=\""$(datadir)"\" \
-DINDICATOR_DIR=\""$(libdir)/indicators/2"\" \
+ -I$(srcdir)/.. \
$(APPLET_CFLAGS)
indicator_applet_SOURCES = \
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);