diff --git a/app/actions/actions.c b/app/actions/actions.c index 85ff0cff34..5d8effde08 100644 --- a/app/actions/actions.c +++ b/app/actions/actions.c @@ -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; diff --git a/app/actions/buffers-commands.c b/app/actions/buffers-commands.c index c75171d29a..952d20f5fc 100644 --- a/app/actions/buffers-commands.c +++ b/app/actions/buffers-commands.c @@ -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); diff --git a/app/actions/debug-commands.c b/app/actions/debug-commands.c index 915a84b4db..f65914507c 100644 --- a/app/actions/debug-commands.c +++ b/app/actions/debug-commands.c @@ -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); diff --git a/app/actions/documents-commands.c b/app/actions/documents-commands.c index 09f7459c00..05f48b3eae 100644 --- a/app/actions/documents-commands.c +++ b/app/actions/documents-commands.c @@ -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)); } } diff --git a/app/actions/edit-commands.c b/app/actions/edit-commands.c index 1ac978f01b..e02b9e63c3 100644 --- a/app/actions/edit-commands.c +++ b/app/actions/edit-commands.c @@ -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; diff --git a/app/actions/image-commands.c b/app/actions/image-commands.c index a307f3ff4d..1eb8af7be1 100644 --- a/app/actions/image-commands.c +++ b/app/actions/image-commands.c @@ -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, diff --git a/app/actions/images-commands.c b/app/actions/images-commands.c index 2efe98373f..a9d0648c94 100644 --- a/app/actions/images-commands.c +++ b/app/actions/images-commands.c @@ -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)); } } } diff --git a/app/actions/layers-commands.c b/app/actions/layers-commands.c index b18aec1b1b..3614055f23 100644 --- a/app/actions/layers-commands.c +++ b/app/actions/layers-commands.c @@ -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; diff --git a/app/actions/select-commands.c b/app/actions/select-commands.c index 9fc0552d29..b74720f613 100644 --- a/app/actions/select-commands.c +++ b/app/actions/select-commands.c @@ -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", diff --git a/app/actions/view-actions.c b/app/actions/view-actions.c index 36f185d7ad..c7a3794f15 100644 --- a/app/actions/view-actions.c +++ b/app/actions/view-actions.c @@ -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) diff --git a/app/actions/view-commands.c b/app/actions/view-commands.c index db2bd1d980..5858010f9a 100644 --- a/app/actions/view-commands.c +++ b/app/actions/view-commands.c @@ -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)); diff --git a/app/actions/windows-commands.c b/app/actions/windows-commands.c index 7b5614727b..4938fd5599 100644 --- a/app/actions/windows-commands.c +++ b/app/actions/windows-commands.c @@ -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 diff --git a/app/dialogs/quit-dialog.c b/app/dialogs/quit-dialog.c index 863625a117..3305969830 100644 --- a/app/dialogs/quit-dialog.c +++ b/app/dialogs/quit-dialog.c @@ -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)); } } diff --git a/app/display/gimpcursorview.c b/app/display/gimpcursorview.c index 130db1ab7f..98dc99d844 100644 --- a/app/display/gimpcursorview.c +++ b/app/display/gimpcursorview.c @@ -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) { diff --git a/app/display/gimpdisplay-foreach.c b/app/display/gimpdisplay-foreach.c index ecdb6301c0..8ce8a12d57 100644 --- a/app/display/gimpdisplay-foreach.c +++ b/app/display/gimpdisplay-foreach.c @@ -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); } diff --git a/app/display/gimpnavigationeditor.c b/app/display/gimpnavigationeditor.c index af5966dc61..c8456a1ffb 100644 --- a/app/display/gimpnavigationeditor.c +++ b/app/display/gimpnavigationeditor.c @@ -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); } diff --git a/app/gui/gimpdbusservice.c b/app/gui/gimpdbusservice.c index 47f343135d..67bf6f9b45 100644 --- a/app/gui/gimpdbusservice.c +++ b/app/gui/gimpdbusservice.c @@ -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; } diff --git a/app/gui/gui-unique.c b/app/gui/gui-unique.c index 16203d9f1f..7c93a1a04c 100644 --- a/app/gui/gui-unique.c +++ b/app/gui/gui-unique.c @@ -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; diff --git a/app/gui/gui.c b/app/gui/gui.c index 27c71415eb..b92e45c9e6 100644 --- a/app/gui/gui.c +++ b/app/gui/gui.c @@ -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"); diff --git a/app/tools/gimpaligntool.c b/app/tools/gimpaligntool.c index 39b90d4037..3fcb4c72b7 100644 --- a/app/tools/gimpaligntool.c +++ b/app/tools/gimpaligntool.c @@ -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 = diff --git a/app/tools/gimpbrushtool.c b/app/tools/gimpbrushtool.c index 6b77067f8b..da250aa6fe 100644 --- a/app/tools/gimpbrushtool.c +++ b/app/tools/gimpbrushtool.c @@ -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; diff --git a/app/tools/gimpcolortool.c b/app/tools/gimpcolortool.c index 4f57dee66b..f0dd259e28 100644 --- a/app/tools/gimpcolortool.c +++ b/app/tools/gimpcolortool.c @@ -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; diff --git a/app/tools/gimpdrawtool.c b/app/tools/gimpdrawtool.c index 00133a83cf..5aa09d936d 100644 --- a/app/tools/gimpdrawtool.c +++ b/app/tools/gimpdrawtool.c @@ -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, diff --git a/app/tools/gimpeditselectiontool.c b/app/tools/gimpeditselectiontool.c index fe1efa8542..734dd67a93 100644 --- a/app/tools/gimpeditselectiontool.c +++ b/app/tools/gimpeditselectiontool.c @@ -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 */ 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 diff --git a/app/tools/gimpforegroundselecttool.c b/app/tools/gimpforegroundselecttool.c index b6e612b88b..ce605b0d00 100644 --- a/app/tools/gimpforegroundselecttool.c +++ b/app/tools/gimpforegroundselecttool.c @@ -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); } diff --git a/app/tools/gimpimagemaptool.c b/app/tools/gimpimagemaptool.c index d9fe0f3d53..552618b983 100644 --- a/app/tools/gimpimagemaptool.c +++ b/app/tools/gimpimagemaptool.c @@ -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; diff --git a/app/tools/gimpmagnifytool.c b/app/tools/gimpmagnifytool.c index af604231b1..2e985b0563 100644 --- a/app/tools/gimpmagnifytool.c +++ b/app/tools/gimpmagnifytool.c @@ -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)); diff --git a/app/tools/gimpmeasuretool.c b/app/tools/gimpmeasuretool.c index fa072cf502..2ba02c883d 100644 --- a/app/tools/gimpmeasuretool.c +++ b/app/tools/gimpmeasuretool.c @@ -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; diff --git a/app/tools/gimpmovetool.c b/app/tools/gimpmovetool.c index 71bd50cc1e..816ad055d2 100644 --- a/app/tools/gimpmovetool.c +++ b/app/tools/gimpmovetool.c @@ -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; diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c index 744405b379..2cd5311b84 100644 --- a/app/tools/gimppainttool.c +++ b/app/tools/gimppainttool.c @@ -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))) diff --git a/app/tools/gimprectangleselecttool.c b/app/tools/gimprectangleselecttool.c index 4a3ba6b5a4..9d51364a60 100644 --- a/app/tools/gimprectangleselecttool.c +++ b/app/tools/gimprectangleselecttool.c @@ -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); /* diff --git a/app/tools/gimprectangletool.c b/app/tools/gimprectangletool.c index f6b1332d81..d212c900de 100644 --- a/app/tools/gimprectangletool.c +++ b/app/tools/gimprectangletool.c @@ -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); diff --git a/app/tools/gimpregionselecttool.c b/app/tools/gimpregionselecttool.c index 1ab91298ae..cc444aae23 100644 --- a/app/tools/gimpregionselecttool.c +++ b/app/tools/gimpregionselecttool.c @@ -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; diff --git a/app/tools/gimprotatetool.c b/app/tools/gimprotatetool.c index 8677203f0a..3ec79da833 100644 --- a/app/tools/gimprotatetool.c +++ b/app/tools/gimprotatetool.c @@ -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); diff --git a/app/tools/gimpscaletool.c b/app/tools/gimpscaletool.c index 5bef6d94d1..a4bb99bc61 100644 --- a/app/tools/gimpscaletool.c +++ b/app/tools/gimpscaletool.c @@ -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); diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c index d7cfd31c79..e5f386c320 100644 --- a/app/tools/gimptexttool.c +++ b/app/tools/gimptexttool.c @@ -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); diff --git a/app/tools/gimptool.c b/app/tools/gimptool.c index 931b6c479b..252d7dfa35 100644 --- a/app/tools/gimptool.c +++ b/app/tools/gimptool.c @@ -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); } diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c index 64181420c4..06d3d67b51 100644 --- a/app/tools/gimptransformtool.c +++ b/app/tools/gimptransformtool.c @@ -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) { diff --git a/app/tools/gimpvectortool.c b/app/tools/gimpvectortool.c index cdf8956a1e..236740c573 100644 --- a/app/tools/gimpvectortool.c +++ b/app/tools/gimpvectortool.c @@ -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;