[vte/vte-next: 31/114] Remove gtk version checks
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next: 31/114] Remove gtk version checks
- Date: Mon, 30 May 2011 17:09:21 +0000 (UTC)
commit 681baacf70821f8b21a616cea03adb3f4e56b5a1
Author: Christian Persch <chpe gnome org>
Date: Mon May 2 22:19:33 2011 +0200
Remove gtk version checks
We depend on gtk 3.0.0 now.
src/Makefile.am | 1 -
src/reflect.c | 8 --
src/vte-gtk-compat.h | 80 -------------------
src/vte-private.h | 5 -
src/vte.c | 207 +-------------------------------------------------
src/vte.h | 30 -------
src/vteaccess.c | 5 -
src/vteapp.c | 12 ---
src/vtebg.c | 6 --
src/vtedraw.h | 1 -
10 files changed, 2 insertions(+), 353 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 94e14d7..8c19561 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -53,7 +53,6 @@ libvte VTE_LIBRARY_SUFFIX_U@_la_SOURCES = \
trie.h \
vte.c \
vte.h \
- vte-gtk-compat.h \
vte-private.h \
vteaccess.c \
vteaccess.h \
diff --git a/src/reflect.c b/src/reflect.c
index 71d9598..11ef013 100644
--- a/src/reflect.c
+++ b/src/reflect.c
@@ -48,11 +48,7 @@ terminal_shell_text_view(GtkWidget *widget)
static GtkAdjustment *
terminal_adjustment_text_view(GtkWidget *terminal)
{
-#if GTK_CHECK_VERSION (2, 21, 6)
return gtk_text_view_get_vadjustment(GTK_TEXT_VIEW(terminal));
-#else
- return GTK_TEXT_VIEW(terminal)->vadjustment;
-#endif
}
#endif
#ifdef USE_VTE
@@ -288,11 +284,7 @@ main(int argc, char **argv)
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), label);
gtk_widget_show(label);
-#if GTK_CHECK_VERSION (2, 91, 2)
pane = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
-#else
- pane = gtk_vpaned_new();
-#endif
gtk_paned_pack1(GTK_PANED(pane), tophalf, TRUE, FALSE);
gtk_paned_pack2(GTK_PANED(pane), sw, TRUE, FALSE);
gtk_widget_show(tophalf);
diff --git a/src/vte-private.h b/src/vte-private.h
index 77b968c..04a2303 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -379,20 +379,15 @@ struct _VteTerminalPrivate {
/* Style stuff */
GtkBorder inner_border;
-#if GTK_CHECK_VERSION (2, 91, 2)
/* GtkScrollable impl */
GtkAdjustment *hadjustment; /* unused */
guint hscroll_policy : 1; /* unused */
-
guint vscroll_policy : 1;
-#endif
};
-#if GTK_CHECK_VERSION (2, 99, 0)
struct _VteTerminalClassPrivate {
GtkStyleProvider *style_provider;
};
-#endif
VteRowData *_vte_terminal_ensure_row(VteTerminal *terminal);
void _vte_terminal_set_pointer_visible(VteTerminal *terminal, gboolean visible);
diff --git a/src/vte.c b/src/vte.c
index a439bfc..9b7e292 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -30,7 +30,6 @@
#include "vte.h"
#include "vte-private.h"
-#include "vte-gtk-compat.h"
#ifdef HAVE_WCHAR_H
#include <wchar.h>
@@ -137,12 +136,10 @@ static guint signals[LAST_SIGNAL];
enum {
PROP_0,
-#if GTK_CHECK_VERSION (2, 91, 2)
PROP_HADJUSTMENT,
PROP_VADJUSTMENT,
PROP_HSCROLL_POLICY,
PROP_VSCROLL_POLICY,
-#endif
PROP_ALLOW_BOLD,
PROP_AUDIBLE_BELL,
PROP_BACKGROUND_IMAGE_FILE,
@@ -270,7 +267,6 @@ _vte_incoming_chunks_reverse(struct _vte_incoming_chunk *chunk)
return prev;
}
-#if GTK_CHECK_VERSION (2, 99, 0)
#ifdef VTE_DEBUG
G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET,
g_type_add_class_private (g_define_type_id, sizeof (VteTerminalClassPrivate));
@@ -283,16 +279,6 @@ G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET,
g_type_add_class_private (g_define_type_id, sizeof (VteTerminalClassPrivate));
G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, NULL))
#endif
-#else
-#ifdef VTE_DEBUG
-G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET,
- if (_vte_debug_on(VTE_DEBUG_LIFECYCLE)) {
- g_printerr("vte_terminal_get_type()\n");
- })
-#else
-G_DEFINE_TYPE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET)
-#endif
-#endif /* GTK 3.0 */
/* Indexes in the "palette" color array for the dim colors.
* Only the first %VTE_LEGACY_COLOR_SET_SIZE colors have dim versions. */
@@ -2545,8 +2531,6 @@ vte_terminal_set_colors(VteTerminal *terminal,
terminal->pvt->palette_initialized = TRUE;
}
-#if GTK_CHECK_VERSION (2, 99, 0)
-
static GdkColor *
gdk_color_from_rgba (GdkColor *color,
const GdkRGBA *rgba)
@@ -2750,8 +2734,6 @@ vte_terminal_set_colors_rgba(VteTerminal *terminal,
g_free (pal);
}
-#endif /* GTK 3.0 */
-
/**
* vte_terminal_set_opacity:
* @terminal: a #VteTerminal
@@ -4626,11 +4608,7 @@ vte_translate_ctrlkey (GdkEventKey *event)
if (event->keyval < 128)
return event->keyval;
-#if GTK_CHECK_VERSION (2, 90, 8)
keymap = gdk_keymap_get_for_display(gdk_window_get_display (event->window));
-#else
- keymap = gdk_keymap_get_for_display(gdk_drawable_get_display (event->window));
-#endif
/* Try groups in order to find one mapping the key to ASCII */
for (i = 0; i < 4; i++) {
@@ -4660,11 +4638,7 @@ vte_terminal_read_modifiers (VteTerminal *terminal,
/* Read the modifiers. */
if (gdk_event_get_state((GdkEvent*)event, &modifiers)) {
GdkKeymap *keymap;
-#if GTK_CHECK_VERSION (2, 90, 8)
keymap = gdk_keymap_get_for_display(gdk_window_get_display(((GdkEventAny*)event)->window));
-#else
- keymap = gdk_keymap_get_for_display(gdk_drawable_get_display(((GdkEventAny*)event)->window));
-#endif
gdk_keymap_add_virtual_modifiers (keymap, &modifiers);
terminal->pvt->modifiers = modifiers;
}
@@ -7490,7 +7464,6 @@ vte_terminal_handle_scroll(VteTerminal *terminal)
}
}
-#if GTK_CHECK_VERSION (2, 91, 2)
static void
vte_terminal_set_hadjustment(VteTerminal *terminal,
GtkAdjustment *adjustment)
@@ -7505,7 +7478,6 @@ vte_terminal_set_hadjustment(VteTerminal *terminal,
pvt->hadjustment = adjustment ? g_object_ref_sink (adjustment) : NULL;
}
-#endif
static void
vte_terminal_set_vadjustment(VteTerminal *terminal,
@@ -7542,17 +7514,6 @@ vte_terminal_set_vadjustment(VteTerminal *terminal,
terminal);
}
-/* Set the adjustment objects used by the terminal widget. */
-#if !GTK_CHECK_VERSION (2, 91, 2)
-static void
-vte_terminal_set_scroll_adjustments(GtkWidget *widget,
- GtkAdjustment *hadjustment G_GNUC_UNUSED,
- GtkAdjustment *vadjustment)
-{
- vte_terminal_set_vadjustment(VTE_TERMINAL(widget), vadjustment);
-}
-#endif /* GTK 2.x */
-
/**
* vte_terminal_set_emulation:
* @terminal: a #VteTerminal
@@ -7765,18 +7726,14 @@ vte_terminal_init(VteTerminal *terminal)
/* Set an adjustment for the application to use to control scrolling. */
terminal->adjustment = NULL;
-#if GTK_CHECK_VERSION (2, 91, 2)
pvt->hadjustment = NULL;
/* GtkScrollable */
pvt->hscroll_policy = GTK_SCROLL_NATURAL;
pvt->vscroll_policy = GTK_SCROLL_NATURAL;
vte_terminal_set_hadjustment(terminal, NULL);
-#endif
-
vte_terminal_set_vadjustment(terminal, NULL);
-
/* Set up dummy metrics, value != 0 to avoid division by 0 */
terminal->char_width = 1;
terminal->char_height = 1;
@@ -7899,20 +7856,12 @@ vte_terminal_init(VteTerminal *terminal)
/* gtk_widget_get_accessible(&terminal->widget); */
#endif
-#if GTK_CHECK_VERSION (2, 99, 0)
-{
- GtkStyleContext *context;
-
- context = gtk_widget_get_style_context (&terminal->widget);
- gtk_style_context_add_provider (context,
+ gtk_style_context_add_provider (gtk_widget_get_style_context (&terminal->widget),
VTE_TERMINAL_GET_CLASS (terminal)->priv->style_provider,
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
-#endif
-}
/* Tell GTK+ how much space we need. */
-#if GTK_CHECK_VERSION (2, 91, 0)
static void
vte_terminal_get_preferred_width(GtkWidget *widget,
int *minimum_width,
@@ -7972,35 +7921,6 @@ vte_terminal_get_preferred_height(GtkWidget *widget,
terminal->column_count,
terminal->row_count);
}
-#else /* GTK+ 2.x */
-static void
-vte_terminal_size_request(GtkWidget *widget, GtkRequisition *requisition)
-{
- VteTerminal *terminal;
-
- _vte_debug_print(VTE_DEBUG_LIFECYCLE, "vte_terminal_size_request()\n");
-
- terminal = VTE_TERMINAL(widget);
-
- vte_terminal_ensure_font (terminal);
-
- vte_terminal_refresh_size(terminal);
- requisition->width = terminal->char_width * terminal->column_count;
- requisition->height = terminal->char_height * terminal->row_count;
-
- requisition->width += terminal->pvt->inner_border.left +
- terminal->pvt->inner_border.right;
- requisition->height += terminal->pvt->inner_border.top +
- terminal->pvt->inner_border.bottom;
-
- _vte_debug_print(VTE_DEBUG_WIDGET_SIZE,
- "[Terminal %p] Size request is %dx%d for %ldx%ld cells.\n",
- terminal,
- requisition->width, requisition->height,
- terminal->column_count,
- terminal->row_count);
-}
-#endif
/* Accept a given size from GTK+. */
static void
@@ -8469,9 +8389,6 @@ vte_terminal_realize(GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
-#if !GTK_CHECK_VERSION (2, 90, 8)
- attributes.colormap = gtk_widget_get_colormap (widget);
-#endif
attributes.event_mask = gtk_widget_get_events(widget) |
GDK_EXPOSURE_MASK |
GDK_VISIBILITY_NOTIFY_MASK |
@@ -8488,9 +8405,6 @@ vte_terminal_realize(GtkWidget *widget)
attributes_mask = GDK_WA_X |
GDK_WA_Y |
(attributes.visual ? GDK_WA_VISUAL : 0) |
-#if !GTK_CHECK_VERSION (2, 90, 8)
- (attributes.colormap ? GDK_WA_COLORMAP : 0) |
-#endif
GDK_WA_CURSOR;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
@@ -8544,28 +8458,9 @@ vte_terminal_realize(GtkWidget *widget)
terminal->pvt->modifiers = 0;
/* Create our invisible cursor. */
-#if GTK_CHECK_VERSION (2, 15, 1)
terminal->pvt->mouse_inviso_cursor = gdk_cursor_new_for_display(gtk_widget_get_display(widget), GDK_BLANK_CURSOR);
-#else
- {
- GdkPixmap *bitmap;
- GdkColor black = {0,0,0,0};
-
- bitmap = gdk_bitmap_create_from_data (window, "\0", 1, 1);
- terminal->pvt->mouse_inviso_cursor = gdk_cursor_new_from_pixmap(bitmap,
- bitmap,
- &black,
- &black,
- 0, 0);
- g_object_unref(bitmap);
- }
-#endif /* GTK >= 2.15.1 */
-
-#if GTK_CHECK_VERSION (2, 20, 0)
+
gtk_widget_style_attach (widget);
-#else
- widget->style = gtk_style_attach(widget->style, widget->window);
-#endif
vte_terminal_ensure_font (terminal);
@@ -10661,7 +10556,6 @@ vte_terminal_paint(GtkWidget *widget, cairo_region_t *region)
}
/* Handle an expose event by painting the exposed area. */
-#if GTK_CHECK_VERSION (2, 90, 8)
static cairo_region_t *
vte_cairo_get_clip_region (cairo_t *cr)
@@ -10731,52 +10625,6 @@ vte_terminal_draw(GtkWidget *widget,
return FALSE;
}
-#else
-
-static gboolean
-vte_terminal_expose(GtkWidget *widget,
- GdkEventExpose *event)
-{
- VteTerminal *terminal = VTE_TERMINAL (widget);
- GtkAllocation allocation;
-
- /* Beware the out of order events -
- * do not even think about skipping exposes! */
- _vte_debug_print (VTE_DEBUG_WORK, "+");
- _vte_debug_print (VTE_DEBUG_EVENTS, "Expose (%d,%d)x(%d,%d)\n",
- event->area.x, event->area.y,
- event->area.width, event->area.height);
- if (terminal->pvt->active != NULL &&
- update_timeout_tag != 0 &&
- !in_update_timeout) {
- /* fix up a race condition where we schedule a delayed update
- * after an 'immediate' invalidate all */
- if (terminal->pvt->invalidated_all &&
- terminal->pvt->update_regions == NULL) {
- terminal->pvt->invalidated_all = FALSE;
- }
- /* if we expect to redraw the widget soon,
- * just add this event to the list */
- if (!terminal->pvt->invalidated_all) {
- gtk_widget_get_allocation (widget, &allocation);
- if (event->area.width >= allocation.width &&
- event->area.height >= allocation.height) {
- _vte_invalidate_all (terminal);
- } else {
- terminal->pvt->update_regions =
- g_slist_prepend (terminal->pvt->update_regions,
- cairo_region_copy (event->region));
- }
- }
- } else {
- vte_terminal_paint(widget, event->region);
- terminal->pvt->invalidated_all = FALSE;
- }
- return FALSE;
-}
-
-#endif /* GTK 3.0 */
-
/* Handle a scroll event. */
static gboolean
vte_terminal_scroll(GtkWidget *widget, GdkEventScroll *event)
@@ -10929,7 +10777,6 @@ vte_terminal_get_property (GObject *object,
switch (prop_id)
{
-#if GTK_CHECK_VERSION (2, 91, 2)
case PROP_HADJUSTMENT:
g_value_set_object (value, pvt->hadjustment);
break;
@@ -10942,7 +10789,6 @@ vte_terminal_get_property (GObject *object,
case PROP_VSCROLL_POLICY:
g_value_set_enum (value, pvt->vscroll_policy);
break;
-#endif
case PROP_ALLOW_BOLD:
g_value_set_boolean (value, vte_terminal_get_allow_bold (terminal));
break;
@@ -11036,7 +10882,6 @@ vte_terminal_set_property (GObject *object,
switch (prop_id)
{
-#if GTK_CHECK_VERSION (2, 91, 2)
case PROP_HADJUSTMENT:
vte_terminal_set_hadjustment (terminal, g_value_get_object (value));
break;
@@ -11051,7 +10896,6 @@ vte_terminal_set_property (GObject *object,
pvt->vscroll_policy = g_value_get_enum (value);
gtk_widget_queue_resize_no_redraw (GTK_WIDGET (terminal));
break;
-#endif
case PROP_ALLOW_BOLD:
vte_terminal_set_allow_bold (terminal, g_value_get_boolean (value));
break;
@@ -11183,11 +11027,7 @@ vte_terminal_class_init(VteTerminalClass *klass)
gobject_class->set_property = vte_terminal_set_property;
widget_class->realize = vte_terminal_realize;
widget_class->scroll_event = vte_terminal_scroll;
-#if GTK_CHECK_VERSION (2, 90, 8)
widget_class->draw = vte_terminal_draw;
-#else
- widget_class->expose_event = vte_terminal_expose;
-#endif
widget_class->key_press_event = vte_terminal_key_press;
widget_class->key_release_event = vte_terminal_key_release;
widget_class->button_press_event = vte_terminal_button_press;
@@ -11200,12 +11040,8 @@ vte_terminal_class_init(VteTerminalClass *klass)
widget_class->visibility_notify_event = vte_terminal_visibility_notify;
widget_class->unrealize = vte_terminal_unrealize;
widget_class->style_set = vte_terminal_style_set;
-#if GTK_CHECK_VERSION (2, 91, 0)
widget_class->get_preferred_width = vte_terminal_get_preferred_width;
widget_class->get_preferred_height = vte_terminal_get_preferred_height;
-#else
- widget_class->size_request = vte_terminal_size_request;
-#endif
widget_class->size_allocate = vte_terminal_size_allocate;
widget_class->get_accessible = vte_terminal_get_accessible;
widget_class->screen_changed = vte_terminal_screen_changed;
@@ -11247,41 +11083,12 @@ vte_terminal_class_init(VteTerminalClass *klass)
klass->beep = NULL;
-#if GTK_CHECK_VERSION (2, 91, 2)
/* GtkScrollable interface properties */
g_object_class_override_property (gobject_class, PROP_HADJUSTMENT, "hadjustment");
g_object_class_override_property (gobject_class, PROP_VADJUSTMENT, "vadjustment");
g_object_class_override_property (gobject_class, PROP_HSCROLL_POLICY, "hscroll-policy");
g_object_class_override_property (gobject_class, PROP_VSCROLL_POLICY, "vscroll-policy");
-#else
-
- klass->set_scroll_adjustments = vte_terminal_set_scroll_adjustments;
-
- /**
- * VteTerminal::set-scroll-adjustments:
- * @vteterminal: the object which received the signal
- * @horizontal: (allow-none): the horizontal #GtkAdjustment (unused in #VteTerminal)
- * @vertical: (allow-none): the vertical #GtkAdjustment
- *
- * Set the scroll adjustments for the terminal. Usually scrolled containers
- * like #GtkScrolledWindow will emit this signal to connect two instances
- * of #GtkScrollbar to the scroll directions of the #VteTerminal.
- *
- * Since: 0.17.1
- */
- widget_class->set_scroll_adjustments_signal =
- g_signal_new(I_("set-scroll-adjustments"),
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (VteTerminalClass, set_scroll_adjustments),
- NULL, NULL,
- _vte_marshal_VOID__OBJECT_OBJECT,
- G_TYPE_NONE, 2,
- GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
-
-#endif
-
/* Register some signals of our own. */
/**
@@ -12199,14 +12006,6 @@ vte_terminal_class_init(VteTerminalClass *klass)
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
-#if !GTK_CHECK_VERSION (2,99, 0)
- /* Now install the default style */
- gtk_rc_parse_string("style \"vte-default-style\" {\n"
- "VteTerminal::inner-border = { 1, 1, 1, 1 }\n"
- "}\n"
- "class \"VteTerminal\" style : gtk \"vte-default-style\"\n");
-#endif
-
/* Keybindings */
binding_set = gtk_binding_set_by_class(klass);
@@ -12217,7 +12016,6 @@ vte_terminal_class_init(VteTerminalClass *klass)
process_timer = g_timer_new ();
-#if GTK_CHECK_VERSION (2, 99, 0)
klass->priv = G_TYPE_CLASS_GET_PRIVATE (klass, VTE_TYPE_TERMINAL, VteTerminalClassPrivate);
klass->priv->style_provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ());
@@ -12226,7 +12024,6 @@ vte_terminal_class_init(VteTerminalClass *klass)
"-VteTerminal-inner-border: 1;\n"
"}\n",
-1, NULL);
-#endif /* GTK 3.0 */
}
/**
diff --git a/src/vte.h b/src/vte.h
index 92eb780..1d35779 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -125,35 +125,12 @@ struct _VteTerminalClass {
void (*copy_clipboard)(VteTerminal* terminal);
void (*paste_clipboard)(VteTerminal* terminal);
-#if !GTK_CHECK_VERSION (2, 91, 2)
- void (* set_scroll_adjustments) (GtkWidget *widget,
- GtkAdjustment *hadjustment,
- GtkAdjustment *vadjustment);
-#endif
-
void (*beep)(VteTerminal* terminal);
-#if GTK_CHECK_VERSION (2, 99, 0)
/* Padding for future expansion. */
gpointer padding[16];
-#else
- /* Padding for future expansion. */
- void (*vte_reserved3)(void);
- void (*vte_reserved4)(void);
-
- /*< private > */
- /* Signals we might emit. */
- guint _VTE_DEPRECATED(reserved1);
- guint _VTE_DEPRECATED(reserved2);
- guint _VTE_DEPRECATED(reserved3);
- guint _VTE_DEPRECATED(reserved4);
- guint _VTE_DEPRECATED(reserved5);
- guint _VTE_DEPRECATED(reserved6);
-#endif
-#if GTK_CHECK_VERSION (2, 99, 0)
VteTerminalClassPrivate *priv;
-#endif
};
/**
@@ -302,7 +279,6 @@ void vte_terminal_set_colors(VteTerminal *terminal,
const GdkColor *palette,
glong palette_size);
-#if GTK_CHECK_VERSION (2, 99, 0)
void vte_terminal_set_color_bold_rgba(VteTerminal *terminal,
const GdkRGBA *bold);
void vte_terminal_set_color_dim_rgba(VteTerminal *terminal,
@@ -320,7 +296,6 @@ void vte_terminal_set_colors_rgba(VteTerminal *terminal,
const GdkRGBA *background,
const GdkRGBA *palette,
gsize palette_size);
-#endif
void vte_terminal_set_default_colors(VteTerminal *terminal);
@@ -457,11 +432,6 @@ VtePty *vte_terminal_get_pty_object(VteTerminal *terminal);
char *vte_get_user_shell (void);
-/* Accessors for bindings. */
-#if !GTK_CHECK_VERSION (2, 91, 2)
-GtkAdjustment *vte_terminal_get_adjustment(VteTerminal *terminal);
-#endif
-
glong vte_terminal_get_char_width(VteTerminal *terminal);
glong vte_terminal_get_char_height(VteTerminal *terminal);
glong vte_terminal_get_row_count(VteTerminal *terminal);
diff --git a/src/vteaccess.c b/src/vteaccess.c
index af3887f..6a30c39 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -33,7 +33,6 @@
#include "vte.h"
#include "vteaccess.h"
#include "vteint.h"
-#include "vte-gtk-compat.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
@@ -1746,14 +1745,10 @@ vte_terminal_accessible_get_size(AtkComponent *component,
return;
}
window = gtk_widget_get_window (widget);
-#if GTK_CHECK_VERSION (2, 90, 8)
if (width)
*width = gdk_window_get_width (window);
if (height)
*height = gdk_window_get_height (window);
-#else
- gdk_drawable_get_size(window, width, height);
-#endif
}
static gboolean
diff --git a/src/vteapp.c b/src/vteapp.c
index fcc0f6b..984cef3 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -538,11 +538,7 @@ int
main(int argc, char **argv)
{
GdkScreen *screen;
-#if GTK_CHECK_VERSION (2, 90, 8)
GdkVisual *visual;
-#else
- GdkColormap *colormap;
-#endif
GtkWidget *window, *widget,*hbox = NULL, *scrollbar, *scrolled_window = NULL;
VteTerminal *terminal;
char *env_add[] = {
@@ -787,15 +783,9 @@ main(int argc, char **argv)
/* Set ARGB colormap */
screen = gtk_widget_get_screen (window);
-#if GTK_CHECK_VERSION (2, 90, 8)
visual = gdk_screen_get_rgba_visual(screen);
if (visual)
gtk_widget_set_visual(GTK_WIDGET(window), visual);
-#else
- colormap = gdk_screen_get_rgba_colormap (screen);
- if (colormap)
- gtk_widget_set_colormap(window, colormap);
-#endif
if (use_scrolled_window) {
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
@@ -1083,7 +1073,6 @@ main(int argc, char **argv)
g_warning (_("Could not parse the geometry spec passed to --geometry"));
}
}
-#if GTK_CHECK_VERSION(2, 91, 0)
else {
/* As of GTK+ 2.91.0, the default size of a window comes from its minimum
* size not its natural size, so we need to set the right default size
@@ -1092,7 +1081,6 @@ main(int argc, char **argv)
vte_terminal_get_column_count (terminal),
vte_terminal_get_row_count (terminal));
}
-#endif
gtk_widget_show_all(window);
diff --git a/src/vtebg.c b/src/vtebg.c
index 5eeb778..c2a42ff 100644
--- a/src/vtebg.c
+++ b/src/vtebg.c
@@ -24,7 +24,6 @@
#include "debug.h"
#include "marshal.h"
#include "vtebg.h"
-#include "vte-gtk-compat.h"
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
@@ -240,13 +239,8 @@ vte_bg_get_for_screen(GdkScreen *screen)
window = gdk_screen_get_root_window(screen);
pvt->native.window = window;
-#if GTK_CHECK_VERSION (2, 91, 6)
pvt->native.native_window = GDK_WINDOW_XID (window);
pvt->native.display = gdk_window_get_display(window);
-#else
- pvt->native.native_window = gdk_x11_drawable_get_xid(window);
- pvt->native.display = gdk_drawable_get_display(GDK_DRAWABLE(window));
-#endif
pvt->native.native_atom = gdk_x11_get_xatom_by_name_for_display(pvt->native.display, "_XROOTPMAP_ID");
pvt->native.atom = gdk_x11_xatom_to_atom_for_display(pvt->native.display, pvt->native.native_atom);
pvt->root_surface = vte_bg_root_surface(bg);
diff --git a/src/vtedraw.h b/src/vtedraw.h
index 31f7336..a183322 100644
--- a/src/vtedraw.h
+++ b/src/vtedraw.h
@@ -27,7 +27,6 @@
#include "vtebg.h"
#include "vte.h"
#include "vteunistr.h"
-#include "vte-gtk-compat.h"
G_BEGIN_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]