[vte/vte-next] vteapp: Implement --border-width option
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next] vteapp: Implement --border-width option
- Date: Tue, 3 May 2011 18:13:27 +0000 (UTC)
commit 9a9755ae5cda74192dd70234c8b796616019452d
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 24a86ab..ed0d5b1 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -568,6 +568,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[]={
{
@@ -716,6 +717,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;
@@ -786,6 +792,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]