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
This commit is contained in:
parent
9f41f5c740
commit
3ebf6e3bea
@ -23,8 +23,6 @@ const AutorunSetting = {
|
|||||||
ASK: 3
|
ASK: 3
|
||||||
};
|
};
|
||||||
|
|
||||||
const HOTPLUG_ICON_SIZE = 16;
|
|
||||||
|
|
||||||
// misc utils
|
// misc utils
|
||||||
function ignoreAutorunForMount(mount) {
|
function ignoreAutorunForMount(mount) {
|
||||||
let root = mount.get_root();
|
let root = mount.get_root();
|
||||||
@ -284,7 +282,7 @@ AutorunResidentSource.prototype = {
|
|||||||
this._mounts = [];
|
this._mounts = [];
|
||||||
|
|
||||||
this._notification = new AutorunResidentNotification(this);
|
this._notification = new AutorunResidentNotification(this);
|
||||||
this._setSummaryIcon(this.createNotificationIcon(HOTPLUG_ICON_SIZE));
|
this._setSummaryIcon(this.createNotificationIcon());
|
||||||
},
|
},
|
||||||
|
|
||||||
addMount: function(mount, apps) {
|
addMount: function(mount, apps) {
|
||||||
@ -329,10 +327,10 @@ AutorunResidentSource.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
createNotificationIcon: function(iconSize) {
|
createNotificationIcon: function() {
|
||||||
return new St.Icon ({ icon_name: 'media-removable',
|
return new St.Icon ({ icon_name: 'media-removable',
|
||||||
icon_type: St.IconType.FULLCOLOR,
|
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.apps = apps;
|
||||||
|
|
||||||
this._notification = new AutorunTransientNotification(this);
|
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
|
// add ourselves as a source, and popup the notification
|
||||||
Main.messageTray.add(this);
|
Main.messageTray.add(this);
|
||||||
this.notify(this._notification);
|
this.notify(this._notification);
|
||||||
},
|
},
|
||||||
|
|
||||||
createNotificationIcon: function(iconSize) {
|
createNotificationIcon: function() {
|
||||||
return new St.Icon({ gicon: this.mount.get_icon(),
|
return new St.Icon({ gicon: this.mount.get_icon(),
|
||||||
icon_size: iconSize ? iconSize : this.ICON_SIZE });
|
icon_size: this.ICON_SIZE });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user