app: Get rid of const disqualifier warning

Get rid of const qualifier for a bunch of GimpDisplayShell getters to
get rid of a disqualifier warning. The problem is that we call into
GTK+ which sometime misses const which breaks the chain. As a general
guideline we should avoid const for widgets.
This commit is contained in:
Martin Nordholts 2009-10-24 21:02:19 +02:00
parent 4bd2230a55
commit 65c0ce5dbe
4 changed files with 88 additions and 88 deletions

View File

@ -51,7 +51,7 @@
/* local function prototypes */
static GimpDisplayOptions *
appearance_get_options (const GimpDisplayShell *shell);
appearance_get_options (GimpDisplayShell *shell);
static void appearance_set_action_active (GimpDisplayShell *shell,
const gchar *action,
gboolean active);
@ -130,7 +130,7 @@ gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_show_menubar (const GimpDisplayShell *shell)
gimp_display_shell_get_show_menubar (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -155,7 +155,7 @@ gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_show_statusbar (const GimpDisplayShell *shell)
gimp_display_shell_get_show_statusbar (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -188,7 +188,7 @@ gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_show_rulers (const GimpDisplayShell *shell)
gimp_display_shell_get_show_rulers (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -229,7 +229,7 @@ gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_show_scrollbars (const GimpDisplayShell *shell)
gimp_display_shell_get_show_scrollbars (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -254,7 +254,7 @@ gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_show_selection (const GimpDisplayShell *shell)
gimp_display_shell_get_show_selection (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -279,7 +279,7 @@ gimp_display_shell_set_show_layer (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_show_layer (const GimpDisplayShell *shell)
gimp_display_shell_get_show_layer (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -296,7 +296,7 @@ gimp_display_shell_set_show_transform (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_show_transform (const GimpDisplayShell *shell)
gimp_display_shell_get_show_transform (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -327,7 +327,7 @@ gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_show_guides (const GimpDisplayShell *shell)
gimp_display_shell_get_show_guides (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -358,7 +358,7 @@ gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_show_grid (const GimpDisplayShell *shell)
gimp_display_shell_get_show_grid (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -389,7 +389,7 @@ gimp_display_shell_set_show_sample_points (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_show_sample_points (const GimpDisplayShell *shell)
gimp_display_shell_get_show_sample_points (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -411,7 +411,7 @@ gimp_display_shell_set_snap_to_grid (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_snap_to_grid (const GimpDisplayShell *shell)
gimp_display_shell_get_snap_to_grid (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -433,7 +433,7 @@ gimp_display_shell_set_snap_to_guides (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_snap_to_guides (const GimpDisplayShell *shell)
gimp_display_shell_get_snap_to_guides (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -455,7 +455,7 @@ gimp_display_shell_set_snap_to_canvas (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_snap_to_canvas (const GimpDisplayShell *shell)
gimp_display_shell_get_snap_to_canvas (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -477,7 +477,7 @@ gimp_display_shell_set_snap_to_vectors (GimpDisplayShell *shell,
}
gboolean
gimp_display_shell_get_snap_to_vectors (const GimpDisplayShell *shell)
gimp_display_shell_get_snap_to_vectors (GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
@ -540,7 +540,7 @@ gimp_display_shell_set_padding (GimpDisplayShell *shell,
}
void
gimp_display_shell_get_padding (const GimpDisplayShell *shell,
gimp_display_shell_get_padding (GimpDisplayShell *shell,
GimpCanvasPaddingMode *padding_mode,
GimpRGB *padding_color)
{
@ -561,7 +561,7 @@ gimp_display_shell_get_padding (const GimpDisplayShell *shell,
/* private functions */
static GimpDisplayOptions *
appearance_get_options (const GimpDisplayShell *shell)
appearance_get_options (GimpDisplayShell *shell)
{
if (gimp_display_get_image (shell->display))
{

View File

@ -23,64 +23,64 @@ void gimp_display_shell_appearance_update (GimpDisplayShell *sh
void gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_menubar (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_show_menubar (GimpDisplayShell *shell);
void gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_statusbar (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_show_statusbar (GimpDisplayShell *shell);
void gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_rulers (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_show_rulers (GimpDisplayShell *shell);
void gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_scrollbars (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_show_scrollbars (GimpDisplayShell *shell);
void gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_selection (const GimpDisplayShell *shell);
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 (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_show_layer (GimpDisplayShell *shell);
void gimp_display_shell_set_show_transform (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_transform (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_show_transform (GimpDisplayShell *shell);
void gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_grid (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_show_grid (GimpDisplayShell *shell);
void gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_guides (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_show_guides (GimpDisplayShell *shell);
void gimp_display_shell_set_snap_to_grid (GimpDisplayShell *shell,
gboolean snap);
gboolean gimp_display_shell_get_snap_to_grid (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_snap_to_grid (GimpDisplayShell *shell);
void gimp_display_shell_set_show_sample_points (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_sample_points (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_show_sample_points (GimpDisplayShell *shell);
void gimp_display_shell_set_snap_to_guides (GimpDisplayShell *shell,
gboolean snap);
gboolean gimp_display_shell_get_snap_to_guides (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_snap_to_guides (GimpDisplayShell *shell);
void gimp_display_shell_set_snap_to_canvas (GimpDisplayShell *shell,
gboolean snap);
gboolean gimp_display_shell_get_snap_to_canvas (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_snap_to_canvas (GimpDisplayShell *shell);
void gimp_display_shell_set_snap_to_vectors (GimpDisplayShell *shell,
gboolean snap);
gboolean gimp_display_shell_get_snap_to_vectors (const GimpDisplayShell *shell);
gboolean gimp_display_shell_get_snap_to_vectors (GimpDisplayShell *shell);
void gimp_display_shell_set_padding (GimpDisplayShell *shell,
GimpCanvasPaddingMode mode,
const GimpRGB *color);
void gimp_display_shell_get_padding (const GimpDisplayShell *shell,
void gimp_display_shell_get_padding (GimpDisplayShell *shell,
GimpCanvasPaddingMode *mode,
GimpRGB *color);

View File

@ -74,9 +74,9 @@ static GdkGC * gimp_display_shell_get_pen_gc (GimpDisplayShell *shell,
*
**/
void
gimp_display_shell_draw_get_scaled_image_size (const GimpDisplayShell *shell,
gint *w,
gint *h)
gimp_display_shell_draw_get_scaled_image_size (GimpDisplayShell *shell,
gint *w,
gint *h)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@ -95,10 +95,10 @@ gimp_display_shell_draw_get_scaled_image_size (const GimpDisplayShell *shell,
*
**/
void
gimp_display_shell_draw_get_scaled_image_size_for_scale (const GimpDisplayShell *shell,
gdouble scale,
gint *w,
gint *h)
gimp_display_shell_draw_get_scaled_image_size_for_scale (GimpDisplayShell *shell,
gdouble scale,
gint *w,
gint *h)
{
GimpImage *image;
GimpProjection *proj;
@ -131,9 +131,9 @@ gimp_display_shell_draw_get_scaled_image_size_for_scale (const GimpDisplayShell
}
void
gimp_display_shell_draw_guide (const GimpDisplayShell *shell,
GimpGuide *guide,
gboolean active)
gimp_display_shell_draw_guide (GimpDisplayShell *shell,
GimpGuide *guide,
gboolean active)
{
gint position;
gint x1, y1, x2, y2;
@ -175,7 +175,7 @@ gimp_display_shell_draw_guide (const GimpDisplayShell *shell,
}
void
gimp_display_shell_draw_guides (const GimpDisplayShell *shell)
gimp_display_shell_draw_guides (GimpDisplayShell *shell)
{
GimpImage *image;
@ -413,9 +413,9 @@ gimp_display_shell_draw_pen (GimpDisplayShell *shell,
}
void
gimp_display_shell_draw_sample_point (const GimpDisplayShell *shell,
GimpSamplePoint *sample_point,
gboolean active)
gimp_display_shell_draw_sample_point (GimpDisplayShell *shell,
GimpSamplePoint *sample_point,
gboolean active)
{
GimpImage *image;
GimpCanvasStyle style;
@ -482,7 +482,7 @@ gimp_display_shell_draw_sample_point (const GimpDisplayShell *shell,
}
void
gimp_display_shell_draw_sample_points (const GimpDisplayShell *shell)
gimp_display_shell_draw_sample_points (GimpDisplayShell *shell)
{
GimpImage *image;
@ -504,8 +504,8 @@ gimp_display_shell_draw_sample_points (const GimpDisplayShell *shell)
}
void
gimp_display_shell_draw_vector (const GimpDisplayShell *shell,
GimpVectors *vectors)
gimp_display_shell_draw_vector (GimpDisplayShell *shell,
GimpVectors *vectors)
{
GimpStroke *stroke = NULL;
@ -543,7 +543,7 @@ gimp_display_shell_draw_vector (const GimpDisplayShell *shell,
}
void
gimp_display_shell_draw_vectors (const GimpDisplayShell *shell)
gimp_display_shell_draw_vectors (GimpDisplayShell *shell)
{
GimpImage *image;
@ -571,7 +571,7 @@ gimp_display_shell_draw_vectors (const GimpDisplayShell *shell)
}
void
gimp_display_shell_draw_cursor (const GimpDisplayShell *shell)
gimp_display_shell_draw_cursor (GimpDisplayShell *shell)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@ -581,11 +581,11 @@ gimp_display_shell_draw_cursor (const GimpDisplayShell *shell)
}
void
gimp_display_shell_draw_area (const GimpDisplayShell *shell,
gint x,
gint y,
gint w,
gint h)
gimp_display_shell_draw_area (GimpDisplayShell *shell,
gint x,
gint y,
gint w,
gint h)
{
gint sx, sy;
gint sw, sh;

View File

@ -19,39 +19,39 @@
#define __GIMP_DISPLAY_SHELL_DRAW_H__
void gimp_display_shell_draw_get_scaled_image_size (const GimpDisplayShell *shell,
gint *w,
gint *h);
void gimp_display_shell_draw_get_scaled_image_size (GimpDisplayShell *shell,
gint *w,
gint *h);
void gimp_display_shell_draw_get_scaled_image_size_for_scale
(const GimpDisplayShell *shell,
gdouble scale,
gint *w,
gint *h);
void gimp_display_shell_draw_guide (const GimpDisplayShell *shell,
GimpGuide *guide,
gboolean active);
void gimp_display_shell_draw_guides (const GimpDisplayShell *shell);
void gimp_display_shell_draw_grid (GimpDisplayShell *shell,
const GdkRectangle *area);
void gimp_display_shell_draw_pen (GimpDisplayShell *shell,
const GimpVector2 *points,
gint num_points,
GimpContext *context,
GimpActiveColor color,
gint width);
void gimp_display_shell_draw_sample_point (const GimpDisplayShell *shell,
GimpSamplePoint *sample_point,
gboolean active);
void gimp_display_shell_draw_sample_points (const GimpDisplayShell *shell);
void gimp_display_shell_draw_vector (const GimpDisplayShell *shell,
GimpVectors *vectors);
void gimp_display_shell_draw_vectors (const GimpDisplayShell *shell);
void gimp_display_shell_draw_cursor (const GimpDisplayShell *shell);
void gimp_display_shell_draw_area (const GimpDisplayShell *shell,
gint x,
gint y,
gint w,
gint h);
(GimpDisplayShell *shell,
gdouble scale,
gint *w,
gint *h);
void gimp_display_shell_draw_guide (GimpDisplayShell *shell,
GimpGuide *guide,
gboolean active);
void gimp_display_shell_draw_guides (GimpDisplayShell *shell);
void gimp_display_shell_draw_grid (GimpDisplayShell *shell,
const GdkRectangle *area);
void gimp_display_shell_draw_pen (GimpDisplayShell *shell,
const GimpVector2 *points,
gint num_points,
GimpContext *context,
GimpActiveColor color,
gint width);
void gimp_display_shell_draw_sample_point (GimpDisplayShell *shell,
GimpSamplePoint *sample_point,
gboolean active);
void gimp_display_shell_draw_sample_points (GimpDisplayShell *shell);
void gimp_display_shell_draw_vector (GimpDisplayShell *shell,
GimpVectors *vectors);
void gimp_display_shell_draw_vectors (GimpDisplayShell *shell);
void gimp_display_shell_draw_cursor (GimpDisplayShell *shell);
void gimp_display_shell_draw_area (GimpDisplayShell *shell,
gint x,
gint y,
gint w,
gint h);
#endif /* __GIMP_DISPLAY_SHELL_DRAW_H__ */