diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-01-04 17:15:12 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-01-04 17:15:12 +0000 |
commit | a1054182ecd202db45cde1883991d70dbb954763 (patch) | |
tree | 9353c7e206a89d4684a169704e29cc01b35a0188 /hardinfo2/shell.c | |
parent | b447372e7c120e2336fe0ac910792b04e1688af2 (diff) |
Add about information.
Diffstat (limited to 'hardinfo2/shell.c')
-rw-r--r-- | hardinfo2/shell.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c index 3259697a..dd2f46ba 100644 --- a/hardinfo2/shell.c +++ b/hardinfo2/shell.c @@ -28,6 +28,8 @@ #include <menu.h> #include <stock.h> +#include <callbacks.h> + /* * Internal Prototypes ******************************************************** */ @@ -371,8 +373,10 @@ static void view_menu_select_entry(gpointer data, gpointer data2) gtk_tree_path_free(path); } -static void add_module_to_view_menu(gchar * name, GdkPixbuf * pixbuf) +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[] = { @@ -384,14 +388,27 @@ static void add_module_to_view_menu(gchar * name, GdkPixbuf * pixbuf) NULL, /* tooltip */ NULL, /* callback */ }, + { + about_module, + name, + name, + NULL, + name, + (GCallback) cb_about_module, + }, }; - gtk_action_group_add_actions(shell->action_group, entries, 1, NULL); + gtk_action_group_add_actions(shell->action_group, entries, 2, NULL); gtk_ui_manager_add_ui(shell->ui_manager, gtk_ui_manager_new_merge_id(shell->ui_manager), "/menubar/ViewMenu/LastSep", name, name, GTK_UI_MANAGER_MENU, TRUE); + + gtk_ui_manager_add_ui(shell->ui_manager, + gtk_ui_manager_new_merge_id(shell->ui_manager), + "/menubar/HelpMenu/HelpMenuModules/LastSep", + about_module, about_module, GTK_UI_MANAGER_AUTO, TRUE); } static void @@ -435,7 +452,7 @@ static void add_modules_to_gui(gpointer data, gpointer user_data) -1); } - add_module_to_view_menu(module->name, module->icon); + add_module_to_menu(module->name, module->icon); if (module->entries) { ShellModuleEntry *entry; |