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 Sun 26 Oct 2014, 01:42
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 Posts_count  
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]
Sub_title: 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

Edited_time_total
Back to top
View user's profile Send_private_message 
SFR


Joined: 26 Oct 2011
Posts: 1078

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: 887

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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0463s ][ Queries: 11 (0.0044s) ][ GZIP on ]