Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 18 Apr 2014, 22:05
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Make gtkDialog appear in a given screen location? [Solved]
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [21 Posts]   Goto page: Previous 1, 2
Author Message
8-bit


Joined: 03 Apr 2007
Posts: 3279
Location: Oregon

PostPosted: 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
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3279
Location: Oregon

PostPosted: 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
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 4981
Location: Arizona, U.S.A.

PostPosted: 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... Laughing ).
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: 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/news/
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3279
Location: Oregon

PostPosted: 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
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5562
Location: Valåmoen, Norway

PostPosted: 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 Embarassed Foolish me Smile

Pmusic uses this technique.


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 2 [21 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

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
[ Time: 0.0512s ][ Queries: 12 (0.0042s) ][ GZIP on ]