Re: gtkmm-list Digest, Vol 78, Issue 5

Yes, I thought so, but when I run the program from command shell window, I see that the form closes, but the program does not terminate. My main loop is exactly the same as yours.

2010/10/8 <gtkmm-list-request gnome org>
Send gtkmm-list mailing list submissions to
       gtkmm-list gnome org

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
       gtkmm-list-request gnome org

You can reach the person managing the list at
       gtkmm-list-owner gnome org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gtkmm-list digest..."

Today's Topics:

  1. Re: main form hide() (Jim Orcheson)

---------- Továbított levél ----------
From: Jim Orcheson <jim va3hj ca>
To: gtkmm-list gnome org
Date: Thu, 07 Oct 2010 07:11:18 -0400
Subject: Re: main form hide()
Does your main loop look like this?:

int main(int argc, char *argv[]) {
    Gtk::Main kit(argc, argv);
    MainForm mainform;

    return 0;

If it does, then your hide() call should close MainForm and terminate the loop. The call to exit(0) is not needed.


On 06/10/2010 4:36 PM, István Kelemen wrote:

I want to write a program that first show a main form, then pops up a login form. Then, if the person click OK (and the login was successful), the login form closes and the main form remains, if the person click Cancel, the main form also closes. I tried something like that below (only

#include "loginform.h"
#include "mainform.h"
#include <gtkmm/main.h>

    set_size_request(800, 600);

void MainForm::on_show()
    LoginForm loginform;
    if( ! )


It works, but I think, that calling exit(0) directly from the main loop is a bit rude. My problem is that hide() only closes the window, but does not exit the main loop. Gtk::Main::quit() is not good, because I started with Gtk::Main::run(mainform). Is there another way to do that?

Thanks for any help

Kelemen István

_______________________________________________ gtkmm-list mailing list gtkmm-list gnome org

gtkmm-list mailing list
gtkmm-list gnome org

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