[Glade-users] using gtk_main_quit() as a callback function




        
        Hi All,
        
          I'm brand new to GTK programmiong and glade, and I'm using
        Python,
        which I'm also new at.  I have been successful at adding a
        callback
        function to the GObject-Destroy event of the main window, and
        then
        coding the callback function to merely call gtk_main_quit(),
        which in
        Python is gtk.main_quit().  But if I try in glade to set the
        callback
        for that same event to be gtk_main_quit (which the
        auto-complletion
        feature is happy to help me with...) I get nothing, the main
        loop
        continues after the window is gone.  All the examples I've seen
        in
        python either have a user-provided callback call gtk.main_quit()
        or,
        equally as undesireable, a user-provided dictionary to equate
        on_window1_destroy_event_cb with gtk.main_quit().
        
          My goal is to have a simple (trivial) way to set up any
        project I
        write to exit when the main window is destroyed, without having
        to code
        it in by hand each time.  Seems like assigning the callback
        directly in
        glade should work, but it doesn't; what gives ?
        
        Here's a snip from the .glade file :
        
         <widget class="GtkWindow" id="window1">
          <property name="visible">True</property>
           <property name="events">GDK_STRUCTURE_MASK |
                                   GDK_SUBSTRUCTURE_MASK</property>
            <signal name="destroy" handler="gtk_main_quit"/>
         
        
        TIA
        
        





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