2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2004-03-18 10:45:52 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* The GIMP Help plug-in
|
|
|
|
* Copyright (C) 1999-2004 Sven Neumann <sven@gimp.org>
|
|
|
|
* Michael Natterer <mitch@gimp.org>
|
|
|
|
* Henrik Brix Andersen <brix@gimp.org>
|
|
|
|
*
|
|
|
|
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2006-11-21 05:46:21 +08:00
|
|
|
/* This code is written so that it can also be compiled standalone.
|
|
|
|
* It shouldn't depend on libgimp.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include "gimphelptypes.h"
|
2004-03-18 10:45:52 +08:00
|
|
|
|
2006-11-21 05:46:21 +08:00
|
|
|
#include "gimphelpitem.h"
|
2004-03-18 10:45:52 +08:00
|
|
|
|
2006-11-21 05:46:21 +08:00
|
|
|
#ifdef DISABLE_NLS
|
|
|
|
#define _(String) (String)
|
|
|
|
#else
|
|
|
|
#include "libgimp/stdplugins-intl.h"
|
|
|
|
#endif
|
2004-03-18 10:45:52 +08:00
|
|
|
|
2004-08-14 23:47:22 +08:00
|
|
|
|
2006-11-21 05:46:21 +08:00
|
|
|
/* public functions */
|
2004-03-18 10:45:52 +08:00
|
|
|
|
2006-11-21 05:46:21 +08:00
|
|
|
GimpHelpItem *
|
|
|
|
gimp_help_item_new (const gchar *ref,
|
|
|
|
const gchar *title,
|
|
|
|
const gchar *parent)
|
|
|
|
{
|
2007-05-23 21:59:51 +08:00
|
|
|
GimpHelpItem *item = g_slice_new0 (GimpHelpItem);
|
2004-03-18 10:45:52 +08:00
|
|
|
|
2006-11-21 05:46:21 +08:00
|
|
|
item->ref = g_strdup (ref);
|
|
|
|
item->title = g_strdup (title);
|
|
|
|
item->parent = g_strdup (parent);
|
2004-12-06 03:50:37 +08:00
|
|
|
|
2006-11-21 05:46:21 +08:00
|
|
|
return item;
|
|
|
|
}
|
2004-12-06 03:50:37 +08:00
|
|
|
|
2006-11-21 05:46:21 +08:00
|
|
|
void
|
|
|
|
gimp_help_item_free (GimpHelpItem *item)
|
|
|
|
{
|
|
|
|
g_free (item->ref);
|
|
|
|
g_free (item->title);
|
|
|
|
g_free (item->parent);
|
2006-11-24 05:04:41 +08:00
|
|
|
|
|
|
|
g_list_free (item->children);
|
|
|
|
|
2007-05-23 21:59:51 +08:00
|
|
|
g_slice_free (GimpHelpItem, item);
|
2006-11-21 05:46:21 +08:00
|
|
|
}
|