Page 1 of 1
IrfanView
Posted: Sun Nov 04, 2007 1:41 pm
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
Re: IrfanView
Posted: Sun Nov 04, 2007 4:37 pm
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.
Re: IrfanView
Posted: Sun Nov 04, 2007 9:12 pm
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
Re: IrfanView
Posted: Thu Nov 15, 2007 2:40 pm
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
Re: IrfanView
Posted: Thu Nov 15, 2007 5:05 pm
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, )
Re: IrfanView
Posted: Fri Nov 16, 2007 2:55 pm
by Pako
Bitmonster wrote:Wow! The option dialogs look really cool.
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
Re: IrfanView
Posted: Fri Nov 16, 2007 3:09 pm
by Pako
Delete please line 821: print kwargs, if load file before 16:08.
Pako
Re: IrfanView
Posted: Fri Nov 16, 2007 5:50 pm
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:
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.
Re: IrfanView
Posted: Fri Nov 16, 2007 7:31 pm
by Pako
Instead old names they are new names and is fixed bug on line 932 -> release 0.2.3
Pako
Re: IrfanView
Posted: Fri Nov 23, 2007 8:45 pm
by Pako
New release 0.2.4:
Removing bugs, complement event.Skip() code.
Pako