示例#1
0
static void
manager_show_window (GSManager *manager,
                     GSWindow  *window)
{
	GSJob *job;

	apply_background_to_window (manager, window);

	job = gs_job_new_for_widget (gs_window_get_drawing_area (window));

	manager_select_theme_for_job (manager, job);
	manager_add_job_for_window (manager, window, job);

	manager->priv->activate_time = time (NULL);

	if (manager->priv->lock_timeout >= 0)
	{
		remove_lock_timer (manager);
		add_lock_timer (manager, manager->priv->lock_timeout);
	}

	if (manager->priv->cycle_timeout >= 10000)
	{
		remove_cycle_timer (manager);
		add_cycle_timer (manager, manager->priv->cycle_timeout);
	}

	add_unfade_idle (manager);

	/* FIXME: only emit signal once */
	g_signal_emit (manager, signals [ACTIVATED], 0);
}
示例#2
0
void
gs_manager_show_content (GSManager *manager)
{
        GSList *l;

        if (manager->priv->show_content)
                return;

        manager->priv->show_content = TRUE;

        for (l = manager->priv->windows; l; l = l->next) {
                gtk_widget_queue_draw (gs_window_get_drawing_area (l->data));
        }
}
示例#3
0
static void
disconnect_window_signals (GSManager *manager,
                           GSWindow  *window)
{
        GtkWidget *drawing_area = gs_window_get_drawing_area (window);

#if GTK_CHECK_VERSION(3, 0, 0)
        g_signal_handlers_disconnect_by_func (drawing_area, content_draw_cb, manager);
#else
        g_signal_handlers_disconnect_by_func (drawing_area, content_expose_cb, manager);
#endif

        g_signal_handlers_disconnect_by_func (window, window_map_event_cb, manager);
        g_signal_handlers_disconnect_by_func (window, window_grab_broken_cb, manager);
}
示例#4
0
static void
connect_window_signals (GSManager *manager,
                        GSWindow  *window)
{
        GtkWidget *drawing_area = gs_window_get_drawing_area (window);

#if GTK_CHECK_VERSION(3, 0, 0)
        g_signal_connect_object (drawing_area, "draw",
                                 G_CALLBACK (content_draw_cb), manager, 0);
#else
        g_signal_connect_object (drawing_area, "expose-event",
                                 G_CALLBACK (content_expose_cb), manager, 0);
#endif

        g_signal_connect_object (window, "destroy",
                                 G_CALLBACK (window_destroyed_cb), manager, 0);
        g_signal_connect_object (window, "map_event",
                                 G_CALLBACK (window_map_event_cb), manager, G_CONNECT_AFTER);
        g_signal_connect_object (window, "grab_broken_event",
                                 G_CALLBACK (window_grab_broken_cb), manager, G_CONNECT_AFTER);
}