-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executables dropped on Quick Launch should get a default icon instead of path text #39
Comments
willbprog127
changed the title
Executables (not .desktop files) dropped on Quick Launch should get a default icon instead of path text
Executables dropped on Quick Launch should get a default icon instead of path text
May 25, 2014
I was able to get the desired result with: diff --git a/plugin-quicklaunch/quicklaunchaction.cpp b/plugin-quicklaunch/quicklaunchaction.cpp
index 83b31dc..27c43c0 100644
--- a/plugin-quicklaunch/quicklaunchaction.cpp
+++ b/plugin-quicklaunch/quicklaunchaction.cpp
@@ -53,8 +53,9 @@ QuickLaunchAction::QuickLaunchAction(const QString & name,
m_settingsMap["exec"] = exec;
m_settingsMap["icon"] = icon;
- if (icon.isNull())
- setIcon(XdgIcon::defaultApplicationIcon());
+ if (icon == "" || icon.isNull()) {
+ setIcon(QIcon::fromTheme("image-missing"));
+ }
else
setIcon(QIcon(icon)); |
I didn't look too close but when can the icon be null at all? If it can be both empty and null this might be an issue with qtxdg. |
Yes, you're right. This works: diff --git a/plugin-quicklaunch/quicklaunchaction.cpp b/plugin-quicklaunch/quicklaunchaction.cpp
index 83b31dc..ec9447b 100644
--- a/plugin-quicklaunch/quicklaunchaction.cpp
+++ b/plugin-quicklaunch/quicklaunchaction.cpp
@@ -53,8 +53,9 @@ QuickLaunchAction::QuickLaunchAction(const QString & name,
m_settingsMap["exec"] = exec;
m_settingsMap["icon"] = icon;
- if (icon.isNull())
+ if (icon == "" || icon.isNull()) {
setIcon(XdgIcon::defaultApplicationIcon());
+ }
else
setIcon(QIcon(icon)); |
Should I submit this as a patch, or...? I'm not really proficient on git yet, so not sure if a PR should be done instead? |
A PR would be nice, IMO. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a special executable of Firefox, for example, in a local directory. When I drop the executable on the Quick Launch, it creates a huge button with the executable's path instead of using the 'default missing app icon'. See also #30.
Ubuntu 14.04 64-bit, panel version: 0.7.0+bzr577+201405240832~ubuntu14.04.1
The text was updated successfully, but these errors were encountered: