[gtk-engines] Remove some unused code.
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-engines] Remove some unused code.
- Date: Sat, 9 Oct 2010 16:03:40 +0000 (UTC)
commit 859a6bd7bfc3eff3d924030cdc312c457b2551d3
Author: Benjamin Berg <benjamin sipsolutions net>
Date: Sat Oct 9 18:03:26 2010 +0200
Remove some unused code.
engines/glide/src/glide_gtk2_engine.c | 4 ----
engines/support/cairo-support.c | 12 ------------
engines/support/cairo-support.h | 16 ----------------
engines/support/general-support.h | 9 ---------
4 files changed, 0 insertions(+), 41 deletions(-)
---
diff --git a/engines/glide/src/glide_gtk2_engine.c b/engines/glide/src/glide_gtk2_engine.c
index 6781a6f..2453556 100644
--- a/engines/glide/src/glide_gtk2_engine.c
+++ b/engines/glide/src/glide_gtk2_engine.c
@@ -81,10 +81,6 @@ G_DEFINE_DYNAMIC_TYPE (GlideStyle, glide_style, GTK_TYPE_STYLE)
static void
glide_linear_overlay_pattern(gboolean vertical, gboolean EVIL_OVERLAY, CairoPattern *pattern)
{
- #if ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2)))
- pattern->type = CAIRO_PATTERN_TYPE_LINEAR;
- #endif
-
if (vertical)
{
pattern->scale = GE_DIRECTION_VERTICAL;
diff --git a/engines/support/cairo-support.c b/engines/support/cairo-support.c
index 3b12545..c92825a 100644
--- a/engines/support/cairo-support.c
+++ b/engines/support/cairo-support.c
@@ -735,10 +735,6 @@ ge_cairo_color_pattern(CairoColor *base)
{
CairoPattern * result = g_new0(CairoPattern, 1);
- #if ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2)))
- result->type = CAIRO_PATTERN_TYPE_SOLID;
- #endif
-
result->scale = GE_DIRECTION_NONE;
result->translate = GE_DIRECTION_NONE;
@@ -795,10 +791,6 @@ ge_cairo_pattern_pattern(cairo_pattern_t *pattern)
{
CairoPattern * result = g_new0(CairoPattern, 1);
- #if ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2)))
- result->type = CAIRO_PATTERN_TYPE_SURFACE;
- #endif
-
result->scale = GE_DIRECTION_NONE;
result->translate = GE_DIRECTION_BOTH;
result->handle = cairo_pattern_reference (pattern);
@@ -822,10 +814,6 @@ ge_cairo_linear_shade_gradient_pattern(CairoColor *base,
gboolean vertical)
{
CairoPattern * result = g_new0(CairoPattern, 1);
-
- #if ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2)))
- result->type = CAIRO_PATTERN_TYPE_LINEAR;
- #endif
if (vertical)
{
diff --git a/engines/support/cairo-support.h b/engines/support/cairo-support.h
index 6189e11..c2f195e 100644
--- a/engines/support/cairo-support.h
+++ b/engines/support/cairo-support.h
@@ -84,24 +84,8 @@ typedef enum {
GE_DIRECTION_NONE
} GeDirection;
-#if ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2)))
-typedef enum _cairo_pattern_type {
- CAIRO_PATTERN_TYPE_SOLID,
- CAIRO_PATTERN_TYPE_SURFACE,
- CAIRO_PATTERN_TYPE_LINEAR,
- CAIRO_PATTERN_TYPE_RADIAL
-} cairo_pattern_type_t;
-
-# define CAIRO_PATTERN_TYPE(pattern) pattern->type;
-#else
-# define CAIRO_PATTERN_TYPE(pattern) cairo_pattern_get_type (pattern->handle);
-#endif
-
typedef struct
{
-#if ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2)))
- cairo_pattern_type_t type;
-#endif
GeDirection scale;
GeDirection translate;
diff --git a/engines/support/general-support.h b/engines/support/general-support.h
index 1c86a5f..0ff5d3c 100644
--- a/engines/support/general-support.h
+++ b/engines/support/general-support.h
@@ -42,15 +42,6 @@
cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE); \
cairo_set_line_join (cr, CAIRO_LINE_JOIN_MITER); \
-#define SANITIZE_SIZE \
- g_return_if_fail (width >= -1); \
- g_return_if_fail (height >= -1); \
- \
- if (width == -1) \
- width = gdk_window_get_width (window); \
- if (height == -1) \
- height = gdk_window_get_height (window);
-
#define GE_EXPORT G_MODULE_EXPORT
#define GE_INTERNAL G_GNUC_INTERNAL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]