"Null authentication");
gtk_box_pack_start(GTK_BOX(auth_vb), auth_null_rb, TRUE, TRUE, 0);
-#if GTK_MAJOR_VERSION >= 2
auth_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(auth_null_rb));
-#else
- auth_group = gtk_radio_button_group(GTK_RADIO_BUTTON(auth_null_rb));
-#endif
auth_passwd_rb = gtk_radio_button_new_with_label(auth_group,
"Password authentication");
gtk_box_pack_start(GTK_BOX(auth_vb), auth_passwd_rb, TRUE, TRUE, 0);
*m_resolv_cb, *n_resolv_cb, *t_resolv_cb,
*bbox, *ok_bt, *cancel_bt,
*help_bt;
-#if GTK_MAJOR_VERSION >= 2 /* For some reason this button's action crashes under GTK 1. */
#ifdef HAVE_AIRPCAP
GtkWidget *advanced_hb, *advanced_bt;
#endif
-#endif
#ifdef HAVE_PCAP_REMOTE
GtkWidget *iftype_om, *nocap_rpcap_cb, *datatx_udp_cb;
#ifdef HAVE_PCAP_SETSAMPLING
GtkAdjustment *samp_count_adj, *samp_timer_adj;
GSList *samp_group;
#endif
-#endif
-#if GTK_MAJOR_VERSION < 2
- GtkAccelGroup *accel_group;
#endif
GtkTooltips *tooltips;
GtkAdjustment *snap_adj, *ringbuffer_nbf_adj,
tooltips = gtk_tooltips_new();
-#if GTK_MAJOR_VERSION < 2
- /* Accelerator group for the accelerators (or, as they're called in
- Windows and, I think, in Motif, "mnemonics"; Alt+<key> is a mnemonic,
- Ctrl+<key> is an accelerator). */
- accel_group = gtk_accel_group_new();
- gtk_window_add_accel_group(GTK_WINDOW(cap_open_w), accel_group);
-#endif
-
main_vb = gtk_vbox_new(FALSE, 0);
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
gtk_container_add(GTK_CONTAINER(cap_open_w), main_vb);
OBJECT_SET_DATA(filter_bt, E_FILT_TE_PTR_KEY, filter_te);
/* advanced row */
-#if GTK_MAJOR_VERSION >= 2 /* For some reason this button's action crashes under GTK 1. */
#ifdef HAVE_AIRPCAP
advanced_hb = gtk_hbox_new(FALSE,5);
gtk_box_pack_start(GTK_BOX(capture_vb), advanced_hb, FALSE, FALSE, 0);
advanced_bt = gtk_button_new_with_label("Wireless Settings");
/* set the text */
- #if GTK_MAJOR_VERSION >= 2
/* XXX - find a way to set the GtkButton label in GTK 2.x */
gtk_button_set_label(GTK_BUTTON(advanced_bt), "Wireless Settings");
- #else
- /* Set the GtkButton label in GTK 1.x */
- gtk_label_set_text(GTK_LABEL(GTK_BIN(advanced_bt)->child), "Wireless Settings");
- #endif
/* Both the callback and the data are global */
SIGNAL_CONNECT(advanced_bt,"clicked",options_airpcap_advanced_cb,airpcap_tb);
gtk_box_pack_start(GTK_BOX(linktype_hb),advanced_bt,FALSE,FALSE,0);
gtk_widget_show(advanced_bt);
gtk_widget_show(advanced_hb);
-#endif
#endif
/* Capture file-related options frame */
gtk_table_attach_defaults(GTK_TABLE(sampling_tb), samp_none_rb, 0, 1, 0, 1);
/* "Sampling by counter" row */
-#if GTK_MAJOR_VERSION >= 2
samp_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(samp_none_rb));
-#else
- samp_group = gtk_radio_button_group(GTK_RADIO_BUTTON(samp_none_rb));
-#endif
samp_count_rb = gtk_radio_button_new_with_label(samp_group, "1 of");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(samp_none_rb),
(capture_opts->sampling_method == CAPTURE_SAMP_BY_COUNT));
gtk_table_attach_defaults(GTK_TABLE(sampling_tb), sampling_lb, 2, 3, 1, 2);
/* "Sampling by timer" row */
-#if GTK_MAJOR_VERSION >= 2
samp_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(samp_count_rb));
-#else
- samp_group = gtk_radio_button_group(GTK_RADIO_BUTTON(samp_count_rb));
-#endif
samp_timer_rb = gtk_radio_button_new_with_label(samp_group, "1 every");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(samp_none_rb),
(capture_opts->sampling_method == CAPTURE_SAMP_BY_TIMER));
if (old_linktype != new_linktype) {
OBJECT_SET_DATA(linktype_om, E_CAP_OM_LT_VALUE_KEY, GINT_TO_POINTER(new_linktype));
capture_opts->linktype = GPOINTER_TO_INT(OBJECT_GET_DATA(linktype_om, E_CAP_OM_LT_VALUE_KEY));
-#if GTK_MAJOR_VERSION >= 2
linktype_history=MAX(gtk_option_menu_get_history(GTK_OPTION_MENU(linktype_om)), 0);
-#endif
}
}
#include <unistd.h>
#endif
-#if GTK_MAJOR_VERSION >= 2 && _WIN32
+#if _WIN32
#include <gdk/gdkwin32.h>
#include <windows.h>
#include "win32-file-dlg.h"
static void
file_open_cmd(GtkWidget *w)
{
-#if GTK_MAJOR_VERSION >= 2 && _WIN32
+#if _WIN32
win32_open_file(GDK_WINDOW_HWND(top_level->window));
-#else /* GTK_MAJOR_VERSION >= 2 && _WIN32 */
+#else /* _WIN32 */
GtkWidget *main_hb, *main_vb, *filter_hbox, *filter_bt, *filter_te,
*m_resolv_cb, *n_resolv_cb, *t_resolv_cb, *prev;
-#if GTK_MAJOR_VERSION < 2
- GtkAccelGroup *accel_group;
-#endif
GtkTooltips *tooltips = gtk_tooltips_new();
/* No Apply button, and "OK" just sets our text widget, it doesn't
activate it (i.e., it doesn't cause us to try to open the file). */
gtk_window_set_default_size(GTK_WINDOW(file_open_w), DEF_WIDTH, DEF_HEIGHT);
#endif
-#if GTK_MAJOR_VERSION < 2
- /* Accelerator group for the accelerators (or, as they're called in
- Windows and, I think, in Motif, "mnemonics"; Alt+<key> is a mnemonic,
- Ctrl+<key> is an accelerator). */
- accel_group = gtk_accel_group_new();
- gtk_window_add_accel_group(GTK_WINDOW(file_open_w), accel_group);
-#endif
-
switch (prefs.gui_fileopen_style) {
case FO_STYLE_LAST_OPENED:
gtk_widget_show(file_open_w);
window_present(file_open_w);
#endif /* (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2 */
-#endif /* GTK_MAJOR_VERSION >= 2 && _WIN32 */
+#endif /* _WIN32 */
}
static void file_open_answered_cb(gpointer dialog _U_, gint btn, gpointer data _U_)
static void
file_merge_cmd(GtkWidget *w)
{
-#if GTK_MAJOR_VERSION >= 2 && _WIN32
+#if _WIN32
win32_merge_file(GDK_WINDOW_HWND(top_level->window));
packet_list_freeze();
packet_list_thaw();
-#else /* GTK_MAJOR_VERSION >= 2 && _WIN32 */
+#else /* _WIN32 */
GtkWidget *main_hb, *main_vb, *ft_hb, *ft_lb, *filter_hbox,
*filter_bt, *filter_te, *prepend_rb, *chrono_rb,
*append_rb, *prev;
-#if GTK_MAJOR_VERSION < 2
- GtkAccelGroup *accel_group;
-#endif
GtkTooltips *tooltips = gtk_tooltips_new();
/* No Apply button, and "OK" just sets our text widget, it doesn't
activate it (i.e., it doesn't cause us to try to open the file). */
gtk_window_set_default_size(GTK_WINDOW(file_merge_w), DEF_WIDTH, DEF_HEIGHT);
#endif
-#if GTK_MAJOR_VERSION < 2
- /* Accelerator group for the accelerators (or, as they're called in
- Windows and, I think, in Motif, "mnemonics"; Alt+<key> is a mnemonic,
- Ctrl+<key> is an accelerator). */
- accel_group = gtk_accel_group_new();
- gtk_window_add_accel_group(GTK_WINDOW(file_merge_w), accel_group);
-#endif
-
switch (prefs.gui_fileopen_style) {
case FO_STYLE_LAST_OPENED:
gtk_widget_show(file_merge_w);
window_present(file_merge_w);
#endif /* (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2 */
-#endif /* GTK_MAJOR_VERSION >= 2 && _WIN32 */
+#endif /* _WIN32 */
}
static void file_merge_answered_cb(gpointer dialog _U_, gint btn, gpointer data _U_)
void
file_save_as_cmd(action_after_save_e action_after_save, gpointer action_after_save_data)
{
-#if GTK_MAJOR_VERSION >= 2 && _WIN32
+#if _WIN32
win32_save_as_file(GDK_WINDOW_HWND(top_level->window), action_after_save, action_after_save_data);
-#else /* GTK_MAJOR_VERSION >= 2 && _WIN32 */
+#else /* _WIN32 */
GtkWidget *main_vb, *ft_hb, *ft_lb, *range_fr, *compressed_cb;
GtkTooltips *tooltips;
-#if GTK_MAJOR_VERSION < 2
- GtkAccelGroup *accel_group;
-#endif
-
if (file_save_as_w != NULL) {
/* There's already an "Save Capture File As" dialog box; reactivate it. */
reactivate_window(file_save_as_w);
action_after_save_g = action_after_save;
action_after_save_data_g = action_after_save_data;
-#if GTK_MAJOR_VERSION < 2
- accel_group = gtk_accel_group_new();
- gtk_window_add_accel_group(GTK_WINDOW(file_save_as_w), accel_group);
-#endif
-
/* Container for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 5);
gtk_widget_show(range_fr);
/* range table */
- range_tb = range_new(&range
-#if GTK_MAJOR_VERSION < 2
- , accel_group
-#endif
- );
+ range_tb = range_new(&range);
gtk_container_add(GTK_CONTAINER(range_fr), range_tb);
gtk_widget_show(range_tb);
gtk_widget_show(file_save_as_w);
window_present(file_save_as_w);
#endif /* (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2 */
-#endif /* GTK_MAJOR_VERSION >= 2 && _WIN32 */
+#endif /* _WIN32 */
}
void
void
file_color_import_cmd_cb(GtkWidget *color_filters, gpointer filter_list _U_)
{
-#if GTK_MAJOR_VERSION >= 2 && _WIN32
+#if _WIN32
win32_import_color_file(GDK_WINDOW_HWND(top_level->window), color_filters);
-#else /* GTK_MAJOR_VERSION >= 2 && _WIN32 */
+#else /* _WIN32 */
GtkWidget *main_vb, *cfglobal_but;
-#if GTK_MAJOR_VERSION < 2
- GtkAccelGroup *accel_group;
-#endif
/* No Apply button, and "OK" just sets our text widget, it doesn't
activate it (i.e., it doesn't cause us to try to open the file). */
file_color_import_w = file_selection_new("Wireshark: Import Color Filters",
FILE_SELECTION_OPEN);
-#if GTK_MAJOR_VERSION < 2
- /* Accelerator group for the accelerators (or, as they're called in
- Windows and, I think, in Motif, "mnemonics"; Alt+<key> is a mnemonic,
- Ctrl+<key> is an accelerator). */
- accel_group = gtk_accel_group_new();
- gtk_window_add_accel_group(GTK_WINDOW(file_color_import_w), accel_group);
-#endif
-
/* Container for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 3);
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
gtk_widget_show(file_color_import_w);
window_present(file_color_import_w);
#endif /* (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2 */
-#endif /* GTK_MAJOR_VERSION >= 2 && _WIN32 */
+#endif /* _WIN32 */
}
static void
void
file_color_export_cmd_cb(GtkWidget *w _U_, gpointer filter_list)
{
-#if GTK_MAJOR_VERSION >= 2 && _WIN32
+#if _WIN32
win32_export_color_file(GDK_WINDOW_HWND(top_level->window), filter_list);
-#else /* GTK_MAJOR_VERSION >= 2 && _WIN32 */
+#else /* _WIN32 */
GtkWidget *main_vb, *cfglobal_but;
if (file_color_export_w != NULL) {
gtk_widget_show(file_color_export_w);
window_present(file_color_export_w);
#endif /* (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 4) || GTK_MAJOR_VERSION > 2 */
-#endif /* GTK_MAJOR_VERSION >= 2 && _WIN32 */
+#endif /* _WIN32 */
}
static void