[gnome-shell/benzea/remove-show-monitor-labels: 4/4] shellDBus: Remove ShowMonitorLabels API



commit 862aaf341ee3e808d5489a42b91b7aee092e2947
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Apr 11 19:37:15 2019 +0200

    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

 data/dbus-interfaces/org.gnome.Shell.xml |  3 ---
 js/ui/osdMonitorLabeler.js               | 22 ----------------------
 js/ui/shellDBus.js                       |  8 +-------
 3 files changed, 1 insertion(+), 32 deletions(-)
---
diff --git a/data/dbus-interfaces/org.gnome.Shell.xml b/data/dbus-interfaces/org.gnome.Shell.xml
index 1fef302b3..094c29444 100644
--- a/data/dbus-interfaces/org.gnome.Shell.xml
+++ b/data/dbus-interfaces/org.gnome.Shell.xml
@@ -9,9 +9,6 @@
     <method name="ShowOSD">
       <arg type="a{sv}" direction="in" name="params"/>
     </method>
-    <method name="ShowMonitorLabels">
-      <arg type="a{uv}" direction="in" name="params"/>
-    </method>
     <method name="ShowMonitorLabels2">
       <arg type="a{sv}" direction="in" name="params"/>
     </method>
diff --git a/js/ui/osdMonitorLabeler.js b/js/ui/osdMonitorLabeler.js
index 55b4d3c21..62feacede 100644
--- a/js/ui/osdMonitorLabeler.js
+++ b/js/ui/osdMonitorLabeler.js
@@ -95,28 +95,6 @@ var OsdMonitorLabeler = class {
 
         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) {
             let monitor = this._monitorManager.get_monitor_for_connector(connector);
             if (monitor == -1)
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index 469a6c706..b1f2be2b3 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -203,16 +203,10 @@ var GnomeShell = class {
         this._grabbers.delete(name);
     }
 
-    ShowMonitorLabelsAsync(params, invocation) {
-        let sender = invocation.get_sender();
-        let [dict] = params;
-        Main.osdMonitorLabeler.show(sender, dict);
-    }
-
     ShowMonitorLabels2Async(params, invocation) {
         let sender = invocation.get_sender();
         let [dict] = params;
-        Main.osdMonitorLabeler.show2(sender, dict);
+        Main.osdMonitorLabeler.show(sender, dict);
     }
 
     HideMonitorLabelsAsync(params, invocation) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]