~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/help/gimphelpitem.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GIMP - The GNU Image Manipulation Program
 
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 
3
 *
 
4
 * The GIMP Help plug-in
 
5
 * Copyright (C) 1999-2004 Sven Neumann <sven@gimp.org>
 
6
 *                         Michael Natterer <mitch@gimp.org>
 
7
 *                         Henrik Brix Andersen <brix@gimp.org>
 
8
 *
 
9
 * This program is free software; you can redistribute it and/or modify
 
10
 * it under the terms of the GNU General Public License as published by
 
11
 * the Free Software Foundation; either version 2 of the License, or
 
12
 * (at your option) any later version.
 
13
 *
 
14
 * This program is distributed in the hope that it will be useful,
 
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
 * GNU General Public License for more details.
 
18
 *
 
19
 * You should have received a copy of the GNU General Public License
 
20
 * along with this program; if not, write to the Free Software
 
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
22
 */
 
23
 
 
24
/*  This code is written so that it can also be compiled standalone.
 
25
 *  It shouldn't depend on libgimp.
 
26
 */
 
27
 
 
28
#include "config.h"
 
29
 
 
30
#include <string.h>
 
31
 
 
32
#include <glib.h>
 
33
 
 
34
#include "gimphelptypes.h"
 
35
 
 
36
#include "gimphelpitem.h"
 
37
 
 
38
#ifdef DISABLE_NLS
 
39
#define _(String)  (String)
 
40
#else
 
41
#include "libgimp/stdplugins-intl.h"
 
42
#endif
 
43
 
 
44
 
 
45
/*  public functions  */
 
46
 
 
47
GimpHelpItem *
 
48
gimp_help_item_new (const gchar *ref,
 
49
                    const gchar *title,
 
50
                    const gchar *parent)
 
51
{
 
52
  GimpHelpItem *item = g_new0 (GimpHelpItem, 1);
 
53
 
 
54
  item->ref    = g_strdup (ref);
 
55
  item->title  = g_strdup (title);
 
56
  item->parent = g_strdup (parent);
 
57
 
 
58
  return item;
 
59
}
 
60
 
 
61
void
 
62
gimp_help_item_free (GimpHelpItem *item)
 
63
{
 
64
  g_free (item->ref);
 
65
  g_free (item->title);
 
66
  g_free (item->parent);
 
67
 
 
68
  g_list_free (item->children);
 
69
 
 
70
  g_free (item);
 
71
}