summaryrefslogtreecommitdiff
path: root/libs/clearlooks-older
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-10-04 14:51:05 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-10-04 14:51:05 -0400
commit4dc63966f0872efe768dad61eb9b8785d06b92d1 (patch)
treee54104d57d6c2da7840979181368151fd0819c96 /libs/clearlooks-older
parent297e80e020da94a56984b20782584bb1dd96ea34 (diff)
globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
Diffstat (limited to 'libs/clearlooks-older')
-rw-r--r--libs/clearlooks-older/clearlooks_draw.c36
-rw-r--r--libs/clearlooks-older/clearlooks_draw.h20
-rw-r--r--libs/clearlooks-older/clearlooks_rc_style.c30
-rw-r--r--libs/clearlooks-older/clearlooks_style.c68
-rw-r--r--libs/clearlooks-older/clearlooks_theme_main.c2
-rw-r--r--libs/clearlooks-older/support.c30
-rw-r--r--libs/clearlooks-older/support.h4
7 files changed, 95 insertions, 95 deletions
diff --git a/libs/clearlooks-older/clearlooks_draw.c b/libs/clearlooks-older/clearlooks_draw.c
index 144be35152..68bd0e6ee9 100644
--- a/libs/clearlooks-older/clearlooks_draw.c
+++ b/libs/clearlooks-older/clearlooks_draw.c
@@ -12,11 +12,11 @@ static void cl_draw_borders (GdkWindow *window, GtkWidget *widget, GtkStyle *sty
static void cl_draw_line (GdkWindow *window, GtkWidget *widget, GtkStyle *style,
int x1, int y1, int x2, int y2, CLBorderType border,
CLRectangle *r);
-
+
static void cl_draw_corner (GdkWindow *window, GtkWidget *widget, GtkStyle *style,
int x, int y, int width, int height,
CLRectangle *r, CLCornerSide corner);
-
+
static void cl_draw_fill (GdkWindow *window, GtkWidget *widget, GtkStyle *style,
int x, int y, int width, int height, CLRectangle *r);
@@ -471,7 +471,7 @@ void cl_rectangle_reset (CLRectangle *r, GtkStyle *style)
CL_CORNER_ROUND, CL_CORNER_ROUND);
}
-static void cl_progressbar_points_transform (GdkPoint *points, int npoints,
+static void cl_progressbar_points_transform (GdkPoint *points, int npoints,
int offset, gboolean is_horizontal)
{
int i;
@@ -514,8 +514,8 @@ GdkPixmap* cl_progressbar_tile_new (GdkDrawable *drawable, GtkWidget *widget,
else
draw_vgradient (tmp, style->black_gc, style, 0, 0, width, height,
&tmp_color, &clearlooks_style->spot2); /* TODO: swap for RTL */
-
- if (orientation == GTK_PROGRESS_RIGHT_TO_LEFT ||
+
+ if (orientation == GTK_PROGRESS_RIGHT_TO_LEFT ||
orientation == GTK_PROGRESS_BOTTOM_TO_TOP)
{
offset = -offset;
@@ -539,7 +539,7 @@ GdkPixmap* cl_progressbar_tile_new (GdkDrawable *drawable, GtkWidget *widget,
points[2] = (GdkPoint){0, xdir*(stripe_width - topright_div_2)}; /* bottomright */
points[3] = (GdkPoint){0, xdir*(-topright_div_2)}; /* bottomleft */
}
-
+
shift = (stripe_width*2)/(double)10;
cl_progressbar_points_transform (points, 4, (offset*shift), is_horizontal);
@@ -654,7 +654,7 @@ void cl_progressbar_fill (GdkDrawable *drawable, GtkWidget *widget,
g_object_unref (tile);
}
-GdkColor cl_gc_set_fg_color_shade (GdkGC *gc, GdkColormap *colormap,
+GdkColor cl_gc_set_fg_color_shade (GdkGC *gc, GdkColormap *colormap,
GdkColor *from, gfloat s)
{
GdkColor tmp_color;
@@ -732,11 +732,11 @@ void cl_draw_inset (GtkStyle *style, GdkWindow *window, GtkWidget *widget,
&clwindowstyle->inset_light[windowstate]);
}
cl_rectangle_set_clip_rectangle (&r, area);
- cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
+ cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
cl_rectangle_reset_clip_rectangle (&r);
}
-/* Draw a normal (toggle)button. Not spinbuttons.*/
+/* Draw a normal (toggle)button. Not spinbuttons.*/
void cl_draw_button(GtkStyle *style, GdkWindow *window,
GtkStateType state_type, GtkShadowType shadow_type,
GdkRectangle *area,
@@ -801,7 +801,7 @@ void cl_draw_button(GtkStyle *style, GdkWindow *window,
cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
- if (!is_active)
+ if (!is_active)
{
int tmp_height = (float)height*0.25;
@@ -948,7 +948,7 @@ void cl_draw_combobox_entry (GtkStyle *style, GdkWindow *window,
cl_rectangle_set_clip_rectangle (&r, area);
cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
- cl_draw_shadow (window, widget, style, x, y, width, height, &r);
+ cl_draw_shadow (window, widget, style, x, y, width, height, &r);
cl_rectangle_reset_clip_rectangle (&r);
}
@@ -1086,7 +1086,7 @@ void cl_draw_entry (GtkStyle *style, GdkWindow *window,
cl_rectangle_set_clip_rectangle (&r, area);
cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
- cl_draw_shadow (window, widget, style, x, y, width, height, &r);
+ cl_draw_shadow (window, widget, style, x, y, width, height, &r);
cl_rectangle_reset_clip_rectangle (&r);
}
@@ -1121,7 +1121,7 @@ void cl_draw_optionmenu(GtkStyle *style, GdkWindow *window,
void cl_draw_menuitem_button (GdkDrawable *window, GtkWidget *widget, GtkStyle *style,
- GdkRectangle *area, GtkStateType state_type,
+ GdkRectangle *area, GtkStateType state_type,
int x, int y, int width, int height, CLRectangle *r)
{
ClearlooksStyle *clearlooks_style = (ClearlooksStyle*)style;
@@ -1159,7 +1159,7 @@ void cl_draw_menuitem_button (GdkDrawable *window, GtkWidget *widget, GtkStyle *
}
void cl_draw_menuitem_flat (GdkDrawable *window, GtkWidget *widget, GtkStyle *style,
- GdkRectangle *area, GtkStateType state_type,
+ GdkRectangle *area, GtkStateType state_type,
int x, int y, int width, int height, CLRectangle *r)
{
ClearlooksStyle *clearlooks_style = (ClearlooksStyle*)style;
@@ -1185,7 +1185,7 @@ void cl_draw_menuitem_flat (GdkDrawable *window, GtkWidget *widget, GtkStyle *st
}
void cl_draw_menuitem_gradient (GdkDrawable *window, GtkWidget *widget, GtkStyle *style,
- GdkRectangle *area, GtkStateType state_type,
+ GdkRectangle *area, GtkStateType state_type,
int x, int y, int width, int height, CLRectangle *r)
{
ClearlooksStyle *clearlooks_style = (ClearlooksStyle*)style;
@@ -1197,7 +1197,7 @@ void cl_draw_menuitem_gradient (GdkDrawable *window, GtkWidget *widget, GtkStyle
cl_rectangle_set_corners (r, CL_CORNER_NARROW, CL_CORNER_NARROW,
CL_CORNER_NARROW, CL_CORNER_NARROW);
-
+
cl_rectangle_set_gradient (&r->fill_gradient,
&style->base[GTK_STATE_SELECTED], &lower_color);
@@ -1265,8 +1265,8 @@ void cl_draw_treeview_header (GtkStyle *style, GdkWindow *window,
if (resizable || (column_index != columns-1))
{
- gdk_draw_line (window, clearlooks_style->shade_gc[4], x+width-2, y+4, x+width-2, y+height-5);
- gdk_draw_line (window, clearlooks_style->shade_gc[0], x+width-1, y+4, x+width-1, y+height-5);
+ gdk_draw_line (window, clearlooks_style->shade_gc[4], x+width-2, y+4, x+width-2, y+height-5);
+ gdk_draw_line (window, clearlooks_style->shade_gc[0], x+width-1, y+4, x+width-1, y+height-5);
}
/* left light line */
diff --git a/libs/clearlooks-older/clearlooks_draw.h b/libs/clearlooks-older/clearlooks_draw.h
index a8cbb3732f..0605cba1f9 100644
--- a/libs/clearlooks-older/clearlooks_draw.h
+++ b/libs/clearlooks-older/clearlooks_draw.h
@@ -4,7 +4,7 @@
#include <gtk/gtk.h>
#include <gdk/gdk.h>
-typedef struct
+typedef struct
{
GdkColor *from;
GdkColor *to;
@@ -104,8 +104,8 @@ void cl_progressbar_fill (GdkDrawable *drawable, GtkWidget *widget,
GtkStyle *style, GdkGC *gc,
gint x, gint y, gint width, gint height,
guint8 offset, GdkRectangle *area);
-
-GdkColor cl_gc_set_fg_color_shade (GdkGC *gc, GdkColormap *colormap,
+
+GdkColor cl_gc_set_fg_color_shade (GdkGC *gc, GdkColormap *colormap,
GdkColor *from, gfloat s);
void cl_draw_spinbutton(GtkStyle *style, GdkWindow *window,
@@ -137,23 +137,23 @@ void cl_draw_combobox_button (GtkStyle *style, GdkWindow *window,
GdkRectangle *area,
GtkWidget *widget, const gchar *detail,
gint x, gint y, gint width, gint height);
-
+
void cl_draw_menuitem_button (GdkDrawable *window, GtkWidget *widget, GtkStyle *style,
- GdkRectangle *area, GtkStateType state_type,
+ GdkRectangle *area, GtkStateType state_type,
int x, int y, int wiidth, int height, CLRectangle *r);
void cl_draw_menuitem_flat (GdkDrawable *window, GtkWidget *widget, GtkStyle *style,
- GdkRectangle *area, GtkStateType state_type,
+ GdkRectangle *area, GtkStateType state_type,
int x, int y, int wiidth, int height, CLRectangle *r);
-
+
void cl_draw_menuitem_gradient (GdkDrawable *window, GtkWidget *widget, GtkStyle *style,
- GdkRectangle *area, GtkStateType state_type,
+ GdkRectangle *area, GtkStateType state_type,
int x, int y, int wiidth, int height, CLRectangle *r);
-
+
void cl_draw_treeview_header (GtkStyle *style, GdkWindow *window,
GtkStateType state_type, GtkShadowType shadow_type,
GdkRectangle *area,
GtkWidget *widget, const gchar *detail,
gint x, gint y, gint width, gint height);
-
+
#endif /* CLEARLOOKS_DRAW_H */
diff --git a/libs/clearlooks-older/clearlooks_rc_style.c b/libs/clearlooks-older/clearlooks_rc_style.c
index 1c5f2c495e..f3af2044fe 100644
--- a/libs/clearlooks-older/clearlooks_rc_style.c
+++ b/libs/clearlooks-older/clearlooks_rc_style.c
@@ -82,7 +82,7 @@ clearlooks_rc_style_register_type (GTypeModule *module)
(GInstanceInitFunc) clearlooks_rc_style_init,
NULL
};
-
+
clearlooks_type_rc_style = g_type_module_register_type (module,
GTK_TYPE_RC_STYLE,
"ClearlooksRcStyle",
@@ -149,7 +149,7 @@ theme_parse_contrast(GtkSettings *settings,
return G_TOKEN_FLOAT;
*contrast = scanner->value.v_float;
-
+
return G_TOKEN_NONE;
}
@@ -172,7 +172,7 @@ theme_parse_sunkenmenubar(GtkSettings *settings,
return G_TOKEN_INT;
*sunken = scanner->value.v_int;
-
+
return G_TOKEN_NONE;
}
@@ -195,7 +195,7 @@ theme_parse_progressbarstyle(GtkSettings *settings,
return G_TOKEN_INT;
*progressbarstyle = scanner->value.v_int;
-
+
return G_TOKEN_NONE;
}
@@ -218,7 +218,7 @@ theme_parse_menubarstyle(GtkSettings *settings,
return G_TOKEN_INT;
*menubarstyle = scanner->value.v_int;
-
+
return G_TOKEN_NONE;
}
@@ -241,7 +241,7 @@ theme_parse_menuitemstyle(GtkSettings *settings,
return G_TOKEN_INT;
*menuitemstyle = scanner->value.v_int;
-
+
return G_TOKEN_NONE;
}
@@ -249,30 +249,30 @@ static guint
theme_parse_listviewitemstyle(GtkSettings *settings,
GScanner *scanner,
guint8 *listviewitemstyle)
-{
+{
guint token;
-
+
token = g_scanner_get_next_token(scanner);
-
+
token = g_scanner_get_next_token(scanner);
if (token != G_TOKEN_EQUAL_SIGN)
return G_TOKEN_EQUAL_SIGN;
-
+
token = g_scanner_get_next_token(scanner);
if (token != G_TOKEN_INT)
return G_TOKEN_INT;
-
+
*listviewitemstyle = scanner->value.v_int;
-
+
return G_TOKEN_NONE;
-}
+}
static guint
clearlooks_rc_style_parse (GtkRcStyle *rc_style,
GtkSettings *settings,
GScanner *scanner)
-
+
{
static GQuark scope_id = 0;
ClearlooksRcStyle *clearlooks_style = CLEARLOOKS_RC_STYLE (rc_style);
@@ -280,7 +280,7 @@ clearlooks_rc_style_parse (GtkRcStyle *rc_style,
guint old_scope;
guint token;
guint i;
-
+
/* Set up a new scope in this scanner. */
if (!scope_id)
diff --git a/libs/clearlooks-older/clearlooks_style.c b/libs/clearlooks-older/clearlooks_style.c
index 074f1604b1..29cc30dd9b 100644
--- a/libs/clearlooks-older/clearlooks_style.c
+++ b/libs/clearlooks-older/clearlooks_style.c
@@ -220,7 +220,7 @@ clearlooks_draw_arrow (GtkStyle *style,
height = 7;
}
- /* Compensate arrow position for "sunken" look */
+ /* Compensate arrow position for "sunken" look */
if (DETAIL ("spinbutton") && arrow_type == GTK_ARROW_DOWN &&
style->xthickness > 2 && style->ythickness > 2)
y -= 1;
@@ -260,7 +260,7 @@ draw_flat_box (DRAW_ARGS)
sanitize_size (window, &width, &height);
if (detail &&
- clearlooks_style->listviewitemstyle == 1 &&
+ clearlooks_style->listviewitemstyle == 1 &&
state_type == GTK_STATE_SELECTED && (
!strncmp ("cell_even", detail, strlen ("cell_even")) ||
!strncmp ("cell_odd", detail, strlen ("cell_odd"))))
@@ -352,7 +352,7 @@ draw_shadow (DRAW_ARGS)
{
gtk_style_apply_default_background (style, window,widget && !GTK_WIDGET_NO_WINDOW (widget),
state_type, area, x, y, width, height);
-
+
if (area)
{
gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[3], area);
@@ -456,7 +456,7 @@ draw_shadow (DRAW_ARGS)
rect.height = d;
-static void
+static void
draw_box_gap (DRAW_ARGS,
GtkPositionType gap_side,
gint gap_x,
@@ -561,7 +561,7 @@ draw_box_gap (DRAW_ARGS,
cl_draw_rectangle (window, widget, style, x, y, width, height, &r);
- cl_draw_shadow (window, widget, style, x, y, width, height, &r);
+ cl_draw_shadow (window, widget, style, x, y, width, height, &r);
gdk_gc_set_clip_region (r.bordergc, NULL);
gdk_gc_set_clip_region (r.topleft, NULL);
@@ -734,11 +734,11 @@ draw_extension (DRAW_ARGS, GtkPositionType gap_side)
gap_side);
}
}
-
+
/**************************************************************************/
-static void
+static void
draw_handle (DRAW_ARGS, GtkOrientation orientation)
{
ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
@@ -795,7 +795,7 @@ draw_handle (DRAW_ARGS, GtkOrientation orientation)
gdk_gc_set_clip_rectangle (light_gc, area);
gdk_gc_set_clip_rectangle (dark_gc, area);
}
-
+
if (area)
{
gdk_gc_set_clip_rectangle (light_gc, NULL);
@@ -807,7 +807,7 @@ draw_handle (DRAW_ARGS, GtkOrientation orientation)
gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[0], area);
gdk_gc_set_clip_rectangle (clearlooks_style->shade_gc[3], area);
}
-
+
gdk_draw_line (window, clearlooks_style->shade_gc[0], x, y, x + width, y);
gdk_draw_line (window, clearlooks_style->shade_gc[3], x, y + height - 1, x + width, y + height - 1);
@@ -1006,8 +1006,8 @@ draw_box (DRAW_ARGS)
GtkOrientation orientation = GTK_RANGE (widget)->orientation;
- gint fill_size = (orientation ? height : width) *
- (1 / ((adjustment->upper - adjustment->lower) /
+ gint fill_size = (orientation ? height : width) *
+ (1 / ((adjustment->upper - adjustment->lower) /
(adjustment->value - adjustment->lower)));
if (orientation == GTK_ORIENTATION_HORIZONTAL)
@@ -1028,7 +1028,7 @@ draw_box (DRAW_ARGS)
shadow = clearlooks_style->shade_gc[3];
}
- cl_rectangle_init (&r, inner, outer, CL_CORNER_NONE, CL_CORNER_NONE,
+ cl_rectangle_init (&r, inner, outer, CL_CORNER_NONE, CL_CORNER_NONE,
CL_CORNER_NONE, CL_CORNER_NONE );
r.topleft = shadow;
@@ -1071,7 +1071,7 @@ draw_box (DRAW_ARGS)
GdkGC *inner = clearlooks_style->shade_gc[3],
*outer = clearlooks_style->shade_gc[5];
- cl_rectangle_init (&r, inner, outer, CL_CORNER_NONE, CL_CORNER_NONE,
+ cl_rectangle_init (&r, inner, outer, CL_CORNER_NONE, CL_CORNER_NONE,
CL_CORNER_NONE, CL_CORNER_NONE );
if (GTK_RANGE (widget)->orientation == GTK_ORIENTATION_VERTICAL)
@@ -1334,7 +1334,7 @@ draw_box (DRAW_ARGS)
state_type, area, x, y, width, height);
/* we only want the borders on horizontal toolbars */
- if ( DETAIL ("menubar") || height < 2*width ) {
+ if ( DETAIL ("menubar") || height < 2*width ) {
if (!DETAIL ("menubar"))
gdk_draw_line (window, clearlooks_style->shade_gc[0],
x, y, x + width, y); /* top */
@@ -1411,7 +1411,7 @@ ensure_check_pixmaps (GtkStyle *style,
gdk_pixbuf_composite (base, composite,
0, 0, RADIO_SIZE, RADIO_SIZE, 0, 0,
1.0, 1.0, GDK_INTERP_NEAREST, 255);
-
+
gdk_pixbuf_composite (inconsistent, composite,
0, 0, RADIO_SIZE, RADIO_SIZE, 0, 0,
1.0, 1.0, GDK_INTERP_NEAREST, 255);
@@ -1609,7 +1609,7 @@ ensure_radio_pixmaps (GtkStyle *style,
gdk_pixbuf_composite (outline, composite,
0, 0, RADIO_SIZE, RADIO_SIZE, 0, 0,
1.0, 1.0, GDK_INTERP_NEAREST, 255);
-
+
gdk_pixbuf_composite (circle, composite,
0, 0, RADIO_SIZE, RADIO_SIZE, 0, 0,
1.0, 1.0, GDK_INTERP_NEAREST, 255);
@@ -1696,7 +1696,7 @@ draw_option (DRAW_ARGS)
/**************************************************************************/
-static void
+static void
draw_shadow_gap (DRAW_ARGS,
GtkPositionType gap_side,
gint gap_x,
@@ -1705,7 +1705,7 @@ draw_shadow_gap (DRAW_ARGS,
/* I need to improve this function. */
ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
CLRectangle r;
- GdkRegion *area_region = NULL,
+ GdkRegion *area_region = NULL,
*gap_region = NULL;
#if DEBUG
@@ -2036,7 +2036,7 @@ draw_resize_grip (GtkStyle *style,
ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
g_return_if_fail (GTK_IS_STYLE (style));
g_return_if_fail (window != NULL);
-
+
if (area)
{
gdk_gc_set_clip_rectangle (style->light_gc[state_type], area);
@@ -2129,7 +2129,7 @@ draw_resize_grip (GtkStyle *style,
/* Clear background */
gtk_style_apply_default_background (style, window, FALSE,
state_type, area,
- x, y, width, height);
+ x, y, width, height);
switch (edge)
{
@@ -2205,7 +2205,7 @@ draw_resize_grip (GtkStyle *style,
xi -= 3;
yi -= 3;
-
+
}
}
break;
@@ -2221,11 +2221,11 @@ draw_resize_grip (GtkStyle *style,
gdk_draw_line (window,
style->light_gc[state_type],
xi, y,
- x + width, yi);
+ x + width, yi);
++xi;
--yi;
-
+
gdk_draw_line (window,
clearlooks_style->shade_gc[4],
xi, y,
@@ -2260,11 +2260,11 @@ draw_resize_grip (GtkStyle *style,
xi -= 3;
yi += 3;
-
+
}
}
break;
-
+
case GDK_WINDOW_EDGE_SOUTH_EAST:
{
gint xi, yi;
@@ -2277,16 +2277,16 @@ draw_resize_grip (GtkStyle *style,
gdk_draw_line (window,
style->light_gc[state_type],
xi, y + height,
- x + width, yi);
+ x + width, yi);
++xi;
++yi;
-
+
gdk_draw_line (window,
clearlooks_style->shade_gc[4],
xi, y + height,
- x + width, yi);
-
+ x + width, yi);
+
xi += 3;
yi += 3;
}
@@ -2296,7 +2296,7 @@ draw_resize_grip (GtkStyle *style,
g_assert_not_reached ();
break;
}
-
+
if (area)
{
gdk_gc_set_clip_rectangle (style->light_gc[state_type], NULL);
@@ -2490,7 +2490,7 @@ set_transparency (const GdkPixbuf *pixbuf, gdouble alpha_percent)
for (x = 0; x < width; x++) {
/* The "4" is the number of chars per pixel, in this case, RGBA,
the 3 means "skip to the alpha" */
- current = data + (y * rowstride) + (x * 4) + 3;
+ current = data + (y * rowstride) + (x * 4) + 3;
*(current) = (guchar) (*(current) * alpha_percent);
}
}
@@ -2551,7 +2551,7 @@ render_icon (GtkStyle *style,
g_warning ("Using the default screen for gtk_default_render_icon()"));
}
-
+
if (size != (GtkIconSize) -1 && !gtk_icon_size_lookup_for_settings (settings, size, &width, &height)) {
g_warning (G_STRLOC ": invalid icon size '%d'", size);
return NULL;
@@ -2584,7 +2584,7 @@ render_icon (GtkStyle *style,
g_object_unref (scaled);
} else if (state == GTK_STATE_PRELIGHT) {
- stated = gdk_pixbuf_copy (scaled);
+ stated = gdk_pixbuf_copy (scaled);
gdk_pixbuf_saturate_and_pixelate (scaled, stated,
1.2, FALSE);
@@ -2596,7 +2596,7 @@ render_icon (GtkStyle *style,
}
else
stated = scaled;
-
+
return stated;
}
diff --git a/libs/clearlooks-older/clearlooks_theme_main.c b/libs/clearlooks-older/clearlooks_theme_main.c
index 5356f915dd..baea4f1bcd 100644
--- a/libs/clearlooks-older/clearlooks_theme_main.c
+++ b/libs/clearlooks-older/clearlooks_theme_main.c
@@ -20,7 +20,7 @@ theme_exit (void)
G_MODULE_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));
}
/* The following function will be called by GTK+ when the module
diff --git a/libs/clearlooks-older/support.c b/libs/clearlooks-older/support.c
index 358c7f43fb..0d288123f2 100644
--- a/libs/clearlooks-older/support.c
+++ b/libs/clearlooks-older/support.c
@@ -133,7 +133,7 @@ pixbuf_to_pixmap (GtkStyle *style,
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf),
style->depth);
-
+
gdk_drawable_set_colormap (pixmap, style->colormap);
tmp_gc = gdk_gc_new (pixmap);
@@ -642,10 +642,10 @@ internal_image_buffer_new (gint width, gint height)
internel_image_buffer_free_pixels, NULL);
}
-static void
-internal_color_get_as_uchars(GdkColor *color,
- guchar *red,
- guchar *green,
+static void
+internal_color_get_as_uchars(GdkColor *color,
+ guchar *red,
+ guchar *green,
guchar *blue)
{
*red = (guchar) (color->red / 256.0);
@@ -657,7 +657,7 @@ static GdkPixbuf*
internal_create_horizontal_gradient_image_buffer (gint width, gint height,
GdkColor *from,
GdkColor *to)
-{
+{
int i;
long r, g, b, dr, dg, db;
GdkPixbuf* buffer;
@@ -671,18 +671,18 @@ internal_create_horizontal_gradient_image_buffer (gint width, gint height,
if (buffer == NULL)
return NULL;
-
+
pixels = gdk_pixbuf_get_pixels (buffer);
ptr = pixels;
rowstride = gdk_pixbuf_get_rowstride (buffer);
-
+
internal_color_get_as_uchars(from, &r0, &g0, &b0);
internal_color_get_as_uchars(to, &rf, &gf, &bf);
-
+
r = r0 << 16;
g = g0 << 16;
b = b0 << 16;
-
+
dr = ((rf-r0)<<16)/width;
dg = ((gf-g0)<<16)/width;
db = ((bf-b0)<<16)/width;
@@ -704,7 +704,7 @@ internal_create_horizontal_gradient_image_buffer (gint width, gint height,
{
memcpy (&(pixels[i*rowstride]), pixels, rowstride);
}
-
+
return buffer;
}
@@ -725,15 +725,15 @@ internal_create_vertical_gradient_image_buffer (gint width, gint height,
gint rowstride;
guchar *pixels;
-
+
buffer = internal_image_buffer_new (width, height);
if (buffer == NULL)
return NULL;
-
+
pixels = gdk_pixbuf_get_pixels (buffer);
rowstride = gdk_pixbuf_get_rowstride (buffer);
-
+
internal_color_get_as_uchars(from, &r0, &g0, &b0);
internal_color_get_as_uchars(to, &rf, &gf, &bf);
@@ -750,7 +750,7 @@ internal_create_vertical_gradient_image_buffer (gint width, gint height,
for (i=0; i < height; i++)
{
ptr = pixels + i * rowstride;
-
+
ptr[0] = r>>16;
ptr[1] = g>>16;
ptr[2] = b>>16;
diff --git a/libs/clearlooks-older/support.h b/libs/clearlooks-older/support.h
index a1430b40d0..ea2417f3cb 100644
--- a/libs/clearlooks-older/support.h
+++ b/libs/clearlooks-older/support.h
@@ -91,10 +91,10 @@ calculate_arrow_geometry (GtkArrowType arrow_type,
gint *y,
gint *width,
gint *height);
-
+
GtkWidget *special_get_ancestor(GtkWidget * widget,
GType widget_type);
-
+
void blend (GdkColormap *colormap,
GdkColor *a, GdkColor *b, GdkColor *c, int alpha);