mirror of https://github.com/GNOME/gimp.git
set the message handler for all app log domains, not only for "Gimp".
2001-04-20 Michael Natterer <mitch@gimp.org> * app/main.c: set the message handler for all app log domains, not only for "Gimp". * app/gui/brush-select.c * app/gui/gradient-select.c * app/gui/palette-select.c: removed the "edit" callbacks. * app/gui/dialogs-constructors.[ch]: Added the callbacks here. Added layer and channel lists. * app/gui/dialogs.c: register the new lists. * app/gui/menus.c: their menu entries. * app/widgets/gimpdock.c: set a minimal width of 280 pixels.
This commit is contained in:
parent
2301e7e1d9
commit
4aab2ac339
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2001-04-20 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/main.c: set the message handler for all app log domains, not
|
||||
only for "Gimp".
|
||||
|
||||
* app/gui/brush-select.c
|
||||
* app/gui/gradient-select.c
|
||||
* app/gui/palette-select.c: removed the "edit" callbacks.
|
||||
|
||||
* app/gui/dialogs-constructors.[ch]: Added the callbacks
|
||||
here. Added layer and channel lists.
|
||||
|
||||
* app/gui/dialogs.c: register the new lists.
|
||||
* app/gui/menus.c: their menu entries.
|
||||
|
||||
* app/widgets/gimpdock.c: set a minimal width of 280 pixels.
|
||||
|
||||
2001-04-19 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/Makefile.am
|
||||
|
|
|
@ -35,9 +35,11 @@
|
|||
#include "widgets/gimpdock.h"
|
||||
#include "widgets/gimpdockable.h"
|
||||
#include "widgets/gimpdockbook.h"
|
||||
#include "widgets/gimpdrawablelistview.h"
|
||||
#include "widgets/gimppreview.h"
|
||||
|
||||
#include "about-dialog.h"
|
||||
#include "brush-editor.h"
|
||||
#include "brush-select.h"
|
||||
#include "color-area.h"
|
||||
#include "colormap-dialog.h"
|
||||
|
@ -57,10 +59,15 @@
|
|||
|
||||
#include "context_manager.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimpbrush.h"
|
||||
#include "gimpbrushgenerated.h"
|
||||
#include "gimpchannel.h"
|
||||
#include "gimpcontainer.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpdatafactory.h"
|
||||
#include "gimpgradient.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimprc.h"
|
||||
#include "module_db.h"
|
||||
#include "undo_history.h"
|
||||
|
@ -93,6 +100,10 @@ static GtkWidget * dialogs_dockable_new (GtkWidget *widget,
|
|||
const gchar *short_name,
|
||||
GimpDockableGetTabFunc get_tab_func);
|
||||
|
||||
static void dialogs_drawable_view_image_changed (GimpContext *context,
|
||||
GimpImage *gimage,
|
||||
GimpDrawableListView *view);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
|
@ -266,7 +277,7 @@ dialogs_brush_list_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
global_brush_factory,
|
||||
NULL,
|
||||
dialogs_edit_brush_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -300,7 +311,7 @@ dialogs_gradient_list_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
global_gradient_factory,
|
||||
NULL,
|
||||
dialogs_edit_gradient_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -317,7 +328,7 @@ dialogs_palette_list_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
global_palette_factory,
|
||||
NULL,
|
||||
dialogs_edit_palette_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -367,7 +378,7 @@ dialogs_brush_grid_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
global_brush_factory,
|
||||
NULL,
|
||||
dialogs_edit_brush_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -401,7 +412,7 @@ dialogs_gradient_grid_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
global_gradient_factory,
|
||||
NULL,
|
||||
dialogs_edit_gradient_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -418,7 +429,7 @@ dialogs_palette_grid_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
global_palette_factory,
|
||||
NULL,
|
||||
dialogs_edit_palette_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -444,6 +455,121 @@ dialogs_tool_grid_view_new (GimpDialogFactory *factory)
|
|||
}
|
||||
|
||||
|
||||
/* image related dialogs */
|
||||
|
||||
GtkWidget *
|
||||
dialogs_layer_list_view_new (GimpDialogFactory *factory)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GtkWidget *view;
|
||||
|
||||
gimage = gimp_context_get_image (factory->context);
|
||||
|
||||
view = gimp_drawable_list_view_new
|
||||
(gimage,
|
||||
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,
|
||||
(GimpCopyDrawableFunc) gimp_layer_copy);
|
||||
|
||||
gtk_signal_connect_while_alive
|
||||
(GTK_OBJECT (factory->context), "image_changed",
|
||||
GTK_SIGNAL_FUNC (dialogs_drawable_view_image_changed),
|
||||
view,
|
||||
GTK_OBJECT (view));
|
||||
|
||||
return dialogs_dockable_new (view,
|
||||
"Layer List", "Layers",
|
||||
NULL);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_channel_list_view_new (GimpDialogFactory *factory)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GtkWidget *view;
|
||||
|
||||
gimage = gimp_context_get_image (factory->context);
|
||||
|
||||
view = gimp_drawable_list_view_new
|
||||
(gimage,
|
||||
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,
|
||||
(GimpCopyDrawableFunc) gimp_channel_copy);
|
||||
|
||||
gtk_signal_connect_while_alive
|
||||
(GTK_OBJECT (factory->context), "image_changed",
|
||||
GTK_SIGNAL_FUNC (dialogs_drawable_view_image_changed),
|
||||
view,
|
||||
GTK_OBJECT (view));
|
||||
|
||||
return dialogs_dockable_new (view,
|
||||
"Channel List", "Channels",
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
/* editor dialogs */
|
||||
|
||||
void
|
||||
dialogs_edit_brush_func (GimpData *data)
|
||||
{
|
||||
static BrushEditGeneratedWindow *brush_editor_dialog = NULL;
|
||||
|
||||
GimpBrush *brush;
|
||||
|
||||
brush = GIMP_BRUSH (data);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush))
|
||||
{
|
||||
if (! brush_editor_dialog)
|
||||
{
|
||||
brush_editor_dialog = brush_edit_generated_new ();
|
||||
}
|
||||
|
||||
brush_edit_generated_set_brush (brush_editor_dialog, brush);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message (_("Sorry, this brush can't be edited."));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dialogs_edit_gradient_func (GimpData *data)
|
||||
{
|
||||
static GradientEditor *gradient_editor_dialog = NULL;
|
||||
|
||||
GimpGradient *gradient;
|
||||
|
||||
gradient = GIMP_GRADIENT (data);
|
||||
|
||||
if (! gradient_editor_dialog)
|
||||
{
|
||||
gradient_editor_dialog = gradient_editor_new ();
|
||||
}
|
||||
|
||||
gradient_editor_set_gradient (gradient_editor_dialog, gradient);
|
||||
}
|
||||
|
||||
void
|
||||
dialogs_edit_palette_func (GimpData *data)
|
||||
{
|
||||
palette_dialog_edit_palette (data);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
|
@ -565,7 +691,7 @@ dialogs_palette_tab_func (GimpDockable *dockable,
|
|||
return preview;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
static GtkWidget *
|
||||
dialogs_dockable_new (GtkWidget *widget,
|
||||
const gchar *name,
|
||||
const gchar *short_name,
|
||||
|
@ -582,3 +708,12 @@ dialogs_dockable_new (GtkWidget *widget,
|
|||
|
||||
return dockable;
|
||||
}
|
||||
|
||||
static void
|
||||
dialogs_drawable_view_image_changed (GimpContext *context,
|
||||
GimpImage *gimage,
|
||||
GimpDrawableListView *view)
|
||||
{
|
||||
gimp_drawable_list_view_set_image (view, gimage);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,5 +53,12 @@ GtkWidget * dialogs_gradient_grid_view_new (GimpDialogFactory *factory);
|
|||
GtkWidget * dialogs_palette_grid_view_new (GimpDialogFactory *factory);
|
||||
GtkWidget * dialogs_tool_grid_view_new (GimpDialogFactory *factory);
|
||||
|
||||
GtkWidget * dialogs_layer_list_view_new (GimpDialogFactory *factory);
|
||||
GtkWidget * dialogs_channel_list_view_new (GimpDialogFactory *factory);
|
||||
|
||||
void dialogs_edit_brush_func (GimpData *data);
|
||||
void dialogs_edit_gradient_func (GimpData *data);
|
||||
void dialogs_edit_palette_func (GimpData *data);
|
||||
|
||||
|
||||
#endif /* __DIALOGS_CONSTRUCTORS_H__ */
|
||||
|
|
|
@ -73,7 +73,11 @@ static const GimpDialogFactoryEntry dock_entries[] =
|
|||
{ "gimp:pattern-grid", dialogs_pattern_grid_view_new, FALSE, FALSE },
|
||||
{ "gimp:gradient-grid", dialogs_gradient_grid_view_new, FALSE, FALSE },
|
||||
{ "gimp:palette-grid", dialogs_palette_grid_view_new, FALSE, FALSE },
|
||||
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE }
|
||||
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE },
|
||||
|
||||
/* these will go to image_dock_entries */
|
||||
{ "gimp:layer-list", dialogs_layer_list_view_new, FALSE, FALSE },
|
||||
{ "gimp:channel-list", dialogs_channel_list_view_new, FALSE, FALSE }
|
||||
};
|
||||
static const gint n_dock_entries = (sizeof (dock_entries) /
|
||||
sizeof (dock_entries[0]));
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
#include "widgets/gimpdatafactoryview.h"
|
||||
|
||||
#include "brush-editor.h"
|
||||
#include "brush-select.h"
|
||||
#include "dialogs-constructors.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "context_manager.h"
|
||||
|
@ -81,7 +81,6 @@ static void spacing_scale_update (GtkAdjustment *adj,
|
|||
|
||||
static void brush_select_close_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void brush_select_edit_brush (GimpData *data);
|
||||
|
||||
|
||||
/* list of active dialogs */
|
||||
|
@ -91,10 +90,6 @@ GSList *brush_active_dialogs = NULL;
|
|||
BrushSelect *brush_select_dialog = NULL;
|
||||
|
||||
|
||||
/* the main brush editor dialog */
|
||||
static BrushEditGeneratedWindow *brush_edit_generated_dialog = NULL;
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
GtkWidget *
|
||||
|
@ -219,7 +214,7 @@ brush_select_new (gchar *title,
|
|||
/* The Brush Grid */
|
||||
bsp->view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
global_brush_factory,
|
||||
brush_select_edit_brush,
|
||||
dialogs_edit_brush_func,
|
||||
bsp->context,
|
||||
MIN_CELL_SIZE,
|
||||
STD_BRUSH_COLUMNS,
|
||||
|
@ -602,25 +597,3 @@ brush_select_close_callback (GtkWidget *widget,
|
|||
brush_select_free (bsp);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
brush_select_edit_brush (GimpData *data)
|
||||
{
|
||||
GimpBrush *brush;
|
||||
|
||||
brush = GIMP_BRUSH (data);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush))
|
||||
{
|
||||
if (! brush_edit_generated_dialog)
|
||||
{
|
||||
brush_edit_generated_dialog = brush_edit_generated_new ();
|
||||
}
|
||||
|
||||
brush_edit_generated_set_brush (brush_edit_generated_dialog, brush);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message (_("Sorry, this brush can't be edited."));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,9 +35,11 @@
|
|||
#include "widgets/gimpdock.h"
|
||||
#include "widgets/gimpdockable.h"
|
||||
#include "widgets/gimpdockbook.h"
|
||||
#include "widgets/gimpdrawablelistview.h"
|
||||
#include "widgets/gimppreview.h"
|
||||
|
||||
#include "about-dialog.h"
|
||||
#include "brush-editor.h"
|
||||
#include "brush-select.h"
|
||||
#include "color-area.h"
|
||||
#include "colormap-dialog.h"
|
||||
|
@ -57,10 +59,15 @@
|
|||
|
||||
#include "context_manager.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimpbrush.h"
|
||||
#include "gimpbrushgenerated.h"
|
||||
#include "gimpchannel.h"
|
||||
#include "gimpcontainer.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpdatafactory.h"
|
||||
#include "gimpgradient.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimprc.h"
|
||||
#include "module_db.h"
|
||||
#include "undo_history.h"
|
||||
|
@ -93,6 +100,10 @@ static GtkWidget * dialogs_dockable_new (GtkWidget *widget,
|
|||
const gchar *short_name,
|
||||
GimpDockableGetTabFunc get_tab_func);
|
||||
|
||||
static void dialogs_drawable_view_image_changed (GimpContext *context,
|
||||
GimpImage *gimage,
|
||||
GimpDrawableListView *view);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
|
@ -266,7 +277,7 @@ dialogs_brush_list_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
global_brush_factory,
|
||||
NULL,
|
||||
dialogs_edit_brush_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -300,7 +311,7 @@ dialogs_gradient_list_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
global_gradient_factory,
|
||||
NULL,
|
||||
dialogs_edit_gradient_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -317,7 +328,7 @@ dialogs_palette_list_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
global_palette_factory,
|
||||
NULL,
|
||||
dialogs_edit_palette_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -367,7 +378,7 @@ dialogs_brush_grid_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
global_brush_factory,
|
||||
NULL,
|
||||
dialogs_edit_brush_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -401,7 +412,7 @@ dialogs_gradient_grid_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
global_gradient_factory,
|
||||
NULL,
|
||||
dialogs_edit_gradient_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -418,7 +429,7 @@ dialogs_palette_grid_view_new (GimpDialogFactory *factory)
|
|||
|
||||
view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
global_palette_factory,
|
||||
NULL,
|
||||
dialogs_edit_palette_func,
|
||||
factory->context,
|
||||
32,
|
||||
5, 3);
|
||||
|
@ -444,6 +455,121 @@ dialogs_tool_grid_view_new (GimpDialogFactory *factory)
|
|||
}
|
||||
|
||||
|
||||
/* image related dialogs */
|
||||
|
||||
GtkWidget *
|
||||
dialogs_layer_list_view_new (GimpDialogFactory *factory)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GtkWidget *view;
|
||||
|
||||
gimage = gimp_context_get_image (factory->context);
|
||||
|
||||
view = gimp_drawable_list_view_new
|
||||
(gimage,
|
||||
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,
|
||||
(GimpCopyDrawableFunc) gimp_layer_copy);
|
||||
|
||||
gtk_signal_connect_while_alive
|
||||
(GTK_OBJECT (factory->context), "image_changed",
|
||||
GTK_SIGNAL_FUNC (dialogs_drawable_view_image_changed),
|
||||
view,
|
||||
GTK_OBJECT (view));
|
||||
|
||||
return dialogs_dockable_new (view,
|
||||
"Layer List", "Layers",
|
||||
NULL);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_channel_list_view_new (GimpDialogFactory *factory)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GtkWidget *view;
|
||||
|
||||
gimage = gimp_context_get_image (factory->context);
|
||||
|
||||
view = gimp_drawable_list_view_new
|
||||
(gimage,
|
||||
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,
|
||||
(GimpCopyDrawableFunc) gimp_channel_copy);
|
||||
|
||||
gtk_signal_connect_while_alive
|
||||
(GTK_OBJECT (factory->context), "image_changed",
|
||||
GTK_SIGNAL_FUNC (dialogs_drawable_view_image_changed),
|
||||
view,
|
||||
GTK_OBJECT (view));
|
||||
|
||||
return dialogs_dockable_new (view,
|
||||
"Channel List", "Channels",
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
/* editor dialogs */
|
||||
|
||||
void
|
||||
dialogs_edit_brush_func (GimpData *data)
|
||||
{
|
||||
static BrushEditGeneratedWindow *brush_editor_dialog = NULL;
|
||||
|
||||
GimpBrush *brush;
|
||||
|
||||
brush = GIMP_BRUSH (data);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush))
|
||||
{
|
||||
if (! brush_editor_dialog)
|
||||
{
|
||||
brush_editor_dialog = brush_edit_generated_new ();
|
||||
}
|
||||
|
||||
brush_edit_generated_set_brush (brush_editor_dialog, brush);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_message (_("Sorry, this brush can't be edited."));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dialogs_edit_gradient_func (GimpData *data)
|
||||
{
|
||||
static GradientEditor *gradient_editor_dialog = NULL;
|
||||
|
||||
GimpGradient *gradient;
|
||||
|
||||
gradient = GIMP_GRADIENT (data);
|
||||
|
||||
if (! gradient_editor_dialog)
|
||||
{
|
||||
gradient_editor_dialog = gradient_editor_new ();
|
||||
}
|
||||
|
||||
gradient_editor_set_gradient (gradient_editor_dialog, gradient);
|
||||
}
|
||||
|
||||
void
|
||||
dialogs_edit_palette_func (GimpData *data)
|
||||
{
|
||||
palette_dialog_edit_palette (data);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
|
@ -565,7 +691,7 @@ dialogs_palette_tab_func (GimpDockable *dockable,
|
|||
return preview;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
static GtkWidget *
|
||||
dialogs_dockable_new (GtkWidget *widget,
|
||||
const gchar *name,
|
||||
const gchar *short_name,
|
||||
|
@ -582,3 +708,12 @@ dialogs_dockable_new (GtkWidget *widget,
|
|||
|
||||
return dockable;
|
||||
}
|
||||
|
||||
static void
|
||||
dialogs_drawable_view_image_changed (GimpContext *context,
|
||||
GimpImage *gimage,
|
||||
GimpDrawableListView *view)
|
||||
{
|
||||
gimp_drawable_list_view_set_image (view, gimage);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,5 +53,12 @@ GtkWidget * dialogs_gradient_grid_view_new (GimpDialogFactory *factory);
|
|||
GtkWidget * dialogs_palette_grid_view_new (GimpDialogFactory *factory);
|
||||
GtkWidget * dialogs_tool_grid_view_new (GimpDialogFactory *factory);
|
||||
|
||||
GtkWidget * dialogs_layer_list_view_new (GimpDialogFactory *factory);
|
||||
GtkWidget * dialogs_channel_list_view_new (GimpDialogFactory *factory);
|
||||
|
||||
void dialogs_edit_brush_func (GimpData *data);
|
||||
void dialogs_edit_gradient_func (GimpData *data);
|
||||
void dialogs_edit_palette_func (GimpData *data);
|
||||
|
||||
|
||||
#endif /* __DIALOGS_CONSTRUCTORS_H__ */
|
||||
|
|
|
@ -73,7 +73,11 @@ static const GimpDialogFactoryEntry dock_entries[] =
|
|||
{ "gimp:pattern-grid", dialogs_pattern_grid_view_new, FALSE, FALSE },
|
||||
{ "gimp:gradient-grid", dialogs_gradient_grid_view_new, FALSE, FALSE },
|
||||
{ "gimp:palette-grid", dialogs_palette_grid_view_new, FALSE, FALSE },
|
||||
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE }
|
||||
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE },
|
||||
|
||||
/* these will go to image_dock_entries */
|
||||
{ "gimp:layer-list", dialogs_layer_list_view_new, FALSE, FALSE },
|
||||
{ "gimp:channel-list", dialogs_channel_list_view_new, FALSE, FALSE }
|
||||
};
|
||||
static const gint n_dock_entries = (sizeof (dock_entries) /
|
||||
sizeof (dock_entries[0]));
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "widgets/gimpdatafactoryview.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "gradient-editor.h"
|
||||
#include "dialogs-constructors.h"
|
||||
#include "gradient-select.h"
|
||||
|
||||
#include "appenv.h"
|
||||
|
@ -52,7 +52,6 @@ static void gradient_select_gradient_changed (GimpContext *context,
|
|||
GradientSelect *gsp);
|
||||
static void gradient_select_close_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void gradient_select_edit_gradient (GimpData *data);
|
||||
|
||||
|
||||
/* list of active dialogs */
|
||||
|
@ -62,10 +61,6 @@ GSList *gradient_active_dialogs = NULL;
|
|||
GradientSelect *gradient_select_dialog = NULL;
|
||||
|
||||
|
||||
/* the main gradient editor dialog */
|
||||
static GradientEditor *gradient_editor_dialog = NULL;
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
GtkWidget *
|
||||
|
@ -160,7 +155,7 @@ gradient_select_new (gchar *title,
|
|||
/* The Gradient List */
|
||||
gsp->view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
global_gradient_factory,
|
||||
gradient_select_edit_gradient,
|
||||
dialogs_edit_gradient_func,
|
||||
gsp->context,
|
||||
16,
|
||||
10, 10);
|
||||
|
@ -332,18 +327,3 @@ gradient_select_close_callback (GtkWidget *widget,
|
|||
gradient_select_free (gsp);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gradient_select_edit_gradient (GimpData *data)
|
||||
{
|
||||
GimpGradient *gradient;
|
||||
|
||||
gradient = GIMP_GRADIENT (data);
|
||||
|
||||
if (! gradient_editor_dialog)
|
||||
{
|
||||
gradient_editor_dialog = gradient_editor_new ();
|
||||
}
|
||||
|
||||
gradient_editor_set_gradient (gradient_editor_dialog, gradient);
|
||||
}
|
||||
|
|
|
@ -869,6 +869,16 @@ static GimpItemFactoryEntry dialogs_entries[] =
|
|||
{ { N_("/Add Tab/Tool Grid..."), NULL, dialogs_add_tab_cmd_callback,
|
||||
GPOINTER_TO_UINT ("gimp:tool-grid") },
|
||||
NULL, NULL },
|
||||
|
||||
{ { "/Add Tab/---", NULL, NULL, 0, "<Separator>" },
|
||||
NULL, NULL },
|
||||
|
||||
{ { N_("/Add Tab/Layer List..."), NULL, dialogs_add_tab_cmd_callback,
|
||||
GPOINTER_TO_UINT ("gimp:layer-list") },
|
||||
NULL, NULL },
|
||||
{ { N_("/Add Tab/Channel List..."), NULL, dialogs_add_tab_cmd_callback,
|
||||
GPOINTER_TO_UINT ("gimp:channel-list") },
|
||||
NULL, NULL }
|
||||
};
|
||||
static guint n_dialogs_entries = (sizeof (dialogs_entries) /
|
||||
sizeof (dialogs_entries[0]));
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "widgets/gimpdatafactoryview.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "dialogs-constructors.h"
|
||||
#include "gimpdnd.h"
|
||||
#include "palette-editor.h"
|
||||
#include "palette-select.h"
|
||||
|
@ -55,7 +56,6 @@ static void palette_select_drop_palette (GtkWidget *widget,
|
|||
gpointer data);
|
||||
static void palette_select_close_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void palette_select_edit_palette (GimpData *data);
|
||||
|
||||
|
||||
/* list of active dialogs */
|
||||
|
@ -141,7 +141,7 @@ palette_select_new (const gchar *title,
|
|||
/* The Palette List */
|
||||
psp->view = gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
global_palette_factory,
|
||||
palette_select_edit_palette,
|
||||
dialogs_edit_palette_func,
|
||||
psp->context,
|
||||
64, /* FIXME: SM_PREVIEW_WIDTH */
|
||||
3, /* FIXME: STD_PALETTE_COLUMNS */
|
||||
|
@ -212,9 +212,3 @@ palette_select_close_callback (GtkWidget *widget,
|
|||
gtk_widget_destroy (psp->shell);
|
||||
palette_select_free (psp);
|
||||
}
|
||||
|
||||
static void
|
||||
palette_select_edit_palette (GimpData *data)
|
||||
{
|
||||
palette_dialog_edit_palette (data);
|
||||
}
|
||||
|
|
18
app/main.c
18
app/main.c
|
@ -362,8 +362,22 @@ main (int argc,
|
|||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
NULL);
|
||||
|
||||
/* g_set_message_handler ((GPrintFunc) gimp_message_func); */
|
||||
g_log_set_handler ("Gimp-GUI",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
NULL);
|
||||
g_log_set_handler ("Gimp-PDB",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
NULL);
|
||||
g_log_set_handler ("Gimp-Tools",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
NULL);
|
||||
g_log_set_handler ("Gimp-Widgets",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
NULL);
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
|
||||
|
|
|
@ -869,6 +869,16 @@ static GimpItemFactoryEntry dialogs_entries[] =
|
|||
{ { N_("/Add Tab/Tool Grid..."), NULL, dialogs_add_tab_cmd_callback,
|
||||
GPOINTER_TO_UINT ("gimp:tool-grid") },
|
||||
NULL, NULL },
|
||||
|
||||
{ { "/Add Tab/---", NULL, NULL, 0, "<Separator>" },
|
||||
NULL, NULL },
|
||||
|
||||
{ { N_("/Add Tab/Layer List..."), NULL, dialogs_add_tab_cmd_callback,
|
||||
GPOINTER_TO_UINT ("gimp:layer-list") },
|
||||
NULL, NULL },
|
||||
{ { N_("/Add Tab/Channel List..."), NULL, dialogs_add_tab_cmd_callback,
|
||||
GPOINTER_TO_UINT ("gimp:channel-list") },
|
||||
NULL, NULL }
|
||||
};
|
||||
static guint n_dialogs_entries = (sizeof (dialogs_entries) /
|
||||
sizeof (dialogs_entries[0]));
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
#include "gimpdnd.h"
|
||||
|
||||
|
||||
#define GIMP_DOCK_MINIMAL_WIDTH 280
|
||||
|
||||
|
||||
static void gimp_dock_class_init (GimpDockClass *klass);
|
||||
static void gimp_dock_init (GimpDock *dock);
|
||||
|
||||
|
@ -119,6 +122,7 @@ gimp_dock_init (GimpDock *dock)
|
|||
GtkWidget *separator;
|
||||
|
||||
gtk_window_set_policy (GTK_WINDOW (dock), FALSE, TRUE, TRUE);
|
||||
gtk_widget_set_usize (GTK_WIDGET (dock), GIMP_DOCK_MINIMAL_WIDTH, -1);
|
||||
|
||||
dock->vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (dock), dock->vbox);
|
||||
|
|
|
@ -869,6 +869,16 @@ static GimpItemFactoryEntry dialogs_entries[] =
|
|||
{ { N_("/Add Tab/Tool Grid..."), NULL, dialogs_add_tab_cmd_callback,
|
||||
GPOINTER_TO_UINT ("gimp:tool-grid") },
|
||||
NULL, NULL },
|
||||
|
||||
{ { "/Add Tab/---", NULL, NULL, 0, "<Separator>" },
|
||||
NULL, NULL },
|
||||
|
||||
{ { N_("/Add Tab/Layer List..."), NULL, dialogs_add_tab_cmd_callback,
|
||||
GPOINTER_TO_UINT ("gimp:layer-list") },
|
||||
NULL, NULL },
|
||||
{ { N_("/Add Tab/Channel List..."), NULL, dialogs_add_tab_cmd_callback,
|
||||
GPOINTER_TO_UINT ("gimp:channel-list") },
|
||||
NULL, NULL }
|
||||
};
|
||||
static guint n_dialogs_entries = (sizeof (dialogs_entries) /
|
||||
sizeof (dialogs_entries[0]));
|
||||
|
|
Loading…
Reference in New Issue