[Glade-users] Signal question.

This is a topic from a couple of months back between Alexey and Peter  
Keller, and I have just run into the exact same problem. However, this  
solution is not working for me

I have a main window, which opens a pop up window. And when I close  
the pop up window (by pressing the 'x' in the corner) it destroys the  
pop up window, and I can no longer open it again. I esentially want  
the pop up window to hide, instead of being destroyed.

I have tried connecting the on _pop_up_window_destroy_event,on  
_pop_up_window_destroy and on _pop_up_window_delete_event such that  
the window should hide

def on _pop_up_window_destroy_event(widget,data,wtree)
        return True

def on _pop_up_window_destroy_event(widget,data,wtree)
        return True

def on _pop_up_window_destroy_event(widget,data,wtree)
        return True

It doesn't make a difference, the window is still destroyed. Also I  
don't know why i'm returning True, just blindly following the previous  

Any help would be appreciated

Peyman Askari

On 13 Oct 2008, at 21:29, Alexey Kurochkin wrote:

On Mon, 2008-10-13 at 10:41 -0500, Peter Keller wrote:

When implementing the generic Help->About menuitem using glade-3 and
gtk+-2.0, I have it call a signal which gtk_widget_shows the dialog
box. For the dialog box, the response function (which is apparently  
close button) end up calling gtk_widget_hide to make it go away.

However, when I close the window using the window manager buttons in
the corner of the window, it seems the dialog box is forever  
and unable to be gotten back again.

I've tried connecting a signal to the GtkObject destroy signal to  
the window instead, and it is called--but the window is destroyed  

Any suggesstions?

I do not think GtkObject's "destroy" is the right signal. You might  
to try connecting gtk_widget_hide_on_delete() to "delete-event" signal
on the widget, or any custom function for that matter which would call
gtk_widget_hide() and return TRUE.

Glade-users maillist  -  Glade-users at lists.ximian.com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]