From 27d77b8719c15254369391e57227d20c4cfcbb20 Mon Sep 17 00:00:00 2001 From: Julien de Kozak Date: Sun, 24 Mar 2013 14:55:56 +0100 Subject: Fix some compilation warnings --- libs/clearlooks-newer/animation.c | 10 +++++----- libs/clearlooks-newer/animation.h | 2 +- libs/clearlooks-newer/clearlooks_draw.c | 12 +----------- libs/clearlooks-newer/clearlooks_draw_glossy.c | 6 ------ libs/clearlooks-newer/clearlooks_draw_gummy.c | 6 ------ libs/clearlooks-newer/clearlooks_draw_inverted.c | 22 +--------------------- libs/clearlooks-newer/clearlooks_style.c | 9 +++------ 7 files changed, 11 insertions(+), 56 deletions(-) (limited to 'libs/clearlooks-newer') diff --git a/libs/clearlooks-newer/animation.c b/libs/clearlooks-newer/animation.c index 24766aa907..2c6a6fdc42 100644 --- a/libs/clearlooks-newer/animation.c +++ b/libs/clearlooks-newer/animation.c @@ -63,7 +63,7 @@ force_widget_redraw (GtkWidget *widget) /* ensures that the timer is running */ static void -start_timer () +start_timer (void) { if (animation_timer_id == 0) animation_timer_id = g_timeout_add (ANIMATION_DELAY, animation_timeout_handler, NULL); @@ -71,7 +71,7 @@ start_timer () /* ensures that the timer is stopped */ static void -stop_timer () +stop_timer (void) { if (animation_timer_id != 0) { @@ -243,7 +243,7 @@ on_connected_widget_destruction (gpointer data, GObject *widget) } static void -disconnect_all_signals () +disconnect_all_signals (void) { GSList * item = connected_widgets; while (item != NULL) @@ -265,7 +265,7 @@ disconnect_all_signals () static gint find_signal_info (gconstpointer signal_info, gconstpointer widget) { - if (((SignalInfo*)signal_info)->widget == widget) + if (((const SignalInfo*)signal_info)->widget == widget) return 0; else return 1; @@ -325,7 +325,7 @@ clearlooks_animation_elapsed (gpointer data) /* cleans up all resources of the animation system */ void -clearlooks_animation_cleanup () +clearlooks_animation_cleanup (void) { disconnect_all_signals (); diff --git a/libs/clearlooks-newer/animation.h b/libs/clearlooks-newer/animation.h index da70b6ce66..dca70bc9a4 100644 --- a/libs/clearlooks-newer/animation.h +++ b/libs/clearlooks-newer/animation.h @@ -30,5 +30,5 @@ GE_INTERNAL void clearlooks_animation_progressbar_add (GtkWidget *progressba GE_INTERNAL void clearlooks_animation_connect_checkbox (GtkWidget *widget); GE_INTERNAL gboolean clearlooks_animation_is_animated (GtkWidget *widget); GE_INTERNAL gdouble clearlooks_animation_elapsed (gpointer data); -GE_INTERNAL void clearlooks_animation_cleanup (); +GE_INTERNAL void clearlooks_animation_cleanup (void); #endif /* HAVE_ANIMATION */ diff --git a/libs/clearlooks-newer/clearlooks_draw.c b/libs/clearlooks-newer/clearlooks_draw.c index 167c458dd9..e44610b4ee 100644 --- a/libs/clearlooks-newer/clearlooks_draw.c +++ b/libs/clearlooks-newer/clearlooks_draw.c @@ -1088,7 +1088,7 @@ clearlooks_draw_frame (cairo_t *cr, int x, int y, int width, int height) { const CairoColor *border = frame->border; - const CairoColor *dark = (CairoColor*)&colors->shade[4]; + const CairoColor *dark = (const CairoColor*)&colors->shade[4]; ClearlooksRectangle bevel_clip = {0, 0, 0, 0}; ClearlooksRectangle frame_clip = {0, 0, 0, 0}; double radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); @@ -1623,7 +1623,6 @@ clearlooks_draw_scrollbar_stepper (cairo_t *cr, CairoColor border; CairoColor s1, s2, s3, s4; cairo_pattern_t *pattern; - ShadowParameters shadow; double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); ge_shade_color(&colors->shade[6], 1.05, &border); @@ -1675,12 +1674,6 @@ clearlooks_draw_scrollbar_stepper (cairo_t *cr, cairo_stroke (cr); cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; - /* - clearlooks_draw_highlight_and_shade (cr, &shadow, - width, - height, params->radius);*/ } static void @@ -1892,17 +1885,14 @@ clearlooks_draw_handle (cairo_t *cr, { const CairoColor *fill = &colors->bg[params->state_type]; int num_bars = 6; /* shut up gcc warnings */ - int bar_spacing; switch (handle->type) { case CL_HANDLE_TOOLBAR: num_bars = 6; - bar_spacing = 3; break; case CL_HANDLE_SPLITTER: num_bars = 16; - bar_spacing = 3; break; } diff --git a/libs/clearlooks-newer/clearlooks_draw_glossy.c b/libs/clearlooks-newer/clearlooks_draw_glossy.c index 400851dfa1..62f17f3f95 100644 --- a/libs/clearlooks-newer/clearlooks_draw_glossy.c +++ b/libs/clearlooks-newer/clearlooks_draw_glossy.c @@ -688,7 +688,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr, cairo_pattern_t *pattern; double radius; - double strip_size; radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); @@ -707,7 +706,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr, if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM) { height += 3.0; - strip_size = 2.0/height; /* 2 pixel high strip */ if (tab->gap_side == CL_GAP_TOP) cairo_translate (cr, 0.0, -3.0); /* gap at the other side */ @@ -715,7 +713,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr, else { width += 3.0; - strip_size = 2.0/width; if (tab->gap_side == CL_GAP_LEFT) cairo_translate (cr, -3.0, 0.0); /* gap at the other side */ @@ -893,7 +890,6 @@ clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr, const CairoColor *border = &colors->shade[7]; CairoColor fill, s1, s2, s4; cairo_pattern_t *pattern; - ShadowParameters shadow; double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); if (scrollbar->horizontal) @@ -944,8 +940,6 @@ clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr, cairo_stroke (cr); cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; } static void diff --git a/libs/clearlooks-newer/clearlooks_draw_gummy.c b/libs/clearlooks-newer/clearlooks_draw_gummy.c index b57cf24fdf..0d736b5acc 100644 --- a/libs/clearlooks-newer/clearlooks_draw_gummy.c +++ b/libs/clearlooks-newer/clearlooks_draw_gummy.c @@ -665,7 +665,6 @@ clearlooks_gummy_draw_tab (cairo_t *cr, cairo_pattern_t *pattern; double radius; - double strip_size; radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); @@ -683,7 +682,6 @@ clearlooks_gummy_draw_tab (cairo_t *cr, if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM) { height += 3.0; - strip_size = 2.0/height; /* 2 pixel high strip */ if (tab->gap_side == CL_GAP_TOP) cairo_translate (cr, 0.0, -3.0); /* gap at the other side */ @@ -691,7 +689,6 @@ clearlooks_gummy_draw_tab (cairo_t *cr, else { width += 3.0; - strip_size = 2.0/width; if (tab->gap_side == CL_GAP_LEFT) cairo_translate (cr, -3.0, 0.0); /* gap at the other side */ @@ -927,7 +924,6 @@ clearlooks_gummy_draw_scrollbar_stepper (cairo_t *cr, CairoColor fill; CairoColor shade1, shade2, shade3; cairo_pattern_t *pattern; - ShadowParameters shadow; double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); if (scrollbar->horizontal) @@ -977,8 +973,6 @@ clearlooks_gummy_draw_scrollbar_stepper (cairo_t *cr, cairo_stroke (cr); cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; } static void diff --git a/libs/clearlooks-newer/clearlooks_draw_inverted.c b/libs/clearlooks-newer/clearlooks_draw_inverted.c index 2e8ee3bcd7..017c39d714 100644 --- a/libs/clearlooks-newer/clearlooks_draw_inverted.c +++ b/libs/clearlooks-newer/clearlooks_draw_inverted.c @@ -394,7 +394,7 @@ clearlooks_inverted_draw_menubaritem (cairo_t *cr, const WidgetParameters *widget, int x, int y, int width, int height) { - CairoColor *fill = (CairoColor*)&colors->spot[1]; + const CairoColor *fill = &colors->spot[1]; CairoColor fill_shade; CairoColor border = colors->spot[2]; cairo_pattern_t *pattern; @@ -481,19 +481,6 @@ clearlooks_inverted_draw_tab (cairo_t *cr, ge_shade_color (fill, 1.3, &hilight); - /* Draw highlight */ - if (!params->active) - { - ShadowParameters shadow; - - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = params->corners; - /* - clearlooks_draw_highlight_and_shade (cr, colors, &shadow, - width, - height, radius);*/ - } - if (params->active) { pattern = cairo_pattern_create_linear ( tab->gap_side == CL_GAP_LEFT ? width-1 : 0, @@ -761,7 +748,6 @@ clearlooks_inverted_draw_scrollbar_stepper (cairo_t *cr, CairoColor border; CairoColor s1, s2, s3; cairo_pattern_t *pattern; - ShadowParameters shadow; double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); ge_shade_color(&colors->shade[6], 1.05, &border); @@ -808,12 +794,6 @@ clearlooks_inverted_draw_scrollbar_stepper (cairo_t *cr, cairo_stroke (cr); cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; - /* - clearlooks_draw_highlight_and_shade (cr, &shadow, - width, - height, params->radius);*/ } static void diff --git a/libs/clearlooks-newer/clearlooks_style.c b/libs/clearlooks-newer/clearlooks_style.c index eafb2d2ec1..f1b46a5426 100644 --- a/libs/clearlooks-newer/clearlooks_style.c +++ b/libs/clearlooks-newer/clearlooks_style.c @@ -536,7 +536,6 @@ clearlooks_style_draw_box (DRAW_ARGS) else if (DETAIL ("button") || DETAIL ("buttondefault")) { WidgetParameters params; - ShadowParameters shadow = { CR_CORNER_ALL, CL_SHADOW_NONE } ; clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); if (ge_is_in_combo_box(widget)) @@ -545,23 +544,21 @@ clearlooks_style_draw_box (DRAW_ARGS) params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT; else params.corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT; - - shadow.shadow = CL_SHADOW_IN; if (params.xthickness > 2) { if (params.ltr) x--; width++; - } + } } else { params.corners = CR_CORNER_ALL; /* if (!(ge_is_combo_box (widget, FALSE))) */ params.enable_glow = TRUE; - } - + } + if (GE_IS_TOGGLE_BUTTON (widget) && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) params.active = TRUE; -- cgit v1.2.3