portalHelper: Remove pointless destroyWindow() method
Years ago, the function used to clean up the cache when the window was closed. But now that an ephemeral data manager is used, nothing is cached anymore and the function is left as a mere wrapper around this.destroy(). Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2690>
This commit is contained in:
parent
65ec7b3fa8
commit
a1f8f2efa1
@ -116,7 +116,6 @@ class PortalWindow extends Gtk.ApplicationWindow {
|
|||||||
_init(application, url, timestamp, doneCallback) {
|
_init(application, url, timestamp, doneCallback) {
|
||||||
super._init({ application });
|
super._init({ application });
|
||||||
|
|
||||||
this.connect('delete-event', this.destroyWindow.bind(this));
|
|
||||||
this._headerBar = new PortalHeaderBar();
|
this._headerBar = new PortalHeaderBar();
|
||||||
this._headerBar.setSecurityIcon(PortalHelperSecurityLevel.NOT_YET_DETERMINED);
|
this._headerBar.setSecurityIcon(PortalHelperSecurityLevel.NOT_YET_DETERMINED);
|
||||||
this.set_titlebar(this._headerBar);
|
this.set_titlebar(this._headerBar);
|
||||||
@ -161,10 +160,6 @@ class PortalWindow extends Gtk.ApplicationWindow {
|
|||||||
this.application.set_accels_for_action('app.quit', ['<Primary>q', '<Primary>w']);
|
this.application.set_accels_for_action('app.quit', ['<Primary>q', '<Primary>w']);
|
||||||
}
|
}
|
||||||
|
|
||||||
destroyWindow() {
|
|
||||||
this.destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
_syncUri() {
|
_syncUri() {
|
||||||
let uri = this._webView.uri;
|
let uri = this._webView.uri;
|
||||||
if (uri)
|
if (uri)
|
||||||
@ -293,7 +288,7 @@ class WebPortalHelper extends Gtk.Application {
|
|||||||
this._queue = [];
|
this._queue = [];
|
||||||
|
|
||||||
let action = new Gio.SimpleAction({ name: 'quit' });
|
let action = new Gio.SimpleAction({ name: 'quit' });
|
||||||
action.connect('activate', () => this.active_window.destroyWindow());
|
action.connect('activate', () => this.active_window.destroy());
|
||||||
this.add_action(action);
|
this.add_action(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,7 +321,7 @@ class WebPortalHelper extends Gtk.Application {
|
|||||||
|
|
||||||
if (obj.connection == connection) {
|
if (obj.connection == connection) {
|
||||||
if (obj.window)
|
if (obj.window)
|
||||||
obj.window.destroyWindow();
|
obj.window.destroy();
|
||||||
this._queue.splice(i, 1);
|
this._queue.splice(i, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user