summaryrefslogtreecommitdiff
path: root/ui/gtk/file_dlg.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-06-21 22:21:02 +0000
committerGuy Harris <guy@alum.mit.edu>2012-06-21 22:21:02 +0000
commit204ea39c5d87a834580531f32916fa0d8bec53c3 (patch)
treea2e44f8ce3a82fba36b5f9aab2141be842be21cc /ui/gtk/file_dlg.h
parenta0148735c18d44b75a26f3d265c70aabcf0aefd6 (diff)
downloadwireshark-204ea39c5d87a834580531f32916fa0d8bec53c3.tar.gz
Move a bunch of common code in the file chooser dialog loops into a
routine to run a file chooser dialog. On Windows, add to that code to resolve shell links ("shortcuts"), adopted from the Sylpheed mail reader. (That code requires a pile of OLE stuff, so link with the OLE library.) Make it a bit easier to configure ui/gtk/capture_file_dlg.c to use GTK+ dialogs on Windows, but continue to default to using the Win32 dialogs, at least for now. svn path=/trunk/; revision=43439
Diffstat (limited to 'ui/gtk/file_dlg.h')
-rw-r--r--ui/gtk/file_dlg.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/gtk/file_dlg.h b/ui/gtk/file_dlg.h
index 9ee50f1afd..47da219e77 100644
--- a/ui/gtk/file_dlg.h
+++ b/ui/gtk/file_dlg.h
@@ -85,6 +85,15 @@ extern gboolean file_selection_set_current_folder(GtkWidget *fs, const gchar *fi
*/
extern void file_selection_set_extra_widget(GtkWidget *fs, GtkWidget *extra);
+/** Run the dialog, and handle some common operations, such as, if the
+ * user selects a directory, browsing that directory, and handling
+ * shortcuts on Windows.
+ * @param fs the file selection dialog from file_selection_new()
+ * @return the pathname of the selected file if the user selected a
+ * file, NULL if they cancelled or closed the dialog.
+ */
+extern gchar *file_selection_run(GtkWidget *fs);
+
#ifndef _WIN32
/** If the specified file doesn't exist, return TRUE.
* If it exists and is neither user-immutable nor not writable, return