gtk help request: gtk_widget_destroy freezes application



hello,
        I have a frame in a window.
I destroy the frame when a button is clicked in the
frame. But either the application simply freezes or
gives segmentation fault. (When the application freezes windows
can be moved but the application does'nt respond to any input.)
The code is given at the end. Can somebody please help.
                        Thank you,
                        with regards,
                        Santosh.


        // the click of button that initiates the frame destroying
        g_signal_connect(G_OBJECT(close_button), "clicked", 
G_CALLBACK(FrameGuiOnClickDestroy), G_OBJECT(frame_gui));

close_button is part of frame_gui

// the button clicked, destroying the frame button
void FrameGuiOnClickDestroy(GtkWidget *button, gpointer frame_gui)
{
        gtk_widget_destroy(content_gui)
}

         // the function to be called for destroying the frame
         g_signal_connect(G_OBJECT(frame_gui), "destroy",
G_CALLBACK(FrameGuiDestroy), NULL);


// destroying the frame button
FrameGuiDestroy(GtkWidget *container, gpointer data)
{
        // some static variables destroyed
}




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