summaryrefslogtreecommitdiff
path: root/libs/clearlooks-newer
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-10-06 23:58:29 +0000
committerCarl Hetherington <carl@carlh.net>2009-10-06 23:58:29 +0000
commitc5e3ff16cb881af969cc55dbd27da9d4507aec7e (patch)
treeb1f075fa60d7fe60534d97152466d8211f5e8c5d /libs/clearlooks-newer
parentaefcce1c99598cc8c1748940a01e2d8aa55caf85 (diff)
Fix some compiler warnings.
git-svn-id: svn://localhost/ardour2/branches/3.0@5746 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/clearlooks-newer')
-rw-r--r--libs/clearlooks-newer/animation.c8
-rw-r--r--libs/clearlooks-newer/cairo-support.c8
-rw-r--r--libs/clearlooks-newer/clearlooks_draw.c31
-rw-r--r--libs/clearlooks-newer/clearlooks_draw_glossy.c13
-rw-r--r--libs/clearlooks-newer/clearlooks_draw_gummy.c10
-rw-r--r--libs/clearlooks-newer/clearlooks_rc_style.c14
-rw-r--r--libs/clearlooks-newer/clearlooks_style.c26
7 files changed, 105 insertions, 5 deletions
diff --git a/libs/clearlooks-newer/animation.c b/libs/clearlooks-newer/animation.c
index 82af498949..e6ac9fa3a4 100644
--- a/libs/clearlooks-newer/animation.c
+++ b/libs/clearlooks-newer/animation.c
@@ -159,6 +159,8 @@ add_animation (const GtkWidget *widget, gdouble stop_time)
static gboolean
update_animation_info (gpointer key, gpointer value, gpointer user_data)
{
+ (void) user_data;
+
AnimationInfo *animation_info = value;
GtkWidget *widget = key;
@@ -193,6 +195,8 @@ update_animation_info (gpointer key, gpointer value, gpointer user_data)
static gboolean
animation_timeout_handler (gpointer data)
{
+ (void) data;
+
/*g_print("** TICK **\n");*/
/* enter threads as update_animation_info will use gtk/gdk. */
@@ -213,6 +217,8 @@ animation_timeout_handler (gpointer data)
static void
on_checkbox_toggle (GtkWidget *widget, gpointer data)
{
+ (void) data;
+
AnimationInfo *animation_info = lookup_animation_info (widget);
if (animation_info != NULL)
@@ -230,6 +236,8 @@ on_checkbox_toggle (GtkWidget *widget, gpointer data)
static void
on_connected_widget_destruction (gpointer data, GObject *widget)
{
+ (void) widget;
+
connected_widgets = g_slist_remove (connected_widgets, data);
g_free (data);
}
diff --git a/libs/clearlooks-newer/cairo-support.c b/libs/clearlooks-newer/cairo-support.c
index dbe6fd3d34..63245f4833 100644
--- a/libs/clearlooks-newer/cairo-support.c
+++ b/libs/clearlooks-newer/cairo-support.c
@@ -809,7 +809,9 @@ GE_EXPORT const gchar* g_module_check_init (GModule *module);
const gchar*
g_module_check_init (GModule *module)
{
- return gtk_check_version (GTK_MAJOR_VERSION,
- GTK_MINOR_VERSION,
- GTK_MICRO_VERSION - GTK_INTERFACE_AGE);
+ (void) module;
+
+ return gtk_check_version (GTK_MAJOR_VERSION,
+ GTK_MINOR_VERSION,
+ GTK_MICRO_VERSION - GTK_INTERFACE_AGE);
}
diff --git a/libs/clearlooks-newer/clearlooks_draw.c b/libs/clearlooks-newer/clearlooks_draw.c
index 614317ea3b..c614e90918 100644
--- a/libs/clearlooks-newer/clearlooks_draw.c
+++ b/libs/clearlooks-newer/clearlooks_draw.c
@@ -29,6 +29,10 @@
#include <ge-support.h>
#include <math.h>
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
#include <cairo.h>
typedef void (*menubar_draw_proto) (cairo_t *cr,
@@ -918,6 +922,8 @@ clearlooks_draw_menu_item_separator (cairo_t *cr,
const SeparatorParameters *separator,
int x, int y, int width, int height)
{
+ (void) widget;
+
cairo_save (cr);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT);
ge_cairo_set_color (cr, &colors->shade[5]);
@@ -939,6 +945,9 @@ clearlooks_draw_menubar0 (cairo_t *cr,
const MenuBarParameters *menubar,
int x, int y, int width, int height)
{
+ (void) params;
+ (void) menubar;
+
/* const CairoColor *light = &colors->shade[0]; */
const CairoColor *dark = &colors->shade[3];
@@ -963,6 +972,9 @@ clearlooks_draw_menubar2 (cairo_t *cr,
const MenuBarParameters *menubar,
int x, int y, int width, int height)
{
+ (void) params;
+ (void) menubar;
+
CairoColor lower;
cairo_pattern_t *pattern;
@@ -1035,6 +1047,9 @@ clearlooks_get_frame_gap_clip (int x, int y, int width, int height,
ClearlooksRectangle *bevel,
ClearlooksRectangle *border)
{
+ (void) x;
+ (void) y;
+
if (frame->gap_side == CL_GAP_TOP)
{
CLEARLOOKS_RECTANGLE_SET ((*bevel), 1.5 + frame->gap_x, -0.5,
@@ -1301,6 +1316,8 @@ clearlooks_draw_separator (cairo_t *cr,
const SeparatorParameters *separator,
int x, int y, int width, int height)
{
+ (void) widget;
+
CairoColor color = colors->shade[3];
CairoColor hilight;
ge_shade_color (&color, 1.4, &hilight);
@@ -1415,6 +1432,8 @@ clearlooks_draw_toolbar (cairo_t *cr,
const ToolbarParameters *toolbar,
int x, int y, int width, int height)
{
+ (void) widget;
+
const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL];
const CairoColor *dark = &colors->shade[3];
CairoColor light;
@@ -1556,6 +1575,8 @@ clearlooks_draw_scrollbar_trough (cairo_t *cr,
const ScrollBarParameters *scrollbar,
int x, int y, int width, int height)
{
+ (void) widget;
+
const CairoColor *bg = &colors->shade[2];
const CairoColor *border = &colors->shade[5];
CairoColor bg_shade;
@@ -1795,6 +1816,9 @@ clearlooks_draw_statusbar (cairo_t *cr,
const WidgetParameters *widget,
int x, int y, int width, int height)
{
+ (void) widget;
+ (void) height;
+
const CairoColor *dark = &colors->shade[3];
CairoColor hilight;
@@ -1820,6 +1844,8 @@ clearlooks_draw_menu_frame (cairo_t *cr,
const WidgetParameters *widget,
int x, int y, int width, int height)
{
+ (void) widget;
+
const CairoColor *border = &colors->shade[5];
cairo_translate (cr, x, y);
cairo_set_line_width (cr, 1);
@@ -1908,6 +1934,8 @@ clearlooks_draw_resize_grip (cairo_t *cr,
const ResizeGripParameters *grip,
int x, int y, int width, int height)
{
+ (void) widget;
+
const CairoColor *dark = &colors->shade[4];
CairoColor hilight;
int lx, ly;
@@ -1978,6 +2006,9 @@ clearlooks_draw_radiobutton (cairo_t *cr,
const CheckboxParameters *checkbox,
int x, int y, int width, int height)
{
+ (void) width;
+ (void) height;
+
const CairoColor *border;
const CairoColor *dot;
CairoColor shadow;
diff --git a/libs/clearlooks-newer/clearlooks_draw_glossy.c b/libs/clearlooks-newer/clearlooks_draw_glossy.c
index 8a5921efc2..400851dfa1 100644
--- a/libs/clearlooks-newer/clearlooks_draw_glossy.c
+++ b/libs/clearlooks-newer/clearlooks_draw_glossy.c
@@ -33,6 +33,9 @@
#include <cairo.h>
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
static void
clearlooks_draw_glossy_gradient (cairo_t *cr,
@@ -292,12 +295,13 @@ clearlooks_glossy_draw_button (cairo_t *cr,
}
/* if (!(params->enable_glow && !params->active && !params->disabled)) */
- if (!(params->prelight && params->enable_glow && !params->active))
+ if (!(params->prelight && params->enable_glow && !params->active)) {
if (!(params->disabled))
params->style_functions->draw_inset (cr, &params->parentbg, 0, 0, width-1, height-1, params->radius+1, params->corners);
else
/*Draw a lighter inset */
clearlooks_glossy_draw_light_inset (cr, &params->parentbg, 0, 0, width-1, height-1, params->radius+1, params->corners);
+ }
cairo_translate (cr, -0.5, -0.5);
}
@@ -1090,6 +1094,10 @@ clearlooks_glossy_draw_toolbar (cairo_t *cr,
const ToolbarParameters *toolbar,
int x, int y, int width, int height)
{
+ (void) widget;
+ (void) width;
+ (void) height;
+
const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL];
const CairoColor *dark = &colors->shade[3];
CairoColor light;
@@ -1230,6 +1238,9 @@ clearlooks_glossy_draw_radiobutton (cairo_t *cr,
const CheckboxParameters *checkbox,
int x, int y, int width, int height)
{
+ (void) width;
+ (void) height;
+
const CairoColor *border;
const CairoColor *dot;
CairoColor shadow;
diff --git a/libs/clearlooks-newer/clearlooks_draw_gummy.c b/libs/clearlooks-newer/clearlooks_draw_gummy.c
index e2a990230b..b57cf24fdf 100644
--- a/libs/clearlooks-newer/clearlooks_draw_gummy.c
+++ b/libs/clearlooks-newer/clearlooks_draw_gummy.c
@@ -793,6 +793,8 @@ clearlooks_gummy_draw_separator (cairo_t *cr,
const SeparatorParameters *separator,
int x, int y, int width, int height)
{
+ (void) widget;
+
CairoColor color = colors->shade[3];
CairoColor hilight;
ge_shade_color (&color, 1.3, &hilight);
@@ -1166,6 +1168,8 @@ clearlooks_gummy_draw_toolbar (cairo_t *cr,
const ToolbarParameters *toolbar,
int x, int y, int width, int height)
{
+ (void) widget;
+
const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL];
const CairoColor *dark = &colors->shade[3];
CairoColor light;
@@ -1304,6 +1308,9 @@ clearlooks_gummy_draw_statusbar (cairo_t *cr,
const WidgetParameters *widget,
int x, int y, int width, int height)
{
+ (void) widget;
+ (void) height;
+
const CairoColor *dark = &colors->shade[3];
CairoColor hilight;
@@ -1330,6 +1337,9 @@ clearlooks_gummy_draw_radiobutton (cairo_t *cr,
const CheckboxParameters *checkbox,
int x, int y, int width, int height)
{
+ (void) width;
+ (void) height;
+
const CairoColor *border;
const CairoColor *dot;
CairoColor shadow;
diff --git a/libs/clearlooks-newer/clearlooks_rc_style.c b/libs/clearlooks-newer/clearlooks_rc_style.c
index f486453339..c9a30ff6b4 100644
--- a/libs/clearlooks-newer/clearlooks_rc_style.c
+++ b/libs/clearlooks-newer/clearlooks_rc_style.c
@@ -173,6 +173,8 @@ clearlooks_gtk2_rc_parse_boolean (GtkSettings *settings,
GScanner *scanner,
gboolean *retval)
{
+ (void) settings;
+
guint token;
token = g_scanner_get_next_token(scanner);
@@ -196,6 +198,8 @@ clearlooks_gtk2_rc_parse_color(GtkSettings *settings,
GScanner *scanner,
GdkColor *color)
{
+ (void) settings;
+
guint token;
/* Skip 'blah_color' */
@@ -213,6 +217,8 @@ clearlooks_gtk2_rc_parse_double (GtkSettings *settings,
GScanner *scanner,
gdouble *val)
{
+ (void) settings;
+
guint token;
/* Skip 'blah' */
@@ -236,6 +242,8 @@ clearlooks_gtk2_rc_parse_int (GtkSettings *settings,
GScanner *scanner,
guint8 *progressbarstyle)
{
+ (void) settings;
+
guint token;
/* Skip 'sunkenmenubar' */
@@ -259,6 +267,8 @@ clearlooks_gtk2_rc_parse_style (GtkSettings *settings,
GScanner *scanner,
ClearlooksStyles *style)
{
+ (void) settings;
+
guint token;
g_assert (CL_NUM_STYLES == CL_STYLE_GUMMY + 1); /* so that people don't forget ;-) */
@@ -298,6 +308,8 @@ clearlooks_gtk2_rc_parse_dummy (GtkSettings *settings,
GScanner *scanner,
gchar *name)
{
+ (void) settings;
+
guint token;
/* Skip option */
@@ -469,5 +481,7 @@ clearlooks_rc_style_merge (GtkRcStyle *dest,
static GtkStyle *
clearlooks_rc_style_create_style (GtkRcStyle *rc_style)
{
+ (void) rc_style;
+
return GTK_STYLE (g_object_new (CLEARLOOKS_TYPE_STYLE, NULL));
}
diff --git a/libs/clearlooks-newer/clearlooks_style.c b/libs/clearlooks-newer/clearlooks_style.c
index 48b6647df3..eafb2d2ec1 100644
--- a/libs/clearlooks-newer/clearlooks_style.c
+++ b/libs/clearlooks-newer/clearlooks_style.c
@@ -959,6 +959,8 @@ clearlooks_style_draw_slider (DRAW_ARGS, GtkOrientation orientation)
static void
clearlooks_style_draw_option (DRAW_ARGS)
{
+ (void) detail;
+
ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
const ClearlooksColors *colors;
WidgetParameters params;
@@ -1020,6 +1022,10 @@ clearlooks_style_draw_vline (GtkStyle *style,
gint y2,
gint x)
{
+ (void) state_type;
+ (void) widget;
+ (void) detail;
+
ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
const ClearlooksColors *colors;
SeparatorParameters separator = { FALSE };
@@ -1050,6 +1056,9 @@ clearlooks_style_draw_hline (GtkStyle *style,
gint x2,
gint y)
{
+ (void) state_type;
+ (void) widget;
+
ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
const ClearlooksColors *colors;
cairo_t *cr;
@@ -1130,6 +1139,8 @@ clearlooks_style_draw_resize_grip (GtkStyle *style,
gint width,
gint height)
{
+ (void) detail;
+
ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
ClearlooksColors *colors = &clearlooks_style->colors;
cairo_t *cr;
@@ -1156,6 +1167,9 @@ clearlooks_style_draw_resize_grip (GtkStyle *style,
static void
clearlooks_style_draw_tab (DRAW_ARGS)
{
+ (void) shadow_type;
+ (void) detail;
+
ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
ClearlooksColors *colors = &clearlooks_style->colors;
WidgetParameters params;
@@ -1191,6 +1205,10 @@ clearlooks_style_draw_arrow (GtkStyle *style,
gint width,
gint height)
{
+ (void) shadow;
+ (void) detail;
+ (void) fill;
+
ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
ClearlooksColors *colors = &clearlooks_style->colors;
WidgetParameters params;
@@ -1238,7 +1256,7 @@ clearlooks_style_init_from_rc (GtkStyle * style,
clearlooks_parent_class->init_from_rc (style, rc_style);
- g_assert ((CLEARLOOKS_RC_STYLE (rc_style)->style >= 0) && (CLEARLOOKS_RC_STYLE (rc_style)->style < CL_NUM_STYLES));
+ g_assert ((CLEARLOOKS_RC_STYLE (rc_style)->style < CL_NUM_STYLES));
clearlooks_style->style = CLEARLOOKS_RC_STYLE (rc_style)->style;
clearlooks_style->menubarstyle = CLEARLOOKS_RC_STYLE (rc_style)->menubarstyle;
@@ -1460,6 +1478,8 @@ clearlooks_style_draw_layout (GtkStyle * style,
GtkWidget * widget,
const gchar * detail, gint x, gint y, PangoLayout * layout)
{
+ (void) detail;
+
GdkGC *gc;
g_return_if_fail (GTK_IS_STYLE (style));
@@ -1508,6 +1528,9 @@ clearlooks_style_draw_render_icon (GtkStyle *style,
GtkWidget *widget,
const char *detail)
{
+ (void) direction;
+ (void) detail;
+
int width = 1;
int height = 1;
GdkPixbuf *scaled;
@@ -1579,6 +1602,7 @@ clearlooks_style_draw_render_icon (GtkStyle *style,
static void
clearlooks_style_init (ClearlooksStyle * style)
{
+ (void) style;
}
static void