diff options
Diffstat (limited to 'hardinfo2')
-rw-r--r-- | hardinfo2/remote.c | 4 | ||||
-rw-r--r-- | hardinfo2/util.c | 14 |
2 files changed, 15 insertions, 3 deletions
diff --git a/hardinfo2/remote.c b/hardinfo2/remote.c index f0922d3f..a6d26b43 100644 --- a/hardinfo2/remote.c +++ b/hardinfo2/remote.c @@ -222,13 +222,13 @@ static void populate_store(GtkListStore * store) if (g_key_file_load_from_file(remote, path, 0, NULL)) { gint no_hosts, i; - no_hosts = g_key_file_get_integer(remote, "$Global$", "no_hosts", NULL); + no_hosts = g_key_file_get_integer(remote, "global", "no_hosts", NULL); for (i = 0; i < no_hosts; i++) { gchar *hostname; gchar *hostgroup; gchar *icon; - hostgroup = g_strdup_printf("Host%d", i); + hostgroup = g_strdup_printf("host%d", i); hostname = g_key_file_get_string(remote, hostgroup, "name", NULL); icon = g_key_file_get_string(remote, hostgroup, "icon", NULL); diff --git a/hardinfo2/util.c b/hardinfo2/util.c index 27e44943..a8bb8b8c 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -599,7 +599,10 @@ static void module_unload(ShellModule * module) gdk_pixbuf_unref(module->icon); for (entry = module->entries; entry; entry = entry->next) { - g_free(entry->data); + ShellModuleEntry *e = (ShellModuleEntry *)entry->data; + + g_source_remove_by_user_data(e); + g_free(e); } g_slist_free(module->entries); @@ -626,10 +629,19 @@ void module_unload_all(void) gtk_tree_store_clear(GTK_TREE_STORE(shell->tree->model)); sync_manager_clear_entries(); + /* TODO FIXME clear shell::update_tbl */ + + gtk_tree_store_clear(GTK_TREE_STORE(shell->tree->model)); + gtk_tree_store_clear(GTK_TREE_STORE(shell->info->model)); + gtk_tree_store_clear(GTK_TREE_STORE(shell->moreinfo->model)); + + gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(shell->info->view), FALSE); + g_slist_free(shell->tree->modules); g_slist_free(shell->merge_ids); shell->merge_ids = NULL; shell->tree->modules = NULL; + shell->selected = NULL; } static ShellModule *module_load(gchar * filename) |