Changeset 99201 in webkit
- Timestamp:
- Nov 3, 2011 9:13:49 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r99200 r99201 1 2011-11-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Show load progress information in MiniBrowser using WebKit2 GTK+ API 4 https://bugs.webkit.org/show_bug.cgi?id=71461 5 6 Reviewed by Martin Robinson. 7 8 * MiniBrowser/gtk/BrowserWindow.c: 9 (resetEntryProgress): Reset the entry progress after a while when 10 load has been completed. 11 (webViewLoadProgressChanged): Update location entry progress. 12 (browserWindowConstructed): Connect to WebView 13 notify::estimated-load-progress signal. 14 1 15 2011-11-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
trunk/Tools/MiniBrowser/gtk/BrowserWindow.c
r99200 r99201 73 73 } 74 74 75 static gboolean resetEntryProgress(GtkEntry *entry) 76 { 77 gtk_entry_set_progress_fraction(entry, 0); 78 return FALSE; 79 } 80 81 static void webViewLoadProgressChanged(WebKitWebView *webView, GParamSpec *pspec, BrowserWindow *window) 82 { 83 gdouble progress = webkit_web_view_get_estimated_load_progress(webView); 84 gtk_entry_set_progress_fraction(GTK_ENTRY(window->uriEntry), progress); 85 if (progress == 1.0) 86 g_timeout_add(500, (GSourceFunc)resetEntryProgress, window->uriEntry); 87 } 88 75 89 static void browserWindowFinalize(GObject *gObject) 76 90 { … … 160 174 161 175 g_signal_connect(window->webView, "notify::uri", G_CALLBACK(webViewURIChanged), window); 176 g_signal_connect(window->webView, "notify::estimated-load-progress", G_CALLBACK(webViewLoadProgressChanged), window); 162 177 163 178 gtk_box_pack_start(GTK_BOX(window->mainBox), GTK_WIDGET(window->webView), TRUE, TRUE, 0);
Note: See TracChangeset
for help on using the changeset viewer.