[wiki] [sites] [surf][omnibar] Remove a warning about unused variable || clamiax

From: <git_AT_suckless.org>
Date: Sun, 11 Oct 2015 15:49:49 +0200

commit f6026c2d83d1a027978ae1eb8f2761e46048085b
Author: clamiax <smoppy_AT_gmail.com>
Date: Sun Oct 11 15:49:47 2015 +0200

    [surf][omnibar] Remove a warning about unused variable

diff --git a/surf.suckless.org/patches/surf-0.6-omnibar.diff b/surf.suckless.org/patches/surf-0.6-omnibar.diff
index c3913b3..374c8b8 100644
--- a/surf.suckless.org/patches/surf-0.6-omnibar.diff
+++ b/surf.suckless.org/patches/surf-0.6-omnibar.diff
_AT_@ -1,5 +1,5 @@
 diff --git a/config.def.h b/config.def.h
-index 1eb9566..37615a9 100644
+index 1eb9566..064ddb4 100644
 --- a/config.def.h
 +++ b/config.def.h
 _AT_@ -63,6 +63,18 @@ static Bool allowgeolocation = TRUE;
_AT_@ -8,13 +8,13 @@ index 1eb9566..37615a9 100644
  
 +#define ONLOAD(u) { \
 + .v = (char *[]){"/bin/sh", "-c", \
-+ "~/.surf/omnibar addhist \"$0\"", u, embed, NULL \
-+ } \
++ "~/.surf/omnibar load \"$0\" \"$1\"", u, winid, NULL \
++ } \
 +}
 +
 +#define GOTO { \
 + .v = (char *[]){"/bin/sh", "-c", \
-+ "~/.surf/omnibar goto $0 $1", winid, "_SURF_GO", NULL \
++ "~/.surf/omnibar goto \"$0\" \"$1\"", winid, "_SURF_GO", NULL \
 + } \
 +}
 +
_AT_@ -31,16 +31,20 @@ index 1eb9566..37615a9 100644
      { MODKEY, GDK_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
  
 diff --git a/surf.c b/surf.c
-index 02656ec..d7a907d 100644
+index 02656ec..86bb23e 100644
 --- a/surf.c
 +++ b/surf.c
-_AT_@ -733,6 +733,9 @@ loadstatuschange(WebKitWebView *view, GParamSpec *pspec, Client *c) {
- }
- break;
- case WEBKIT_LOAD_FINISHED:
-+ uri = geturi(c);
-+ Arg a = (Arg)ONLOAD((char *)uri);
-+ spawn(NULL, &a);
- c->progress = 100;
- updatetitle(c);
- if(diskcache) {
+_AT_@ -712,11 +712,11 @@ loadstatuschange(WebKitWebView *view, GParamSpec *pspec, Client *c) {
+ WebKitNetworkRequest *request;
+ WebKitWebSettings *set = webkit_web_view_get_settings(c->view);
+ SoupMessage *msg;
+- char *uri;
++ char *uri = geturi(c);
++ Arg arg = (Arg)ONLOAD((char *)uri);
+
+ switch(webkit_web_view_get_load_status (c->view)) {
+ case WEBKIT_LOAD_COMMITTED:
+- uri = geturi(c);
+ if(strstr(uri, "https://") == uri) {
+ frame = webkit_web_view_get_main_frame(c->view);
+ src = webkit_web_frame_get_data_source(frame);
Received on Sun Oct 11 2015 - 15:49:49 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 11 2015 - 16:00:13 CEST