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/gimpbrushgenerated.h"
|
|
|
|
#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
|
|
|
|
2001-06-30 03:25:03 +08:00
|
|
|
#include "widgets/gimpbrushfactoryview.h"
|
2001-06-26 20:09:43 +08:00
|
|
|
#include "widgets/gimpbufferview.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
#include "widgets/gimpcontainerlistview.h"
|
|
|
|
#include "widgets/gimpcontainergridview.h"
|
|
|
|
#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-01-26 02:34:33 +08:00
|
|
|
#include "widgets/gimpitemfactory.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"
|
2001-04-20 10:30:43 +08:00
|
|
|
#include "widgets/gimpdrawablelistview.h"
|
2001-05-07 00:14:34 +08:00
|
|
|
#include "widgets/gimplistitem.h"
|
2001-04-14 23:21:45 +08:00
|
|
|
#include "widgets/gimppreview.h"
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
#include "about-dialog.h"
|
2001-04-20 10:30:43 +08:00
|
|
|
#include "brush-editor.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "brush-select.h"
|
2001-07-09 05:44:52 +08:00
|
|
|
#include "brushes-commands.h"
|
2001-10-24 19:23:50 +08:00
|
|
|
#include "buffers-commands.h"
|
2001-04-29 23:23:01 +08:00
|
|
|
#include "channels-commands.h"
|
2001-04-19 00:39:34 +08:00
|
|
|
#include "color-area.h"
|
|
|
|
#include "colormap-dialog.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-10-24 19:23:50 +08:00
|
|
|
#include "documents-commands.h"
|
2001-08-07 08:06:06 +08:00
|
|
|
#include "error-console-dialog.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "gradient-editor.h"
|
|
|
|
#include "gradient-select.h"
|
2001-07-09 05:44:52 +08:00
|
|
|
#include "gradients-commands.h"
|
2001-12-08 01:39:51 +08:00
|
|
|
#include "input-dialog.h"
|
2001-04-29 23:23:01 +08:00
|
|
|
#include "layers-commands.h"
|
2001-07-09 05:44:52 +08:00
|
|
|
#include "menus.h"
|
2001-10-19 01:27:36 +08:00
|
|
|
#include "module-browser.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "palette-editor.h"
|
2001-07-10 01:58:56 +08:00
|
|
|
#include "palette-select.h"
|
2001-07-09 05:44:52 +08:00
|
|
|
#include "palettes-commands.h"
|
2001-05-12 01:02:30 +08:00
|
|
|
#include "paths-dialog.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "pattern-select.h"
|
2001-07-09 05:44:52 +08:00
|
|
|
#include "patterns-commands.h"
|
2001-04-19 00:39:34 +08:00
|
|
|
#include "preferences-dialog.h"
|
|
|
|
#include "tips-dialog.h"
|
2001-05-25 09:24:12 +08:00
|
|
|
#include "tool-options-dialog.h"
|
2001-04-18 00:00:27 +08:00
|
|
|
#include "toolbox.h"
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
#include "gimprc.h"
|
2001-04-19 00:39:34 +08:00
|
|
|
#include "undo_history.h"
|
|
|
|
|
|
|
|
#ifdef DISPLAY_FILTERS
|
|
|
|
#include "gdisplay_color_ui.h"
|
|
|
|
#endif /* DISPLAY_FILTERS */
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
|
|
|
|
2001-07-18 04:50:01 +08:00
|
|
|
/* FIXME: do something about this uglyness:
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GtkWidget *shell;
|
|
|
|
} EEKWrapper;
|
|
|
|
|
|
|
|
|
|
|
|
/* local function prototypes */
|
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
static void dialogs_indexed_palette_selected (GimpColormapDialog *dialog,
|
2001-07-15 22:32:44 +08:00
|
|
|
GimpDockable *dockable);
|
2001-04-24 00:58:18 +08:00
|
|
|
|
|
|
|
static GtkWidget * dialogs_brush_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
|
|
|
gint size);
|
|
|
|
static GtkWidget * dialogs_pattern_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
|
|
|
gint size);
|
|
|
|
static GtkWidget * dialogs_gradient_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
|
|
|
gint size);
|
|
|
|
static GtkWidget * dialogs_palette_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
|
|
|
gint size);
|
|
|
|
static GtkWidget * dialogs_tool_tab_func (GimpDockable *dockable,
|
|
|
|
GimpDockbook *dockbook,
|
|
|
|
gint size);
|
|
|
|
|
|
|
|
static void dialogs_set_view_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context);
|
2001-06-26 20:09:43 +08:00
|
|
|
static void dialogs_set_editor_context_func (GimpDockable *dockable,
|
2001-04-24 00:58:18 +08:00
|
|
|
GimpContext *context);
|
|
|
|
static void dialogs_set_drawable_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context);
|
2001-05-12 01:02:30 +08:00
|
|
|
static void dialogs_set_path_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context);
|
2001-07-15 22:32:44 +08:00
|
|
|
static void dialogs_set_indexed_palette_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context);
|
2001-04-24 00:58:18 +08:00
|
|
|
|
|
|
|
static GtkWidget * dialogs_dockable_new (GtkWidget *widget,
|
|
|
|
const gchar *name,
|
|
|
|
const gchar *short_name,
|
|
|
|
GimpDockableGetTabFunc get_tab_func,
|
|
|
|
GimpDockableSetContextFunc set_context_func);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-04-20 10:30:43 +08:00
|
|
|
static void dialogs_drawable_view_image_changed (GimpContext *context,
|
|
|
|
GimpImage *gimage,
|
|
|
|
GimpDrawableListView *view);
|
2001-05-12 01:02:30 +08:00
|
|
|
static void dialogs_path_view_image_changed (GimpContext *context,
|
|
|
|
GimpImage *gimage,
|
|
|
|
GtkWidget *view);
|
2001-07-15 22:32:44 +08:00
|
|
|
static void dialogs_indexed_palette_image_changed (GimpContext *context,
|
|
|
|
GimpImage *gimage,
|
|
|
|
GimpColormapDialog *ipal);
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-07-18 04:50:01 +08:00
|
|
|
/* private variables */
|
|
|
|
|
|
|
|
static BrushEditor *brush_editor_dialog = NULL;
|
|
|
|
static GradientEditor *gradient_editor_dialog = NULL;
|
|
|
|
static PaletteEditor *palette_editor_dialog = NULL;
|
|
|
|
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
/* public functions */
|
|
|
|
|
2001-04-18 00:00:27 +08:00
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_toolbox_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-10-25 21:30:01 +08:00
|
|
|
return toolbox_create (context->gimp);
|
2001-04-18 00:00:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_tool_options_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-10-29 19:47:11 +08:00
|
|
|
return tool_options_dialog_create (context->gimp);
|
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
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_brush_select_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-10-25 21:30:01 +08:00
|
|
|
return brush_dialog_create (context->gimp);
|
2001-04-18 00:00:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_pattern_select_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-10-25 21:30:01 +08:00
|
|
|
return pattern_dialog_create (context->gimp);
|
2001-04-18 00:00:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
2001-04-24 00:58:18 +08:00
|
|
|
dialogs_gradient_select_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-10-25 21:30:01 +08:00
|
|
|
return gradient_dialog_create (context->gimp);
|
2001-04-18 00:00:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
2001-07-10 01:58:56 +08:00
|
|
|
dialogs_palette_select_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-10-25 21:30:01 +08:00
|
|
|
return palette_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
|
|
|
{
|
2001-10-29 19:47:11 +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_input_devices_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-12-02 05:02:34 +08:00
|
|
|
return input_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_undo_history_get (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-04-19 00:39:34 +08:00
|
|
|
{
|
|
|
|
GimpImage *gimage;
|
2001-08-12 03:53:35 +08:00
|
|
|
GtkWidget *undo_history;
|
2001-04-19 00:39:34 +08:00
|
|
|
|
2001-08-17 22:27:31 +08:00
|
|
|
gimage = gimp_context_get_image (context);
|
2001-04-19 00:39:34 +08:00
|
|
|
|
2001-08-17 22:27:31 +08:00
|
|
|
if (! gimage)
|
2001-04-19 00:39:34 +08:00
|
|
|
return NULL;
|
|
|
|
|
2001-08-12 03:53:35 +08:00
|
|
|
undo_history = g_object_get_data (G_OBJECT (gimage), "undo-history");
|
2001-04-19 00:39:34 +08:00
|
|
|
|
2001-08-12 03:53:35 +08:00
|
|
|
if (! undo_history)
|
|
|
|
{
|
|
|
|
undo_history = undo_history_new (gimage);
|
|
|
|
|
|
|
|
g_object_set_data (G_OBJECT (gimage), "undo-history", undo_history);
|
|
|
|
}
|
|
|
|
|
|
|
|
return undo_history;
|
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
|
|
|
{
|
|
|
|
#ifdef DISPLAY_FILTERS
|
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
|
|
|
|
|
|
|
if (! gdisp)
|
|
|
|
gdisp = color_area_gdisp;
|
|
|
|
|
|
|
|
if (! gdisp->cd_ui)
|
|
|
|
gdisplay_color_ui_new (gdisp);
|
|
|
|
|
|
|
|
return gdisp->cd_ui;
|
|
|
|
#else
|
|
|
|
return NULL;
|
|
|
|
#endif /* DISPLAY_FILTERS */
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
{
|
|
|
|
return tips_dialog_create ();
|
|
|
|
}
|
|
|
|
|
|
|
|
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 ();
|
|
|
|
}
|
|
|
|
|
2001-07-15 22:32:44 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_brush_editor_get (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-07-15 22:32:44 +08:00
|
|
|
{
|
2001-07-18 04:50:01 +08:00
|
|
|
if (! brush_editor_dialog)
|
|
|
|
{
|
|
|
|
brush_editor_dialog = brush_editor_new (context->gimp);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ((EEKWrapper *) brush_editor_dialog)->shell;
|
2001-07-15 22:32:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-07-15 22:32:44 +08:00
|
|
|
{
|
2001-07-18 04:50:01 +08:00
|
|
|
if (! gradient_editor_dialog)
|
|
|
|
{
|
|
|
|
gradient_editor_dialog = gradient_editor_new (context->gimp);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ((EEKWrapper *) gradient_editor_dialog)->shell;
|
2001-07-15 22:32:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
dialogs_palette_editor_get (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-07-15 22:32:44 +08:00
|
|
|
{
|
2001-07-18 04:50:01 +08:00
|
|
|
if (! palette_editor_dialog)
|
|
|
|
{
|
|
|
|
palette_editor_dialog = palette_editor_new (context->gimp);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ((EEKWrapper *) palette_editor_dialog)->shell;
|
2001-07-15 22:32:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* docks */
|
2001-04-18 00:00:27 +08:00
|
|
|
|
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
|
|
|
{
|
2001-07-05 03:31:35 +08:00
|
|
|
return gimp_image_dock_new (factory, context->gimp->images);
|
2001-04-22 08:38:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-04-29 23:23:01 +08:00
|
|
|
/* list views */
|
|
|
|
|
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;
|
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
view = gimp_container_list_view_new (context->gimp->images,
|
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,
|
|
|
|
"Image List", "Images",
|
2001-04-24 00:58:18 +08:00
|
|
|
NULL,
|
|
|
|
dialogs_set_view_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,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Brushes>"));
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
"Brush List", "Brushes",
|
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,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Patterns>"));
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
"Pattern List", "Patterns",
|
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,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Gradients>"));
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
"Gradient List", "Gradients",
|
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,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Palettes>"));
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
"Palette List", "Palettes",
|
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,
|
|
|
|
"Tool List", "Tools",
|
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,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Buffers>"));
|
2001-06-26 20:09:43 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
"Buffer List", "Buffers",
|
|
|
|
NULL,
|
|
|
|
dialogs_set_editor_context_func);
|
|
|
|
}
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-04-16 00:16:13 +08:00
|
|
|
/* grid views */
|
|
|
|
|
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;
|
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
view = gimp_container_grid_view_new (context->gimp->images,
|
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,
|
|
|
|
"Image Grid", "Images",
|
2001-04-24 00:58:18 +08:00
|
|
|
NULL,
|
|
|
|
dialogs_set_view_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,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Brushes>"));
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
"Brush Grid", "Brushes",
|
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,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Patterns>"));
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
"Pattern Grid", "Patterns",
|
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,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Gradients>"));
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
"Gradient Grid", "Gradients",
|
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,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Gradients>"));
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
"Palette Grid", "Palettes",
|
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,
|
|
|
|
"Tool Grid", "Tools",
|
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,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Buffers>"));
|
2001-06-26 20:09:43 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
"Buffer Grid", "Buffers",
|
|
|
|
NULL,
|
|
|
|
dialogs_set_editor_context_func);
|
|
|
|
}
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
|
2001-04-20 10:30:43 +08:00
|
|
|
/* image related dialogs */
|
|
|
|
|
|
|
|
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
|
|
|
{
|
|
|
|
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
|
|
|
|
|
|
|
view = gimp_drawable_list_view_new
|
2001-11-24 00:25:01 +08:00
|
|
|
(preview_size,
|
2001-07-07 20:17:23 +08:00
|
|
|
gimage,
|
2001-04-20 10:30:43 +08:00
|
|
|
GIMP_TYPE_LAYER,
|
|
|
|
"active_layer_changed",
|
|
|
|
(GimpGetContainerFunc) gimp_image_get_layers,
|
|
|
|
(GimpGetDrawableFunc) gimp_image_get_active_layer,
|
|
|
|
(GimpSetDrawableFunc) gimp_image_set_active_layer,
|
|
|
|
(GimpReorderDrawableFunc) gimp_image_position_layer,
|
|
|
|
(GimpAddDrawableFunc) gimp_image_add_layer,
|
|
|
|
(GimpRemoveDrawableFunc) gimp_image_remove_layer,
|
2001-04-29 23:23:01 +08:00
|
|
|
(GimpCopyDrawableFunc) gimp_layer_copy,
|
2001-12-13 07:48:18 +08:00
|
|
|
(GimpConvertDrawableFunc) gimp_layer_new_from_drawable,
|
2001-04-29 23:23:01 +08:00
|
|
|
(GimpNewDrawableFunc) layers_new_layer_query,
|
|
|
|
(GimpEditDrawableFunc) layers_edit_layer_query,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Layers>"));
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-04-25 02:17:17 +08:00
|
|
|
dockable = dialogs_dockable_new (view,
|
|
|
|
"Layer List", "Layers",
|
|
|
|
NULL,
|
|
|
|
dialogs_set_drawable_context_func);
|
|
|
|
|
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
|
|
|
|
|
|
|
view = gimp_drawable_list_view_new
|
2001-11-24 00:25:01 +08:00
|
|
|
(preview_size,
|
2001-07-07 20:17:23 +08:00
|
|
|
gimage,
|
2001-04-20 10:30:43 +08:00
|
|
|
GIMP_TYPE_CHANNEL,
|
|
|
|
"active_channel_changed",
|
|
|
|
(GimpGetContainerFunc) gimp_image_get_channels,
|
|
|
|
(GimpGetDrawableFunc) gimp_image_get_active_channel,
|
|
|
|
(GimpSetDrawableFunc) gimp_image_set_active_channel,
|
|
|
|
(GimpReorderDrawableFunc) gimp_image_position_channel,
|
|
|
|
(GimpAddDrawableFunc) gimp_image_add_channel,
|
|
|
|
(GimpRemoveDrawableFunc) gimp_image_remove_channel,
|
2001-04-29 23:23:01 +08:00
|
|
|
(GimpCopyDrawableFunc) gimp_channel_copy,
|
2001-12-13 07:48:18 +08:00
|
|
|
(GimpConvertDrawableFunc) NULL,
|
2001-04-29 23:23:01 +08:00
|
|
|
(GimpNewDrawableFunc) channels_new_channel_query,
|
|
|
|
(GimpEditDrawableFunc) channels_edit_channel_query,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Channels>"));
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-04-25 02:17:17 +08:00
|
|
|
dockable = dialogs_dockable_new (view,
|
|
|
|
"Channel List", "Channels",
|
|
|
|
NULL,
|
|
|
|
dialogs_set_drawable_context_func);
|
|
|
|
|
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,
|
|
|
|
"Path List", "Paths",
|
|
|
|
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);
|
|
|
|
|
|
|
|
view = gimp_colormap_dialog_new (gimage);
|
|
|
|
|
|
|
|
dockable = dialogs_dockable_new (view,
|
|
|
|
"Indexed Palette", "Colormap",
|
|
|
|
NULL,
|
|
|
|
dialogs_set_indexed_palette_context_func);
|
|
|
|
|
|
|
|
dialogs_set_indexed_palette_context_func (GIMP_DOCKABLE (dockable), context);
|
|
|
|
|
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_signal_connect (G_OBJECT (view), "selected",
|
|
|
|
G_CALLBACK (dialogs_indexed_palette_selected),
|
|
|
|
dockable);
|
2001-07-15 22:32:44 +08:00
|
|
|
|
|
|
|
return dockable;
|
|
|
|
}
|
|
|
|
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-08-07 08:06:06 +08:00
|
|
|
/* misc dockables */
|
|
|
|
|
2001-08-11 15:47:35 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_document_history_new (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-08-11 15:47:35 +08:00
|
|
|
{
|
|
|
|
GtkWidget *view;
|
|
|
|
|
2001-10-23 01:27:46 +08:00
|
|
|
view = gimp_document_view_new (GIMP_VIEW_TYPE_LIST,
|
|
|
|
context->gimp->documents,
|
|
|
|
context,
|
2001-11-24 00:25:01 +08:00
|
|
|
preview_size,
|
2001-10-23 01:27:46 +08:00
|
|
|
5, 3,
|
2002-01-26 02:34:33 +08:00
|
|
|
gimp_item_factory_from_path ("<Documents>"));
|
2001-08-11 15:47:35 +08:00
|
|
|
|
|
|
|
return dialogs_dockable_new (view,
|
|
|
|
"Document History", "History",
|
|
|
|
NULL,
|
2001-10-23 01:27:46 +08:00
|
|
|
dialogs_set_editor_context_func);
|
2001-08-11 15:47:35 +08:00
|
|
|
}
|
|
|
|
|
2001-08-07 08:06:06 +08:00
|
|
|
GtkWidget *
|
|
|
|
dialogs_error_console_get (GimpDialogFactory *factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
GimpContext *context,
|
|
|
|
gint preview_size)
|
2001-08-07 08:06:06 +08:00
|
|
|
{
|
|
|
|
static GtkWidget *view = NULL;
|
|
|
|
|
|
|
|
GtkWidget *dockable;
|
|
|
|
|
|
|
|
if (view)
|
|
|
|
return NULL;
|
|
|
|
|
2001-12-02 05:02:34 +08:00
|
|
|
view = error_console_create (context->gimp);
|
2001-08-07 08:06:06 +08:00
|
|
|
|
2001-08-12 23:39:23 +08:00
|
|
|
g_object_add_weak_pointer (G_OBJECT (view), (gpointer *) &view);
|
2001-08-07 08:06:06 +08:00
|
|
|
|
|
|
|
dockable = dialogs_dockable_new (view,
|
|
|
|
"Error Console", "Errors",
|
|
|
|
NULL,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
return dockable;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-04-20 10:30:43 +08:00
|
|
|
/* editor dialogs */
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_edit_brush_func (GimpData *data)
|
|
|
|
{
|
|
|
|
GimpBrush *brush;
|
|
|
|
|
|
|
|
brush = GIMP_BRUSH (data);
|
|
|
|
|
|
|
|
if (GIMP_IS_BRUSH_GENERATED (brush))
|
|
|
|
{
|
2001-07-31 01:17:36 +08:00
|
|
|
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
"gimp:brush-editor",
|
|
|
|
-1);
|
2001-04-20 10:30:43 +08:00
|
|
|
|
2001-05-01 21:16:59 +08:00
|
|
|
brush_editor_set_brush (brush_editor_dialog, brush);
|
2001-04-20 10:30:43 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-11-27 01:12:29 +08:00
|
|
|
g_message (_("This brush cannot be edited."));
|
2001-04-20 10:30:43 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_edit_gradient_func (GimpData *data)
|
|
|
|
{
|
|
|
|
GimpGradient *gradient;
|
|
|
|
|
|
|
|
gradient = GIMP_GRADIENT (data);
|
|
|
|
|
2001-07-31 01:17:36 +08:00
|
|
|
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
"gimp:gradient-editor",
|
|
|
|
-1);
|
2001-04-20 10:30:43 +08:00
|
|
|
|
|
|
|
gradient_editor_set_gradient (gradient_editor_dialog, gradient);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_edit_palette_func (GimpData *data)
|
|
|
|
{
|
2001-07-10 01:58:56 +08:00
|
|
|
GimpPalette *palette;
|
|
|
|
|
|
|
|
palette = GIMP_PALETTE (data);
|
|
|
|
|
2001-07-31 01:17:36 +08:00
|
|
|
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
2001-11-24 00:25:01 +08:00
|
|
|
"gimp:palette-editor",
|
|
|
|
-1);
|
2001-07-10 01:58:56 +08:00
|
|
|
|
|
|
|
palette_editor_set_palette (palette_editor_dialog, palette);
|
2001-04-20 10:30:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-04-14 23:21:45 +08:00
|
|
|
/* private functions */
|
|
|
|
|
2001-04-19 00:39:34 +08:00
|
|
|
static void
|
|
|
|
dialogs_indexed_palette_selected (GimpColormapDialog *dialog,
|
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;
|
|
|
|
|
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
|
|
|
context = (GimpContext *) g_object_get_data (G_OBJECT (dialog),
|
|
|
|
"gimp-dialogs-context");
|
2001-07-15 22:32:44 +08:00
|
|
|
|
|
|
|
if (context)
|
|
|
|
{
|
|
|
|
GimpImage *gimage;
|
|
|
|
GimpRGB color;
|
|
|
|
gint index;
|
|
|
|
|
|
|
|
gimage = gimp_colormap_dialog_get_image (dialog);
|
|
|
|
index = gimp_colormap_dialog_col_index (dialog);
|
|
|
|
|
|
|
|
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,
|
2001-04-14 23:21:45 +08:00
|
|
|
gint size)
|
|
|
|
{
|
|
|
|
GimpContext *context;
|
|
|
|
GtkWidget *preview;
|
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
context = dockbook->dock->context;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
preview =
|
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_brush (context)),
|
|
|
|
size, size, 1,
|
|
|
|
FALSE, FALSE, FALSE);
|
|
|
|
|
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_signal_connect_object (G_OBJECT (context), "brush_changed",
|
|
|
|
G_CALLBACK (gimp_preview_set_viewable),
|
|
|
|
G_OBJECT (preview),
|
|
|
|
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,
|
2001-04-14 23:21:45 +08:00
|
|
|
gint size)
|
|
|
|
{
|
|
|
|
GimpContext *context;
|
|
|
|
GtkWidget *preview;
|
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
context = dockbook->dock->context;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
preview =
|
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_pattern (context)),
|
|
|
|
size, size, 1,
|
|
|
|
FALSE, FALSE, FALSE);
|
|
|
|
|
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_signal_connect_object (G_OBJECT (context), "pattern_changed",
|
|
|
|
G_CALLBACK (gimp_preview_set_viewable),
|
|
|
|
G_OBJECT (preview),
|
|
|
|
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,
|
2001-04-14 23:21:45 +08:00
|
|
|
gint size)
|
|
|
|
{
|
|
|
|
GimpContext *context;
|
|
|
|
GtkWidget *preview;
|
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
context = dockbook->dock->context;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
preview =
|
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_gradient (context)),
|
|
|
|
size, size, 1,
|
|
|
|
FALSE, FALSE, FALSE);
|
|
|
|
|
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_signal_connect_object (G_OBJECT (context), "gradient_changed",
|
|
|
|
G_CALLBACK (gimp_preview_set_viewable),
|
|
|
|
G_OBJECT (preview),
|
|
|
|
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,
|
2001-04-14 23:21:45 +08:00
|
|
|
gint size)
|
|
|
|
{
|
|
|
|
GimpContext *context;
|
|
|
|
GtkWidget *preview;
|
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
context = dockbook->dock->context;
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
preview =
|
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_palette (context)),
|
|
|
|
size, size, 1,
|
|
|
|
FALSE, FALSE, FALSE);
|
|
|
|
|
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_signal_connect_object (G_OBJECT (context), "palette_changed",
|
|
|
|
G_CALLBACK (gimp_preview_set_viewable),
|
|
|
|
G_OBJECT (preview),
|
|
|
|
G_CONNECT_SWAPPED);
|
2001-04-14 23:21:45 +08:00
|
|
|
|
|
|
|
return preview;
|
|
|
|
}
|
|
|
|
|
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,
|
|
|
|
gint size)
|
|
|
|
{
|
|
|
|
GimpContext *context;
|
|
|
|
GtkWidget *preview;
|
|
|
|
|
|
|
|
context = dockbook->dock->context;
|
|
|
|
|
|
|
|
preview =
|
|
|
|
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_tool (context)),
|
|
|
|
size, size, 1,
|
|
|
|
FALSE, FALSE, FALSE);
|
|
|
|
|
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_signal_connect_object (G_OBJECT (context), "tool_changed",
|
|
|
|
G_CALLBACK (gimp_preview_set_viewable),
|
|
|
|
G_OBJECT (preview),
|
|
|
|
G_CONNECT_SWAPPED);
|
2001-04-24 00:58:18 +08:00
|
|
|
|
|
|
|
return preview;
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
dialogs_set_drawable_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context)
|
|
|
|
{
|
|
|
|
GimpDrawableListView *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 = (GimpDrawableListView *) g_object_get_data (G_OBJECT (dockable),
|
|
|
|
"gimp-dialogs-view");
|
2001-04-24 00:58:18 +08:00
|
|
|
|
|
|
|
if (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
|
|
|
if (dockable->context)
|
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
|
|
|
g_signal_handlers_disconnect_by_func (G_OBJECT (dockable->context),
|
|
|
|
dialogs_drawable_view_image_changed,
|
|
|
|
view);
|
2001-04-24 00:58:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (context)
|
|
|
|
{
|
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_signal_connect (G_OBJECT (context), "image_changed",
|
|
|
|
G_CALLBACK (dialogs_drawable_view_image_changed),
|
|
|
|
view);
|
2001-04-24 00:58:18 +08:00
|
|
|
|
2001-05-07 00:14:34 +08:00
|
|
|
dialogs_drawable_view_image_changed (context,
|
|
|
|
gimp_context_get_image (context),
|
|
|
|
view);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
dialogs_drawable_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
|
|
|
|
|
|
|
if (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
|
|
|
if (dockable->context)
|
2001-05-12 01:02:30 +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
|
|
|
g_signal_handlers_disconnect_by_func (G_OBJECT (dockable->context),
|
|
|
|
dialogs_path_view_image_changed,
|
|
|
|
view);
|
2001-05-12 01:02:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (context)
|
|
|
|
{
|
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_signal_connect (G_OBJECT (context), "image_changed",
|
|
|
|
G_CALLBACK (dialogs_path_view_image_changed),
|
|
|
|
view);
|
2001-05-12 01:02:30 +08:00
|
|
|
|
|
|
|
dialogs_path_view_image_changed (context,
|
|
|
|
gimp_context_get_image (context),
|
|
|
|
view);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
dialogs_path_view_image_changed (NULL, NULL, view);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-07-15 22:32:44 +08:00
|
|
|
static void
|
|
|
|
dialogs_set_indexed_palette_context_func (GimpDockable *dockable,
|
|
|
|
GimpContext *context)
|
|
|
|
{
|
|
|
|
GimpColormapDialog *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 = (GimpColormapDialog *) g_object_get_data (G_OBJECT (dockable),
|
|
|
|
"gimp-dialogs-view");
|
2001-07-15 22:32:44 +08:00
|
|
|
|
|
|
|
if (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
|
|
|
if (dockable->context)
|
2001-07-15 22:32:44 +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
|
|
|
g_signal_handlers_disconnect_by_func (G_OBJECT (dockable->context),
|
|
|
|
dialogs_indexed_palette_image_changed,
|
|
|
|
view);
|
2001-07-15 22:32:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (context)
|
|
|
|
{
|
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_signal_connect (G_OBJECT (context), "image_changed",
|
|
|
|
G_CALLBACK (dialogs_indexed_palette_image_changed),
|
|
|
|
view);
|
2001-07-15 22:32:44 +08:00
|
|
|
|
|
|
|
dialogs_indexed_palette_image_changed (context,
|
|
|
|
gimp_context_get_image (context),
|
|
|
|
view);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
dialogs_indexed_palette_image_changed (NULL, NULL, view);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-04-24 00:58:18 +08:00
|
|
|
static GtkWidget *
|
|
|
|
dialogs_dockable_new (GtkWidget *widget,
|
|
|
|
const gchar *name,
|
|
|
|
const gchar *short_name,
|
|
|
|
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,
|
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
|
|
|
|
dialogs_drawable_view_image_changed (GimpContext *context,
|
|
|
|
GimpImage *gimage,
|
|
|
|
GimpDrawableListView *view)
|
|
|
|
{
|
|
|
|
gimp_drawable_list_view_set_image (view, gimage);
|
|
|
|
}
|
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
|
|
|
|
dialogs_indexed_palette_image_changed (GimpContext *context,
|
|
|
|
GimpImage *gimage,
|
|
|
|
GimpColormapDialog *ipal)
|
|
|
|
{
|
|
|
|
gimp_colormap_dialog_set_image (ipal, gimage);
|
|
|
|
}
|