I found that it is not a good idea to use negative values for position with gtkdialog.
If you use "gtkdialog3 -p myprogram --geometry 0x0+200+400" for instance that says 200pixels from left edge of screen and 400 pixels from top of screen.
And it stays consistent when running program multiple times.
But, if you use "gtkdialog3 -p myprogram --geometry 0x0-400-400" and run the program multiple times the program window position will change.
Negative values are measured from the right edge and bottom edge of screen.
Don't believe my heresay, try it with a small gtkdialog script.
Make gtkDialog appear in a given screen location? [Solved]
Is gposil's patched version going to be included in future Puppy versions and does it expand on Patriot's version?BarryK wrote:sunburnt,
The intention is to phase-out gtkdialog2 sometime. I might have one or two scripts that still use gtkdialog2.
I recall that --geometry was buggy in earlier versions of gtkdialog, don't recall specifically about our gtkdialog2 though.
gtkdialog3 should work. It really is the best to use, the very latest from source patched by gposil.
Also, where is the gposil version?
And lastly, will the modified versions work with exsisting gtkdialog scripts?
8-bit; The movement may be what I found that is the desktop`s "cascade" windows effect.
I had to subtract a small amount from the X and Y positions before saving the GUI`s location.
See my code above in the "cancel() {" function.
technosaurus; Mine is a working script also, but I have a fairly complete GUI for it.
Unfortunately I forgot to mention that it`s gtkDialog2, but written years ago it`d have to be.
### Is your script for gtkDialog3 ? If it is then I`m guessing that our scripts are similar...
### I think I`ll start a thread for developing a GUI builder that makes gtkDialog3 GUIs.
### The problem is I can`t remember ever getting a gtkDialog3 script to work yet...
Barry; I figured as much, it`s the circle of life ( or cycle of code... ).
I had to subtract a small amount from the X and Y positions before saving the GUI`s location.
See my code above in the "cancel() {" function.
technosaurus; Mine is a working script also, but I have a fairly complete GUI for it.
Unfortunately I forgot to mention that it`s gtkDialog2, but written years ago it`d have to be.
### Is your script for gtkDialog3 ? If it is then I`m guessing that our scripts are similar...
### I think I`ll start a thread for developing a GUI builder that makes gtkDialog3 GUIs.
### The problem is I can`t remember ever getting a gtkDialog3 script to work yet...
Barry; I figured as much, it`s the circle of life ( or cycle of code... ).
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Oh sorry, I meant Patriot's patch, not gposil.8-bit wrote:Is gposil's patched version going to be included in future Puppy versions and does it expand on Patriot's version?BarryK wrote:sunburnt,
The intention is to phase-out gtkdialog2 sometime. I might have one or two scripts that still use gtkdialog2.
I recall that --geometry was buggy in earlier versions of gtkdialog, don't recall specifically about our gtkdialog2 though.
gtkdialog3 should work. It really is the best to use, the very latest from source patched by gposil.
Also, where is the gposil version?
And lastly, will the modified versions work with exsisting gtkdialog scripts?
[url]https://bkhome.org/news/[/url]
After playing with Zigbert's example script, and not having it work correctly, it dawned on me that the /tmp/geometry file was not being run upon rerunning the script.
I made 2 changes to it and now it works.
First, I moved the action line so that the ok button saved changes and added a cancel button for ease of exiting the program.
Those changes did not help in the script using the new parameters.
So after looking at "The benefits of a Configuration file" example,
I then added ". /tmp/geometry" right after the first line of the script.
This ran the /tmp/geometry file to pass the saved parameters to the script.
And in running it settings were retained and used on the next run of the script.
If you want to see my mods to his script in their entirety, I will post it as code.
I made 2 changes to it and now it works.
First, I moved the action line so that the ok button saved changes and added a cancel button for ease of exiting the program.
Those changes did not help in the script using the new parameters.
So after looking at "The benefits of a Configuration file" example,
I then added ". /tmp/geometry" right after the first line of the script.
This ran the /tmp/geometry file to pass the saved parameters to the script.
And in running it settings were retained and used on the next run of the script.
If you want to see my mods to his script in their entirety, I will post it as code.
True, - I thought that was the question. Save size and placement for next run Foolish me8-bit wrote:After playing with Zigbert's example script, and not having it work correctly, it dawned on me that the /tmp/geometry file was not being run upon rerunning the script.
Pmusic uses this technique.
Sigmund