2001-04-14 23:21:45 +08: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 23:15:23 +08:00
|
|
|
#include "dialogs-types.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
#include "core/gimp.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
#include "core/gimpchannel.h"
|
|
|
|
#include "core/gimpcontext.h"
|
|
|
|
#include "core/gimpimage.h"
|
2003-09-26 21:33:54 +08:00
|
|
|
#include "core/gimpimage-colormap.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
#include "core/gimplayer.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
#include "vectors/gimpvectors.h"
|
|
|
|
|
2003-04-04 00:13:12 +08:00
|
|
|
#include "config/gimpdisplayconfig.h"
|
2003-03-07 00:47:34 +08:00
|
|
|
|
2002-03-08 08:27:45 +08:00
|
|
|
#include "widgets/gimpbrusheditor.h"
|
2001-06-30 03:25:03 +08:00
|
|
|
#include "widgets/gimpbrushfactoryview.h"
|
2001-06-26 20:09:43 +08:00
|
|
|
#include "widgets/gimpbufferview.h"
|
2002-11-05 08:02:56 +08:00
|
|
|
#include "widgets/gimpcoloreditor.h"
|
2002-03-17 01:58:19 +08:00
|
|
|
#include "widgets/gimpcolormapeditor.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
#include "widgets/gimpcontainergridview.h"
|
2003-02-22 03:03:19 +08:00
|
|
|
#include "widgets/gimpcontainertreeview.h"
|
2003-09-24 00:17:25 +08:00
|
|
|
#include "widgets/gimpcontainerview-utils.h"
|
2002-03-08 08:27:45 +08:00
|
|
|
#include "widgets/gimpdataeditor.h"
|
2003-07-07 21:37:19 +08:00
|
|
|
#include "widgets/gimpdevicestatus.h"
|
2003-11-01 10:39:34 +08:00
|
|
|
#include "widgets/gimpdialogfactory.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
#include "widgets/gimpdockable.h"
|
2001-10-23 01:27:46 +08:00
|
|
|
#include "widgets/gimpdocumentview.h"
|
2003-11-01 10:39:34 +08:00
|
|
|
#include "widgets/gimperrorconsole.h"
|
2004-08-26 01:58:52 +08:00
|
|
|
#include "widgets/gimperrordialog.h"
|
2003-10-19 00:23:15 +08:00
|
|
|
#include "widgets/gimpfontview.h"
|
2002-03-08 08:27:45 +08:00
|
|
|
#include "widgets/gimpgradienteditor.h"
|
2003-08-25 22:18:33 +08:00
|
|
|
#include "widgets/gimphelp-ids.h"
|
2003-11-01 10:39:34 +08:00
|
|
|
#include "widgets/gimphistogrameditor.h"
|
|
|
|
#include "widgets/gimpimagedock.h"
|
|
|
|
#include "widgets/gimpimageview.h"
|
|
|
|
#include "widgets/gimpitemtreeview.h"
|
2002-03-08 08:27:45 +08:00
|
|
|
#include "widgets/gimppaletteeditor.h"
|
2004-03-17 22:14:18 +08:00
|
|
|
#include "widgets/gimppatternfactoryview.h"
|
2002-08-22 20:49:01 +08:00
|
|
|
#include "widgets/gimpselectioneditor.h"
|
2003-04-06 19:21:56 +08:00
|
|
|
#include "widgets/gimptemplateview.h"
|
2002-03-15 01:07:02 +08:00
|
|
|
#include "widgets/gimptoolbox.h"
|
2003-09-30 04:26:09 +08:00
|
|
|
#include "widgets/gimptooloptionseditor.h"
|
2004-05-10 08:41:57 +08:00
|
|
|
#include "widgets/gimptoolview.h"
|
2003-02-20 20:47:42 +08:00
|
|
|
#include "widgets/gimpundoeditor.h"
|
2003-03-16 19:14:29 +08:00
|
|
|
#include "widgets/gimpvectorstreeview.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2002-03-15 06:42:50 +08:00
|
|
|
#include "display/gimpdisplay.h"
|
|
|
|
#include "display/gimpdisplayshell.h"
|
2004-08-26 00:02:10 +08:00
|
|
|
#include "display/gimpnavigationeditor.h"
|
2002-03-15 06:42:50 +08:00
|
|
|
|
2004-04-20 21:25:55 +08:00
|
|
|
#include "actions/channels-commands.h"
|
|
|
|
#include "actions/layers-commands.h"
|
|
|
|
#include "actions/vectors-commands.h"
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
#include "about-dialog.h"
|
2001-07-18 04:50:01 +08:00
|
|
|
#include "dialogs.h"
|
2001-04-18 00:00:27 +08:00
|
|
|
#include "dialogs-constructors.h"
|
2004-09-14 00:01:52 +08:00
|
|
|
#include "file-open-dialog.h"
|
2004-09-09 17:47:33 +08:00
|
|
|
#include "file-open-location-dialog.h"
|
2004-09-14 00:37:01 +08:00
|
|
|
#include "file-save-dialog.h"
|
2004-09-13 23:15:23 +08:00
|
|
|
#include "image-new-dialog.h"
|
|
|
|
#include "module-dialog.h"
|
2002-11-21 03:45:03 +08:00
|
|
|
#include "preferences-dialog.h"
|
2004-09-14 07:09:10 +08:00
|
|
|
#include "quit-dialog.h"
|
2001-04-19 00:39:34 +08:00
|
|
|
#include "tips-dialog.h"
|
2001-04-18 00:00:27 +08:00
|
|
|
|
2003-03-26 00:38:19 +08:00
|
|
|
#include "gimp-intl.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
|
2001-07-18 04:50:01 +08:00
|
|
|
/* local function prototypes */
|
|
|
|
|
2003-10-11 05:24:12 +08:00
|
|
|
static GtkWidget * dialogs_dockable_new (GtkWidget *widget,
|
|
|
|
const gchar *name,
|
|
|
|
const gchar *blurb,
|
|
|
|
const gchar *stock_id,
|
|
|
|
const gchar *help_id);
|
|
|
|
|
|
|
|
static void dialogs_indexed_palette_selected (GimpColormapEditor *editor,
|
|
|
|
GdkModifierType state,
|
2004-09-25 20:48:41 +08:00
|
|
|
gpointer data);
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2002-03-10 23:05:58 +08:00
|
|
|
/**********************/
|
|
|
|
/* toplevel dialogs */
|
|
|
|
/**********************/
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2003-05-03 02:43:15 +08:00
|
|
|
GtkWidget *
|
2004-09-13 23:15:23 +08:00
|
|
|
dialogs_image_new_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2003-05-03 02:43:15 +08:00
|
|
|
{
|
2004-09-13 23:15:23 +08:00
|
|
|
return image_new_dialog_new (context->gimp);
|
2003-05-03 02:43:15 +08:00
|
|
|
}
|
|
|
|
|
2004-09-14 00:01:52 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_file_open_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
return file_open_dialog_new (context->gimp);
|
|
|
|
}
|
|
|
|
|
2004-09-09 17:47:33 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_file_open_location_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
return file_open_location_dialog_new (context->gimp);
|
|
|
|
}
|
|
|
|
|
2004-09-14 00:37:01 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_file_save_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
return file_save_dialog_new (context->gimp);
|
|
|
|
}
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_preferences_get (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-19 00:39:34 +08:00
|
|
|
{
|
2002-11-21 03:45:03 +08:00
|
|
|
return preferences_dialog_create (context->gimp);
|
2001-04-19 00:39:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
2004-09-13 23:15:23 +08:00
|
|
|
dialogs_module_get (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-19 00:39:34 +08:00
|
|
|
{
|
2004-09-13 23:15:23 +08:00
|
|
|
return module_dialog_new (context->gimp);
|
2001-04-19 00:39:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_tips_get (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-19 00:39:34 +08:00
|
|
|
{
|
2002-11-19 04:50:31 +08:00
|
|
|
return tips_dialog_create (context->gimp);
|
2001-04-19 00:39:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_about_get (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-19 00:39:34 +08:00
|
|
|
{
|
|
|
|
return about_dialog_create ();
|
|
|
|
}
|
|
|
|
|
2004-08-26 01:58:52 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_error_get (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
return gimp_error_dialog_new (_("GIMP Message"), GIMP_STOCK_WARNING);
|
|
|
|
}
|
2002-02-03 20:10:23 +08:00
|
|
|
|
2004-09-14 07:09:10 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_quit_get (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
return quit_dialog_new (context->gimp);
|
|
|
|
}
|
|
|
|
|
2002-03-10 23:05:58 +08:00
|
|
|
/***********/
|
2001-07-15 22:32:44 +08:00
|
|
|
/* docks */
|
2002-03-10 23:05:58 +08:00
|
|
|
/***********/
|
2001-04-18 00:00:27 +08:00
|
|
|
|
2002-03-15 01:07:02 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_toolbox_get (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
/* we pass "global_dock_factory", _not_ "global_toolbox_factory" to
|
|
|
|
* the toolbox constructor, because the toolbox_factory has no
|
|
|
|
* dockables registered
|
|
|
|
*/
|
|
|
|
return gimp_toolbox_new (global_dock_factory, context->gimp);
|
|
|
|
}
|
|
|
|
|
2001-04-22 08:38:56 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_dock_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-22 08:38:56 +08:00
|
|
|
{
|
2002-05-10 21:09:19 +08:00
|
|
|
return gimp_image_dock_new (factory,
|
|
|
|
context->gimp->images,
|
|
|
|
context->gimp->displays);
|
2001-04-22 08:38:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-03-10 23:05:58 +08:00
|
|
|
/***************/
|
|
|
|
/* dockables */
|
|
|
|
/***************/
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_tool_options_get (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
static GtkWidget *view = NULL;
|
|
|
|
|
|
|
|
if (view)
|
|
|
|
return NULL;
|
|
|
|
|
2003-09-30 04:26:09 +08:00
|
|
|
view = gimp_tool_options_editor_new (context->gimp, factory->menu_factory);
|
2002-03-10 23:05:58 +08:00
|
|
|
|
2004-04-23 01:38:14 +08:00
|
|
|
g_object_add_weak_pointer (G_OBJECT (view), (gpointer) &view);
|
2002-03-10 23:05:58 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Tool Options"), NULL,
|
2003-07-08 23:07:56 +08:00
|
|
|
GIMP_STOCK_TOOL_OPTIONS,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_TOOL_OPTIONS_DIALOG);
|
2002-03-10 23:05:58 +08:00
|
|
|
}
|
|
|
|
|
2003-07-07 21:37:19 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_device_status_get (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
static GtkWidget *view = NULL;
|
|
|
|
|
|
|
|
if (view)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
view = gimp_device_status_new (context->gimp);
|
|
|
|
|
2004-04-23 01:38:14 +08:00
|
|
|
g_object_add_weak_pointer (G_OBJECT (view), (gpointer) &view);
|
2003-07-07 21:37:19 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-07-08 23:07:56 +08:00
|
|
|
_("Devices"), _("Device Status"),
|
|
|
|
GIMP_STOCK_DEVICE_STATUS,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_DEVICE_STATUS_DIALOG);
|
2003-07-07 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
2002-03-10 23:05:58 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_error_console_get (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
static GtkWidget *view = NULL;
|
|
|
|
|
|
|
|
if (view)
|
|
|
|
return NULL;
|
|
|
|
|
2003-06-13 22:37:00 +08:00
|
|
|
view = gimp_error_console_new (context->gimp, factory->menu_factory);
|
2002-03-10 23:05:58 +08:00
|
|
|
|
2004-04-23 01:38:14 +08:00
|
|
|
g_object_add_weak_pointer (G_OBJECT (view), (gpointer) &view);
|
2002-03-10 23:05:58 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-07-08 23:07:56 +08:00
|
|
|
_("Errors"), _("Error Console"),
|
2002-05-13 07:20:21 +08:00
|
|
|
GIMP_STOCK_WARNING,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_ERRORS_DIALOG);
|
2002-03-10 23:05:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***** list views *****/
|
2001-04-29 23:23:01 +08:00
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_image_list_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2002-05-08 20:39:01 +08:00
|
|
|
view = gimp_image_view_new (GIMP_VIEW_TYPE_LIST,
|
|
|
|
context->gimp->images,
|
|
|
|
context,
|
2003-04-08 20:39:02 +08:00
|
|
|
preview_size, 1,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Images"), NULL,
|
2003-07-08 23:07:56 +08:00
|
|
|
GIMP_STOCK_IMAGES,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_IMAGE_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_brush_list_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
view = gimp_brush_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
2001-07-05 03:31:35 +08:00
|
|
|
context->gimp->brush_factory,
|
2001-06-30 03:25:03 +08:00
|
|
|
dialogs_edit_brush_func,
|
|
|
|
context,
|
|
|
|
TRUE,
|
2003-04-08 20:39:02 +08:00
|
|
|
preview_size, 1,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Brushes"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_BRUSH,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_BRUSH_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_pattern_list_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2004-03-17 22:14:18 +08:00
|
|
|
view = gimp_pattern_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
|
|
|
context->gimp->pattern_factory,
|
|
|
|
NULL,
|
|
|
|
context,
|
|
|
|
preview_size, 1,
|
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Patterns"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_PATTERN,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_PATTERN_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_gradient_list_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
2004-05-12 00:05:21 +08:00
|
|
|
context->gimp->gradient_factory,
|
|
|
|
dialogs_edit_gradient_func,
|
|
|
|
context,
|
|
|
|
preview_size, 1,
|
2004-04-22 00:33:17 +08:00
|
|
|
factory->menu_factory, "<Gradients>",
|
2004-05-12 00:05:21 +08:00
|
|
|
"/gradients-popup",
|
|
|
|
"gradients");
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Gradients"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_GRADIENT,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_GRADIENT_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_palette_list_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
2004-05-12 00:05:21 +08:00
|
|
|
context->gimp->palette_factory,
|
|
|
|
dialogs_edit_palette_func,
|
|
|
|
context,
|
|
|
|
preview_size, 1,
|
2004-04-22 00:33:17 +08:00
|
|
|
factory->menu_factory, "<Palettes>",
|
2004-05-12 00:05:21 +08:00
|
|
|
"/palettes-popup",
|
|
|
|
"palettes");
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Palettes"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_PALETTE,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_PALETTE_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2003-03-26 06:53:10 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_font_list_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2003-10-19 00:23:15 +08:00
|
|
|
view = gimp_font_view_new (GIMP_VIEW_TYPE_LIST,
|
|
|
|
context->gimp->fonts,
|
|
|
|
context,
|
|
|
|
preview_size, 1,
|
|
|
|
factory->menu_factory);
|
2003-03-26 06:53:10 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Fonts"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_FONT,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_FONT_DIALOG);
|
2003-03-26 06:53:10 +08:00
|
|
|
}
|
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_tool_list_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2004-05-10 08:41:57 +08:00
|
|
|
view = gimp_tool_view_new (GIMP_VIEW_TYPE_LIST,
|
|
|
|
context->gimp->tool_info_list,
|
|
|
|
context,
|
|
|
|
preview_size, 0,
|
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Tools"), NULL,
|
2003-10-23 21:04:44 +08:00
|
|
|
GIMP_STOCK_TOOLS,
|
|
|
|
GIMP_HELP_TOOLS_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2001-06-26 20:09:43 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_buffer_list_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-06-26 20:09:43 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_LIST,
|
2001-07-05 03:31:35 +08:00
|
|
|
context->gimp->named_buffers,
|
2001-06-26 20:09:43 +08:00
|
|
|
context,
|
2003-04-08 20:39:02 +08:00
|
|
|
preview_size, 1,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-06-26 20:09:43 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Buffers"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_BUFFER,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_BUFFER_DIALOG);
|
2003-07-08 23:07:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_document_list_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_document_view_new (GIMP_VIEW_TYPE_LIST,
|
|
|
|
context->gimp->documents,
|
|
|
|
context,
|
|
|
|
preview_size, 1,
|
|
|
|
factory->menu_factory);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("History"), _("Document History"),
|
2003-07-08 23:07:56 +08:00
|
|
|
GTK_STOCK_OPEN,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_DOCUMENT_DIALOG);
|
2003-07-08 23:07:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_template_list_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
2004-05-12 00:05:21 +08:00
|
|
|
GtkWidget *view;
|
2003-07-08 23:07:56 +08:00
|
|
|
|
|
|
|
view = gimp_template_view_new (GIMP_VIEW_TYPE_LIST,
|
|
|
|
context->gimp->templates,
|
|
|
|
context,
|
|
|
|
preview_size, 0,
|
|
|
|
factory->menu_factory);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-15 07:00:16 +08:00
|
|
|
_("Templates"), _("Image Templates"),
|
2003-07-08 23:07:56 +08:00
|
|
|
GIMP_STOCK_TEMPLATE,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_TEMPLATE_DIALOG);
|
2001-06-26 20:09:43 +08:00
|
|
|
}
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2002-03-10 23:05:58 +08:00
|
|
|
/***** grid views *****/
|
2001-04-16 00:16:13 +08:00
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_image_grid_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2002-05-08 20:39:01 +08:00
|
|
|
view = gimp_image_view_new (GIMP_VIEW_TYPE_GRID,
|
|
|
|
context->gimp->images,
|
|
|
|
context,
|
2003-04-08 20:39:02 +08:00
|
|
|
preview_size, 1,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Images"), NULL,
|
2003-07-08 23:07:56 +08:00
|
|
|
GIMP_STOCK_IMAGES,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_IMAGE_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_brush_grid_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
view = gimp_brush_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
2001-07-05 03:31:35 +08:00
|
|
|
context->gimp->brush_factory,
|
2001-06-30 03:25:03 +08:00
|
|
|
dialogs_edit_brush_func,
|
|
|
|
context,
|
|
|
|
TRUE,
|
2003-04-08 20:39:02 +08:00
|
|
|
preview_size, 1,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Brushes"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_BRUSH,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_BRUSH_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2004-03-17 22:14:18 +08:00
|
|
|
view = gimp_pattern_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
|
|
|
context->gimp->pattern_factory,
|
|
|
|
NULL,
|
|
|
|
context,
|
|
|
|
preview_size, 1,
|
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Patterns"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_PATTERN,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_PATTERN_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
2004-05-12 00:05:21 +08:00
|
|
|
context->gimp->gradient_factory,
|
|
|
|
dialogs_edit_gradient_func,
|
|
|
|
context,
|
|
|
|
preview_size, 1,
|
2004-04-22 00:33:17 +08:00
|
|
|
factory->menu_factory, "<Gradients>",
|
2004-05-12 00:05:21 +08:00
|
|
|
"/gradients-popup",
|
|
|
|
"gradients");
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Gradients"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_GRADIENT,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_GRADIENT_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_palette_grid_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
2004-05-12 00:05:21 +08:00
|
|
|
context->gimp->palette_factory,
|
|
|
|
dialogs_edit_palette_func,
|
|
|
|
context,
|
|
|
|
preview_size, 1,
|
2004-04-22 00:33:17 +08:00
|
|
|
factory->menu_factory, "<Palettes>",
|
2004-05-12 00:05:21 +08:00
|
|
|
"/palettes-popup",
|
|
|
|
"palettes");
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Palettes"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_PALETTE,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_PALETTE_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2003-03-26 06:53:10 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_font_grid_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2003-10-19 00:23:15 +08:00
|
|
|
view = gimp_font_view_new (GIMP_VIEW_TYPE_GRID,
|
|
|
|
context->gimp->fonts,
|
|
|
|
context,
|
|
|
|
preview_size, 1,
|
|
|
|
factory->menu_factory);
|
2003-03-26 06:53:10 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Fonts"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_FONT,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_FONT_DIALOG);
|
2003-03-26 06:53:10 +08:00
|
|
|
}
|
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_tool_grid_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2004-05-10 08:41:57 +08:00
|
|
|
view = gimp_tool_view_new (GIMP_VIEW_TYPE_GRID,
|
|
|
|
context->gimp->tool_info_list,
|
|
|
|
context,
|
|
|
|
preview_size, 1,
|
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Tools"), NULL,
|
2003-10-23 21:04:44 +08:00
|
|
|
GIMP_STOCK_TOOLS,
|
|
|
|
GIMP_HELP_TOOLS_DIALOG);
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
|
|
|
|
2001-06-26 20:09:43 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-06-26 20:09:43 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_GRID,
|
2001-07-05 03:31:35 +08:00
|
|
|
context->gimp->named_buffers,
|
2001-06-26 20:09:43 +08:00
|
|
|
context,
|
2003-04-08 20:39:02 +08:00
|
|
|
preview_size, 1,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-06-26 20:09:43 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Buffers"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_BUFFER,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_BUFFER_DIALOG);
|
2003-07-08 23:07:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_document_grid_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
|
|
|
|
context->gimp->documents,
|
|
|
|
context,
|
|
|
|
preview_size, 1,
|
|
|
|
factory->menu_factory);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-10-01 02:50:55 +08:00
|
|
|
_("History"), _("Document History"),
|
2003-07-08 23:07:56 +08:00
|
|
|
GTK_STOCK_OPEN,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_DOCUMENT_DIALOG);
|
2001-06-26 20:09:43 +08:00
|
|
|
}
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2002-03-10 23:05:58 +08:00
|
|
|
/***** image related dialogs *****/
|
2001-04-20 10:30:43 +08:00
|
|
|
|
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_layer_list_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-20 10:30:43 +08:00
|
|
|
{
|
2003-02-17 21:33:29 +08:00
|
|
|
GtkWidget *view;
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2003-03-16 19:14:29 +08:00
|
|
|
if (preview_size < 1)
|
|
|
|
preview_size = context->gimp->config->layer_preview_size;
|
|
|
|
|
|
|
|
view =
|
2003-04-08 20:39:02 +08:00
|
|
|
gimp_item_tree_view_new (preview_size, 2,
|
2003-10-11 05:24:12 +08:00
|
|
|
gimp_context_get_image (context),
|
2003-03-16 19:14:29 +08:00
|
|
|
GIMP_TYPE_LAYER,
|
|
|
|
"active_layer_changed",
|
|
|
|
(GimpEditItemFunc) layers_edit_layer_query,
|
2003-09-18 06:54:48 +08:00
|
|
|
(GimpNewItemFunc) layers_new_layer_query,
|
2004-01-14 03:08:16 +08:00
|
|
|
(GimpActivateItemFunc) layers_text_tool,
|
2004-04-22 00:33:17 +08:00
|
|
|
factory->menu_factory, "<Layers>",
|
|
|
|
"/layers-popup");
|
2003-03-16 19:14:29 +08:00
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Layers"), NULL,
|
|
|
|
GIMP_STOCK_LAYERS,
|
|
|
|
GIMP_HELP_LAYER_DIALOG);
|
2003-03-16 19:14:29 +08:00
|
|
|
}
|
|
|
|
|
2001-04-20 10:30:43 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_channel_list_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-20 10:30:43 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2003-03-16 19:14:29 +08:00
|
|
|
if (preview_size < 1)
|
|
|
|
preview_size = context->gimp->config->layer_preview_size;
|
|
|
|
|
|
|
|
view =
|
2003-04-08 20:39:02 +08:00
|
|
|
gimp_item_tree_view_new (preview_size, 1,
|
2003-10-11 05:24:12 +08:00
|
|
|
gimp_context_get_image (context),
|
2003-03-16 19:14:29 +08:00
|
|
|
GIMP_TYPE_CHANNEL,
|
|
|
|
"active_channel_changed",
|
|
|
|
(GimpEditItemFunc) channels_edit_channel_query,
|
2003-09-18 06:54:48 +08:00
|
|
|
(GimpNewItemFunc) channels_new_channel_query,
|
2003-03-16 19:14:29 +08:00
|
|
|
(GimpActivateItemFunc) channels_edit_channel_query,
|
2004-04-22 00:33:17 +08:00
|
|
|
factory->menu_factory, "<Channels>",
|
|
|
|
"/channels-popup");
|
2003-03-16 19:14:29 +08:00
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Channels"), NULL,
|
|
|
|
GIMP_STOCK_CHANNELS,
|
|
|
|
GIMP_HELP_CHANNEL_DIALOG);
|
2003-03-16 19:14:29 +08:00
|
|
|
}
|
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2003-03-16 19:14:29 +08:00
|
|
|
{
|
2004-05-13 02:36:33 +08:00
|
|
|
GtkWidget *view;
|
2003-03-16 19:14:29 +08:00
|
|
|
|
|
|
|
if (preview_size < 1)
|
|
|
|
preview_size = context->gimp->config->layer_preview_size;
|
|
|
|
|
|
|
|
view =
|
2003-04-08 20:39:02 +08:00
|
|
|
gimp_item_tree_view_new (preview_size, 1,
|
2003-10-11 05:24:12 +08:00
|
|
|
gimp_context_get_image (context),
|
2003-03-16 19:14:29 +08:00
|
|
|
GIMP_TYPE_VECTORS,
|
|
|
|
"active_vectors_changed",
|
|
|
|
(GimpEditItemFunc) vectors_edit_vectors_query,
|
2003-09-18 06:54:48 +08:00
|
|
|
(GimpNewItemFunc) vectors_new_vectors_query,
|
2003-03-16 19:14:29 +08:00
|
|
|
(GimpActivateItemFunc) vectors_vectors_tool,
|
2004-04-22 00:33:17 +08:00
|
|
|
factory->menu_factory, "<Vectors>",
|
|
|
|
"/vectors-popup");
|
2003-03-16 19:14:29 +08:00
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Paths"), NULL,
|
|
|
|
GIMP_STOCK_PATHS,
|
|
|
|
GIMP_HELP_PATH_DIALOG);
|
2003-03-16 19:14:29 +08:00
|
|
|
}
|
|
|
|
|
2001-07-15 22:32:44 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_indexed_palette_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-07-15 22:32:44 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
view = gimp_colormap_editor_new (factory->menu_factory);
|
2001-07-15 22:32:44 +08:00
|
|
|
|
2003-01-06 06:07:10 +08:00
|
|
|
g_signal_connect (view, "selected",
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
G_CALLBACK (dialogs_indexed_palette_selected),
|
2004-09-25 20:48:41 +08:00
|
|
|
NULL);
|
2001-07-15 22:32:44 +08:00
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Colormap"), _("Indexed Palette"),
|
|
|
|
GIMP_STOCK_INDEXED_PALETTE,
|
|
|
|
GIMP_HELP_INDEXED_PALETTE_DIALOG);
|
2001-07-15 22:32:44 +08:00
|
|
|
}
|
|
|
|
|
2003-11-01 10:39:34 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_histogram_editor_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
2004-05-13 02:36:33 +08:00
|
|
|
GtkWidget *view;
|
2003-11-01 10:39:34 +08:00
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
view = gimp_histogram_editor_new ();
|
2003-11-01 10:39:34 +08:00
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Histogram"), NULL,
|
|
|
|
GIMP_STOCK_HISTOGRAM,
|
|
|
|
GIMP_HELP_HISTOGRAM_DIALOG);
|
2003-11-01 10:39:34 +08:00
|
|
|
}
|
|
|
|
|
2002-08-22 20:49:01 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_selection_editor_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
2004-05-13 02:36:33 +08:00
|
|
|
GtkWidget *view;
|
2003-06-03 01:57:11 +08:00
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
view = gimp_selection_editor_new (factory->menu_factory);
|
2002-08-22 20:49:01 +08:00
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Selection"), _("Selection Editor"),
|
|
|
|
GIMP_STOCK_TOOL_RECT_SELECT,
|
|
|
|
GIMP_HELP_SELECTION_DIALOG);
|
2002-08-22 20:49:01 +08:00
|
|
|
}
|
|
|
|
|
2003-02-20 20:47:42 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_undo_history_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
2004-03-07 23:33:04 +08:00
|
|
|
GtkWidget *editor;
|
2003-02-20 20:47:42 +08:00
|
|
|
|
2004-05-13 02:36:33 +08:00
|
|
|
editor = gimp_undo_editor_new (context->gimp->config,
|
|
|
|
factory->menu_factory);
|
2003-02-20 20:47:42 +08:00
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
return dialogs_dockable_new (editor,
|
|
|
|
_("Undo"), _("Undo History"),
|
|
|
|
GIMP_STOCK_UNDO_HISTORY,
|
|
|
|
GIMP_HELP_UNDO_DIALOG);
|
2003-02-20 20:47:42 +08:00
|
|
|
}
|
|
|
|
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2003-07-08 23:07:56 +08:00
|
|
|
/***** display related dialogs *****/
|
2002-03-10 23:05:58 +08:00
|
|
|
|
2002-11-05 08:02:56 +08:00
|
|
|
GtkWidget *
|
2003-07-08 23:07:56 +08:00
|
|
|
dialogs_navigation_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2002-11-05 08:02:56 +08:00
|
|
|
{
|
2003-07-08 23:07:56 +08:00
|
|
|
GimpDisplay *gdisp;
|
|
|
|
GimpDisplayShell *shell = NULL;
|
|
|
|
GtkWidget *view;
|
2002-11-05 08:02:56 +08:00
|
|
|
|
2003-07-08 23:07:56 +08:00
|
|
|
gdisp = gimp_context_get_display (context);
|
2002-11-05 08:02:56 +08:00
|
|
|
|
2003-07-08 23:07:56 +08:00
|
|
|
if (gdisp)
|
|
|
|
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
2002-03-10 23:05:58 +08:00
|
|
|
|
2004-08-26 00:02:10 +08:00
|
|
|
view = gimp_navigation_editor_new (shell,
|
|
|
|
GIMP_DISPLAY_CONFIG (context->gimp->config));
|
2002-03-10 23:05:58 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2003-07-08 23:07:56 +08:00
|
|
|
_("Navigation"), _("Display Navigation"),
|
|
|
|
GIMP_STOCK_NAVIGATION,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_NAVIGATION_DIALOG);
|
2003-02-27 00:17:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-07-08 23:07:56 +08:00
|
|
|
/***** misc dockables *****/
|
2003-02-27 00:17:10 +08:00
|
|
|
|
2003-04-06 03:56:38 +08:00
|
|
|
GtkWidget *
|
2003-07-08 23:07:56 +08:00
|
|
|
dialogs_color_editor_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2003-04-06 03:56:38 +08:00
|
|
|
{
|
2003-07-08 23:07:56 +08:00
|
|
|
GtkWidget *view;
|
2003-04-14 00:25:14 +08:00
|
|
|
|
2003-07-08 23:07:56 +08:00
|
|
|
view = gimp_color_editor_new (context);
|
2003-04-14 00:25:14 +08:00
|
|
|
|
2003-04-06 03:56:38 +08:00
|
|
|
return dialogs_dockable_new (view,
|
2003-07-08 23:07:56 +08:00
|
|
|
_("FG/BG"), _("FG/BG Color"),
|
|
|
|
GIMP_STOCK_DEFAULT_COLORS,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_COLOR_DIALOG);
|
2003-04-06 03:56:38 +08:00
|
|
|
}
|
|
|
|
|
2002-03-10 23:05:58 +08:00
|
|
|
|
|
|
|
/***** editors *****/
|
2002-03-08 08:27:45 +08:00
|
|
|
|
|
|
|
/* the brush editor */
|
|
|
|
|
|
|
|
static GimpDataEditor *brush_editor = NULL;
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_brush_editor_get (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
brush_editor = gimp_brush_editor_new (context->gimp);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (GTK_WIDGET (brush_editor),
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Brush Editor"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_BRUSH,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_BRUSH_EDITOR_DIALOG);
|
2002-03-08 08:27:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2003-11-09 02:16:25 +08:00
|
|
|
dialogs_edit_brush_func (GimpData *data,
|
|
|
|
GtkWidget *parent)
|
2002-03-08 08:27:45 +08:00
|
|
|
{
|
|
|
|
gimp_dialog_factory_dialog_raise (global_dock_factory,
|
2003-11-09 02:16:25 +08:00
|
|
|
gtk_widget_get_screen (parent),
|
2002-03-21 20:17:17 +08:00
|
|
|
"gimp-brush-editor",
|
2002-03-08 08:27:45 +08:00
|
|
|
-1);
|
|
|
|
|
|
|
|
gimp_data_editor_set_data (brush_editor, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* the gradient editor */
|
|
|
|
|
|
|
|
static GimpDataEditor *gradient_editor = NULL;
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
2003-01-11 01:55:53 +08:00
|
|
|
gradient_editor = gimp_gradient_editor_new (context->gimp,
|
|
|
|
factory->menu_factory);
|
2002-03-08 08:27:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (GTK_WIDGET (gradient_editor),
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Gradient Editor"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_GRADIENT,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_GRADIENT_EDITOR_DIALOG);
|
2002-03-08 08:27:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2003-11-09 02:16:25 +08:00
|
|
|
dialogs_edit_gradient_func (GimpData *data,
|
|
|
|
GtkWidget *parent)
|
2002-03-08 08:27:45 +08:00
|
|
|
{
|
|
|
|
gimp_dialog_factory_dialog_raise (global_dock_factory,
|
2003-11-09 02:16:25 +08:00
|
|
|
gtk_widget_get_screen (parent),
|
2002-03-21 20:17:17 +08:00
|
|
|
"gimp-gradient-editor",
|
2002-03-08 08:27:45 +08:00
|
|
|
-1);
|
|
|
|
|
|
|
|
gimp_data_editor_set_data (gradient_editor, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* the palette editor */
|
|
|
|
|
|
|
|
static GimpDataEditor *palette_editor = NULL;
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_palette_editor_get (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
2003-01-11 01:55:53 +08:00
|
|
|
palette_editor = gimp_palette_editor_new (context->gimp,
|
|
|
|
factory->menu_factory);
|
2002-03-08 08:27:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (GTK_WIDGET (palette_editor),
|
2003-10-01 02:50:55 +08:00
|
|
|
_("Palette Editor"), NULL,
|
2004-03-05 00:10:57 +08:00
|
|
|
GIMP_STOCK_PALETTE,
|
2003-10-11 05:24:12 +08:00
|
|
|
GIMP_HELP_PALETTE_EDITOR_DIALOG);
|
2002-03-08 08:27:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2003-11-09 02:16:25 +08:00
|
|
|
dialogs_edit_palette_func (GimpData *data,
|
|
|
|
GtkWidget *parent)
|
2002-03-08 08:27:45 +08:00
|
|
|
{
|
|
|
|
gimp_dialog_factory_dialog_raise (global_dock_factory,
|
2003-11-09 02:16:25 +08:00
|
|
|
gtk_widget_get_screen (parent),
|
2002-03-21 20:17:17 +08:00
|
|
|
"gimp-palette-editor",
|
2002-03-08 08:27:45 +08:00
|
|
|
-1);
|
|
|
|
|
|
|
|
gimp_data_editor_set_data (palette_editor, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
/* private functions */
|
|
|
|
|
2003-10-11 05:24:12 +08:00
|
|
|
static GtkWidget *
|
|
|
|
dialogs_dockable_new (GtkWidget *widget,
|
|
|
|
const gchar *name,
|
|
|
|
const gchar *blurb,
|
|
|
|
const gchar *stock_id,
|
|
|
|
const gchar *help_id)
|
|
|
|
{
|
|
|
|
GtkWidget *dockable;
|
|
|
|
|
|
|
|
dockable = gimp_dockable_new (name, blurb, stock_id, help_id);
|
|
|
|
gtk_container_add (GTK_CONTAINER (dockable), widget);
|
|
|
|
gtk_widget_show (widget);
|
|
|
|
|
|
|
|
return dockable;
|
|
|
|
}
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
static void
|
2002-03-17 01:58:19 +08:00
|
|
|
dialogs_indexed_palette_selected (GimpColormapEditor *editor,
|
2003-09-26 21:33:54 +08:00
|
|
|
GdkModifierType state,
|
2004-09-25 20:48:41 +08:00
|
|
|
gpointer data)
|
2001-04-19 00:39:34 +08:00
|
|
|
{
|
2004-09-25 20:48:41 +08:00
|
|
|
GimpImageEditor *image_editor = GIMP_IMAGE_EDITOR (editor);
|
2001-07-15 22:32:44 +08:00
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
if (image_editor->gimage)
|
2001-07-15 22:32:44 +08:00
|
|
|
{
|
2003-09-26 21:33:54 +08:00
|
|
|
GimpRGB color;
|
|
|
|
gint index;
|
|
|
|
|
|
|
|
index = gimp_colormap_editor_col_index (editor);
|
|
|
|
|
2004-09-25 20:48:41 +08:00
|
|
|
gimp_image_get_colormap_entry (image_editor->gimage, index, &color);
|
2003-09-26 21:33:54 +08:00
|
|
|
|
|
|
|
if (state & GDK_CONTROL_MASK)
|
2004-09-25 20:48:41 +08:00
|
|
|
gimp_context_set_background (image_editor->context, &color);
|
2003-09-26 21:33:54 +08:00
|
|
|
else
|
2004-09-25 20:48:41 +08:00
|
|
|
gimp_context_set_foreground (image_editor->context, &color);
|
2001-07-15 22:32:44 +08:00
|
|
|
}
|
2001-04-19 00:39:34 +08:00
|
|
|
}
|