summaryrefslogtreecommitdiff
path: root/ui/gtk/file_dlg.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-07-16 20:46:13 +0000
committerGerald Combs <gerald@wireshark.org>2012-07-16 20:46:13 +0000
commit281e18d6360be0db1adf0f5eec992f5d7689b5cd (patch)
tree76ef7d4ad8646f1359fdcbf7e4d889255b126f80 /ui/gtk/file_dlg.h
parenta3d1900fbd7e95f048d9393e7774a2adf4785f86 (diff)
downloadwireshark-281e18d6360be0db1adf0f5eec992f5d7689b5cd.tar.gz
Move most of file_open_cmd to gtk_open_file. Make gtk_open_file
and win32_open_file behave similarly. _snwprintf is "banned". Use StringCchPrintf instead. Tested on Windows. I'll test on OS X shortly. svn path=/trunk/; revision=43756
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 b6fda4e4a4..b1bff57499 100644
--- a/ui/gtk/file_dlg.h
+++ b/ui/gtk/file_dlg.h
@@ -77,6 +77,15 @@ extern GtkWidget *file_selection_new(const gchar *title, file_selection_action_t
*/
extern gboolean file_selection_set_current_folder(GtkWidget *fs, const gchar *filename);
+/** Set the current file for a file selection dialog.
+ *
+ * @param fs the file selection dialog from file_selection_new()
+ * @param filename the folder to set
+ * @return TRUE if the folder could be changed successfully
+ */
+#define file_selection_set_current_file(chooser, filename) \
+ gtk_file_chooser_set_filename(chooser, filename)
+
/** Set the "extra" widget for a file selection dialog. This is needed to support
* user-supplied options.
*