+void
+drawindicator(Client *c) {
+ gint width;
+ gchar *uri;
+ GtkWidget *w;
+ GdkGC *gc;
+ GdkColor fg;
+
+ uri = geturi(c);
+ w = c->indicator;
+ width = c->progress * w->allocation.width / 100;
+ gc = gdk_gc_new(w->window);
+ 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, 0, 0, w->allocation.width, w->allocation.height);
+ gdk_draw_rectangle(w->window, gc, TRUE, 0, 0, width,
+ w->allocation.height);
+ g_object_unref(gc);
+}
+
+gboolean
+exposeindicator(GtkWidget *w, GdkEventExpose *e, Client *c) {
+ drawindicator(c);
+ return TRUE;
+}
+