asimba/pybpgviewer

Drag&Drop

smaragdus opened this issue · 10 comments

Please consider adding support for drag&drop, for me it would be very convenient.

Ok. I'll think about it. But, please, can you be a little bit more comprehensive: which kind of "drang&drop" you need?

How I imagine using 'Drag&Drop' feature:

  • Open a file manager;
  • Navigate to a folder containing BPG files;
  • Make Simple BPG Image viewer 'On Top' with the help of an external tool (SmartSystemMenu);
  • 'Drag&Drop' a BPG file onto Simple BPG Image viewer window and it loads the BPG file;

For me using 'Drag&Drop' in stead of 'CTRL+O' command would be easier and handier in some occasions (especially when browsing files and folders in a file manager).

Also, if Simple BPG Image viewer allows 'Drag&Drop' not only for files but for a folders as well it should open the first BPG file contained in a folder ('Drag&Drop' a folder containing BPG files, Simple BPG Image viewer loads the first BPG file).

If I'll find suitable cross-platform method - I'll make this feature.

And for now You can just drop file on "Simple BPG Image viewer" icon.

Done (for Ubuntu and Windows).

@asimba

Thank you very much!

I am not a programmer but I appreciate the work of open-source developers. When I come across a promising program I test it and if I can think of a possible improvement I share my ideas with the developers. I suppose that support for drag&drop would be a useful feature not only for me.

Off-topic
I use the portable version of Simple BPG Image viewer and it seems that it is really portable- I mean that the program does not write to AppData and to Registry (I didn't find any traces of the program outside program folder under Windows). If you confirm that I plan to write a short review about Simple BPG Image viewer in a forum dedicated to portable freeware.

Of course I am not in a hurry for a new release, take your time and happy coding! Have a great summer!

Best regards

@asimba

Ah, initially I didn't see there was a new release. I have already downloaded and tested version 1.25 and drag&drop works flawlessly under Windows (8 x64). That was really fast! Great work, especially having in mind that Simple BPG Image viewer is cross-platform! Many thanks!

(Sorry for my poor english) You're welcome! And thank You for for your attention to the results of my hobby. Short review? It would be very nice! :) Yes - it's really portable, but it use temporary "file" objects (for image unpacking purposes): "Named Pipe" in Windows OS, FIFO in Linux and real temporary file in macOS. Also there is "bpgthumbnailer.dll" supplied within portable Windows archive. This file used if You want to see previews in Explorer and, accordingly, it requires some manual operations to register/unregister:

  1. Installation
    In a command prompt running as administrator, navigate to the folder that contains bpgthumbnailer.dll (choose x86 or x64 folder) and enter the command:
    Regsvr32.exe bpgthumbnailer.dll
    The thumbnail handler is registered successfully if you see a message box saying:
    "DllRegisterServer in bpgthumbnailer.dll succeeded."
  2. Removal
    In a command prompt running as administrator, navigate to the folder that contains bpgthumbnailer.dll (choose x86 or x64 folder) and enter the command:
    Regsvr32.exe /u bpgthumbnailer.dll
    The thumbnail handler is unregistered successfully if you see a message box saying:
    "DllUnregisterServer in bpgthumbnailer.dll succeeded."
    Thank You! Best wishes!

@asimba

Your English is fine.

Thanks for the detailed explanation about preview in explorer!

I posted a short review about Simple BPG Image viewer at The Portable Freeware Forum- you may have a look at it, I hope I did not miss something essential. Could you please confirm that Simple BPG Image viewer does not run under Windows XP and Windows Vista?

Regards

Wow! Thank You very much! I don't know about Vista (I have no license for it), but in Windows XP Explorer: doesn't working preview mode (there is no such API interface) and some troubles with unicode support (and I really don't wanna mess around with it because Windows XP is going to the past).