diff options
| author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-01-07 17:54:10 +0000 | 
|---|---|---|
| committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-01-07 17:54:10 +0000 | 
| commit | f11c77e39f595fda18aaa7035ee6e1f032cc6039 (patch) | |
| tree | 34e32cea6d25f52279777ed7813cdc9726957e46 /hardinfo2 | |
| parent | def14b5309427469d4c5fadc720a308ee0ec4b6a (diff) | |
Optimizations, add module description to ModuleAbout
Diffstat (limited to 'hardinfo2')
| -rw-r--r-- | hardinfo2/benchmark.c | 1 | ||||
| -rw-r--r-- | hardinfo2/callbacks.c | 12 | ||||
| -rw-r--r-- | hardinfo2/computer.c | 1 | ||||
| -rw-r--r-- | hardinfo2/devices.c | 1 | ||||
| -rw-r--r-- | hardinfo2/hardinfo.h | 7 | ||||
| -rw-r--r-- | hardinfo2/shell.c | 14 | 
6 files changed, 20 insertions, 16 deletions
diff --git a/hardinfo2/benchmark.c b/hardinfo2/benchmark.c index 1a823f13..81d66534 100644 --- a/hardinfo2/benchmark.c +++ b/hardinfo2/benchmark.c @@ -230,6 +230,7 @@ hi_module_get_about(void)      static ModuleAbout ma[] = {        {            .author	= "Leandro A. F. Pereira", +          .description	= "Perform tasks and compare with other systems",            .version	= VERSION,            .license	= "GNU GPL version 2"        } diff --git a/hardinfo2/callbacks.c b/hardinfo2/callbacks.c index 51035e63..8141a426 100644 --- a/hardinfo2/callbacks.c +++ b/hardinfo2/callbacks.c @@ -144,10 +144,14 @@ void cb_about_module(GtkAction *action)                                        idle_free(g_strdup_printf("%s Module", sm->name)));              gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), ma->version);              gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about), -                                           idle_free(g_strdup_printf("Written by %s", ma->author))); -             -            gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about), -                                          idle_free(g_strdup_printf("Licensed under %s", ma->license))); +                                           idle_free(g_strdup_printf("Written by %s\n" +                                                     "Licensed under %s", +                                                     ma->author, +                                                     ma->license))); + +            if (ma->description) +                gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about), +                                              ma->description);              gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about), sm->icon);              gtk_dialog_run(GTK_DIALOG(about)); diff --git a/hardinfo2/computer.c b/hardinfo2/computer.c index b1fd029a..d6508aca 100644 --- a/hardinfo2/computer.c +++ b/hardinfo2/computer.c @@ -414,6 +414,7 @@ hi_module_get_about(void)      static ModuleAbout ma[] = {        {            .author	= "Leandro A. F. Pereira", +          .description	= "Gathers high-level computer information",            .version	= VERSION,            .license	= "GNU GPL version 2"        } diff --git a/hardinfo2/devices.c b/hardinfo2/devices.c index e196897e..87fa1999 100644 --- a/hardinfo2/devices.c +++ b/hardinfo2/devices.c @@ -390,6 +390,7 @@ hi_module_get_about(void)      static ModuleAbout ma[] = {        {            .author	= "Leandro A. F. Pereira", +          .description	= "Gathers information about hardware devices",            .version	= VERSION,            .license	= "GNU GPL version 2"        } diff --git a/hardinfo2/hardinfo.h b/hardinfo2/hardinfo.h index 3bc45959..e05521d3 100644 --- a/hardinfo2/hardinfo.h +++ b/hardinfo2/hardinfo.h @@ -56,9 +56,10 @@ struct _ModuleEntry {  };  struct _ModuleAbout { -    gchar	*author; -    gchar	*version; -    gchar	*license; +    const gchar *description; +    const gchar	*author; +    const gchar	*version; +    const gchar	*license;  };  /* String utility functions */ diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c index 2b5e7f3e..ad626ffa 100644 --- a/hardinfo2/shell.c +++ b/hardinfo2/shell.c @@ -1011,15 +1011,11 @@ module_selected_show_info(ShellModuleEntry * entry, gboolean reload)          for (sfusrc = update_sfusrc; sfusrc; sfusrc = sfusrc->next) {              ShellFieldUpdateSource *src = (ShellFieldUpdateSource *)sfusrc->data; -            GSource *source; -             -            source = g_main_context_find_source_by_id(NULL, src->source_id); -            if (source) { -                g_free(src->sfu->field_name); -                g_free(src->sfu); -                g_free(src); -                g_source_destroy(source); -            } + +            g_source_remove(src->source_id); +            g_free(src->sfu->field_name); +            g_free(src->sfu); +            g_free(src);          }          g_slist_free(update_sfusrc);  | 
