From 636103f4496a8005ebaaf3aa10eb3ef95be8e2b6 Mon Sep 17 00:00:00 2001 From: portix Date: Fri, 26 Oct 2012 21:43:31 +0200 Subject: Indicator for quick/bookmarks --- src/dwb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/dwb.c') diff --git a/src/dwb.c b/src/dwb.c index 704cd1d8..2eb3e735 100644 --- a/src/dwb.c +++ b/src/dwb.c @@ -660,6 +660,19 @@ dwb_update_status_text(GList *gl, GtkAdjustment *a) { g_string_append_c(string, 'u'); g_string_append(string, "]"); } + if (webkit_web_view_get_load_status(WEBVIEW(gl)) == WEBKIT_LOAD_FINISHED) { + const char *uri = webkit_web_view_get_uri(WEBVIEW(gl)); + gboolean has_quickmark = g_list_find_custom(dwb.fc.quickmarks, uri, (GCompareFunc)util_quickmark_compare_uri) != NULL; + gboolean has_bookmark = g_list_find_custom(dwb.fc.bookmarks, uri, (GCompareFunc)util_navigation_compare_uri) != NULL; + if (has_quickmark || has_bookmark) { + g_string_append_c(string, '['); + if (has_quickmark) + g_string_append_c(string, 'Q'); + if (has_bookmark) + g_string_append_c(string, 'B'); + g_string_append_c(string, ']'); + } + } if (v->status->progress != 0) { wchar_t *bar_blocks = PROGRESS_DEFAULT; wchar_t buffer[PBAR_LENGTH + 1] = { 0 }; -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0