diff options
author | portix <none@none> | 2012-11-19 02:06:09 +0100 |
---|---|---|
committer | portix <none@none> | 2012-11-19 02:06:09 +0100 |
commit | bd66e5045613123ee067f829185e3c15353470d3 (patch) | |
tree | 129e872c7b86e3f0b851b224a2f604e01f832354 /src | |
parent | a96bbee0345af08002cc601ca9058e1108d7c29b (diff) | |
parent | 71d31739420672a487e7ab32d21b407512b5562a (diff) | |
download | dwb-bd66e5045613123ee067f829185e3c15353470d3.zip |
Merging http://bitbucket.org/portix/dwb into default
Diffstat (limited to 'src')
-rw-r--r-- | src/dwb.c | 3 | ||||
-rw-r--r-- | src/dwb.h | 1 | ||||
-rw-r--r-- | src/html.c | 6 | ||||
-rw-r--r-- | src/view.c | 5 |
4 files changed, 10 insertions, 5 deletions
@@ -2886,7 +2886,8 @@ dwb_get_scripts() { continue; else if (g_file_test(path, G_FILE_TEST_IS_SYMLINK)) { realpath = g_file_read_link(path, &error); - if (realpath == NULL) { + if (realpath != NULL) { + g_free(path); fprintf(stderr, "Cannot read %s : %s\n", path, error->message); goto loop_end; } @@ -665,6 +665,7 @@ struct _View { GtkWidget *inspector_window; ViewStatus *status; Plugins *plugins; + WebKitWebSettings *settings; struct { WebKitDOMElement *element; WebKitDOMElement *anchor; @@ -255,7 +255,7 @@ html_keydown_cb(WebKitDOMElement *el, WebKitDOMEvent *ev, WebKitWebView *wv) { glong val = webkit_dom_ui_event_get_key_code(WEBKIT_DOM_UI_EVENT(ev)); if (val == 13) { WebKitDOMEventTarget *target = webkit_dom_event_get_target(ev); - if (target != NULL) { + if (target != NULL && WEBKIT_DOM_IS_ELEMENT(target)) { return html_key_changed(WEBKIT_DOM_ELEMENT(target)); } } @@ -327,8 +327,10 @@ html_key_changed(WebKitDOMElement *target) { char *value; if (WEBKIT_DOM_IS_HTML_TEXT_AREA_ELEMENT(target)) value = webkit_dom_html_text_area_element_get_value(WEBKIT_DOM_HTML_TEXT_AREA_ELEMENT(target)); - else + else if (WEBKIT_DOM_IS_HTML_INPUT_ELEMENT(target)) value = webkit_dom_html_input_element_get_value(WEBKIT_DOM_HTML_INPUT_ELEMENT(target)); + else + return false; char *id = webkit_dom_html_element_get_id(WEBKIT_DOM_HTML_ELEMENT(target)); if (g_strcmp0(id, "dwb_custom_keys_area")) { @@ -843,7 +843,8 @@ view_set_normal_style(GList *gl) { static void view_init_settings(GList *gl) { View *v = gl->data; - webkit_web_view_set_settings(WEBKIT_WEB_VIEW(v->web), webkit_web_settings_copy(dwb.state.web_settings)); + v->settings = webkit_web_settings_copy(dwb.state.web_settings); + webkit_web_view_set_settings(WEBKIT_WEB_VIEW(v->web), v->settings); GList *l; for (l = g_hash_table_get_values(dwb.settings); l; l=l->next) { WebSettings *s = l->data; @@ -1057,7 +1058,7 @@ view_clean(GList *gl) { g_object_unref(v->hover.element); g_object_unref(v->status_element); - + g_object_unref(v->settings); /* Destroy widget */ gtk_widget_destroy(v->web); gtk_widget_destroy(v->scroll); |