summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-04-22 20:40:51 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-04-22 20:40:51 +0000
commitd59d4f25fb27dc9b3e342764944d1fac18629d4a (patch)
treecbd4306ca59fdd22a3ea5d4900756df7f8053b65
parent9c905141e37d69f86f5a46292c62e2f56fb3d501 (diff)
Remove obsolete #ifde GTK_CHECK_VERSION(2,2,0) checks.
2006-04-22 Behdad Esfahbod <behdad@gnome.org> * src/vte.c (vte_terminal_cursor_new), (vte_terminal_clipboard_get): * src/vteapp.c (take_xconsole_ownership): * src/vtebg.c (vte_bg_native_new), (_vte_bg_display_sync), (vte_bg_root_pixmap): * src/vtedraw.c (_vte_draw_get_colormap): * src/vtefc.c (_vte_fc_transcribe_from_pango_font_description), (_vte_fc_defaults_from_gtk): * src/vtepango.c (_vte_pango_start), (_vte_pango_set_text_font): * src/vtepangox.c (_vte_pango_x_set_text_font): * src/vterdb.c (_vte_rdb_get): * src/vteseq.c (vte_terminal_beep), (vte_sequence_handler_window_manipulation): * src/vtexft.c (_vte_xft_char_exists), (_vte_xft_text_extents), (_vte_xft_font_open): * src/vtegl.c: Remove obsolete #ifde GTK_CHECK_VERSION(2,2,0) checks.
-rw-r--r--ChangeLog18
-rw-r--r--src/vte.c12
-rw-r--r--src/vteapp.c4
-rw-r--r--src/vtebg.c12
-rw-r--r--src/vtedraw.c8
-rw-r--r--src/vtefc.c12
-rw-r--r--src/vtegl.c2
-rw-r--r--src/vtepango.c12
-rw-r--r--src/vtepangox.c4
-rw-r--r--src/vterdb.c10
-rw-r--r--src/vteseq.c11
-rw-r--r--src/vtexft.c12
12 files changed, 19 insertions, 98 deletions
diff --git a/ChangeLog b/ChangeLog
index dca01b9..3ccbb5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
2006-04-22 Behdad Esfahbod <behdad@gnome.org>
+ * src/vte.c (vte_terminal_cursor_new), (vte_terminal_clipboard_get):
+ * src/vteapp.c (take_xconsole_ownership):
+ * src/vtebg.c (vte_bg_native_new), (_vte_bg_display_sync),
+ (vte_bg_root_pixmap):
+ * src/vtedraw.c (_vte_draw_get_colormap):
+ * src/vtefc.c (_vte_fc_transcribe_from_pango_font_description),
+ (_vte_fc_defaults_from_gtk):
+ * src/vtepango.c (_vte_pango_start), (_vte_pango_set_text_font):
+ * src/vtepangox.c (_vte_pango_x_set_text_font):
+ * src/vterdb.c (_vte_rdb_get):
+ * src/vteseq.c (vte_terminal_beep),
+ (vte_sequence_handler_window_manipulation):
+ * src/vtexft.c (_vte_xft_char_exists), (_vte_xft_text_extents),
+ (_vte_xft_font_open):
+ * src/vtegl.c: Remove obsolete #ifde GTK_CHECK_VERSION(2,2,0) checks.
+
+2006-04-22 Behdad Esfahbod <behdad@gnome.org>
+
Bug 330441 – Remove libzvt support
Patch from Guilherme de S. Pastore <gpastore@gnome.org>
diff --git a/src/vte.c b/src/vte.c
index 67c2963..9df5f9a 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -977,7 +977,6 @@ vte_terminal_match_remove(VteTerminal *terminal, int tag)
static GdkCursor *
vte_terminal_cursor_new(VteTerminal *terminal, GdkCursorType cursor_type)
{
-#if GTK_CHECK_VERSION(2,2,0)
GdkDisplay *display;
GdkCursor *cursor;
@@ -985,13 +984,6 @@ vte_terminal_cursor_new(VteTerminal *terminal, GdkCursorType cursor_type)
display = gtk_widget_get_display(GTK_WIDGET(terminal));
cursor = gdk_cursor_new_for_display(display, cursor_type);
-#else
- GdkCursor *cursor;
-
- g_assert(VTE_IS_TERMINAL(terminal));
-
- cursor = gdk_cursor_new(cursor_type);
-#endif
return cursor;
}
@@ -5053,13 +5045,9 @@ vte_terminal_get_cursor_position(VteTerminal *terminal,
static GtkClipboard *
vte_terminal_clipboard_get(VteTerminal *terminal, GdkAtom board)
{
-#if GTK_CHECK_VERSION(2,2,0)
GdkDisplay *display;
display = gtk_widget_get_display(GTK_WIDGET(terminal));
return gtk_clipboard_get_for_display(display, board);
-#else
- return gtk_clipboard_get(board);
-#endif
}
/* Place the selected text onto the clipboard. Do this asynchronously so that
diff --git a/src/vteapp.c b/src/vteapp.c
index 20928b1..bdc6094 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -367,12 +367,8 @@ take_xconsole_ownership(GtkWidget *widget, gpointer data)
name = g_strdup_printf("MIT_CONSOLE_%s", hostname);
atom = gdk_atom_intern(name, FALSE);
-#if GTK_CHECK_VERSION(2,2,0)
clipboard = gtk_clipboard_get_for_display(gtk_widget_get_display(widget),
atom);
-#else
- clipboard = gtk_clipboard_get(atom);
-#endif
g_free(name);
gtk_clipboard_set_with_owner(clipboard,
diff --git a/src/vtebg.c b/src/vtebg.c
index 6205375..a5a0bb7 100644
--- a/src/vtebg.c
+++ b/src/vtebg.c
@@ -79,12 +79,8 @@ vte_bg_native_new(GdkWindow *window)
pvt->window = window;
pvt->native_window = gdk_x11_drawable_get_xid(window);
pvt->atom = gdk_atom_intern("_XROOTPMAP_ID", FALSE);
-#if GTK_CHECK_VERSION(2,2,0)
atom = gdk_x11_atom_to_xatom_for_display(gdk_drawable_get_display(window),
pvt->atom);
-#else
- atom = gdk_x11_atom_to_xatom(pvt->atom);
-#endif
pvt->native_atom = atom;
return pvt;
}
@@ -92,11 +88,7 @@ vte_bg_native_new(GdkWindow *window)
static void
_vte_bg_display_sync(VteBg *bg)
{
-#if GTK_CHECK_VERSION(2,2,0)
gdk_display_sync(gdk_drawable_get_display(bg->native->window));
-#else
- XSync(GDK_DISPLAY(), FALSE);
-#endif
}
static gboolean
@@ -128,11 +120,7 @@ vte_bg_root_pixmap(VteBg *bg)
if ((prop_type == GDK_TARGET_PIXMAP) &&
(prop_size >= sizeof(XID) &&
(pixmaps != NULL))) {
-#if GTK_CHECK_VERSION(2,2,0)
pixmap = gdk_pixmap_foreign_new_for_display(gdk_drawable_get_display(bg->native->window), pixmaps[0]);
-#else
- pixmap = gdk_pixmap_foreign_new(pixmaps[0]);
-#endif
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_MISC) ||
_vte_debug_on(VTE_DEBUG_EVENTS)) {
diff --git a/src/vtedraw.c b/src/vtedraw.c
index b6342be..72da36a 100644
--- a/src/vtedraw.c
+++ b/src/vtedraw.c
@@ -43,13 +43,11 @@ struct _vte_draw_impl
#endif /* HAVE_XFT2 */
#endif /* !X_DISPLAY_MISSING */
&_vte_draw_ft2,
-#if GTK_CHECK_VERSION(2,2,0)
#ifndef X_DISPLAY_MISSING
#ifdef HAVE_GL
&_vte_draw_gl,
#endif /* HAVE_GL */
#endif /* !X_DISPLAY_MISSING */
-#endif /* GTK_CHECK_VERSION(2,2,0) */
&_vte_draw_pango,
#ifndef X_DISPLAY_MISSING
#ifdef HAVE_PANGOX
@@ -128,9 +126,7 @@ GdkColormap *
_vte_draw_get_colormap(struct _vte_draw *draw, gboolean maybe_use_default)
{
GdkColormap *colormap;
-#if GTK_CHECK_VERSION(2,2,0)
GdkScreen *screen;
-#endif
g_return_val_if_fail(draw->impl != NULL, NULL);
g_return_val_if_fail(draw->impl->get_colormap != NULL, NULL);
colormap = draw->impl->get_colormap(draw);
@@ -140,16 +136,12 @@ _vte_draw_get_colormap(struct _vte_draw *draw, gboolean maybe_use_default)
if (!maybe_use_default) {
return NULL;
}
-#if GTK_CHECK_VERSION(2,2,0)
if (gtk_widget_has_screen(draw->widget)) {
screen = gtk_widget_get_screen(draw->widget);
} else {
screen = gdk_display_get_default_screen(gtk_widget_get_display(draw->widget));
}
colormap = gdk_screen_get_default_colormap(screen);
-#else
- colormap = gdk_colormap_get_system();
-#endif
return colormap;
}
diff --git a/src/vtefc.c b/src/vtefc.c
index 2f256ab..90c8ca4 100644
--- a/src/vtefc.c
+++ b/src/vtefc.c
@@ -101,9 +101,7 @@ _vte_fc_transcribe_from_pango_font_description(GtkWidget *widget,
FcPattern *pattern,
const PangoFontDescription *font_desc)
{
-#if GTK_CHECK_VERSION(2,2,0)
GdkScreen *screen;
-#endif
const char *family = "monospace";
PangoLanguage *language;
double size = 10.0;
@@ -133,16 +131,12 @@ _vte_fc_transcribe_from_pango_font_description(GtkWidget *widget,
FcPatternAddDouble(pattern, FC_SIZE, size);
/* Set the language for the pattern. */
-#if GTK_CHECK_VERSION(2,2,0)
if (gtk_widget_has_screen(widget)) {
screen = gtk_widget_get_screen(widget);
} else {
screen = gdk_display_get_default_screen(gtk_widget_get_display(widget));
}
context = gdk_pango_context_get_for_screen(screen);
-#else
- context = gdk_pango_context_get();
-#endif
language = pango_context_get_language(context);
if (pango_language_to_string(language) != NULL) {
FcPatternAddString(pattern, FC_LANG,
@@ -192,24 +186,18 @@ _vte_fc_defaults_from_gtk(GtkWidget *widget, FcPattern *pattern,
VteTerminalAntiAlias explicit_antialias)
{
GtkSettings *settings;
-#if GTK_CHECK_VERSION(2,2,0)
GdkScreen *screen;
-#endif
GObjectClass *klass;
int i, antialias = -1, hinting = -1, dpi = -1;
char *rgba = NULL, *hintstyle = NULL;
/* Add any defaults configured for GTK+. */
-#if GTK_CHECK_VERSION(2,2,0)
if (gtk_widget_has_screen(widget)) {
screen = gtk_widget_get_screen(widget);
} else {
screen = gdk_display_get_default_screen(gtk_widget_get_display(widget));
}
settings = gtk_settings_get_for_screen(screen);
-#else
- settings = gtk_settings_get_default();
-#endif
if (settings == NULL) {
return;
}
diff --git a/src/vtegl.c b/src/vtegl.c
index f2d3679..a69f2e1 100644
--- a/src/vtegl.c
+++ b/src/vtegl.c
@@ -21,7 +21,6 @@
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(2,2,0)
#ifndef X_DISPLAY_MISSING
#ifdef HAVE_GL
@@ -631,4 +630,3 @@ struct _vte_draw_impl _vte_draw_gl = {
#endif
#endif
-#endif
diff --git a/src/vtepango.c b/src/vtepango.c
index 74b324c..2bacdde 100644
--- a/src/vtepango.c
+++ b/src/vtepango.c
@@ -119,19 +119,13 @@ _vte_pango_get_colormap(struct _vte_draw *draw)
static void
_vte_pango_start(struct _vte_draw *draw)
{
-#if GTK_CHECK_VERSION(2,2,0)
GdkScreen *screen;
-#endif
PangoContext *ctx;
struct _vte_pango_data *data;
data = (struct _vte_pango_data*) draw->impl_data;
-#if GTK_CHECK_VERSION(2,2,0)
screen = gdk_drawable_get_screen(draw->widget->window);
ctx = gdk_pango_context_get_for_screen(screen);
-#else
- ctx = gdk_pango_context_get();
-#endif
if (PANGO_IS_CONTEXT(data->ctx)) {
g_object_unref(G_OBJECT(data->ctx));
}
@@ -261,9 +255,7 @@ _vte_pango_set_text_font(struct _vte_draw *draw,
const PangoFontDescription *fontdesc,
VteTerminalAntiAlias antialias)
{
-#if GTK_CHECK_VERSION(2,2,0)
GdkScreen *screen;
-#endif
PangoContext *ctx;
PangoLayout *layout;
PangoLayoutIter *iter;
@@ -276,16 +268,12 @@ _vte_pango_set_text_font(struct _vte_draw *draw,
data = (struct _vte_pango_data*) draw->impl_data;
-#if GTK_CHECK_VERSION(2,2,0)
if (gtk_widget_has_screen(draw->widget)) {
screen = gtk_widget_get_screen(draw->widget);
} else {
screen = gdk_display_get_default_screen(gtk_widget_get_display(draw->widget));
}
ctx = gdk_pango_context_get_for_screen(screen);
-#else
- ctx = gdk_pango_context_get();
-#endif
layout = pango_layout_new(ctx);
if (data->font != NULL) {
pango_font_description_free(data->font);
diff --git a/src/vtepangox.c b/src/vtepangox.c
index 931d9af..5cb01b6 100644
--- a/src/vtepangox.c
+++ b/src/vtepangox.c
@@ -286,11 +286,7 @@ _vte_pango_x_set_text_font(struct _vte_draw *draw,
data = (struct _vte_pango_x_data*) draw->impl_data;
-#if GTK_CHECK_VERSION(2,2,0)
display = gdk_x11_display_get_xdisplay(gtk_widget_get_display(draw->widget));
-#else
- display = gdk_display;
-#endif
if (PANGO_IS_CONTEXT(data->ctx)) {
g_object_unref(G_OBJECT(data->ctx));
}
diff --git a/src/vterdb.c b/src/vterdb.c
index eda6d84..4b7f629 100644
--- a/src/vterdb.c
+++ b/src/vterdb.c
@@ -48,14 +48,13 @@ _vte_property_get_string(GdkWindow *window, GdkAtom atom,
static gchar **
_vte_rdb_get(GtkWidget *widget, gboolean screen_setting)
{
- GdkWindow *root = NULL;
+ GdkWindow *root;
char *prop_data, *tmp;
gchar **ret;
int prop_length;
GdkAtom atom, prop_type;
/* Retrieve the window and the property which we're going to read. */
-#if GTK_CHECK_VERSION(2,2,0)
GdkDisplay *display;
GdkScreen *screen;
@@ -74,7 +73,6 @@ _vte_rdb_get(GtkWidget *widget, gboolean screen_setting)
}
root = gdk_screen_get_root_window(screen);
-#endif
if (root == NULL) {
root = gdk_get_default_root_window();
}
@@ -90,13 +88,7 @@ _vte_rdb_get(GtkWidget *widget, gboolean screen_setting)
_vte_property_get_string(root, atom,
&prop_type, &prop_length,
&prop_data);
-#if GTK_CHECK_VERSION(2,2,0)
gdk_display_sync(display);
-#else
-#ifndef X_DISPLAY_MISSING
- XSync(GDK_DISPLAY(), FALSE);
-#endif
-#endif
gdk_error_trap_pop();
/* Only parse the information if we got a string. */
diff --git a/src/vteseq.c b/src/vteseq.c
index b53a415..a511973 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -1024,15 +1024,11 @@ vte_sequence_handler_as(VteTerminal *terminal,
static void
vte_terminal_beep(VteTerminal *terminal)
{
-#if GTK_CHECK_VERSION(2,2,0)
GdkDisplay *display;
g_assert(VTE_IS_TERMINAL(terminal));
display = gtk_widget_get_display(GTK_WIDGET(terminal));
gdk_display_beep(display);
-#else
- gdk_beep();
-#endif
}
/* Beep. */
@@ -3753,9 +3749,7 @@ vte_sequence_handler_window_manipulation(VteTerminal *terminal,
GQuark match_quark,
GValueArray *params)
{
-#if GTK_CHECK_VERSION(2,2,0)
GdkScreen *gscreen;
-#endif
VteScreen *screen;
GValue *value;
GtkWidget *widget;
@@ -3964,7 +3958,6 @@ vte_sequence_handler_window_manipulation(VteTerminal *terminal,
fprintf(stderr, "Reporting screen size.\n");
}
#endif
-#if GTK_CHECK_VERSION(2,2,0)
if (gtk_widget_has_screen(widget)) {
gscreen = gtk_widget_get_screen(widget);
} else {
@@ -3972,10 +3965,6 @@ vte_sequence_handler_window_manipulation(VteTerminal *terminal,
}
height = gdk_screen_get_height(gscreen);
width = gdk_screen_get_width(gscreen);
-#else
- height = gdk_screen_height();
- width = gdk_screen_width();
-#endif
snprintf(buf, sizeof(buf),
"%s%ld;%ldt", _VTE_CAP_CSI,
height / terminal->char_height,
diff --git a/src/vtexft.c b/src/vtexft.c
index 2c36e28..7390e8e 100644
--- a/src/vtexft.c
+++ b/src/vtexft.c
@@ -42,9 +42,7 @@
#define CHAR_WIDTH_FUDGE 10
struct _vte_xft_font {
-#if GTK_CHECK_VERSION(2,2,0)
GdkDisplay *display;
-#endif
GArray *patterns;
GArray *fonts;
VteTree *fontmap;
@@ -77,25 +75,17 @@ _vte_xft_direct_compare(gconstpointer a, gconstpointer b)
static gboolean
_vte_xft_char_exists(struct _vte_xft_font *font, XftFont *ftfont, FcChar32 c)
{
-#if GTK_CHECK_VERSION(2,2,0)
return XftCharExists(GDK_DISPLAY_XDISPLAY(font->display),
ftfont,
c) == FcTrue;
-#else
- return XftCharExists(GDK_DISPLAY(), ftfont, c) == FcTrue;
-#endif
}
static void
_vte_xft_text_extents(struct _vte_xft_font *font, XftFont *ftfont, FcChar32 c,
XGlyphInfo *extents)
{
-#if GTK_CHECK_VERSION(2,2,0)
XftTextExtents32(GDK_DISPLAY_XDISPLAY(font->display),
ftfont, &c, 1, extents);
-#else
- XftTextExtents32(GDK_DISPLAY(), ftfont, &c, 1, extents);
-#endif
}
static struct _vte_xft_font *
@@ -113,9 +103,7 @@ _vte_xft_font_open(GtkWidget *widget, const PangoFontDescription *fontdesc,
}
font = g_slice_new0(struct _vte_xft_font);
-#if GTK_CHECK_VERSION(2,2,0)
font->display = gtk_widget_get_display(widget);
-#endif
font->patterns = patterns;
font->fonts = g_array_new(TRUE, TRUE, sizeof(XftFont*));
font->fontmap = _vte_tree_new(_vte_xft_direct_compare);