shellDBus: Remove ShowMonitorLabels API

This API has been broken for quite some time now as the corresponding
mutter function meta_monitor_manager_get_monitor_for_output was removed.
If anyone tries to use it, we would just run into a backtrace.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/490
This commit is contained in:
Benjamin Berg 2019-04-11 19:37:15 +02:00 committed by Florian Müllner
parent a5c75ff58b
commit 862aaf341e
3 changed files with 1 additions and 32 deletions

View File

@ -9,9 +9,6 @@
<method name="ShowOSD"> <method name="ShowOSD">
<arg type="a{sv}" direction="in" name="params"/> <arg type="a{sv}" direction="in" name="params"/>
</method> </method>
<method name="ShowMonitorLabels">
<arg type="a{uv}" direction="in" name="params"/>
</method>
<method name="ShowMonitorLabels2"> <method name="ShowMonitorLabels2">
<arg type="a{sv}" direction="in" name="params"/> <arg type="a{sv}" direction="in" name="params"/>
</method> </method>

View File

@ -95,28 +95,6 @@ var OsdMonitorLabeler = class {
this._reset(); this._reset();
for (let id in params) {
let monitor = this._monitorManager.get_monitor_for_output(id);
if (monitor == -1)
continue;
this._monitorLabels.get(monitor).push(params[id].deep_unpack());
}
// In mirrored display setups, more than one physical outputs
// might be showing the same logical monitor. In that case, we
// join each output's labels on the same OSD widget.
for (let [monitor, labels] of this._monitorLabels.entries()) {
labels.sort();
this._osdLabels.push(new OsdMonitorLabel(monitor, labels.join(' ')));
}
}
show2(client, params) {
if (!this._trackClient(client))
return;
this._reset();
for (let connector in params) { for (let connector in params) {
let monitor = this._monitorManager.get_monitor_for_connector(connector); let monitor = this._monitorManager.get_monitor_for_connector(connector);
if (monitor == -1) if (monitor == -1)

View File

@ -203,16 +203,10 @@ var GnomeShell = class {
this._grabbers.delete(name); this._grabbers.delete(name);
} }
ShowMonitorLabelsAsync(params, invocation) {
let sender = invocation.get_sender();
let [dict] = params;
Main.osdMonitorLabeler.show(sender, dict);
}
ShowMonitorLabels2Async(params, invocation) { ShowMonitorLabels2Async(params, invocation) {
let sender = invocation.get_sender(); let sender = invocation.get_sender();
let [dict] = params; let [dict] = params;
Main.osdMonitorLabeler.show2(sender, dict); Main.osdMonitorLabeler.show(sender, dict);
} }
HideMonitorLabelsAsync(params, invocation) { HideMonitorLabelsAsync(params, invocation) {