Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

IrfanView

Questions and comments specific to a particular plugin should go here.
Post Reply
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

IrfanView

Post by Pako »

I'm made plugin for my most favourite pictures viewer - IrfanView.
I think, that would be useful also for somewhere another.
I'm made two variant:
FULL - contains whole list (99) of Hotkeys.
LIGHT - selection only some one (23) Hotkeys.
I would have grateful behind corrections mine bad English in plugin.


I have another intention - make simple plugin for OpenOffice - Impress
(Hotkeys only for presentation preview). It is good idea ?

Pako
Attachments
IrfanViewPlugin.zip
(7.77 KiB) Downloaded 781 times
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: IrfanView

Post by Bitmonster »

Very nice. I would suggest to only build a "full version" and putting the less often used actions into a sub-group.

I nice addition would be if the "Run" action could pass command line parameters. For example a start in fullscreen mode, setting the position to a specific monitor and starting the slideshow from a specific folder might be desirable.

I never used OpenOffice Impress, but I think its a good idea.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: IrfanView

Post by Pako »

Bitmonster wrote:I would suggest to only build a "full version" and putting the less often used actions into a sub-group.
OK.
Bitmonster wrote:I nice addition would be if the "Run" action could pass command line parameters. For example a start in fullscreen mode, setting the position to a specific monitor and starting the slideshow from a specific folder might be desirable.
Well, I attempt to make. Will it for me good exercise.

Pako
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: IrfanView

Post by Pako »

Here is second generation IrfanView plugin's.
Bitmonster wrote: I would suggest to only build a "full version" and putting the less often used actions into a sub-group.
Now is only one version and only one python file.
Bitmonster wrote:I nice addition would be if the "Run" action could pass command line parameters. For example a start in fullscreen mode, and starting the slideshow from a specific folder might be desirable.
I hope, that it is good work.
Bitmonster wrote:...setting the position to a specific monitor...
I'm learn, that choice of monitor is possible only for "exe" forms slideshow :( .

Pako
Attachments
__init__.py
(52.34 KiB) Downloaded 613 times
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: IrfanView

Post by Bitmonster »

Wow! The option dialogs look really cool.

Two questions:
1. I haven't understood the need of the "label" option. Does it only modify the appearance of the action in the tree? If so, isn't it enough the user can rename it directly in the tree?

2. If I have so many options in a particular action/plugin, I prefer to use a dictionary to store them, because it is easier to introduce new options or to drop unneeded options and I don't lose compatibility with older settings if I change something. It is also more readable, since it is hard to remember what option the "[12]" means. So I write it like:

Code: Select all

class DictionaryTest(eg.ActionClass):
    
    defaults = {
        "aValue": True,
        "bValue": "The value of b",
        "cValue": "The value of c",
    }
    
    def __call__(self, kwargs):
        options = self.defaults.copy()
        options.update(kwargs)
        print options
        
        
    def Configure(self, kwargs={}):
        options = self.defaults.copy()
        options.update(kwargs)
        
        dialog = eg.ConfigurationDialog(self)
        aValueCtrl = wx.CheckBox(dialog, -1, "aValue")
        aValueCtrl.SetValue(options["aValue"])
        bValueCtrl = wx.TextCtrl(dialog)
        bValueCtrl.SetValue(options["bValue"])
        cValueCtrl = wx.TextCtrl(dialog)
        cValueCtrl.SetValue(options["cValue"])
        
        dialog.sizer.Add(aValueCtrl)
        dialog.sizer.Add(bValueCtrl)
        dialog.sizer.Add(cValueCtrl)
        
        if dialog.AffirmedShowModal():
            kwargs = {}
            kwargs["aValue"] = aValueCtrl.GetValue()
            kwargs["bValue"] = bValueCtrl.GetValue()
            kwargs["cValue"] = cValueCtrl.GetValue()
            return (kwargs, )
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: IrfanView

Post by Pako »

Bitmonster wrote:Wow! The option dialogs look really cool.
:D
Bitmonster wrote:1. I haven't understood the need of the "label" option. Does it only modify the appearance of the action in the tree? If so, isn't it enough the user can rename it directly in the tree?
With my English is heavy it formulate. Simply yourself I think, that it is useful.
Bitmonster wrote: 2. If I have so many options in a particular action/plugin, I prefer to use a dictionary to store them, because it is easier to introduce new options or to drop unneeded options and I don't lose compatibility with older settings if I change something. It is also more readable, since it is hard to remember what option the "[12]" means. So I write it like: ...
I thanks for nice education :) .
I'm made appropriate changes -> release 0.2.2

Pako
Attachments
__init__.py
Release 0.2.2
(54.28 KiB) Downloaded 540 times
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: IrfanView

Post by Pako »

Delete please line 821: print kwargs, if load file before 16:08.
Pako
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: IrfanView

Post by Bitmonster »

The plugin is included in 0.3.6.1172

I have created a new module to get access to more system folders. Particularly you might be interested in the "My Pictures" path, to give it as a default for some actions. You can get this path through:

Code: Select all

print eg.folderPath.Pictures

To see all available folders, you can do in a script:

Code: Select all

for name in eg.folderPath.__ALL__:
    print name + ": " + getattr(eg.folderPath, name)
I will possibly remove the old names APPDATA, STARTUP, PROGRAMFILES and so on in the future.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: IrfanView

Post by Pako »

Instead old names they are new names and is fixed bug on line 932 -> release 0.2.3

Pako
Attachments
__init__.py
Release 0.2.3
(54.46 KiB) Downloaded 553 times
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: IrfanView

Post by Pako »

New release 0.2.4:
Removing bugs, complement event.Skip() code.

Pako
Attachments
__init__.py
Release 0.2.4
(54.86 KiB) Downloaded 663 times
Post Reply