[pan2/help-new: 14/14] Re-add help menu item for manual
- From: Petr Kovář <pmkovar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2/help-new: 14/14] Re-add help menu item for manual
- Date: Sat, 25 Mar 2017 23:02:35 +0000 (UTC)
commit f65eef957b29bfecfba2ac5042c55d8a59cdef8d
Author: Petr Kovar <pknbe volny cz>
Date: Sat Mar 25 23:58:26 2017 +0100
Re-add help menu item for manual
pan/gui/actions.cc | 10 ++++++++++
pan/gui/gui.cc | 36 +++++++++++++++++-------------------
pan/gui/gui.h | 3 +++
pan/gui/pan-ui.h | 3 +++
pan/gui/pan.ui.h | 3 +++
pan/gui/pan.ui.ssl.h | 3 +++
6 files changed, 39 insertions(+), 19 deletions(-)
---
diff --git a/pan/gui/actions.cc b/pan/gui/actions.cc
index 68f50ee..5b72341 100644
--- a/pan/gui/actions.cc
+++ b/pan/gui/actions.cc
@@ -181,6 +181,9 @@ namespace pan
void do_post (GtkAction*) { pan_ui->do_post(); }
void do_followup_to (GtkAction*) { pan_ui->do_followup_to(); }
void do_reply_to (GtkAction*) { pan_ui->do_reply_to(); }
+#ifdef HAVE_MANUAL
+ void do_pan_manual (GtkAction*) { pan_ui->do_pan_manual(); }
+#endif
void do_pan_web (GtkAction*) { pan_ui->do_pan_web(); }
void do_bug_report (GtkAction*) { pan_ui->do_bug_report(); }
void do_tip_jar (GtkAction*) { pan_ui->do_tip_jar(); }
@@ -676,6 +679,13 @@ namespace pan
NULL,
G_CALLBACK(do_reply_to) },
+#ifdef HAVE_MANUAL
+ { "pan-manual", NULL,
+ N_("_Contents"), "F1",
+ NULL,
+ G_CALLBACK(do_pan_manual) },
+#endif
+
{ "pan-web-page", NULL,
N_("_Pan Home Page"), NULL,
NULL,
diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc
index 3956f53..c29e574 100644
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@ -1624,24 +1624,22 @@ void GUI :: do_reply_to ()
g_object_unref (message);
}
}
-
-//void GUI :: do_pan_manual ()
-//{
-//#ifdef HAVE_HELP
-// GError * error (NULL);
-// gtk_show_uri (NULL, "ghelp:pan", gtk_get_current_event_time (), &error);
-// if (error) {
-// GtkWidget * w = gtk_message_dialog_new (get_window(_root),
-//
GtkDialogFlags(GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT),
-// GTK_MESSAGE_ERROR,
-// GTK_BUTTONS_CLOSE,
-// _("Unable to open help file"));
-// g_signal_connect_swapped (w, "response", G_CALLBACK (gtk_widget_destroy), w);
-// gtk_widget_show_all (w);
-// }
-//#endif
-//}
-
+#ifdef HAVE_MANUAL
+void GUI :: do_pan_manual ()
+{
+ GError * error (NULL);
+ gtk_show_uri (NULL, "help:pan", gtk_get_current_event_time (), &error);
+ if (error) {
+ GtkWidget * w = gtk_message_dialog_new (get_window(_root),
+
GtkDialogFlags(GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT),
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("Unable to open help file."));
+ g_signal_connect_swapped (w, "response", G_CALLBACK (gtk_widget_destroy), w);
+ gtk_widget_show_all (w);
+ }
+}
+#endif
void GUI :: do_pan_web ()
{
URL :: open (_prefs, "http://pan.rebelbase.com/");
@@ -1668,7 +1666,7 @@ void GUI :: do_about_pan ()
gtk_about_dialog_set_program_name (w, _("Pan"));
gtk_about_dialog_set_version (w, PACKAGE_VERSION);
gtk_about_dialog_set_comments (w, VERSION_TITLE " (" GIT_REV "; " PLATFORM_INFO ")");
- gtk_about_dialog_set_copyright (w, _("Copyright \u00A9 2002-2016 Charles Kerr and others")); // \u00A9 is
unicode for (c)
+ gtk_about_dialog_set_copyright (w, _("Copyright \u00A9 2002-2017 Charles Kerr and others")); // \u00A9 is
unicode for (c)
gtk_about_dialog_set_website (w, "http://pan.rebelbase.com/");
gtk_about_dialog_set_logo (w, logo);
gtk_about_dialog_set_license (w, LICENSE);
diff --git a/pan/gui/gui.h b/pan/gui/gui.h
index 474e8e3..ee8f2eb 100644
--- a/pan/gui/gui.h
+++ b/pan/gui/gui.h
@@ -167,6 +167,9 @@ namespace pan
virtual void do_post ();
virtual void do_followup_to ();
virtual void do_reply_to ();
+#ifdef HAVE_MANUAL
+ virtual void do_pan_manual ();
+#endif
virtual void do_pan_web ();
virtual void do_bug_report ();
virtual void do_tip_jar ();
diff --git a/pan/gui/pan-ui.h b/pan/gui/pan-ui.h
index d69b014..4d95b6a 100644
--- a/pan/gui/pan-ui.h
+++ b/pan/gui/pan-ui.h
@@ -84,6 +84,9 @@ namespace pan
virtual void do_post () = 0;
virtual void do_followup_to () = 0;
virtual void do_reply_to () = 0;
+#ifdef HAVE_MANUAL
+ virtual void do_pan_manual () = 0;
+#endif
virtual void do_pan_web () = 0;
virtual void do_bug_report () = 0;
virtual void do_tip_jar () = 0;
diff --git a/pan/gui/pan.ui.h b/pan/gui/pan.ui.h
index ef09071..8133d85 100644
--- a/pan/gui/pan.ui.h
+++ b/pan/gui/pan.ui.h
@@ -151,6 +151,9 @@ const char * fallback_ui_file =
" <menuitem action='cancel-article' />\n"
" </menu>\n"
" <menu action='help-menu'>\n"
+#ifdef HAVE_MANUAL
+" <menuitem action='pan-manual' />\n"
+#endif
" <menuitem action='pan-web-page' />\n"
" <menuitem action='tip-jar' />\n"
" <menuitem action='bug-report' />\n"
diff --git a/pan/gui/pan.ui.ssl.h b/pan/gui/pan.ui.ssl.h
index e90c406..e05c715 100644
--- a/pan/gui/pan.ui.ssl.h
+++ b/pan/gui/pan.ui.ssl.h
@@ -152,6 +152,9 @@ const char * fallback_ui_file =
" <menuitem action='cancel-article' />\n"
" </menu>\n"
" <menu action='help-menu'>\n"
+#ifdef HAVE_MANUAL
+" <menuitem action='pan-manual' />\n"
+#endif
" <menuitem action='pan-web-page' />\n"
" <menuitem action='tip-jar' />\n"
" <menuitem action='bug-report' />\n"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]