cmdline dropdown missing comma
Now that v3.0.3 requires a comma before the tag in the cmdline, the behaviour of the cmdline dropdown list is inconvenient/inconsistent. The dropdown lists previous activities with tags, but without the comma, so if I select one of my previous tagged activities, I get a new activity with a category named "Category #Tag" instead of "Category" with the corresponding "Tag". The dropdown should rather have commas in the right place.
This is very annoying, that the dropdown doesn't have the comma. I hope this is soon to be fixed.
If you installed hamster using the package manager, .deb packages etc. then this worked for me:
- Open terminal
- Run
python3 -c "import hamster.widgets.activityentry; print(hamster.widgets.activityentry.__file__)" - Open the file shown
- Around line 314 you'll find this snippet:
if fact.tags:
label += " #%s" % (" #".join(fact.tags))
suggestions[label] += days
Change label line to this:
label += ", #%s" % (" #".join(fact.tags))
It rebuilds the cmdline using recent used tasks + category + tags. The change just adds a , before the first tag
@storymode7 Thanks a lot, I was able to fix this bug using your answer on my flatpak install:
- Stop all hamster processes
- Open terminal
- Run
locate activityentry.py - Open the file shown with root - on Ubuntu the path is something like /var/lib/flatpak/app/org.gnome.Hamster/x86_64/stable/3e396e9f00fe87a8bf151ee2a390aee4a815c3f7611b4cbf341c407f49e0f619/files/lib/python3.11/site-packages/hamster/widgets/activityentry.py
- Edit file (add comma) as shown above
- Remove cache files starting with activityentry in subfolder
__pycache__where activityentry.py is located - Start hamster again
When the fix is that easy, I hope it is soon to be fixed in the repo.