Blob Blame History Raw
From 87b1f2c2b24439c236c2ded873dedb4bdf33be8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Germ=C3=A1n=20Franco?= <dev.germanfr@gmail.com>
Date: Thu, 1 Feb 2018 12:13:38 +0100
Subject: [PATCH] Remove unused applet label (#53)

Inherit from IconApplet instead of TextIconApplet because the label
wasn't being used. It caused an issue where the label was taking up
space even when it was empty when using padding or margins on it.
---
 usr/share/cinnamon/applets/blueberry@cinnamon.org/applet.js | 13 ++-----------
 .../cinnamon/applets/blueberry@cinnamon.org/metadata.json   |  4 ++--
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/usr/share/cinnamon/applets/blueberry@cinnamon.org/applet.js b/usr/share/cinnamon/applets/blueberry@cinnamon.org/applet.js
index f4297be..62dc749 100644
--- a/usr/share/cinnamon/applets/blueberry@cinnamon.org/applet.js
+++ b/usr/share/cinnamon/applets/blueberry@cinnamon.org/applet.js
@@ -22,10 +22,10 @@ function MyApplet(metadata, orientation, panel_height, instance_id) {
 }
 
 MyApplet.prototype = {
-    __proto__: Applet.TextIconApplet.prototype,
+    __proto__: Applet.IconApplet.prototype,
 
     _init: function(metadata, orientation, panel_height, instance_id) {
-        Applet.TextIconApplet.prototype._init.call(this, orientation, panel_height, instance_id);
+        Applet.IconApplet.prototype._init.call(this, orientation, panel_height, instance_id);
 
         this.setAllowedLayout(Applet.AllowedLayout.BOTH);
 
@@ -51,8 +51,6 @@ MyApplet.prototype = {
             }));
             this.menu.addMenuItem(item);
 
-            this.on_orientation_changed(orientation);
-
             this._client = new GnomeBluetooth.Client();
             this._model = this._client.get_model();
             this._model.connect('row-changed', Lang.bind(this, this._sync));
@@ -73,13 +71,6 @@ MyApplet.prototype = {
         Main.systrayManager.unregisterId(this.metadata.uuid);
     },
 
-    on_orientation_changed: function(orientation) {
-        if (orientation == St.Side.LEFT || orientation == St.Side.RIGHT)
-            this.hide_applet_label(true);
-        else
-            this.hide_applet_label(false);
-    },
-
     _getDefaultAdapter: function() {
         let [ret, iter] = this._model.get_iter_first();
         while (ret) {
diff --git a/usr/share/cinnamon/applets/blueberry@cinnamon.org/metadata.json b/usr/share/cinnamon/applets/blueberry@cinnamon.org/metadata.json
index fd88334..8131d54 100644
--- a/usr/share/cinnamon/applets/blueberry@cinnamon.org/metadata.json
+++ b/usr/share/cinnamon/applets/blueberry@cinnamon.org/metadata.json
@@ -3,5 +3,5 @@
     "description": "Blueberry applet", 
     "uuid": "blueberry@cinnamon.org", 
     "name": "Bluetooth", 
-    "last-edited": "1355436562"
-}
\ No newline at end of file
+    "last-edited": "1517395944"
+}