overview: make shellInfo private
This commit forwards the shellInfo setMessage method to the overview itself and makes shellInfo private. https://bugzilla.gnome.org/show_bug.cgi?id=657082
This commit is contained in:
parent
356e4c0967
commit
67ae8ed8e9
@ -86,7 +86,7 @@ AppFavorites.prototype = {
|
|||||||
|
|
||||||
let app = Shell.AppSystem.get_default().lookup_app(appId);
|
let app = Shell.AppSystem.get_default().lookup_app(appId);
|
||||||
|
|
||||||
Main.overview.shellInfo.setMessage(_("%s has been added to your favorites.").format(app.get_name()), Lang.bind(this, function () {
|
Main.overview.setMessage(_("%s has been added to your favorites.").format(app.get_name()), Lang.bind(this, function () {
|
||||||
this._removeFavorite(appId);
|
this._removeFavorite(appId);
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
@ -117,8 +117,8 @@ AppFavorites.prototype = {
|
|||||||
if (!this._removeFavorite(appId))
|
if (!this._removeFavorite(appId))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Main.overview.shellInfo.setMessage(_("%s has been removed from your favorites.").format(app.get_name()),
|
Main.overview.setMessage(_("%s has been removed from your favorites.").format(app.get_name()),
|
||||||
Lang.bind(this, function () {
|
Lang.bind(this, function () {
|
||||||
this._addFavorite(appId, pos);
|
this._addFavorite(appId, pos);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ Overview.prototype = {
|
|||||||
// signal handlers and so forth. So we create them after
|
// signal handlers and so forth. So we create them after
|
||||||
// construction in this init() method.
|
// construction in this init() method.
|
||||||
init: function() {
|
init: function() {
|
||||||
this.shellInfo = new ShellInfo();
|
this._shellInfo = new ShellInfo();
|
||||||
|
|
||||||
this._viewSelector = new ViewSelector.ViewSelector();
|
this._viewSelector = new ViewSelector.ViewSelector();
|
||||||
this._group.add_actor(this._viewSelector.actor);
|
this._group.add_actor(this._viewSelector.actor);
|
||||||
@ -211,6 +211,10 @@ Overview.prototype = {
|
|||||||
this._relayout();
|
this._relayout();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setMessage: function(text, undoCallback, undoLabel) {
|
||||||
|
this._shellInfo.setMessage(text, undoCallback, undoLabel);
|
||||||
|
},
|
||||||
|
|
||||||
_onDragBegin: function() {
|
_onDragBegin: function() {
|
||||||
DND.addDragMonitor(this._dragMonitor);
|
DND.addDragMonitor(this._dragMonitor);
|
||||||
// Remember the workspace we started from
|
// Remember the workspace we started from
|
||||||
|
@ -118,9 +118,9 @@ PlaceDeviceInfo.prototype = {
|
|||||||
this._mount.unmount_finish(res);
|
this._mount.unmount_finish(res);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
let message = _("Failed to unmount '%s'").format(o.get_name());
|
let message = _("Failed to unmount '%s'").format(o.get_name());
|
||||||
Main.overview.shellInfo.setMessage(message,
|
Main.overview.setMessage(message,
|
||||||
Lang.bind(this, this.remove),
|
Lang.bind(this, this.remove),
|
||||||
_("Retry"));
|
_("Retry"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user