summaryrefslogtreecommitdiff
path: root/plugins/gtkui/support.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-03-25 14:21:43 +0200
committerGravatar waker <wakeroid@gmail.com>2012-03-25 14:21:43 +0200
commit1f1b82ce95ba991a1d1f641eb3e7dec5a8db932e (patch)
treea245b6a09ec289056e9b3f3c44bda2a4e5247ea5 /plugins/gtkui/support.c
parentac600c98f78c407b72c4ab91b95729faed7f61cd (diff)
few fixes for gtk-2.12 compatibility
Diffstat (limited to 'plugins/gtkui/support.c')
-rw-r--r--plugins/gtkui/support.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/gtkui/support.c b/plugins/gtkui/support.c
index 82e22c73..1eef6efc 100644
--- a/plugins/gtkui/support.c
+++ b/plugins/gtkui/support.c
@@ -196,3 +196,26 @@ gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box) {
}
#endif
+
+#if !GTK_CHECK_VERSION(2,18,0) || defined(ULTRA_COMPATIBLE)
+void
+gtk_widget_set_allocation (GtkWidget *widget, const GtkAllocation *allocation) {
+ widget->allocation.x = (allocation)->x;
+ widget->allocation.y = (allocation)->y;
+ widget->allocation.width = (allocation)->width;
+ widget->allocation.height = (allocation)->height;
+}
+
+void
+gtk_widget_get_allocation (GtkWidget *widget, GtkAllocation *allocation) {
+ (allocation)->x = widget->allocation.x;
+ (allocation)->y = widget->allocation.y;
+ (allocation)->width = widget->allocation.width;
+ (allocation)->height = widget->allocation.height;
+}
+
+void
+gtk_widget_set_window(GtkWidget *widget, GdkWindow *window) {
+ widget->window = window;
+}
+#endif