Пример #1
0
void caja_main_event_loop_quit (gboolean explicit)
{
    if (explicit)
    {
        /* Explicit --quit, make sure we don't restart */

        /* To quit all instances, reset exit_with_last_window */
        exit_with_last_window = TRUE;

        if (event_loop_registrants == NULL)
        {
            /* If this is reached, caja must run in "daemon" mode
             * (i.e. !exit_with_last_window) with no windows open.
             * We need to quit_all here because the below loop won't
             * trigger a quit.
             */
            eel_gtk_main_quit_all();
        }

        /* TODO: With the old session we needed to set restart
           style to MATE_RESTART_IF_RUNNING here, but i don't think we need
           that now since mate-session doesn't restart apps except on startup. */
    }
    while (event_loop_registrants != NULL)
    {
        gtk_widget_destroy (event_loop_registrants->data);
    }
}
Пример #2
0
static gboolean
initial_event_loop_needed (gpointer data)
{
	if (!is_event_loop_needed ()) {
		eel_gtk_main_quit_all ();
	}
	return FALSE;
}
Пример #3
0
static void
event_loop_unregister (GtkObject *object)
{
	event_loop_registrants = g_slist_remove (event_loop_registrants, object);
	if (!is_event_loop_needed ()) {
		eel_gtk_main_quit_all ();
	}
}