diff options
| author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-12-01 12:01:22 +0000 | 
|---|---|---|
| committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-12-01 12:01:22 +0000 | 
| commit | 8a9fdae124e2e976c05b190ca83c65e07ca913a4 (patch) | |
| tree | aa089323756a5cd6d4b7dc85cbf1f5e87a321dae /hardinfo2 | |
| parent | 542947560c4bc8301917a4ab9e9a1f625da0b1af (diff) | |
More and more and more cleanups
Diffstat (limited to 'hardinfo2')
| -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);              } | 
