[vte: 7/9] Drop _vte_draw_get_visual() and _vte_draw_get_colormap()



commit 0edf9e87b374488c502c9c8157f07fcf64692593
Author: Kristian Høgsberg <krh bitplanet net>
Date:   Wed Dec 23 11:28:36 2009 -0500

    Drop _vte_draw_get_visual() and _vte_draw_get_colormap()

 src/vte.c     |    5 ++---
 src/vtedraw.c |   26 +-------------------------
 src/vtedraw.h |    7 -------
 3 files changed, 3 insertions(+), 35 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index 1900a82..2adc5b5 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8511,9 +8511,8 @@ vte_terminal_realize(GtkWidget *widget)
 	attributes.width = widget->allocation.width;
 	attributes.height = widget->allocation.height;
 	attributes.wclass = GDK_INPUT_OUTPUT;
-	attributes.visual = _vte_draw_get_visual(terminal->pvt->draw);
-	attributes.colormap = _vte_draw_get_colormap(terminal->pvt->draw,
-						     FALSE);
+	attributes.visual = gtk_widget_get_visual (widget);
+	attributes.colormap = gtk_widget_get_colormap (widget);
 	attributes.event_mask = gtk_widget_get_events(widget) |
 				GDK_EXPOSURE_MASK |
 				GDK_VISIBILITY_NOTIFY_MASK |
diff --git a/src/vtedraw.c b/src/vtedraw.c
index ba3fcf2..ac51e76 100644
--- a/src/vtedraw.c
+++ b/src/vtedraw.c
@@ -832,30 +832,6 @@ _vte_draw_free (struct _vte_draw *draw)
 	g_slice_free (struct _vte_draw, draw);
 }
 
-GdkVisual *
-_vte_draw_get_visual (struct _vte_draw *draw)
-{
-	_vte_debug_print (VTE_DEBUG_DRAW, "draw_get_visual\n");
-
-	return gtk_widget_get_visual (draw->widget);
-}
-
-GdkColormap *
-_vte_draw_get_colormap (struct _vte_draw *draw, gboolean maybe_use_default)
-{
-	GdkColormap *colormap;
-
-	_vte_debug_print (VTE_DEBUG_DRAW, "draw_get_colormap\n");
-
-	colormap = gtk_widget_get_colormap (draw->widget);
-
-	if (colormap == NULL && maybe_use_default) {
-		colormap = gdk_screen_get_default_colormap (gtk_widget_get_screen (draw->widget));
-	}
-
-	return colormap;
-}
-
 void
 _vte_draw_start (struct _vte_draw *draw)
 {
@@ -922,7 +898,7 @@ _vte_draw_set_background_image (struct _vte_draw *draw,
 	pixmap = vte_bg_get_pixmap (vte_bg_get_for_screen (gtk_widget_get_screen (draw->widget)),
 				    type, pixbuf, filename,
 				    color, saturation,
-				    _vte_draw_get_colormap(draw, TRUE));
+				    gtk_widget_get_colormap (draw->widget));
 
 	if (!pixmap)
 		return;
diff --git a/src/vtedraw.h b/src/vtedraw.h
index 810d318..bea1023 100644
--- a/src/vtedraw.h
+++ b/src/vtedraw.h
@@ -63,13 +63,6 @@ struct _vte_draw_text_request {
 struct _vte_draw *_vte_draw_new(GtkWidget *widget);
 void _vte_draw_free(struct _vte_draw *draw);
 
-/* Get the visual and colormap the draw structure desires.  Certain draw
-   implementations may require that this visual/colormap pair be used when
-   creating a window, and may fail otherwise. */
-GdkVisual *_vte_draw_get_visual(struct _vte_draw *draw);
-GdkColormap *_vte_draw_get_colormap(struct _vte_draw *draw,
-				    gboolean maybe_use_default);
-
 /* Begin and end a drawing operation.  If anything is buffered locally, it is
    flushed to the window system when _end() is called. */
 void _vte_draw_start(struct _vte_draw *draw);



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