summaryrefslogtreecommitdiff
path: root/hardinfo2/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/util.c')
-rw-r--r--hardinfo2/util.c14
1 files changed, 13 insertions, 1 deletions
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)