summaryrefslogtreecommitdiff
path: root/savers/gs-theme-engine.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-20 23:35:35 +0300
committermonsta <[email protected]>2016-11-20 23:35:35 +0300
commit030632057c5c65a46d218c9ed2ffed5277513c6e (patch)
tree5c642707d54df4c9fef0dd20d7e77e6dea41fd35 /savers/gs-theme-engine.c
parentcceaaea0b336b9d288ac9399979427f5fd78b74d (diff)
downloadmate-screensaver-030632057c5c65a46d218c9ed2ffed5277513c6e.tar.bz2
mate-screensaver-030632057c5c65a46d218c9ed2ffed5277513c6e.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require libmatekbd and libmate-desktop >= 1.17
Diffstat (limited to 'savers/gs-theme-engine.c')
-rw-r--r--savers/gs-theme-engine.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/savers/gs-theme-engine.c b/savers/gs-theme-engine.c
index c864df6..42097df 100644
--- a/savers/gs-theme-engine.c
+++ b/savers/gs-theme-engine.c
@@ -110,15 +110,8 @@ gs_theme_engine_get_property (GObject *object,
static void
gs_theme_engine_clear (GtkWidget *widget)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkRGBA color = { 0.0, 0.0, 0.0, 1.0 };
GtkStateFlags state;
-#else
- GdkColor color = { 0, 0x0000, 0x0000, 0x0000 };
- GdkColormap *colormap;
- GtkStyle *style;
- GtkStateType state;
-#endif
g_return_if_fail (GS_IS_THEME_ENGINE (widget));
@@ -127,24 +120,9 @@ gs_theme_engine_clear (GtkWidget *widget)
return;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
state = gtk_widget_get_state_flags (widget);
gtk_widget_override_background_color (widget, state, &color);
gdk_window_set_background_rgba (gtk_widget_get_window (widget), &color);
-#else
- style = gtk_widget_get_style (widget);
- state = (GtkStateType) 0;
- while (state < (GtkStateType) G_N_ELEMENTS (style->bg))
- {
- gtk_widget_modify_bg (widget, state, &color);
- state++;
- }
-
- colormap = gdk_drawable_get_colormap (gtk_widget_get_window (widget));
- gdk_colormap_alloc_color (colormap, &color, FALSE, TRUE);
- gdk_window_set_background (gtk_widget_get_window (widget), &color);
- gdk_window_clear (gtk_widget_get_window (widget));
-#endif
gdk_flush ();
}
@@ -222,12 +200,7 @@ gs_theme_engine_get_window_size (GSThemeEngine *engine,
NULL,
NULL,
width,
-#if !GTK_CHECK_VERSION (3, 0, 0)
- height,
- NULL);
-#else
height);
-#endif
}
GdkWindow *