diff options
Diffstat (limited to 'shell/menu.c')
-rw-r--r-- | shell/menu.c | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/shell/menu.c b/shell/menu.c index b0f01e58..83bd8144 100644 --- a/shell/menu.c +++ b/shell/menu.c @@ -1,13 +1,13 @@ /* * HardInfo - * Copyright(C) 2003-2007 Leandro A. F. Pereira. + * Copyright(C) 2003-2007 L. A. F. Pereira. * * menu.c is based on UI Manager tutorial by Ryan McDougall * Copyright(C) 2005 Ryan McDougall. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2. + * the Free Software Foundation, version 2 or later. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -31,22 +31,30 @@ #include "uidefs.h" +#ifndef GTK_STOCK_COPY +#define GTK_STOCK_COPY "_Copy" +#endif + +#ifndef GTK_STOCK_REFRESH +#define GTK_STOCK_REFRESH "_Refresh" +#endif + static GtkActionEntry entries[] = { {"InformationMenuAction", NULL, N_("_Information")}, /* name, stock id, label */ - {"RemoteMenuAction", NULL, N_("_Remote")}, + // {"RemoteMenuAction", NULL, N_("_Remote")}, {"ViewMenuAction", NULL, N_("_View")}, {"HelpMenuAction", NULL, N_("_Help")}, - {"HelpMenuModulesAction", HI_STOCK_ABOUT_MODULES, N_("About _Modules")}, + // {"HelpMenuModulesAction", HI_STOCK_ABOUT_MODULES, N_("About _Modules")}, {"MainMenuBarAction", NULL, ""}, {"ReportAction", HI_STOCK_REPORT, /* name, stock id */ N_("Generate _Report"), "<control>R", /* label, accelerator */ - NULL, /* tooltip */ + N_("Generates a report with detailed system information"), /* tooltip */ G_CALLBACK(cb_generate_report)}, {"SyncManagerAction", HI_STOCK_SYNC_MENU, - N_("_Network Updater..."), NULL, - NULL, + N_("Synchronize"), NULL, + N_("Send benchmark results and receive updated data from the network"), G_CALLBACK(cb_sync_manager)}, {"OpenAction", "_Open", @@ -54,18 +62,18 @@ static GtkActionEntry entries[] = { NULL, G_CALLBACK(cb_sync_manager)}, - {"CopyAction", "_Copy", + {"CopyAction", HI_STOCK_CLIPBOARD, N_("_Copy to Clipboard"), "<control>C", N_("Copy to clipboard"), G_CALLBACK(cb_copy_to_clipboard)}, - {"RefreshAction", "_Refresh", + {"RefreshAction", HI_STOCK_REFRESH, N_("_Refresh"), "F5", NULL, G_CALLBACK(cb_refresh)}, {"HomePageAction", HI_STOCK_INTERNET, - N_("_Open HardInfo Web Site"), NULL, + N_("_Open HardInfo2 Web Site"), NULL, NULL, G_CALLBACK(cb_open_web_page)}, @@ -75,7 +83,7 @@ static GtkActionEntry entries[] = { G_CALLBACK(cb_report_bug)}, {"AboutAction", "_About", - N_("_About HardInfo"), NULL, + N_("_About HardInfo2"), NULL, N_("Displays program version information"), G_CALLBACK(cb_about)}, @@ -94,6 +102,10 @@ static GtkToggleActionEntry toggle_entries[] = { N_("_Toolbar"), NULL, NULL, G_CALLBACK(cb_toolbar)}, + {"SyncOnStartupAction", NULL, + N_("Synchronize on startup"), NULL, + NULL, + G_CALLBACK(cb_sync_on_startup)}, }; /* Implement a handler for GtkUIManager's "add_widget" signal. The UI manager @@ -116,7 +128,7 @@ void menu_init(Shell * shell) /* Create our objects */ menu_box = shell->vbox; - action_group = gtk_action_group_new("HardInfo"); + action_group = gtk_action_group_new("HardInfo2"); menu_manager = gtk_ui_manager_new(); shell->action_group = action_group; @@ -126,7 +138,7 @@ void menu_init(Shell * shell) * menu_box -> window * actions -> action_group * action_group -> menu_manager */ - gtk_action_group_set_translation_domain( action_group, "hardinfo" );//gettext + gtk_action_group_set_translation_domain( action_group, "hardinfo2" );//gettext gtk_action_group_add_actions(action_group, entries, G_N_ELEMENTS(entries), NULL); gtk_action_group_add_toggle_actions(action_group, toggle_entries, |