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>
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
#include "libgimpcolor/gimpcolor.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
|
2001-08-17 22:27:31 +08:00
|
|
|
#include "gui-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/gimpgradient.h"
|
|
|
|
#include "core/gimpimage.h"
|
|
|
|
#include "core/gimplayer.h"
|
2001-07-10 01:58:56 +08:00
|
|
|
#include "core/gimppalette.h"
|
2001-05-10 06:34:59 +08:00
|
|
|
#include "core/gimptoolinfo.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
#include "vectors/gimpvectors.h"
|
|
|
|
|
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/gimpcontainerlistview.h"
|
|
|
|
#include "widgets/gimpcontainergridview.h"
|
2003-02-22 03:03:19 +08:00
|
|
|
#include "widgets/gimpcontainertreeview.h"
|
2002-03-08 08:27:45 +08:00
|
|
|
#include "widgets/gimpdataeditor.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
#include "widgets/gimpdatafactoryview.h"
|
2001-04-16 00:16:13 +08:00
|
|
|
#include "widgets/gimpdialogfactory.h"
|
2001-04-22 08:38:56 +08:00
|
|
|
#include "widgets/gimpimagedock.h"
|
2002-05-08 20:39:01 +08:00
|
|
|
#include "widgets/gimpimageview.h"
|
2002-02-26 01:58:50 +08:00
|
|
|
#include "widgets/gimpitemlistview.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
#include "widgets/gimpdockable.h"
|
2001-04-16 00:16:13 +08:00
|
|
|
#include "widgets/gimpdockbook.h"
|
2001-10-23 01:27:46 +08:00
|
|
|
#include "widgets/gimpdocumentview.h"
|
2002-03-08 08:27:45 +08:00
|
|
|
#include "widgets/gimpgradienteditor.h"
|
2002-03-11 20:58:59 +08:00
|
|
|
#include "widgets/gimplayerlistview.h"
|
2001-05-07 00:14:34 +08:00
|
|
|
#include "widgets/gimplistitem.h"
|
2002-03-08 08:27:45 +08:00
|
|
|
#include "widgets/gimppaletteeditor.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
#include "widgets/gimppreview.h"
|
2002-08-22 20:49:01 +08:00
|
|
|
#include "widgets/gimpselectioneditor.h"
|
2002-03-15 01:07:02 +08:00
|
|
|
#include "widgets/gimptoolbox.h"
|
|
|
|
#include "widgets/gimptoolbox-color-area.h"
|
2003-02-20 20:47:42 +08:00
|
|
|
#include "widgets/gimpundoeditor.h"
|
2002-02-26 22:40:30 +08:00
|
|
|
#include "widgets/gimpvectorslistview.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"
|
|
|
|
#include "display/gimpdisplayshell-filter-dialog.h"
|
2002-05-08 00:23:14 +08:00
|
|
|
#include "display/gimpnavigationview.h"
|
2002-03-15 06:42:50 +08:00
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
#include "about-dialog.h"
|
2001-04-29 23:23:01 +08:00
|
|
|
#include "channels-commands.h"
|
2001-12-08 01:39:51 +08:00
|
|
|
#include "device-status-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"
|
2001-08-07 08:06:06 +08:00
|
|
|
#include "error-console-dialog.h"
|
2003-01-11 01:55:53 +08:00
|
|
|
#include "file-commands.h"
|
2001-04-29 23:23:01 +08:00
|
|
|
#include "layers-commands.h"
|
2001-10-19 01:27:36 +08:00
|
|
|
#include "module-browser.h"
|
2001-05-12 01:02:30 +08:00
|
|
|
#include "paths-dialog.h"
|
2002-11-21 03:45:03 +08:00
|
|
|
#include "preferences-dialog.h"
|
2001-04-19 00:39:34 +08:00
|
|
|
#include "tips-dialog.h"
|
2001-05-25 09:24:12 +08:00
|
|
|
#include "tool-options-dialog.h"
|
2002-02-26 01:58:50 +08:00
|
|
|
#include "vectors-commands.h"
|
2001-04-18 00:00:27 +08:00
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
|
|
|
|
2001-07-18 04:50:01 +08:00
|
|
|
/* local function prototypes */
|
|
|
|
|
2002-03-17 01:58:19 +08:00
|
|
|
static void dialogs_indexed_palette_selected (GimpColormapEditor *editor,
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpDockable *dockable);
|
|
|
|
|
|
|
|
static GtkWidget * dialogs_brush_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size);
|
2002-02-26 01:58:50 +08:00
|
|
|
static GtkWidget * dialogs_pattern_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size);
|
2002-02-26 01:58:50 +08:00
|
|
|
static GtkWidget * dialogs_gradient_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size);
|
2002-02-26 01:58:50 +08:00
|
|
|
static GtkWidget * dialogs_palette_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size);
|
2002-02-26 01:58:50 +08:00
|
|
|
static GtkWidget * dialogs_tool_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size);
|
2002-03-10 23:05:58 +08:00
|
|
|
static GtkWidget * dialogs_tool_options_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size);
|
|
|
|
static GtkWidget * dialogs_stock_text_tab_func (GimpDockable *dockable,
|
2002-05-10 21:09:19 +08:00
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size);
|
2002-02-26 01:58:50 +08:00
|
|
|
|
2003-02-20 23:40:15 +08:00
|
|
|
static void dialogs_set_view_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context);
|
|
|
|
static void dialogs_set_editor_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context);
|
2002-11-05 08:02:56 +08:00
|
|
|
static void dialogs_set_color_editor_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context);
|
2003-02-20 23:40:15 +08:00
|
|
|
static void dialogs_set_image_item_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context);
|
|
|
|
static void dialogs_set_path_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context);
|
|
|
|
static void dialogs_set_image_editor_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context);
|
|
|
|
static void dialogs_set_navigation_context_func (GimpDockable *dockable,
|
2003-02-20 20:47:42 +08:00
|
|
|
GimpContext *context);
|
2001-04-24 00:58:18 +08:00
|
|
|
|
|
|
|
static GtkWidget * dialogs_dockable_new (GtkWidget *widget,
|
|
|
|
const gchar *name,
|
|
|
|
const gchar *short_name,
|
2002-05-10 22:50:27 +08:00
|
|
|
const gchar *stock_id,
|
2001-04-24 00:58:18 +08:00
|
|
|
GimpDockableGetTabFunc get_tab_func,
|
|
|
|
GimpDockableSetContextFunc set_context_func);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2002-08-22 20:49:01 +08:00
|
|
|
static void dialogs_image_item_view_image_changed (GimpContext *context,
|
|
|
|
GimpImage *gimage,
|
|
|
|
GimpItemListView *view);
|
|
|
|
static void dialogs_path_view_image_changed (GimpContext *context,
|
|
|
|
GimpImage *gimage,
|
|
|
|
GtkWidget *view);
|
2003-02-20 23:40:15 +08:00
|
|
|
static void dialogs_image_editor_image_changed (GimpContext *context,
|
2002-08-22 20:49:01 +08:00
|
|
|
GimpImage *gimage,
|
2003-02-20 23:40:15 +08:00
|
|
|
GimpImageEditor *editor);
|
2002-08-22 20:49:01 +08:00
|
|
|
static void dialogs_navigation_display_changed (GimpContext *context,
|
|
|
|
GimpDisplay *gdisp,
|
|
|
|
GimpNavigationView *view);
|
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
|
|
|
|
2001-04-18 00:00:27 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_device_status_get (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-18 00:00:27 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
return device_status_dialog_create (context->gimp);
|
2001-04-18 00:00:27 +08:00
|
|
|
}
|
|
|
|
|
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 *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_module_browser_get (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-19 00:39:34 +08:00
|
|
|
{
|
2001-10-29 19:47:11 +08:00
|
|
|
return module_browser_new (context->gimp);
|
2001-04-19 00:39:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_display_filters_get (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-19 00:39:34 +08:00
|
|
|
{
|
2001-10-29 19:47:11 +08:00
|
|
|
GimpDisplay *gdisp;
|
2001-04-19 00:39:34 +08:00
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
gdisp = gimp_context_get_display (context);
|
2001-04-19 00:39:34 +08:00
|
|
|
|
2002-03-15 06:42:50 +08:00
|
|
|
if (gdisp)
|
|
|
|
{
|
|
|
|
GimpDisplayShell *shell;
|
|
|
|
|
|
|
|
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
|
|
|
|
2002-03-15 23:09:58 +08:00
|
|
|
if (! shell->filters_dialog)
|
2002-03-15 06:42:50 +08:00
|
|
|
gimp_display_shell_filter_dialog_new (shell);
|
2001-04-19 00:39:34 +08:00
|
|
|
|
2002-03-15 23:09:58 +08:00
|
|
|
return shell->filters_dialog;
|
2002-03-15 06:42:50 +08:00
|
|
|
}
|
2001-04-19 00:39:34 +08:00
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
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 ();
|
|
|
|
}
|
|
|
|
|
2002-02-03 20:10:23 +08:00
|
|
|
|
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;
|
|
|
|
|
|
|
|
view = tool_options_dialog_create (context->gimp);
|
|
|
|
|
|
|
|
g_object_add_weak_pointer (G_OBJECT (view), (gpointer *) &view);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Tool Options"), _("Tool Options"), NULL,
|
2002-03-10 23:05:58 +08:00
|
|
|
dialogs_tool_options_tab_func,
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_error_console_get (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
static GtkWidget *view = NULL;
|
|
|
|
|
|
|
|
if (view)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
view = error_console_create (context->gimp);
|
|
|
|
|
|
|
|
g_object_add_weak_pointer (G_OBJECT (view), (gpointer *) &view);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-13 07:20:21 +08:00
|
|
|
_("Error Console"), _("Errors"),
|
|
|
|
GIMP_STOCK_WARNING,
|
2002-03-10 23:05:58 +08:00
|
|
|
NULL,
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***** 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,
|
|
|
|
preview_size,
|
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Image List"), _("Images"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
NULL,
|
2002-05-08 20:39:01 +08:00
|
|
|
dialogs_set_editor_context_func);
|
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,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-07-09 05:44:52 +08:00
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Brush List"), _("Brushes"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_brush_tab_func,
|
2001-06-26 20:09:43 +08:00
|
|
|
dialogs_set_editor_context_func);
|
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;
|
|
|
|
|
|
|
|
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
2001-07-05 03:31:35 +08:00
|
|
|
context->gimp->pattern_factory,
|
2001-04-14 23:21:45 +08:00
|
|
|
NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
context,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-07-09 05:44:52 +08:00
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory, "<Patterns>");
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Pattern List"), _("Patterns"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_pattern_tab_func,
|
2001-06-26 20:09:43 +08:00
|
|
|
dialogs_set_editor_context_func);
|
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,
|
2001-07-05 03:31:35 +08:00
|
|
|
context->gimp->gradient_factory,
|
2001-04-20 10:30:43 +08:00
|
|
|
dialogs_edit_gradient_func,
|
2001-04-24 00:58:18 +08:00
|
|
|
context,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-07-09 05:44:52 +08:00
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory, "<Gradients>");
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Gradient List"), _("Gradients"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_gradient_tab_func,
|
2001-06-26 20:09:43 +08:00
|
|
|
dialogs_set_editor_context_func);
|
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,
|
2001-07-05 03:31:35 +08:00
|
|
|
context->gimp->palette_factory,
|
2001-04-20 10:30:43 +08:00
|
|
|
dialogs_edit_palette_func,
|
2001-04-24 00:58:18 +08:00
|
|
|
context,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-07-09 05:44:52 +08:00
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory, "<Palettes>");
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Palette List"), _("Palettes"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_palette_tab_func,
|
2001-06-26 20:09:43 +08:00
|
|
|
dialogs_set_editor_context_func);
|
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_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;
|
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
view = gimp_container_list_view_new (context->gimp->tool_info_list,
|
2001-04-24 00:58:18 +08:00
|
|
|
context,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-10-23 01:27:46 +08:00
|
|
|
FALSE,
|
2001-04-14 23:21:45 +08:00
|
|
|
5, 3);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Tool List"), _("Tools"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_tool_tab_func,
|
|
|
|
dialogs_set_view_context_func);
|
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,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-07-09 05:44:52 +08:00
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-06-26 20:09:43 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-04-12 19:54:36 +08:00
|
|
|
_("Buffer List"), _("Buffers"),
|
2002-05-10 22:50:27 +08:00
|
|
|
GTK_STOCK_PASTE,
|
|
|
|
dialogs_stock_text_tab_func,
|
2001-06-26 20:09:43 +08:00
|
|
|
dialogs_set_editor_context_func);
|
|
|
|
}
|
|
|
|
|
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,
|
|
|
|
preview_size,
|
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Image Grid"), _("Images"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
NULL,
|
2002-05-08 20:39:01 +08:00
|
|
|
dialogs_set_editor_context_func);
|
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,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-07-09 05:44:52 +08:00
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Brush Grid"), _("Brushes"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_brush_tab_func,
|
2001-06-26 20:09:43 +08:00
|
|
|
dialogs_set_editor_context_func);
|
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;
|
|
|
|
|
|
|
|
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
2001-07-05 03:31:35 +08:00
|
|
|
context->gimp->pattern_factory,
|
2001-04-14 23:21:45 +08:00
|
|
|
NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
context,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-07-09 05:44:52 +08:00
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory, "<Patterns>");
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Pattern Grid"), _("Patterns"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_pattern_tab_func,
|
2001-06-26 20:09:43 +08:00
|
|
|
dialogs_set_editor_context_func);
|
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,
|
2001-07-05 03:31:35 +08:00
|
|
|
context->gimp->gradient_factory,
|
2001-04-20 10:30:43 +08:00
|
|
|
dialogs_edit_gradient_func,
|
2001-04-24 00:58:18 +08:00
|
|
|
context,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-07-09 05:44:52 +08:00
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory, "<Gradients>");
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Gradient Grid"), _("Gradients"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_gradient_tab_func,
|
2001-06-26 20:09:43 +08:00
|
|
|
dialogs_set_editor_context_func);
|
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,
|
2001-07-05 03:31:35 +08:00
|
|
|
context->gimp->palette_factory,
|
2001-04-20 10:30:43 +08:00
|
|
|
dialogs_edit_palette_func,
|
2001-04-24 00:58:18 +08:00
|
|
|
context,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-07-09 05:44:52 +08:00
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory, "<Gradients>");
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Palette Grid"), _("Palettes"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_palette_tab_func,
|
2001-06-26 20:09:43 +08:00
|
|
|
dialogs_set_editor_context_func);
|
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_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;
|
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
view = gimp_container_grid_view_new (context->gimp->tool_info_list,
|
2001-04-24 00:58:18 +08:00
|
|
|
context,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-10-23 01:27:46 +08:00
|
|
|
FALSE,
|
2001-04-14 23:21:45 +08:00
|
|
|
5, 3);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Tool Grid"), _("Tools"), NULL,
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_tool_tab_func,
|
|
|
|
dialogs_set_view_context_func);
|
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,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-07-09 05:44:52 +08:00
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory);
|
2001-06-26 20:09:43 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-04-12 19:54:36 +08:00
|
|
|
_("Buffer Grid"), _("Buffers"),
|
2002-05-10 22:50:27 +08:00
|
|
|
GTK_STOCK_PASTE,
|
|
|
|
dialogs_stock_text_tab_func,
|
2001-06-26 20:09:43 +08:00
|
|
|
dialogs_set_editor_context_func);
|
|
|
|
}
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2003-02-22 03:03:19 +08:00
|
|
|
/***** tree views *****/
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_image_tree_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_image_view_new (GIMP_VIEW_TYPE_TREE,
|
|
|
|
context->gimp->images,
|
|
|
|
context,
|
|
|
|
preview_size,
|
|
|
|
5, 3,
|
|
|
|
factory->menu_factory);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Image Tree"), _("Images"), NULL,
|
|
|
|
NULL,
|
|
|
|
dialogs_set_editor_context_func);
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_brush_tree_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_brush_factory_view_new (GIMP_VIEW_TYPE_TREE,
|
|
|
|
context->gimp->brush_factory,
|
|
|
|
dialogs_edit_brush_func,
|
|
|
|
context,
|
|
|
|
TRUE,
|
|
|
|
preview_size,
|
|
|
|
5, 3,
|
|
|
|
factory->menu_factory);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Brush Tree"), _("Brushes"), NULL,
|
|
|
|
dialogs_brush_tab_func,
|
|
|
|
dialogs_set_editor_context_func);
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_pattern_tree_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_TREE,
|
|
|
|
context->gimp->pattern_factory,
|
|
|
|
NULL,
|
|
|
|
context,
|
|
|
|
preview_size,
|
|
|
|
5, 3,
|
|
|
|
factory->menu_factory, "<Patterns>");
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Pattern Tree"), _("Patterns"), NULL,
|
|
|
|
dialogs_pattern_tab_func,
|
|
|
|
dialogs_set_editor_context_func);
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_gradient_tree_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_TREE,
|
|
|
|
context->gimp->gradient_factory,
|
|
|
|
dialogs_edit_gradient_func,
|
|
|
|
context,
|
|
|
|
preview_size,
|
|
|
|
5, 3,
|
|
|
|
factory->menu_factory, "<Gradients>");
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Gradient Tree"), _("Gradients"), NULL,
|
|
|
|
dialogs_gradient_tab_func,
|
|
|
|
dialogs_set_editor_context_func);
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_palette_tree_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_TREE,
|
|
|
|
context->gimp->palette_factory,
|
|
|
|
dialogs_edit_palette_func,
|
|
|
|
context,
|
|
|
|
preview_size,
|
|
|
|
5, 3,
|
|
|
|
factory->menu_factory, "<Gradients>");
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Palette Tree"), _("Palettes"), NULL,
|
|
|
|
dialogs_palette_tab_func,
|
|
|
|
dialogs_set_editor_context_func);
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_tool_tree_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_container_tree_view_new (context->gimp->tool_info_list,
|
|
|
|
context,
|
|
|
|
preview_size,
|
|
|
|
FALSE,
|
|
|
|
5, 3);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Tool Tree"), _("Tools"), NULL,
|
|
|
|
dialogs_tool_tab_func,
|
|
|
|
dialogs_set_view_context_func);
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_buffer_tree_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_buffer_view_new (GIMP_VIEW_TYPE_TREE,
|
|
|
|
context->gimp->named_buffers,
|
|
|
|
context,
|
|
|
|
preview_size,
|
|
|
|
5, 3,
|
|
|
|
factory->menu_factory);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Buffer Tree"), _("Buffers"),
|
|
|
|
GTK_STOCK_PASTE,
|
|
|
|
dialogs_stock_text_tab_func,
|
|
|
|
dialogs_set_editor_context_func);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
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
|
|
|
GimpImage *gimage;
|
|
|
|
GtkWidget *view;
|
|
|
|
GtkWidget *dockable;
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
gimage = gimp_context_get_image (context);
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
view =
|
|
|
|
gimp_item_list_view_new (preview_size,
|
|
|
|
gimage,
|
|
|
|
GIMP_TYPE_LAYER,
|
|
|
|
"active_layer_changed",
|
|
|
|
(GimpNewItemFunc) layers_new_layer_query,
|
|
|
|
(GimpEditItemFunc) layers_edit_layer_query,
|
2002-02-26 22:40:30 +08:00
|
|
|
(GimpActivateItemFunc) layers_edit_layer_query,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory, "<Layers>");
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-04-25 02:17:17 +08:00
|
|
|
dockable = dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Layer List"), _("Layers"), NULL,
|
2001-04-25 02:17:17 +08:00
|
|
|
NULL,
|
2002-02-26 01:58:50 +08:00
|
|
|
dialogs_set_image_item_context_func);
|
2001-04-25 02:17:17 +08:00
|
|
|
|
2001-08-06 00:08:19 +08:00
|
|
|
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
|
2001-04-25 02:17:17 +08:00
|
|
|
|
|
|
|
return dockable;
|
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
|
|
|
{
|
|
|
|
GimpImage *gimage;
|
|
|
|
GtkWidget *view;
|
2001-04-25 02:17:17 +08:00
|
|
|
GtkWidget *dockable;
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
gimage = gimp_context_get_image (context);
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
view =
|
|
|
|
gimp_item_list_view_new (preview_size,
|
|
|
|
gimage,
|
|
|
|
GIMP_TYPE_CHANNEL,
|
|
|
|
"active_channel_changed",
|
|
|
|
(GimpNewItemFunc) channels_new_channel_query,
|
|
|
|
(GimpEditItemFunc) channels_edit_channel_query,
|
2002-02-26 22:40:30 +08:00
|
|
|
(GimpActivateItemFunc) channels_edit_channel_query,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory, "<Channels>");
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-04-25 02:17:17 +08:00
|
|
|
dockable = dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Channel List"), _("Channels"), NULL,
|
2001-04-25 02:17:17 +08:00
|
|
|
NULL,
|
2002-02-26 01:58:50 +08:00
|
|
|
dialogs_set_image_item_context_func);
|
|
|
|
|
|
|
|
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
|
|
|
|
|
|
|
|
return dockable;
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
2002-02-26 22:40:30 +08:00
|
|
|
GimpImage *gimage;
|
|
|
|
GimpVectorsListView *vectors_view;
|
|
|
|
GtkWidget *view;
|
|
|
|
GtkWidget *dockable;
|
2002-02-26 01:58:50 +08:00
|
|
|
|
|
|
|
gimage = gimp_context_get_image (context);
|
|
|
|
|
|
|
|
view =
|
|
|
|
gimp_item_list_view_new (preview_size,
|
|
|
|
gimage,
|
|
|
|
GIMP_TYPE_VECTORS,
|
|
|
|
"active_vectors_changed",
|
|
|
|
(GimpNewItemFunc) vectors_new_vectors_query,
|
|
|
|
(GimpEditItemFunc) vectors_edit_vectors_query,
|
2002-02-26 22:40:30 +08:00
|
|
|
(GimpActivateItemFunc) vectors_vectors_tool,
|
2003-01-11 01:55:53 +08:00
|
|
|
factory->menu_factory, "<Vectors>");
|
2002-02-26 01:58:50 +08:00
|
|
|
|
2002-02-26 22:40:30 +08:00
|
|
|
vectors_view = GIMP_VECTORS_LIST_VIEW (view);
|
|
|
|
|
|
|
|
vectors_view->stroke_item_func = vectors_stroke_vectors;
|
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
dockable = dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Paths List"), _("Paths"), NULL,
|
2002-02-26 01:58:50 +08:00
|
|
|
NULL,
|
|
|
|
dialogs_set_image_item_context_func);
|
2001-04-25 02:17:17 +08:00
|
|
|
|
2001-08-06 00:08:19 +08:00
|
|
|
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
|
2001-04-25 02:17:17 +08:00
|
|
|
|
|
|
|
return dockable;
|
2001-04-20 10:30:43 +08:00
|
|
|
}
|
|
|
|
|
2001-05-12 01:02:30 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_path_list_view_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-05-12 01:02:30 +08:00
|
|
|
{
|
|
|
|
static GtkWidget *view = NULL;
|
|
|
|
|
|
|
|
GtkWidget *dockable;
|
|
|
|
|
|
|
|
if (view)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
view = paths_dialog_create ();
|
|
|
|
|
2001-08-12 23:39:23 +08:00
|
|
|
g_object_add_weak_pointer (G_OBJECT (view), (gpointer *) &view);
|
2001-05-12 01:02:30 +08:00
|
|
|
|
|
|
|
dockable = dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Old Path List"), _("Old Paths"), NULL,
|
2001-05-12 01:02:30 +08:00
|
|
|
NULL,
|
|
|
|
dialogs_set_path_context_func);
|
|
|
|
|
2001-08-06 00:08:19 +08:00
|
|
|
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
|
2001-05-12 01:02:30 +08:00
|
|
|
|
|
|
|
return dockable;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
|
|
|
GimpImage *gimage;
|
|
|
|
GtkWidget *view;
|
|
|
|
GtkWidget *dockable;
|
|
|
|
|
|
|
|
gimage = gimp_context_get_image (context);
|
|
|
|
|
2003-01-11 01:55:53 +08:00
|
|
|
view = gimp_colormap_editor_new (gimage, factory->menu_factory);
|
2001-07-15 22:32:44 +08:00
|
|
|
|
|
|
|
dockable = dialogs_dockable_new (view,
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Indexed Palette"), _("Colormap"), NULL,
|
2001-07-15 22:32:44 +08:00
|
|
|
NULL,
|
2003-02-20 23:40:15 +08:00
|
|
|
dialogs_set_image_editor_context_func);
|
2001-07-15 22:32:44 +08:00
|
|
|
|
2002-05-06 03:17:41 +08:00
|
|
|
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
|
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),
|
|
|
|
dockable);
|
2001-07-15 22:32:44 +08:00
|
|
|
|
|
|
|
return dockable;
|
|
|
|
}
|
|
|
|
|
2002-08-22 20:49:01 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_selection_editor_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GimpImage *gimage;
|
|
|
|
GtkWidget *view;
|
|
|
|
GtkWidget *dockable;
|
|
|
|
|
|
|
|
gimage = gimp_context_get_image (context);
|
|
|
|
|
|
|
|
view = gimp_selection_editor_new (gimage);
|
|
|
|
|
|
|
|
dockable = dialogs_dockable_new (view,
|
2002-08-23 03:11:41 +08:00
|
|
|
_("Selection Editor"), _("Selection"),
|
|
|
|
GIMP_STOCK_TOOL_RECT_SELECT,
|
|
|
|
dialogs_stock_text_tab_func,
|
2003-02-20 23:40:15 +08:00
|
|
|
dialogs_set_image_editor_context_func);
|
2002-08-22 20:49:01 +08:00
|
|
|
|
|
|
|
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
|
|
|
|
|
|
|
|
return dockable;
|
|
|
|
}
|
|
|
|
|
2003-02-20 20:47:42 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_undo_history_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GimpImage *gimage;
|
|
|
|
GtkWidget *view;
|
|
|
|
GtkWidget *dockable;
|
|
|
|
|
|
|
|
gimage = gimp_context_get_image (context);
|
|
|
|
|
|
|
|
view = gimp_undo_editor_new (gimage);
|
|
|
|
|
|
|
|
dockable = dialogs_dockable_new (view,
|
|
|
|
_("Undo History"), _("Undo"),
|
|
|
|
GTK_STOCK_UNDO,
|
|
|
|
dialogs_stock_text_tab_func,
|
2003-02-20 23:40:15 +08:00
|
|
|
dialogs_set_image_editor_context_func);
|
2003-02-20 20:47:42 +08:00
|
|
|
|
|
|
|
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
|
|
|
|
|
|
|
|
return dockable;
|
|
|
|
}
|
|
|
|
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2002-03-10 23:05:58 +08:00
|
|
|
/***** misc dockables *****/
|
|
|
|
|
2002-11-05 08:02:56 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_color_editor_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
view = gimp_color_editor_new (context);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Color Editor"), _("Color"),
|
|
|
|
GTK_STOCK_SELECT_COLOR,
|
|
|
|
dialogs_stock_text_tab_func,
|
|
|
|
dialogs_set_color_editor_context_func);
|
|
|
|
}
|
|
|
|
|
2002-03-10 23:05:58 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_document_history_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,
|
|
|
|
5, 3,
|
2003-01-11 01:55:53 +08:00
|
|
|
file_file_open_dialog,
|
|
|
|
factory->menu_factory);
|
2002-03-10 23:05:58 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
2002-04-12 19:54:36 +08:00
|
|
|
_("Document History"), _("History"),
|
2002-05-10 22:50:27 +08:00
|
|
|
GTK_STOCK_OPEN,
|
|
|
|
dialogs_stock_text_tab_func,
|
2002-03-10 23:05:58 +08:00
|
|
|
dialogs_set_editor_context_func);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***** 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),
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Brush Editor"), _("Brush Editor"), NULL,
|
2002-03-08 08:27:45 +08:00
|
|
|
NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_edit_brush_func (GimpData *data)
|
|
|
|
{
|
|
|
|
gimp_dialog_factory_dialog_raise (global_dock_factory,
|
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),
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Gradient Editor"), _("Gradient Editor"), NULL,
|
2002-03-08 08:27:45 +08:00
|
|
|
NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_edit_gradient_func (GimpData *data)
|
|
|
|
{
|
|
|
|
gimp_dialog_factory_dialog_raise (global_dock_factory,
|
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),
|
2002-05-10 22:50:27 +08:00
|
|
|
_("Palette Editor"), _("Palette Editor"), NULL,
|
2002-03-08 08:27:45 +08:00
|
|
|
NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_edit_palette_func (GimpData *data)
|
|
|
|
{
|
|
|
|
gimp_dialog_factory_dialog_raise (global_dock_factory,
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-08 00:23:14 +08:00
|
|
|
/* display views */
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_navigation_view_new (GimpDialogFactory *factory,
|
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
|
|
|
{
|
|
|
|
GimpDisplay *gdisp;
|
|
|
|
GimpDisplayShell *shell = NULL;
|
|
|
|
GtkWidget *view;
|
|
|
|
|
|
|
|
gdisp = gimp_context_get_display (context);
|
|
|
|
|
|
|
|
if (gdisp)
|
|
|
|
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
|
|
|
|
|
|
|
view = gimp_navigation_view_new (shell);
|
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
_("Display Navigation"), _("Navigation"),
|
2002-05-13 07:20:21 +08:00
|
|
|
GIMP_STOCK_NAVIGATION,
|
2002-05-10 22:50:27 +08:00
|
|
|
dialogs_stock_text_tab_func,
|
2002-05-08 00:23:14 +08:00
|
|
|
dialogs_set_navigation_context_func);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
/* private functions */
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
static void
|
2002-03-17 01:58:19 +08:00
|
|
|
dialogs_indexed_palette_selected (GimpColormapEditor *editor,
|
2001-07-15 22:32:44 +08:00
|
|
|
GimpDockable *dockable)
|
2001-04-19 00:39:34 +08:00
|
|
|
{
|
2001-07-15 22:32:44 +08:00
|
|
|
GimpContext *context;
|
|
|
|
|
2002-03-17 01:58:19 +08:00
|
|
|
context = (GimpContext *) g_object_get_data (G_OBJECT (editor),
|
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
|
|
|
"gimp-dialogs-context");
|
2001-07-15 22:32:44 +08:00
|
|
|
|
|
|
|
if (context)
|
|
|
|
{
|
2003-02-20 23:40:15 +08:00
|
|
|
GimpImage *gimage;
|
|
|
|
GimpRGB color;
|
|
|
|
gint index;
|
2001-07-15 22:32:44 +08:00
|
|
|
|
2003-02-20 23:40:15 +08:00
|
|
|
gimage = GIMP_IMAGE_EDITOR (editor)->gimage;
|
2002-03-17 01:58:19 +08:00
|
|
|
index = gimp_colormap_editor_col_index (editor);
|
2001-07-15 22:32:44 +08:00
|
|
|
|
|
|
|
gimp_rgba_set_uchar (&color,
|
|
|
|
gimage->cmap[index * 3],
|
|
|
|
gimage->cmap[index * 3 + 1],
|
|
|
|
gimage->cmap[index * 3 + 2],
|
|
|
|
255);
|
|
|
|
|
|
|
|
if (active_color == FOREGROUND)
|
|
|
|
gimp_context_set_foreground (context, &color);
|
|
|
|
else if (active_color == BACKGROUND)
|
|
|
|
gimp_context_set_background (context, &color);
|
|
|
|
}
|
2001-04-19 00:39:34 +08:00
|
|
|
}
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
static GtkWidget *
|
|
|
|
dialogs_brush_tab_func (GimpDockable *dockable,
|
2001-04-16 00:16:13 +08:00
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GimpContext *context;
|
|
|
|
GtkWidget *preview;
|
2002-05-10 22:50:27 +08:00
|
|
|
gint width;
|
|
|
|
gint height;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
context = dockbook->dock->context;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2002-05-10 22:50:27 +08:00
|
|
|
gtk_icon_size_lookup (size, &width, &height);
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
preview =
|
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_brush (context)),
|
2002-05-10 22:50:27 +08:00
|
|
|
width, height, 1,
|
2001-04-14 23:21:45 +08:00
|
|
|
FALSE, FALSE, FALSE);
|
|
|
|
|
2003-01-06 06:07:10 +08:00
|
|
|
g_signal_connect_object (context, "brush_changed",
|
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 (gimp_preview_set_viewable),
|
2003-01-06 06:07:10 +08:00
|
|
|
preview,
|
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_CONNECT_SWAPPED);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return preview;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
dialogs_pattern_tab_func (GimpDockable *dockable,
|
2001-04-16 00:16:13 +08:00
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GimpContext *context;
|
|
|
|
GtkWidget *preview;
|
2002-05-10 22:50:27 +08:00
|
|
|
gint width;
|
|
|
|
gint height;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
context = dockbook->dock->context;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2002-05-10 22:50:27 +08:00
|
|
|
gtk_icon_size_lookup (size, &width, &height);
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
preview =
|
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_pattern (context)),
|
2002-05-10 22:50:27 +08:00
|
|
|
width, height, 1,
|
2001-04-14 23:21:45 +08:00
|
|
|
FALSE, FALSE, FALSE);
|
|
|
|
|
2003-01-06 06:07:10 +08:00
|
|
|
g_signal_connect_object (context, "pattern_changed",
|
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 (gimp_preview_set_viewable),
|
2003-01-06 06:07:10 +08:00
|
|
|
preview,
|
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_CONNECT_SWAPPED);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return preview;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
dialogs_gradient_tab_func (GimpDockable *dockable,
|
2001-04-16 00:16:13 +08:00
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GimpContext *context;
|
|
|
|
GtkWidget *preview;
|
2002-05-10 22:50:27 +08:00
|
|
|
gint width;
|
|
|
|
gint height;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
context = dockbook->dock->context;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2002-05-10 22:50:27 +08:00
|
|
|
gtk_icon_size_lookup (size, &width, &height);
|
|
|
|
|
|
|
|
preview =
|
2001-04-14 23:21:45 +08:00
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_gradient (context)),
|
2002-05-10 22:50:27 +08:00
|
|
|
width, height, 1,
|
2001-04-14 23:21:45 +08:00
|
|
|
FALSE, FALSE, FALSE);
|
|
|
|
|
2003-01-06 06:07:10 +08:00
|
|
|
g_signal_connect_object (context, "gradient_changed",
|
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 (gimp_preview_set_viewable),
|
2003-01-06 06:07:10 +08:00
|
|
|
preview,
|
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_CONNECT_SWAPPED);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return preview;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
dialogs_palette_tab_func (GimpDockable *dockable,
|
2001-04-16 00:16:13 +08:00
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GimpContext *context;
|
|
|
|
GtkWidget *preview;
|
2002-05-10 22:50:27 +08:00
|
|
|
gint width;
|
|
|
|
gint height;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
context = dockbook->dock->context;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2002-05-10 22:50:27 +08:00
|
|
|
gtk_icon_size_lookup (size, &width, &height);
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
preview =
|
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_palette (context)),
|
2002-05-10 22:50:27 +08:00
|
|
|
width, height, 1,
|
2001-04-14 23:21:45 +08:00
|
|
|
FALSE, FALSE, FALSE);
|
|
|
|
|
2003-01-06 06:07:10 +08:00
|
|
|
g_signal_connect_object (context, "palette_changed",
|
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 (gimp_preview_set_viewable),
|
2003-01-06 06:07:10 +08:00
|
|
|
preview,
|
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_CONNECT_SWAPPED);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return preview;
|
|
|
|
}
|
|
|
|
|
2002-10-16 03:07:06 +08:00
|
|
|
static void
|
|
|
|
dialogs_tool_tab_tool_changed (GimpContext *context,
|
|
|
|
GimpToolInfo *tool_info,
|
|
|
|
GtkImage *image)
|
|
|
|
{
|
|
|
|
gtk_image_set_from_stock (image, tool_info->stock_id, image->icon_size);
|
|
|
|
}
|
|
|
|
|
2001-04-20 10:30:43 +08:00
|
|
|
static GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_tool_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size)
|
2001-04-24 00:58:18 +08:00
|
|
|
{
|
|
|
|
GimpContext *context;
|
2002-10-16 03:07:06 +08:00
|
|
|
GtkWidget *image;
|
2001-04-24 00:58:18 +08:00
|
|
|
|
|
|
|
context = dockbook->dock->context;
|
|
|
|
|
2002-10-16 03:07:06 +08:00
|
|
|
image = gtk_image_new_from_stock (gimp_context_get_tool (context)->stock_id,
|
|
|
|
size);
|
2001-04-24 00:58:18 +08:00
|
|
|
|
2003-01-06 06:07:10 +08:00
|
|
|
g_signal_connect_object (context, "tool_changed",
|
2002-10-16 03:07:06 +08:00
|
|
|
G_CALLBACK (dialogs_tool_tab_tool_changed),
|
2003-01-06 06:07:10 +08:00
|
|
|
image,
|
2002-10-16 03:07:06 +08:00
|
|
|
0);
|
2001-04-24 00:58:18 +08:00
|
|
|
|
2002-10-16 03:07:06 +08:00
|
|
|
return image;
|
2001-04-24 00:58:18 +08:00
|
|
|
}
|
|
|
|
|
2002-03-10 23:05:58 +08:00
|
|
|
static void
|
|
|
|
dialogs_tool_options_tool_changed (GimpContext *context,
|
|
|
|
GimpToolInfo *tool_info,
|
|
|
|
GtkLabel *label)
|
|
|
|
{
|
2002-10-16 03:07:06 +08:00
|
|
|
GtkImage *image;
|
|
|
|
|
2002-10-17 22:31:24 +08:00
|
|
|
if ((image = g_object_get_data (G_OBJECT (label), "tool-icon")))
|
2002-10-16 03:07:06 +08:00
|
|
|
gtk_image_set_from_stock (image, tool_info->stock_id, image->icon_size);
|
2002-03-10 23:05:58 +08:00
|
|
|
|
2002-11-01 03:40:32 +08:00
|
|
|
gtk_label_set_text (label, tool_info->blurb);
|
2002-03-10 23:05:58 +08:00
|
|
|
|
|
|
|
gimp_help_set_help_data (GTK_WIDGET (label)->parent->parent,
|
|
|
|
tool_info->help,
|
|
|
|
tool_info->help_data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
dialogs_tool_options_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size)
|
2002-03-10 23:05:58 +08:00
|
|
|
{
|
|
|
|
GimpContext *context;
|
|
|
|
GimpToolInfo *tool_info;
|
|
|
|
GtkWidget *hbox;
|
2002-10-16 03:07:06 +08:00
|
|
|
GtkWidget *image;
|
2002-03-10 23:05:58 +08:00
|
|
|
GtkWidget *label;
|
2002-05-10 22:50:27 +08:00
|
|
|
gint width;
|
|
|
|
gint height;
|
2002-03-10 23:05:58 +08:00
|
|
|
|
|
|
|
context = dockbook->dock->context;
|
|
|
|
|
2002-05-10 22:50:27 +08:00
|
|
|
gtk_icon_size_lookup (size, &width, &height);
|
|
|
|
|
2002-03-10 23:05:58 +08:00
|
|
|
tool_info = gimp_context_get_tool (context);
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 2);
|
|
|
|
|
2002-10-16 03:07:06 +08:00
|
|
|
image = gtk_image_new_from_stock (gimp_context_get_tool (context)->stock_id,
|
|
|
|
size);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (image);
|
2002-03-10 23:05:58 +08:00
|
|
|
|
2002-11-01 03:40:32 +08:00
|
|
|
label = gtk_label_new (tool_info->blurb);
|
2002-03-10 23:05:58 +08:00
|
|
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
2002-10-16 03:07:06 +08:00
|
|
|
g_object_set_data (G_OBJECT (label), "tool-icon", image);
|
|
|
|
|
2003-01-06 06:07:10 +08:00
|
|
|
g_signal_connect_object (context, "tool_changed",
|
2002-03-10 23:05:58 +08:00
|
|
|
G_CALLBACK (dialogs_tool_options_tool_changed),
|
2003-01-06 06:07:10 +08:00
|
|
|
label,
|
2002-03-10 23:05:58 +08:00
|
|
|
0);
|
|
|
|
|
|
|
|
return hbox;
|
|
|
|
}
|
|
|
|
|
2002-05-10 21:09:19 +08:00
|
|
|
static GtkWidget *
|
2002-05-10 22:50:27 +08:00
|
|
|
dialogs_stock_text_tab_func (GimpDockable *dockable,
|
2002-05-10 21:09:19 +08:00
|
|
|
GimpDockbook *dockbook,
|
2002-05-10 22:50:27 +08:00
|
|
|
GtkIconSize size)
|
2002-05-10 21:09:19 +08:00
|
|
|
{
|
|
|
|
GimpContext *context;
|
|
|
|
GtkWidget *hbox;
|
|
|
|
GtkWidget *image;
|
|
|
|
GtkWidget *label;
|
|
|
|
|
|
|
|
context = dockbook->dock->context;
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 2);
|
|
|
|
|
2002-05-10 22:50:27 +08:00
|
|
|
image = gtk_image_new_from_stock (dockable->stock_id, size);
|
2002-05-10 21:09:19 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (image);
|
|
|
|
|
|
|
|
label = gtk_label_new (dockable->short_name);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
|
|
|
return hbox;
|
|
|
|
}
|
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
static void
|
|
|
|
dialogs_set_view_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context)
|
|
|
|
{
|
|
|
|
GimpContainerView *view;
|
|
|
|
|
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
|
|
|
view = (GimpContainerView *) g_object_get_data (G_OBJECT (dockable),
|
|
|
|
"gimp-dialogs-view");
|
2001-04-24 00:58:18 +08:00
|
|
|
|
|
|
|
if (view)
|
|
|
|
gimp_container_view_set_context (view, context);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2001-06-26 20:09:43 +08:00
|
|
|
dialogs_set_editor_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context)
|
2001-04-24 00:58:18 +08:00
|
|
|
{
|
2001-06-26 20:09:43 +08:00
|
|
|
GimpContainerEditor *editor;
|
2001-04-24 00:58:18 +08:00
|
|
|
|
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
|
|
|
editor = (GimpContainerEditor *) g_object_get_data (G_OBJECT (dockable),
|
|
|
|
"gimp-dialogs-view");
|
|
|
|
|
2001-06-26 20:09:43 +08:00
|
|
|
if (editor)
|
2001-06-30 03:25:03 +08:00
|
|
|
gimp_container_view_set_context (editor->view, context);
|
2001-04-24 00:58:18 +08:00
|
|
|
}
|
|
|
|
|
2002-11-05 08:02:56 +08:00
|
|
|
static void
|
|
|
|
dialogs_set_color_editor_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context)
|
|
|
|
{
|
|
|
|
GimpColorEditor *editor;
|
|
|
|
|
|
|
|
editor = (GimpColorEditor *) g_object_get_data (G_OBJECT (dockable),
|
|
|
|
"gimp-dialogs-view");
|
|
|
|
|
|
|
|
if (editor)
|
|
|
|
gimp_color_editor_set_context (editor, context);
|
|
|
|
}
|
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
dialogs_set_image_item_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context)
|
2001-04-24 00:58:18 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
GimpItemListView *view;
|
2001-04-24 00:58:18 +08:00
|
|
|
|
2002-02-26 01:58:50 +08:00
|
|
|
view = (GimpItemListView *) g_object_get_data (G_OBJECT (dockable),
|
|
|
|
"gimp-dialogs-view");
|
2001-04-24 00:58:18 +08:00
|
|
|
|
2003-02-20 23:40:15 +08:00
|
|
|
if (! view)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (dockable->context)
|
|
|
|
{
|
|
|
|
g_signal_handlers_disconnect_by_func (dockable->context,
|
|
|
|
dialogs_image_item_view_image_changed,
|
|
|
|
view);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (context)
|
|
|
|
{
|
|
|
|
g_signal_connect (context, "image_changed",
|
|
|
|
G_CALLBACK (dialogs_image_item_view_image_changed),
|
|
|
|
view);
|
|
|
|
|
|
|
|
dialogs_image_item_view_image_changed (context,
|
|
|
|
gimp_context_get_image (context),
|
|
|
|
view);
|
|
|
|
}
|
|
|
|
else
|
2001-04-24 00:58:18 +08:00
|
|
|
{
|
2003-02-20 23:40:15 +08:00
|
|
|
dialogs_image_item_view_image_changed (NULL, NULL, view);
|
2001-04-24 00:58:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-05-12 01:02:30 +08:00
|
|
|
static void
|
|
|
|
dialogs_set_path_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context)
|
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
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
|
|
|
view = (GtkWidget *) g_object_get_data (G_OBJECT (dockable),
|
|
|
|
"gimp-dialogs-view");
|
2001-05-12 01:02:30 +08:00
|
|
|
|
2003-02-20 23:40:15 +08:00
|
|
|
if (! view)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (dockable->context)
|
2001-05-12 01:02:30 +08:00
|
|
|
{
|
2003-02-20 23:40:15 +08:00
|
|
|
g_signal_handlers_disconnect_by_func (dockable->context,
|
|
|
|
dialogs_path_view_image_changed,
|
|
|
|
view);
|
2001-05-12 01:02:30 +08:00
|
|
|
}
|
|
|
|
|
2003-02-20 23:40:15 +08:00
|
|
|
if (context)
|
|
|
|
{
|
|
|
|
g_signal_connect (context, "image_changed",
|
|
|
|
G_CALLBACK (dialogs_path_view_image_changed),
|
|
|
|
view);
|
2001-07-15 22:32:44 +08:00
|
|
|
|
2003-02-20 23:40:15 +08:00
|
|
|
dialogs_path_view_image_changed (context,
|
|
|
|
gimp_context_get_image (context),
|
|
|
|
view);
|
|
|
|
}
|
|
|
|
else
|
2001-07-15 22:32:44 +08:00
|
|
|
{
|
2003-02-20 23:40:15 +08:00
|
|
|
dialogs_path_view_image_changed (NULL, NULL, view);
|
2001-07-15 22:32:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-08-22 20:49:01 +08:00
|
|
|
static void
|
2003-02-20 23:40:15 +08:00
|
|
|
dialogs_set_image_editor_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context)
|
2002-08-22 20:49:01 +08:00
|
|
|
{
|
2003-02-20 23:40:15 +08:00
|
|
|
GimpImageEditor *view;
|
2002-08-22 20:49:01 +08:00
|
|
|
|
2003-02-20 23:40:15 +08:00
|
|
|
view = (GimpImageEditor *) g_object_get_data (G_OBJECT (dockable),
|
|
|
|
"gimp-dialogs-view");
|
2002-08-22 20:49:01 +08:00
|
|
|
|
2003-02-20 23:40:15 +08:00
|
|
|
if (! view)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (dockable->context)
|
2002-08-22 20:49:01 +08:00
|
|
|
{
|
2003-02-20 23:40:15 +08:00
|
|
|
g_signal_handlers_disconnect_by_func (dockable->context,
|
|
|
|
dialogs_image_editor_image_changed,
|
|
|
|
view);
|
2002-08-22 20:49:01 +08:00
|
|
|
}
|
|
|
|
|
2003-02-20 23:40:15 +08:00
|
|
|
if (context)
|
|
|
|
{
|
|
|
|
g_signal_connect (context, "image_changed",
|
|
|
|
G_CALLBACK (dialogs_image_editor_image_changed),
|
|
|
|
view);
|
2003-02-20 20:47:42 +08:00
|
|
|
|
2003-02-20 23:40:15 +08:00
|
|
|
dialogs_image_editor_image_changed (context,
|
|
|
|
gimp_context_get_image (context),
|
|
|
|
view);
|
|
|
|
}
|
|
|
|
else
|
2003-02-20 20:47:42 +08:00
|
|
|
{
|
2003-02-20 23:40:15 +08:00
|
|
|
dialogs_image_editor_image_changed (NULL, NULL, view);
|
2003-02-20 20:47:42 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-05-08 00:23:14 +08:00
|
|
|
static void
|
|
|
|
dialogs_set_navigation_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context)
|
|
|
|
{
|
|
|
|
GimpNavigationView *view;
|
|
|
|
|
|
|
|
view = (GimpNavigationView *) g_object_get_data (G_OBJECT (dockable),
|
|
|
|
"gimp-dialogs-view");
|
|
|
|
|
2003-02-20 23:40:15 +08:00
|
|
|
if (! view)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (dockable->context)
|
2002-05-08 00:23:14 +08:00
|
|
|
{
|
2003-02-20 23:40:15 +08:00
|
|
|
g_signal_handlers_disconnect_by_func (dockable->context,
|
|
|
|
dialogs_navigation_display_changed,
|
|
|
|
view);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (context)
|
|
|
|
{
|
|
|
|
g_signal_connect (context, "display_changed",
|
|
|
|
G_CALLBACK (dialogs_navigation_display_changed),
|
|
|
|
view);
|
|
|
|
|
|
|
|
dialogs_navigation_display_changed (context,
|
|
|
|
gimp_context_get_display (context),
|
|
|
|
view);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
dialogs_navigation_display_changed (NULL, NULL, view);
|
2002-05-08 00:23:14 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
static GtkWidget *
|
|
|
|
dialogs_dockable_new (GtkWidget *widget,
|
|
|
|
const gchar *name,
|
|
|
|
const gchar *short_name,
|
2002-05-10 22:50:27 +08:00
|
|
|
const gchar *stock_id,
|
2001-04-24 00:58:18 +08:00
|
|
|
GimpDockableGetTabFunc get_tab_func,
|
|
|
|
GimpDockableSetContextFunc set_context_func)
|
2001-04-14 23:21:45 +08:00
|
|
|
{
|
|
|
|
GtkWidget *dockable;
|
|
|
|
|
|
|
|
dockable = gimp_dockable_new (name,
|
|
|
|
short_name,
|
2002-05-10 22:50:27 +08:00
|
|
|
stock_id,
|
2001-04-24 00:58:18 +08:00
|
|
|
get_tab_func,
|
|
|
|
set_context_func);
|
2001-04-14 23:21:45 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (dockable), widget);
|
|
|
|
gtk_widget_show (widget);
|
|
|
|
|
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_object_set_data (G_OBJECT (dockable), "gimp-dialogs-view", widget);
|
2001-04-24 00:58:18 +08:00
|
|
|
|
2001-04-17 02:49:29 +08:00
|
|
|
return dockable;
|
2001-04-14 23:21:45 +08:00
|
|
|
}
|
2001-04-20 10:30:43 +08:00
|
|
|
|
|
|
|
static void
|
2002-02-26 01:58:50 +08:00
|
|
|
dialogs_image_item_view_image_changed (GimpContext *context,
|
|
|
|
GimpImage *gimage,
|
|
|
|
GimpItemListView *view)
|
2001-04-20 10:30:43 +08:00
|
|
|
{
|
2002-02-26 01:58:50 +08:00
|
|
|
gimp_item_list_view_set_image (view, gimage);
|
2001-04-20 10:30:43 +08:00
|
|
|
}
|
2001-05-07 00:14:34 +08:00
|
|
|
|
2001-05-12 01:02:30 +08:00
|
|
|
static void
|
|
|
|
dialogs_path_view_image_changed (GimpContext *context,
|
|
|
|
GimpImage *gimage,
|
|
|
|
GtkWidget *widget)
|
|
|
|
{
|
|
|
|
paths_dialog_update (gimage);
|
|
|
|
}
|
2001-07-15 22:32:44 +08:00
|
|
|
|
|
|
|
static void
|
2003-02-20 23:40:15 +08:00
|
|
|
dialogs_image_editor_image_changed (GimpContext *context,
|
|
|
|
GimpImage *gimage,
|
|
|
|
GimpImageEditor *editor)
|
2003-02-20 20:47:42 +08:00
|
|
|
{
|
2003-02-20 23:40:15 +08:00
|
|
|
gimp_image_editor_set_image (editor, gimage);
|
2003-02-20 20:47:42 +08:00
|
|
|
}
|
|
|
|
|
2002-05-08 00:23:14 +08:00
|
|
|
static void
|
|
|
|
dialogs_navigation_display_changed (GimpContext *context,
|
|
|
|
GimpDisplay *gdisp,
|
|
|
|
GimpNavigationView *view)
|
|
|
|
{
|
|
|
|
GimpDisplayShell *shell = NULL;
|
|
|
|
|
|
|
|
if (gdisp)
|
|
|
|
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
|
|
|
|
|
|
|
gimp_navigation_view_set_shell (view, shell);
|
|
|
|
}
|