diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/callbacks.c | 77 | ||||
-rw-r--r-- | shell/menu.c | 15 | ||||
-rw-r--r-- | shell/shell.c | 20 |
3 files changed, 2 insertions, 110 deletions
diff --git a/shell/callbacks.c b/shell/callbacks.c index 2bfb73b5..ffaac84b 100644 --- a/shell/callbacks.c +++ b/shell/callbacks.c @@ -27,7 +27,6 @@ #include "report.h" #include "remote.h" #include "syncmanager.h" -#include "help-viewer.h" #include "xmlrpc-server.h" #include "config.h" @@ -170,84 +169,12 @@ void cb_save_graphic() void cb_open_web_page() { - open_url("http://wiki.hardinfo.org"); -} - -void cb_open_online_docs() -{ - Shell *shell; - - shell = shell_get_main_shell(); - if (shell->help_viewer) { - help_viewer_open_page(shell->help_viewer, "index.hlp"); - } else { - gchar *help_dir; - - help_dir = g_build_filename(params.path_data, "doc", NULL); - shell->help_viewer = help_viewer_new(help_dir, "index.hlp"); - g_free(help_dir); - } -} - -void cb_open_online_docs_context() -{ - Shell *shell; - - shell = shell_get_main_shell(); - - if (shell->selected->flags & MODULE_FLAG_HAS_HELP) { - gchar *temp; - - if (shell->selected_module->dll) { - gchar *name_temp; - - name_temp = (gchar *)g_module_name(shell->selected_module->dll); - name_temp = g_path_get_basename(name_temp); - strend(name_temp, '.'); - - temp = g_strdup_printf("context-help-%s-%d.hlp", - name_temp, - shell->selected->number); - - g_free(name_temp); - } else { - goto no_context_help; - } - - if (shell->help_viewer) { - help_viewer_open_page(shell->help_viewer, temp); - } else { - gchar *help_dir; - - help_dir = g_build_filename(params.path_data, "doc", NULL); - shell->help_viewer = help_viewer_new(help_dir, temp); - g_free(help_dir); - } - - g_free(temp); - } else { - GtkWidget *dialog; - -no_context_help: - dialog = gtk_message_dialog_new(GTK_WINDOW(shell->window), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - _("No context help available.")); - - gtk_dialog_run(GTK_DIALOG(dialog)); - gtk_widget_destroy(dialog); - } + open_url("http://www.hardinfo.org"); } void cb_report_bug() { - open_url("http://wiki.hardinfo.org/BugReports"); -} - -void cb_donate() -{ - open_url("http://wiki.hardinfo.org/Donate"); + open_url("http://github.com/lpereira/hardinfo"); } void cb_refresh() diff --git a/shell/menu.c b/shell/menu.c index ddc2f864..b72e0a45 100644 --- a/shell/menu.c +++ b/shell/menu.c @@ -84,16 +84,6 @@ static GtkActionEntry entries[] = { NULL, G_CALLBACK(cb_refresh)}, - {"OnlineDocsAction", GTK_STOCK_HELP, - N_("Contents"), "F1", - NULL, - G_CALLBACK(cb_open_online_docs)}, - - {"ContextHelpAction", NULL, - N_("Context help"), "<Ctrl>F1", - NULL, - G_CALLBACK(cb_open_online_docs_context)}, - {"HomePageAction", HI_STOCK_INTERNET, N_("_Open HardInfo Web Site"), NULL, NULL, @@ -104,11 +94,6 @@ static GtkActionEntry entries[] = { NULL, G_CALLBACK(cb_report_bug)}, - {"DonateAction", HI_STOCK_DONATE, - N_("_Donate to the project"), NULL, - NULL, - G_CALLBACK(cb_donate)}, - {"AboutAction", GTK_STOCK_ABOUT, N_("_About HardInfo"), NULL, N_("Displays program version information"), diff --git a/shell/shell.c b/shell/shell.c index 12bd2002..38ada329 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -816,7 +816,6 @@ void shell_init(GSList * modules) shell_status_update(_("Done.")); shell_status_set_enabled(FALSE); - shell_action_set_enabled("ContextHelpAction", FALSE); shell_action_set_enabled("RefreshAction", FALSE); shell_action_set_enabled("CopyAction", FALSE); shell_action_set_enabled("SaveGraphAction", FALSE); @@ -1778,22 +1777,6 @@ static void module_selected(gpointer data) shell_set_title(shell, title); g_free(title); - if (entry->flags & MODULE_FLAG_HAS_HELP) { - gchar *temp; - - shell_action_set_enabled("ContextHelpAction", TRUE); - - temp = g_strdup_printf("Help on %s \342\206\222 %s", - shell->selected_module->name, - entry->name); - shell_action_set_label("ContextHelpAction", temp); - - g_free(temp); - } else { - shell_action_set_enabled("ContextHelpAction", FALSE); - shell_action_set_label("ContextHelpAction", _("Context help")); - } - shell_action_set_enabled("RefreshAction", TRUE); shell_action_set_enabled("CopyAction", TRUE); @@ -1807,9 +1790,6 @@ static void module_selected(gpointer data) gtk_tree_store_clear(GTK_TREE_STORE(shell->info->model)); set_view_type(SHELL_VIEW_NORMAL, FALSE); - shell_action_set_enabled("ContextHelpAction", FALSE); - shell_action_set_label("ContextHelpAction", _("Context help")); - if (shell->selected_module->summaryfunc) { shell_show_summary(); } |