aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/desktop-plugins
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2016-09-23 23:45:20 +0000
committerWeblate <noreply@weblate.org>2016-09-23 23:45:20 +0000
commitcb2aab6a2437990cb10b0c980ad4f9091098b6b6 (patch)
treef55a78353fc8a8ef2e27b8a4f47fa6a2e7eb0c65 /src-qt5/core/lumina-desktop/desktop-plugins
parentTranslated using Weblate (lumina_FM@ca (generated)) (diff)
parentMerge remote-tracking branch 'origin/master' (diff)
downloadlumina-cb2aab6a2437990cb10b0c980ad4f9091098b6b6.tar.gz
lumina-cb2aab6a2437990cb10b0c980ad4f9091098b6b6.tar.bz2
lumina-cb2aab6a2437990cb10b0c980ad4f9091098b6b6.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop/desktop-plugins')
-rw-r--r--src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp
index bd8e79db..b74bbcb3 100644
--- a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp
+++ b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp
@@ -58,7 +58,9 @@ void AppLauncherPlugin::loadButton(){
if(info.isDir()){
button->setIcon( LXDG::findIcon("folder","") );
}else if(LUtils::imageExtensions().contains(info.suffix().toLower()) ){
- button->setIcon( QIcon(QPixmap(path).scaled(256,256)) ); //max size for thumbnails in memory
+ QPixmap pix;
+ if(pix.load(path)){ button->setIcon( QIcon(pix.scaled(256,256)) ); } //max size for thumbnails in memory
+ else{ button->setIcon( LXDG::findIcon("dialog-cancel","") ); }
}else{
button->setIcon( QIcon(LXDG::findMimeIcon(path).pixmap(QSize(icosize,icosize)).scaledToHeight(icosize, Qt::SmoothTransformation) ) );
}
@@ -68,7 +70,7 @@ void AppLauncherPlugin::loadButton(){
}else{
//InValid File
button->setWhatsThis("");
- button->setIcon( QIcon(LXDG::findIcon("quickopen","").pixmap(QSize(icosize,icosize)).scaledToHeight(icosize, Qt::SmoothTransformation) ) );
+ button->setIcon( QIcon(LXDG::findIcon("quickopen","dialog-cancel").pixmap(QSize(icosize,icosize)).scaledToHeight(icosize, Qt::SmoothTransformation) ) );
button->setText( tr("Click to Set") );
if(!watcher->files().isEmpty()){ watcher->removePaths(watcher->files()); }
}
@@ -126,7 +128,7 @@ void AppLauncherPlugin::buttonClicked(){
QString path = button->whatsThis();
if(path.isEmpty() || !QFile::exists(path) ){
//prompt for the user to select an application
- QList<XDGDesktop*> apps = LXDG::sortDesktopNames( LXDG::systemDesktopFiles() );
+ QList<XDGDesktop*> apps = LSession::handle()->applicationMenu()->currentAppHash()->value("All"); //LXDG::sortDesktopNames( LXDG::systemDesktopFiles() );
QStringList names;
for(int i=0; i<apps.length(); i++){ names << apps[i]->name; }
bool ok = false;
bgstack15