Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
FIX: Refreshing the UI interferred with address entry.
Browse files Browse the repository at this point in the history
By refreshing UI I mean synching WebKit state to the toolbar.
  • Loading branch information
alcinnz committed Jul 31, 2017
1 parent bd005bb commit 677f230
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/BrowserWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class Odysseus.BrowserWindow : Gtk.ApplicationWindow {
// Even if the event handlers don't keep us up-to-date successfully.
Timeout.add_seconds(1, () => {
disconnect_webview();
connect_webview((Odysseus.WebTab) tabs.current);
connect_webview((Odysseus.WebTab) tabs.current, false);
return true;
}, Priority.DEFAULT_IDLE);
}
Expand Down Expand Up @@ -321,7 +321,7 @@ public class Odysseus.BrowserWindow : Gtk.ApplicationWindow {
});
}

private void connect_webview(WebTab tab) {
private void connect_webview(WebTab tab, bool full=true) {
var hs = web_event_handlers;

hs.add(web.load_changed.connect ((load_event) => {
Expand Down Expand Up @@ -362,7 +362,7 @@ public class Odysseus.BrowserWindow : Gtk.ApplicationWindow {
reload_stop.set_visible_child(web.is_loading ? stop : reload);
addressbar.progress_fraction = web.estimated_load_progress == 1.0 ?
0.0 : web.estimated_load_progress;
addressbar.text = web.uri;
if (full) addressbar.text = web.uri;
this.title = web.title;
if (web.get_favicon() != null) {
var fav = surface_to_pixbuf(web.get_favicon());
Expand Down

0 comments on commit 677f230

Please sign in to comment.