summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.mk1
-rw-r--r--src/commands.c9
-rw-r--r--src/dwb.c9
-rw-r--r--src/dwb.h1
-rw-r--r--src/util.c2
-rw-r--r--src/view.c3
6 files changed, 14 insertions, 11 deletions
diff --git a/config.mk b/config.mk
index 9e0d86f2..65af7f4c 100644
--- a/config.mk
+++ b/config.mk
@@ -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);
diff --git a/src/dwb.c b/src/dwb.c
index bb20782d..809a311e 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -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
diff --git a/src/dwb.h b/src/dwb.h
index 610d7b8b..3480174a 100644
--- a/src/dwb.h
+++ b/src/dwb.h
@@ -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
diff --git a/src/util.c b/src/util.c
index 71d5fad2..9410e0c9 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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') {
diff --git a/src/view.c b/src/view.c
index 838e80f2..097f6543 100644
--- a/src/view.c
+++ b/src/view.c
@@ -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);
}