notfication if external request; removed spinner while navigation within a website
This commit is contained in:
parent
7af2396301
commit
2ac4804bf7
1 changed files with 10 additions and 5 deletions
|
@ -36,6 +36,7 @@ namespace Webpin {
|
||||||
private DesktopFile file;
|
private DesktopFile file;
|
||||||
private WebKit.CookieManager cookie_manager;
|
private WebKit.CookieManager cookie_manager;
|
||||||
private Gtk.Box container; //the spinner container
|
private Gtk.Box container; //the spinner container
|
||||||
|
Granite.Widgets.Toast app_notification;
|
||||||
|
|
||||||
public signal void external_request (WebKit.NavigationAction action);
|
public signal void external_request (WebKit.NavigationAction action);
|
||||||
public signal void theme_color_changed(string color);
|
public signal void theme_color_changed(string color);
|
||||||
|
@ -78,15 +79,21 @@ namespace Webpin {
|
||||||
container.valign = Gtk.Align.FILL;
|
container.valign = Gtk.Align.FILL;
|
||||||
container.pack_start(spinner, true, true, 0);
|
container.pack_start(spinner, true, true, 0);
|
||||||
|
|
||||||
|
app_notification = new Granite.Widgets.Toast ("");
|
||||||
|
|
||||||
//overlay trick to make snapshot work even with the spinner
|
//overlay trick to make snapshot work even with the spinner
|
||||||
var overlay = new Gtk.Overlay ();
|
var overlay = new Gtk.Overlay ();
|
||||||
overlay.add (app_view);
|
overlay.add (app_view);
|
||||||
overlay.add_overlay (container);
|
overlay.add_overlay (container);
|
||||||
|
overlay.add_overlay (app_notification);
|
||||||
|
|
||||||
add (overlay);
|
add (overlay);
|
||||||
|
|
||||||
app_view.create.connect ((action) => {
|
app_view.create.connect ((action) => {
|
||||||
print("external request");
|
print("external request");
|
||||||
|
app_notification.title = _("Open request in an external application…");
|
||||||
|
app_notification.send_notification ();
|
||||||
|
|
||||||
external_request (action);
|
external_request (action);
|
||||||
return new WebKit.WebView ();
|
return new WebKit.WebView ();
|
||||||
});
|
});
|
||||||
|
@ -114,8 +121,6 @@ namespace Webpin {
|
||||||
if (load_event == WebKit.LoadEvent.FINISHED) {
|
if (load_event == WebKit.LoadEvent.FINISHED) {
|
||||||
debug ("determine color");
|
debug ("determine color");
|
||||||
determine_theme_color.begin();
|
determine_theme_color.begin();
|
||||||
} else {
|
|
||||||
container.set_visible(true);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue