[gimp/gimp-2-10] app: behave as if "show all" is disabled in the navigation dockable when keeping padding
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: behave as if "show all" is disabled in the navigation dockable when keeping padding
- Date: Sun, 15 Sep 2019 13:42:40 +0000 (UTC)
commit f5fab1daa6dd9078f7cfea774e4e31ad28de851d
Author: Ell <ell_se yahoo com>
Date: Sun Sep 15 16:27:17 2019 +0300
app: behave as if "show all" is disabled in the navigation dockable when keeping padding
app/display/gimpdisplayshell-appearance.c | 2 +
app/display/gimpdisplayshell.c | 18 ++---
app/display/gimpnavigationeditor.c | 119 +++++++++++++++---------------
3 files changed, 70 insertions(+), 69 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-appearance.c b/app/display/gimpdisplayshell-appearance.c
index 9f6af6cb15..1080acf66e 100644
--- a/app/display/gimpdisplayshell-appearance.c
+++ b/app/display/gimpdisplayshell-appearance.c
@@ -573,6 +573,8 @@ gimp_display_shell_set_padding_in_show_all (GimpDisplayShell *shell,
gimp_display_shell_set_action_active (shell,
"view-padding-color-in-show-all",
keep);
+
+ g_object_notify (G_OBJECT (shell), "infinite-canvas");
}
}
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index d3c9934c1d..d7ab1afae7 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -103,7 +103,7 @@ enum
PROP_TITLE,
PROP_STATUS,
PROP_ICON,
- PROP_SHOW_ALL
+ PROP_INFINITE_CANVAS
};
enum
@@ -308,11 +308,11 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
GDK_TYPE_PIXBUF,
GIMP_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_SHOW_ALL,
- g_param_spec_boolean ("show-all",
+ g_object_class_install_property (object_class, PROP_INFINITE_CANVAS,
+ g_param_spec_boolean ("infinite-canvas",
NULL, NULL,
FALSE,
- GIMP_PARAM_READWRITE));
+ GIMP_PARAM_READABLE));
gtk_rc_parse_string (display_rc_style);
}
@@ -926,9 +926,6 @@ gimp_display_shell_set_property (GObject *object,
g_object_unref (shell->icon);
shell->icon = g_value_dup_object (value);
break;
- case PROP_SHOW_ALL:
- gimp_display_shell_set_show_all (shell, g_value_get_boolean (value));
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -970,8 +967,9 @@ gimp_display_shell_get_property (GObject *object,
case PROP_ICON:
g_value_set_object (value, shell->icon);
break;
- case PROP_SHOW_ALL:
- g_value_set_boolean (value, shell->show_all);
+ case PROP_INFINITE_CANVAS:
+ g_value_set_boolean (value,
+ gimp_display_shell_get_infinite_canvas (shell));
break;
default:
@@ -1850,7 +1848,7 @@ gimp_display_shell_set_show_all (GimpDisplayShell *shell,
}
}
- g_object_notify (G_OBJECT (shell), "show-all");
+ g_object_notify (G_OBJECT (shell), "infinite-canvas");
}
}
diff --git a/app/display/gimpnavigationeditor.c b/app/display/gimpnavigationeditor.c
index 19306d2e8f..190641aba3 100644
--- a/app/display/gimpnavigationeditor.c
+++ b/app/display/gimpnavigationeditor.c
@@ -59,57 +59,57 @@
#define UPDATE_DELAY 300 /* From GtkRange in GTK+ 2.22 */
-static void gimp_navigation_editor_docked_iface_init (GimpDockedInterface *iface);
-
-static void gimp_navigation_editor_dispose (GObject *object);
-
-static void gimp_navigation_editor_set_context (GimpDocked *docked,
- GimpContext *context);
-
-static GtkWidget * gimp_navigation_editor_new_private (GimpMenuFactory *menu_factory,
- GimpDisplayShell *shell);
-
-static void gimp_navigation_editor_set_shell (GimpNavigationEditor *editor,
- GimpDisplayShell *shell);
-static gboolean gimp_navigation_editor_button_release (GtkWidget *widget,
- GdkEventButton *bevent,
- GimpDisplayShell *shell);
-static void gimp_navigation_editor_marker_changed (GimpNavigationView *view,
- gdouble center_x,
- gdouble center_y,
- gdouble width,
- gdouble height,
- GimpNavigationEditor *editor);
-static void gimp_navigation_editor_zoom (GimpNavigationView *view,
- GimpZoomType direction,
- GimpNavigationEditor *editor);
-static void gimp_navigation_editor_scroll (GimpNavigationView *view,
- GdkScrollDirection direction,
- GimpNavigationEditor *editor);
-
-static void gimp_navigation_editor_zoom_adj_changed (GtkAdjustment *adj,
- GimpNavigationEditor *editor);
-
-static void gimp_navigation_editor_shell_show_all_notify (GimpDisplayShell *shell,
- const GParamSpec *pspec,
- GimpNavigationEditor *editor);
-static void gimp_navigation_editor_shell_scaled (GimpDisplayShell *shell,
- GimpNavigationEditor *editor);
-static void gimp_navigation_editor_shell_scrolled (GimpDisplayShell *shell,
- GimpNavigationEditor *editor);
-static void gimp_navigation_editor_shell_rotated (GimpDisplayShell *shell,
- GimpNavigationEditor *editor);
-static void gimp_navigation_editor_shell_reconnect (GimpDisplayShell *shell,
- GimpNavigationEditor *editor);
-
-static void gimp_navigation_editor_viewable_size_changed (GimpViewable *viewable,
- GimpNavigationEditor *editor);
-
-static void gimp_navigation_editor_options_show_canvas_notify (GimpDisplayOptions *options,
- const GParamSpec *pspec,
- GimpNavigationEditor *editor);
-
-static void gimp_navigation_editor_update_marker (GimpNavigationEditor *editor);
+static void gimp_navigation_editor_docked_iface_init (GimpDockedInterface *iface);
+
+static void gimp_navigation_editor_dispose (GObject *object);
+
+static void gimp_navigation_editor_set_context (GimpDocked *docked,
+ GimpContext *context);
+
+static GtkWidget * gimp_navigation_editor_new_private (GimpMenuFactory *menu_factory,
+ GimpDisplayShell *shell);
+
+static void gimp_navigation_editor_set_shell (GimpNavigationEditor *editor,
+ GimpDisplayShell *shell);
+static gboolean gimp_navigation_editor_button_release (GtkWidget *widget,
+ GdkEventButton *bevent,
+ GimpDisplayShell *shell);
+static void gimp_navigation_editor_marker_changed (GimpNavigationView *view,
+ gdouble center_x,
+ gdouble center_y,
+ gdouble width,
+ gdouble height,
+ GimpNavigationEditor *editor);
+static void gimp_navigation_editor_zoom (GimpNavigationView *view,
+ GimpZoomType direction,
+ GimpNavigationEditor *editor);
+static void gimp_navigation_editor_scroll (GimpNavigationView *view,
+ GdkScrollDirection direction,
+ GimpNavigationEditor *editor);
+
+static void gimp_navigation_editor_zoom_adj_changed (GtkAdjustment *adj,
+ GimpNavigationEditor *editor);
+
+static void gimp_navigation_editor_shell_infinite_canvas_notify (GimpDisplayShell *shell,
+ const GParamSpec *pspec,
+ GimpNavigationEditor *editor);
+static void gimp_navigation_editor_shell_scaled (GimpDisplayShell *shell,
+ GimpNavigationEditor *editor);
+static void gimp_navigation_editor_shell_scrolled (GimpDisplayShell *shell,
+ GimpNavigationEditor *editor);
+static void gimp_navigation_editor_shell_rotated (GimpDisplayShell *shell,
+ GimpNavigationEditor *editor);
+static void gimp_navigation_editor_shell_reconnect (GimpDisplayShell *shell,
+ GimpNavigationEditor *editor);
+
+static void gimp_navigation_editor_viewable_size_changed (GimpViewable *viewable,
+ GimpNavigationEditor *editor);
+
+static void gimp_navigation_editor_options_show_canvas_notify (GimpDisplayOptions *options,
+ const GParamSpec *pspec,
+ GimpNavigationEditor *editor);
+
+static void gimp_navigation_editor_update_marker (GimpNavigationEditor *editor);
G_DEFINE_TYPE_WITH_CODE (GimpNavigationEditor, gimp_navigation_editor,
@@ -497,7 +497,7 @@ gimp_navigation_editor_set_shell (GimpNavigationEditor *editor,
if (editor->shell)
{
g_signal_handlers_disconnect_by_func (editor->shell,
- gimp_navigation_editor_shell_show_all_notify,
+ gimp_navigation_editor_shell_infinite_canvas_notify,
editor);
g_signal_handlers_disconnect_by_func (editor->shell,
gimp_navigation_editor_shell_scaled,
@@ -545,8 +545,8 @@ gimp_navigation_editor_set_shell (GimpNavigationEditor *editor,
gimp_view_set_viewable (GIMP_VIEW (editor->view),
GIMP_VIEWABLE (editor->image_viewable));
- g_signal_connect (editor->shell, "notify::show-all",
- G_CALLBACK (gimp_navigation_editor_shell_show_all_notify),
+ g_signal_connect (editor->shell, "notify::infinite-canvas",
+ G_CALLBACK (gimp_navigation_editor_shell_infinite_canvas_notify),
editor);
g_signal_connect (editor->shell, "scaled",
G_CALLBACK (gimp_navigation_editor_shell_scaled),
@@ -721,9 +721,9 @@ gimp_navigation_editor_zoom_adj_changed (GtkAdjustment *adj,
}
static void
-gimp_navigation_editor_shell_show_all_notify (GimpDisplayShell *shell,
- const GParamSpec *pspec,
- GimpNavigationEditor *editor)
+gimp_navigation_editor_shell_infinite_canvas_notify (GimpDisplayShell *shell,
+ const GParamSpec *pspec,
+ GimpNavigationEditor *editor)
{
gimp_navigation_editor_update_marker (editor);
@@ -860,7 +860,7 @@ gimp_navigation_editor_update_marker (GimpNavigationEditor *editor)
gimp_image_viewable_set_show_all (
GIMP_IMAGE_VIEWABLE (renderer->viewable),
- shell->show_all);
+ gimp_display_shell_get_infinite_canvas (shell));
bounding_box = gimp_image_viewable_get_bounding_box (
GIMP_IMAGE_VIEWABLE (renderer->viewable));
@@ -882,7 +882,8 @@ gimp_navigation_editor_update_marker (GimpNavigationEditor *editor)
gimp_navigation_view_set_canvas (
view,
- shell->show_all && gimp_display_shell_get_show_canvas (shell),
+ gimp_display_shell_get_infinite_canvas (shell) &&
+ gimp_display_shell_get_show_canvas (shell),
-bounding_box.x, -bounding_box.y,
gimp_image_get_width (image), gimp_image_get_height (image));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]