Commit be6a9d2a authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/actions/view-actions.c app/actions/view-commands.[ch]

2005-03-05  Michael Natterer  <mitch@gimp.org>

	* app/actions/view-actions.c
	* app/actions/view-commands.[ch]
	* app/config/gimprc-blurbs.h
	* app/core/core-enums.[ch]
	* app/core/gimp.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-undo-push.[ch]
	* app/core/gimpimage.c
	* app/display/gimpdisplayoptions.[ch]
	* app/display/gimpdisplayshell-appearance.[ch]
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-draw.[ch]
	* app/widgets/gimphelp-ids.h
	* menus/image-menu.xml.in: reordered stuff to be in guides, grid,
	sample points order. Some cleanup and indentation.
parent 9df474c6
2005-03-05 Michael Natterer <mitch@gimp.org>
* app/actions/view-actions.c
* app/actions/view-commands.[ch]
* app/config/gimprc-blurbs.h
* app/core/core-enums.[ch]
* app/core/gimp.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-undo-push.[ch]
* app/core/gimpimage.c
* app/display/gimpdisplayoptions.[ch]
* app/display/gimpdisplayshell-appearance.[ch]
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-draw.[ch]
* app/widgets/gimphelp-ids.h
* menus/image-menu.xml.in: reordered stuff to be in guides, grid,
sample points order. Some cleanup and indentation.
2005-03-04 Raphaël Quinet <raphael@gimp.org>
* plug-ins/metadata/xmpdump.c: test program that tries to extract
......
......@@ -138,18 +138,18 @@ static GimpToggleActionEntry view_toggle_actions[] =
TRUE,
GIMP_HELP_VIEW_SHOW_GUIDES },
{ "view-show-sample-points", NULL,
N_("Show Sample Points"), NULL, NULL,
G_CALLBACK (view_toggle_sample_points_cmd_callback),
TRUE,
GIMP_HELP_VIEW_SHOW_SAMPLE_POINTS },
{ "view-show-grid", NULL,
N_("S_how Grid"), NULL, NULL,
G_CALLBACK (view_toggle_grid_cmd_callback),
FALSE,
GIMP_HELP_VIEW_SHOW_GRID },
{ "view-show-sample-points", NULL,
N_("Show Sample Points"), NULL, NULL,
G_CALLBACK (view_toggle_sample_points_cmd_callback),
TRUE,
GIMP_HELP_VIEW_SHOW_SAMPLE_POINTS },
{ "view-snap-to-guides", NULL,
N_("Sn_ap to Guides"), NULL, NULL,
G_CALLBACK (view_snap_to_guides_cmd_callback),
......@@ -528,8 +528,8 @@ view_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("view-show-layer-boundary", gdisp);
SET_ACTIVE ("view-show-layer-boundary", gdisp && options->show_layer_boundary);
SET_ACTIVE ("view-show-guides", gdisp && options->show_guides);
SET_ACTIVE ("view-show-sample-points", gdisp && options->show_sample_points);
SET_ACTIVE ("view-show-grid", gdisp && options->show_grid);
SET_ACTIVE ("view-show-sample-points", gdisp && options->show_sample_points);
SET_ACTIVE ("view-snap-to-guides", gdisp && shell->snap_to_guides);
SET_ACTIVE ("view-snap-to-grid", gdisp && shell->snap_to_grid);
SET_ACTIVE ("view-snap-to-canvas", gdisp && shell->snap_to_canvas);
......
......@@ -473,8 +473,8 @@ view_toggle_guides_cmd_callback (GtkAction *action,
}
void
view_toggle_sample_points_cmd_callback (GtkAction *action,
gpointer data)
view_toggle_grid_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *gdisp;
GimpDisplayShell *shell;
......@@ -485,12 +485,12 @@ view_toggle_sample_points_cmd_callback (GtkAction *action,
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gimp_display_shell_set_show_sample_points (shell, active);
gimp_display_shell_set_show_grid (shell, active);
}
void
view_toggle_grid_cmd_callback (GtkAction *action,
gpointer data)
view_toggle_sample_points_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *gdisp;
GimpDisplayShell *shell;
......@@ -501,7 +501,7 @@ view_toggle_grid_cmd_callback (GtkAction *action,
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gimp_display_shell_set_show_grid (shell, active);
gimp_display_shell_set_show_sample_points (shell, active);
}
void
......
......@@ -67,10 +67,10 @@ void view_toggle_statusbar_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_guides_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_sample_points_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_grid_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_sample_points_cmd_callback (GtkAction *action,
gpointer data);
void view_snap_to_guides_cmd_callback (GtkAction *action,
gpointer data);
......
......@@ -318,14 +318,14 @@ N_("When enabled, the layer boundary is visible by default. This can also " \
N_("When enabled, the guides are visible by default. This can also be " \
"toggled with the \"View->Show Guides\" command.")
#define SHOW_SAMPLE_POINTS_BLURB \
N_("When enabled, the sample points are visible by default. This can also be " \
"toggled with the \"View->Show Sample Points\" command.")
#define SHOW_GRID_BLURB \
N_("When enabled, the grid is visible by default. This can also be toggled " \
"with the \"View->Show Grid\" command.")
#define SHOW_SAMPLE_POINTS_BLURB \
N_("When enabled, the sample points are visible by default. This can also be " \
"toggled with the \"View->Show Sample Points\" command.")
#define SHOW_TIPS_BLURB \
N_("Enable to display a handy GIMP tip on startup.")
......
......@@ -689,8 +689,8 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, "GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE", "group-image-layers-merge" },
{ GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, "GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE", "group-image-vectors-merge" },
{ GIMP_UNDO_GROUP_IMAGE_QMASK, "GIMP_UNDO_GROUP_IMAGE_QMASK", "group-image-qmask" },
{ GIMP_UNDO_GROUP_IMAGE_GRID, "GIMP_UNDO_GROUP_IMAGE_GRID", "group-image-grid" },
{ GIMP_UNDO_GROUP_IMAGE_GUIDE, "GIMP_UNDO_GROUP_IMAGE_GUIDE", "group-image-guide" },
{ GIMP_UNDO_GROUP_IMAGE_GRID, "GIMP_UNDO_GROUP_IMAGE_GRID", "group-image-grid" },
{ GIMP_UNDO_GROUP_IMAGE_SAMPLE_POINT, "GIMP_UNDO_GROUP_IMAGE_SAMPLE_POINT", "group-image-sample-point" },
{ GIMP_UNDO_GROUP_DRAWABLE, "GIMP_UNDO_GROUP_DRAWABLE", "group-drawable" },
{ GIMP_UNDO_GROUP_DRAWABLE_MOD, "GIMP_UNDO_GROUP_DRAWABLE_MOD", "group-drawable-mod" },
......@@ -719,8 +719,8 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_IMAGE_TYPE, "GIMP_UNDO_IMAGE_TYPE", "image-type" },
{ GIMP_UNDO_IMAGE_SIZE, "GIMP_UNDO_IMAGE_SIZE", "image-size" },
{ GIMP_UNDO_IMAGE_RESOLUTION, "GIMP_UNDO_IMAGE_RESOLUTION", "image-resolution" },
{ GIMP_UNDO_IMAGE_GRID, "GIMP_UNDO_IMAGE_GRID", "image-grid" },
{ GIMP_UNDO_IMAGE_GUIDE, "GIMP_UNDO_IMAGE_GUIDE", "image-guide" },
{ GIMP_UNDO_IMAGE_GRID, "GIMP_UNDO_IMAGE_GRID", "image-grid" },
{ GIMP_UNDO_IMAGE_SAMPLE_POINT, "GIMP_UNDO_IMAGE_SAMPLE_POINT", "image-sample-point" },
{ GIMP_UNDO_IMAGE_COLORMAP, "GIMP_UNDO_IMAGE_COLORMAP", "image-colormap" },
{ GIMP_UNDO_DRAWABLE, "GIMP_UNDO_DRAWABLE", "drawable" },
......@@ -772,8 +772,8 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, N_("Merge layers"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, N_("Merge vectors"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_QMASK, N_("Quick Mask"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_GRID, N_("Grid"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_GUIDE, N_("Guide"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_GRID, N_("Grid"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_SAMPLE_POINT, N_("Sample Point"), NULL },
{ GIMP_UNDO_GROUP_DRAWABLE, N_("Drawable"), NULL },
{ GIMP_UNDO_GROUP_DRAWABLE_MOD, N_("Drawable mod"), NULL },
......@@ -802,8 +802,8 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_IMAGE_TYPE, N_("Image type"), NULL },
{ GIMP_UNDO_IMAGE_SIZE, N_("Image size"), NULL },
{ GIMP_UNDO_IMAGE_RESOLUTION, N_("Resolution change"), NULL },
{ GIMP_UNDO_IMAGE_GRID, N_("Grid"), NULL },
{ GIMP_UNDO_IMAGE_GUIDE, N_("Guide"), NULL },
{ GIMP_UNDO_IMAGE_GRID, N_("Grid"), NULL },
{ GIMP_UNDO_IMAGE_SAMPLE_POINT, N_("Sample Point"), NULL },
{ GIMP_UNDO_IMAGE_COLORMAP, N_("Change indexed palette"), NULL },
{ GIMP_UNDO_DRAWABLE, N_("Drawable"), NULL },
......
......@@ -334,8 +334,8 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, /*< desc="Merge layers" >*/
GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE,/*< desc="Merge vectors" >*/
GIMP_UNDO_GROUP_IMAGE_QMASK, /*< desc="Quick Mask" >*/
GIMP_UNDO_GROUP_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_GROUP_IMAGE_GUIDE, /*< desc="Guide" >*/
GIMP_UNDO_GROUP_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_GROUP_IMAGE_SAMPLE_POINT, /*< desc="Sample Point" >*/
GIMP_UNDO_GROUP_DRAWABLE, /*< desc="Drawable" >*/
GIMP_UNDO_GROUP_DRAWABLE_MOD, /*< desc="Drawable mod" >*/
......@@ -369,8 +369,8 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_IMAGE_TYPE, /*< desc="Image type" >*/
GIMP_UNDO_IMAGE_SIZE, /*< desc="Image size" >*/
GIMP_UNDO_IMAGE_RESOLUTION, /*< desc="Resolution change" >*/
GIMP_UNDO_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_IMAGE_GUIDE, /*< desc="Guide" >*/
GIMP_UNDO_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_IMAGE_SAMPLE_POINT, /*< desc="Sample Point" >*/
GIMP_UNDO_IMAGE_COLORMAP, /*< desc="Change indexed palette" >*/
GIMP_UNDO_DRAWABLE, /*< desc="Drawable" >*/
......
......@@ -239,10 +239,10 @@ gimp_init (Gimp *gimp)
gimp->images = gimp_list_new_weak (GIMP_TYPE_IMAGE, FALSE);
gimp_object_set_name (GIMP_OBJECT (gimp->images), "images");
gimp->next_image_ID = 1;
gimp->next_guide_ID = 1;
gimp->next_image_ID = 1;
gimp->next_guide_ID = 1;
gimp->next_sample_point_ID = 1;
gimp->image_table = g_hash_table_new (g_direct_hash, NULL);
gimp->image_table = g_hash_table_new (g_direct_hash, NULL);
gimp->next_item_ID = 1;
gimp->item_table = g_hash_table_new (g_direct_hash, NULL);
......
......@@ -252,7 +252,8 @@ gimp_image_crop (GimpImage *gimage,
if (remove_sample_point)
gimp_image_remove_sample_point (gimage, sample_point, TRUE);
else if (new_x != sample_point->x || new_y != sample_point->y)
gimp_image_move_sample_point (gimage, sample_point, new_x, new_y, TRUE);
gimp_image_move_sample_point (gimage, sample_point,
new_x, new_y, TRUE);
}
gimp_image_undo_group_end (gimage);
......
......@@ -307,83 +307,6 @@ undo_free_image_resolution (GimpUndo *undo,
}
/****************/
/* Grid Undo */
/****************/
typedef struct _GridUndo GridUndo;
struct _GridUndo
{
GimpGrid *grid;
};
static gboolean undo_pop_image_grid (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void undo_free_image_grid (GimpUndo *undo,
GimpUndoMode undo_mode);
gboolean
gimp_image_undo_push_image_grid (GimpImage *gimage,
const gchar *undo_desc,
GimpGrid *grid)
{
GimpUndo *new;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
g_return_val_if_fail (GIMP_IS_GRID (grid), FALSE);
if ((new = gimp_image_undo_push (gimage, GIMP_TYPE_UNDO,
sizeof (GridUndo),
sizeof (GridUndo),
GIMP_UNDO_IMAGE_GRID, undo_desc,
GIMP_DIRTY_IMAGE_META,
undo_pop_image_grid,
undo_free_image_grid,
NULL)))
{
GridUndo *gu = new->data;
gu->grid = gimp_config_duplicate (GIMP_CONFIG (grid));
return TRUE;
}
return FALSE;
}
static gboolean
undo_pop_image_grid (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum)
{
GridUndo *gu = undo->data;
GimpGrid *grid;
grid = gimp_config_duplicate (GIMP_CONFIG (undo->gimage->grid));
gimp_image_set_grid (undo->gimage, gu->grid, FALSE);
g_object_unref (gu->grid);
gu->grid = grid;
return TRUE;
}
static void
undo_free_image_grid (GimpUndo *undo,
GimpUndoMode undo_mode)
{
GridUndo *gu = undo->data;
if (gu->grid)
g_object_unref (gu->grid);
g_free (gu);
}
/****************/
/* Guide Undo */
/****************/
......@@ -483,6 +406,83 @@ undo_free_image_guide (GimpUndo *undo,
}
/****************/
/* Grid Undo */
/****************/
typedef struct _GridUndo GridUndo;
struct _GridUndo
{
GimpGrid *grid;
};
static gboolean undo_pop_image_grid (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void undo_free_image_grid (GimpUndo *undo,
GimpUndoMode undo_mode);
gboolean
gimp_image_undo_push_image_grid (GimpImage *gimage,
const gchar *undo_desc,
GimpGrid *grid)
{
GimpUndo *new;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
g_return_val_if_fail (GIMP_IS_GRID (grid), FALSE);
if ((new = gimp_image_undo_push (gimage, GIMP_TYPE_UNDO,
sizeof (GridUndo),
sizeof (GridUndo),
GIMP_UNDO_IMAGE_GRID, undo_desc,
GIMP_DIRTY_IMAGE_META,
undo_pop_image_grid,
undo_free_image_grid,
NULL)))
{
GridUndo *gu = new->data;
gu->grid = gimp_config_duplicate (GIMP_CONFIG (grid));
return TRUE;
}
return FALSE;
}
static gboolean
undo_pop_image_grid (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum)
{
GridUndo *gu = undo->data;
GimpGrid *grid;
grid = gimp_config_duplicate (GIMP_CONFIG (undo->gimage->grid));
gimp_image_set_grid (undo->gimage, gu->grid, FALSE);
g_object_unref (gu->grid);
gu->grid = grid;
return TRUE;
}
static void
undo_free_image_grid (GimpUndo *undo,
GimpUndoMode undo_mode)
{
GridUndo *gu = undo->data;
if (gu->grid)
g_object_unref (gu->grid);
g_free (gu);
}
/**********************/
/* Sampe Point Undo */
/**********************/
......@@ -491,9 +491,9 @@ typedef struct _SamplePointUndo SamplePointUndo;
struct _SamplePointUndo
{
GimpSamplePoint *sample_point;
gint x;
gint y;
GimpSamplePoint *sample_point;
gint x;
gint y;
};
static gboolean undo_pop_image_sample_point (GimpUndo *undo,
......@@ -523,9 +523,9 @@ gimp_image_undo_push_image_sample_point (GimpImage *gimage,
{
SamplePointUndo *gu = new->data;
gu->sample_point = gimp_image_sample_point_ref (sample_point);
gu->x = sample_point->x;
gu->y = sample_point->y;
gu->sample_point = gimp_image_sample_point_ref (sample_point);
gu->x = sample_point->x;
gu->y = sample_point->y;
return TRUE;
}
......@@ -547,7 +547,8 @@ undo_pop_image_sample_point (GimpUndo *undo,
if (gu->sample_point->x == -1)
{
undo->gimage->sample_points = g_list_prepend (undo->gimage->sample_points, gu->sample_point);
undo->gimage->sample_points = g_list_prepend (undo->gimage->sample_points,
gu->sample_point);
gu->sample_point->x = gu->x;
gu->sample_point->y = gu->y;
gimp_image_sample_point_ref (gu->sample_point);
......
......@@ -28,12 +28,12 @@ gboolean gimp_image_undo_push_image_size (GimpImage *gimage,
const gchar *undo_desc);
gboolean gimp_image_undo_push_image_resolution (GimpImage *gimage,
const gchar *undo_desc);
gboolean gimp_image_undo_push_image_grid (GimpImage *gimage,
const gchar *undo_desc,
GimpGrid *grid);
gboolean gimp_image_undo_push_image_guide (GimpImage *gimage,
const gchar *undo_desc,
GimpGuide *guide);
gboolean gimp_image_undo_push_image_grid (GimpImage *gimage,
const gchar *undo_desc,
GimpGrid *grid);
gboolean gimp_image_undo_push_image_sample_point (GimpImage *gimage,
const gchar *undo_desc,
GimpSamplePoint *sample_point);
......
......@@ -543,10 +543,8 @@ gimp_image_init (GimpImage *gimage)
gimage->projection = gimp_projection_new (gimage);
gimage->guides = NULL;
gimage->sample_points = NULL;
gimage->grid = NULL;
gimage->sample_points = NULL;
gimage->layers = gimp_list_new (GIMP_TYPE_LAYER, TRUE);
gimage->channels = gimp_list_new (GIMP_TYPE_CHANNEL, TRUE);
......@@ -867,19 +865,20 @@ gimp_image_finalize (GObject *object)
gimage->guides = NULL;
}
if (gimage->sample_points)
{
g_list_foreach (gimage->sample_points, (GFunc) gimp_image_sample_point_unref, NULL);
g_list_free (gimage->sample_points);
gimage->sample_points = NULL;
}
if (gimage->grid)
{
g_object_unref (gimage->grid);
gimage->grid = NULL;
}
if (gimage->sample_points)
{
g_list_foreach (gimage->sample_points,
(GFunc) gimp_image_sample_point_unref, NULL);
g_list_free (gimage->sample_points);
gimage->sample_points = NULL;
}
if (gimage->undo_stack)
{
g_object_unref (gimage->undo_stack);
......@@ -936,12 +935,12 @@ gimp_image_get_memsize (GimpObject *object,
gui_size);
memsize += gimp_g_list_get_memsize (gimage->guides, sizeof (GimpGuide));
memsize += gimp_g_list_get_memsize (gimage->sample_points, sizeof (GimpSamplePoint));
if (gimage->grid)
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimage->grid), gui_size);
memsize += gimp_g_list_get_memsize (gimage->sample_points,
sizeof (GimpSamplePoint));
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimage->layers),
gui_size);
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimage->channels),
......@@ -1662,7 +1661,8 @@ gimp_image_update_sample_point (GimpImage *gimage,
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (sample_point != NULL);
g_signal_emit (gimage, gimp_image_signals[UPDATE_SAMPLE_POINT], 0, sample_point);
g_signal_emit (gimage, gimp_image_signals[UPDATE_SAMPLE_POINT], 0,
sample_point);
}
void
......
......@@ -48,8 +48,8 @@ enum
PROP_SHOW_SELECTION,
PROP_SHOW_LAYER_BOUNDARY,
PROP_SHOW_GUIDES,
PROP_SHOW_SAMPLE_POINTS,
PROP_SHOW_GRID,
PROP_SHOW_SAMPLE_POINTS,
PROP_PADDING_MODE,
PROP_PADDING_COLOR
};
......@@ -182,14 +182,14 @@ gimp_display_options_class_init (GimpDisplayOptionsClass *klass)
"show-guides", SHOW_GUIDES_BLURB,
TRUE,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SAMPLE_POINTS,
"show-sample-points", SHOW_SAMPLE_POINTS_BLURB,
TRUE,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GRID,
"show-grid", SHOW_GRID_BLURB,
FALSE,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SAMPLE_POINTS,
"show-sample-points", SHOW_SAMPLE_POINTS_BLURB,
TRUE,
0);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_PADDING_MODE,
"padding-mode", CANVAS_PADDING_MODE_BLURB,
GIMP_TYPE_CANVAS_PADDING_MODE,
......@@ -240,14 +240,14 @@ gimp_display_options_fs_class_init (GimpDisplayOptionsClass *klass)
"show-guides", SHOW_GUIDES_BLURB,
FALSE,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SAMPLE_POINTS,
"show-sample-points", SHOW_SAMPLE_POINTS_BLURB,
FALSE,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GRID,
"show-grid", SHOW_GRID_BLURB,
FALSE,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SAMPLE_POINTS,
"show-sample-points", SHOW_SAMPLE_POINTS_BLURB,
FALSE,
0);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_PADDING_MODE,
"padding-mode", CANVAS_PADDING_MODE_BLURB,
GIMP_TYPE_CANVAS_PADDING_MODE,
......@@ -296,12 +296,12 @@ gimp_display_options_set_property (GObject *object,
case PROP_SHOW_GUIDES:
options->show_guides = g_value_get_boolean (value);
break;
case PROP_SHOW_SAMPLE_POINTS:
options->show_sample_points = g_value_get_boolean (value);
break;
case PROP_SHOW_GRID:
options->show_grid = g_value_get_boolean (value);
break;
case PROP_SHOW_SAMPLE_POINTS:
options->show_sample_points = g_value_get_boolean (value);
break;
case PROP_PADDING_MODE:
options->padding_mode = g_value_get_enum (value);
break;
......@@ -346,12 +346,12 @@ gimp_display_options_get_property (GObject *object,
case PROP_SHOW_GUIDES:
g_value_set_boolean (value, options->show_guides);
break;
case PROP_SHOW_SAMPLE_POINTS:
g_value_set_boolean (value, options->show_sample_points);
break;
case PROP_SHOW_GRID:
g_value_set_boolean (value, options->show_grid);
break;
case PROP_SHOW_SAMPLE_POINTS:
g_value_set_boolean (value, options->show_sample_points);
break;
case PROP_PADDING_MODE:
g_value_set_enum (value, options->padding_mode);
break;
......
......@@ -49,8 +49,8 @@ struct _GimpDisplayOptions
gboolean show_selection;
gboolean show_layer_boundary;
gboolean show_guides;
gboolean show_sample_points;
gboolean show_grid;
gboolean show_sample_points;
GimpCanvasPaddingMode padding_mode;
GimpRGB padding_color;
gboolean padding_mode_set;
......
......@@ -345,8 +345,8 @@ gimp_display_shell_get_show_transform (GimpDisplayShell *shell)
}
void
gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
gboolean show)
gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
gboolean show)
{
GimpDisplayOptions *options;
......@@ -354,28 +354,28 @@ gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
options = GET_OPTIONS (shell);
g_object_set (options, "show-grid", show, NULL);
g_object_set (options, "show-guides", show, NULL);
if (shell->gdisp->gimage->grid)
if (shell->gdisp->gimage->guides)
gimp_display_shell_expose_full (shell);
SET_ACTIVE (shell->menubar_manager, "view-show-grid", show);
SET_ACTIVE (shell->menubar_manager, "view-show-guides", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-show-grid", show);
SET_ACTIVE (shell->popup_manager, "view-show-guides", show);
}
gboolean
gimp_display_shell_get_show_grid (GimpDisplayShell *shell)
gimp_display_shell_get_show_guides (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_OPTIONS (shell)->show_grid;
return GET_OPTIONS (shell)->show_guides;
}
void
gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
gboolean show)
gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
gboolean show)
{
GimpDisplayOptions *options;
......@@ -383,23 +383,23 @@ gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
options = GET_OPTIONS (shell);