From: Enno Boland (tox) Date: Mon, 7 Sep 2009 09:02:26 +0000 (+0200) Subject: moving color definitions to config.h X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=03f0a3baf5a844dc44aa5c145f1dd5d12c56ad07;p=surf.git moving color definitions to config.h --- diff --git a/config.h b/config.h index 151bbf4..fde3592 100644 --- a/config.h +++ b/config.h @@ -1,4 +1,6 @@ /* modifier 0 means no modifier */ +static GdkColor progress = { 65535,65535,0,0 }; +static GdkColor progress_trust = { 65535,0,65535,0 }; static Key keys[] = { /* modifier keyval function arg Focus */ { 0, GDK_Escape, hidesearch, {0}, ALWAYS }, @@ -25,3 +27,4 @@ static Key keys[] = { { GDK_CONTROL_MASK, GDK_h, navigate, {.i = -1}, BROWSER }, { 0, GDK_Escape, stop, {0}, BROWSER }, }; + diff --git a/surf.c b/surf.c index 729151f..9a67c04 100644 --- a/surf.c +++ b/surf.c @@ -180,8 +180,6 @@ drawindicator(Client *c) { GtkWidget *w; gint width; GdkGC *gc; - GdkColor red = { 65535,65535,0,0 }; - GdkColor green = { 65535,0,65535,0 }; gchar *uri; @@ -192,9 +190,9 @@ drawindicator(Client *c) { gc = gdk_gc_new(w->window); if(strstr(uri, "https://") == uri) - gdk_gc_set_rgb_fg_color(gc, &green); + gdk_gc_set_rgb_fg_color(gc, &progress_trust); else - gdk_gc_set_rgb_fg_color(gc, &red); + gdk_gc_set_rgb_fg_color(gc, &progress); gdk_draw_rectangle(w->window, w->style->bg_gc[GTK_WIDGET_STATE(w)], TRUE,