summaryrefslogtreecommitdiff
path: root/gtk/dlg_utils.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-03-29 22:40:58 +0000
committerGuy Harris <guy@alum.mit.edu>2004-03-29 22:40:58 +0000
commit29c644691b49c655372aa355f51b4e33eaef7d99 (patch)
tree6719c44647f45c9072ae42483e919cad6d7f6046 /gtk/dlg_utils.h
parent08c04ec97398e122efff4fb3c5145716ed110525 (diff)
downloadwireshark-29c644691b49c655372aa355f51b4e33eaef7d99.tar.gz
Make "file_selection_new()" take as its second argument an
Ethereal-defined indication of the action (open vs. save), regardless of whether we're building for GTK+ >= 2.4 or not; we just ignore the argument in pre-2.4 GTK+. Use "file_selection_new()" rather than #if'ed code to use it or "gtk_file_chooser_dialog_new()" for GTK+ >= 2.4 and "gtk_file_selection_new()" or it for pre-2.4 GTK+. Add a "file_selection_set_current_folder()" routine that does the appropriate thing depending on whether we're GTK+ >= 2.4 or not, and use that rather than #if'ed code to use "gtk_file_chooser_set_current_folder()" or "gtk_file_selection_set_filename()". svn path=/trunk/; revision=10511
Diffstat (limited to 'gtk/dlg_utils.h')
-rw-r--r--gtk/dlg_utils.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/gtk/dlg_utils.h b/gtk/dlg_utils.h
index ed7edc2299..32e77b0c21 100644
--- a/gtk/dlg_utils.h
+++ b/gtk/dlg_utils.h
@@ -1,7 +1,7 @@
/* dlg_utils.h
* Declarations of utilities to use when constructing dialogs
*
- * $Id: dlg_utils.h,v 1.10 2004/03/27 11:16:58 oabad Exp $
+ * $Id: dlg_utils.h,v 1.11 2004/03/29 22:40:57 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -30,11 +30,14 @@ extern GtkWidget *dlg_window_new(const gchar *);
/* Create a file selection dialog box window that belongs to Ethereal's
main window. */
-#if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2
-extern GtkWidget *file_selection_new(const gchar *, GtkFileChooserAction);
-#else
-extern GtkWidget *file_selection_new(const gchar *);
-#endif
+typedef enum {
+ FILE_SELECTION_OPEN,
+ FILE_SELECTION_SAVE
+} file_selection_action_t;
+extern GtkWidget *file_selection_new(const gchar *, file_selection_action_t);
+
+/* Set the current folder for a file selection dialog. */
+extern gboolean file_selection_set_current_folder(GtkWidget *, const gchar *);
/* Create a button row for a dialog */
/* the button widgets will be available by OBJECT_GET_DATA(stock_id) */