summaryrefslogtreecommitdiff
path: root/savers/gs-theme-window.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-window.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-window.c')
-rw-r--r--savers/gs-theme-window.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/savers/gs-theme-window.c b/savers/gs-theme-window.c
index 47c731e..1000af2 100644
--- a/savers/gs-theme-window.c
+++ b/savers/gs-theme-window.c
@@ -62,45 +62,10 @@ gs_theme_window_class_init (GSThemeWindowClass *klass)
widget_class->realize = gs_theme_window_real_realize;
}
-#if !GTK_CHECK_VERSION (3, 0, 0)
-static void
-force_no_pixmap_background (GtkWidget *widget)
-{
- static gboolean first_time = TRUE;
-
- if (first_time)
- {
- gtk_rc_parse_string ("\n"
- " style \"gs-theme-engine-style\"\n"
- " {\n"
- " bg_pixmap[NORMAL] = \"<none>\"\n"
- " bg_pixmap[ACTIVE] = \"<none>\"\n"
- " bg_pixmap[PRELIGHT] = \"<none>\"\n"
- " bg_pixmap[SELECTED] = \"<none>\"\n"
- " bg_pixmap[INSENSITIVE] = \"<none>\"\n"
- " bg[NORMAL] = \"#000000\"\n"
- " bg[ACTIVE] = \"#000000\"\n"
- " bg[PRELIGHT] = \"#000000\"\n"
- " bg[SELECTED] = \"#000000\"\n"
- " bg[INSENSITIVE] = \"#000000\"\n"
- " }\n"
- " widget \"gs-window*\" style : highest \"gs-theme-engine-style\"\n"
- "\n");
- first_time = FALSE;
- }
-
- gtk_widget_set_name (widget, "gs-window");
-}
-#endif
-
static void
gs_theme_window_init (GSThemeWindow *window)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
-#else
- force_no_pixmap_background (GTK_WIDGET (window));
-#endif
}
static void
@@ -144,12 +109,7 @@ gs_theme_window_real_realize (GtkWidget *widget)
((*end == ' ') || (*end == '\0')) &&
((remote_xwindow < G_MAXULONG) || (errno != ERANGE)))
{
-#if GTK_CHECK_VERSION (3, 0, 0)
window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), remote_xwindow);
-#else
- window = gdk_window_foreign_new (remote_xwindow);
-#endif
-
if (window != NULL)
{
/* This is a kludge; we need to set the same
@@ -183,14 +143,8 @@ gs_theme_window_real_realize (GtkWidget *widget)
return;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_style_context_set_background (gtk_widget_get_style_context (widget),
window);
-#else
- gtk_style_set_background (gtk_widget_get_style (widget),
- window,
- GTK_STATE_NORMAL);
-#endif
gdk_window_set_decorations (window, (GdkWMDecoration) 0);
gdk_window_set_events (window, gdk_window_get_events (window) | event_mask);
@@ -198,11 +152,7 @@ gs_theme_window_real_realize (GtkWidget *widget)
gdk_window_set_user_data (window, widget);
gtk_widget_set_realized (widget, TRUE);
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_window_get_geometry (window, &x, &y, &width, &height);
-#else
- gdk_window_get_geometry (window, &x, &y, &width, &height, NULL);
-#endif
if (width < MIN_SIZE || height < MIN_SIZE)
{
@@ -210,11 +160,7 @@ gs_theme_window_real_realize (GtkWidget *widget)
exit (1);
}
-#if GTK_CHECK_VERSION(3, 0, 0)
gtk_widget_get_preferred_size (widget, &requisition, NULL);
-#else
- gtk_widget_size_request (widget, &requisition);
-#endif
allocation.x = x;
allocation.y = y;
allocation.width = width;