Ajout gestion icones pixmap
This commit is contained in:
@ -36,8 +36,16 @@ module.exports = React.createClass({
|
||||
_findIcon: function(iconPath) {
|
||||
|
||||
var self = this;
|
||||
var DEFAULT_ICON = 'application-default-icon';
|
||||
var theme = null;
|
||||
|
||||
Util.DesktopApps.findIcon(iconPath || 'application-default-icon')
|
||||
Util.DesktopApps.findIcon(iconPath || DEFAULT_ICON, theme)
|
||||
.then(function(iconPath) {
|
||||
if( !iconPath || /\.xpm$/.test(iconPath) ) {
|
||||
return Util.DesktopApps.findIcon(DEFAULT_ICON, theme);
|
||||
}
|
||||
return iconPath;
|
||||
})
|
||||
.then(function(iconPath) {
|
||||
self.setState({ icon: iconPath });
|
||||
})
|
||||
|
Reference in New Issue
Block a user