Beispiel #1
0
void toggle_window_visible ()
{
	if (gtk_widget_get_visible (window)) {
		main_window_save_state ();
		gtk_widget_hide (window);
	} else {
		gtk_window_present (GTK_WINDOW(window));
	}
}
Beispiel #2
0
void
rookie_misc_quit ()
{
	g_object_unref (g_download_list_controller_get ());
	g_object_unref (g_download_list_get ());

	main_window_save_state ();
	categories_finalize ();
	rookie_settings_finalize ();

	gtk_main_quit ();
}
Beispiel #3
0
gboolean quit(gpointer data)
{
	const gchar *cmd[] = {"quit", NULL};
	gmpv_handle *ctx = data;

	if(ctx->mpv_ctx)
	{
		mpv_command(ctx->mpv_ctx, cmd);
		mpv_quit(ctx);

		ctx->mpv_ctx = NULL;
	}

	if(!ctx->gui->fullscreen)
	{
		main_window_save_state(ctx->gui);
	}

	g_application_quit(G_APPLICATION(ctx->app));

	return FALSE;
}