RE: Dialog closing prematurely with response code of 0
- From: "Kevin Lambert" <kl lapis com>
- To: <gtk-app-devel-list gnome org>
- Subject: RE: Dialog closing prematurely with response code of 0
- Date: Thu, 22 Mar 2007 09:20:47 -0400
I wasn't expecting you to be able to compile the code since it is a small
piece of a much larger application. From a quick review of your attached
code it looks like each of the dialogs gtk_dialog_run() drops out to select
the next dialog and thus is not an arbitrary depth. You are processing the
response value of each dialog to see whether you need the next dialog to
appear which is not the behaviour I am looking for.
I have a button in DispenserLoadDialog that launches DispenserLoadingDialog
without emitting a return value for DispenserLoadDialog. The response value
from DispenserLoadingDialog is only supposed to be caught by the buttons
code and shouldn't be causing gtk_dialog_run() in DispenserLoadDialog to
return with an invalid response.
DispenserLoadDialog->gtk_dialog_run() started with the DispenserLoadDialog
dialog pointer passed in
Load Button pushed which causes load_button_clicked to be executed
load_button_clicked() launches DispenserLoadingDialog()
DispenserLoadingDialog->gtk_dialog_run() started with the
DispenserLoadingDialog dialog pointer passed in
Ok button in DispenserLoadingDialog pressed which causes
ok_button_clicked to be executed
ok_button_clicked() calls gtk_dialog_response() with GTK_RESPONSE_OK
and the DispenserLoadingDialog pointer as the first parameter
load_button_clicked() finishes executing WITHOUT calling
DispenserLoadDialog->gtk_dialog_run() returns with a response code of 0
(which is invalid as far as the documenation is concerned).
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org] On Behalf Of David Neèas
Sent: Thursday, March 22, 2007 9:09 AM
To: gtk-app-devel-list gnome org
Subject: Re: Dialog closing prematurely with response code of 0
On Thu, Mar 22, 2007 at 08:53:34AM -0400, Kevin Lambert wrote:
Evidentally nothing, I don't know how many people have a GtkWindow
kicking off a GtkDialog which then kicks off another GtkDialog...
I have. Moreover, the attached code demonstrated arbitrary deep nesting of
modal dialogs that works.
DispenserLoadDialog::load_button_clicked() kicks off
DispenserLoadingDialog. When either
DispenserLoadingDialog::cancel_button_clicked() are pressed the
DispenserLoadingDialog is removed and
DispenserLoadDialog::load_button_clicked() finishes executing but then the
gtk_dialog_run in DispenserLoadDialog returns with a response id of 0.
If this is the code, how does one compile and execute it?
Well, at least we have found you have the problem in some bindings with some
unknown custom dialog class.
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
] [Thread Prev