Logo Search packages:      
Sourcecode: inkscape version File versions

unsigned int sp_ui_close_all ( void   ) 

sp_ui_close_all

This function is called to exit the program, and iterates through all open document view windows, attempting to close each in turn. If the view has unsaved information, the user will be prompted to save, discard, or cancel.

Returns FALSE if the user cancels the close_all operation, TRUE otherwise.

Definition at line 339 of file interface.cpp.

References SPDesktop::destroyWidget(), and SPDesktop::shutdown().

Referenced by sp_file_exit().

{
    /* Iterate through all the windows, destroying each in the order they
       become active */
    while (SP_ACTIVE_DESKTOP) {
      SPDesktop *dt = SP_ACTIVE_DESKTOP;
      if (dt->shutdown()) {
            /* The user canceled the operation, so end doing the close */
            return FALSE;
        }
      // Shutdown can proceed; use the stored reference to the desktop here instead of the current SP_ACTIVE_DESKTOP,
      // because the user might have changed the focus in the meantime (see bug #381357 on Launchpad)
      dt->destroyWidget();
    }

    return TRUE;
}


Generated by  Doxygen 1.6.0   Back to index