mirror of https://github.com/GNOME/gimp.git
display: Fix regression accidentally introduced
This commit is contained in:
parent
d1af2efa95
commit
7fe398ca1a
|
@ -344,9 +344,9 @@ void
|
|||
vectors_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GList *selected_path = NULL;
|
||||
gint n_selected_path = 0;
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GList *selected_path = NULL;
|
||||
gint n_selected_paths = 0;
|
||||
|
||||
gint n_paths = 0;
|
||||
gboolean mask_empty = TRUE;
|
||||
|
@ -364,8 +364,8 @@ vectors_actions_update (GimpActionGroup *group,
|
|||
n_paths = gimp_image_get_n_paths (image);
|
||||
mask_empty = gimp_channel_is_empty (gimp_image_get_mask (image));
|
||||
|
||||
selected_path = gimp_image_get_selected_paths (image);
|
||||
n_selected_path = g_list_length (selected_path);
|
||||
selected_path = gimp_image_get_selected_paths (image);
|
||||
n_selected_paths = g_list_length (selected_path);
|
||||
|
||||
for (iter = selected_path; iter; iter = iter->next)
|
||||
{
|
||||
|
@ -406,50 +406,50 @@ vectors_actions_update (GimpActionGroup *group,
|
|||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("vectors-edit", n_selected_path == 1);
|
||||
SET_SENSITIVE ("vectors-edit-attributes", n_selected_path == 1);
|
||||
SET_SENSITIVE ("vectors-edit", n_selected_paths == 1);
|
||||
SET_SENSITIVE ("vectors-edit-attributes", n_selected_paths == 1);
|
||||
|
||||
SET_SENSITIVE ("vectors-new", image);
|
||||
SET_SENSITIVE ("vectors-new-last-values", image);
|
||||
SET_SENSITIVE ("vectors-duplicate", n_selected_path > 0);
|
||||
SET_SENSITIVE ("vectors-delete", n_selected_path > 0);
|
||||
SET_SENSITIVE ("vectors-duplicate", n_selected_paths > 0);
|
||||
SET_SENSITIVE ("vectors-delete", n_selected_paths > 0);
|
||||
SET_SENSITIVE ("vectors-merge-visible", n_paths > 1);
|
||||
|
||||
SET_SENSITIVE ("vectors-raise", n_selected_path > 0 && have_prev);
|
||||
SET_SENSITIVE ("vectors-raise-to-top", n_selected_path > 0 && have_prev);
|
||||
SET_SENSITIVE ("vectors-lower", n_selected_path > 0 && have_next);
|
||||
SET_SENSITIVE ("vectors-lower-to-bottom", n_selected_path > 0 && have_next);
|
||||
SET_SENSITIVE ("vectors-raise", n_selected_paths > 0 && have_prev);
|
||||
SET_SENSITIVE ("vectors-raise-to-top", n_selected_paths > 0 && have_prev);
|
||||
SET_SENSITIVE ("vectors-lower", n_selected_paths > 0 && have_next);
|
||||
SET_SENSITIVE ("vectors-lower-to-bottom", n_selected_paths > 0 && have_next);
|
||||
|
||||
SET_SENSITIVE ("vectors-copy", n_selected_path > 0);
|
||||
SET_SENSITIVE ("vectors-copy", n_selected_paths > 0);
|
||||
SET_SENSITIVE ("vectors-paste", image);
|
||||
SET_SENSITIVE ("vectors-export", n_selected_path > 0);
|
||||
SET_SENSITIVE ("vectors-export", n_selected_paths > 0);
|
||||
SET_SENSITIVE ("vectors-import", image);
|
||||
|
||||
SET_SENSITIVE ("vectors-selection-to-vectors", image && !mask_empty);
|
||||
SET_SENSITIVE ("vectors-selection-to-vectors-advanced", image && !mask_empty);
|
||||
SET_SENSITIVE ("vectors-fill", n_selected_path > 0 &&
|
||||
SET_SENSITIVE ("vectors-fill", n_selected_paths > 0 &&
|
||||
dr_writable &&
|
||||
!dr_children);
|
||||
SET_SENSITIVE ("vectors-fill-last-values", n_selected_path > 0 &&
|
||||
SET_SENSITIVE ("vectors-fill-last-values", n_selected_paths > 0 &&
|
||||
dr_writable &&
|
||||
!dr_children);
|
||||
SET_SENSITIVE ("vectors-stroke", n_selected_path > 0 &&
|
||||
SET_SENSITIVE ("vectors-stroke", n_selected_paths > 0 &&
|
||||
dr_writable &&
|
||||
!dr_children);
|
||||
SET_SENSITIVE ("vectors-stroke-last-values", n_selected_path > 0 &&
|
||||
SET_SENSITIVE ("vectors-stroke-last-values", n_selected_paths > 0 &&
|
||||
dr_writable &&
|
||||
!dr_children);
|
||||
|
||||
SET_SENSITIVE ("vectors-selection-replace", n_selected_path > 0);
|
||||
SET_SENSITIVE ("vectors-selection-from-vectors", n_selected_path > 0);
|
||||
SET_SENSITIVE ("vectors-selection-add", n_selected_path > 0);
|
||||
SET_SENSITIVE ("vectors-selection-subtract", n_selected_path > 0);
|
||||
SET_SENSITIVE ("vectors-selection-intersect", n_selected_path > 0);
|
||||
SET_SENSITIVE ("vectors-selection-replace", n_selected_paths > 0);
|
||||
SET_SENSITIVE ("vectors-selection-from-vectors", n_selected_paths > 0);
|
||||
SET_SENSITIVE ("vectors-selection-add", n_selected_paths > 0);
|
||||
SET_SENSITIVE ("vectors-selection-subtract", n_selected_paths > 0);
|
||||
SET_SENSITIVE ("vectors-selection-intersect", n_selected_paths > 0);
|
||||
|
||||
SET_SENSITIVE ("vectors-select-top", n_selected_path > 0 && have_prev);
|
||||
SET_SENSITIVE ("vectors-select-bottom", n_selected_path > 0 && have_next);
|
||||
SET_SENSITIVE ("vectors-select-previous", n_selected_path > 0 && have_prev);
|
||||
SET_SENSITIVE ("vectors-select-next", n_selected_path > 0 && have_next);
|
||||
SET_SENSITIVE ("vectors-select-top", n_selected_paths > 0 && have_prev);
|
||||
SET_SENSITIVE ("vectors-select-bottom", n_selected_paths > 0 && have_next);
|
||||
SET_SENSITIVE ("vectors-select-previous", n_selected_paths > 0 && have_prev);
|
||||
SET_SENSITIVE ("vectors-select-next", n_selected_paths > 0 && have_next);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
#undef SET_ACTIVE
|
||||
|
|
|
@ -1867,8 +1867,8 @@ gimp_image_selected_channels_notify (GimpItemTree *tree,
|
|||
|
||||
static void
|
||||
gimp_image_selected_paths_notify (GimpItemTree *tree,
|
||||
const GParamSpec *pspec,
|
||||
GimpImage *image)
|
||||
const GParamSpec *pspec,
|
||||
GimpImage *image)
|
||||
{
|
||||
g_signal_emit (image, gimp_image_signals[SELECTED_PATHS_CHANGED], 0);
|
||||
}
|
||||
|
@ -5029,7 +5029,7 @@ gimp_image_get_channel_by_name (GimpImage *image,
|
|||
|
||||
GimpVectors *
|
||||
gimp_image_get_path_by_name (GimpImage *image,
|
||||
const gchar *name)
|
||||
const gchar *name)
|
||||
{
|
||||
GimpItemTree *tree;
|
||||
|
||||
|
|
|
@ -1038,8 +1038,8 @@ gimp_display_shell_path_add_handler (GimpContainer *container,
|
|||
|
||||
static void
|
||||
gimp_display_shell_path_remove_handler (GimpContainer *container,
|
||||
GimpVectors *path,
|
||||
GimpDisplayShell *shell)
|
||||
GimpVectors *path,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors);
|
||||
|
||||
|
|
|
@ -23,10 +23,6 @@
|
|||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
#include <gdk/gdkwayland.h>
|
||||
#endif
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
@ -853,16 +849,7 @@ gimp_display_shell_dispose (GObject *object)
|
|||
|
||||
shell->display = NULL;
|
||||
|
||||
if (shell->window_handle != NULL)
|
||||
{
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()) &&
|
||||
/* The GdkWindow is likely already destroyed. */
|
||||
gtk_widget_get_window (GTK_WIDGET (shell)) != NULL)
|
||||
gdk_wayland_window_unexport_handle (gtk_widget_get_window (GTK_WIDGET (shell)));
|
||||
#endif
|
||||
g_clear_pointer (&shell->window_handle, g_bytes_unref);
|
||||
}
|
||||
gimp_widget_free_native_handle (GTK_WIDGET (shell), &shell->window_handle);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
|
|
@ -475,8 +475,8 @@ gimp_vectors_scale (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpVectors *path = GIMP_VECTORS (item);
|
||||
GimpImage *image = gimp_item_get_image (item);
|
||||
GimpVectors *path = GIMP_VECTORS (item);
|
||||
GimpImage *image = gimp_item_get_image (item);
|
||||
GList *list;
|
||||
|
||||
gimp_vectors_freeze (path);
|
||||
|
@ -512,8 +512,8 @@ gimp_vectors_resize (GimpItem *item,
|
|||
gint offset_x,
|
||||
gint offset_y)
|
||||
{
|
||||
GimpVectors *path = GIMP_VECTORS (item);
|
||||
GimpImage *image = gimp_item_get_image (item);
|
||||
GimpVectors *path = GIMP_VECTORS (item);
|
||||
GimpImage *image = gimp_item_get_image (item);
|
||||
GList *list;
|
||||
|
||||
gimp_vectors_freeze (path);
|
||||
|
@ -744,8 +744,8 @@ gimp_vectors_to_selection (GimpItem *item,
|
|||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpVectors *path = GIMP_VECTORS (item);
|
||||
GimpImage *image = gimp_item_get_image (item);
|
||||
GimpVectors *path = GIMP_VECTORS (item);
|
||||
GimpImage *image = gimp_item_get_image (item);
|
||||
|
||||
gimp_channel_select_vectors (gimp_image_get_mask (image),
|
||||
GIMP_ITEM_GET_CLASS (item)->to_selection_desc,
|
||||
|
|
Loading…
Reference in New Issue