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

« back to all changes in this revision

Viewing changes to libgimp/gimpselectbutton.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
/* LIBGIMP - The GIMP Library
 
2
 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
 
3
 *
 
4
 * gimpselectbutton.c
 
5
 * Copyright (C) 2003  Sven Neumann  <sven@gimp.org>
 
6
 *
 
7
 * This library is free software; you can redistribute it and/or
 
8
 * modify it under the terms of the GNU Lesser General Public
 
9
 * License as published by the Free Software Foundation; either
 
10
 * version 2 of the License, or (at your option) any later version.
 
11
 *
 
12
 * This library is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
 * Library General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Lesser General Public
 
18
 * License along with this library; if not, write to the
 
19
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
20
 * Boston, MA 02111-1307, USA.
 
21
 */
 
22
 
 
23
#include "config.h"
 
24
 
 
25
#include "gimp.h"
 
26
#include "gimpuitypes.h"
 
27
#include "gimpselectbutton.h"
 
28
 
 
29
 
 
30
/*  local function prototypes  */
 
31
 
 
32
static void   gimp_select_button_destroy (GtkObject *object);
 
33
 
 
34
 
 
35
G_DEFINE_TYPE (GimpSelectButton, gimp_select_button, GTK_TYPE_HBOX)
 
36
 
 
37
static void
 
38
gimp_select_button_class_init (GimpSelectButtonClass *klass)
 
39
{
 
40
  GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
 
41
 
 
42
  object_class->destroy = gimp_select_button_destroy;
 
43
}
 
44
 
 
45
static void
 
46
gimp_select_button_init (GimpSelectButton *select_button)
 
47
{
 
48
  select_button->temp_callback = NULL;
 
49
}
 
50
 
 
51
/**
 
52
 * gimp_select_button_close_popup:
 
53
 * @button: A #GimpSelectButton
 
54
 *
 
55
 * Closes the popup window associated with @button.
 
56
 *
 
57
 * Since: GIMP 2.4
 
58
 */
 
59
void
 
60
gimp_select_button_close_popup (GimpSelectButton *button)
 
61
{
 
62
  g_return_if_fail (GIMP_IS_SELECT_BUTTON (button));
 
63
 
 
64
  if (button->temp_callback)
 
65
    {
 
66
      GimpSelectButtonClass *klass = GIMP_SELECT_BUTTON_GET_CLASS (button);
 
67
 
 
68
      klass->select_destroy (button->temp_callback);
 
69
 
 
70
      button->temp_callback = NULL;
 
71
    }
 
72
}
 
73
 
 
74
 
 
75
/*  private functions  */
 
76
 
 
77
static void
 
78
gimp_select_button_destroy (GtkObject *object)
 
79
{
 
80
  gimp_select_button_close_popup (GIMP_SELECT_BUTTON (object));
 
81
 
 
82
  GTK_OBJECT_CLASS (gimp_select_button_parent_class)->destroy (object);
 
83
}