/* capture_dlg.c
* Routines for packet capture windows
*
- * $Id: capture_dlg.c,v 1.83 2003/09/10 07:02:25 guy Exp $
+ * $Id: capture_dlg.c,v 1.84 2003/09/24 08:43:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
return;
}
- fs = gtk_file_selection_new ("Ethereal: Capture File");
+ fs = file_selection_new ("Ethereal: Capture File");
/* If we've opened a file, start out by showing the files in the directory
in which that file resided. */
/* dlg_utils.c
* Utilities to use when constructing dialogs
*
- * $Id: dlg_utils.c,v 1.11 2003/09/20 04:59:43 guy Exp $
+ * $Id: dlg_utils.c,v 1.12 2003/09/24 08:43:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
GtkWidget *
dlg_window_new(const gchar *title)
{
- GtkWidget *win;
+ GtkWidget *win;
#if GTK_MAJOR_VERSION < 2
- win = gtk_window_new(GTK_WINDOW_DIALOG);
+ win = gtk_window_new(GTK_WINDOW_DIALOG);
#else
- win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER_ON_PARENT);
+ win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER_ON_PARENT);
#endif
- gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(top_level));
- gtk_window_set_title(GTK_WINDOW(win), title);
- SIGNAL_CONNECT(win, "realize", window_icon_realize_cb, NULL);
- return win;
+ gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(top_level));
+ gtk_window_set_title(GTK_WINDOW(win), title);
+ SIGNAL_CONNECT(win, "realize", window_icon_realize_cb, NULL);
+ return win;
+}
+
+/* Create a file selection dialog box window that belongs to Ethereal's
+ main window. */
+GtkWidget *
+file_selection_new(const gchar *title)
+{
+ GtkWidget *win;
+
+ win = gtk_file_selection_new(title);
+#if GTK_MAJOR_VERSION >= 2
+ gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER_ON_PARENT);
+#endif
+ gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(top_level));
+ return win;
}
/* Set the "activate" signal for a widget to call a routine to
/* dlg_utils.h
* Declarations of utilities to use when constructing dialogs
*
- * $Id: dlg_utils.h,v 1.6 2002/08/28 21:03:47 jmayer Exp $
+ * $Id: dlg_utils.h,v 1.7 2003/09/24 08:43:34 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
/* Create a dialog box window that belongs to Ethereal's main window. */
GtkWidget *dlg_window_new(const gchar *);
+/* Create a file selection dialog box window that belongs to Ethereal's
+ main window. */
+GtkWidget *file_selection_new(const gchar *);
+
/* Set the "activate" signal for a widget to call a routine to
activate the "OK" button for a dialog box. */
void dlg_set_activate(GtkWidget *widget, GtkWidget *ok_button);
/* file_dlg.c
* Dialog boxes for handling files
*
- * $Id: file_dlg.c,v 1.60 2003/09/20 04:59:43 guy Exp $
+ * $Id: file_dlg.c,v 1.61 2003/09/24 08:43:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
return;
}
- file_open_w = gtk_file_selection_new ("Ethereal: Open Capture File");
- gtk_window_set_transient_for(GTK_WINDOW(file_open_w), GTK_WINDOW(top_level));
-#if GTK_MAJOR_VERSION >= 2
- gtk_window_set_position(GTK_WINDOW(file_open_w), GTK_WIN_POS_CENTER_ON_PARENT);
-#endif
+ file_open_w = file_selection_new ("Ethereal: Open Capture File");
SIGNAL_CONNECT(file_open_w, "destroy", file_open_destroy_cb, NULL);
#if GTK_MAJOR_VERSION < 2
marked = FALSE;
filetype = cfile.cd_t;
- file_save_as_w = gtk_file_selection_new ("Ethereal: Save Capture File As");
- gtk_window_set_transient_for(GTK_WINDOW(file_save_as_w), GTK_WINDOW(top_level));
-#if GTK_MAJOR_VERSION >= 2
- gtk_window_set_position(GTK_WINDOW(file_save_as_w), GTK_WIN_POS_CENTER_ON_PARENT);
-#endif
+ file_save_as_w = file_selection_new ("Ethereal: Save Capture File As");
SIGNAL_CONNECT(file_save_as_w, "destroy", file_save_as_destroy_cb, NULL);
/* If we've opened a file, start out by showing the files in the directory
/* print_dlg.c
* Dialog boxes for printing
*
- * $Id: print_dlg.c,v 1.42 2003/09/10 22:23:58 guy Exp $
+ * $Id: print_dlg.c,v 1.43 2003/09/24 08:43:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
return;
}
- fs = gtk_file_selection_new ("Ethereal: Print to File");
+ fs = file_selection_new ("Ethereal: Print to File");
/* If we've opened a file, start out by showing the files in the directory
in which that file resided. */