From 3ebf6e3beae564be678084b61c80be9e4fc1fe8b Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Mon, 19 Sep 2011 17:46:11 -0400 Subject: [PATCH] autorun: don't use a custom size for the hotplug icon Instead, just use the default MessageTray.Source icon size (24px). https://bugzilla.gnome.org/show_bug.cgi?id=658004 --- js/ui/autorunManager.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/js/ui/autorunManager.js b/js/ui/autorunManager.js index b897393a1..33ba62f91 100644 --- a/js/ui/autorunManager.js +++ b/js/ui/autorunManager.js @@ -23,8 +23,6 @@ const AutorunSetting = { ASK: 3 }; -const HOTPLUG_ICON_SIZE = 16; - // misc utils function ignoreAutorunForMount(mount) { let root = mount.get_root(); @@ -284,7 +282,7 @@ AutorunResidentSource.prototype = { this._mounts = []; this._notification = new AutorunResidentNotification(this); - this._setSummaryIcon(this.createNotificationIcon(HOTPLUG_ICON_SIZE)); + this._setSummaryIcon(this.createNotificationIcon()); }, addMount: function(mount, apps) { @@ -329,10 +327,10 @@ AutorunResidentSource.prototype = { } }, - createNotificationIcon: function(iconSize) { + createNotificationIcon: function() { return new St.Icon ({ icon_name: 'media-removable', icon_type: St.IconType.FULLCOLOR, - icon_size: iconSize ? iconSize : this.ICON_SIZE }); + icon_size: this.ICON_SIZE }); } } @@ -533,16 +531,16 @@ AutorunTransientSource.prototype = { this.apps = apps; this._notification = new AutorunTransientNotification(this); - this._setSummaryIcon(this.createNotificationIcon(this.ICON_SIZE)); + this._setSummaryIcon(this.createNotificationIcon()); // add ourselves as a source, and popup the notification Main.messageTray.add(this); this.notify(this._notification); }, - createNotificationIcon: function(iconSize) { + createNotificationIcon: function() { return new St.Icon({ gicon: this.mount.get_icon(), - icon_size: iconSize ? iconSize : this.ICON_SIZE }); + icon_size: this.ICON_SIZE }); } }