Skip to content
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

websearch icons missing #1279

Closed
alvilag opened this issue Aug 14, 2023 · 8 comments
Closed

websearch icons missing #1279

alvilag opened this issue Aug 14, 2023 · 8 comments
Assignees

Comments

@alvilag
Copy link

alvilag commented Aug 14, 2023

Description

User-made websearches do not display the corresponding icon when filled in. See the screenshot:
Screenshot
Note that the default entries, e.g. Google, display the corresponding icon just fine.

Expected behavior

Show the corresponding configured icon when filling in a user-made websearch, as before.

Steps to reproduce

Fill in the prefix (for example, 'deb ') of the user-made websearch, followed by the query ('firefox').

Source

deb http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_22.04/ /

Debug output

$ albert -d
        Albert version: 0.22.1
            Build date: Aug 14 2023 12:47:50
            Qt version: 6.2.4
             Build ABI: x86_64-little_endian-lp64
  Arch (build/current): x86_64/x86_64
 Kernel (type/version): linux/6.2.0-26-generic
                    OS: Linux Mint 21.2
     OS (type/version): linuxmint/21.2
 $QT_QPA_PLATFORMTHEME: qt5ct
         Platform name: xcb
                  Font: Ubuntu,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1
       Binary location: /usr/bin/albert
                  $PWD: /home/alvise
                $SHELL: /bin/bash
                 $LANG: en_US.UTF-8
              Language: English
                Locale: en_US
     $XDG_SESSION_TYPE: x11
  $XDG_CURRENT_DESKTOP: X-Cinnamon
      $DESKTOP_SESSION: cinnamon
  $XDG_SESSION_DESKTOP: cinnamon
            Icon theme: Mint-Y-Sand
16:58:22 [info:albert] Hotkey set to Ctrl+Space
16:58:22 [info:files] Indexing /home/alvise/Documents
16:58:22 [info:python] Python version: 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
16:58:22 [warn:python] Path is not a python file /usr/share/albert/python/plugins/albert.pyi
16:58:22 [warn:python] Path is not a python file /usr/share/albert/python/plugins/README.md
@ManuelSchneid3r
Copy link
Member

I changed the way the datastructures below work. Wrinting code to port stuff is to much overhead in this stage. but at least there is now a drag n drop icon adding feature. adding icons again should come at low cost. you can drag from the browser.

I am sorry for the inconvenience. we are heading towards something stable. maybe 1.0?! i promise in there will be less breaking changes in future 😅

Note that the default entries, e.g. Google, display the corresponding icon just fine.

these use embedded resources whose path has not been changed.

@alvilag
Copy link
Author

alvilag commented Aug 14, 2023

Unfortunately adding the icons again does not work, I already tried this.

However, what I found out just now is that the icons are displayed correctly if I drag and drop the image file--but only if I do that (it does not work if I select the file image from the file browser).

EDIT: actually, it works only for the latest image I drag and drop, and it applies it to all my custom websearches...

PS No need to be sorry, I love albert and it is a valuable instrument to work with! Thanks for it!

@alvilag
Copy link
Author

alvilag commented Aug 14, 2023

As a manual solution, I had to delete all the images stored in ~/.config/albert/websearch/, place new images in there, and then manually edit engines.json pointing each entry's iconpath to the corresponding image. It worked.

@ManuelSchneid3r
Copy link
Member

Indeed the file dialog did not apply the change. Fixed that but does it really apply the icon to all websearches?

@ManuelSchneid3r
Copy link
Member

Did the websearches all have the same, empty id?

@alvilag
Copy link
Author

alvilag commented Aug 14, 2023

Fixed that but does it really apply the icon to all websearches?

With the drag and drop, it applied the latest image I dragged and dropped to all the websearches to which I dragged and dropped an image before.

Did the websearches all have the same, empty id?

Before I dragged and dropped, or executed the manual solution, yes they all had the missing image. In the engines.json the iconpath to the image seemed correct, though.

@ManuelSchneid3r
Copy link
Member

Thank you for pointing this out. This issue is pretty severe and may break a lot of ppls configs.

@ManuelSchneid3r
Copy link
Member

besides the messed up ids also affect sorting. #1276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants