13
0

Fix compilation warnings. (libs part)

This commit is contained in:
André Nusser 2016-02-21 21:54:19 +01:00 committed by Paul Davis
parent 86d27a736c
commit 1afbdaff58
9 changed files with 39 additions and 25 deletions

View File

@ -128,7 +128,7 @@ lookup_animation_info (const GtkWidget *widget)
/* Create all the relevant information for the animation, and insert it into the hash table. */
static void
add_animation (const GtkWidget *widget, gdouble stop_time)
add_animation (GtkWidget *widget, gdouble stop_time)
{
AnimationInfo *value;

View File

@ -2010,12 +2010,12 @@ clearlooks_draw_radiobutton (cairo_t *cr,
cairo_pattern_t *pt;
gboolean inconsistent;
gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN);
gboolean draw_bullet = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_IN);
(void) width;
(void) height;
inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
inconsistent = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_ETCHED_IN);
draw_bullet |= inconsistent;
if (widget->disabled)
@ -2095,9 +2095,9 @@ clearlooks_draw_checkbox (cairo_t *cr,
const CairoColor *border;
const CairoColor *dot;
gboolean inconsistent = FALSE;
gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN);
gboolean draw_bullet = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_IN);
inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
inconsistent = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_ETCHED_IN);
draw_bullet |= inconsistent;
if (widget->disabled)

View File

@ -1241,12 +1241,12 @@ clearlooks_glossy_draw_radiobutton (cairo_t *cr,
CairoColor highlight;
cairo_pattern_t *pt;
gboolean inconsistent;
gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN);
gboolean draw_bullet = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_IN);
(void) width;
(void) height;
inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
inconsistent = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_ETCHED_IN);
draw_bullet |= inconsistent;
if (widget->disabled)
@ -1332,9 +1332,9 @@ clearlooks_glossy_draw_checkbox (cairo_t *cr,
const CairoColor *border;
const CairoColor *dot;
gboolean inconsistent = FALSE;
gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN);
gboolean draw_bullet = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_IN);
inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
inconsistent = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_ETCHED_IN);
draw_bullet |= inconsistent;
if (widget->disabled)

View File

@ -1340,12 +1340,12 @@ clearlooks_gummy_draw_radiobutton (cairo_t *cr,
CairoColor highlight;
cairo_pattern_t *pt;
gboolean inconsistent;
gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN);
gboolean draw_bullet = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_IN);
(void) width;
(void) height;
inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
inconsistent = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_ETCHED_IN);
draw_bullet |= inconsistent;
if (widget->disabled)
@ -1431,9 +1431,9 @@ clearlooks_gummy_draw_checkbox (cairo_t *cr,
const CairoColor *border;
const CairoColor *dot;
gboolean inconsistent = FALSE;
gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN);
gboolean draw_bullet = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_IN);
inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
inconsistent = (checkbox->shadow_type == (ClearlooksShadowType)GTK_SHADOW_ETCHED_IN);
draw_bullet |= inconsistent;
if (widget->disabled)

View File

@ -56,7 +56,7 @@ static ClearlooksStyleClass *clearlooks_style_class;
static GtkStyleClass *clearlooks_parent_class;
static void
clearlooks_set_widget_parameters (const GtkWidget *widget,
clearlooks_set_widget_parameters (GtkWidget *widget,
const GtkStyle *style,
GtkStateType state_type,
WidgetParameters *params)
@ -709,9 +709,9 @@ clearlooks_style_draw_box (DRAW_ARGS)
if (!params.ltr)
{
if (progressbar.orientation == GTK_PROGRESS_LEFT_TO_RIGHT)
if (progressbar.orientation == (ClearlooksOrientation)GTK_PROGRESS_LEFT_TO_RIGHT)
progressbar.orientation = GTK_PROGRESS_RIGHT_TO_LEFT;
else if (progressbar.orientation == GTK_PROGRESS_RIGHT_TO_LEFT)
else if (progressbar.orientation == (ClearlooksOrientation)GTK_PROGRESS_RIGHT_TO_LEFT)
progressbar.orientation = GTK_PROGRESS_LEFT_TO_RIGHT;
}
@ -738,8 +738,8 @@ clearlooks_style_draw_box (DRAW_ARGS)
}
else
{
if (progressbar.orientation == GTK_PROGRESS_RIGHT_TO_LEFT ||
progressbar.orientation == GTK_PROGRESS_LEFT_TO_RIGHT)
if (progressbar.orientation == (ClearlooksOrientation)GTK_PROGRESS_RIGHT_TO_LEFT ||
progressbar.orientation == (ClearlooksOrientation)GTK_PROGRESS_LEFT_TO_RIGHT)
{
tmp.x -= 1;
tmp.width += 2;

View File

@ -4,11 +4,21 @@
#include "clearlooks_style.h"
#include "clearlooks_rc_style.h"
/* declare those three functions first to avoid warnings using gcc */
GE_EXPORT void
theme_init (GTypeModule *module)
theme_init (GTypeModule* module);
GE_EXPORT void
theme_exit (void);
GE_EXPORT GtkRcStyle*
theme_create_rc_style (void);
GE_EXPORT void
theme_init (GTypeModule* module)
{
clearlooks_rc_style_register_type (module);
clearlooks_style_register_type (module);
clearlooks_rc_style_register_type (module);
clearlooks_style_register_type (module);
}
GE_EXPORT void
@ -16,8 +26,8 @@ theme_exit (void)
{
}
GE_EXPORT GtkRcStyle *
GE_EXPORT GtkRcStyle*
theme_create_rc_style (void)
{
return GTK_RC_STYLE (g_object_new (CLEARLOOKS_TYPE_RC_STYLE, NULL));
return GTK_RC_STYLE (g_object_new (CLEARLOOKS_TYPE_RC_STYLE, NULL));
}

View File

@ -11,7 +11,7 @@
Smooth-Engine.
*/
gboolean
ge_object_is_a (const GObject * object, const gchar * type_name)
ge_object_is_a (GObject * object, const gchar * type_name)
{
gboolean result = FALSE;

View File

@ -73,7 +73,7 @@
#define GE_WIDGET_HAS_DEFAULT(object) ((object) && GE_IS_WIDGET(object) && GTK_WIDGET_HAS_DEFAULT(object))
GE_INTERNAL gboolean ge_object_is_a (const GObject * object, const gchar * type_name);
GE_INTERNAL gboolean ge_object_is_a (GObject * object, const gchar * type_name);
GE_INTERNAL gboolean ge_is_combo_box_entry (GtkWidget * widget);
GE_INTERNAL gboolean ge_is_combo_box (GtkWidget * widget, gboolean as_list);

View File

@ -79,6 +79,10 @@ CairoFontDescription::CairoFontDescription (Pango::FontDescription& fd)
_weight = Cairo::FONT_WEIGHT_BOLD;
break;
/* to silence warnings when compiling with newer pango versions. */
default:
_weight = Cairo::FONT_WEIGHT_NORMAL;
break;
}
face = fd.get_family();