2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2001-04-14 23:21:45 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2001-04-14 23:21:45 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2001-04-14 23:21:45 +08:00
|
|
|
* (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
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2001-04-14 23:21:45 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2003-11-10 08:24:33 +08:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
|
2004-04-20 21:25:55 +08:00
|
|
|
#include "actions-types.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-04-15 00:37:28 +08:00
|
|
|
#include "widgets/gimpdialogfactory.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2004-05-03 22:46:29 +08:00
|
|
|
#include "actions.h"
|
|
|
|
#include "dialogs-commands.h"
|
2004-04-29 20:52:29 +08:00
|
|
|
|
|
|
|
|
2003-06-06 20:16:13 +08:00
|
|
|
/* public functions */
|
|
|
|
|
2001-04-18 00:00:27 +08:00
|
|
|
void
|
2004-04-29 20:52:29 +08:00
|
|
|
dialogs_create_toplevel_cmd_callback (GtkAction *action,
|
|
|
|
const gchar *value,
|
2006-04-12 20:49:29 +08:00
|
|
|
gpointer data)
|
2001-04-18 00:00:27 +08:00
|
|
|
{
|
2004-04-29 20:52:29 +08:00
|
|
|
GtkWidget *widget;
|
|
|
|
return_if_no_widget (widget, data);
|
2001-06-30 03:25:03 +08:00
|
|
|
|
2004-04-29 20:52:29 +08:00
|
|
|
if (value)
|
2010-03-01 06:20:57 +08:00
|
|
|
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
2004-04-29 20:52:29 +08:00
|
|
|
gtk_widget_get_screen (widget),
|
2010-05-16 18:19:18 +08:00
|
|
|
NULL /*ui_manager*/,
|
2004-09-01 06:41:15 +08:00
|
|
|
value, -1, TRUE);
|
2001-04-18 00:00:27 +08:00
|
|
|
}
|
|
|
|
|
2001-07-15 22:32:44 +08:00
|
|
|
void
|
2004-04-29 20:52:29 +08:00
|
|
|
dialogs_create_dockable_cmd_callback (GtkAction *action,
|
|
|
|
const gchar *value,
|
2006-04-12 20:49:29 +08:00
|
|
|
gpointer data)
|
2001-07-15 22:32:44 +08:00
|
|
|
{
|
2004-04-29 20:52:29 +08:00
|
|
|
GtkWidget *widget;
|
|
|
|
return_if_no_widget (widget, data);
|
2003-09-30 23:48:14 +08:00
|
|
|
|
2004-04-29 20:52:29 +08:00
|
|
|
if (value)
|
2010-03-01 06:20:57 +08:00
|
|
|
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
|
2004-04-29 20:52:29 +08:00
|
|
|
gtk_widget_get_screen (widget),
|
|
|
|
value, -1);
|
2001-07-15 22:32:44 +08:00
|
|
|
}
|