Ejemplo n.º 1
0
static void
progress_ui_handler_update_unity_launcher_entry (NemoProgressUIHandler *self,
                                                 NemoProgressInfo *info,
                                                 UnityLauncherEntry *entry)
{
	g_return_if_fail (self);
	g_return_if_fail (entry);

	if (self->priv->active_infos > 0) {
		unity_launcher_entry_set_progress_visible (entry, TRUE);
		progress_ui_handler_show_unity_quicklist (self, entry, TRUE);
		progress_ui_handler_unity_progress_changed (NULL, self);

		if (self->priv->active_infos > 1) {
			unity_launcher_entry_set_count (entry, self->priv->active_infos);
			unity_launcher_entry_set_count_visible (entry, TRUE);
		} else {
			unity_launcher_entry_set_count_visible (entry, FALSE);
		}
	} else {
		unity_launcher_entry_set_progress_visible (entry, FALSE);
		unity_launcher_entry_set_progress (entry, 0.0);
		unity_launcher_entry_set_count_visible (entry, FALSE);
		progress_ui_handler_show_unity_quicklist (self, entry, FALSE);
		GCancellable *pc = nemo_progress_info_get_cancellable (info);

		if (!g_cancellable_is_cancelled (pc)) {
			unity_launcher_entry_set_urgent (entry, TRUE);

			g_timeout_add_seconds (2, (GSourceFunc)
				               progress_ui_handler_disable_unity_urgency,
					       entry);
		}
	}
}
Ejemplo n.º 2
0
static gboolean
progress_ui_handler_disable_unity_urgency (UnityLauncherEntry *entry)
{
	g_return_if_fail (entry);

	unity_launcher_entry_set_urgent (entry, FALSE);
	return FALSE;
}
Ejemplo n.º 3
0
void ResizerUnity::finished()
{
    unity_launcher_entry_set_urgent (unity, true);

    QEventLoop *loop = new QEventLoop;

    QTimer *timer = new QTimer;
    timer->setSingleShot(true);

    connect(timer,SIGNAL(timeout()),loop,SLOT(quit()));

    timer->start(500);

    loop->exec();
}