It is currently Sat Apr 27, 2024 7:04 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Sun Mar 23, 2014 1:51 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Strange.
I had to download the win32.7z file as a win32.zip file and open with 7 zip application. Otherwise it showed an empty 7z file download. (empty archive).

I placed the win32 folder in plug-ins along with a new wx directory (empty) and it initialized save as and open as python modules.

Image

Though selecting either did not open a save as dialog or open as dialog.

Windows 8.1 64 bit GIMP. Perhaps the python modules should be in the 32 bit folder?
AHHA! I had to make sure the tree wasn't ".gimp-2.8/plug-ins/win32/win32/python files". I simply made sure the tree was ".gimp-2.8/plug-ins/win32/python files" and all worked as they should.

Image

However shouldn't there be some sort of way to browse for the file you want to open? Same with save as. There should be a way to browse to a save directory.
The way this works now it attempts to use the already open drawable or image but upon selecting save as i get no response.
I am a little confused. Why would you want to open an already opened image in a windows dialog to open it again? Or perhaps i am miss-understanding the purpose of the plug-in?

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Sun Mar 23, 2014 7:08 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Feb 17, 2013
Posts: 36
Thank you, ofnuts, i implemented your other answers

ofnuts wrote:
2) Register a plugin that takes no parameters (no even an image)

a) The register commands don't take any parameters now (lines 161, 146), but it still pops up the dialog
b) The dialog is shown only when there are no other images; it doesn't show when i have other images opened.

Can you help me on this?

ofnuts wrote:
The GTK dialog is more user-friendly (...), especially (...) where all apps use it. For instance it remembers the last files saved using it, (...) I wouldn't see much purpose in importing the WIndows-style dialog on Linux or OSX.

For me, the main concern is (not) having to use the mouse, or navigating too much in the dialog.
In Windows (and KDE?), when the dialog shows, i just write the path and press ENTER. For me this is the most important behavior. I just wish i had written the plugin 14 years ago, when i really needed it :)

Rod wrote:
AHHA! I had to make sure it was ".gimp-2.8/plug-ins/win32/python files" and all worked

thank you! I added it in the README.

Rod wrote:
However shouldn't there be some sort of way to browse for the file you want to open?

this is a bug; not a feature :) see my correspondance with ofnuts about it.
it will work if there are other open images (strange...)
I didn't understand your comment about the "save as windows"? Does it work for you?

Mikechat wrote:
it dose show, have to make wx dir in plug-ins.
thanks keshef, good work

So you work with the WX version? nice! mine stopped working :( so i'm using pywin32

Graechan
I added install instructions;
can you tell me what is your PYTHON.EXE version & bits?
where is your "plug-ins" folder?
(I guess I will not be using windows 8 in the next several years but it should be the same as 7)


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Sun Mar 23, 2014 12:26 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Feb 17, 2013
Posts: 36
for anyone who still reads this, i've updated the scripts and solved the bugs.


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Sun Mar 23, 2014 12:51 pm  (#14) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
keshef wrote:
For me, the main concern is (not) having to use the mouse, or navigating too much in the dialog.
In Windows (and KDE?), when the dialog shows, i just write the path and press ENTER. For me this is the most important behavior. I just wish i had written the plugin 14 years ago, when i really needed it :)

If you do not have a "Location:" text entry in your GTK Open dialog, you can use the CTRL-L keyboard shortcut to have one added. Once added, it should be available for all subsequent usages.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Sun Mar 23, 2014 6:42 pm  (#15) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Still to much confusion with install the win32 folder should only contain whats necessary so that the instruction could read place 32 folder in plugins folder and in your save as windows zip what is easygui.py for

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Mon Mar 24, 2014 1:00 am  (#16) 
Offline
GimpChat Member
User avatar

Joined: Mar 18, 2011
Posts: 283
Location: Lusaka, Zambia
Hi,

Why can't we just have a better/standard image browse dialogue such as already proposed here?

Is it the intention of this thread?

Still :gimp

joseph


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Mon Mar 24, 2014 2:10 am  (#17) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
josephbupe wrote:
Hi,

Why can't we just have a better/standard image browse dialogue such as already proposed here?

Is it the intention of this thread?

Still :gimp

joseph
I like that idea Joseph.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Mon Mar 24, 2014 2:39 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Feb 17, 2013
Posts: 36
josephbupe wrote:
Why can't we just have a better/standard image browse dialogue such as already proposed ?


i think modern systems now has thumbnail view already built in.
i don't know about GTK, but for Windows it either happens automatically or you need to click a button and "view as thumbnails" or something

josephbupe wrote:
Is it the intention of this thread?


no.
My personal intention is to have fastest, easiest, and most similar look and feel.

Since i'm using anyway Windows (95, 98, NT, 2000, xp, 7, 2003), and prefer the KDE environment, i'm more "fluid" with non-gtk style of dialogs.

Saulgoode gave us a tip about using current dialog more efficiently, and i'm going to try it
(viewtopic.php?f=9&t=10017&start=10#p131080)

Also, i don't use GIMP as a file browser.
for that I use Total commander (on windows) / Double Commander (on linux) - both have built-in thumbnail preview.

the same way I don't use emacs as an operating system... ;)


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Mon Mar 24, 2014 3:21 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
I re downloaded and installed all the newer python modules in the first post.
I opened a recent image and tried "Open As Windows Dialog2" and all works well.
Image

I installed the wxPython to my Python27 application folder. I copied the entire wx folder to my .gimp-2.8/plug-ins folder and launched Gimp-2.8 64 bit installed Gimp.org version.

Results for Save As Windows Dialog -
I select the "Save Windows Dialog" in the File menu and nothing happens.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Mon Mar 24, 2014 11:43 am  (#20) 
Offline
GimpChat Member
User avatar

Joined: Feb 17, 2013
Posts: 36
Rod wrote:
I re downloaded and installed all the newer python modules in the first post.
I opened a recent image and tried "Open As Windows Dialog2"
...
Results for Save As Windows Dialog -
I select the "Save Windows Dialog" in the File menu and nothing happens.


i uploaded new script version.
please update "save-as-windows.py",
and DELETE "open-as-windows.py" from your plugins script, since it's not needed anymore (i unified both files into 1 script)


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Mon Mar 24, 2014 1:27 pm  (#21) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2247
Location: Poland
My system: Vista 32 bit, Python 2.7.5, GIMP 2.8.10, wxPython 3.0.
I downloaded the latest version.
Confirm the diagnosis Rod:
Open Windows Dialog - works well
Save Dialog Windows - not (the previous version was running - but without recording layers for *. xcf)


Attachments:
Open Windows Dialog.png
Open Windows Dialog.png [ 470.89 KiB | Viewed 1652 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Mon Mar 24, 2014 5:49 pm  (#22) 
Offline
GimpChat Member
User avatar

Joined: Feb 17, 2013
Posts: 36
MareroQ wrote:
My system: Vista 32 bit, Python 2.7.5, GIMP 2.8.10, wxPython 3.0.
I downloaded the latest version.
Confirm the diagnosis Rod:
Open Windows Dialog - works well
Save Dialog Windows - not (the previous version was running - but without recording layers for *. xcf)


interesting,
i've never been using vista, so I can't debug it there.
(BTW: i verified - and the current download is my latest version)
my only tip is:
delete all other copies of my plugin (open-as-windows.py, save-as-windows.py), and restart gimp

EDIT: tested both with wx and pywin32


Last edited by keshef on Mon Mar 24, 2014 6:18 pm, edited 1 time in total.

Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Mon Mar 24, 2014 5:50 pm  (#23) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
I've got gimp 2.8.10 32bit on win7 my python console says it's 2.7.6, does anyone know what files I should install and where?

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Mon Mar 24, 2014 6:22 pm  (#24) 
Offline
GimpChat Member
User avatar

Joined: Feb 17, 2013
Posts: 36
Graechan wrote:
I've got gimp 2.8.10 32bit on win7 my python console says it's 2.7.6, does anyone know what files I should install and where?


i wrote as much as i can in the README file inside the updated plugin.
see INSTALL section. other than that i'm not sure i can help.


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Mon Mar 24, 2014 6:33 pm  (#25) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
keshef is the wx install required as well as the the win32 pkg, and if so could you post the plugins/wx file in a zip

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Mon Mar 24, 2014 8:11 pm  (#26) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Rod you posted this
Quote:
I installed the wxPython to my Python27 application folder.

Image

this is the installer I downloaded [wxPython3.0-win64-3.0.0.0-py27.exe]for my 64bit gimp from gimp.com

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Tue Mar 25, 2014 4:18 pm  (#27) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
Anybody interested in trying my attempt at using your operating system's native file selection dialog?

I got the TKinter method working, which in theory means that it will work if you have Python working in GIMP

This is only really done as a proof of concept and I'd especially like anyone on Macs to let me know if it works.

I've only implemented a "Native Open" to prove the point, and I've not added all the various file type filters either.

Kevin

Zipped because Python scripts in the raw are just too dangerous !?!

Windows XP in classic mode:
Attachment:
Untitled.png
Untitled.png [ 196.41 KiB | Viewed 1620 times ]


Attachments:
kp_native_open_file.zip [675 Bytes]
Downloaded 98 times
Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Tue Mar 25, 2014 5:25 pm  (#28) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
paynekj besides installing your python file what else needs installed for win7 64bit

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Tue Mar 25, 2014 5:31 pm  (#29) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
Graechan wrote:
paynekj besides installing your python file what else needs installed for win7 64bit


You don't need to install anything else.

Kevin


Top
 Post subject: Re: my first plugin - Windows save/open dialog instead of GTK
PostPosted: Tue Mar 25, 2014 5:50 pm  (#30) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Paynekj your brilliant this is terrific and works brilliantly

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts How to tab to an open dialog, i.e. Scale Tool dialog?

1

No new posts Attachment(s) Save For Web Gimp 2.8 Windows

5

No new posts Attachment(s) Gimp tries to save a composed image to windows system32 by default

1

No new posts I could use some help getting started with a plugin on Windows

2

No new posts Where did GIMP save my file, & how do I change default save location

5



* Login  



Powered by phpBB3 © phpBB Group