1
/* GIMP - The GNU Image Manipulation Program
2
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
#include "libgimpwidgets/gimpwidgets.h"
25
#include "actions-types.h"
27
#include "widgets/gimpmenudock.h"
30
#include "dock-commands.h"
33
/* public functions */
36
dock_toggle_image_menu_cmd_callback (GtkAction *action,
41
return_if_no_widget (widget, data);
43
if (! GTK_WIDGET_TOPLEVEL (widget))
44
widget = gtk_widget_get_toplevel (widget);
46
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
48
if (GIMP_IS_MENU_DOCK (widget))
49
gimp_menu_dock_set_show_image_menu (GIMP_MENU_DOCK (widget), active);
53
dock_toggle_auto_cmd_callback (GtkAction *action,
58
return_if_no_widget (widget, data);
60
if (! GTK_WIDGET_TOPLEVEL (widget))
61
widget = gtk_widget_get_toplevel (widget);
63
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
65
if (GIMP_IS_MENU_DOCK (widget))
66
gimp_menu_dock_set_auto_follow_active (GIMP_MENU_DOCK (widget), active);