aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/shell.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2006-10-16 17:53:16 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2006-10-16 17:53:16 +0000
commite46568349c49cadc870f5c0fc84dcce2f7c461b1 (patch)
tree139332ea64b814967711035cf388438a2c9fa302 /hardinfo2/shell.c
parent3722c94e232b39d2a05ef359a60d25ac0cbe7887 (diff)
Use g_str_equal instead of strcmp.
About box cleanups Use g_build_filename instead of building paths on my own Better BinReloc support (should work even if binreloc initialization fails)
Diffstat (limited to 'hardinfo2/shell.c')
-rw-r--r--hardinfo2/shell.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c
index 1990d0dc..e979a8c4 100644
--- a/hardinfo2/shell.c
+++ b/hardinfo2/shell.c
@@ -118,7 +118,7 @@ gboolean shell_action_get_active(const gchar *action_name)
GtkAction *action;
GSList *proxies;
- /* FIXME: Ugh. Are you sure there isn't any simpler way? O_o */
+ /* FIXME: Ugh. Are you sure there isn't any simpler way? O_o */
action = gtk_action_group_get_action(shell->action_group, action_name);
if (action) {
@@ -305,7 +305,7 @@ shell_tree_modules_load(ShellTree * shelltree)
keyfile = g_key_file_new();
- modules_conf = g_strdup_printf("%s/hardinfo/modules.conf", path_data);
+ modules_conf = g_build_filename(path_data, "modules.conf", NULL);
g_key_file_load_from_file(keyfile, modules_conf, 0, NULL);
g_free(modules_conf);
@@ -326,8 +326,11 @@ shell_tree_modules_load(ShellTree * shelltree)
module->icon = icon_cache_get_pixbuf(tmp);
g_free(tmp);
- tmp = g_strdup_printf("%s/hardinfo/modules/%s.so",
- path_lib, iname);
+ tmp = g_strdup_printf("%s.so", iname);
+ g_free(iname);
+ iname = tmp;
+
+ tmp = g_build_filename(path_lib, "modules", iname, NULL);
module->dll = g_module_open(tmp, G_MODULE_BIND_LAZY);
g_free(tmp);