summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorportix <none@none>2012-06-19 02:49:42 +0200
committerportix <none@none>2012-06-19 02:49:42 +0200
commit98f5504a0acc6eecf44eb25ba9a69f55d69653db (patch)
tree083116378f553425a6eb92024a037988e2491f33 /src
parent8490d3d93c0e7711ec4dc5d680ce36f82ed90b91 (diff)
downloaddwb-98f5504a0acc6eecf44eb25ba9a69f55d69653db.zip
Check if title is NULL in dwb_update_layout before updating the tab-title
Diffstat (limited to 'src')
-rw-r--r--src/dwb.c3
-rw-r--r--src/plugins.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/dwb.c b/src/dwb.c
index fbf42724..9c6ca668 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -1985,7 +1985,8 @@ 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);
+ if (title != NULL)
+ dwb_tab_label_set_text(gl, title);
}
dwb_update_tabs();
}/*}}}*/
diff --git a/src/plugins.c b/src/plugins.c
index e4a0072e..d0c39d04 100644
--- a/src/plugins.c
+++ b/src/plugins.c
@@ -102,7 +102,7 @@ plugins_create_click_element(WebKitDOMElement *element, GList *gl) {
else
div = g_slist_nth_data(v->plugins->clicks, v->plugins->created);
webkit_dom_html_element_set_inner_html(WEBKIT_DOM_HTML_ELEMENT(div),
- "<div style='display:table-cell;vertical-align:middle;text-align:center;color:#fff;background-color:#000;font:11px monospace bold'>click to play</div>", NULL);
+ "<div style='display:table-cell;vertical-align:middle;text-align:center;color:#fff;background-color:#000;font:11px monospace bold'>click to enable</div>", NULL);
char *new_style = g_strdup_printf("position:%s;width:%s; height:%s; top: %s; left: %s;display:table;", position, width, height, top, left);
webkit_dom_element_set_attribute(div, "style", new_style, NULL);