static char * fi_gui_get_alias(GtkWidget *widget) { GtkTreeModel *model; GtkTreeIter iter; g_return_val_if_fail(widget, NULL); if (drag_get_iter(GTK_TREE_VIEW(widget), &model, &iter)) { static const GValue zero_value; GValue value; value = zero_value; gtk_tree_model_get_value(model, &iter, 0, &value); return g_strdup(g_value_get_string(&value)); } else { return NULL; } }
char * search_gui_get_local_file_url(GtkWidget *widget) { const struct result_data *data; const char *pathname; GtkTreeModel *model; GtkTreeIter iter; g_return_val_if_fail(widget, NULL); if (!drag_get_iter(GTK_TREE_VIEW(widget), &model, &iter)) return NULL; data = get_result_data(model, &iter); if (!(ST_LOCAL & data->record->results_set->status)) return NULL; pathname = data->record->tag; if (NULL == pathname) return NULL; return url_from_absolute_path(pathname); }