[pan2: 10/14] Add menu item for help
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2: 10/14] Add menu item for help
- Date: Wed, 11 Jan 2012 07:11:02 +0000 (UTC)
commit 9fcef421c27e39c1546e676386eb73b7c81a4ecd
Author: Petr Kovar <pknbe volny cz>
Date: Thu Jan 27 01:58:47 2011 +0100
Add menu item for help
pan/gui/actions.cc | 6 ++++++
pan/gui/gui.cc | 16 ++++++++++++++++
pan/gui/gui.h | 1 +
pan/gui/pan-ui.h | 1 +
pan/gui/pan.ui.h | 1 +
5 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/pan/gui/actions.cc b/pan/gui/actions.cc
index b65f1e2..5061897 100644
--- a/pan/gui/actions.cc
+++ b/pan/gui/actions.cc
@@ -157,6 +157,7 @@ namespace
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(); }
+ void do_pan_manual (GtkAction*) { pan_ui->do_pan_manual(); }
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(); }
@@ -577,6 +578,11 @@ namespace
NULL,
G_CALLBACK(do_reply_to) },
+ { "pan-manual", NULL,
+ N_("_Contents"), NULL,
+ NULL,
+ G_CALLBACK(do_pan_manual) },
+
{ "pan-web-page", NULL,
N_("_Pan Home Page"), NULL,
NULL,
diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc
index 79843ff..cdaa466 100644
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@ -1227,6 +1227,22 @@ void GUI :: do_reply_to ()
}
}
+void GUI :: do_pan_manual ()
+{
+ 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,
+ "%s");
+ g_signal_connect_swapped (w, "response", G_CALLBACK (gtk_widget_destroy), w);
+ gtk_widget_show_all (w);
+ }
+}
void GUI :: do_pan_web ()
{
URL :: open (_prefs, "http://pan.rebelbase.com/");
diff --git a/pan/gui/gui.h b/pan/gui/gui.h
index 1cf817e..73ae0d4 100644
--- a/pan/gui/gui.h
+++ b/pan/gui/gui.h
@@ -130,6 +130,7 @@ namespace pan
virtual void do_post ();
virtual void do_followup_to ();
virtual void do_reply_to ();
+ virtual void do_pan_manual ();
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 6e202eb..bcc7b9f 100644
--- a/pan/gui/pan-ui.h
+++ b/pan/gui/pan-ui.h
@@ -74,6 +74,7 @@ namespace pan
virtual void do_post () = 0;
virtual void do_followup_to () = 0;
virtual void do_reply_to () = 0;
+ virtual void do_pan_manual () = 0;
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 b1e1824..79fac5e 100644
--- a/pan/gui/pan.ui.h
+++ b/pan/gui/pan.ui.h
@@ -138,6 +138,7 @@ const char * fallback_ui_file =
" <menuitem action='cancel-article' />\n"
" </menu>\n"
" <menu action='help-menu'>\n"
+" <menuitem action='pan-manual' />\n"
" <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]