| View previous topic :: View next topic |
| Author |
Message |
syn
Joined: 12 May 2006 Posts: 46 Location: Hamburg
|
Posted: Sat Jul 15, 2006 1:04 pm Post subject: modal window from glade |
|
|
Hmmm, i really dont know why, but i cant create a MODAL window in my application (winXp). Every method, i used by now, could not make the popups modal.
What methods should i use, to let a popup never switch to background eg. a filedialog.
Another thing, i dont get by now. If i create a popup and hit the [X] close-button, how can i handle this action.
Regards,
andreas |
|
| Back to top |
|
 |
cweiske
Joined: 08 Dec 2005 Posts: 454 Location: Leipzig/Germany
|
Posted: Sat Jul 15, 2006 1:41 pm Post subject: |
|
|
You have to use set_modal(true) and set_transient_for($parentwindow).
The signals to handle close events are destroy and delete, delete is called before and can be cancelled by returning true or false in the handler |
|
| Back to top |
|
 |
syn
Joined: 12 May 2006 Posts: 46 Location: Hamburg
|
Posted: Sun Jul 16, 2006 9:43 pm Post subject: |
|
|
Hi, that works fine.
Thank you |
|
| Back to top |
|
 |
syn
Joined: 12 May 2006 Posts: 46 Location: Hamburg
|
Posted: Mon Jul 31, 2006 1:29 pm Post subject: |
|
|
Ok.. another problem.
i use use set_modal(true) and set_transient_for($parentwindow) for my open_win_confirm() method.
I have problems, if i open more than one window (or one popup opens another popup). If i close the last window, everything looks fine, but if i close the first window opened, the main-application complete loose his focus an is complete in backround off all other windows on desctop.
Maybe there is a problem with $parentwindow? |
|
| Back to top |
|
 |
squirrel
Joined: 02 May 2006 Posts: 10 Location: Switzerland
|
Posted: Wed Aug 02, 2006 10:52 pm Post subject: |
|
|
I'm using the following work around for this problem:
| Code: | ...
// $win is the dialog
gtk::main_quit();
if ($win->get_transient_for()) {
$win->get_transient_for()->present();
}
... |
|
|
| Back to top |
|
 |
syn
Joined: 12 May 2006 Posts: 46 Location: Hamburg
|
Posted: Fri Aug 25, 2006 9:40 am Post subject: |
|
|
Hi,
this doesn´t work for me... is there any other way to create a modal window?
Regards,
andreas |
|
| Back to top |
|
 |
|