[vte/vte-next: 63/114] Rename 'inner_border' to 'padding'



commit f15d886f11fecb59c46a9c2003131797a7aa1419
Author: Christian Persch <chpe gnome org>
Date:   Sat May 7 20:01:26 2011 +0200

    Rename 'inner_border' to 'padding'

 src/vte-private.h |    2 +-
 src/vte.c         |  154 ++++++++++++++++++++++++++--------------------------
 src/vteaccess.c   |   10 ++--
 src/vteapp.c      |   42 +++++++-------
 src/vteseq.c      |   48 ++++++++--------
 5 files changed, 128 insertions(+), 128 deletions(-)
---
diff --git a/src/vte-private.h b/src/vte-private.h
index 87b0779..d4cd5b6 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -379,7 +379,7 @@ struct _VteTerminalPrivate {
 	glong strikethrough_position;
 
         /* Style stuff */
-        GtkBorder inner_border;
+        GtkBorder padding;
 
         /* GtkScrollable impl */
         GtkAdjustment *hadjustment; /* unused */
diff --git a/src/vte.c b/src/vte.c
index 9e722d1..c773350 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -167,7 +167,7 @@ static gboolean in_update_timeout;
 static GList *active_terminals;
 static GTimer *process_timer;
 
-static const GtkBorder default_inner_border = { 1, 1, 1, 1 };
+static const GtkBorder default_padding = { 1, 1, 1, 1 };
 
 /* process incoming data without copying */
 static struct _vte_incoming_chunk *free_chunks;
@@ -389,21 +389,21 @@ _vte_invalidate_cells(VteTerminal *terminal,
 	 */
 	rect.x = column_start * terminal->pvt->char_width - 1;
 	if (column_start != 0) {
-		rect.x += terminal->pvt->inner_border.left;
+		rect.x += terminal->pvt->padding.left;
 	}
-	rect.width = (column_start + column_count) * terminal->pvt->char_width + 3 + terminal->pvt->inner_border.left;
+	rect.width = (column_start + column_count) * terminal->pvt->char_width + 3 + terminal->pvt->padding.left;
 	if (column_start + column_count == terminal->pvt->column_count) {
-		rect.width += terminal->pvt->inner_border.right;
+		rect.width += terminal->pvt->padding.right;
 	}
 	rect.width -= rect.x;
 
 	rect.y = row_start * terminal->pvt->char_height - 1;
 	if (row_start != 0) {
-		rect.y += terminal->pvt->inner_border.top;
+		rect.y += terminal->pvt->padding.top;
 	}
-	rect.height = (row_start + row_count) * terminal->pvt->char_height + 2 + terminal->pvt->inner_border.top;
+	rect.height = (row_start + row_count) * terminal->pvt->char_height + 2 + terminal->pvt->padding.top;
 	if (row_start + row_count == terminal->pvt->row_count) {
-		rect.height += terminal->pvt->inner_border.bottom;
+		rect.height += terminal->pvt->padding.bottom;
 	}
 	rect.height -= rect.y;
 
@@ -3697,10 +3697,10 @@ next_match:
 	if (gtk_widget_get_realized (&terminal->widget)) {
 		cairo_rectangle_int_t rect;
 		rect.x = terminal->pvt->screen->cursor_current.col *
-			 terminal->pvt->char_width + terminal->pvt->inner_border.left;
+			 terminal->pvt->char_width + terminal->pvt->padding.left;
 		rect.width = terminal->pvt->char_width;
 		rect.y = (terminal->pvt->screen->cursor_current.row - delta) *
-			 terminal->pvt->char_height + terminal->pvt->inner_border.top;
+			 terminal->pvt->char_height + terminal->pvt->padding.top;
 		rect.height = terminal->pvt->char_height;
 		gtk_im_context_set_cursor_location(terminal->pvt->im_context,
 						   &rect);
@@ -4206,31 +4206,31 @@ vte_terminal_im_preedit_changed(GtkIMContext *im_context, VteTerminal *terminal)
 }
 
 static void
-vte_terminal_set_inner_border(VteTerminal *terminal)
+vte_terminal_set_padding(VteTerminal *terminal)
 {
         VteTerminalPrivate *pvt = terminal->pvt;
         GtkWidget *widget = GTK_WIDGET(terminal);
         GtkBorder *border = NULL;
-        GtkBorder inner_border;
+        GtkBorder padding;
 
         gtk_widget_style_get(widget, "inner-border", &border, NULL);
 
         if (border != NULL) {
-                inner_border = *border;
+                padding = *border;
                 gtk_border_free(border);
         } else {
-                inner_border = default_inner_border;
+                padding = default_padding;
         }
 
         _vte_debug_print(VTE_DEBUG_MISC,
                          "Setting inner-border to { %d, %d, %d, %d }\n",
-                         inner_border.left, inner_border.right,
-                         inner_border.top, inner_border.bottom);
+                         padding.left, padding.right,
+                         padding.top, padding.bottom);
 
-        if (memcmp(&inner_border, &pvt->inner_border, sizeof(GtkBorder)) == 0)
+        if (memcmp(&padding, &pvt->padding, sizeof(GtkBorder)) == 0)
                 return;
 
-        pvt->inner_border = inner_border;
+        pvt->padding = padding;
 
         gtk_widget_queue_resize(widget);
 }
@@ -4243,7 +4243,7 @@ vte_terminal_update_style(VteTerminal *terminal)
         float aspect;
 
         vte_terminal_set_font(terminal, pvt->fontdesc);
-        vte_terminal_set_inner_border(terminal);
+        vte_terminal_set_padding(terminal);
 
         gtk_widget_style_get(widget, "cursor-aspect-ratio", &aspect, NULL);
         if (aspect != pvt->cursor_aspect_ratio) {
@@ -5054,8 +5054,8 @@ _vte_terminal_xy_to_grid(VteTerminal *terminal,
         long c, r;
 
         /* FIXMEchpe: is this correct for RTL? */
-        c = (x - pvt->inner_border.left) / pvt->char_width;
-        r = (y - pvt->inner_border.top) / pvt->char_height;
+        c = (x - pvt->padding.left) / pvt->char_width;
+        r = (y - pvt->padding.top) / pvt->char_height;
 
         if ((c < 0 || c >= pvt->column_count) ||
             (r < 0 || r >= pvt->row_count))
@@ -5088,8 +5088,8 @@ _vte_terminal_size_to_grid_size(VteTerminal *terminal,
         VteTerminalPrivate *pvt = terminal->pvt;
         long n_cols, n_rows;
 
-        n_cols = (w - pvt->inner_border.left - pvt->inner_border.right) / pvt->char_width;
-        n_rows = (h - pvt->inner_border.top -pvt->inner_border.bottom) / pvt->char_height;
+        n_cols = (w - pvt->padding.left - pvt->padding.right) / pvt->char_width;
+        n_rows = (h - pvt->padding.top -pvt->padding.bottom) / pvt->char_height;
 
         if (n_cols <= 0 || n_rows <= 0)
                 return FALSE;
@@ -5166,8 +5166,8 @@ vte_terminal_send_mouse_button_internal(VteTerminal *terminal,
 	gint len;
 	int width = terminal->pvt->char_width;
 	int height = terminal->pvt->char_height;
-	long col = (x - terminal->pvt->inner_border.left) / width;
-	long row = (y - terminal->pvt->inner_border.top) / height;
+	long col = (x - terminal->pvt->padding.left) / width;
+	long row = (y - terminal->pvt->padding.top) / height;
 
 	vte_terminal_get_mouse_tracking_info (terminal,
 					      button, col, row,
@@ -5216,8 +5216,8 @@ vte_terminal_maybe_send_mouse_drag(VteTerminal *terminal, GdkEventMotion *event)
 	gint len;
 	int width = terminal->pvt->char_width;
 	int height = terminal->pvt->char_height;
-	long col = ((long) event->x - terminal->pvt->inner_border.left) / width;
-	long row = ((long) event->y - terminal->pvt->inner_border.top) / height;
+	long col = ((long) event->x - terminal->pvt->padding.left) / width;
+	long row = ((long) event->y - terminal->pvt->padding.top) / height;
 
 	/* First determine if we even want to send notification. */
 	switch (event->type) {
@@ -5896,8 +5896,8 @@ vte_terminal_start_selection(VteTerminal *terminal, GdkEventButton *event,
 	/* Record that we have the selection, and where it started. */
 	delta = terminal->pvt->screen->scroll_delta;
 	terminal->pvt->has_selection = TRUE;
-	terminal->pvt->selection_last.x = event->x - terminal->pvt->inner_border.left;
-	terminal->pvt->selection_last.y = event->y - terminal->pvt->inner_border.top +
+	terminal->pvt->selection_last.x = event->x - terminal->pvt->padding.left;
+	terminal->pvt->selection_last.y = event->y - terminal->pvt->padding.top +
 					  (terminal->pvt->char_height * delta);
 
 	/* Decide whether or not to restart on the next drag. */
@@ -6549,8 +6549,8 @@ vte_terminal_motion_notify(GtkWidget *widget, GdkEventMotion *event)
 	}
 
 	terminal = VTE_TERMINAL(widget);
-	x = event->x - terminal->pvt->inner_border.left;
-	y = event->y - terminal->pvt->inner_border.top;
+	x = event->x - terminal->pvt->padding.left;
+	y = event->y - terminal->pvt->padding.top;
 	width = terminal->pvt->char_width;
 	height = terminal->pvt->char_height;
 
@@ -6581,9 +6581,9 @@ vte_terminal_motion_notify(GtkWidget *widget, GdkEventMotion *event)
 						      x, y, FALSE, FALSE);
 
 			/* Start scrolling if we need to. */
-			if (event->y < terminal->pvt->inner_border.top ||
+			if (event->y < terminal->pvt->padding.top ||
 			    event->y >= terminal->pvt->row_count * height +
-                                        terminal->pvt->inner_border.top)
+                                        terminal->pvt->padding.top)
 			{
 				/* Give mouse wigglers something. */
 				vte_terminal_autoscroll(terminal);
@@ -6622,8 +6622,8 @@ vte_terminal_button_press(GtkWidget *widget, GdkEventButton *event)
 
 	terminal = VTE_TERMINAL(widget);
 
-	x = event->x - terminal->pvt->inner_border.left;
-	y = event->y - terminal->pvt->inner_border.top;
+	x = event->x - terminal->pvt->padding.left;
+	y = event->y - terminal->pvt->padding.top;
 
 	height = terminal->pvt->char_height;
 	width = terminal->pvt->char_width;
@@ -6779,8 +6779,8 @@ vte_terminal_button_release(GtkWidget *widget, GdkEventButton *event)
 
 	terminal = VTE_TERMINAL(widget);
 
-	x = event->x - terminal->pvt->inner_border.left;
-	y = event->y - terminal->pvt->inner_border.top;
+	x = event->x - terminal->pvt->padding.left;
+	y = event->y - terminal->pvt->padding.top;
 
 	vte_terminal_match_hilite(terminal, x, y);
 
@@ -6902,8 +6902,8 @@ vte_terminal_enter(GtkWidget *widget, GdkEventCrossing *event)
 		VteTerminal *terminal = VTE_TERMINAL (widget);
 		/* Hilite any matches. */
 		vte_terminal_match_hilite_show(terminal,
-					       event->x - terminal->pvt->inner_border.left,
-					       event->y - terminal->pvt->inner_border.top);
+					       event->x - terminal->pvt->padding.left,
+					       event->y - terminal->pvt->padding.top);
 	}
 	return ret;
 }
@@ -7656,7 +7656,7 @@ vte_terminal_init(VteTerminal *terminal)
 	 * window as unobscured initially. */
 	pvt->visibility_state = GDK_VISIBILITY_UNOBSCURED;
 
-        pvt->inner_border = default_inner_border;
+        pvt->padding = default_padding;
 
 #ifdef VTE_DEBUG
 	/* In debuggable mode, we always do this. */
@@ -7688,10 +7688,10 @@ vte_terminal_get_preferred_width(GtkWidget *widget,
 	*minimum_width = terminal->pvt->char_width * 1;
         *natural_width = terminal->pvt->char_width * terminal->pvt->column_count;
 
-	*minimum_width += terminal->pvt->inner_border.left +
-                          terminal->pvt->inner_border.right;
-	*natural_width += terminal->pvt->inner_border.left +
-                          terminal->pvt->inner_border.right;
+	*minimum_width += terminal->pvt->padding.left +
+                          terminal->pvt->padding.right;
+	*natural_width += terminal->pvt->padding.left +
+                          terminal->pvt->padding.right;
 
 	_vte_debug_print(VTE_DEBUG_WIDGET_SIZE,
 			"[Terminal %p] minimum_width=%d, natural_width=%d for %ldx%ld cells.\n",
@@ -7718,10 +7718,10 @@ vte_terminal_get_preferred_height(GtkWidget *widget,
 	*minimum_height = terminal->pvt->char_height * 1;
         *natural_height = terminal->pvt->char_height * terminal->pvt->row_count;
 
-	*minimum_height += terminal->pvt->inner_border.left +
-			   terminal->pvt->inner_border.right;
-	*natural_height += terminal->pvt->inner_border.left +
-			   terminal->pvt->inner_border.right;
+	*minimum_height += terminal->pvt->padding.left +
+			   terminal->pvt->padding.right;
+	*natural_height += terminal->pvt->padding.left +
+			   terminal->pvt->padding.right;
 
 	_vte_debug_print(VTE_DEBUG_WIDGET_SIZE,
 			"[Terminal %p] minimum_height=%d, natural_height=%d for %ldx%ld cells.\n",
@@ -7745,9 +7745,9 @@ vte_terminal_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
 
 	terminal = VTE_TERMINAL(widget);
 
-	width = (allocation->width - (terminal->pvt->inner_border.left + terminal->pvt->inner_border.right)) /
+	width = (allocation->width - (terminal->pvt->padding.left + terminal->pvt->padding.right)) /
 		terminal->pvt->char_width;
-	height = (allocation->height - (terminal->pvt->inner_border.top + terminal->pvt->inner_border.bottom)) /
+	height = (allocation->height - (terminal->pvt->padding.top + terminal->pvt->padding.bottom)) /
 		 terminal->pvt->char_height;
 	width = MAX(width, 1);
 	height = MAX(height, 1);
@@ -8399,8 +8399,8 @@ vte_terminal_fill_rectangle(VteTerminal *terminal,
 			    gint height)
 {
 	_vte_draw_fill_rectangle(terminal->pvt->draw,
-				 x + terminal->pvt->inner_border.left,
-                                 y + terminal->pvt->inner_border.top,
+				 x + terminal->pvt->padding.left,
+                                 y + terminal->pvt->padding.top,
 				 width, height,
 				 color);
 }
@@ -8427,8 +8427,8 @@ vte_terminal_draw_rectangle(VteTerminal *terminal,
 			    gint height)
 {
 	_vte_draw_draw_rectangle(terminal->pvt->draw,
-				 x + terminal->pvt->inner_border.left,
-                                 y + terminal->pvt->inner_border.top,
+				 x + terminal->pvt->padding.left,
+                                 y + terminal->pvt->padding.top,
 				 width, height,
 				 color);
 }
@@ -8456,8 +8456,8 @@ vte_terminal_draw_graphic(VteTerminal *terminal, vteunistr c,
 	struct _vte_draw_text_request request;
 
 	request.c = c;
-	request.x = x + terminal->pvt->inner_border.left;
-	request.y = y + terminal->pvt->inner_border.top;
+	request.x = x + terminal->pvt->padding.left;
+	request.y = y + terminal->pvt->padding.top;
 	request.columns = columns;
 
 	xright = x + column_width * columns;
@@ -9245,14 +9245,14 @@ vte_terminal_draw_cells(VteTerminal *terminal,
 		y = items[i].y;
 		for (; i < n && items[i].y == y; i++) {
 			/* Adjust for the border. */
-			items[i].x += terminal->pvt->inner_border.left;
-			items[i].y += terminal->pvt->inner_border.top;
+			items[i].x += terminal->pvt->padding.left;
+			items[i].y += terminal->pvt->padding.top;
 			columns += items[i].columns;
 		}
 		if (clear && (draw_default_bg || bg != defbg)) {
 			_vte_draw_fill_rectangle(terminal->pvt->draw,
-					x + terminal->pvt->inner_border.left,
-                                        y + terminal->pvt->inner_border.top,
+					x + terminal->pvt->padding.left,
+                                        y + terminal->pvt->padding.top,
 					columns * column_width + bold,
 					row_height,
 					bg);
@@ -9263,8 +9263,8 @@ vte_terminal_draw_cells(VteTerminal *terminal,
 			fg, bold);
 	for (i = 0; i < n; i++) {
 		/* Deadjust for the border. */
-		items[i].x -= terminal->pvt->inner_border.left;
-		items[i].y -= terminal->pvt->inner_border.top;
+		items[i].x -= terminal->pvt->padding.left;
+		items[i].y -= terminal->pvt->padding.top;
 	}
 
 	/* Draw whatever SFX are required. */
@@ -9614,8 +9614,8 @@ vte_terminal_draw_rows(VteTerminal *terminal,
 
 	/* clear the background */
 	delta = screen->scroll_delta;
-	x = start_x + terminal->pvt->inner_border.left;
-	y = start_y + terminal->pvt->inner_border.top;
+	x = start_x + terminal->pvt->padding.left;
+	y = start_y + terminal->pvt->padding.top;
 	row = start_row;
 	rows = row_count;
 	do {
@@ -9937,23 +9937,23 @@ vte_terminal_expand_region (VteTerminal *terminal, cairo_region_t *region, const
 
 	/* increase the paint by one pixel on all sides to force the
 	 * inclusion of neighbouring cells */
-	row = MAX(0, (area->y - terminal->pvt->inner_border.top - 1) / height);
-	row_stop = MIN(howmany(area->height + area->y - terminal->pvt->inner_border.top + 1, height),
+	row = MAX(0, (area->y - terminal->pvt->padding.top - 1) / height);
+	row_stop = MIN(howmany(area->height + area->y - terminal->pvt->padding.top + 1, height),
 		       terminal->pvt->row_count);
 	if (row_stop <= row) {
 		return;
 	}
-	col = MAX(0, (area->x - terminal->pvt->inner_border.left - 1) / width);
-	col_stop = MIN(howmany(area->width + area->x - terminal->pvt->inner_border.left + 1, width),
+	col = MAX(0, (area->x - terminal->pvt->padding.left - 1) / width);
+	col_stop = MIN(howmany(area->width + area->x - terminal->pvt->padding.left + 1, width),
 		       terminal->pvt->column_count);
 	if (col_stop <= col) {
 		return;
 	}
 
-	rect.x = col*width + terminal->pvt->inner_border.left;
+	rect.x = col*width + terminal->pvt->padding.left;
 	rect.width = (col_stop - col) * width;
 
-	rect.y = row*height + terminal->pvt->inner_border.top;
+	rect.y = row*height + terminal->pvt->padding.top;
 	rect.height = (row_stop - row)*height;
 
 	/* the rect must be cell aligned to avoid overlapping XY bands */
@@ -9981,14 +9981,14 @@ vte_terminal_paint_area (VteTerminal *terminal, const cairo_rectangle_int_t *are
 	width = terminal->pvt->char_width;
 	height = terminal->pvt->char_height;
 
-	row = MAX(0, (area->y - terminal->pvt->inner_border.top) / height);
-	row_stop = MIN((area->height + area->y - terminal->pvt->inner_border.top) / height,
+	row = MAX(0, (area->y - terminal->pvt->padding.top) / height);
+	row_stop = MIN((area->height + area->y - terminal->pvt->padding.top) / height,
 		       terminal->pvt->row_count);
 	if (row_stop <= row) {
 		return;
 	}
-	col = MAX(0, (area->x - terminal->pvt->inner_border.left) / width);
-	col_stop = MIN((area->width + area->x - terminal->pvt->inner_border.left) / width,
+	col = MAX(0, (area->x - terminal->pvt->padding.left) / width);
+	col_stop = MIN((area->width + area->x - terminal->pvt->padding.left) / width,
 		       terminal->pvt->column_count);
 	if (col_stop <= col) {
 		return;
@@ -10000,8 +10000,8 @@ vte_terminal_paint_area (VteTerminal *terminal, const cairo_rectangle_int_t *are
 			" [(%d,%d)x(%d,%d) pixels]\n",
 			area->x, area->y, area->width, area->height,
 			col, row, col_stop - col, row_stop - row,
-			col * width + terminal->pvt->inner_border.left,
-			row * height + terminal->pvt->inner_border.top,
+			col * width + terminal->pvt->padding.left,
+			row * height + terminal->pvt->padding.top,
 			(col_stop - col) * width,
 			(row_stop - row) * height);
 
@@ -10213,8 +10213,8 @@ vte_terminal_paint_im_preedit_string(VteTerminal *terminal)
 			preedit = g_utf8_next_char(preedit);
 		}
 		_vte_draw_clear(terminal->pvt->draw,
-				col * width + terminal->pvt->inner_border.left,
-				row * height + terminal->pvt->inner_border.top,
+				col * width + terminal->pvt->padding.left,
+				row * height + terminal->pvt->padding.top,
 				width * columns,
 				height);
 		fore = screen->defaults.attr.fore;
diff --git a/src/vteaccess.c b/src/vteaccess.c
index a1958cb..aef9a79 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -1776,7 +1776,7 @@ vte_terminal_accessible_set_size(AtkComponent *component,
 	VteTerminal *terminal;
 	gint columns, rows, char_width, char_height;
 	GtkWidget *widget;
-        GtkBorder *inner_border;
+        GtkBorder *padding;
 
 	widget = gtk_accessible_get_widget (GTK_ACCESSIBLE(component));
 	if (widget == NULL) {
@@ -1786,12 +1786,12 @@ vte_terminal_accessible_set_size(AtkComponent *component,
 
         char_width = vte_terminal_get_char_width (terminal);
         char_height = vte_terminal_get_char_height (terminal);
-        gtk_widget_style_get (widget, "inner-border", &inner_border, NULL);
+        gtk_widget_style_get (widget, "inner-border", &padding, NULL);
 	/* If the size is an exact multiple of the cell size, use that,
 	 * otherwise round down. */
-        columns = (width - (inner_border ? (inner_border->left + inner_border->right) : 0)) / char_width;
-        rows = (height - (inner_border ? (inner_border->top + inner_border->bottom) : 0)) / char_height;
-        gtk_border_free (inner_border);
+        columns = (width - (padding ? (padding->left + padding->right) : 0)) / char_width;
+        rows = (height - (padding ? (padding->top + padding->bottom) : 0)) / char_height;
+        gtk_border_free (padding);
 	vte_terminal_set_size(terminal, columns, rows);
 	return (vte_terminal_get_row_count (terminal) == rows) &&
 	       (vte_terminal_get_column_count (terminal) == columns);
diff --git a/src/vteapp.c b/src/vteapp.c
index f02da5d..c7cf557 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -69,7 +69,7 @@ char_size_changed(GtkWidget *widget, guint width, guint height, gpointer data)
 	VteTerminal *terminal;
 	GtkWindow *window;
 	GdkGeometry geometry;
-	GtkBorder *inner_border;
+	GtkBorder *padding;
 
 	g_assert(GTK_IS_WINDOW(data));
 	g_assert(VTE_IS_TERMINAL(widget));
@@ -79,14 +79,14 @@ char_size_changed(GtkWidget *widget, guint width, guint height, gpointer data)
 	if (!gtk_widget_get_realized (GTK_WIDGET (window)))
 		return;
 
-	gtk_widget_style_get (widget, "inner-border", &inner_border, NULL);
+	gtk_widget_style_get (widget, "inner-border", &padding, NULL);
 	geometry.width_inc = width;
 	geometry.height_inc = height;
-	geometry.base_width = inner_border ? (inner_border->left + inner_border->right) : 0;
-	geometry.base_height = inner_border ? (inner_border->top + inner_border->bottom) : 0;
+	geometry.base_width = padding ? (padding->left + padding->right) : 0;
+	geometry.base_height = padding ? (padding->top + padding->bottom) : 0;
 	geometry.min_width = geometry.base_width + width * 2;
 	geometry.min_height = geometry.base_height + height * 2;
-	gtk_border_free (inner_border);
+	gtk_border_free (padding);
 
 	gtk_window_set_geometry_hints(window, widget, &geometry,
 				      GDK_HINT_RESIZE_INC |
@@ -101,7 +101,7 @@ char_size_realized(GtkWidget *widget, gpointer data)
 	GtkWindow *window;
 	GdkGeometry geometry;
 	guint width, height;
-	GtkBorder *inner_border;
+	GtkBorder *padding;
 
 	g_assert(GTK_IS_WINDOW(data));
 	g_assert(VTE_IS_TERMINAL(widget));
@@ -111,16 +111,16 @@ char_size_realized(GtkWidget *widget, gpointer data)
 	if (!gtk_widget_get_realized (GTK_WIDGET(window)))
 		return;
 
-	gtk_widget_style_get (widget, "inner-border", &inner_border, NULL);
+	gtk_widget_style_get (widget, "inner-border", &padding, NULL);
 	width = vte_terminal_get_char_width (terminal);
 	height = vte_terminal_get_char_height (terminal);
 	geometry.width_inc = width;
 	geometry.height_inc = height;
-	geometry.base_width = inner_border ? (inner_border->left + inner_border->right) : 0;
-	geometry.base_height = inner_border ? (inner_border->top + inner_border->bottom) : 0;
+	geometry.base_width = padding ? (padding->left + padding->right) : 0;
+	geometry.base_height = padding ? (padding->top + padding->bottom) : 0;
 	geometry.min_width = geometry.base_width + width * 2;
 	geometry.min_height = geometry.base_height + height * 2;
-	gtk_border_free (inner_border);
+	gtk_border_free (padding);
 
 	gtk_window_set_geometry_hints(window, widget, &geometry,
 				      GDK_HINT_RESIZE_INC |
@@ -186,21 +186,21 @@ button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer data)
 	VteTerminal *terminal;
 	char *match;
 	int tag;
-	GtkBorder *inner_border;
+	GtkBorder *padding;
 	int char_width, char_height;
 
 	switch (event->button) {
 	case 3:
 		terminal = VTE_TERMINAL(widget);
 
-		gtk_widget_style_get (widget, "inner-border", &inner_border, NULL);
+		gtk_widget_style_get (widget, "inner-border", &padding, NULL);
 		char_width = vte_terminal_get_char_width (terminal);
 		char_height = vte_terminal_get_char_height (terminal);
 		match = vte_terminal_match_check(terminal,
-						 (event->x - (inner_border ? inner_border->left : 0)) / char_width,
-						 (event->y - (inner_border ? inner_border->top : 0)) / char_height,
+						 (event->x - (padding ? padding->left : 0)) / char_width,
+						 (event->y - (padding ? padding->top : 0)) / char_height,
 						 &tag);
-		gtk_border_free (inner_border);
+		gtk_border_free (padding);
 		if (match != NULL) {
 			g_print("Matched `%s' (%d).\n", match, tag);
 			g_free(match);
@@ -307,7 +307,7 @@ resize_window(GtkWidget *widget, guint width, guint height, gpointer data)
 
 	if ((GTK_IS_WINDOW(data)) && (width >= 2) && (height >= 2)) {
 		gint owidth, oheight, char_width, char_height, column_count, row_count;
-		GtkBorder *inner_border;
+		GtkBorder *padding;
 
 		terminal = VTE_TERMINAL(widget);
 
@@ -318,17 +318,17 @@ resize_window(GtkWidget *widget, guint width, guint height, gpointer data)
 		char_height = vte_terminal_get_char_height (terminal);
 		column_count = vte_terminal_get_column_count (terminal);
 		row_count = vte_terminal_get_row_count (terminal);
-		gtk_widget_style_get (widget, "inner-border", &inner_border, NULL);
+		gtk_widget_style_get (widget, "inner-border", &padding, NULL);
 
 		owidth -= char_width * column_count;
 		oheight -= char_height * row_count;
-		if (inner_border != NULL) {
-			owidth -= inner_border->left + inner_border->right;
-			oheight -= inner_border->top + inner_border->bottom;
+		if (padding != NULL) {
+			owidth -= padding->left + padding->right;
+			oheight -= padding->top + padding->bottom;
 		}
 		gtk_window_resize(GTK_WINDOW(data),
 				  width + owidth, height + oheight);
-		gtk_border_free (inner_border);
+		gtk_border_free (padding);
 	}
 }
 
diff --git a/src/vteseq.c b/src/vteseq.c
index 67e8191..9ecad2c 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -808,12 +808,12 @@ vte_sequence_handler_decset_internal(VteTerminal *terminal,
 		vte_terminal_emit_resize_window(terminal,
 						(set ? 132 : 80) *
 						terminal->pvt->char_width +
-						terminal->pvt->inner_border.left +
-                                                terminal->pvt->inner_border.right,
+						terminal->pvt->padding.left +
+                                                terminal->pvt->padding.right,
 						terminal->pvt->row_count *
 						terminal->pvt->char_height +
-						terminal->pvt->inner_border.top +
-                                                terminal->pvt->inner_border.bottom);
+						terminal->pvt->padding.top +
+                                                terminal->pvt->padding.bottom);
 		/* Request a resize and redraw. */
 		_vte_invalidate_all(terminal);
 		break;
@@ -3087,11 +3087,11 @@ vte_sequence_handler_window_manipulation (VteTerminal *terminal, GValueArray *pa
 						arg2, arg1);
 				vte_terminal_emit_resize_window(terminal,
 								arg2 +
-								terminal->pvt->inner_border.left +
-								terminal->pvt->inner_border.right,
+								terminal->pvt->padding.left +
+								terminal->pvt->padding.right,
 								arg1 +
-								terminal->pvt->inner_border.top +
-								terminal->pvt->inner_border.bottom);
+								terminal->pvt->padding.top +
+								terminal->pvt->padding.bottom);
 				i += 2;
 			}
 			break;
@@ -3117,11 +3117,11 @@ vte_sequence_handler_window_manipulation (VteTerminal *terminal, GValueArray *pa
 						arg2, arg1);
 				vte_terminal_emit_resize_window(terminal,
 								arg2 * terminal->pvt->char_width +
-								terminal->pvt->inner_border.left +
-								terminal->pvt->inner_border.right,
+								terminal->pvt->padding.left +
+								terminal->pvt->padding.right,
 								arg1 * terminal->pvt->char_height +
-								terminal->pvt->inner_border.top +
-								terminal->pvt->inner_border.bottom);
+								terminal->pvt->padding.top +
+								terminal->pvt->padding.bottom);
 				i += 2;
 			}
 			break;
@@ -3159,8 +3159,8 @@ vte_sequence_handler_window_manipulation (VteTerminal *terminal, GValueArray *pa
 					      &width, &height);
 			g_snprintf(buf, sizeof(buf),
 				   _VTE_CAP_CSI "3;%d;%dt",
-				   width + terminal->pvt->inner_border.left,
-                                   height + terminal->pvt->inner_border.top);
+				   width + terminal->pvt->padding.left,
+                                   height + terminal->pvt->padding.top);
 			_vte_debug_print(VTE_DEBUG_PARSE,
 					"Reporting window location"
 					"(%d++,%d++).\n",
@@ -3173,16 +3173,16 @@ vte_sequence_handler_window_manipulation (VteTerminal *terminal, GValueArray *pa
 			g_snprintf(buf, sizeof(buf),
 				   _VTE_CAP_CSI "4;%d;%dt",
 				   allocation.height -
-                                       (terminal->pvt->inner_border.top +
-                                        terminal->pvt->inner_border.bottom),
+                                       (terminal->pvt->padding.top +
+                                        terminal->pvt->padding.bottom),
 				   allocation.width -
-                                       (terminal->pvt->inner_border.left +
-                                        terminal->pvt->inner_border.right));
+                                       (terminal->pvt->padding.left +
+                                        terminal->pvt->padding.right));
 			_vte_debug_print(VTE_DEBUG_PARSE,
 					"Reporting window size "
 					"(%dx%dn",
-					width - (terminal->pvt->inner_border.left + terminal->pvt->inner_border.right),
-					height - (terminal->pvt->inner_border.top + terminal->pvt->inner_border.bottom));
+					width - (terminal->pvt->padding.left + terminal->pvt->padding.right),
+					height - (terminal->pvt->padding.top + terminal->pvt->padding.bottom));
 			vte_terminal_feed_child(terminal, buf, -1);
 			break;
 		case 18:
@@ -3242,11 +3242,11 @@ vte_sequence_handler_window_manipulation (VteTerminal *terminal, GValueArray *pa
 				 * rows. */
 				vte_terminal_emit_resize_window(terminal,
 								terminal->pvt->column_count * terminal->pvt->char_width +
-                                                                terminal->pvt->inner_border.left +
-                                                                terminal->pvt->inner_border.right,
+                                                                terminal->pvt->padding.left +
+                                                                terminal->pvt->padding.right,
 								param * terminal->pvt->char_height +
-								terminal->pvt->inner_border.top +
-                                                                terminal->pvt->inner_border.bottom);
+								terminal->pvt->padding.top +
+                                                                terminal->pvt->padding.bottom);
 			}
 			break;
 		}



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