X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=surf.c;h=17f7750cd16dd416205fb1a43078019e22b93b97;hb=3e972f8e2a170f15e76fae7dc4de656963deb89b;hp=1c999dd09097e15847b60926b03c88af843766d1;hpb=3c1ed5d56af13f09a81beb00c59464972c36b2f0;p=surf.git diff --git a/surf.c b/surf.c index 1c999dd..17f7750 100644 --- a/surf.c +++ b/surf.c @@ -52,12 +52,6 @@ typedef struct Client { gboolean zoomed, fullscreen, isinspecting, sslfailed; } Client; -typedef struct { - char *label; - void (*func)(Client *c, const Arg *arg); - const Arg arg; -} Item; - typedef struct { guint mod; guint keyval; @@ -84,7 +78,7 @@ static gboolean showxid = FALSE; static char winid[64]; static gboolean usingproxy = 0; static char togglestat[5]; -static char pagestat[2]; +static char pagestat[3]; static void beforerequest(WebKitWebView *w, WebKitWebFrame *f, WebKitWebResource *r, WebKitNetworkRequest *req, @@ -1064,8 +1058,17 @@ gettogglestat(Client *c){ static void getpagestat(Client *c) { - pagestat[0] = c->sslfailed ? 'U' : 'T'; + const char *uri = geturi(c); + + if(strstr(uri, "https://") == uri) { + pagestat[0] = c->sslfailed ? 'U' : 'T'; + } else { + pagestat[0] = '-'; + } + pagestat[1] = usingproxy ? 'P' : '-'; + pagestat[2] = '\0'; + } static void