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 Wed 30 Jul 2014, 03:07
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Why does not close the dialog? [solved]
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
der-schutzhund

Joined: 26 Nov 2007
Posts: 781
Location: Blomberg / Germany

PostPosted: Mon 28 Jan 2013, 15:52    Post subject:  Why does not close the dialog? [solved]
Subject description: The dialog does not close when save button is pressed
 

Hello together,

the following code is at the end of a Bashscript.
Can someone tell me why the dialog window does not close, when I press the "Save" button?
Pressing "OK" and "cancel", the dialog closes normally!

Code:

.
.
export MAIN_DIALOG='
  <window title="Oberfläche geändert..">
  <vbox>
  <text><label>Achtung! Geänderte Oberfläche jetzt speichern?</label></text>
  <hbox>
   <button>
   <label>save</label>
   <action>cp /usr/local/variomen/data/iconsetup_TEMP '$1' &</action>
   </button>
   <button ok></button>
   <button cancel></button>
  </hbox>
 </vbox>
 </window>'

if [ "$vorlang" != "$templang" ]
then
 gtkdialog --program=MAIN_DIALOG
 unset MAIN_DIALOG
fi

exit 0


Greetings

Wolfgang

Last edited by der-schutzhund on Mon 28 Jan 2013, 17:23; edited 1 time in total
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1044

PostPosted: Mon 28 Jan 2013, 16:09    Post subject:  

Try this:
Code:
<action>cp /usr/local/variomen/data/iconsetup_TEMP '$1' &</action>
<action type="exit">save_pressed</action>

The 'save_pressed' phrase can be replaced with something else.
It will be returned in shell as:
Quote:
EXIT="save_pressed"

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Mon 28 Jan 2013, 16:57    Post subject:  

der-schutzhund,

Unless the buttons have a "close" associated with them like "cancel" or "ok", the dialog stays open. Since created buttons can have any number of additional actions, it is very flexible.

In addition to the close action mentioned by SFR, you can do this
Code:
<action>exit:save_pressed</action>


I haven't noticed any difference between the two methods.

Cheers,
s
Back to top
View user's profile Send private message 
der-schutzhund

Joined: 26 Nov 2007
Posts: 781
Location: Blomberg / Germany

PostPosted: Mon 28 Jan 2013, 17:22    Post subject:  

Thank you very much for your help! It works!

Many greetings

Wolfgang
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
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.0482s ][ Queries: 12 (0.0055s) ][ GZIP on ]