Introduction
Introduction Statistics Contact Development Disclaimer Help
tusing simple strings for colors in config.h - surf - customized build of surf,…
git clone git://src.adamsgaard.dk/surf
Log
Files
Refs
README
LICENSE
---
commit 4cbfddf15907c96b55ac3381c9a402260a96ce9f
parent 151d29c5c308831aad930c2598655ab8c4adc024
Author: Enno Boland (tox) <[email protected]>
Date: Mon, 7 Sep 2009 15:06:32 +0200
using simple strings for colors in config.h
Diffstat:
M config.def.h | 4 ++--
M surf.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/config.def.h b/config.def.h
t@@ -1,6 +1,6 @@
/* modifier 0 means no modifier */
-static GdkColor progress = { 65535,65535,0,0 };
-static GdkColor progress_trust = { 65535,0,65535,0 };
+static gchar *progress = "#FF0000";
+static gchar *progress_trust = "#00FF00";
#define MODKEY GDK_CONTROL_MASK
static Key keys[] = {
/* modifier keyval function arg …
diff --git a/surf.c b/surf.c
t@@ -181,6 +181,7 @@ drawindicator(Client *c) {
gint width;
GdkGC *gc;
gchar *uri;
+ GdkColor fg;
uri = geturi(c);
t@@ -189,10 +190,9 @@ drawindicator(Client *c) {
gc = gdk_gc_new(w->window);
- if(strstr(uri, "https://") == uri)
- gdk_gc_set_rgb_fg_color(gc, &progress_trust);
- else
- gdk_gc_set_rgb_fg_color(gc, &progress);
+ gdk_color_parse(strstr(uri, "https://") == uri ?
+ progress_trust : progress, &fg);
+ gdk_gc_set_rgb_fg_color(gc, &fg);
gdk_draw_rectangle(w->window,
w->style->bg_gc[GTK_WIDGET_STATE(w)],
TRUE,
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.