Commit cee3baea authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

First draft of the "no image open" window, which is implemented as a

2008-03-18  Michael Natterer  <mitch@gimp.org>

	First draft of the "no image open" window, which is implemented as
	a display without image (a view with NULL model). Didn't change
	the display's appearance yet so I can first make sure the display
	without image works properly in all details before hiding these
	details.

	* app/core/gimp-gui.[ch]: add "gimp" parameter to display_create()
	and allow "image" to be NULL.

	* app/core/gimpcontext.c (gimp_context_real_set_display): a
	display's image can be NULL now.

	* app/display/gimpdisplay.[ch]: add Gimp and GimpDisplayConfig
	members.  Add Gimp parameter to gimp_display_shell_new(). Changed
	gimp_display_reconnect() to gimp_display_set_image() and allow to
	set a NULL image.

	* app/gui/gui-vtable.c (gui_display_create): if there is a single
	display without an image, call gimp_display_set_image() on that
	display instead of creating a new one.

	* app/display/gimpdisplayshell-close.c: if the last display is
	closed, don't close it but make it empty. Factored out that code
	to gimp_display_shell_really_close().

	* app/display/gimpdisplayshell-dnd.c: when dropping uris on an
	empty display, open the first one into that display and the other
	ones as layers of the newly opened image. This is consistent with
	dropping on an existing image but maybe needs some discussion.

	* app/display/gimpdisplayshell-callbacks.c: bail out early in the
	tool event callback so tools never have to deal with empty
	displays. In expose(), draw the drop zone on the empty display.

	* app/display/gimpdisplayshell-title.c: set the empty display's
	title to "Gimp - Drop Files".

	* app/display/gimpdisplay-foreach.c
	* app/display/gimpdisplay-handlers.c
	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-autoscroll.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-cursor.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-filter-dialog.c
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell-preview.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-scroll.c
	* app/display/gimpdisplayshell-selection.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpnavigationeditor.c
	* app/display/gimpstatusbar.c: use display->gimp and
	display->config instead of going via the image. Guard against
	empty displays in some few places (most places can't be
	called). Where needed, use the canvas' dimensions instead of the
	image's dimensions so scroll offsets and scrollbars still have
	sane values instead of the last image's ones.

	* app/actions/actions.c (action_data_get_gimp)
	(action_data_get_context): use display->gimp instead of
	display->image->gimp.

	* app/actions/edit-commands.c (edit_paste_cmd_callback): redirect
	to "paste as new" if there is an empty display.

	* app/actions/tools-commands.c (tools_select_cmd_callback): don't
	initialize the new tool on an empty display.

	* app/actions/view-actions.c (view_actions_update): changed lots
	of sensitivity settings to be insensitive when there is no image
	(instead of no display).

	* app/actions/view-commands.c: use the display's config object
	instead of gimp's.


svn path=/trunk/; revision=25113
parent e2f6294c
2008-03-18 Michael Natterer <mitch@gimp.org>
First draft of the "no image open" window, which is implemented as
a display without image (a view with NULL model). Didn't change
the display's appearance yet so I can first make sure the display
without image works properly in all details before hiding these
details.
* app/core/gimp-gui.[ch]: add "gimp" parameter to display_create()
and allow "image" to be NULL.
* app/core/gimpcontext.c (gimp_context_real_set_display): a
display's image can be NULL now.
* app/display/gimpdisplay.[ch]: add Gimp and GimpDisplayConfig
members. Add Gimp parameter to gimp_display_shell_new(). Changed
gimp_display_reconnect() to gimp_display_set_image() and allow to
set a NULL image.
* app/gui/gui-vtable.c (gui_display_create): if there is a single
display without an image, call gimp_display_set_image() on that
display instead of creating a new one.
* app/display/gimpdisplayshell-close.c: if the last display is
closed, don't close it but make it empty. Factored out that code
to gimp_display_shell_really_close().
* app/display/gimpdisplayshell-dnd.c: when dropping uris on an
empty display, open the first one into that display and the other
ones as layers of the newly opened image. This is consistent with
dropping on an existing image but maybe needs some discussion.
* app/display/gimpdisplayshell-callbacks.c: bail out early in the
tool event callback so tools never have to deal with empty
displays. In expose(), draw the drop zone on the empty display.
* app/display/gimpdisplayshell-title.c: set the empty display's
title to "Gimp - Drop Files".
* app/display/gimpdisplay-foreach.c
* app/display/gimpdisplay-handlers.c
* app/display/gimpdisplayshell-appearance.c
* app/display/gimpdisplayshell-autoscroll.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-cursor.c
* app/display/gimpdisplayshell-dnd.c
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell-filter-dialog.c
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-preview.c
* app/display/gimpdisplayshell-render.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-scroll.c
* app/display/gimpdisplayshell-selection.c
* app/display/gimpdisplayshell-title.c
* app/display/gimpdisplayshell.c
* app/display/gimpnavigationeditor.c
* app/display/gimpstatusbar.c: use display->gimp and
display->config instead of going via the image. Guard against
empty displays in some few places (most places can't be
called). Where needed, use the canvas' dimensions instead of the
image's dimensions so scroll offsets and scrollbars still have
sane values instead of the last image's ones.
* app/actions/actions.c (action_data_get_gimp)
(action_data_get_context): use display->gimp instead of
display->image->gimp.
* app/actions/edit-commands.c (edit_paste_cmd_callback): redirect
to "paste as new" if there is an empty display.
* app/actions/tools-commands.c (tools_select_cmd_callback): don't
initialize the new tool on an empty display.
* app/actions/view-actions.c (view_actions_update): changed lots
of sensitivity settings to be insensitive when there is no image
(instead of no display).
* app/actions/view-commands.c: use the display's config object
instead of gimp's.
2008-03-18 Michael Natterer <mitch@gimp.org>
* app/display/gimpcanvas.[ch]: add gimp_canvas_draw_drop_zone()
......
......@@ -252,7 +252,7 @@ action_data_get_gimp (gpointer data)
return NULL;
if (GIMP_IS_DISPLAY (data))
return ((GimpDisplay *) data)->image->gimp;
return ((GimpDisplay *) data)->gimp;
else if (GIMP_IS_GIMP (data))
return data;
else if (GIMP_IS_DOCK (data))
......@@ -279,7 +279,7 @@ action_data_get_context (gpointer data)
return NULL;
if (GIMP_IS_DISPLAY (data))
return gimp_get_user_context (((GimpDisplay *) data)->image->gimp);
return gimp_get_user_context (((GimpDisplay *) data)->gimp);
else if (GIMP_IS_GIMP (data))
return gimp_get_user_context (data);
else if (GIMP_IS_DOCK (data))
......
......@@ -268,7 +268,7 @@ edit_paste_cmd_callback (GtkAction *action,
{
GimpDisplay *display = action_data_get_display (data);
if (display)
if (display && display->image)
edit_paste (display, FALSE);
else
edit_paste_as_new_cmd_callback (action, data);
......
......@@ -35,6 +35,8 @@
#include "widgets/gimpenumaction.h"
#include "widgets/gimpuimanager.h"
#include "display/gimpdisplay.h"
#include "tools/gimp-tools.h"
#include "tools/gimpcoloroptions.h"
#include "tools/gimpforegroundselectoptions.h"
......@@ -97,7 +99,7 @@ tools_select_cmd_callback (GtkAction *action,
display = gimp_context_get_display (context);
if (display)
if (display && display->image)
tool_manager_initialize_active (gimp, display);
}
......
......@@ -531,6 +531,7 @@ view_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpDisplay *display = action_data_get_display (data);
GimpImage *image = NULL;
GimpDisplayShell *shell = NULL;
GimpDisplayOptions *options = NULL;
gchar *label = NULL;
......@@ -539,6 +540,7 @@ view_actions_update (GimpActionGroup *group,
if (display)
{
image = display->image;
shell = GIMP_DISPLAY_SHELL (display->shell);
fullscreen = gimp_display_shell_get_fullscreen (shell);
......@@ -555,10 +557,10 @@ view_actions_update (GimpActionGroup *group,
#define SET_COLOR(action,color) \
gimp_action_group_set_action_color (group, action, color, FALSE)
SET_SENSITIVE ("view-new", display);
SET_SENSITIVE ("view-new", image);
SET_SENSITIVE ("view-close", display);
SET_SENSITIVE ("view-dot-for-dot", display);
SET_SENSITIVE ("view-dot-for-dot", image);
SET_ACTIVE ("view-dot-for-dot", display && shell->dot_for_dot);
SET_SENSITIVE ("view-zoom-revert", revert_enabled);
......@@ -575,46 +577,46 @@ view_actions_update (GimpActionGroup *group,
_("Re_vert Zoom"));
}
SET_SENSITIVE ("view-zoom-out", display);
SET_SENSITIVE ("view-zoom-in", display);
SET_SENSITIVE ("view-zoom-fit-in", display);
SET_SENSITIVE ("view-zoom-fill", display);
SET_SENSITIVE ("view-zoom-16-1", display);
SET_SENSITIVE ("view-zoom-8-1", display);
SET_SENSITIVE ("view-zoom-4-1", display);
SET_SENSITIVE ("view-zoom-2-1", display);
SET_SENSITIVE ("view-zoom-1-1", display);
SET_SENSITIVE ("view-zoom-1-2", display);
SET_SENSITIVE ("view-zoom-1-4", display);
SET_SENSITIVE ("view-zoom-1-8", display);
SET_SENSITIVE ("view-zoom-1-16", display);
SET_SENSITIVE ("view-zoom-other", display);
if (display)
SET_SENSITIVE ("view-zoom-out", image);
SET_SENSITIVE ("view-zoom-in", image);
SET_SENSITIVE ("view-zoom-fit-in", image);
SET_SENSITIVE ("view-zoom-fill", image);
SET_SENSITIVE ("view-zoom-16-1", image);
SET_SENSITIVE ("view-zoom-8-1", image);
SET_SENSITIVE ("view-zoom-4-1", image);
SET_SENSITIVE ("view-zoom-2-1", image);
SET_SENSITIVE ("view-zoom-1-1", image);
SET_SENSITIVE ("view-zoom-1-2", image);
SET_SENSITIVE ("view-zoom-1-4", image);
SET_SENSITIVE ("view-zoom-1-8", image);
SET_SENSITIVE ("view-zoom-1-16", image);
SET_SENSITIVE ("view-zoom-other", image);
if (image)
view_actions_set_zoom (group, shell);
SET_SENSITIVE ("view-navigation-window", display);
SET_SENSITIVE ("view-display-filters", display);
SET_SENSITIVE ("view-navigation-window", image);
SET_SENSITIVE ("view-display-filters", image);
SET_SENSITIVE ("view-show-selection", display);
SET_SENSITIVE ("view-show-selection", image);
SET_ACTIVE ("view-show-selection", display && options->show_selection);
SET_SENSITIVE ("view-show-layer-boundary", display);
SET_SENSITIVE ("view-show-layer-boundary", image);
SET_ACTIVE ("view-show-layer-boundary", display && options->show_layer_boundary);
SET_SENSITIVE ("view-show-guides", display);
SET_SENSITIVE ("view-show-guides", image);
SET_ACTIVE ("view-show-guides", display && options->show_guides);
SET_SENSITIVE ("view-show-grid", display);
SET_SENSITIVE ("view-show-grid", image);
SET_ACTIVE ("view-show-grid", display && options->show_grid);
SET_SENSITIVE ("view-show-sample-points", display);
SET_SENSITIVE ("view-show-sample-points", image);
SET_ACTIVE ("view-show-sample-points", display && options->show_sample_points);
SET_SENSITIVE ("view-snap-to-guides", display);
SET_SENSITIVE ("view-snap-to-guides", image);
SET_ACTIVE ("view-snap-to-guides", display && shell->snap_to_guides);
SET_SENSITIVE ("view-snap-to-grid", display);
SET_SENSITIVE ("view-snap-to-grid", image);
SET_ACTIVE ("view-snap-to-grid", display && shell->snap_to_grid);
SET_SENSITIVE ("view-snap-to-canvas", display);
SET_SENSITIVE ("view-snap-to-canvas", image);
SET_ACTIVE ("view-snap-to-canvas", display && shell->snap_to_canvas);
SET_SENSITIVE ("view-snap-to-vectors", display);
SET_SENSITIVE ("view-snap-to-vectors", image);
SET_ACTIVE ("view-snap-to-vectors", display && shell->snap_to_vectors);
SET_SENSITIVE ("view-padding-color-theme", display);
......@@ -649,8 +651,8 @@ view_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("view-show-statusbar", display);
SET_ACTIVE ("view-show-statusbar", display && options->show_statusbar);
SET_SENSITIVE ("view-shrink-wrap", display);
SET_SENSITIVE ("view-fullscreen", display);
SET_SENSITIVE ("view-shrink-wrap", image);
SET_SENSITIVE ("view-fullscreen", image);
SET_ACTIVE ("view-fullscreen", display && fullscreen);
if (GIMP_IS_DISPLAY (group->user_data) ||
......
......@@ -608,17 +608,14 @@ view_padding_color_cmd_callback (GtkAction *action,
g_object_set_data (G_OBJECT (shell), "padding-color-dialog", NULL);
{
GimpDisplayConfig *config;
GimpDisplayOptions *default_options;
config = GIMP_DISPLAY_CONFIG (display->image->gimp->config);
options->padding_mode_set = FALSE;
if (fullscreen)
default_options = config->default_fullscreen_view;
default_options = display->config->default_fullscreen_view;
else
default_options = config->default_view;
default_options = display->config->default_view;
gimp_display_shell_set_padding (shell,
default_options->padding_mode,
......
......@@ -281,10 +281,10 @@ gimp_create_display (Gimp *gimp,
gdouble scale)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), NULL);
if (gimp->gui.display_create)
return gimp->gui.display_create (image, unit, scale);
return gimp->gui.display_create (gimp, image, unit, scale);
return NULL;
}
......
......@@ -51,7 +51,8 @@ struct _GimpGui
gint ID);
gint (* display_get_id) (GimpObject *display);
guint32 (* display_get_window) (GimpObject *display);
GimpObject * (* display_create) (GimpImage *image,
GimpObject * (* display_create) (Gimp *gimp,
GimpImage *image,
GimpUnit unit,
gdouble scale);
void (* display_delete) (GimpObject *display);
......
......@@ -1777,9 +1777,12 @@ gimp_context_real_set_display (GimpContext *context,
g_object_get (display, "image", &image, NULL);
gimp_context_real_set_image (context, image);
if (image)
{
gimp_context_real_set_image (context, image);
g_object_unref (image);
g_object_unref (image);
}
}
g_object_notify (G_OBJECT (context), "display");
......
......@@ -46,7 +46,7 @@ gimp_displays_dirty (Gimp *gimp)
{
GimpDisplay *display = list->data;
if (display->image->dirty)
if (display->image && display->image->dirty)
return TRUE;
}
......@@ -183,7 +183,7 @@ gimp_displays_reconnect (Gimp *gimp,
GimpDisplay *display = list->data;
if (display->image == old)
gimp_display_reconnect (display, new);
gimp_display_set_image (display, new);
}
/* set the new_image on the remembered contexts (in reverse
......
......@@ -151,7 +151,7 @@ gimp_display_saved_handler (GimpImage *image,
{
gchar *filename = file_utils_uri_display_name (uri);
gimp_message (image->gimp, G_OBJECT (display), GIMP_MESSAGE_INFO,
gimp_message (display->gimp, G_OBJECT (display), GIMP_MESSAGE_INFO,
_("Image saved to '%s'"), filename);
g_free (filename);
......
......@@ -25,6 +25,8 @@
#include "display-types.h"
#include "tools/tools-types.h"
#include "config/gimpdisplayconfig.h"
#include "core/gimp.h"
#include "core/gimparea.h"
#include "core/gimpimage.h"
......@@ -47,6 +49,7 @@ enum
{
PROP_0,
PROP_ID,
PROP_GIMP,
PROP_IMAGE,
PROP_SHELL
};
......@@ -117,6 +120,13 @@ gimp_display_class_init (GimpDisplayClass *klass)
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class, PROP_GIMP,
g_param_spec_object ("gimp",
NULL, NULL,
GIMP_TYPE_GIMP,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class, PROP_IMAGE,
g_param_spec_object ("image",
NULL, NULL,
......@@ -135,6 +145,8 @@ gimp_display_init (GimpDisplay *display)
{
display->ID = 0;
display->gimp = NULL;
display->image = NULL;
display->instance = 0;
......@@ -170,10 +182,17 @@ gimp_display_set_property (GObject *object,
case PROP_ID:
display->ID = g_value_get_int (value);
break;
case PROP_GIMP:
display->gimp = g_value_get_object (value); /* don't ref the gimp */
display->config = GIMP_DISPLAY_CONFIG (display->gimp->config);
break;
case PROP_IMAGE:
case PROP_SHELL:
g_assert_not_reached ();
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -193,12 +212,19 @@ gimp_display_get_property (GObject *object,
case PROP_ID:
g_value_set_int (value, display->ID);
break;
case PROP_GIMP:
g_value_set_object (value, display->gimp);
break;
case PROP_IMAGE:
g_value_set_object (value, display->image);
break;
case PROP_SHELL:
g_value_set_object (value, display->shell);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -317,7 +343,8 @@ gimp_display_progress_canceled (GimpProgress *progress,
/* public functions */
GimpDisplay *
gimp_display_new (GimpImage *image,
gimp_display_new (Gimp *gimp,
GimpImage *image,
GimpUnit unit,
gdouble scale,
GimpMenuFactory *menu_factory,
......@@ -326,27 +353,30 @@ gimp_display_new (GimpImage *image,
GimpDisplay *display;
gint ID;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), NULL);
/* If there isn't an interface, never create a display */
if (image->gimp->no_interface)
if (gimp->no_interface)
return NULL;
do
{
ID = image->gimp->next_display_ID++;
ID = gimp->next_display_ID++;
if (image->gimp->next_display_ID == G_MAXINT)
image->gimp->next_display_ID = 1;
if (gimp->next_display_ID == G_MAXINT)
gimp->next_display_ID = 1;
}
while (gimp_display_get_by_ID (image->gimp, ID));
while (gimp_display_get_by_ID (gimp, ID));
display = g_object_new (GIMP_TYPE_DISPLAY,
"id", ID,
"id", ID,
"gimp", gimp,
NULL);
/* refs the image */
gimp_display_connect (display, image);
if (image)
gimp_display_connect (display, image);
/* create the shell for the image */
display->shell = gimp_display_shell_new (display, unit, scale,
......@@ -358,7 +388,7 @@ gimp_display_new (GimpImage *image,
display);
/* add the display to the list */
gimp_container_add (image->gimp->displays, GIMP_OBJECT (display));
gimp_container_add (gimp->displays, GIMP_OBJECT (display));
return display;
}
......@@ -371,17 +401,16 @@ gimp_display_delete (GimpDisplay *display)
g_return_if_fail (GIMP_IS_DISPLAY (display));
/* remove the display from the list */
gimp_container_remove (display->image->gimp->displays,
gimp_container_remove (display->gimp->displays,
GIMP_OBJECT (display));
/* stop any active tool */
tool_manager_control_active (display->image->gimp, GIMP_TOOL_ACTION_HALT,
display);
/* unrefs the image */
gimp_display_set_image (display, NULL);
active_tool = tool_manager_get_active (display->image->gimp);
active_tool = tool_manager_get_active (display->gimp);
if (active_tool && active_tool->focus_display == display)
tool_manager_focus_display_active (display->image->gimp, NULL);
tool_manager_focus_display_active (display->gimp, NULL);
/* free the update area lists */
gimp_area_list_free (display->update_areas);
......@@ -399,9 +428,6 @@ gimp_display_delete (GimpDisplay *display)
gtk_widget_destroy (shell);
}
/* unrefs the image */
gimp_display_disconnect (display);
g_object_unref (display);
}
......@@ -435,28 +461,35 @@ gimp_display_get_by_ID (Gimp *gimp,
}
void
gimp_display_reconnect (GimpDisplay *display,
gimp_display_set_image (GimpDisplay *display,
GimpImage *image)
{
GimpImage *old_image;
GimpImage *old_image = NULL;
g_return_if_fail (GIMP_IS_DISPLAY (display));
g_return_if_fail (GIMP_IS_IMAGE (image));
g_return_if_fail (image == NULL || GIMP_IS_IMAGE (image));
/* stop any active tool */
tool_manager_control_active (display->image->gimp, GIMP_TOOL_ACTION_HALT,
display);
if (display->image)
{
/* stop any active tool */
tool_manager_control_active (display->gimp, GIMP_TOOL_ACTION_HALT,
display);
gimp_display_shell_disconnect (GIMP_DISPLAY_SHELL (display->shell));
gimp_display_shell_disconnect (GIMP_DISPLAY_SHELL (display->shell));
old_image = g_object_ref (display->image);
old_image = g_object_ref (display->image);
gimp_display_disconnect (display);
}
gimp_display_disconnect (display);
gimp_display_connect (display, image);
if (image)
gimp_display_connect (display, image);
g_object_unref (old_image);
if (old_image)
g_object_unref (old_image);
gimp_display_shell_reconnect (GIMP_DISPLAY_SHELL (display->shell));
if (image)
gimp_display_shell_reconnect (GIMP_DISPLAY_SHELL (display->shell));
}
void
......
......@@ -37,15 +37,18 @@ struct _GimpDisplay
{
GimpObject parent_instance;
gint ID; /* unique identifier for this display */
gint ID; /* unique identifier for this display */
GimpImage *image; /* pointer to the associated image */
gint instance; /* the instance # of this display as */
/* taken from the image at creation */
Gimp *gimp; /* global gimp instance */
GimpDisplayConfig *config;
GtkWidget *shell; /* shell widget for this display */
GimpImage *image; /* pointer to the associated image */
gint instance; /* the instance # of this display as */
/* taken from the image at creation */
GSList *update_areas; /* Update areas list */
GtkWidget *shell; /* shell widget for this display */
GSList *update_areas; /* Update areas list */
};
struct _GimpDisplayClass
......@@ -56,7 +59,8 @@ struct _GimpDisplayClass
GType gimp_display_get_type (void) G_GNUC_CONST;
GimpDisplay * gimp_display_new (GimpImage *image,
GimpDisplay * gimp_display_new (Gimp *gimp,
GimpImage *image,
GimpUnit unit,
gdouble scale,
GimpMenuFactory *menu_factory,
......@@ -67,7 +71,7 @@ gint gimp_display_get_ID (GimpDisplay *display);
GimpDisplay * gimp_display_get_by_ID (Gimp *gimp,
gint ID);
void gimp_display_reconnect (GimpDisplay *display,
void gimp_display_set_image (GimpDisplay *display,
GimpImage *image);
void gimp_display_update_area (GimpDisplay *display,
......
......@@ -41,7 +41,6 @@
#include "gimpdisplayoptions.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"
#include "gimpdisplayshell-callbacks.h"
#include "gimpdisplayshell-selection.h"
#include "gimpstatusbar.h"
......@@ -63,7 +62,7 @@
#define IS_ACTIVE_DISPLAY(shell) \
((shell)->display == \
gimp_context_get_display (gimp_get_user_context \
((shell)->display->image->gimp)))
((shell)->display->gimp)))
void
......
......@@ -22,8 +22,6 @@
#include "display-types.h"
#include "core/gimpimage.h"
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-autoscroll.h"
......@@ -133,7 +131,7 @@ gimp_display_shell_autoscroll_timeout (gpointer data)
if (dx || dy)
{
GimpDisplay *display = shell->display;
GimpTool *active_tool = tool_manager_get_active (display->image->gimp);
GimpTool *active_tool = tool_manager_get_active (display->gimp);
info->time += AUTOSCROLL_DT;
......@@ -157,7 +155,7 @@ gimp_display_shell_autoscroll_timeout (gpointer data)
x, y, width, height);
}
tool_manager_motion_active (display->image->gimp,
tool_manager_motion_active (display->gimp,
&image_coords,
info->time, info->state,
display);
......
......@@ -111,7 +111,7 @@ gimp_display_shell_events (GtkWidget *widget,
if (! shell->display || ! shell->display->shell)