From: Kaj-Michael Lang Date: Fri, 26 Oct 2007 10:40:16 +0000 (+0300) Subject: Add wrappers around ossohelp_* and hildonhelp_*. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37c31559a17338096b7254a2dd6b73990f8fccaf;p=mapper Add wrappers around ossohelp_* and hildonhelp_*. --- diff --git a/src/help.c b/src/help.c new file mode 100644 index 0000000..56e1f67 --- /dev/null +++ b/src/help.c @@ -0,0 +1,60 @@ +/* + * This file is part of mapper + * + * Copyright (C) 2007 Kaj-Michael Lang + * + * 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; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/* + * Help system wrappers, handles: + * - ossohelp + * - hildonhelp + * (-yelp?) + * + * Uses global _osso for osso context. + */ + +#include + +#include "help.h" + +void +help_topic_display(const gchar *topic_id, guint flags) +{ +#ifdef WITH_OSSO_HELP +ossohelp_show(_osso, HELP_ID_INTRO, 0); +return; +#endif + +#ifdef WITH_HILDON_HELP +hildon_help_show(_osso, HELP_ID_INTRO, 0); +return; +#endif +} + +void +help_dialog_help_enable(GtkWidget *dialog, const gchar *topic) +{ +#ifdef WITH_OSSO_HELP +ossohelp_dialog_help_enable(GTK_DIALOG(dialog), topic, _osso); +return; +#endif + +#ifdef WITH_HILDON_HELP +hildon_help_dialog_help_enable(GTK_DIALOG(dialog), topic, _osso); +return; +#endif +} diff --git a/src/help.h b/src/help.h new file mode 100644 index 0000000..edd0c20 --- /dev/null +++ b/src/help.h @@ -0,0 +1,31 @@ +#ifndef _MAPPER_HELP_H +#define _MAPPER_HELP_H + +#include + +#ifdef WITH_OSSO +#include "ui-maemo.h" +#endif + +#ifdef WITH_OSSO_HELP +#include +#endif + +#ifdef WITH_HILDON_HELP +#include +#endif + +#define HELP_ID_PREFIX "help_mapper_" +#define HELP_ID_INTRO HELP_ID_PREFIX"intro" +#define HELP_ID_GETSTARTED HELP_ID_PREFIX"getstarted" +#define HELP_ID_ABOUT HELP_ID_PREFIX"about" +#define HELP_ID_SETTINGS HELP_ID_PREFIX"settings" +#define HELP_ID_REPOMAN HELP_ID_PREFIX"repoman" +#define HELP_ID_MAPMAN HELP_ID_PREFIX"mapman" +#define HELP_ID_DOWNROUTE HELP_ID_PREFIX"downroute" +#define HELP_ID_POICAT HELP_ID_PREFIX"poicat" + +void help_topic_display(const gchar *topic_id, guint flags); +void help_dialog_help_enable(GtkWidget *dialog, const gchar *topic); + +#endif