diff options
author | Marco Peereboom <marco@conformal.com> | 2010-02-12 03:58:27 +0000 |
---|---|---|
committer | Marco Peereboom <marco@conformal.com> | 2010-02-12 03:58:27 +0000 |
commit | 745bba72bc432cc5985e4c211be42b96830574ad (patch) | |
tree | 7d3f3287879bc4fe5b331c2fb24c5f7630db35b9 | |
parent | 9ba6f7584643f32b056a8ac7d9b08f54e8b85618 (diff) | |
download | xombrero-745bba72bc432cc5985e4c211be42b96830574ad.tar.gz |
when there is no title use link for tab label
-rw-r--r-- | xxxterm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xxxterm.c b/xxxterm.c index 4bdee5c..b33b0fd 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -313,8 +313,12 @@ notify_load_status_cb(WebKitWebView* wview, GParamSpec* pspec, struct tab *t) t->focus_wv = 1; break; case WEBKIT_LOAD_FIRST_VISUALLY_NON_EMPTY_LAYOUT: - gtk_label_set_text(GTK_LABEL(t->label), - webkit_web_view_get_title(wview)); + uri = webkit_web_view_get_title(wview); + if (uri == NULL) { + frame = webkit_web_view_get_main_frame(wview); + uri = webkit_web_frame_get_uri(frame); + } + gtk_label_set_text(GTK_LABEL(t->label), uri); break; case WEBKIT_LOAD_PROVISIONAL: case WEBKIT_LOAD_FINISHED: |