2001-04-14 08:21:45 -07:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (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
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
|
|
2004-09-13 08:15:23 -07:00
|
|
|
#include "dialogs-types.h"
|
2001-04-14 08:21:45 -07:00
|
|
|
|
2001-07-04 12:31:35 -07:00
|
|
|
#include "core/gimp.h"
|
2001-05-08 19:32:03 -07:00
|
|
|
#include "core/gimpcontext.h"
|
|
|
|
|
#include "core/gimpimage.h"
|
2003-09-26 06:33:54 -07:00
|
|
|
#include "core/gimpimage-colormap.h"
|
2002-02-25 09:58:50 -08:00
|
|
|
|
2004-09-26 08:21:44 -07:00
|
|
|
#include "config/gimpguiconfig.h"
|
2003-03-06 08:47:34 -08:00
|
|
|
|
2002-03-07 16:27:45 -08:00
|
|
|
#include "widgets/gimpbrusheditor.h"
|
2001-06-29 12:25:03 -07:00
|
|
|
#include "widgets/gimpbrushfactoryview.h"
|
2001-06-26 05:09:43 -07:00
|
|
|
#include "widgets/gimpbufferview.h"
|
2004-10-16 13:17:30 -07:00
|
|
|
#include "widgets/gimpchanneltreeview.h"
|
2002-11-04 16:02:56 -08:00
|
|
|
#include "widgets/gimpcoloreditor.h"
|
2002-03-16 09:58:19 -08:00
|
|
|
#include "widgets/gimpcolormapeditor.h"
|
2001-04-14 08:21:45 -07:00
|
|
|
#include "widgets/gimpcontainergridview.h"
|
2003-02-21 11:03:19 -08:00
|
|
|
#include "widgets/gimpcontainertreeview.h"
|
2003-09-23 09:17:25 -07:00
|
|
|
#include "widgets/gimpcontainerview-utils.h"
|
2005-04-03 08:48:03 -07:00
|
|
|
#include "widgets/gimpcursorview.h"
|
2002-03-07 16:27:45 -08:00
|
|
|
#include "widgets/gimpdataeditor.h"
|
2003-07-07 06:37:19 -07:00
|
|
|
#include "widgets/gimpdevicestatus.h"
|
2003-10-31 18:39:34 -08:00
|
|
|
#include "widgets/gimpdialogfactory.h"
|
2001-04-14 08:21:45 -07:00
|
|
|
#include "widgets/gimpdockable.h"
|
2001-10-22 10:27:46 -07:00
|
|
|
#include "widgets/gimpdocumentview.h"
|
2003-10-31 18:39:34 -08:00
|
|
|
#include "widgets/gimperrorconsole.h"
|
2004-08-25 10:58:52 -07:00
|
|
|
#include "widgets/gimperrordialog.h"
|
2003-10-18 09:23:15 -07:00
|
|
|
#include "widgets/gimpfontview.h"
|
2002-03-07 16:27:45 -08:00
|
|
|
#include "widgets/gimpgradienteditor.h"
|
2003-08-25 07:18:33 -07:00
|
|
|
#include "widgets/gimphelp-ids.h"
|
2003-10-31 18:39:34 -08:00
|
|
|
#include "widgets/gimphistogrameditor.h"
|
|
|
|
|
#include "widgets/gimpimageview.h"
|
2004-10-16 13:17:30 -07:00
|
|
|
#include "widgets/gimplayertreeview.h"
|
2005-05-11 13:26:12 -07:00
|
|
|
#include "widgets/gimpmenudock.h"
|
2002-03-07 16:27:45 -08:00
|
|
|
#include "widgets/gimppaletteeditor.h"
|
2004-03-17 06:14:18 -08:00
|
|
|
#include "widgets/gimppatternfactoryview.h"
|
2005-04-03 08:48:03 -07:00
|
|
|
#include "widgets/gimpsamplepointeditor.h"
|
2002-08-22 05:49:01 -07:00
|
|
|
#include "widgets/gimpselectioneditor.h"
|
2003-04-06 04:21:56 -07:00
|
|
|
#include "widgets/gimptemplateview.h"
|
2002-03-14 09:07:02 -08:00
|
|
|
#include "widgets/gimptoolbox.h"
|
2003-09-29 13:26:09 -07:00
|
|
|
#include "widgets/gimptooloptionseditor.h"
|
2004-05-09 17:41:57 -07:00
|
|
|
#include "widgets/gimptoolview.h"
|
2003-02-20 04:47:42 -08:00
|
|
|
#include "widgets/gimpundoeditor.h"
|
2003-03-16 03:14:29 -08:00
|
|
|
#include "widgets/gimpvectorstreeview.h"
|
2001-04-14 08:21:45 -07:00
|
|
|
|
2004-08-25 09:02:10 -07:00
|
|
|
#include "display/gimpnavigationeditor.h"
|
2002-03-14 14:42:50 -08:00
|
|
|
|
2001-04-18 09:39:34 -07:00
|
|
|
#include "about-dialog.h"
|
2001-07-17 13:50:01 -07:00
|
|
|
#include "dialogs.h"
|
2001-04-17 09:00:27 -07:00
|
|
|
#include "dialogs-constructors.h"
|
2004-09-13 09:01:52 -07:00
|
|
|
#include "file-open-dialog.h"
|
2004-09-09 02:47:33 -07:00
|
|
|
#include "file-open-location-dialog.h"
|
2004-09-13 09:37:01 -07:00
|
|
|
#include "file-save-dialog.h"
|
2004-09-13 08:15:23 -07:00
|
|
|
#include "image-new-dialog.h"
|
2005-09-29 17:40:45 -07:00
|
|
|
#include "keyboard-shortcuts-dialog.h"
|
2004-09-13 08:15:23 -07:00
|
|
|
#include "module-dialog.h"
|
2006-09-03 09:39:00 -07:00
|
|
|
#include "palette-import-dialog.h"
|
2002-11-20 11:45:03 -08:00
|
|
|
#include "preferences-dialog.h"
|
2004-09-13 16:09:10 -07:00
|
|
|
#include "quit-dialog.h"
|
2001-04-18 09:39:34 -07:00
|
|
|
#include "tips-dialog.h"
|
2001-04-17 09:00:27 -07:00
|
|
|
|
2003-03-25 08:38:19 -08:00
|
|
|
#include "gimp-intl.h"
|
2001-04-14 08:21:45 -07:00
|
|
|
|
|
|
|
|
|
2001-07-17 13:50:01 -07:00
|
|
|
/* local function prototypes */
|
|
|
|
|
|
2003-10-10 14:24:12 -07:00
|
|
|
static void dialogs_indexed_palette_selected (GimpColormapEditor *editor,
|
|
|
|
|
GdkModifierType state,
|
2004-09-25 05:48:41 -07:00
|
|
|
gpointer data);
|
2001-04-19 19:30:43 -07:00
|
|
|
|
2001-04-14 08:21:45 -07:00
|
|
|
|
2002-03-10 07:05:58 -08:00
|
|
|
/**********************/
|
|
|
|
|
/* toplevel dialogs */
|
|
|
|
|
/**********************/
|
2001-04-14 08:21:45 -07:00
|
|
|
|
2003-05-02 11:43:15 -07:00
|
|
|
GtkWidget *
|
2004-09-13 08:15:23 -07:00
|
|
|
dialogs_image_new_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2003-05-02 11:43:15 -07:00
|
|
|
{
|
2006-09-01 04:26:54 -07:00
|
|
|
return image_new_dialog_new (context);
|
2003-05-02 11:43:15 -07:00
|
|
|
}
|
|
|
|
|
|
2004-09-13 09:01:52 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_file_open_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2004-09-13 09:01:52 -07:00
|
|
|
{
|
|
|
|
|
return file_open_dialog_new (context->gimp);
|
|
|
|
|
}
|
|
|
|
|
|
2004-09-09 02:47:33 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_file_open_location_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2004-09-09 02:47:33 -07:00
|
|
|
{
|
|
|
|
|
return file_open_location_dialog_new (context->gimp);
|
|
|
|
|
}
|
|
|
|
|
|
2004-09-13 09:37:01 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_file_save_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2004-09-13 09:37:01 -07:00
|
|
|
{
|
|
|
|
|
return file_save_dialog_new (context->gimp);
|
|
|
|
|
}
|
|
|
|
|
|
2001-04-18 09:39:34 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_preferences_get (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-18 09:39:34 -07:00
|
|
|
{
|
2002-11-20 11:45:03 -08:00
|
|
|
return preferences_dialog_create (context->gimp);
|
2001-04-18 09:39:34 -07:00
|
|
|
}
|
|
|
|
|
|
2005-09-29 17:40:45 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_keyboard_shortcuts_get (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2005-09-29 17:40:45 -07:00
|
|
|
{
|
2005-10-05 16:01:45 -07:00
|
|
|
return keyboard_shortcuts_dialog_new (context->gimp);
|
2005-09-29 17:40:45 -07:00
|
|
|
}
|
|
|
|
|
|
2001-04-18 09:39:34 -07:00
|
|
|
GtkWidget *
|
2004-09-13 08:15:23 -07:00
|
|
|
dialogs_module_get (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-18 09:39:34 -07:00
|
|
|
{
|
2004-09-13 08:15:23 -07:00
|
|
|
return module_dialog_new (context->gimp);
|
2001-04-18 09:39:34 -07:00
|
|
|
}
|
|
|
|
|
|
2006-09-03 09:39:00 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_palette_import_get (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
|
|
|
|
gint view_size)
|
|
|
|
|
{
|
|
|
|
|
return palette_import_dialog_new (context);
|
|
|
|
|
}
|
|
|
|
|
|
2001-04-18 09:39:34 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_tips_get (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-18 09:39:34 -07:00
|
|
|
{
|
2002-11-18 12:50:31 -08:00
|
|
|
return tips_dialog_create (context->gimp);
|
2001-04-18 09:39:34 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_about_get (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-18 09:39:34 -07:00
|
|
|
{
|
2005-08-19 09:32:01 -07:00
|
|
|
return about_dialog_create (context);
|
2001-04-18 09:39:34 -07:00
|
|
|
}
|
|
|
|
|
|
2004-08-25 10:58:52 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_error_get (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2004-08-25 10:58:52 -07:00
|
|
|
{
|
2005-09-06 17:28:31 -07:00
|
|
|
return gimp_error_dialog_new (_("GIMP Message"));
|
2004-08-25 10:58:52 -07:00
|
|
|
}
|
2002-02-03 04:10:23 -08:00
|
|
|
|
2005-09-24 12:30:08 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_close_all_get (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2005-09-24 12:30:08 -07:00
|
|
|
{
|
|
|
|
|
return close_all_dialog_new (context->gimp);
|
|
|
|
|
}
|
|
|
|
|
|
2004-09-13 16:09:10 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_quit_get (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2004-09-13 16:09:10 -07:00
|
|
|
{
|
|
|
|
|
return quit_dialog_new (context->gimp);
|
|
|
|
|
}
|
|
|
|
|
|
2004-09-26 11:41:29 -07:00
|
|
|
|
2002-03-10 07:05:58 -08:00
|
|
|
/***********/
|
2001-07-15 07:32:44 -07:00
|
|
|
/* docks */
|
2002-03-10 07:05:58 -08:00
|
|
|
/***********/
|
2001-04-17 09:00:27 -07:00
|
|
|
|
2002-03-14 09:07:02 -08:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_toolbox_get (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2002-03-14 09:07:02 -08:00
|
|
|
{
|
|
|
|
|
/* we pass "global_dock_factory", _not_ "global_toolbox_factory" to
|
2004-09-26 11:41:29 -07:00
|
|
|
* the toolbox constructor, because the global_toolbox_factory has no
|
2002-03-14 09:07:02 -08:00
|
|
|
* dockables registered
|
|
|
|
|
*/
|
2006-10-02 10:41:04 -07:00
|
|
|
return gimp_toolbox_new (global_dock_factory, context);
|
2002-03-14 09:07:02 -08:00
|
|
|
}
|
|
|
|
|
|
2001-04-21 17:38:56 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_dock_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-21 17:38:56 -07:00
|
|
|
{
|
2005-05-11 13:26:12 -07:00
|
|
|
return gimp_menu_dock_new (factory,
|
|
|
|
|
context->gimp->images,
|
|
|
|
|
context->gimp->displays);
|
2001-04-21 17:38:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2002-03-10 07:05:58 -08:00
|
|
|
/***************/
|
|
|
|
|
/* dockables */
|
|
|
|
|
/***************/
|
|
|
|
|
|
2004-09-26 11:41:29 -07:00
|
|
|
/***** the dockable constructor *****/
|
|
|
|
|
|
2002-03-10 07:05:58 -08:00
|
|
|
GtkWidget *
|
2004-09-26 11:41:29 -07:00
|
|
|
dialogs_dockable_constructor (GimpDialogFactory *factory,
|
|
|
|
|
GimpDialogFactoryEntry *entry,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2002-03-10 07:05:58 -08:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
GtkWidget *dockable = NULL;
|
|
|
|
|
GtkWidget *widget;
|
2002-03-10 07:05:58 -08:00
|
|
|
|
2006-01-17 02:08:50 -08:00
|
|
|
widget = entry->new_func (factory, context, view_size);
|
2002-03-10 07:05:58 -08:00
|
|
|
|
2004-09-26 11:41:29 -07:00
|
|
|
if (widget)
|
|
|
|
|
{
|
|
|
|
|
dockable = gimp_dockable_new (entry->name, entry->blurb,
|
|
|
|
|
entry->stock_id, entry->help_id);
|
|
|
|
|
gtk_container_add (GTK_CONTAINER (dockable), widget);
|
|
|
|
|
gtk_widget_show (widget);
|
2005-10-30 10:41:18 -08:00
|
|
|
|
|
|
|
|
/* EEK */
|
|
|
|
|
g_object_set_data (G_OBJECT (dockable), "gimp-dialog-identifier",
|
|
|
|
|
entry->identifier);
|
2004-09-26 11:41:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return dockable;
|
|
|
|
|
}
|
2002-03-10 07:05:58 -08:00
|
|
|
|
|
|
|
|
|
2004-09-26 11:41:29 -07:00
|
|
|
/***** singleton dialogs *****/
|
|
|
|
|
|
|
|
|
|
GtkWidget *
|
2005-04-03 08:48:03 -07:00
|
|
|
dialogs_tool_options_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2004-09-26 11:41:29 -07:00
|
|
|
{
|
|
|
|
|
return gimp_tool_options_editor_new (context->gimp,
|
|
|
|
|
factory->menu_factory);
|
2002-03-10 07:05:58 -08:00
|
|
|
}
|
|
|
|
|
|
2003-07-07 06:37:19 -07:00
|
|
|
GtkWidget *
|
2005-04-03 08:48:03 -07:00
|
|
|
dialogs_device_status_new (GimpDialogFactory *factory,
|
2003-07-07 06:37:19 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2003-07-07 06:37:19 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_device_status_new (context->gimp);
|
2003-07-07 06:37:19 -07:00
|
|
|
}
|
|
|
|
|
|
2002-03-10 07:05:58 -08:00
|
|
|
GtkWidget *
|
2005-04-03 08:48:03 -07:00
|
|
|
dialogs_error_console_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2002-03-10 07:05:58 -08:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_error_console_new (context->gimp,
|
|
|
|
|
factory->menu_factory);
|
2002-03-10 07:05:58 -08:00
|
|
|
}
|
|
|
|
|
|
2005-04-03 08:48:03 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_cursor_view_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2005-04-03 08:48:03 -07:00
|
|
|
{
|
2005-07-08 15:54:46 -07:00
|
|
|
return gimp_cursor_view_new (factory->menu_factory);
|
2005-04-03 08:48:03 -07:00
|
|
|
}
|
|
|
|
|
|
2002-03-10 07:05:58 -08:00
|
|
|
|
|
|
|
|
/***** list views *****/
|
2001-04-29 08:23:01 -07:00
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_image_list_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_image_view_new (GIMP_VIEW_TYPE_LIST,
|
2002-05-08 05:39:01 -07:00
|
|
|
context->gimp->images,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2003-01-10 09:55:53 -08:00
|
|
|
factory->menu_factory);
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_brush_list_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_brush_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
2006-04-12 05:49:29 -07:00
|
|
|
context->gimp->brush_factory,
|
|
|
|
|
context,
|
|
|
|
|
TRUE,
|
|
|
|
|
view_size, 1,
|
2003-01-10 09:55:53 -08:00
|
|
|
factory->menu_factory);
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_pattern_list_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_pattern_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
2004-03-17 06:14:18 -08:00
|
|
|
context->gimp->pattern_factory,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2004-03-17 06:14:18 -08:00
|
|
|
factory->menu_factory);
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_gradient_list_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
2004-05-11 09:05:21 -07:00
|
|
|
context->gimp->gradient_factory,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2004-04-21 09:33:17 -07:00
|
|
|
factory->menu_factory, "<Gradients>",
|
2004-05-11 09:05:21 -07:00
|
|
|
"/gradients-popup",
|
|
|
|
|
"gradients");
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_palette_list_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
2004-05-11 09:05:21 -07:00
|
|
|
context->gimp->palette_factory,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2004-04-21 09:33:17 -07:00
|
|
|
factory->menu_factory, "<Palettes>",
|
2004-05-11 09:05:21 -07:00
|
|
|
"/palettes-popup",
|
|
|
|
|
"palettes");
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2003-03-25 14:53:10 -08:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_font_list_view_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2003-03-25 14:53:10 -08:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_font_view_new (GIMP_VIEW_TYPE_LIST,
|
2003-10-18 09:23:15 -07:00
|
|
|
context->gimp->fonts,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2003-10-18 09:23:15 -07:00
|
|
|
factory->menu_factory);
|
2003-03-25 14:53:10 -08:00
|
|
|
}
|
|
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_tool_list_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_tool_view_new (GIMP_VIEW_TYPE_LIST,
|
2004-05-09 17:41:57 -07:00
|
|
|
context->gimp->tool_info_list,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 0,
|
2004-05-09 17:41:57 -07:00
|
|
|
factory->menu_factory);
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2001-06-26 05:09:43 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_buffer_list_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-06-26 05:09:43 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_buffer_view_new (GIMP_VIEW_TYPE_LIST,
|
2006-04-12 05:49:29 -07:00
|
|
|
context->gimp->named_buffers,
|
|
|
|
|
context,
|
|
|
|
|
view_size, 1,
|
2003-01-10 09:55:53 -08:00
|
|
|
factory->menu_factory);
|
2003-07-08 08:07:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GtkWidget *
|
2004-09-27 02:38:32 -07:00
|
|
|
dialogs_document_list_view_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2003-07-08 08:07:56 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_document_view_new (GIMP_VIEW_TYPE_LIST,
|
2003-07-08 08:07:56 -07:00
|
|
|
context->gimp->documents,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 0,
|
2003-07-08 08:07:56 -07:00
|
|
|
factory->menu_factory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GtkWidget *
|
2004-09-27 02:38:32 -07:00
|
|
|
dialogs_template_list_view_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2003-07-08 08:07:56 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_template_view_new (GIMP_VIEW_TYPE_LIST,
|
2003-07-08 08:07:56 -07:00
|
|
|
context->gimp->templates,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 0,
|
2003-07-08 08:07:56 -07:00
|
|
|
factory->menu_factory);
|
2001-06-26 05:09:43 -07:00
|
|
|
}
|
|
|
|
|
|
2001-04-14 08:21:45 -07:00
|
|
|
|
2002-03-10 07:05:58 -08:00
|
|
|
/***** grid views *****/
|
2001-04-15 09:16:13 -07:00
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_image_grid_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_image_view_new (GIMP_VIEW_TYPE_GRID,
|
2002-05-08 05:39:01 -07:00
|
|
|
context->gimp->images,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2003-01-10 09:55:53 -08:00
|
|
|
factory->menu_factory);
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_brush_grid_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_brush_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
2006-04-12 05:49:29 -07:00
|
|
|
context->gimp->brush_factory,
|
|
|
|
|
context,
|
|
|
|
|
TRUE,
|
|
|
|
|
view_size, 1,
|
2003-01-10 09:55:53 -08:00
|
|
|
factory->menu_factory);
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_pattern_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
2004-03-17 06:14:18 -08:00
|
|
|
context->gimp->pattern_factory,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2004-03-17 06:14:18 -08:00
|
|
|
factory->menu_factory);
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
2004-05-11 09:05:21 -07:00
|
|
|
context->gimp->gradient_factory,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2004-04-21 09:33:17 -07:00
|
|
|
factory->menu_factory, "<Gradients>",
|
2004-05-11 09:05:21 -07:00
|
|
|
"/gradients-popup",
|
|
|
|
|
"gradients");
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_palette_grid_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
2004-05-11 09:05:21 -07:00
|
|
|
context->gimp->palette_factory,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2004-04-21 09:33:17 -07:00
|
|
|
factory->menu_factory, "<Palettes>",
|
2004-05-11 09:05:21 -07:00
|
|
|
"/palettes-popup",
|
|
|
|
|
"palettes");
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2003-03-25 14:53:10 -08:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_font_grid_view_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2003-03-25 14:53:10 -08:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_font_view_new (GIMP_VIEW_TYPE_GRID,
|
2003-10-18 09:23:15 -07:00
|
|
|
context->gimp->fonts,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2003-10-18 09:23:15 -07:00
|
|
|
factory->menu_factory);
|
2003-03-25 14:53:10 -08:00
|
|
|
}
|
|
|
|
|
|
2001-04-16 11:49:29 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_tool_grid_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-14 08:21:45 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_tool_view_new (GIMP_VIEW_TYPE_GRID,
|
2004-05-09 17:41:57 -07:00
|
|
|
context->gimp->tool_info_list,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2004-05-09 17:41:57 -07:00
|
|
|
factory->menu_factory);
|
2001-04-14 08:21:45 -07:00
|
|
|
}
|
|
|
|
|
|
2001-06-26 05:09:43 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-06-26 05:09:43 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_buffer_view_new (GIMP_VIEW_TYPE_GRID,
|
2006-04-12 05:49:29 -07:00
|
|
|
context->gimp->named_buffers,
|
|
|
|
|
context,
|
|
|
|
|
view_size, 1,
|
2003-01-10 09:55:53 -08:00
|
|
|
factory->menu_factory);
|
2003-07-08 08:07:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GtkWidget *
|
2004-09-27 02:38:32 -07:00
|
|
|
dialogs_document_grid_view_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2003-07-08 08:07:56 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
|
2003-07-08 08:07:56 -07:00
|
|
|
context->gimp->documents,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 0,
|
2004-09-27 02:38:32 -07:00
|
|
|
factory->menu_factory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_template_grid_view_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2004-09-27 02:38:32 -07:00
|
|
|
{
|
|
|
|
|
return gimp_template_view_new (GIMP_VIEW_TYPE_GRID,
|
|
|
|
|
context->gimp->templates,
|
|
|
|
|
context,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 0,
|
2003-07-08 08:07:56 -07:00
|
|
|
factory->menu_factory);
|
2001-06-26 05:09:43 -07:00
|
|
|
}
|
|
|
|
|
|
2001-04-14 08:21:45 -07:00
|
|
|
|
2002-03-10 07:05:58 -08:00
|
|
|
/***** image related dialogs *****/
|
2001-04-19 19:30:43 -07:00
|
|
|
|
|
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_layer_list_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-19 19:30:43 -07:00
|
|
|
{
|
2006-01-17 02:08:50 -08:00
|
|
|
if (view_size < 1)
|
|
|
|
|
view_size = context->gimp->config->layer_preview_size;
|
2003-03-16 03:14:29 -08:00
|
|
|
|
2004-10-16 13:19:26 -07:00
|
|
|
return gimp_item_tree_view_new (GIMP_TYPE_LAYER_TREE_VIEW,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 2,
|
2004-10-16 13:19:26 -07:00
|
|
|
gimp_context_get_image (context),
|
|
|
|
|
factory->menu_factory, "<Layers>",
|
|
|
|
|
"/layers-popup");
|
2003-03-16 03:14:29 -08:00
|
|
|
}
|
|
|
|
|
|
2001-04-19 19:30:43 -07:00
|
|
|
GtkWidget *
|
2001-04-23 09:58:18 -07:00
|
|
|
dialogs_channel_list_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-04-19 19:30:43 -07:00
|
|
|
{
|
2006-01-17 02:08:50 -08:00
|
|
|
if (view_size < 1)
|
|
|
|
|
view_size = context->gimp->config->layer_preview_size;
|
2003-03-16 03:14:29 -08:00
|
|
|
|
2004-10-16 13:19:26 -07:00
|
|
|
return gimp_item_tree_view_new (GIMP_TYPE_CHANNEL_TREE_VIEW,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2004-10-16 13:19:26 -07:00
|
|
|
gimp_context_get_image (context),
|
|
|
|
|
factory->menu_factory, "<Channels>",
|
|
|
|
|
"/channels-popup");
|
2003-03-16 03:14:29 -08:00
|
|
|
}
|
|
|
|
|
|
2002-02-25 09:58:50 -08:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2003-03-16 03:14:29 -08:00
|
|
|
{
|
2006-01-17 02:08:50 -08:00
|
|
|
if (view_size < 1)
|
|
|
|
|
view_size = context->gimp->config->layer_preview_size;
|
2003-03-16 03:14:29 -08:00
|
|
|
|
2004-10-16 13:19:26 -07:00
|
|
|
return gimp_item_tree_view_new (GIMP_TYPE_VECTORS_TREE_VIEW,
|
2006-01-17 02:08:50 -08:00
|
|
|
view_size, 1,
|
2004-10-16 13:19:26 -07:00
|
|
|
gimp_context_get_image (context),
|
|
|
|
|
factory->menu_factory, "<Vectors>",
|
|
|
|
|
"/vectors-popup");
|
2003-03-16 03:14:29 -08:00
|
|
|
}
|
|
|
|
|
|
2001-07-15 07:32:44 -07:00
|
|
|
GtkWidget *
|
2004-09-26 11:41:29 -07:00
|
|
|
dialogs_colormap_editor_new (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2001-07-15 07:32:44 -07:00
|
|
|
{
|
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
2004-09-25 05:48:41 -07:00
|
|
|
view = gimp_colormap_editor_new (factory->menu_factory);
|
2001-07-15 07:32:44 -07:00
|
|
|
|
2003-01-05 14:07:10 -08:00
|
|
|
g_signal_connect (view, "selected",
|
2006-04-12 05:49:29 -07:00
|
|
|
G_CALLBACK (dialogs_indexed_palette_selected),
|
|
|
|
|
NULL);
|
2001-07-15 07:32:44 -07:00
|
|
|
|
2004-09-26 11:41:29 -07:00
|
|
|
return view;
|
2001-07-15 07:32:44 -07:00
|
|
|
}
|
|
|
|
|
|
2003-10-31 18:39:34 -08:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_histogram_editor_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2003-10-31 18:39:34 -08:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_histogram_editor_new ();
|
2003-10-31 18:39:34 -08:00
|
|
|
}
|
|
|
|
|
|
2002-08-22 05:49:01 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_selection_editor_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2002-08-22 05:49:01 -07:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_selection_editor_new (factory->menu_factory);
|
2002-08-22 05:49:01 -07:00
|
|
|
}
|
|
|
|
|
|
2003-02-20 04:47:42 -08:00
|
|
|
GtkWidget *
|
2004-09-26 11:41:29 -07:00
|
|
|
dialogs_undo_editor_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2003-02-20 04:47:42 -08:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_undo_editor_new (context->gimp->config,
|
|
|
|
|
factory->menu_factory);
|
2003-02-20 04:47:42 -08:00
|
|
|
}
|
|
|
|
|
|
2005-04-03 08:48:03 -07:00
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_sample_point_editor_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2005-04-03 08:48:03 -07:00
|
|
|
{
|
|
|
|
|
return gimp_sample_point_editor_new (factory->menu_factory);
|
|
|
|
|
}
|
|
|
|
|
|
2001-04-19 19:30:43 -07:00
|
|
|
|
2003-07-08 08:07:56 -07:00
|
|
|
/***** display related dialogs *****/
|
2002-03-10 07:05:58 -08:00
|
|
|
|
2002-11-04 16:02:56 -08:00
|
|
|
GtkWidget *
|
2004-09-26 11:41:29 -07:00
|
|
|
dialogs_navigation_editor_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2002-11-04 16:02:56 -08:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_navigation_editor_new (factory->menu_factory);
|
2003-02-26 08:17:10 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-07-08 08:07:56 -07:00
|
|
|
/***** misc dockables *****/
|
2003-02-26 08:17:10 -08:00
|
|
|
|
2003-04-05 11:56:38 -08:00
|
|
|
GtkWidget *
|
2003-07-08 08:07:56 -07:00
|
|
|
dialogs_color_editor_new (GimpDialogFactory *factory,
|
|
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2003-04-05 11:56:38 -08:00
|
|
|
{
|
2004-09-26 11:41:29 -07:00
|
|
|
return gimp_color_editor_new (context);
|
2003-04-05 11:56:38 -08:00
|
|
|
}
|
|
|
|
|
|
2002-03-10 07:05:58 -08:00
|
|
|
|
2004-09-26 11:41:29 -07:00
|
|
|
/*********************/
|
2002-03-10 07:05:58 -08:00
|
|
|
/***** editors *****/
|
2004-09-26 11:41:29 -07:00
|
|
|
/*********************/
|
2002-03-07 16:27:45 -08:00
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_brush_editor_get (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2002-03-07 16:27:45 -08:00
|
|
|
{
|
2006-08-29 14:44:51 -07:00
|
|
|
return gimp_brush_editor_new (context,
|
2005-10-25 14:38:00 -07:00
|
|
|
factory->menu_factory);
|
2002-03-07 16:27:45 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2002-03-07 16:27:45 -08:00
|
|
|
{
|
2006-08-29 14:44:51 -07:00
|
|
|
return gimp_gradient_editor_new (context,
|
2004-09-26 11:41:29 -07:00
|
|
|
factory->menu_factory);
|
2002-03-07 16:27:45 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
|
dialogs_palette_editor_get (GimpDialogFactory *factory,
|
2006-04-12 05:49:29 -07:00
|
|
|
GimpContext *context,
|
2006-01-17 02:08:50 -08:00
|
|
|
gint view_size)
|
2002-03-07 16:27:45 -08:00
|
|
|
{
|
2006-08-29 14:44:51 -07:00
|
|
|
return gimp_palette_editor_new (context,
|
2004-09-26 11:41:29 -07:00
|
|
|
factory->menu_factory);
|
2002-03-07 16:27:45 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2001-04-14 08:21:45 -07:00
|
|
|
/* private functions */
|
|
|
|
|
|
2001-04-18 09:39:34 -07:00
|
|
|
static void
|
2002-03-16 09:58:19 -08:00
|
|
|
dialogs_indexed_palette_selected (GimpColormapEditor *editor,
|
2003-09-26 06:33:54 -07:00
|
|
|
GdkModifierType state,
|
2006-04-12 05:49:29 -07:00
|
|
|
gpointer data)
|
2001-04-18 09:39:34 -07:00
|
|
|
{
|
2004-09-25 05:48:41 -07:00
|
|
|
GimpImageEditor *image_editor = GIMP_IMAGE_EDITOR (editor);
|
2001-07-15 07:32:44 -07:00
|
|
|
|
2006-03-28 09:08:36 -08:00
|
|
|
if (image_editor->image)
|
2001-07-15 07:32:44 -07:00
|
|
|
{
|
2003-09-26 06:33:54 -07:00
|
|
|
GimpRGB color;
|
|
|
|
|
gint index;
|
|
|
|
|
|
2006-05-28 12:45:52 -07:00
|
|
|
index = gimp_colormap_editor_get_index (editor, NULL);
|
2003-09-26 06:33:54 -07:00
|
|
|
|
2006-03-28 09:08:36 -08:00
|
|
|
gimp_image_get_colormap_entry (image_editor->image, index, &color);
|
2003-09-26 06:33:54 -07:00
|
|
|
|
|
|
|
|
if (state & GDK_CONTROL_MASK)
|
2004-09-25 05:48:41 -07:00
|
|
|
gimp_context_set_background (image_editor->context, &color);
|
2003-09-26 06:33:54 -07:00
|
|
|
else
|
2004-09-25 05:48:41 -07:00
|
|
|
gimp_context_set_foreground (image_editor->context, &color);
|
2001-07-15 07:32:44 -07:00
|
|
|
}
|
2001-04-18 09:39:34 -07:00
|
|
|
}
|