Commit 906c5a9f authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

removed gdisp->draw_guides and gdisp->snap_to_guides.

2003-03-20  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplay.[ch]: removed gdisp->draw_guides
	and gdisp->snap_to_guides.

	* app/display/gimpdisplayshell.[ch]: added shell->snap_to_guides.
	Added the state of guide, selection and active_layer visibility to
	the GimpDisplayShellVisibility struct so they can be configured
	separately for fullscreen mode. Update the popup_factory in
	gimp_display_shell_real_scaled() only if this is the active
	display.

	* app/display/gimpdisplayshell-appearance.[ch]: added accessors
	for selection, active_layer and guide visibility.

	* app/display/gimpdisplayshell-selection.[ch]: changed
	accordingly.  Changed the selection and active_layer toggle
	functions to *_set_hidden().

	* app/display/gimpdisplayshell-callbacks.c
	* app/gui/image-menu.c
	* app/gui/view-commands.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpmovetool.c: changed accordingly.

	* app/gui/gui.c (gui_display_new): update the menubar_factory
	*after* making the new display the active one.
parent f047f277
2003-03-20 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplay.[ch]: removed gdisp->draw_guides
and gdisp->snap_to_guides.
* app/display/gimpdisplayshell.[ch]: added shell->snap_to_guides.
Added the state of guide, selection and active_layer visibility to
the GimpDisplayShellVisibility struct so they can be configured
separately for fullscreen mode. Update the popup_factory in
gimp_display_shell_real_scaled() only if this is the active
display.
* app/display/gimpdisplayshell-appearance.[ch]: added accessors
for selection, active_layer and guide visibility.
* app/display/gimpdisplayshell-selection.[ch]: changed
accordingly. Changed the selection and active_layer toggle
functions to *_set_hidden().
* app/display/gimpdisplayshell-callbacks.c
* app/gui/image-menu.c
* app/gui/view-commands.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpmovetool.c: changed accordingly.
* app/gui/gui.c (gui_display_new): update the menubar_factory
*after* making the new display the active one.
2003-03-20 Sven Neumann <sven@gimp.org>
* INSTALL: some minor updates.
......@@ -35,7 +35,6 @@
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-appearance.h"
#include "display/gimpdisplayshell-scale.h"
#include "display/gimpdisplayshell-selection.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpitemfactory.h"
......@@ -222,18 +221,8 @@ view_toggle_selection_cmd_callback (GtkWidget *widget,
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
/* hidden == TRUE corresponds to the menu toggle being FALSE */
if (GTK_CHECK_MENU_ITEM (widget)->active == shell->select->hidden)
{
gimp_display_shell_selection_toggle (shell->select);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
"/View/Show Selection",
! shell->select->hidden);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
"/View/Show Selection",
! shell->select->hidden);
}
gimp_display_shell_set_show_selection (shell,
GTK_CHECK_MENU_ITEM (widget)->active);
}
void
......@@ -246,18 +235,8 @@ view_toggle_layer_boundary_cmd_callback (GtkWidget *widget,
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
/* hidden == TRUE corresponds to the menu toggle being FALSE */
if (GTK_CHECK_MENU_ITEM (widget)->active == shell->select->layer_hidden)
{
gimp_display_shell_selection_toggle_layer (shell->select);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
"/View/Show Layer Boundary",
! shell->select->layer_hidden);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
"/View/Show Layer Boundary",
! shell->select->layer_hidden);
}
gimp_display_shell_set_show_layer (shell,
GTK_CHECK_MENU_ITEM (widget)->active);
}
void
......@@ -320,32 +299,14 @@ void
view_toggle_guides_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpDisplay *gdisp;
GimpDisplay *gdisp;
GimpDisplayShell *shell;
return_if_no_display (gdisp, data);
if (GTK_CHECK_MENU_ITEM (widget)->active != gdisp->draw_guides)
{
GimpDisplayShell *shell;
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
gdisp->draw_guides = GTK_CHECK_MENU_ITEM (widget)->active;
if (gdisp->gimage->guides)
{
gimp_display_shell_expose_full (shell);
gimp_display_flush (gdisp);
}
else
{
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
"/View/Show Guides",
gdisp->draw_guides);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
"/View/Show Guides",
gdisp->draw_guides);
}
}
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
gimp_display_shell_set_show_guides (shell,
GTK_CHECK_MENU_ITEM (widget)->active);
}
void
......@@ -358,16 +319,16 @@ view_snap_to_guides_cmd_callback (GtkWidget *widget,
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
if (gdisp->snap_to_guides != GTK_CHECK_MENU_ITEM (widget)->active)
if (shell->snap_to_guides != GTK_CHECK_MENU_ITEM (widget)->active)
{
gdisp->snap_to_guides = GTK_CHECK_MENU_ITEM (widget)->active;
shell->snap_to_guides = GTK_CHECK_MENU_ITEM (widget)->active;
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
"/View/Snap to Guides",
gdisp->snap_to_guides);
shell->snap_to_guides);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
"/View/Snap to Guides",
gdisp->snap_to_guides);
shell->snap_to_guides);
}
}
......
......@@ -142,9 +142,6 @@ gimp_display_init (GimpDisplay *gdisp)
gdisp->shell = NULL;
gdisp->draw_guides = TRUE;
gdisp->snap_to_guides = TRUE;
gdisp->update_areas = NULL;
gdisp->idle_render.idle_id = 0;
......
......@@ -60,9 +60,6 @@ struct _GimpDisplay
GtkWidget *shell; /* shell widget for this gdisplay */
gboolean draw_guides; /* should the guides be drawn? */
gboolean snap_to_guides; /* should the guides be snapped to? */
GSList *update_areas; /* Update areas list */
IdleRenderStruct idle_render; /* state of this gdisplay's render thread */
......
......@@ -142,9 +142,6 @@ gimp_display_init (GimpDisplay *gdisp)
gdisp->shell = NULL;
gdisp->draw_guides = TRUE;
gdisp->snap_to_guides = TRUE;
gdisp->update_areas = NULL;
gdisp->idle_render.idle_id = 0;
......
......@@ -60,9 +60,6 @@ struct _GimpDisplay
GtkWidget *shell; /* shell widget for this gdisplay */
gboolean draw_guides; /* should the guides be drawn? */
gboolean snap_to_guides; /* should the guides be snapped to? */
GSList *update_areas; /* Update areas list */
IdleRenderStruct idle_render; /* state of this gdisplay's render thread */
......
......@@ -25,11 +25,15 @@
#include "display-types.h"
#include "core/gimpimage.h"
#include "widgets/gimpitemfactory.h"
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"
#include "gimpdisplayshell-callbacks.h"
#include "gimpdisplayshell-selection.h"
#include "gimpdisplayshell-render.h"
......@@ -140,6 +144,102 @@ gimp_display_shell_get_fullscreen (GimpDisplayShell *shell)
return (shell->window_state & GDK_WINDOW_STATE_FULLSCREEN) != 0;
}
void
gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
gboolean show)
{
GimpDisplayShellVisibility *visibility;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
visibility = GET_VISIBILITY (shell);
if (show != visibility->selection)
{
visibility->selection = show ? TRUE : FALSE;
if (shell->select)
gimp_display_shell_selection_set_hidden (shell->select, ! show);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
"/View/Show Selection", show);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
"/View/Show Selection", show);
}
}
gboolean
gimp_display_shell_get_show_selection (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_VISIBILITY (shell)->selection;
}
void
gimp_display_shell_set_show_layer (GimpDisplayShell *shell,
gboolean show)
{
GimpDisplayShellVisibility *visibility;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
visibility = GET_VISIBILITY (shell);
if (show != visibility->active_layer)
{
visibility->active_layer = show ? TRUE : FALSE;
if (shell->select)
gimp_display_shell_selection_layer_set_hidden (shell->select, ! show);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
"/View/Show Layer Boundary", show);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
"/View/Show Layer Boundary", show);
}
}
gboolean
gimp_display_shell_get_show_layer (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_VISIBILITY (shell)->active_layer;
}
void
gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
gboolean show)
{
GimpDisplayShellVisibility *visibility;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
visibility = GET_VISIBILITY (shell);
if (show != visibility->guides)
{
visibility->guides = show ? TRUE : FALSE;
if (shell->gdisp->gimage->guides)
gimp_display_shell_expose_full (shell);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->menubar_factory),
"/View/Show Guides", show);
gimp_item_factory_set_active (GTK_ITEM_FACTORY (shell->popup_factory),
"/View/Show Guides", show);
}
}
gboolean
gimp_display_shell_get_show_guides (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_VISIBILITY (shell)->guides;
}
void
gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
gboolean show)
......
......@@ -28,6 +28,18 @@ void gimp_display_shell_set_fullscreen (GimpDisplayShell *shell,
gboolean fullscreen);
gboolean gimp_display_shell_get_fullscreen (GimpDisplayShell *shell);
void gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_selection (GimpDisplayShell *shell);
void gimp_display_shell_set_show_layer (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_layer (GimpDisplayShell *shell);
void gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_guides (GimpDisplayShell *shell);
void gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_menubar (GimpDisplayShell *shell);
......
......@@ -210,6 +210,9 @@ gimp_display_shell_events (GtkWidget *widget,
shell->visibility = shell->fullscreen_visibility;
}
gimp_display_shell_set_show_selection (shell, visibility.selection);
gimp_display_shell_set_show_layer (shell, visibility.active_layer);
gimp_display_shell_set_show_guides (shell, visibility.guides);
gimp_display_shell_set_show_menubar (shell, visibility.menubar);
gimp_display_shell_set_show_rulers (shell, visibility.rulers);
gimp_display_shell_set_show_scrollbars (shell, visibility.scrollbars);
......
......@@ -57,6 +57,7 @@
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"
#include "gimpdisplayshell-callbacks.h"
#include "gimpdisplayshell-cursor.h"
#include "gimpdisplayshell-dnd.h"
......@@ -199,6 +200,7 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->disp_yoffset = 0;
shell->proximity = FALSE;
shell->snap_to_guides = TRUE;
shell->select = NULL;
......@@ -254,15 +256,21 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->window_state = 0;
shell->visibility.menubar = FALSE;
shell->visibility.rulers = TRUE;
shell->visibility.scrollbars = TRUE;
shell->visibility.statusbar = TRUE;
shell->fullscreen_visibility.menubar = FALSE;
shell->fullscreen_visibility.rulers = FALSE;
shell->fullscreen_visibility.scrollbars = FALSE;
shell->fullscreen_visibility.statusbar = FALSE;
shell->visibility.selection = TRUE;
shell->visibility.active_layer = TRUE;
shell->visibility.guides = TRUE;
shell->visibility.menubar = FALSE;
shell->visibility.rulers = TRUE;
shell->visibility.scrollbars = TRUE;
shell->visibility.statusbar = TRUE;
shell->fullscreen_visibility.selection = TRUE;
shell->fullscreen_visibility.active_layer = TRUE;
shell->fullscreen_visibility.guides = TRUE;
shell->fullscreen_visibility.menubar = FALSE;
shell->fullscreen_visibility.rulers = FALSE;
shell->fullscreen_visibility.scrollbars = FALSE;
shell->fullscreen_visibility.statusbar = FALSE;
gtk_window_set_wmclass (GTK_WINDOW (shell), "image_window", "Gimp");
gtk_window_set_resizable (GTK_WINDOW (shell), TRUE);
......@@ -405,11 +413,17 @@ gimp_display_shell_delete_event (GtkWidget *widget,
static void
gimp_display_shell_real_scaled (GimpDisplayShell *shell)
{
GimpContext *user_context;
gimp_display_shell_update_title (shell);
/* update the <Image>/View/Zoom menu */
gimp_item_factory_update (shell->menubar_factory, shell);
gimp_item_factory_update (shell->popup_factory, shell);
user_context = gimp_get_user_context (shell->gdisp->gimage->gimp);
if (shell->gdisp == gimp_context_get_display (user_context))
gimp_item_factory_update (shell->popup_factory, shell);
}
GtkWidget *
......@@ -920,7 +934,7 @@ gimp_display_shell_find_guide (GimpDisplayShell *shell,
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), NULL);
if (shell->gdisp->draw_guides)
if (gimp_display_shell_get_show_guides (shell))
{
gdouble image_x, image_y;
......@@ -953,8 +967,8 @@ gimp_display_shell_snap_point (GimpDisplayShell *shell,
*tx = x;
*ty = y;
if (shell->gdisp->draw_guides &&
shell->gdisp->snap_to_guides &&
if (gimp_display_shell_get_show_guides (shell) &&
shell->snap_to_guides &&
shell->gdisp->gimage->guides)
{
gdouble image_x, image_y;
......@@ -1006,7 +1020,7 @@ gimp_display_shell_snap_rectangle (GimpDisplayShell *shell,
snap1 = gimp_display_shell_snap_point (shell, x1, y1, &nx1, &ny1);
snap2 = gimp_display_shell_snap_point (shell, x2, y2, &nx2, &ny2);
if (snap1 || snap2)
{
if (x1 != nx1)
......@@ -1328,7 +1342,7 @@ gimp_display_shell_draw_guides (GimpDisplayShell *shell)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
if (shell->gdisp->draw_guides)
if (gimp_display_shell_get_show_guides (shell))
{
GList *list;
GimpGuide *guide;
......
......@@ -31,6 +31,10 @@ typedef struct _GimpDisplayShellVisibility GimpDisplayShellVisibility;
struct _GimpDisplayShellVisibility
{
gboolean selection;
gboolean active_layer;
gboolean guides;
gboolean menubar;
gboolean rulers;
gboolean scrollbars;
......@@ -95,28 +99,29 @@ struct _GimpDisplayShell
gint offset_x; /* offset of display image into raw image */
gint offset_y;
gint disp_width; /* width of drawing area */
gint disp_height; /* height of drawing area */
gint disp_width; /* width of drawing area */
gint disp_height; /* height of drawing area */
gint disp_xoffset;
gint disp_yoffset;
gboolean proximity; /* is a device in proximity */
gboolean proximity; /* is a device in proximity */
gboolean snap_to_guides; /* should the guides be snapped to? */
Selection *select; /* Selection object */
Selection *select; /* Selection object */
GtkAdjustment *hsbdata; /* adjustments */
GtkAdjustment *hsbdata; /* adjustments */
GtkAdjustment *vsbdata;
GtkWidget *canvas; /* canvas widget */
GtkWidget *canvas; /* canvas widget */
GtkWidget *hsb; /* scroll bars */
GtkWidget *hsb; /* scroll bars */
GtkWidget *vsb;
GtkWidget *qmask; /* qmask button */
GtkWidget *hrule; /* rulers */
GtkWidget *qmask; /* qmask button */
GtkWidget *hrule; /* rulers */
GtkWidget *vrule;
GtkWidget *origin; /* origin button */
GtkWidget *origin; /* origin button */
GtkWidget *statusbar; /* statusbar */
GtkWidget *statusbar; /* statusbar */
guchar *render_buf; /* buffer for rendering the image */
GdkGC *render_gc; /* GC for rendering the image */
......
......@@ -32,6 +32,7 @@
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"
#include "gimpdisplayshell-marching-ants.h"
#include "gimpdisplayshell-selection.h"
#include "gimpdisplayshell-transform.h"
......@@ -136,8 +137,8 @@ gimp_display_shell_selection_create (GdkWindow *win,
new->state = INVISIBLE;
new->paused = 0;
new->recalc = TRUE;
new->hidden = FALSE;
new->layer_hidden = FALSE;
new->hidden = ! gimp_display_shell_get_show_selection (shell);
new->layer_hidden = ! gimp_display_shell_get_show_layer (shell);
for (i = 0; i < 8; i++)
new->points_in[i] = NULL;
......@@ -368,27 +369,33 @@ gimp_display_shell_selection_layer_invis (Selection *select)
void
gimp_display_shell_selection_toggle (Selection *select)
gimp_display_shell_selection_set_hidden (Selection *select,
gboolean hidden)
{
gimp_display_shell_selection_invis (select);
gimp_display_shell_selection_layer_invis (select);
if (hidden != select->hidden)
{
gimp_display_shell_selection_invis (select);
gimp_display_shell_selection_layer_invis (select);
/* toggle the visibility */
select->hidden = select->hidden ? FALSE : TRUE;
select->hidden = hidden;
gimp_display_shell_selection_start (select, TRUE);
gimp_display_shell_selection_start (select, TRUE);
}
}
void
gimp_display_shell_selection_toggle_layer (Selection *select)
gimp_display_shell_selection_layer_set_hidden (Selection *select,
gboolean hidden)
{
gimp_display_shell_selection_invis (select);
gimp_display_shell_selection_layer_invis (select);
if (hidden != select->layer_hidden)
{
gimp_display_shell_selection_invis (select);
gimp_display_shell_selection_layer_invis (select);
/* toggle the visibility */
select->layer_hidden = select->layer_hidden ? FALSE : TRUE;
select->layer_hidden = hidden;
gimp_display_shell_selection_start (select, TRUE);
gimp_display_shell_selection_start (select, TRUE);
}
}
......
......@@ -57,22 +57,24 @@ struct _Selection
};
Selection * gimp_display_shell_selection_create (GdkWindow *window,
GimpDisplayShell *gdisp,
gint size,
gint width);
void gimp_display_shell_selection_free (Selection *select);
Selection * gimp_display_shell_selection_create (GdkWindow *window,
GimpDisplayShell *gdisp,
gint size,
gint width);
void gimp_display_shell_selection_free (Selection *select);
void gimp_display_shell_selection_pause (Selection *select);
void gimp_display_shell_selection_resume (Selection *select);
void gimp_display_shell_selection_pause (Selection *select);
void gimp_display_shell_selection_resume (Selection *select);
void gimp_display_shell_selection_start (Selection *select,
gboolean recalc);
void gimp_display_shell_selection_invis (Selection *select);
void gimp_display_shell_selection_layer_invis (Selection *select);
void gimp_display_shell_selection_start (Selection *select,
gboolean recalc);
void gimp_display_shell_selection_invis (Selection *select);
void gimp_display_shell_selection_layer_invis (Selection *select);
void gimp_display_shell_selection_toggle (Selection *select);
void gimp_display_shell_selection_toggle_layer (Selection *select);
void gimp_display_shell_selection_set_hidden (Selection *select,
gboolean hidden);
void gimp_display_shell_selection_layer_set_hidden (Selection *select,
gboolean hidden);
#endif /* __GIMP_DISPLAY_SHELL_SELECTION_H__ */
......@@ -57,6 +57,7 @@
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"
#include "gimpdisplayshell-callbacks.h"
#include "gimpdisplayshell-cursor.h"
#include "gimpdisplayshell-dnd.h"
......@@ -199,6 +200,7 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->disp_yoffset = 0;
shell->proximity = FALSE;
shell->snap_to_guides = TRUE;
shell->select = NULL;
......@@ -254,15 +256,21 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->window_state = 0;
shell->visibility.menubar = FALSE;
shell->visibility.rulers = TRUE;
shell->visibility.scrollbars = TRUE;
shell->visibility.statusbar = TRUE;
shell->fullscreen_visibility.menubar = FALSE;
shell->fullscreen_visibility.rulers = FALSE;
shell->fullscreen_visibility.scrollbars = FALSE;
shell->fullscreen_visibility.statusbar = FALSE;
shell->visibility.selection = TRUE;
shell->visibility.active_layer = TRUE;
shell->visibility.guides = TRUE;
shell->visibility.menubar = FALSE;
shell->visibility.rulers = TRUE;
shell->visibility.scrollbars = TRUE;
shell->visibility.statusbar = TRUE;
shell->fullscreen_visibility.selection = TRUE;
shell->fullscreen_visibility.active_layer = TRUE;
shell->fullscreen_visibility.guides = TRUE;
shell->fullscreen_visibility.menubar = FALSE;
shell->fullscreen_visibility.rulers = FALSE;
shell->fullscreen_visibility.scrollbars = FALSE;
shell->fullscreen_visibility.statusbar = FALSE;
gtk_window_set_wmclass (GTK_WINDOW (shell), "image_window", "Gimp");
gtk_window_set_resizable (GTK_WINDOW (shell), TRUE);
......@@ -405,11 +413,17 @@ gimp_display_shell_delete_event (GtkWidget *widget,
static void
gimp_display_shell_real_scaled (GimpDisplayShell *shell)
{
GimpContext *user_context;
gimp_display_shell_update_title (shell);
/* update the <Image>/View/Zoom menu */
gimp_item_factory_update (shell->menubar_factory, shell);
gimp_item_factory_update (shell->popup_factory, shell);
user_context = gimp_get_user_context (shell->gdisp->gimage->gimp);
if (shell->gdisp == gimp_context_get_display (user_context))
gimp_item_factory_update (shell->popup_factory, shell);
}
GtkWidget *
......@@ -920,7 +934,7 @@ gimp_display_shell_find_guide (GimpDisplayShell *shell,
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), NULL);
if (shell->gdisp->draw_guides)
if (gimp_display_shell_get_show_guides (shell))
{
gdouble image_x, image_y;
......@@ -953,8 +967,8 @@ gimp_display_shell_snap_point (GimpDisplayShell *shell,
*tx = x;
*ty = y;
if (shell->gdisp->draw_guides &&
shell->gdisp->snap_to_guides &&
if (gimp_display_shell_get_show_guides (shell) &&
shell->snap_to_guides &&
shell->gdisp->gimage->guides)
{
gdouble image_x, image_y;
......@@ -1006,7 +1020,7 @@ gimp_display_shell_snap_rectangle (GimpDisplayShell *shell,
snap1 = gimp_display_shell_snap_point (shell, x1, y1, &nx1, &ny1);
snap2 = gimp_display_shell_snap_point (shell, x2, y2, &nx2, &ny2);
<