1
/* LIBGIMP - The GIMP Library
2
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
5
* Copyright (C) 2003 Sven Neumann <sven@gimp.org>
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.
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.
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.
26
#include "gimpuitypes.h"
27
#include "gimpselectbutton.h"
30
/* local function prototypes */
32
static void gimp_select_button_destroy (GtkObject *object);
35
G_DEFINE_TYPE (GimpSelectButton, gimp_select_button, GTK_TYPE_HBOX)
38
gimp_select_button_class_init (GimpSelectButtonClass *klass)
40
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
42
object_class->destroy = gimp_select_button_destroy;
46
gimp_select_button_init (GimpSelectButton *select_button)
48
select_button->temp_callback = NULL;
52
* gimp_select_button_close_popup:
53
* @button: A #GimpSelectButton
55
* Closes the popup window associated with @button.
60
gimp_select_button_close_popup (GimpSelectButton *button)
62
g_return_if_fail (GIMP_IS_SELECT_BUTTON (button));
64
if (button->temp_callback)
66
GimpSelectButtonClass *klass = GIMP_SELECT_BUTTON_GET_CLASS (button);
68
klass->select_destroy (button->temp_callback);
70
button->temp_callback = NULL;
75
/* private functions */
78
gimp_select_button_destroy (GtkObject *object)
80
gimp_select_button_close_popup (GIMP_SELECT_BUTTON (object));
82
GTK_OBJECT_CLASS (gimp_select_button_parent_class)->destroy (object);