コード例 #1
0
static void
restore_cursor (ETreeSelectionModel *etsm,
                ETreeModel *etm)
{
	clear_selection (etsm);
	etsm->priv->cursor_path = NULL;

	if (etsm->priv->cursor_save_id) {
		etsm->priv->cursor_path = e_tree_model_get_node_by_id (
			etm, etsm->priv->cursor_save_id);
		if (etsm->priv->cursor_path != NULL && etsm->priv->cursor_col == -1)
			etsm->priv->cursor_col = 0;

		select_single_path (etsm, etsm->priv->cursor_path);
	}

	e_selection_model_selection_changed (E_SELECTION_MODEL (etsm));

	if (etsm->priv->cursor_path) {
		gint cursor_row = get_cursor_row (etsm);
		e_selection_model_cursor_changed (
			E_SELECTION_MODEL (etsm),
			cursor_row, etsm->priv->cursor_col);
	} else {
		e_selection_model_cursor_changed (
			E_SELECTION_MODEL (etsm), -1, -1);
		e_selection_model_cursor_activated (
			E_SELECTION_MODEL (etsm), -1, -1);

	}

	free_id (etsm);
}
コード例 #2
0
static void
etsm_node_data_changed (ETreeModel *etm,
                        ETreePath node,
                        ETreeSelectionModel *etsm)
{
	free_id (etsm);
}
コード例 #3
0
ファイル: radeon_cs_gem.c プロジェクト: Amazi/libdrm-1
static int cs_gem_destroy(struct radeon_cs_int *cs)
{
    struct cs_gem *csg = (struct cs_gem*)cs;

    free_id(cs->id);
    free(csg->relocs_bo);
    free(cs->relocs);
    free(cs->packets);
    free(cs);
    return 0;
}
コード例 #4
0
ファイル: odp_thread.c プロジェクト: leitao/odp
int odp_thread_term_local(void)
{
	int num;
	int id = this_thread->thr;

	odp_spinlock_lock(&thread_globals->lock);
	num = free_id(id);
	odp_spinlock_unlock(&thread_globals->lock);

	if (num < 0) {
		ODP_ERR("failed to free thread id %i", id);
		return -1;
	}

	return num; /* return a number of threads left */
}