diff options
-rw-r--r-- | hardinfo2/callbacks.c | 5 | ||||
-rw-r--r-- | hardinfo2/shell.c | 8 | ||||
-rw-r--r-- | hardinfo2/util.c | 17 |
3 files changed, 13 insertions, 17 deletions
diff --git a/hardinfo2/callbacks.c b/hardinfo2/callbacks.c index 0b312717..27228588 100644 --- a/hardinfo2/callbacks.c +++ b/hardinfo2/callbacks.c @@ -153,6 +153,7 @@ void cb_generate_report() void cb_quit(void) { - gtk_main_quit(); - exit(0); + do { + gtk_main_quit(); + } while (gtk_main_level() > 1); } diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c index 096b126a..b93ff05c 100644 --- a/hardinfo2/shell.c +++ b/hardinfo2/shell.c @@ -882,12 +882,6 @@ moreinfo_handle_normal(GKeyFile * key_file, gchar * group, gchar ** keys) } } -static gboolean -g_true(gpointer key, gpointer value, gpointer data) -{ - return TRUE; -} - static void module_selected_show_info(ShellModuleEntry * entry, gboolean reload) { @@ -910,7 +904,7 @@ module_selected_show_info(ShellModuleEntry * entry, gboolean reload) /* recreate the iter hash table only if we're not reloading the module section */ if (!reload) { if (update_tbl != NULL) { - g_hash_table_foreach_remove(update_tbl, g_true, NULL); + g_hash_table_foreach_remove(update_tbl, (GHRFunc) gtk_true, NULL); } update_tbl = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); } diff --git a/hardinfo2/util.c b/hardinfo2/util.c index 129b921f..ce34a010 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -208,7 +208,7 @@ gboolean binreloc_init(gboolean try_hardcoded) g_free(tmp); params.path_data = params.path_lib = NULL; - + if (try_hardcoded) { /* We tried the hardcoded paths, but still was unable to find the runtime data. Give up. */ @@ -291,7 +291,7 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) .short_name = 'm', .arg = G_OPTION_ARG_STRING_ARRAY, .arg_data = &use_modules, - .description = "specify module file name to load; may be used more than once" + .description = "specify module to load" }, { .long_name = "version", @@ -335,10 +335,12 @@ gboolean ui_init(int *argc, char ***argv) void open_url(gchar * url) { - const gchar *browsers[] = - { "xdg-open", "gnome-open", "kfmclient openURL", "sensible-browser", - "firefox", "epiphany", "galeon", "mozilla", "opera", "konqueror", - "netscape", "links -g", NULL }; + const gchar *browsers[] = { + "xdg-open", "gnome-open", "kfmclient openURL", + "sensible-browser", "firefox", "epiphany", + "galeon", "mozilla", "opera", "konqueror", + "netscape", "links -g", NULL + }; gint i; for (i = 0; browsers[i]; i++) { @@ -409,8 +411,7 @@ static ShellModule *module_load(gchar *filename) { const gchar *(*shell_name) (gint); ShellModuleEntry *entry = g_new0(ShellModuleEntry, 1); - if (params.gui_running - && g_module_symbol(module->dll, "hi_icon", + if (params.gui_running && g_module_symbol(module->dll, "hi_icon", (gpointer) & (shell_icon))) { entry->icon = shell_icon(i); } |