[vte/vte-next: 59/223] vteapp: Implement --border-width option



commit 899730546658f0e0a4efc14a1afa3bdca7275ead
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 56f94a3..f976a84 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]