[vte/vte-next: 58/114] vteapp: Implement --border-width option



commit 5bd66535285ef2d5c898bacbe8881a6168d984d1
Author: Christian Persch <chpe gnome org>
Date:   Tue May 3 19:33:30 2011 +0200

    vteapp: Implement --border-width option
    
    This is to test the condition that the terminal isn't at (0,0) in its
    containing widget.

 src/vteapp.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/vteapp.c b/src/vteapp.c
index 016da6d..f02da5d 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -573,6 +573,7 @@ main(int argc, char **argv)
 	char *cursor_blink_mode_string = NULL;
 	char *cursor_shape_string = NULL;
 	char *scrollbar_policy_string = NULL;
+        char *border_width_string = NULL;
 	GdkRGBA fore, back, highlight, cursor, tint;
 	const GOptionEntry options[]={
 		{
@@ -721,6 +722,11 @@ main(int argc, char **argv)
                         G_OPTION_ARG_STRING, &tint_color_string,
                         "Background tint color", "RGBA"
                 },
+                {
+                        "border-width", 0, 0,
+                        G_OPTION_ARG_STRING, &border_width_string,
+                        "Border with", "WIDTH"
+                },
 		{ NULL }
 	};
 	GOptionContext *context;
@@ -791,6 +797,13 @@ main(int argc, char **argv)
 	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 	gtk_container_set_resize_mode(GTK_CONTAINER(window),
 				      GTK_RESIZE_IMMEDIATE);
+        if (border_width_string) {
+                guint w;
+
+                w = g_ascii_strtoull (border_width_string, NULL, 10);
+                gtk_container_set_border_width(GTK_CONTAINER(window), w);
+                g_free (border_width_string);
+        }
 
 	/* Set ARGB visual */
 	screen = gtk_widget_get_screen (window);



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