comparison 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
comparison
equal deleted inserted replaced
15849:3da9d5da9054 15850:65b45106bfbb
373 gboolean gnt_file_sel_get_dirs_only(GntFileSel *sel) 373 gboolean gnt_file_sel_get_dirs_only(GntFileSel *sel)
374 { 374 {
375 return sel->dirsonly; 375 return sel->dirsonly;
376 } 376 }
377 377
378 char *gnt_file_sel_get_selected_file(GntFileSel *sel)
379 {
380 char *ret;
381 const char *tmp;
382 tmp = (const char*)gnt_tree_get_selection_data(sel->dirsonly ? GNT_TREE(sel->dirs) : GNT_TREE(sel->files));
383 ret = g_strdup_printf("%s%s%s", sel->current, sel->current[1] ? G_DIR_SEPARATOR_S : "", tmp ? tmp : "");
384 return ret;
385 }
386
387 void gnt_file_sel_set_must_exist(GntFileSel *sel, gboolean must)
388 {
389 /*XXX: What do I do with this? */
390 sel->must_exist = must;
391 }
392
393 gboolean gnt_file_sel_get_must_exist(GntFileSel *sel)
394 {
395 return sel->must_exist;
396 }
397