shellDBus: Avoid access to undefined properties
Don't rely on an implicit undefined value of unset parameters to shut up some warnings. https://bugzilla.gnome.org/show_bug.cgi?id=781471
This commit is contained in:
parent
a8b457b52e
commit
7db7b7dcbd
@ -142,15 +142,15 @@ const GnomeShell = new Lang.Class({
|
|||||||
for (let param in params)
|
for (let param in params)
|
||||||
params[param] = params[param].deep_unpack();
|
params[param] = params[param].deep_unpack();
|
||||||
|
|
||||||
let monitorIndex = -1;
|
let monitorIndex = params['monitor'] || -1;
|
||||||
if (params['monitor'] >= 0)
|
let label = params['label'] || undefined;
|
||||||
monitorIndex = params['monitor'];
|
let level = params['level'] || undefined;
|
||||||
|
|
||||||
let icon = null;
|
let icon = null;
|
||||||
if (params['icon'])
|
if (params['icon'])
|
||||||
icon = Gio.Icon.new_for_string(params['icon']);
|
icon = Gio.Icon.new_for_string(params['icon']);
|
||||||
|
|
||||||
Main.osdWindowManager.show(monitorIndex, icon, params['label'], params['level']);
|
Main.osdWindowManager.show(monitorIndex, icon, label, level);
|
||||||
},
|
},
|
||||||
|
|
||||||
FocusApp: function(id) {
|
FocusApp: function(id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user