The time now is Fri 24 May 2013, 11:29
All times are UTC - 4 |
|
Page 2 of 2 [21 Posts] |
Goto page: Previous 1, 2 |
| Author |
Message |
8-bit

Joined: 03 Apr 2007 Posts: 3016 Location: Oregon
|
Posted: Fri 12 Mar 2010, 20:31 Post subject:
|
|
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.
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3016 Location: Oregon
|
Posted: Fri 12 Mar 2010, 20:41 Post subject:
|
|
| 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. |
Is gposil's patched version going to be included in future Puppy versions and does it expand on Patriot's version?
Also, where is the gposil version?
And lastly, will the modified versions work with exsisting gtkdialog scripts?
|
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 4006 Location: Arizona, U.S.A.
|
Posted: Fri 12 Mar 2010, 21:28 Post subject:
|
|
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... ).
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6866 Location: Perth, Western Australia
|
Posted: Fri 12 Mar 2010, 22:24 Post subject:
|
|
| 8-bit wrote: | | 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. |
Is gposil's patched version going to be included in future Puppy versions and does it expand on Patriot's version?
Also, where is the gposil version?
And lastly, will the modified versions work with exsisting gtkdialog scripts? |
Oh sorry, I meant Patriot's patch, not gposil.
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3016 Location: Oregon
|
Posted: Sat 13 Mar 2010, 04:05 Post subject:
Subject description: Followup on Zigbert's retained window size & placment example |
|
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.
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5243 Location: Valåmoen, Norway
|
Posted: Sat 13 Mar 2010, 05:14 Post subject:
Subject description: Followup on Zigbert's retained window size & placment example |
|
| 8-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. | True, - I thought that was the question. Save size and placement for next run Foolish me
Pmusic uses this technique.
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
|
|
Page 2 of 2 [21 Posts] |
Goto page: Previous 1, 2 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|