diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-10-09 12:25:57 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-10-09 12:25:57 +0000 |
commit | d5160894773f5be501469fd3bba06211000ca798 (patch) | |
tree | 27c0325539bd730c456d5e6e8b9be1bb92196f11 | |
parent | 1435676447fae1584c9a38c3465690387bd7413a (diff) |
Cleanups, plug memleak
-rw-r--r-- | hardinfo2/callbacks.c | 8 | ||||
-rw-r--r-- | hardinfo2/shell.c | 7 | ||||
-rw-r--r-- | hardinfo2/util.c | 11 |
3 files changed, 10 insertions, 16 deletions
diff --git a/hardinfo2/callbacks.c b/hardinfo2/callbacks.c index 6a84de79..32db0791 100644 --- a/hardinfo2/callbacks.c +++ b/hardinfo2/callbacks.c @@ -72,22 +72,22 @@ void cb_save_graphic() void cb_open_web_page() { - open_url("http://hardinfo.berlios.de"); + open_url("http://wiki.hardinfo.org"); } void cb_open_online_docs() { - open_url("http://hardinfo.berlios.de/web/Documentation"); + open_url("http://wiki.hardinfo.org/Documentation"); } void cb_report_bug() { - open_url("http://hardinfo.berlios.de/web/BugReports"); + open_url("http://wiki.hardinfo.org/BugReports"); } void cb_donate() { - open_url("http://hardinfo.berlios.de/web/Donate"); + open_url("http://wiki.hardinfo.org/Donate"); } void cb_refresh() diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c index c43a2db6..0d32f2a9 100644 --- a/hardinfo2/shell.c +++ b/hardinfo2/shell.c @@ -419,8 +419,6 @@ static void add_module_to_menu(gchar * name, GdkPixbuf * pixbuf) { gchar *about_module = g_strdup_printf("AboutModule%s", name); - stock_icon_register_pixbuf(pixbuf, name); - GtkActionEntry entries[] = { { name, /* name */ @@ -440,6 +438,8 @@ static void add_module_to_menu(gchar * name, GdkPixbuf * pixbuf) }, }; + stock_icon_register_pixbuf(pixbuf, name); + gtk_action_group_add_actions(shell->action_group, entries, 2, NULL); gtk_ui_manager_add_ui(shell->ui_manager, @@ -458,8 +458,6 @@ static void add_module_entry_to_view_menu(gchar * module, gchar * name, GdkPixbuf * pixbuf, GtkTreeIter * iter) { - stock_icon_register_pixbuf(pixbuf, name); - GtkActionEntry entries[] = { { name, /* name */ @@ -471,6 +469,7 @@ add_module_entry_to_view_menu(gchar * module, gchar * name, }, }; + stock_icon_register_pixbuf(pixbuf, name); gtk_action_group_add_actions(shell->action_group, entries, 1, iter); gtk_ui_manager_add_ui(shell->ui_manager, diff --git a/hardinfo2/util.c b/hardinfo2/util.c index 375bb995..c3022a08 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -662,16 +662,11 @@ static GSList *modules_check_deps(GSList * modules) ShellModule *m; gboolean found = FALSE; - for (l = modules; l; l = l->next) { + for (l = modules; l && !found; l = l->next) { m = (ShellModule *) l->data; - gchar *name = - g_path_get_basename(g_module_name(m->dll)); - - if (g_str_equal(name, deps[i])) { - found = TRUE; - break; - } + gchar *name = g_path_get_basename(g_module_name(m->dll)); + found = g_str_equal(name, deps[i]); g_free(name); } |