Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: [fb2k v2] SQL Tree (foo_uie_sql_tree) (Read 120906 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [fb2k v2] SQL Tree (foo_uie_sql_tree)

Reply #351
Oh, once standart install, second is a portable. It seems there is no ex-/import possible!
I see the problem!
thank you grimes

Re: [fb2k v2] SQL Tree (foo_uie_sql_tree)

Reply #352
I'm still having trouble getting my bitmaps to appear in the icon selection dialog. I had three of them entered in the Properties > Advanced > Tools > SQL Tree > Icon file paths (separate by |) box with the previous version of the component. They all had direct links, but only the first appeared.

I upgraded to the new version of the component, and still just one appeared in that dialog and also in the SQL Tree itself for the folder I had selected it for. I then tried to change them to relative links, and probably misdirected ones. The one bitmap that showed disappeared from the dialog, the tree, and also the button in the Edit Folder dialog. There was just a part of the text from the Advanced setting appearing in the button.

Now, try as I might, I cannot get even one image to appear anywhere. they are all in a directory at profile\customizations\img\nodes\. I've tried the following:
  • customizations\img\nodes\library.bmp
  • \customizations\img\nodes\library.bmp
  • .\customizations\img\nodes\library.bmp
  • ..\customizations\img\nodes\library.bmp
  • ..\..\customizations\img\nodes\library.bmp
  • C:\<direct_path>\customizations\img\nodes\library.bmp

Which file is this linked relative to? They're all 16 x 16 .bmp files.

Re: [fb2k v2] SQL Tree (foo_uie_sql_tree)

Reply #353
I'm still having trouble getting my bitmaps to appear in the icon selection dialog. I had three of them entered in the Properties > Advanced > Tools > SQL Tree > Icon file paths (separate by |) box with the previous version of the component. They all had direct links, but only the first appeared.
I tried with your images using relative paths and even the first one didn't work for me. In general I need to check it, but you should combine all your images to one bitmap (see attachment). Using this it works for me.

I've tried the following:
  • customizations\img\nodes\library.bmp
  • \customizations\img\nodes\library.bmp
  • .\customizations\img\nodes\library.bmp
  • ..\customizations\img\nodes\library.bmp
  • ..\..\customizations\img\nodes\library.bmp
  • C:\<direct_path>\customizations\img\nodes\library.bmp

Which file is this linked relative to? They're all 16 x 16 .bmp files.
It's relative to the profile folder. Therefore the first one is the correct one. But the direct path (the last one) should also work.

Re: [fb2k v2] SQL Tree (foo_uie_sql_tree)

Reply #354
Ah yes, that works now. I thought I remembered from last time I tried to do this a while back that there was a certain way to set the file up (with all of the images in a row like that), but I couldn't find what it was.

Thanks. All better. ;D

Re: [fb2k v2] SQL Tree (foo_uie_sql_tree)

Reply #355
I guess I spoke too soon, and I'm back to the pain on the node icons. It seems that when I change the Advanced > Tools > SQL Tree > Icon file paths setting, I have difficulty getting my icons to show up in the dialog for selecting icons afterwards. It worked the first time, and it eventually worked again when I used the file you made above, but I have no idea how that happened.

Now, I've swapped the file for another, and I was expecting my nodes to display the wrong ones, since the order changed. Instead, they displayed nothing. So I set them all back to using their parent node settings and cleared all of my changes out. I've restarted fb2k several times. Still no icons in the dialog.

I tried uninstalling SQLite Utilities and SQL Tree. I left the

I tried a different fb2k installation where I had put a value in the advances properties but not yet used any of the icons. I updated that, and that installation doesn't show any of my icons either.

I can't find how to reliably get my icons into the dialog. I anticipate more trial and error with them as I see what looks good and what doesn't. Help!

Re: [fb2k v2] SQL Tree (foo_uie_sql_tree)

Reply #356
The problem with your icons is that they are 32bit bitmap files. Those are not supported. When I created the previously attached file with IrfanView it was automatically converted to a 24bit bitmap file and therefore it could be loaded. Converting your single icon files to 24bit makes them loadable too. However the preferred way is to use combined bitmap files.

The next release will show an error dialog containing all the files which not could be loaded.

Re: [fb2k v2] SQL Tree (foo_uie_sql_tree)

Reply #357
Ah, thanks for that explanation. Perhaps I can work with that.

I did try using again the file that you linked here and didn't have any success. Maybe I had something else wrong.

I noticed too that—while the icon numbers in the dialog are a 1-based sequence—the values in the database seem to start from zero. This doesn't affect anything, and I probably shouldn't go mucking about in the databases, but it's something to keep in mind when I do.

Re: [fb2k v2] SQL Tree (foo_uie_sql_tree)

Reply #358
OK, I got it working, but I have questions. I have a Python script that takes Material Design Icons svg files, colors them, and converts them to a merged bmp. This file is not able to be read, but opening it up in IrfanView shows the result to be 24 BPP, and going over to Image > Show Channel > has the Alpha channel greyed out. However, the size in the status bar reads "11.13 KB / 8.29 KB".

If I then use IrfanView to Save As this bmp to another, I get a working file with a size of "8.30 KB / 8.29 KB".

So I need to add another step to my script, but my output seems to be both 24 BPP and not 24 BPP, assuming those are the right 24-bit property.

How can I better inspect the difference between the two images and determine what accounts for it?

Re: [fb2k v2] SQL Tree (foo_uie_sql_tree)

Reply #359
This file is not able to be read, but opening it up in IrfanView shows the result to be 24 BPP
IrfanView shows actually the result of the in memory image after converting it from 32bit in the status bar. Selecting the menu "Image -> Information..." gives you the information, that the original image is 32bit. And, of course, this explains also the size difference.

But why do you use a Python script for creating the final icon bitmap file. It appears a bit overcomplicated to me. This can be easily done with IrfanView by selecting the menu "Image -> Merge images (Simple Panorama image)..." (*)

(*) The files which are used in the attached screen shot are your 32bit BMP files, but it can also be done directly with the SVG files in the same way.


Re: [fb2k v2] SQL Tree (foo_uie_sql_tree)

Reply #360
Hey, these little scripts are the one coding thing I'm kinda getting good at. Don't take that away from me! ;D

It's the script that produced all of those bmp images in the first place. I saw a chance to learn more stuff and lock in all the coloring and resizing too. It's easier now that its done than hand-making the source files was before, especially with another color scheme for a different profile.

After casting about fruitlessly with ImageMagick SVG delegates and whatnot, I got an effective function to add at the end. ;D  :'(

Code: (python) [Select]
    def convert_again(self, file_name: str) -> None:
        """Clean up weird conversion from Wand for fb2k SQL Tree.

        The final output was not loading successfully in the foobar2000
        SQL Tree component, but reconverting with IrfanView did the
        trick. I don't know if Wand/ImageMagick is properly configured
        to use Inkscape as a delegate for SVG conversion.

        This does not protect paths containing spaces or maybe even
        capital letters.
        """
        subprocess.run([IRFANVIEW, file_name, f'/convert={file_name}'])

[EDIT:] Oh hang on, I got it to work a better way without my convert_again kludge. The key was changing the format of those intermediate files from bmp to png and then saving the merged file as a bmp and prepending the filename in that save with BMP3:. Omit any of those bits—and I have—and no dice.

Re: [fb2k v2] SQL Tree (foo_uie_sql_tree)

Reply #361
I'm having new trouble with the node images. In trying a new installation, I get the new dialog that the image could not be loaded. However, this is an image that works in another installation.

I made a copy of that installation, removed the file from the Advanced Preferences, and restarted fb2k. No images appeared in the nodes as expected. Then I entered the file back into the the Preferences and restarted again. This time, the dialog came up, and the previously-working image failed to load.

For good measure, I opened the image up in IrfanView and saved it as itself. That image didn't work either.

{Edit:] Another test. I had made the same image in two different color schemes for two different installations. With a fresh copy of one of those installations, I swapped out the bmp file with the differently-colored one without editing the Preferences. Opening fb2k, the new file was applied, and the colors had changed.