vte r2159 - in trunk: . src



Author: behdad
Date: Thu Nov 20 16:48:04 2008
New Revision: 2159
URL: http://svn.gnome.org/viewvc/vte?rev=2159&view=rev

Log:
2008-11-20  Behdad Esfahbod  <behdad gnome org>

        Bug 560819 â Remove obsolete backends

        * configure.in:
        * src/Makefile.am:
        * src/vtebg.c (vte_bg_get_pixmap):
        * src/vtebg.h:
        * src/vtedraw.c:
        * src/vtefc.c:
        * src/vtefc.h:
        * src/vteft2.c:
        * src/vteft2.h:
        * src/vtegl.c:
        * src/vtegl.h:
        * src/vteglyph.c:
        * src/vteglyph.h:
        * src/vterdb.c:
        * src/vterdb.h:
        * src/vtergb.c:
        * src/vtergb.h:
        * src/vtexft.c:
        * src/vtexft.h:
        Remove all backends except for pangocairo.  Saves so much code.



Removed:
   trunk/src/vtefc.c
   trunk/src/vtefc.h
   trunk/src/vteft2.c
   trunk/src/vteft2.h
   trunk/src/vtegl.c
   trunk/src/vtegl.h
   trunk/src/vteglyph.c
   trunk/src/vteglyph.h
   trunk/src/vterdb.c
   trunk/src/vterdb.h
   trunk/src/vtergb.c
   trunk/src/vtergb.h
   trunk/src/vtexft.c
   trunk/src/vtexft.h
Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/src/Makefile.am
   trunk/src/vtebg.c
   trunk/src/vtebg.h
   trunk/src/vtedraw.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Thu Nov 20 16:48:04 2008
@@ -324,45 +324,6 @@
 # Backends
 ################################################################################
 
-# Use Xft2 if Pango has Xft2 support and it isn't disabled.
-if test "x$have_x" = "xyes" ; then
-	AC_ARG_WITH(xft2,
-		    [AS_HELP_STRING([--with-xft2],
-				    [enable drawing using Xft2])
-		    ], with_xft2=$withval, with_xft2=yes)
-	if test "x$with_xft2" = "xyes" ; then
-		PKG_CHECK_EXISTS([pangoxft >= 1.1.0], [
-			AC_DEFINE(HAVE_XFT2,1,[Whether we have Xft2])
-			wantedmodules="xft >= 2.0 $wantedmodules pangoxft >= 1.1.0"
-			],[
-			AC_MSG_WARN([Xft2 not detected])
-			with_xft2="no - not detected"
-			])
-	fi
-else
-	with_xft2="no - missing X Window System"
-fi
-AM_CONDITIONAL(BUILD_XFT, test "x$with_xft2" = "xyes")
-
-# Use glX if we have it and it isn't disabled.
-if test "$have_x" = yes ; then
-	AC_ARG_WITH(glX,[AS_HELP_STRING(--with-glX,enable drawing using glX)],with_glx=$withval,with_glx=no)
-	if test $with_glx = yes ; then
-		have_gl=0
-		have_libgl=0
-		AC_CHECK_HEADERS(GL/glx.h)
-		if test $ac_cv_header_GL_glx_h = yes ; then
-			AC_CHECK_FUNC(glXQueryExtension,[have_gl=1],AC_CHECK_LIB(GL,glXQueryExtension,[have_gl=1;have_libgl=1]))
-		fi
-		if test $have_gl = 1 ; then
-			AC_DEFINE(HAVE_GL,1,[Whether we have GL and glX.])
-		fi
-		if test $have_libgl = 1 ; then
-			LIBS="-lGL $LIBS"
-		fi
-	fi
-fi
-
 # Search for the required modules.
 PKG_CHECK_MODULES(VTE,[$wantedmodules])
 NEEDEDPACKAGES="$wantedmodules"
@@ -658,7 +619,6 @@
 ## -------------- ##
 
 Configuration for libvte $VERSION
-	With XFT: $with_xft2
 	With PCRE: $use_pcre
 	Installing Glade catalogue: $enable_glade_catalogue
 	Debugging: $DEBUG

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Thu Nov 20 16:48:04 2008
@@ -1,7 +1,7 @@
 bin_PROGRAMS = vte
 pkginclude_HEADERS = pty.h reaper.h vte.h vteaccess.h vtetypebuiltins.h vteversion.h
 lib_LTLIBRARIES = libvte.la
-pkglib_PROGRAMS = interpret utf8echo nativeecho utf8mode iso8859mode slowcat vterdb
+pkglib_PROGRAMS = interpret utf8echo nativeecho utf8mode iso8859mode slowcat
 pkglib_SCRIPTS = decset osc window
 EXTRA_PROGRAMS = buffer dumpkeys iso2022 pty reaper reflect-text-view reflect-vte ring mev ssfe table trie xticker vteconv vtetc
 EXTRA_DIST = \
@@ -80,23 +80,11 @@
 	vteconv.h \
 	vtedraw.c \
 	vtedraw.h \
-	vtefc.c \
-	vtefc.h \
-	vteft2.c \
-	vteft2.h \
-	vtegl.c \
-	vtegl.h \
-	vteglyph.c \
-	vteglyph.h \
 	vteint.h \
 	vtepangocairo.c \
 	vtepangocairo.h \
-	vterdb.c \
-	vterdb.h \
 	vteregex.c \
 	vteregex.h \
-	vtergb.c \
-	vtergb.h \
 	vteseq.c \
 	vteseq.h \
 	vteseq-list.h \
@@ -111,12 +99,6 @@
 	vtetypebuiltins.h \
 	vteversion.h
 
-if BUILD_XFT
-libvte_la_SOURCES += \
-	vtexft.c \
-	vtexft.h
-endif
-
 libvte_la_LDFLAGS = $(LDFLAGS) \
 	-version-info $(LIBVTE_LTVERSION) \
 	-export-symbols-regex "^vte_terminal_.*|^_vte_pty_.*|^vte_reaper_.*|_vte_debug_.*" \
@@ -308,10 +290,6 @@
 	reaper.h
 reaper_LDADD = $(LDFLAGS) $(LIBS) $(GOBJECT_LIBS)
 
-vterdb_CFLAGS = $(GTK_CFLAGS) $(X_CFLAGS) -DVTERDB_MAIN
-vterdb_SOURCES = vterdb.c
-vterdb_LDADD = $(LDFLAGS) $(LIBS) $(GTK_LIBS)
-
 vteconv_CFLAGS = $(GLIB_CFLAGS) -DVTECONV_MAIN
 vteconv_SOURCES = \
 	buffer.c \

Modified: trunk/src/vtebg.c
==============================================================================
--- trunk/src/vtebg.c	(original)
+++ trunk/src/vtebg.c	Thu Nov 20 16:48:04 2008
@@ -671,109 +671,3 @@
 
 	return item->pixmap;
 }
-
-GdkPixbuf *
-vte_bg_get_pixbuf(VteBg *bg,
-		  enum VteBgSourceType source_type,
-		  GdkPixbuf *source_pixbuf,
-		  const char *source_file,
-		  const GdkColor *tint,
-		  double saturation)
-{
-	struct VteBgCacheItem *item;
-	gpointer cached;
-	GdkPixbuf *pixbuf;
-	GdkColormap *rcolormap;
-	char *file;
-
-	if (source_type == VTE_BG_SOURCE_NONE) {
-		return NULL;
-	}
-
-	cached = vte_bg_cache_search(bg, source_type,
-				     source_pixbuf, source_file,
-				     tint, saturation, NULL, TRUE, FALSE);
-	if (cached != NULL) {
-		return cached;
-	}
-
-	item = g_slice_new(struct VteBgCacheItem);
-	item->source_type = source_type;
-	item->source_pixbuf = NULL;
-	item->source_file = NULL;
-	item->tint_color = *tint;
-	item->saturation = saturation;
-	item->pixmap = NULL;
-	item->pixbuf = NULL;
-	pixbuf = NULL;
-	file = NULL;
-
-	switch (source_type) {
-	case VTE_BG_SOURCE_ROOT:
-		if (GDK_IS_PIXMAP(bg->root_pixmap)) {
-			gint width, height;
-
-			/* If the pixmap doesn't have a colormap, tell GTK+ that
-			 * it shares the root window's colormap. */
-			rcolormap = gdk_drawable_get_colormap(gdk_screen_get_root_window(bg->screen));
-			if (gdk_drawable_get_colormap(bg->root_pixmap) == NULL) {
-				gdk_drawable_set_colormap(bg->root_pixmap, rcolormap);
-			}
-
-			/* Read the pixmap's size. */
-			gdk_error_trap_push();
-			width = height = -1;
-			gdk_drawable_get_size(bg->root_pixmap, &width, &height);
-			_vte_bg_display_sync(bg);
-			gdk_error_trap_pop();
-
-			/* If we got a valid size, read the pixmap's
-			 * contents. */
-			if ((width > 0) && (height > 0)) {
-				gdk_error_trap_push();
-				pixbuf = gdk_pixbuf_get_from_drawable(NULL,
-								      bg->root_pixmap,
-								      NULL,
-								      0, 0,
-								      0, 0,
-								      width, height);
-				_vte_bg_display_sync(bg);
-				gdk_error_trap_pop();
-			}
-		}
-		break;
-	case VTE_BG_SOURCE_PIXBUF:
-		pixbuf = source_pixbuf;
-		if (G_IS_OBJECT(pixbuf)) {
-			g_object_ref(pixbuf);
-		}
-		break;
-	case VTE_BG_SOURCE_FILE:
-		if ((source_file != NULL) && (strlen(source_file) > 0)) {
-			file = g_strdup(source_file);
-			pixbuf = gdk_pixbuf_new_from_file(source_file, NULL);
-		}
-		break;
-	default:
-		g_assert_not_reached();
-		break;
-	}
-
-	item->source_pixbuf = pixbuf;
-	item->source_file = file;
-
-	if (GDK_IS_PIXBUF(item->source_pixbuf)) {
-		if (saturation == 1.0) {
-			g_object_ref(item->source_pixbuf);
-			item->pixbuf = item->source_pixbuf;
-		} else {
-			item->pixbuf = gdk_pixbuf_copy(item->source_pixbuf);
-			vte_bg_desaturate_pixbuf(item->pixbuf,
-						 tint, saturation);
-		}
-	}
-
-	vte_bg_cache_add(bg, item);
-
-	return item->pixbuf;
-}

Modified: trunk/src/vtebg.h
==============================================================================
--- trunk/src/vtebg.h	(original)
+++ trunk/src/vtebg.h	Thu Nov 20 16:48:04 2008
@@ -65,11 +65,6 @@
 			     const GdkColor *tint, double saturation,
 			     GdkColormap *colormap);
 
-GdkPixbuf *vte_bg_get_pixbuf(VteBg *bg, enum VteBgSourceType source_type,
-			     GdkPixbuf *source_pixbuf,
-			     const char *source_file,
-			     const GdkColor *tint, double saturation);
-
 G_END_DECLS
 
 #endif

Modified: trunk/src/vtedraw.c
==============================================================================
--- trunk/src/vtedraw.c	(original)
+++ trunk/src/vtedraw.c	Thu Nov 20 16:48:04 2008
@@ -28,26 +28,12 @@
 #include <gtk/gtk.h>
 #include "debug.h"
 #include "vtedraw.h"
-#include "vteft2.h"
-#include "vtegl.h"
 #include "vtepangocairo.h"
 #include "vteskel.h"
-#include "vtexft.h"
 
 static const struct _vte_draw_impl
 *_vte_draw_impls[] = {
 	&_vte_draw_pangocairo,
-#ifndef X_DISPLAY_MISSING
-#ifdef HAVE_XFT2
-	&_vte_draw_xft,
-#endif /* HAVE_XFT2 */
-#endif /* !X_DISPLAY_MISSING */
-	&_vte_draw_ft2,
-#ifndef X_DISPLAY_MISSING
-#ifdef HAVE_GL
-	&_vte_draw_gl,
-#endif /* HAVE_GL */
-#endif /* !X_DISPLAY_MISSING */
 };
 
 static gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]