diff options
-rw-r--r-- | config.mk | 1 | ||||
-rw-r--r-- | src/commands.c | 9 | ||||
-rw-r--r-- | src/dwb.c | 9 | ||||
-rw-r--r-- | src/dwb.h | 1 | ||||
-rw-r--r-- | src/util.c | 2 | ||||
-rw-r--r-- | src/view.c | 3 |
6 files changed, 14 insertions, 11 deletions
@@ -97,6 +97,7 @@ PLUGIN_FILE=pluginblocker.asc # CFLAGS CFLAGS += -Wall CFLAGS += -pipe +CFLAGS += -pedantic CFLAGS += $(shell pkg-config --cflags $(LIBS)) CFLAGS += --ansi CFLAGS += -std=c99 diff --git a/src/commands.c b/src/commands.c index e12ddb3d..cbee951f 100644 --- a/src/commands.c +++ b/src/commands.c @@ -857,15 +857,6 @@ commands_presentation_mode(KeyMap *km, Arg *arg) { commands_toggle_bars(km, arg); return STATUS_OK; } -#if 0 -DwbStatus -commands_toggle_protected(KeyMap *km, Arg *arg) { - GList *gl = dwb.state.nummod < 0 ? dwb.state.fview : g_list_nth(dwb.state.views, dwb.state.nummod-1); - VIEW(gl)->status->protect = !VIEW(gl)->status->protect; - dwb_tab_label_set_text(gl, NULL); - return STATUS_OK; -} -#endif DwbStatus commands_toggle_lock_protect(KeyMap *km, Arg *arg) { GList *gl = dwb.state.nummod < 0 ? dwb.state.fview : g_list_nth(dwb.state.views, dwb.state.nummod-1); @@ -1588,6 +1588,15 @@ dwb_update_status(GList *gl) { FREE(filename); }/*}}}*/ +/* dwb_update_layout(GList *gl) {{{*/ +void +dwb_update_layout() { + for (GList *gl = dwb.state.views; gl; gl = gl->next) { + View *v = gl->data; + const char *title = webkit_web_view_get_title(WEBKIT_WEB_VIEW(v->web)); + dwb_tab_label_set_text(gl, title); + } +}/*}}}*/ /* dwb_focus(GList *gl) {{{*/ void @@ -806,5 +806,6 @@ void dwb_set_adblock(GList *, WebSettings *); gboolean dwb_eval_key(GdkEventKey *); void dwb_follow_selection(void); +void dwb_update_layout(void); #endif @@ -490,7 +490,7 @@ dwb_navigation_new_from_line(const char *text) { Navigation *nv = NULL; if (text == NULL) return NULL; - while (g_ascii_isspace(*text)) + while (isspace((int)*text)) text++; if (*text != '\0') { @@ -853,6 +853,7 @@ view_remove(GList *gl) { gl = NULL; gtk_widget_show(CURRENT_VIEW()->scroll); + dwb_update_layout(); CLEAR_COMMAND_TEXT(); }/*}}}*/ @@ -923,7 +924,7 @@ view_add(const char *uri, gboolean background) { adblock_connect(ret); #endif - //dwb_update_layout(background); + dwb_update_layout(); if (uri != NULL) { dwb_load_uri(ret, uri); } |