[gnome-shell] autorun: don't use a custom size for the hotplug icon



commit 3ebf6e3beae564be678084b61c80be9e4fc1fe8b
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Sep 19 17:46:11 2011 -0400

    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 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/autorunManager.js b/js/ui/autorunManager.js
index b897393..33ba62f 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 });
     }
 }
 



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