Add shell_global_report_error()
Move the "system notification error" handling out of util.js, and add it to ShellGlobal so we can start calling it from across the codebase better (including C). https://bugzilla.gnome.org/show_bug.cgi?id=644402
This commit is contained in:
@ -6,7 +6,6 @@ const GLib = imports.gi.GLib;
|
||||
const Shell = imports.gi.Shell;
|
||||
|
||||
const Main = imports.ui.main;
|
||||
const MessageTray = imports.ui.messageTray;
|
||||
|
||||
const Gettext = imports.gettext.domain('gnome-shell');
|
||||
const _ = Gettext.gettext;
|
||||
@ -146,12 +145,7 @@ function trySpawnDesktop(id) {
|
||||
|
||||
function _handleSpawnError(command, err) {
|
||||
let title = _("Execution of '%s' failed:").format(command);
|
||||
|
||||
let source = new MessageTray.SystemNotificationSource();
|
||||
Main.messageTray.add(source);
|
||||
let notification = new MessageTray.Notification(source, title, err.message);
|
||||
notification.setTransient(true);
|
||||
source.notify(notification);
|
||||
Main.notifyProblem(title, err.message);
|
||||
}
|
||||
|
||||
// killall:
|
||||
|
Reference in New Issue
Block a user