Blame Remove_unused_applet_label.patch

714c848
From 87b1f2c2b24439c236c2ded873dedb4bdf33be8c Mon Sep 17 00:00:00 2001
714c848
From: =?UTF-8?q?Germ=C3=A1n=20Franco?= <dev.germanfr@gmail.com>
714c848
Date: Thu, 1 Feb 2018 12:13:38 +0100
714c848
Subject: [PATCH] Remove unused applet label (#53)
714c848
714c848
Inherit from IconApplet instead of TextIconApplet because the label
714c848
wasn't being used. It caused an issue where the label was taking up
714c848
space even when it was empty when using padding or margins on it.
714c848
---
714c848
 usr/share/cinnamon/applets/blueberry@cinnamon.org/applet.js | 13 ++-----------
714c848
 .../cinnamon/applets/blueberry@cinnamon.org/metadata.json   |  4 ++--
714c848
 2 files changed, 4 insertions(+), 13 deletions(-)
714c848
714c848
diff --git a/usr/share/cinnamon/applets/blueberry@cinnamon.org/applet.js b/usr/share/cinnamon/applets/blueberry@cinnamon.org/applet.js
714c848
index f4297be..62dc749 100644
714c848
--- a/usr/share/cinnamon/applets/blueberry@cinnamon.org/applet.js
714c848
+++ b/usr/share/cinnamon/applets/blueberry@cinnamon.org/applet.js
714c848
@@ -22,10 +22,10 @@ function MyApplet(metadata, orientation, panel_height, instance_id) {
714c848
 }
714c848
 
714c848
 MyApplet.prototype = {
714c848
-    __proto__: Applet.TextIconApplet.prototype,
714c848
+    __proto__: Applet.IconApplet.prototype,
714c848
 
714c848
     _init: function(metadata, orientation, panel_height, instance_id) {
714c848
-        Applet.TextIconApplet.prototype._init.call(this, orientation, panel_height, instance_id);
714c848
+        Applet.IconApplet.prototype._init.call(this, orientation, panel_height, instance_id);
714c848
 
714c848
         this.setAllowedLayout(Applet.AllowedLayout.BOTH);
714c848
 
714c848
@@ -51,8 +51,6 @@ MyApplet.prototype = {
714c848
             }));
714c848
             this.menu.addMenuItem(item);
714c848
 
714c848
-            this.on_orientation_changed(orientation);
714c848
-
714c848
             this._client = new GnomeBluetooth.Client();
714c848
             this._model = this._client.get_model();
714c848
             this._model.connect('row-changed', Lang.bind(this, this._sync));
714c848
@@ -73,13 +71,6 @@ MyApplet.prototype = {
714c848
         Main.systrayManager.unregisterId(this.metadata.uuid);
714c848
     },
714c848
 
714c848
-    on_orientation_changed: function(orientation) {
714c848
-        if (orientation == St.Side.LEFT || orientation == St.Side.RIGHT)
714c848
-            this.hide_applet_label(true);
714c848
-        else
714c848
-            this.hide_applet_label(false);
714c848
-    },
714c848
-
714c848
     _getDefaultAdapter: function() {
714c848
         let [ret, iter] = this._model.get_iter_first();
714c848
         while (ret) {
714c848
diff --git a/usr/share/cinnamon/applets/blueberry@cinnamon.org/metadata.json b/usr/share/cinnamon/applets/blueberry@cinnamon.org/metadata.json
714c848
index fd88334..8131d54 100644
714c848
--- a/usr/share/cinnamon/applets/blueberry@cinnamon.org/metadata.json
714c848
+++ b/usr/share/cinnamon/applets/blueberry@cinnamon.org/metadata.json
714c848
@@ -3,5 +3,5 @@
714c848
     "description": "Blueberry applet", 
714c848
     "uuid": "blueberry@cinnamon.org", 
714c848
     "name": "Bluetooth", 
714c848
-    "last-edited": "1355436562"
714c848
-}
714c848
\ No newline at end of file
714c848
+    "last-edited": "1517395944"
714c848
+}