mirror of https://github.com/GNOME/gimp.git
Use gimp_display_get_shell() instead of directly accessing it
This commit is contained in:
parent
18cbe3422e
commit
ac98c2c234
|
@ -631,7 +631,7 @@ action_message (GimpDisplay *display,
|
|||
const gchar *format,
|
||||
...)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpStatusbar *statusbar = gimp_display_shell_get_statusbar (shell);
|
||||
const gchar *stock_id = NULL;
|
||||
va_list args;
|
||||
|
|
|
@ -134,7 +134,7 @@ buffers_paste (GimpBufferView *view,
|
|||
|
||||
if (display)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_display_shell_untransform_viewport (shell,
|
||||
&x, &y, &width, &height);
|
||||
|
|
|
@ -195,7 +195,7 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
|
|||
GList *strings = NULL;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
window = gimp_display_shell_get_window (GIMP_DISPLAY_SHELL (display->shell));
|
||||
window = gimp_display_shell_get_window (gimp_display_get_shell (display));
|
||||
manager = GTK_UI_MANAGER (gimp_image_window_get_ui_manager (window));
|
||||
|
||||
accel_group = gtk_ui_manager_get_accel_group (manager);
|
||||
|
|
|
@ -357,6 +357,6 @@ documents_raise_display (GimpDisplay *display,
|
|||
if (uri && ! strcmp (closure->name, uri))
|
||||
{
|
||||
closure->found = TRUE;
|
||||
gimp_display_shell_present (GIMP_DISPLAY_SHELL (display->shell));
|
||||
gimp_display_shell_present (gimp_display_get_shell (display));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -514,7 +514,7 @@ edit_paste (GimpDisplay *display,
|
|||
|
||||
if (buffer)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
gint x, y;
|
||||
gint width, height;
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ image_resize_cmd_callback (GtkAction *action,
|
|||
options->context = action_data_get_context (data);
|
||||
|
||||
if (image_resize_unit != GIMP_UNIT_PERCENT)
|
||||
image_resize_unit = GIMP_DISPLAY_SHELL (display->shell)->unit;
|
||||
image_resize_unit = gimp_display_get_shell (display)->unit;
|
||||
|
||||
dialog = resize_dialog_new (GIMP_VIEWABLE (image),
|
||||
action_data_get_context (data),
|
||||
|
@ -330,7 +330,7 @@ image_scale_cmd_callback (GtkAction *action,
|
|||
return_if_no_widget (widget, data);
|
||||
|
||||
if (image_scale_unit != GIMP_UNIT_PERCENT)
|
||||
image_scale_unit = GIMP_DISPLAY_SHELL (display->shell)->unit;
|
||||
image_scale_unit = gimp_display_get_shell (display)->unit;
|
||||
|
||||
if (image_scale_interp == -1)
|
||||
image_scale_interp = display->image->gimp->config->interpolation_type;
|
||||
|
@ -425,7 +425,7 @@ image_duplicate_cmd_callback (GtkAction *action,
|
|||
GimpImage *new_image;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
new_image = gimp_image_duplicate (display->image);
|
||||
|
||||
|
@ -480,7 +480,7 @@ image_configure_grid_cmd_callback (GtkAction *action,
|
|||
GimpImage *image;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
image = display->image;
|
||||
|
||||
if (! shell->grid_dialog)
|
||||
|
@ -511,7 +511,7 @@ image_properties_cmd_callback (GtkAction *action,
|
|||
GtkWidget *dialog;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
image = display->image;
|
||||
|
||||
dialog = image_properties_dialog_new (display->image,
|
||||
|
|
|
@ -63,7 +63,7 @@ images_raise_views_cmd_callback (GtkAction *action,
|
|||
GimpDisplay *display = list->data;
|
||||
|
||||
if (display->image == image)
|
||||
gimp_display_shell_present (GIMP_DISPLAY_SHELL (display->shell));
|
||||
gimp_display_shell_present (gimp_display_get_shell (display));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -606,7 +606,7 @@ layers_resize_cmd_callback (GtkAction *action,
|
|||
return_if_no_widget (widget, data);
|
||||
|
||||
if (layer_resize_unit != GIMP_UNIT_PERCENT && GIMP_IS_DISPLAY (data))
|
||||
layer_resize_unit = GIMP_DISPLAY_SHELL (GIMP_DISPLAY (data)->shell)->unit;
|
||||
layer_resize_unit = gimp_display_get_shell (GIMP_DISPLAY (data))->unit;
|
||||
|
||||
dialog = resize_dialog_new (GIMP_VIEWABLE (layer),
|
||||
action_data_get_context (data),
|
||||
|
@ -644,7 +644,7 @@ layers_scale_cmd_callback (GtkAction *action,
|
|||
return_if_no_widget (widget, data);
|
||||
|
||||
if (layer_scale_unit != GIMP_UNIT_PERCENT && GIMP_IS_DISPLAY (data))
|
||||
layer_scale_unit = GIMP_DISPLAY_SHELL (GIMP_DISPLAY (data)->shell)->unit;
|
||||
layer_scale_unit = gimp_display_get_shell (GIMP_DISPLAY (data))->unit;
|
||||
|
||||
if (layer_scale_interp == -1)
|
||||
layer_scale_interp = image->gimp->config->interpolation_type;
|
||||
|
|
|
@ -157,7 +157,7 @@ select_feather_cmd_callback (GtkAction *action,
|
|||
GIMP_HELP_SELECTION_FEATHER,
|
||||
_("Feather selection by"),
|
||||
select_feather_radius, 0, 32767, 3,
|
||||
GIMP_DISPLAY_SHELL (display->shell)->unit,
|
||||
gimp_display_get_shell (display)->unit,
|
||||
MIN (xres, yres),
|
||||
FALSE,
|
||||
G_OBJECT (display->image), "disconnect",
|
||||
|
@ -195,7 +195,7 @@ select_shrink_cmd_callback (GtkAction *action,
|
|||
GIMP_HELP_SELECTION_SHRINK,
|
||||
_("Shrink selection by"),
|
||||
select_shrink_pixels, 1, 32767, 0,
|
||||
GIMP_DISPLAY_SHELL (display->shell)->unit,
|
||||
gimp_display_get_shell (display)->unit,
|
||||
MIN (xres, yres),
|
||||
FALSE,
|
||||
G_OBJECT (display->image), "disconnect",
|
||||
|
@ -232,7 +232,7 @@ select_grow_cmd_callback (GtkAction *action,
|
|||
GIMP_HELP_SELECTION_GROW,
|
||||
_("Grow selection by"),
|
||||
select_grow_pixels, 1, 32767, 0,
|
||||
GIMP_DISPLAY_SHELL (display->shell)->unit,
|
||||
gimp_display_get_shell (display)->unit,
|
||||
MIN (xres, yres),
|
||||
FALSE,
|
||||
G_OBJECT (display->image), "disconnect",
|
||||
|
@ -259,7 +259,7 @@ select_border_cmd_callback (GtkAction *action,
|
|||
GIMP_HELP_SELECTION_BORDER,
|
||||
_("Border selection by"),
|
||||
select_border_radius, 1, 32767, 0,
|
||||
GIMP_DISPLAY_SHELL (display->shell)->unit,
|
||||
gimp_display_get_shell (display)->unit,
|
||||
MIN (xres, yres),
|
||||
FALSE,
|
||||
G_OBJECT (display->image), "disconnect",
|
||||
|
|
|
@ -553,7 +553,7 @@ view_actions_update (GimpActionGroup *group,
|
|||
GimpImageWindow *window;
|
||||
|
||||
image = display->image;
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
window = gimp_display_shell_get_window (shell);
|
||||
|
||||
if (window)
|
||||
|
|
|
@ -86,7 +86,7 @@ view_new_cmd_callback (GtkAction *action,
|
|||
GimpDisplayShell *shell;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_create_display (display->image->gimp,
|
||||
display->image,
|
||||
|
@ -100,7 +100,7 @@ view_zoom_fit_in_cmd_callback (GtkAction *action,
|
|||
GimpDisplay *display;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
gimp_display_shell_scale_fit_in (GIMP_DISPLAY_SHELL (display->shell));
|
||||
gimp_display_shell_scale_fit_in (gimp_display_get_shell (display));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -110,7 +110,7 @@ view_zoom_fill_cmd_callback (GtkAction *action,
|
|||
GimpDisplay *display;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
gimp_display_shell_scale_fill (GIMP_DISPLAY_SHELL (display->shell));
|
||||
gimp_display_shell_scale_fill (gimp_display_get_shell (display));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -120,7 +120,7 @@ view_zoom_revert_cmd_callback (GtkAction *action,
|
|||
GimpDisplay *display;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
gimp_display_shell_scale_revert (GIMP_DISPLAY_SHELL (display->shell));
|
||||
gimp_display_shell_scale_revert (gimp_display_get_shell (display));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -132,7 +132,7 @@ view_zoom_cmd_callback (GtkAction *action,
|
|||
GimpDisplayShell *shell;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
switch ((GimpActionSelectType) value)
|
||||
{
|
||||
|
@ -211,7 +211,7 @@ view_zoom_explicit_cmd_callback (GtkAction *action,
|
|||
gint value;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
|
||||
|
@ -233,7 +233,7 @@ view_zoom_other_cmd_callback (GtkAction *action,
|
|||
GimpDisplayShell *shell;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
/* check if we are activated by the user or from
|
||||
* view_actions_set_zoom()
|
||||
|
@ -254,7 +254,7 @@ view_dot_for_dot_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -284,7 +284,7 @@ view_scroll_horizontal_cmd_callback (GtkAction *action,
|
|||
gdouble offset;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
offset = action_select_value ((GimpActionSelectType) value,
|
||||
shell->hsbdata->value,
|
||||
|
@ -310,7 +310,7 @@ view_scroll_vertical_cmd_callback (GtkAction *action,
|
|||
gdouble offset;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
offset = action_select_value ((GimpActionSelectType) value,
|
||||
shell->vsbdata->value,
|
||||
|
@ -334,7 +334,7 @@ view_navigation_window_cmd_callback (GtkAction *action,
|
|||
GimpDisplayShell *shell;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_dialog_factory_dialog_raise (global_dock_factory,
|
||||
gtk_widget_get_screen (display->shell),
|
||||
|
@ -349,7 +349,7 @@ view_display_filters_cmd_callback (GtkAction *action,
|
|||
GimpDisplayShell *shell;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
if (! shell->filters_dialog)
|
||||
{
|
||||
|
@ -372,7 +372,7 @@ view_toggle_selection_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -388,7 +388,7 @@ view_toggle_layer_boundary_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -404,7 +404,7 @@ view_toggle_menubar_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -420,7 +420,7 @@ view_toggle_rulers_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -436,7 +436,7 @@ view_toggle_scrollbars_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -452,7 +452,7 @@ view_toggle_statusbar_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -468,7 +468,7 @@ view_toggle_guides_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -484,7 +484,7 @@ view_toggle_grid_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -500,7 +500,7 @@ view_toggle_sample_points_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -516,7 +516,7 @@ view_snap_to_guides_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -532,7 +532,7 @@ view_snap_to_grid_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -548,7 +548,7 @@ view_snap_to_canvas_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -564,7 +564,7 @@ view_snap_to_vectors_cmd_callback (GtkAction *action,
|
|||
gboolean active;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
@ -583,7 +583,7 @@ view_padding_color_cmd_callback (GtkAction *action,
|
|||
gboolean fullscreen;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
window = gimp_display_shell_get_window (shell);
|
||||
|
||||
if (window)
|
||||
|
@ -671,7 +671,7 @@ view_shrink_wrap_cmd_callback (GtkAction *action,
|
|||
GimpDisplayShell *shell;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_display_shell_scale_shrink_wrap (shell,
|
||||
FALSE);
|
||||
|
@ -686,7 +686,7 @@ view_fullscreen_cmd_callback (GtkAction *action,
|
|||
GimpImageWindow *window;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
window = gimp_display_shell_get_window (shell);
|
||||
|
||||
if (window)
|
||||
|
@ -712,7 +712,7 @@ view_use_gegl_cmd_callback (GtkAction *action,
|
|||
return_if_no_image (image, data);
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ windows_show_display_cmd_callback (GtkAction *action,
|
|||
{
|
||||
GimpDisplay *display = g_object_get_data (G_OBJECT (action), "display");
|
||||
|
||||
gimp_display_shell_present (GIMP_DISPLAY_SHELL (display->shell));
|
||||
gimp_display_shell_present (gimp_display_get_shell (display));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -256,6 +256,6 @@ quit_close_all_dialog_image_activated (GimpContainerView *view,
|
|||
GimpDisplay *display = list->data;
|
||||
|
||||
if (display->image == image)
|
||||
gimp_display_shell_present (GIMP_DISPLAY_SHELL (display->shell));
|
||||
gimp_display_shell_present (gimp_display_get_shell (display));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -589,7 +589,7 @@ gimp_cursor_view_diplay_changed (GimpCursorView *view,
|
|||
GimpDisplayShell *shell = NULL;
|
||||
|
||||
if (display)
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
if (view->priv->shell)
|
||||
{
|
||||
|
|
|
@ -277,7 +277,7 @@ gimp_displays_set_busy (Gimp *gimp)
|
|||
list = g_list_next (list))
|
||||
{
|
||||
GimpDisplayShell *shell =
|
||||
GIMP_DISPLAY_SHELL (GIMP_DISPLAY (list->data)->shell);
|
||||
gimp_display_get_shell (GIMP_DISPLAY (list->data));
|
||||
|
||||
gimp_display_shell_set_override_cursor (shell, GDK_WATCH);
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ gimp_displays_unset_busy (Gimp *gimp)
|
|||
list = g_list_next (list))
|
||||
{
|
||||
GimpDisplayShell *shell =
|
||||
GIMP_DISPLAY_SHELL (GIMP_DISPLAY (list->data)->shell);
|
||||
gimp_display_get_shell (GIMP_DISPLAY (list->data));
|
||||
|
||||
gimp_display_shell_unset_override_cursor (shell);
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ gimp_navigation_editor_display_changed (GimpContext *context,
|
|||
GimpDisplayShell *shell = NULL;
|
||||
|
||||
if (display)
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_navigation_editor_set_shell (editor, shell);
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ gimp_dbus_service_activate (GimpDBusService *service,
|
|||
display = gimp_container_get_first_child (service->gimp->displays);
|
||||
|
||||
if (display)
|
||||
gimp_display_shell_present (GIMP_DISPLAY_SHELL (GIMP_DISPLAY (display)->shell));
|
||||
gimp_display_shell_present (gimp_display_get_shell (GIMP_DISPLAY (display)));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ gui_unique_win32_idle_open (IdleOpenData *data)
|
|||
|
||||
display = gimp_container_get_first_child (unique_gimp->displays);
|
||||
|
||||
gimp_display_shell_present (GIMP_DISPLAY_SHELL (GIMP_DISPLAY (display)->shell));
|
||||
gimp_display_shell_present (gimp_display_get_shell (GIMP_DISPLAY (display)));
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
|
|
@ -720,7 +720,7 @@ gui_menu_show_tooltip (GimpUIManager *manager,
|
|||
|
||||
if (display)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpStatusbar *statusbar = gimp_display_shell_get_statusbar (shell);
|
||||
|
||||
gimp_statusbar_push (statusbar, "menu-tooltip",
|
||||
|
@ -737,7 +737,7 @@ gui_menu_hide_tooltip (GimpUIManager *manager,
|
|||
|
||||
if (display)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpStatusbar *statusbar = gimp_display_shell_get_statusbar (shell);
|
||||
|
||||
gimp_statusbar_pop (statusbar, "menu-tooltip");
|
||||
|
|
|
@ -322,7 +322,7 @@ gimp_align_tool_button_release (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpAlignTool *align_tool = GIMP_ALIGN_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GObject *object = NULL;
|
||||
GimpImage *image = display->image;
|
||||
gint i;
|
||||
|
@ -479,7 +479,7 @@ gimp_align_tool_oper_update (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpAlignTool *align_tool = GIMP_ALIGN_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
gint snap_distance;
|
||||
|
||||
snap_distance =
|
||||
|
|
|
@ -302,7 +302,7 @@ gimp_brush_tool_draw_brush (GimpBrushTool *brush_tool,
|
|||
|
||||
if (brush_core->brush_bound_segs)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (draw_tool->display);
|
||||
gdouble width = brush_core->brush_bound_width;
|
||||
gdouble height = brush_core->brush_bound_height;
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ gimp_color_tool_control (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
switch (action)
|
||||
{
|
||||
|
@ -234,7 +234,7 @@ gimp_color_tool_button_press (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
/* Chain up to activate the tool */
|
||||
GIMP_TOOL_CLASS (parent_class)->button_press (tool, coords, time, state,
|
||||
|
@ -289,7 +289,7 @@ gimp_color_tool_button_release (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
/* Chain up to halt the tool */
|
||||
GIMP_TOOL_CLASS (parent_class)->button_release (tool, coords, time, state,
|
||||
|
@ -376,7 +376,7 @@ gimp_color_tool_motion (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
if (! color_tool->enabled)
|
||||
return;
|
||||
|
@ -470,7 +470,7 @@ gimp_color_tool_oper_update (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpSamplePoint *sample_point = NULL;
|
||||
|
||||
if (color_tool->enabled &&
|
||||
|
@ -813,7 +813,7 @@ gimp_color_tool_start_sample_point (GimpTool *tool,
|
|||
|
||||
color_tool = GIMP_COLOR_TOOL (tool);
|
||||
|
||||
gimp_display_shell_selection_control (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_selection_control (gimp_display_get_shell (display),
|
||||
GIMP_SELECTION_PAUSE);
|
||||
|
||||
tool->display = display;
|
||||
|
@ -821,7 +821,7 @@ gimp_color_tool_start_sample_point (GimpTool *tool,
|
|||
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
|
||||
|
||||
if (color_tool->sample_point)
|
||||
gimp_display_shell_draw_sample_point (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_draw_sample_point (gimp_display_get_shell (display),
|
||||
color_tool->sample_point, FALSE);
|
||||
|
||||
color_tool->sample_point = NULL;
|
||||
|
|
|
@ -175,13 +175,9 @@ void
|
|||
gimp_draw_tool_start (GimpDrawTool *draw_tool,
|
||||
GimpDisplay *display)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
g_return_if_fail (GIMP_IS_DISPLAY (display));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
|
||||
gimp_draw_tool_stop (draw_tool);
|
||||
|
||||
draw_tool->display = display;
|
||||
|
@ -299,7 +295,7 @@ gimp_draw_tool_calc_distance_square (GimpDrawTool *draw_tool,
|
|||
g_return_val_if_fail (GIMP_IS_DRAW_TOOL (draw_tool), 0.0);
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY (display), 0.0);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_display_shell_transform_xy_f (shell, x1, y1, &tx1, &ty1, FALSE);
|
||||
gimp_display_shell_transform_xy_f (shell, x2, y2, &tx2, &ty2, FALSE);
|
||||
|
@ -344,7 +340,7 @@ gimp_draw_tool_set_clip_rect (GimpDrawTool *draw_tool,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
if (rect)
|
||||
{
|
||||
|
@ -400,7 +396,7 @@ gimp_draw_tool_draw_line (GimpDrawTool *draw_tool,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
gimp_display_shell_transform_xy_f (shell,
|
||||
x1, y1,
|
||||
|
@ -443,7 +439,7 @@ gimp_draw_tool_draw_dashed_line (GimpDrawTool *draw_tool,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
gimp_display_shell_transform_xy_f (shell,
|
||||
x1, y1,
|
||||
|
@ -479,7 +475,7 @@ gimp_draw_tool_draw_guide_line (GimpDrawTool *draw_tool,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
x1 = 0;
|
||||
y1 = 0;
|
||||
|
@ -535,7 +531,7 @@ gimp_draw_tool_draw_rectangle (GimpDrawTool *draw_tool,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
gimp_display_shell_transform_xy_f (shell,
|
||||
MIN (x, x + width), MIN (y, y + height),
|
||||
|
@ -582,7 +578,7 @@ gimp_draw_tool_draw_arc (GimpDrawTool *draw_tool,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
gimp_display_shell_transform_xy_f (shell,
|
||||
MIN (x, x + width), MIN (y, y + height),
|
||||
|
@ -638,7 +634,7 @@ gimp_draw_tool_draw_rectangle_by_anchor (GimpDrawTool *draw_tool,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
gimp_display_shell_transform_xy_f (shell,
|
||||
x, y,
|
||||
|
@ -680,7 +676,7 @@ gimp_draw_tool_draw_arc_by_anchor (GimpDrawTool *draw_tool,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
gimp_display_shell_transform_xy_f (shell,
|
||||
x, y,
|
||||
|
@ -719,7 +715,7 @@ gimp_draw_tool_draw_cross_by_anchor (GimpDrawTool *draw_tool,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
gimp_display_shell_transform_xy_f (shell,
|
||||
x, y,
|
||||
|
@ -855,7 +851,7 @@ gimp_draw_tool_draw_corner (GimpDrawTool *draw_tool,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
canvas = GIMP_CANVAS (shell->canvas);
|
||||
|
||||
gimp_display_shell_transform_xy (shell, x1, y1, &tx1, &ty1, use_offsets);
|
||||
|
@ -1263,7 +1259,7 @@ gimp_draw_tool_draw_lines (GimpDrawTool *draw_tool,
|
|||
if (points == NULL || n_points == 0)
|
||||
return;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
coords = g_new (GdkPoint, n_points);
|
||||
|
||||
|
@ -1301,7 +1297,7 @@ gimp_draw_tool_draw_strokes (GimpDrawTool *draw_tool,
|
|||
if (n_points == 0)
|
||||
return;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
coords = g_new (GdkPoint, n_points);
|
||||
|
||||
|
@ -1357,7 +1353,7 @@ gimp_draw_tool_draw_boundary (GimpDrawTool *draw_tool,
|
|||
g_return_if_fail (n_bound_segs > 0);
|
||||
g_return_if_fail (bound_segs != NULL);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
gdk_points = g_new0 (GdkPoint, n_bound_segs + 1);
|
||||
n_gdk_points = 0;
|
||||
|
@ -1467,7 +1463,7 @@ gimp_draw_tool_draw_text_cursor (GimpDrawTool *draw_tool,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
gimp_display_shell_transform_xy_f (shell,
|
||||
x1, y1,
|
||||
|
@ -1547,7 +1543,7 @@ gimp_draw_tool_on_handle (GimpDrawTool *draw_tool,
|
|||
g_return_val_if_fail (GIMP_IS_DRAW_TOOL (draw_tool), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY (display), FALSE);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_display_shell_transform_xy_f (shell,
|
||||
x, y,
|
||||
|
|
|
@ -204,7 +204,7 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
|
|||
|
||||
tool = GIMP_TOOL (edit_select);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
/* Make a check to see if it should be a floating selection translation */
|
||||
if ((edit_mode == GIMP_TRANSLATE_MODE_MASK_TO_LAYER ||
|
||||
|
@ -475,7 +475,7 @@ gimp_edit_selection_tool_button_release (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpEditSelectionTool *edit_select = GIMP_EDIT_SELECTION_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpItem *active_item;
|
||||
|
||||
/* resume the current selection */
|
||||
|
@ -1147,7 +1147,7 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
|
|||
|
||||
/* adapt arrow velocity to the zoom factor when holding <shift> */
|
||||
velocity = (ARROW_VELOCITY /
|
||||
gimp_zoom_model_get_factor (GIMP_DISPLAY_SHELL (display->shell)->zoom));
|
||||
gimp_zoom_model_get_factor (gimp_display_get_shell (display)->zoom));
|
||||
velocity = MAX (1.0, velocity);
|
||||
|
||||
/* check the event queue for key events with the same modifier mask
|
||||
|
|
|
@ -571,7 +571,7 @@ gimp_foreground_select_tool_draw (GimpDrawTool *draw_tool)
|
|||
|
||||
if (fg_select->stroke)
|
||||
{
|
||||
gimp_display_shell_draw_pen (GIMP_DISPLAY_SHELL (draw_tool->display->shell),
|
||||
gimp_display_shell_draw_pen (gimp_display_get_shell (draw_tool->display),
|
||||
(const GimpVector2 *)fg_select->stroke->data,
|
||||
fg_select->stroke->len,
|
||||
GIMP_CONTEXT (options),
|
||||
|
@ -583,7 +583,7 @@ gimp_foreground_select_tool_draw (GimpDrawTool *draw_tool)
|
|||
|
||||
if (fg_select->mask)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (draw_tool->display);
|
||||
gint x = fg_select->last_coords.x;
|
||||
gint y = fg_select->last_coords.y;
|
||||
gdouble radius;
|
||||
|
@ -732,7 +732,7 @@ gimp_foreground_select_tool_set_mask (GimpForegroundSelectTool *fg_select,
|
|||
if (mask)
|
||||
fg_select->mask = g_object_ref (mask);
|
||||
|
||||
gimp_display_shell_set_mask (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_set_mask (gimp_display_get_shell (display),
|
||||
GIMP_DRAWABLE (mask), options->mask_color);
|
||||
|
||||
if (mask)
|
||||
|
@ -816,7 +816,7 @@ gimp_foreground_select_tool_push_stroke (GimpForegroundSelectTool *fg_select,
|
|||
GimpDisplay *display,
|
||||
GimpForegroundSelectOptions *options)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
FgSelectStroke *stroke;
|
||||
|
||||
g_return_if_fail (fg_select->stroke != NULL);
|
||||
|
@ -891,7 +891,7 @@ gimp_foreground_select_options_notify (GimpForegroundSelectOptions *options,
|
|||
GimpTool *tool = GIMP_TOOL (fg_select);
|
||||
|
||||
if (tool->display)
|
||||
gimp_display_shell_set_mask (GIMP_DISPLAY_SHELL (tool->display->shell),
|
||||
gimp_display_shell_set_mask (gimp_display_get_shell (tool->display),
|
||||
GIMP_DRAWABLE (fg_select->mask),
|
||||
options->mask_color);
|
||||
}
|
||||
|
|
|
@ -450,7 +450,7 @@ gimp_image_map_tool_pick_color (GimpColorTool *color_tool,
|
|||
static void
|
||||
gimp_image_map_tool_map (GimpImageMapTool *tool)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (GIMP_TOOL (tool)->display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (GIMP_TOOL (tool)->display);
|
||||
GimpItem *item = GIMP_ITEM (tool->drawable);
|
||||
gint x, y;
|
||||
gint w, h;
|
||||
|
|
|
@ -163,7 +163,7 @@ gimp_magnify_tool_button_release (GimpTool *tool,
|
|||
{
|
||||
GimpMagnifyTool *magnify = GIMP_MAGNIFY_TOOL (tool);
|
||||
GimpMagnifyOptions *options = GIMP_MAGNIFY_TOOL_GET_OPTIONS (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (tool->display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (tool->display);
|
||||
|
||||
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ gimp_measure_tool_button_press (GimpTool *tool,
|
|||
{
|
||||
GimpMeasureTool *measure = GIMP_MEASURE_TOOL (tool);
|
||||
GimpMeasureOptions *options = GIMP_MEASURE_TOOL_GET_OPTIONS (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
gint i;
|
||||
|
||||
/* if we are changing displays, pop the statusbar of the old one */
|
||||
|
@ -741,7 +741,7 @@ gimp_measure_tool_draw (GimpDrawTool *draw_tool)
|
|||
gdouble target;
|
||||
gdouble arc_radius;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (tool->display->shell);
|
||||
shell = gimp_display_get_shell (tool->display);
|
||||
|
||||
target = FUNSCALEX (shell, (TARGET >> 1));
|
||||
arc_radius = FUNSCALEX (shell, ARC_RADIUS);
|
||||
|
@ -811,7 +811,7 @@ static void
|
|||
gimp_measure_tool_dialog_update (GimpMeasureTool *measure,
|
||||
GimpDisplay *display)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpImage *image = display->image;
|
||||
gint ax, ay;
|
||||
gint bx, by;
|
||||
|
|
|
@ -180,7 +180,7 @@ gimp_move_tool_control (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpMoveTool *move = GIMP_MOVE_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
switch (action)
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ gimp_move_tool_button_press (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpMoveTool *move = GIMP_MOVE_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpMoveOptions *options = GIMP_MOVE_TOOL_GET_OPTIONS (tool);
|
||||
|
||||
tool->display = display;
|
||||
|
@ -359,7 +359,7 @@ gimp_move_tool_button_release (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpMoveTool *move = GIMP_MOVE_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpGuiConfig *config = GIMP_GUI_CONFIG (display->image->gimp->config);
|
||||
|
||||
if (gimp_tool_control_is_active (tool->control))
|
||||
|
@ -505,7 +505,7 @@ gimp_move_tool_motion (GimpTool *tool,
|
|||
|
||||
{
|
||||
GimpMoveTool *move = GIMP_MOVE_TOOL (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
if (move->moving_guide)
|
||||
{
|
||||
|
@ -655,7 +655,7 @@ gimp_move_tool_oper_update (GimpTool *tool,
|
|||
{
|
||||
GimpMoveTool *move = GIMP_MOVE_TOOL (tool);
|
||||
GimpMoveOptions *options = GIMP_MOVE_TOOL_GET_OPTIONS (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpGuide *guide = NULL;
|
||||
|
||||
if (options->move_type == GIMP_TRANSFORM_TYPE_LAYER &&
|
||||
|
@ -688,7 +688,7 @@ gimp_move_tool_cursor_update (GimpTool *tool,
|
|||
GdkModifierType state,
|
||||
GimpDisplay *display)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpMoveOptions *options = GIMP_MOVE_TOOL_GET_OPTIONS (tool);
|
||||
GimpCursorType cursor = GIMP_CURSOR_MOUSE;
|
||||
GimpToolCursorType tool_cursor = GIMP_TOOL_CURSOR_MOVE;
|
||||
|
@ -819,7 +819,7 @@ gimp_move_tool_start_guide (GimpMoveTool *move,
|
|||
{
|
||||
GimpTool *tool = GIMP_TOOL (move);
|
||||
|
||||
gimp_display_shell_selection_control (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_selection_control (gimp_display_get_shell (display),
|
||||
GIMP_SELECTION_PAUSE);
|
||||
|
||||
tool->display = display;
|
||||
|
@ -827,7 +827,7 @@ gimp_move_tool_start_guide (GimpMoveTool *move,
|
|||
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
|
||||
|
||||
if (move->guide)
|
||||
gimp_display_shell_draw_guide (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_draw_guide (gimp_display_get_shell (display),
|
||||
move->guide, FALSE);
|
||||
|
||||
move->guide = NULL;
|
||||
|
|
|
@ -576,7 +576,7 @@ gimp_paint_tool_oper_update (GimpTool *tool,
|
|||
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
|
||||
GimpPaintOptions *paint_options = GIMP_PAINT_TOOL_GET_OPTIONS (tool);
|
||||
GimpPaintCore *core = paint_tool->core;
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
if (gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)))
|
||||
|
|
|
@ -382,7 +382,7 @@ gimp_rectangle_select_tool_button_press (GimpTool *tool,
|
|||
|
||||
rectangle = GIMP_RECTANGLE_TOOL (tool);
|
||||
rect_sel_tool = GIMP_RECTANGLE_SELECT_TOOL (tool);
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
priv = GIMP_RECTANGLE_SELECT_TOOL_GET_PRIVATE (rect_sel_tool);
|
||||
|
||||
if (tool->display && display != tool->display)
|
||||
|
@ -475,7 +475,7 @@ gimp_rectangle_select_tool_button_release (GimpTool *tool,
|
|||
priv = GIMP_RECTANGLE_SELECT_TOOL_GET_PRIVATE (rect_sel_tool);
|
||||
|
||||
gimp_tool_pop_status (tool, display);
|
||||
gimp_display_shell_set_show_selection (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_set_show_selection (gimp_display_get_shell (display),
|
||||
priv->saved_show_selection);
|
||||
|
||||
/*
|
||||
|
|
|
@ -1949,7 +1949,7 @@ gimp_rectangle_tool_update_handle_sizes (GimpRectangleTool *rect_tool)
|
|||
if (! (tool && tool->display))
|
||||
return;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (tool->display->shell);
|
||||
shell = gimp_display_get_shell (tool->display);
|
||||
|
||||
gimp_rectangle_tool_get_public_rect (rect_tool,
|
||||
&pub_x1, &pub_y1, &pub_x2, &pub_y2);
|
||||
|
@ -2054,7 +2054,7 @@ gimp_rectangle_tool_scale_has_changed (GimpRectangleTool *rect_tool)
|
|||
if (! tool->display)
|
||||
return TRUE;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (tool->display->shell);
|
||||
shell = gimp_display_get_shell (tool->display);
|
||||
|
||||
return (shell->scale_x != private->scale_x_used_for_handle_size_calculations
|
||||
||
|
||||
|
@ -2169,7 +2169,7 @@ gimp_rectangle_tool_halt (GimpRectangleTool *rect_tool)
|
|||
|
||||
if (tool->display)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (tool->display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (tool->display);
|
||||
|
||||
gimp_display_shell_set_highlight (shell, NULL);
|
||||
|
||||
|
@ -2651,7 +2651,7 @@ gimp_rectangle_tool_coord_outside (GimpRectangleTool *rect_tool,
|
|||
|
||||
private = GIMP_RECTANGLE_TOOL_GET_PRIVATE (rect_tool);
|
||||
narrow_mode = private->narrow_mode;
|
||||
shell = GIMP_DISPLAY_SHELL (GIMP_TOOL (rect_tool)->display->shell);
|
||||
shell = gimp_display_get_shell (GIMP_TOOL (rect_tool)->display);
|
||||
|
||||
gimp_rectangle_tool_get_public_rect (rect_tool,
|
||||
&pub_x1, &pub_y1, &pub_x2, &pub_y2);
|
||||
|
@ -2693,7 +2693,7 @@ gimp_rectangle_tool_coord_on_handle (GimpRectangleTool *rect_tool,
|
|||
|
||||
tool = GIMP_TOOL (rect_tool);
|
||||
draw_tool = GIMP_DRAW_TOOL (tool);
|
||||
shell = GIMP_DISPLAY_SHELL (tool->display->shell);
|
||||
shell = gimp_display_get_shell (tool->display);
|
||||
private = GIMP_RECTANGLE_TOOL_GET_PRIVATE (tool);
|
||||
|
||||
gimp_rectangle_tool_get_public_rect (rect_tool,
|
||||
|
@ -2870,7 +2870,7 @@ gimp_rectangle_tool_update_highlight (GimpRectangleTool *rect_tool)
|
|||
if (! tool->display)
|
||||
return;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (tool->display->shell);
|
||||
shell = gimp_display_get_shell (tool->display);
|
||||
|
||||
g_object_get (options, "highlight", &highlight, NULL);
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ gimp_region_select_tool_draw (GimpDrawTool *draw_tool)
|
|||
{
|
||||
GimpDisplayShell *shell;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (GIMP_TOOL (draw_tool)->display->shell);
|
||||
shell = gimp_display_get_shell (GIMP_TOOL (draw_tool)->display);
|
||||
|
||||
gimp_canvas_draw_segments (GIMP_CANVAS (shell->canvas),
|
||||
GIMP_CANVAS_STYLE_XOR,
|
||||
|
@ -343,7 +343,7 @@ gimp_region_select_tool_calculate (GimpRegionSelectTool *region_sel,
|
|||
{
|
||||
GimpTool *tool = GIMP_TOOL (region_sel);
|
||||
GimpRegionSelectOptions *options = GIMP_REGION_SELECT_TOOL_GET_OPTIONS (tool);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpDrawable *drawable;
|
||||
GdkSegment *segs;
|
||||
BoundSeg *bsegs;
|
||||
|
|
|
@ -260,7 +260,7 @@ gimp_rotate_tool_prepare (GimpTransformTool *tr_tool,
|
|||
tr_tool);
|
||||
|
||||
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (rotate->sizeentry),
|
||||
GIMP_DISPLAY_SHELL (display->shell)->unit);
|
||||
gimp_display_get_shell (display)->unit);
|
||||
|
||||
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (rotate->sizeentry), 0,
|
||||
xres, FALSE);
|
||||
|
|
|
@ -164,7 +164,7 @@ gimp_scale_tool_prepare (GimpTransformTool *tr_tool,
|
|||
"width", tr_tool->x2 - tr_tool->x1,
|
||||
"height", tr_tool->y2 - tr_tool->y1,
|
||||
"keep-aspect", options->constrain,
|
||||
"unit", GIMP_DISPLAY_SHELL (display->shell)->unit,
|
||||
"unit", gimp_display_get_shell (display)->unit,
|
||||
"xresolution", xres,
|
||||
"yresolution", yres,
|
||||
NULL);
|
||||
|
|
|
@ -2248,7 +2248,7 @@ gimp_text_tool_canvas_editor (GimpTextTool *text_tool)
|
|||
GimpTextOptions *options = GIMP_TEXT_TOOL_GET_OPTIONS (text_tool);
|
||||
|
||||
gtk_im_context_set_client_window (text_tool->im_context,
|
||||
GIMP_DISPLAY_SHELL (tool->display->shell)->canvas->window);
|
||||
gimp_display_get_shell (tool->display)->canvas->window);
|
||||
|
||||
gtk_im_context_focus_in (text_tool->im_context);
|
||||
|
||||
|
|
|
@ -563,7 +563,7 @@ gimp_tool_check_click_distance (GimpTool *tool,
|
|||
}
|
||||
else
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
gdouble dx;
|
||||
gdouble dy;
|
||||
|
||||
|
@ -902,7 +902,7 @@ gimp_tool_push_status (GimpTool *tool,
|
|||
g_return_if_fail (GIMP_IS_DISPLAY (display));
|
||||
g_return_if_fail (format != NULL);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
|
||||
|
||||
|
@ -934,7 +934,7 @@ gimp_tool_push_status_coords (GimpTool *tool,
|
|||
g_return_if_fail (GIMP_IS_TOOL (tool));
|
||||
g_return_if_fail (GIMP_IS_DISPLAY (display));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
|
||||
|
||||
|
@ -961,7 +961,7 @@ gimp_tool_push_status_length (GimpTool *tool,
|
|||
g_return_if_fail (GIMP_IS_TOOL (tool));
|
||||
g_return_if_fail (GIMP_IS_DISPLAY (display));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
|
||||
|
||||
|
@ -987,7 +987,7 @@ gimp_tool_replace_status (GimpTool *tool,
|
|||
g_return_if_fail (GIMP_IS_DISPLAY (display));
|
||||
g_return_if_fail (format != NULL);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
|
||||
|
||||
|
@ -1012,7 +1012,7 @@ gimp_tool_pop_status (GimpTool *tool,
|
|||
g_return_if_fail (GIMP_IS_TOOL (tool));
|
||||
g_return_if_fail (GIMP_IS_DISPLAY (display));
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_statusbar_pop (gimp_display_shell_get_statusbar (shell),
|
||||
G_OBJECT_TYPE_NAME (tool));
|
||||
|
@ -1063,7 +1063,7 @@ gimp_tool_set_cursor (GimpTool *tool,
|
|||
g_return_if_fail (GIMP_IS_TOOL (tool));
|
||||
g_return_if_fail (GIMP_IS_DISPLAY (display));
|
||||
|
||||
gimp_display_shell_set_cursor (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_set_cursor (gimp_display_get_shell (display),
|
||||
cursor, tool_cursor, modifier);
|
||||
}
|
||||
|
||||
|
|
|
@ -1175,7 +1175,7 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
|
|||
GimpTool *tool = GIMP_TOOL (tr_tool);
|
||||
GimpTransformOptions *options = GIMP_TRANSFORM_TOOL_GET_OPTIONS (tool);
|
||||
GimpContext *context = GIMP_CONTEXT (options);
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpItem *active_item = NULL;
|
||||
TileManager *new_tiles;
|
||||
const gchar *null_message = NULL;
|
||||
|
@ -1425,7 +1425,7 @@ gimp_transform_tool_force_expose_preview (GimpTransformTool *tr_tool)
|
|||
if (! gimp_draw_tool_is_active (GIMP_DRAW_TOOL (tr_tool)))
|
||||
return;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (GIMP_DRAW_TOOL (tr_tool)->display->shell);
|
||||
shell = gimp_display_get_shell (GIMP_DRAW_TOOL (tr_tool)->display);
|
||||
|
||||
gimp_display_shell_transform_xy_f (shell, tr_tool->tx1, tr_tool->ty1,
|
||||
dx + 0, dy + 0, FALSE);
|
||||
|
@ -1478,7 +1478,7 @@ gimp_transform_tool_halt (GimpTransformTool *tr_tool)
|
|||
{
|
||||
GimpDisplayShell *shell;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (GIMP_DRAW_TOOL (tr_tool)->display->shell);
|
||||
shell = gimp_display_get_shell (GIMP_DRAW_TOOL (tr_tool)->display);
|
||||
|
||||
if (gimp_display_shell_get_show_transform (shell))
|
||||
{
|
||||
|
@ -1672,19 +1672,19 @@ gimp_transform_tool_handles_recalc (GimpTransformTool *tr_tool,
|
|||
gint x1, y1;
|
||||
gint x2, y2;
|
||||
|
||||
gimp_display_shell_transform_xy (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_transform_xy (gimp_display_get_shell (display),
|
||||
tr_tool->tx1, tr_tool->ty1,
|
||||
&dx1, &dy1,
|
||||
FALSE);
|
||||
gimp_display_shell_transform_xy (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_transform_xy (gimp_display_get_shell (display),
|
||||
tr_tool->tx2, tr_tool->ty2,
|
||||
&dx2, &dy2,
|
||||
FALSE);
|
||||
gimp_display_shell_transform_xy (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_transform_xy (gimp_display_get_shell (display),
|
||||
tr_tool->tx3, tr_tool->ty3,
|
||||
&dx3, &dy3,
|
||||
FALSE);
|
||||
gimp_display_shell_transform_xy (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_transform_xy (gimp_display_get_shell (display),
|
||||
tr_tool->tx4, tr_tool->ty4,
|
||||
&dx4, &dy4,
|
||||
FALSE);
|
||||
|
@ -1745,7 +1745,7 @@ gimp_transform_tool_prepare (GimpTransformTool *tr_tool,
|
|||
options->type == GIMP_TRANSFORM_TYPE_LAYER &&
|
||||
options->direction == GIMP_TRANSFORM_FORWARD);
|
||||
|
||||
gimp_display_shell_set_show_transform (GIMP_DISPLAY_SHELL (display->shell),
|
||||
gimp_display_shell_set_show_transform (gimp_display_get_shell (display),
|
||||
show_transform);
|
||||
|
||||
if (tr_tool->dialog)
|
||||
|
@ -1859,7 +1859,7 @@ gimp_transform_tool_notify_preview (GimpTransformOptions *options,
|
|||
GimpDisplayShell *shell = NULL;
|
||||
|
||||
if (gimp_draw_tool_is_active (GIMP_DRAW_TOOL (tr_tool)))
|
||||
shell = GIMP_DISPLAY_SHELL (GIMP_DRAW_TOOL (tr_tool)->display->shell);
|
||||
shell = gimp_display_get_shell (GIMP_DRAW_TOOL (tr_tool)->display);
|
||||
|
||||
switch (options->preview_type)
|
||||
{
|
||||
|
|
|
@ -805,7 +805,7 @@ gimp_vector_tool_key_press (GimpTool *tool,
|
|||
if (display != draw_tool->display)
|
||||
return FALSE;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
|
||||
shell = gimp_display_get_shell (draw_tool->display);
|
||||
|
||||
if (kevent->state & GDK_SHIFT_MASK)
|
||||
pixels = 10.0;
|
||||
|
|
Loading…
Reference in New Issue