From: H.G. Muller Date: Tue, 28 Feb 2012 12:40:54 +0000 (+0100) Subject: Make web section in Help menu X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=ba7d0ecf7e2d2b0b45de1d3742e0f749b2c0bf00;p=xboard.git Make web section in Help menu Items for the XBoard Home Page, User Guide, News Page and reporting bugs were added. They all rely on xdg-open to invoke the browser or mailer on the given links. --- diff --git a/xboard.c b/xboard.c index 8a828ae..deed56f 100644 --- a/xboard.c +++ b/xboard.c @@ -444,6 +444,10 @@ void SaveSettingsProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms) void SaveOnExitProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void InfoProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void ManProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); +void GuideProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); +void HomePageProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); +void NewsPageProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); +void BugReportProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void HintProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void BookProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void AboutGameProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); @@ -786,6 +790,11 @@ MenuItem helpMenu[] = { {N_("Info XBoard"), "Info XBoard", InfoProc}, {N_("Man XBoard F1"), "Man XBoard", ManProc}, {"----", NULL, NothingProc}, + {N_("XBoard Home Page"), "Home Page", HomePageProc}, + {N_("On-line User Guide"), "User Guide", GuideProc}, + {N_("Development News"), "News Page", NewsPageProc}, + {N_("e-Mail Report Bug"), "Bug Report", BugReportProc}, + {"----", NULL, NothingProc}, {N_("About XBoard"), "About XBoard", AboutProc}, {NULL, NULL, NULL} }; @@ -6661,6 +6670,30 @@ BookProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) } void +BugReportProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) +{ + system("xdg-open mailto:bug-xboard@gnu.org"); +} + +void +GuideProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) +{ + system("xdg-open http://www.gnu.org/software/xboard/user_guide/UserGuide.html"); +} + +void +HomePageProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) +{ + system("xdg-open http://www.gnu.org/software/xboard/"); +} + +void +NewsPageProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) +{ + system("xdg-open http://www.gnu.org/software/xboard/whats_new/portal.html"); +} + +void AboutProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) { char buf[2 * MSG_SIZ];