pinosaur
/
surf.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
151d29c
)
using simple strings for colors in config.h
author
Enno Boland (tox)
<tox@s01.de>
Mon, 7 Sep 2009 13:06:32 +0000
(15:06 +0200)
committer
Enno Boland (tox)
<tox@s01.de>
Mon, 7 Sep 2009 13:06:32 +0000
(15:06 +0200)
config.def.h
patch
|
blob
|
history
surf.c
patch
|
blob
|
history
diff --git
a/config.def.h
b/config.def.h
index
d0354a5
..
e9e811a
100644
(file)
--- a/
config.def.h
+++ b/
config.def.h
@@
-1,6
+1,6
@@
/* modifier 0 means no modifier */
/* 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 Focus */
#define MODKEY GDK_CONTROL_MASK
static Key keys[] = {
/* modifier keyval function arg Focus */
diff --git
a/surf.c
b/surf.c
index
3520684
..
c6cb824
100644
(file)
--- a/
surf.c
+++ b/
surf.c
@@
-181,6
+181,7
@@
drawindicator(Client *c) {
gint width;
GdkGC *gc;
gchar *uri;
gint width;
GdkGC *gc;
gchar *uri;
+ GdkColor fg;
uri = geturi(c);
uri = geturi(c);
@@
-189,10
+190,9
@@
drawindicator(Client *c) {
gc = gdk_gc_new(w->window);
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,
gdk_draw_rectangle(w->window,
w->style->bg_gc[GTK_WIDGET_STATE(w)],
TRUE,