wedesoft / anymeal

AnyMeal is a free and open source recipe management software developed using SQLite3 and Qt5. It can manage a cookbook with more than 250,000 MealMaster recipes, thereby allowing to import, export, search, display, edit, and print them. AnyMeal is available for GNU/Linux and Microsoft Windows.
https://wedesoft.github.io/anymeal
GNU General Public License v3.0
56 stars 5 forks source link

Debian : no icon displayed in the Gnome dash #62

Closed pled closed 1 month ago

pled commented 1 month ago

Hi,

After installing Anymeal 1.18-2 from debian 12 repository, there is no icon displayed in the dash when anymeal is running, while icon is displayed in the Gnome search :

anymeal-icon

Gnome-shell is v43.9, no extension activated.

To get the icon, I need to create a application file like ~/.local/share/applications/anymeal.desktop :

[Desktop Entry]
Name=Anymeal
Comment=Anymeal Recipe Manager
Exec=/usr/bin/anymeal
Icon=/usr/share/icons/hicolor/256x256/apps/anymeal.png
Terminal=False
Type=Application
Categories=Misc;

(there might other ways to achieve that, I don't know)

Result : Capture d’écran du 2024-08-06 11-12-44

But doing this, I know have two icons in Gnome search :

Capture d’écran du 2024-08-06 11-16-33

Note for that example, I created a new icon for the fun :

recipes-icon-anymeal

Because apart of the issue, and this is just a suggestion, and something that comes to my mind when launching Anymeal at first time, Anymeal icon is not very graphical in my opinion (just a casserole picture). May be your opinion is different, so you may ignore this.

Icon is taken from that page which list some free icons related to recipes software : https://www.freeiconspng.com/images/recipes-icon-png

It is easy to start from one of these ones (or any other free icon one can find ), and modify it to match Anymeal software.

wedesoft commented 1 month ago

On 6 August 2024 10:24:11 BST, pled @.***> wrote:

Hi,

After installing Anymeal 1.18-2 from debian 12 repository, there is no icon displayed in the dash when anymeal is running, while icon is displayed in the Gnome search :

anymeal-icon

Gnome-shell is v43.9, no extension activated.

To get the icon, I need to create a application file like ~/.local/share/applications/anymeal.desktop :

[Desktop Entry]
Name=Anymeal
Comment=Anymeal Recipe Manager
Exec=/usr/bin/anymeal
Icon=/usr/share/icons/hicolor/256x256/apps/anymeal.png
Terminal=False
Type=Application
Categories=Misc;

(there might other ways to achieve that, I don't know)

Result : Capture d’écran du 2024-08-06 11-12-44

But doing this, I know have two icons in Gnome search :

Capture d’écran du 2024-08-06 11-16-33

Note for that example, I created a new icon for the fun :

recipes-icon-anymeal

Because apart of the issue, and this is just a suggestion, and something that comes to my mind when launching Anymeal at first time, Anymeal icon is not very graphical in my opinion (just a casserole picture). May be your opinion is different, so you may ignore this.

Icon is taken from that page which list some free icons related to recipes software : https://www.freeiconspng.com/images/recipes-icon-png

It is easy to start from one of these ones (or any other free icon one can find ), and modify it to match Anymeal software.

-- Reply to this email directly or view it on GitHub: https://github.com/wedesoft/anymeal/issues/62 You are receiving this because you are subscribed to this thread.

Message ID: @.***> Did you try to restart GNOME after installation of Anymeal? Anymeal installs a desktop file and icon in the correct locations when configuring with prefix "/usr". Kind regards Jan

pled commented 1 month ago

Yes, machine has been restarted. Anymeal is installed using sudo apt install anymeal. I can see your files :

/usr/share/icons/hicolor/64x64/apps/anymeal.png
/usr/share/applications/de.wedesoft.anymeal.desktop

Doing some more tests, it seems to work when renaming the file from de.wedesoft.anymeal.desktop to anymeal.desktop, although icon is long to display in Dash (like 10secs).

But all this is beyond my knowledge...

I have this behavior with both Debian 12 (VM) and Debian 13 trixie (desktop).

wedesoft commented 1 month ago

Sorry, I can't reproduce it on Debian 12. I installed GNOME and then did sudo apt install anymeal which install Anymeal 1.18. Running the software shows the icon in both the search and the dash.

image

pled commented 1 month ago

Hum... very strange : I created a new fresh VM with Debian 12.6 ISO, then install anymeal : issue is there.

Capture d’écran du 2024-08-07 11-08-06

and same behaviour : renaming de.wedesoft.anymeal.desktop to anymeal.desktop make sicon appears in the dash, but after around 10 seconds...

Capture d’écran du 2024-08-07 11-11-12

wedesoft commented 1 month ago

Does it work if you instead move /usr/share/icons/hicolor/64x64/apps/anymeal.png to /usr/share/icons/hicolor/64x64/apps/de.wedesoft.anymeal.png and update the Icon entry in the desktop file accordingly?

wedesoft commented 1 month ago

I.e. keep the desktop file at /usr/share/applications/de.wedesoft.anymeal.desktop but change the PNG file name instead.

pled commented 1 month ago

It does not work. I renamed icon file to de.wedesoft.anymeal.png, then tried changing icon definition in the /usr/share/applications/de.wedesoft.anymeal.desktop. Tried both : Icon=de.wedesoft.anymeal and Icon=de.wedesoft.anymeal.png

Same result : icon is no more displayed at all.

Capture d’écran du 2024-08-08 09-36-15

wedesoft commented 1 month ago

Ok, when I install Debian in VirtualBox, I can see the same problem. Not sure how to solve it yet.

wedesoft commented 1 month ago

I added StartupWMClass=anymeal to the desktop file and now it seems to work. Will include that fix in the next release.

wedesoft commented 1 month ago

I also set StartupNotify=false in the desktop file to get rid of the annoying busy indicator.

wedesoft commented 1 month ago

Looks like the busy indicator is still there, don't know why.

wedesoft commented 1 month ago

Ah, had to restart GNOME for it to work.

pled commented 1 month ago

Perfect, icon is there and on time with these settings. Thank you.