[vte/vte-next] vteapp: Add --tint-color option



commit 8caed96d59267974af4f2ff1abc238948f49062a
Author: Christian Persch <chpe gnome org>
Date:   Tue May 3 02:33:43 2011 +0200

    vteapp: Add --tint-color option

 src/vteapp.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/vteapp.c b/src/vteapp.c
index 470a154..0671aee 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -563,6 +563,7 @@ main(int argc, char **argv)
 	const char *command = NULL;
 	const char *working_directory = NULL;
 	const char *output_file = NULL;
+        char *tint_color_string = NULL;
 	char *pty_flags_string = NULL;
 	char *cursor_blink_mode_string = NULL;
 	char *cursor_shape_string = NULL;
@@ -710,6 +711,11 @@ main(int argc, char **argv)
 			G_OPTION_ARG_STRING, &pty_flags_string,
 			"PTY flags set from default|no-utmp|no-wtmp|no-lastlog|no-helper|no-fallback", NULL
 		},
+                {
+                        "tint-color", 0, 0,
+                        G_OPTION_ARG_STRING, &tint_color_string,
+                        "Background tint color", "RGBA"
+                },
 		{ NULL }
 	};
 	GOptionContext *context;
@@ -765,7 +771,13 @@ main(int argc, char **argv)
 
 	highlight.red = highlight.green = highlight.blue = 0.75; highlight.alpha = 1.0;
 	cursor.red = 1.0; cursor.green = cursor.blue = 0.5; cursor.alpha = 1.0;
-	tint.red = tint.green = tint.blue = 0.; tint.alpha = .875;
+        tint.red = tint.green = tint.blue = 0.; tint.alpha = .875;
+
+        if (tint_color_string) {
+                if (!gdk_rgba_parse (&tint, tint_color_string))
+                        g_printerr ("Failed to parse tint color string\n");
+                g_free (tint_color_string);
+        }
 
 	gdk_window_set_debug_updates(debug);
 



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