diff finch/libgnt/gntfilesel.c @ 15850:65b45106bfbb

Use the file selector for request-file.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 20 Mar 2007 11:52:46 +0000
parents 3da9d5da9054
children f771cdcc551a b4086a92568f
line wrap: on
line diff
--- a/finch/libgnt/gntfilesel.c	Tue Mar 20 02:09:46 2007 +0000
+++ b/finch/libgnt/gntfilesel.c	Tue Mar 20 11:52:46 2007 +0000
@@ -375,3 +375,23 @@
 	return sel->dirsonly;
 }
 
+char *gnt_file_sel_get_selected_file(GntFileSel *sel)
+{
+	char *ret;
+	const char *tmp;
+	tmp = (const char*)gnt_tree_get_selection_data(sel->dirsonly ? GNT_TREE(sel->dirs) : GNT_TREE(sel->files));
+	ret = g_strdup_printf("%s%s%s", sel->current, sel->current[1] ? G_DIR_SEPARATOR_S : "", tmp ? tmp : "");
+	return ret;
+}
+
+void gnt_file_sel_set_must_exist(GntFileSel *sel, gboolean must)
+{
+	/*XXX: What do I do with this? */
+	sel->must_exist = must;
+}
+
+gboolean gnt_file_sel_get_must_exist(GntFileSel *sel)
+{
+	return sel->must_exist;
+}
+