예제 #1
0
void on_quit1_activate(GtkWidget *widget)
{
    if (!main_window_delete_event(NULL, NULL, NULL)) {
        quit_application();
        gtk_main_quit ();
    }
}
예제 #2
0
파일: main.c 프로젝트: wazari972/Grisbi
/**
 * close grisbi by destroying the main window
 * This function is called by the Quit menu option.
 *
 * \param
 *
 * \return FALSE
 * */
gboolean gsb_main_grisbi_close ( void )
{
    devel_debug (NULL);
    /* sauvegarde la position de la fenetre principale */
    if ( conf.full_screen == 0 && conf.maximize_screen == 0 )
        gtk_window_get_position ( GTK_WINDOW ( run.window ), &conf.root_x, &conf.root_y );

    /* sauvegarde de la taille de la fenêtre si nécessaire */
    if ( conf.full_screen == 0 && conf.maximize_screen == 0 )
        gtk_window_get_size ( GTK_WINDOW ( run.window ), &conf.main_width, &conf.main_height );

    if ( !main_window_delete_event ( run.window, NULL ) )
        gtk_widget_destroy ( run.window );

    /* clean finish of the debug file */
    if ( etat.debug_mode )
        gsb_debug_finish_log ( );

    return FALSE;
}