/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include "callbacks.h" #include "interface.h" #include "support.h" GtkWidget* create_AirSnortWindow (void) { GtkWidget *AirSnortWindow; GtkWidget *vbox1; GtkWidget *menu; guint tmp_key; GtkWidget *file; GtkWidget *file_menu; GtkAccelGroup *file_menu_accels; GtkWidget *load; GtkWidget *save; GtkWidget *log; GtkWidget *load_pcap_file; GtkWidget *separator1; GtkWidget *edit; GtkWidget *edit_menu; GtkAccelGroup *edit_menu_accels; GtkWidget *settings; GtkWidget *settings_menu; GtkAccelGroup *settings_menu_accels; GtkWidget *gps; GtkWidget *help; GtkWidget *help_menu; GtkAccelGroup *help_menu_accels; GtkWidget *vbox4; GtkWidget *hbox1; GtkWidget *table2; GSList *channel_group_group = NULL; GtkWidget *scan; GtkWidget *channel; GtkObject *freq_adj; GtkWidget *freq; GtkWidget *vseparator1; GtkWidget *table4; GtkWidget *label25; GtkWidget *label26; GtkWidget *combo4; GList *combo4_items = NULL; GtkWidget *CardType; GtkWidget *DeviceName; GtkWidget *vseparator2; GtkWidget *table5; GtkWidget *label27; GtkObject *breadth40_adj; GtkWidget *breadth40; GtkWidget *label28; GtkObject *breadth128_adj; GtkWidget *breadth128; GtkWidget *scrolledwindow1; GtkWidget *DataList; GtkWidget *label12; GtkWidget *label5; GtkWidget *label6; GtkWidget *labelWep; GtkWidget *label7; GtkWidget *label8; GtkWidget *label9; GtkWidget *label10; GtkWidget *labelEnc; GtkWidget *label11; GtkWidget *label13; GtkWidget *label14; GtkWidget *hbuttonbox1; GtkWidget *Start; GtkWidget *Stop; GtkWidget *Clear; GtkAccelGroup *accel_group; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); accel_group = gtk_accel_group_new (); AirSnortWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (AirSnortWindow), "AirSnortWindow", AirSnortWindow); gtk_widget_set_usize (AirSnortWindow, 750, 250); gtk_window_set_title (GTK_WINDOW (AirSnortWindow), "AirSnort"); gtk_window_set_position (GTK_WINDOW (AirSnortWindow), GTK_WIN_POS_CENTER); vbox1 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox1); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "vbox1", vbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox1); gtk_container_add (GTK_CONTAINER (AirSnortWindow), vbox1); menu = gtk_menu_bar_new (); gtk_widget_ref (menu); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "menu", menu, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu); gtk_box_pack_start (GTK_BOX (vbox1), menu, FALSE, FALSE, 0); file = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (file)->child), "_File"); gtk_widget_add_accelerator (file, "activate_item", accel_group, tmp_key, GDK_MOD1_MASK, (GtkAccelFlags) 0); gtk_widget_ref (file); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "file", file, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (file); gtk_container_add (GTK_CONTAINER (menu), file); file_menu = gtk_menu_new (); gtk_widget_ref (file_menu); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "file_menu", file_menu, (GtkDestroyNotify) gtk_widget_unref); gtk_menu_item_set_submenu (GTK_MENU_ITEM (file), file_menu); file_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (file_menu)); load = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (load)->child), "_Load crack file"); gtk_widget_add_accelerator (load, "activate_item", file_menu_accels, tmp_key, 0, 0); gtk_widget_ref (load); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "load", load, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (load); gtk_container_add (GTK_CONTAINER (file_menu), load); save = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (save)->child), "_Save crack file"); gtk_widget_add_accelerator (save, "activate_item", file_menu_accels, tmp_key, 0, 0); gtk_widget_ref (save); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "save", save, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (save); gtk_container_add (GTK_CONTAINER (file_menu), save); log = gtk_check_menu_item_new_with_label ("Log to file"); gtk_widget_ref (log); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "log", log, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (log); gtk_container_add (GTK_CONTAINER (file_menu), log); gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (log), TRUE); load_pcap_file = gtk_menu_item_new_with_label ("Load pcap file"); gtk_widget_ref (load_pcap_file); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "load_pcap_file", load_pcap_file, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (load_pcap_file); gtk_container_add (GTK_CONTAINER (file_menu), load_pcap_file); separator1 = gtk_menu_item_new (); gtk_widget_ref (separator1); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "separator1", separator1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (separator1); gtk_container_add (GTK_CONTAINER (file_menu), separator1); gtk_widget_set_sensitive (separator1, FALSE); edit = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (edit)->child), "_Edit"); gtk_widget_add_accelerator (edit, "activate_item", accel_group, tmp_key, GDK_MOD1_MASK, (GtkAccelFlags) 0); gtk_widget_ref (edit); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "edit", edit, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (edit); gtk_container_add (GTK_CONTAINER (menu), edit); edit_menu = gtk_menu_new (); gtk_widget_ref (edit_menu); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "edit_menu", edit_menu, (GtkDestroyNotify) gtk_widget_unref); gtk_menu_item_set_submenu (GTK_MENU_ITEM (edit), edit_menu); edit_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (edit_menu)); settings = gtk_menu_item_new_with_label ("Settings"); gtk_widget_ref (settings); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "settings", settings, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (settings); gtk_container_add (GTK_CONTAINER (menu), settings); settings_menu = gtk_menu_new (); gtk_widget_ref (settings_menu); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "settings_menu", settings_menu, (GtkDestroyNotify) gtk_widget_unref); gtk_menu_item_set_submenu (GTK_MENU_ITEM (settings), settings_menu); settings_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (settings_menu)); gps = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (gps)->child), "_Gps"); gtk_widget_add_accelerator (gps, "activate_item", settings_menu_accels, tmp_key, 0, 0); gtk_widget_ref (gps); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "gps", gps, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (gps); gtk_container_add (GTK_CONTAINER (settings_menu), gps); gtk_tooltips_set_tip (tooltips, gps, "GPS Settings", NULL); help = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (help)->child), "_Help"); gtk_widget_add_accelerator (help, "activate_item", accel_group, tmp_key, GDK_MOD1_MASK, (GtkAccelFlags) 0); gtk_widget_ref (help); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "help", help, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (help); gtk_container_add (GTK_CONTAINER (menu), help); help_menu = gtk_menu_new (); gtk_widget_ref (help_menu); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "help_menu", help_menu, (GtkDestroyNotify) gtk_widget_unref); gtk_menu_item_set_submenu (GTK_MENU_ITEM (help), help_menu); help_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (help_menu)); vbox4 = gtk_vbox_new (FALSE, 3); gtk_widget_ref (vbox4); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "vbox4", vbox4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox4); gtk_box_pack_start (GTK_BOX (vbox1), vbox4, TRUE, TRUE, 3); hbox1 = gtk_hbox_new (FALSE, 11); gtk_widget_ref (hbox1); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "hbox1", hbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox4), hbox1, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox1), 2); table2 = gtk_table_new (2, 2, FALSE); gtk_widget_ref (table2); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "table2", table2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (table2); gtk_box_pack_start (GTK_BOX (hbox1), table2, TRUE, FALSE, 0); gtk_table_set_row_spacings (GTK_TABLE (table2), 2); gtk_table_set_col_spacings (GTK_TABLE (table2), 1); scan = gtk_radio_button_new_with_label (channel_group_group, "scan"); channel_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (scan)); gtk_widget_ref (scan); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "scan", scan, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scan); gtk_table_attach (GTK_TABLE (table2), scan, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (scan), TRUE); channel = gtk_radio_button_new_with_label (channel_group_group, "channel"); channel_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (channel)); gtk_widget_ref (channel); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "channel", channel, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (channel); gtk_table_attach (GTK_TABLE (table2), channel, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); freq_adj = gtk_adjustment_new (6, 1, 11, 1, 10, 10); freq = gtk_spin_button_new (GTK_ADJUSTMENT (freq_adj), 1, 0); gtk_widget_ref (freq); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "freq", freq, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (freq); gtk_table_attach (GTK_TABLE (table2), freq, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (freq), TRUE); gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (freq), GTK_UPDATE_IF_VALID); gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (freq), TRUE); vseparator1 = gtk_vseparator_new (); gtk_widget_ref (vseparator1); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "vseparator1", vseparator1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vseparator1); gtk_box_pack_start (GTK_BOX (hbox1), vseparator1, FALSE, FALSE, 0); table4 = gtk_table_new (2, 2, FALSE); gtk_widget_ref (table4); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "table4", table4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (table4); gtk_box_pack_start (GTK_BOX (hbox1), table4, TRUE, FALSE, 0); gtk_table_set_row_spacings (GTK_TABLE (table4), 2); gtk_table_set_col_spacings (GTK_TABLE (table4), 3); label25 = gtk_label_new ("Network device"); gtk_widget_ref (label25); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label25", label25, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label25); gtk_table_attach (GTK_TABLE (table4), label25, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); label26 = gtk_label_new ("Card type"); gtk_widget_ref (label26); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label26", label26, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label26); gtk_table_attach (GTK_TABLE (table4), label26, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label26), 0, 0.5); combo4 = gtk_combo_new (); gtk_widget_ref (combo4); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "combo4", combo4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (combo4); gtk_table_attach (GTK_TABLE (table4), combo4, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_combo_set_value_in_list (GTK_COMBO (combo4), TRUE, FALSE); combo4_items = g_list_append (combo4_items, (gpointer) "Prism2 (wlan-ng)"); combo4_items = g_list_append (combo4_items, (gpointer) "Orinoco (orinoco_cs)"); combo4_items = g_list_append (combo4_items, (gpointer) "Other"); gtk_combo_set_popdown_strings (GTK_COMBO (combo4), combo4_items); g_list_free (combo4_items); CardType = GTK_COMBO (combo4)->entry; gtk_widget_ref (CardType); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "CardType", CardType, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (CardType); gtk_entry_set_editable (GTK_ENTRY (CardType), FALSE); gtk_entry_set_text (GTK_ENTRY (CardType), "Prism2 (wlan-ng)"); DeviceName = gtk_entry_new_with_max_length (16); gtk_widget_ref (DeviceName); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "DeviceName", DeviceName, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (DeviceName); gtk_table_attach (GTK_TABLE (table4), DeviceName, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_text (GTK_ENTRY (DeviceName), "wlan0"); vseparator2 = gtk_vseparator_new (); gtk_widget_ref (vseparator2); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "vseparator2", vseparator2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vseparator2); gtk_box_pack_start (GTK_BOX (hbox1), vseparator2, FALSE, FALSE, 0); table5 = gtk_table_new (2, 2, FALSE); gtk_widget_ref (table5); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "table5", table5, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (table5); gtk_box_pack_start (GTK_BOX (hbox1), table5, TRUE, FALSE, 0); gtk_table_set_row_spacings (GTK_TABLE (table5), 1); label27 = gtk_label_new ("40 bit crack breadth:"); gtk_widget_ref (label27); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label27", label27, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label27); gtk_table_attach (GTK_TABLE (table5), label27, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5); breadth40_adj = gtk_adjustment_new (3, 1, 20, 1, 10, 10); breadth40 = gtk_spin_button_new (GTK_ADJUSTMENT (breadth40_adj), 1, 0); gtk_widget_ref (breadth40); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "breadth40", breadth40, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (breadth40); gtk_table_attach (GTK_TABLE (table5), breadth40, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (breadth40), TRUE); gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (breadth40), TRUE); label28 = gtk_label_new ("128 bit crack breadth: "); gtk_widget_ref (label28); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label28", label28, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label28); gtk_table_attach (GTK_TABLE (table5), label28, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label28), 0, 0.5); breadth128_adj = gtk_adjustment_new (2, 1, 20, 1, 10, 10); breadth128 = gtk_spin_button_new (GTK_ADJUSTMENT (breadth128_adj), 1, 0); gtk_widget_ref (breadth128); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "breadth128", breadth128, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (breadth128); gtk_table_attach (GTK_TABLE (table5), breadth128, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (breadth128), TRUE); gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (breadth128), TRUE); scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_ref (scrolledwindow1); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "scrolledwindow1", scrolledwindow1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scrolledwindow1); gtk_box_pack_start (GTK_BOX (vbox4), scrolledwindow1, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); DataList = gtk_clist_new (12); gtk_widget_ref (DataList); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "DataList", DataList, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (DataList); gtk_container_add (GTK_CONTAINER (scrolledwindow1), DataList); gtk_container_set_border_width (GTK_CONTAINER (DataList), 1); gtk_clist_set_column_width (GTK_CLIST (DataList), 0, 15); gtk_clist_set_column_width (GTK_CLIST (DataList), 1, 125); gtk_clist_set_column_width (GTK_CLIST (DataList), 2, 127); gtk_clist_set_column_width (GTK_CLIST (DataList), 3, 32); gtk_clist_set_column_width (GTK_CLIST (DataList), 4, 88); gtk_clist_set_column_width (GTK_CLIST (DataList), 5, 78); gtk_clist_set_column_width (GTK_CLIST (DataList), 6, 37); gtk_clist_set_column_width (GTK_CLIST (DataList), 7, 88); gtk_clist_set_column_width (GTK_CLIST (DataList), 8, 80); gtk_clist_set_column_width (GTK_CLIST (DataList), 9, 71); gtk_clist_set_column_width (GTK_CLIST (DataList), 10, 120); gtk_clist_set_column_width (GTK_CLIST (DataList), 11, 120); gtk_clist_column_titles_show (GTK_CLIST (DataList)); label12 = gtk_label_new ("C"); gtk_widget_ref (label12); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label12", label12, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label12); gtk_clist_set_column_widget (GTK_CLIST (DataList), 0, label12); label5 = gtk_label_new ("BSSID"); gtk_widget_ref (label5); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label5", label5, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label5); gtk_clist_set_column_widget (GTK_CLIST (DataList), 1, label5); label6 = gtk_label_new ("Name"); gtk_widget_ref (label6); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label6", label6, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label6); gtk_clist_set_column_widget (GTK_CLIST (DataList), 2, label6); labelWep = gtk_label_new ("WEP"); gtk_widget_ref (labelWep); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "labelWep", labelWep, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (labelWep); gtk_clist_set_column_widget (GTK_CLIST (DataList), 3, labelWep); label7 = gtk_label_new ("Last Seen"); gtk_widget_ref (label7); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label7", label7, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label7); gtk_clist_set_column_widget (GTK_CLIST (DataList), 4, label7); label8 = gtk_label_new ("Last IV"); gtk_widget_ref (label8); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label8", label8, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label8); gtk_clist_set_column_widget (GTK_CLIST (DataList), 5, label8); label9 = gtk_label_new ("Chan"); gtk_widget_ref (label9); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label9", label9, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label9); gtk_clist_set_column_widget (GTK_CLIST (DataList), 6, label9); label10 = gtk_label_new ("Packets"); gtk_widget_ref (label10); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label10", label10, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label10); gtk_clist_set_column_widget (GTK_CLIST (DataList), 7, label10); labelEnc = gtk_label_new ("Encrypted"); gtk_widget_ref (labelEnc); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "labelEnc", labelEnc, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (labelEnc); gtk_clist_set_column_widget (GTK_CLIST (DataList), 8, labelEnc); label11 = gtk_label_new ("Interesting"); gtk_widget_ref (label11); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label11", label11, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label11); gtk_clist_set_column_widget (GTK_CLIST (DataList), 9, label11); label13 = gtk_label_new ("PW: Hex"); gtk_widget_ref (label13); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label13", label13, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label13); gtk_clist_set_column_widget (GTK_CLIST (DataList), 10, label13); label14 = gtk_label_new ("PW: ASCII"); gtk_widget_ref (label14); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "label14", label14, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label14); gtk_clist_set_column_widget (GTK_CLIST (DataList), 11, label14); hbuttonbox1 = gtk_hbutton_box_new (); gtk_widget_ref (hbuttonbox1); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "hbuttonbox1", hbuttonbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbuttonbox1); gtk_box_pack_start (GTK_BOX (vbox4), hbuttonbox1, FALSE, TRUE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_SPREAD); Start = gtk_button_new_with_label ("Start"); gtk_widget_ref (Start); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "Start", Start, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (Start); gtk_container_add (GTK_CONTAINER (hbuttonbox1), Start); Stop = gtk_button_new_with_label ("Stop"); gtk_widget_ref (Stop); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "Stop", Stop, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (Stop); gtk_container_add (GTK_CONTAINER (hbuttonbox1), Stop); Clear = gtk_button_new_with_label ("Clear"); gtk_widget_ref (Clear); gtk_object_set_data_full (GTK_OBJECT (AirSnortWindow), "Clear", Clear, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (Clear); gtk_container_add (GTK_CONTAINER (hbuttonbox1), Clear); gtk_signal_connect (GTK_OBJECT (AirSnortWindow), "realize", GTK_SIGNAL_FUNC (on_AirSnortWindow_realize), DataList); gtk_signal_connect (GTK_OBJECT (AirSnortWindow), "delete_event", GTK_SIGNAL_FUNC (on_AirSnortWindow_delete_event), NULL); gtk_signal_connect (GTK_OBJECT (load), "activate", GTK_SIGNAL_FUNC (on_load_activate), NULL); gtk_signal_connect (GTK_OBJECT (save), "activate", GTK_SIGNAL_FUNC (on_save_activate), NULL); gtk_signal_connect (GTK_OBJECT (log), "activate", GTK_SIGNAL_FUNC (on_log_activate), NULL); gtk_signal_connect (GTK_OBJECT (load_pcap_file), "activate", GTK_SIGNAL_FUNC (on_load_pcap_file_activate), NULL); gtk_signal_connect (GTK_OBJECT (gps), "activate", GTK_SIGNAL_FUNC (on_gps_activate), NULL); gtk_signal_connect (GTK_OBJECT (scan), "toggled", GTK_SIGNAL_FUNC (on_scan_toggled), NULL); gtk_signal_connect (GTK_OBJECT (freq), "changed", GTK_SIGNAL_FUNC (on_freq_changed), NULL); gtk_signal_connect (GTK_OBJECT (freq), "realize", GTK_SIGNAL_FUNC (on_freq_realize), NULL); gtk_signal_connect (GTK_OBJECT (CardType), "changed", GTK_SIGNAL_FUNC (on_CardType_changed), combo4); gtk_signal_connect (GTK_OBJECT (CardType), "realize", GTK_SIGNAL_FUNC (on_CardType_realize), NULL); gtk_signal_connect (GTK_OBJECT (DeviceName), "changed", GTK_SIGNAL_FUNC (on_DeviceName_changed), NULL); gtk_signal_connect (GTK_OBJECT (DeviceName), "realize", GTK_SIGNAL_FUNC (on_DeviceName_realize), NULL); gtk_signal_connect (GTK_OBJECT (breadth40), "changed", GTK_SIGNAL_FUNC (on_breadth40_changed), NULL); gtk_signal_connect (GTK_OBJECT (breadth40), "realize", GTK_SIGNAL_FUNC (on_breadth40_realize), NULL); gtk_signal_connect (GTK_OBJECT (breadth128), "changed", GTK_SIGNAL_FUNC (on_breadth128_changed), NULL); gtk_signal_connect (GTK_OBJECT (breadth128), "realize", GTK_SIGNAL_FUNC (on_breadth128_realize), NULL); gtk_signal_connect (GTK_OBJECT (DataList), "button_press_event", GTK_SIGNAL_FUNC (on_DataList_button_press_event), NULL); gtk_signal_connect (GTK_OBJECT (Start), "clicked", GTK_SIGNAL_FUNC (on_Start_clicked), DataList); gtk_signal_connect (GTK_OBJECT (Stop), "clicked", GTK_SIGNAL_FUNC (on_Stop_clicked), DataList); gtk_signal_connect (GTK_OBJECT (Clear), "clicked", GTK_SIGNAL_FUNC (on_Clear_clicked), DataList); gtk_object_set_data (GTK_OBJECT (AirSnortWindow), "tooltips", tooltips); gtk_window_add_accel_group (GTK_WINDOW (AirSnortWindow), accel_group); return AirSnortWindow; } GtkWidget* create_AboutDlg (void) { GtkWidget *AboutDlg; GtkWidget *dialog_vbox1; GtkWidget *vbox2; GtkWidget *label15; GtkWidget *label29; GtkWidget *label16; GtkWidget *dialog_action_area1; GtkWidget *button1; AboutDlg = gtk_dialog_new (); gtk_object_set_data (GTK_OBJECT (AboutDlg), "AboutDlg", AboutDlg); gtk_widget_set_usize (AboutDlg, 319, 155); gtk_window_set_title (GTK_WINDOW (AboutDlg), "About Airsnort"); GTK_WINDOW (AboutDlg)->type = GTK_WINDOW_DIALOG; gtk_window_set_position (GTK_WINDOW (AboutDlg), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (AboutDlg), TRUE); gtk_window_set_policy (GTK_WINDOW (AboutDlg), TRUE, TRUE, FALSE); dialog_vbox1 = GTK_DIALOG (AboutDlg)->vbox; gtk_object_set_data (GTK_OBJECT (AboutDlg), "dialog_vbox1", dialog_vbox1); gtk_widget_show (dialog_vbox1); vbox2 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox2); gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "vbox2", vbox2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox2); gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox2, TRUE, FALSE, 0); label15 = gtk_label_new ("AirSnort v0.2.1"); gtk_widget_ref (label15); gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "label15", label15, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label15); gtk_box_pack_start (GTK_BOX (vbox2), label15, FALSE, FALSE, 0); label29 = gtk_label_new ("Copyright (c) 2002, Snax"); gtk_widget_ref (label29); gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "label29", label29, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label29); gtk_box_pack_start (GTK_BOX (vbox2), label29, FALSE, FALSE, 0); label16 = gtk_label_new ("Copyright (c) 2001, Jeremy Bruestle and Blake Hegerle"); gtk_widget_ref (label16); gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "label16", label16, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label16); gtk_box_pack_start (GTK_BOX (vbox2), label16, FALSE, FALSE, 0); dialog_action_area1 = GTK_DIALOG (AboutDlg)->action_area; gtk_object_set_data (GTK_OBJECT (AboutDlg), "dialog_action_area1", dialog_action_area1); gtk_widget_show (dialog_action_area1); gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area1), 10); button1 = gtk_button_new_with_label ("Okay"); gtk_widget_ref (button1); gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "button1", button1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button1); gtk_box_pack_start (GTK_BOX (dialog_action_area1), button1, FALSE, FALSE, 0); gtk_signal_connect_object (GTK_OBJECT (button1), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (AboutDlg)); return AboutDlg; } GtkWidget* create_CloseDlg (void) { GtkWidget *CloseDlg; GtkWidget *dialog_vbox3; GtkWidget *label22; GtkWidget *dialog_action_area3; GtkWidget *Yes; GtkWidget *button5; GtkWidget *button6; CloseDlg = gtk_dialog_new (); gtk_object_set_data (GTK_OBJECT (CloseDlg), "CloseDlg", CloseDlg); gtk_container_set_border_width (GTK_CONTAINER (CloseDlg), 10); gtk_window_set_title (GTK_WINDOW (CloseDlg), "SaveData?"); GTK_WINDOW (CloseDlg)->type = GTK_WINDOW_DIALOG; gtk_window_set_position (GTK_WINDOW (CloseDlg), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (CloseDlg), TRUE); gtk_window_set_policy (GTK_WINDOW (CloseDlg), TRUE, TRUE, FALSE); dialog_vbox3 = GTK_DIALOG (CloseDlg)->vbox; gtk_object_set_data (GTK_OBJECT (CloseDlg), "dialog_vbox3", dialog_vbox3); gtk_widget_show (dialog_vbox3); label22 = gtk_label_new ("Save captured packet data before exit?"); gtk_widget_ref (label22); gtk_object_set_data_full (GTK_OBJECT (CloseDlg), "label22", label22, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label22); gtk_box_pack_start (GTK_BOX (dialog_vbox3), label22, TRUE, FALSE, 0); dialog_action_area3 = GTK_DIALOG (CloseDlg)->action_area; gtk_object_set_data (GTK_OBJECT (CloseDlg), "dialog_action_area3", dialog_action_area3); gtk_widget_show (dialog_action_area3); gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area3), 10); Yes = gtk_button_new_with_label ("Yes"); gtk_widget_ref (Yes); gtk_object_set_data_full (GTK_OBJECT (CloseDlg), "Yes", Yes, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (Yes); gtk_box_pack_start (GTK_BOX (dialog_action_area3), Yes, FALSE, FALSE, 0); button5 = gtk_button_new_with_label ("No"); gtk_widget_ref (button5); gtk_object_set_data_full (GTK_OBJECT (CloseDlg), "button5", button5, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button5); gtk_box_pack_start (GTK_BOX (dialog_action_area3), button5, FALSE, FALSE, 0); button6 = gtk_button_new_with_label ("Cancel"); gtk_widget_ref (button6); gtk_object_set_data_full (GTK_OBJECT (CloseDlg), "button6", button6, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button6); gtk_box_pack_start (GTK_BOX (dialog_action_area3), button6, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (Yes), "clicked", GTK_SIGNAL_FUNC (on_CloseYes_clicked), NULL); gtk_signal_connect (GTK_OBJECT (button5), "clicked", GTK_SIGNAL_FUNC (on_CloseNo_clicked), NULL); gtk_signal_connect_object (GTK_OBJECT (button6), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (CloseDlg)); return CloseDlg; } GtkWidget* create_FileLoad (void) { GtkWidget *FileLoad; GtkWidget *fileload_ok_button; GtkWidget *fileload_cancel_button; FileLoad = gtk_file_selection_new ("Open File"); gtk_object_set_data (GTK_OBJECT (FileLoad), "FileLoad", FileLoad); gtk_container_set_border_width (GTK_CONTAINER (FileLoad), 10); GTK_WINDOW (FileLoad)->type = GTK_WINDOW_DIALOG; gtk_window_set_position (GTK_WINDOW (FileLoad), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (FileLoad), TRUE); fileload_ok_button = GTK_FILE_SELECTION (FileLoad)->ok_button; gtk_object_set_data (GTK_OBJECT (FileLoad), "fileload_ok_button", fileload_ok_button); gtk_widget_show (fileload_ok_button); GTK_WIDGET_SET_FLAGS (fileload_ok_button, GTK_CAN_DEFAULT); fileload_cancel_button = GTK_FILE_SELECTION (FileLoad)->cancel_button; gtk_object_set_data (GTK_OBJECT (FileLoad), "fileload_cancel_button", fileload_cancel_button); gtk_widget_show (fileload_cancel_button); GTK_WIDGET_SET_FLAGS (fileload_cancel_button, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (fileload_ok_button), "clicked", GTK_SIGNAL_FUNC (loadPacketFile), FileLoad); gtk_signal_connect_object (GTK_OBJECT (fileload_ok_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (FileLoad)); gtk_signal_connect_object (GTK_OBJECT (fileload_cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (FileLoad)); return FileLoad; } GtkWidget* create_SaveFile (void) { GtkWidget *SaveFile; GtkWidget *savefile_okay_button; GtkWidget *savefile_cancel_button; SaveFile = gtk_file_selection_new ("Save File"); gtk_object_set_data (GTK_OBJECT (SaveFile), "SaveFile", SaveFile); gtk_container_set_border_width (GTK_CONTAINER (SaveFile), 10); GTK_WINDOW (SaveFile)->type = GTK_WINDOW_DIALOG; gtk_window_set_position (GTK_WINDOW (SaveFile), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (SaveFile), TRUE); savefile_okay_button = GTK_FILE_SELECTION (SaveFile)->ok_button; gtk_object_set_data (GTK_OBJECT (SaveFile), "savefile_okay_button", savefile_okay_button); gtk_widget_show (savefile_okay_button); GTK_WIDGET_SET_FLAGS (savefile_okay_button, GTK_CAN_DEFAULT); savefile_cancel_button = GTK_FILE_SELECTION (SaveFile)->cancel_button; gtk_object_set_data (GTK_OBJECT (SaveFile), "savefile_cancel_button", savefile_cancel_button); gtk_widget_show (savefile_cancel_button); GTK_WIDGET_SET_FLAGS (savefile_cancel_button, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (savefile_okay_button), "clicked", GTK_SIGNAL_FUNC (savePacketData), SaveFile); gtk_signal_connect_object (GTK_OBJECT (savefile_okay_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (SaveFile)); gtk_signal_connect (GTK_OBJECT (savefile_cancel_button), "clicked", GTK_SIGNAL_FUNC (on_savefile_cancel), NULL); gtk_signal_connect_object (GTK_OBJECT (savefile_cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (SaveFile)); return SaveFile; } GtkWidget* create_ListPopup (void) { GtkWidget *ListPopup; GtkAccelGroup *ListPopup_accels; ListPopup = gtk_menu_new (); gtk_object_set_data (GTK_OBJECT (ListPopup), "ListPopup", ListPopup); ListPopup_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (ListPopup)); return ListPopup; } GtkWidget* create_GpsDialog (void) { GtkWidget *GpsDialog; GtkWidget *dialog_vbox4; GtkWidget *vbox5; GtkWidget *vbox6; GtkWidget *hbox2; GSList *gps_group_group = NULL; GtkWidget *GpsEnable; GtkWidget *hbox3; GtkWidget *GpsDisable; GtkWidget *table3; GtkWidget *GpsDevice; GtkWidget *GpsSpeed; GtkWidget *GpsFormat; GtkWidget *DevCombo; GtkWidget *combo_entry1; GtkWidget *SpeedCombo; GtkWidget *combo_entry2; GtkWidget *FormatCombo; GtkWidget *combo_entry3; GtkWidget *dialog_action_area4; GtkWidget *GpsOk; GtkWidget *GpsCancel; GpsDialog = gtk_dialog_new (); gtk_object_set_data (GTK_OBJECT (GpsDialog), "GpsDialog", GpsDialog); gtk_window_set_title (GTK_WINDOW (GpsDialog), "Gps Settings"); GTK_WINDOW (GpsDialog)->type = GTK_WINDOW_DIALOG; gtk_window_set_position (GTK_WINDOW (GpsDialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (GpsDialog), TRUE); gtk_window_set_policy (GTK_WINDOW (GpsDialog), TRUE, TRUE, FALSE); dialog_vbox4 = GTK_DIALOG (GpsDialog)->vbox; gtk_object_set_data (GTK_OBJECT (GpsDialog), "dialog_vbox4", dialog_vbox4); gtk_widget_show (dialog_vbox4); vbox5 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox5); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "vbox5", vbox5, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox5); gtk_box_pack_start (GTK_BOX (dialog_vbox4), vbox5, TRUE, TRUE, 0); vbox6 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox6); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "vbox6", vbox6, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox6); gtk_box_pack_start (GTK_BOX (vbox5), vbox6, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox6), 10); hbox2 = gtk_hbox_new (TRUE, 0); gtk_widget_ref (hbox2); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "hbox2", hbox2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox2); gtk_box_pack_start (GTK_BOX (vbox6), hbox2, FALSE, FALSE, 0); GpsEnable = gtk_radio_button_new_with_label (gps_group_group, "enable"); gps_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (GpsEnable)); gtk_widget_ref (GpsEnable); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "GpsEnable", GpsEnable, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GpsEnable); gtk_box_pack_start (GTK_BOX (hbox2), GpsEnable, FALSE, FALSE, 0); hbox3 = gtk_hbox_new (TRUE, 0); gtk_widget_ref (hbox3); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "hbox3", hbox3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox3); gtk_box_pack_start (GTK_BOX (vbox6), hbox3, FALSE, FALSE, 0); GpsDisable = gtk_radio_button_new_with_label (gps_group_group, "disable"); gps_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (GpsDisable)); gtk_widget_ref (GpsDisable); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "GpsDisable", GpsDisable, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GpsDisable); gtk_box_pack_start (GTK_BOX (hbox3), GpsDisable, FALSE, FALSE, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GpsDisable), TRUE); table3 = gtk_table_new (3, 2, TRUE); gtk_widget_ref (table3); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "table3", table3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (table3); gtk_box_pack_start (GTK_BOX (vbox5), table3, TRUE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (table3), 5); gtk_table_set_row_spacings (GTK_TABLE (table3), 10); GpsDevice = gtk_label_new ("Device"); gtk_widget_ref (GpsDevice); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "GpsDevice", GpsDevice, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GpsDevice); gtk_table_attach (GTK_TABLE (table3), GpsDevice, 0, 1, 0, 1, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (GpsDevice), 0, 0.5); GpsSpeed = gtk_label_new ("Speed"); gtk_widget_ref (GpsSpeed); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "GpsSpeed", GpsSpeed, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GpsSpeed); gtk_table_attach (GTK_TABLE (table3), GpsSpeed, 0, 1, 1, 2, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (GpsSpeed), 0, 0.5); GpsFormat = gtk_label_new ("Format"); gtk_widget_ref (GpsFormat); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "GpsFormat", GpsFormat, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GpsFormat); gtk_table_attach (GTK_TABLE (table3), GpsFormat, 0, 1, 2, 3, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (GpsFormat), 0, 0.5); DevCombo = gtk_combo_new (); gtk_widget_ref (DevCombo); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "DevCombo", DevCombo, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (DevCombo); gtk_table_attach (GTK_TABLE (table3), DevCombo, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); combo_entry1 = GTK_COMBO (DevCombo)->entry; gtk_widget_ref (combo_entry1); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "combo_entry1", combo_entry1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (combo_entry1); SpeedCombo = gtk_combo_new (); gtk_widget_ref (SpeedCombo); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "SpeedCombo", SpeedCombo, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (SpeedCombo); gtk_table_attach (GTK_TABLE (table3), SpeedCombo, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND), (GtkAttachOptions) (0), 0, 0); combo_entry2 = GTK_COMBO (SpeedCombo)->entry; gtk_widget_ref (combo_entry2); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "combo_entry2", combo_entry2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (combo_entry2); FormatCombo = gtk_combo_new (); gtk_widget_ref (FormatCombo); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "FormatCombo", FormatCombo, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (FormatCombo); gtk_table_attach (GTK_TABLE (table3), FormatCombo, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); combo_entry3 = GTK_COMBO (FormatCombo)->entry; gtk_widget_ref (combo_entry3); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "combo_entry3", combo_entry3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (combo_entry3); dialog_action_area4 = GTK_DIALOG (GpsDialog)->action_area; gtk_object_set_data (GTK_OBJECT (GpsDialog), "dialog_action_area4", dialog_action_area4); gtk_widget_show (dialog_action_area4); gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area4), 10); GpsOk = gtk_button_new_with_label ("Okay"); gtk_widget_ref (GpsOk); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "GpsOk", GpsOk, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GpsOk); gtk_box_pack_start (GTK_BOX (dialog_action_area4), GpsOk, FALSE, FALSE, 0); GpsCancel = gtk_button_new_with_label ("Cancel"); gtk_widget_ref (GpsCancel); gtk_object_set_data_full (GTK_OBJECT (GpsDialog), "GpsCancel", GpsCancel, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GpsCancel); gtk_box_pack_start (GTK_BOX (dialog_action_area4), GpsCancel, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (GpsOk), "clicked", GTK_SIGNAL_FUNC (on_GpsOk_clicked), NULL); gtk_signal_connect_object (GTK_OBJECT (GpsOk), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (GpsDialog)); gtk_signal_connect_object (GTK_OBJECT (GpsCancel), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (GpsDialog)); return GpsDialog; } GtkWidget* create_LogFile (void) { GtkWidget *LogFile; GtkWidget *log_ok; GtkWidget *cancel_button1; LogFile = gtk_file_selection_new ("Log File"); gtk_object_set_data (GTK_OBJECT (LogFile), "LogFile", LogFile); gtk_container_set_border_width (GTK_CONTAINER (LogFile), 10); GTK_WINDOW (LogFile)->type = GTK_WINDOW_DIALOG; gtk_window_set_position (GTK_WINDOW (LogFile), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (LogFile), TRUE); log_ok = GTK_FILE_SELECTION (LogFile)->ok_button; gtk_object_set_data (GTK_OBJECT (LogFile), "log_ok", log_ok); gtk_widget_show (log_ok); GTK_WIDGET_SET_FLAGS (log_ok, GTK_CAN_DEFAULT); cancel_button1 = GTK_FILE_SELECTION (LogFile)->cancel_button; gtk_object_set_data (GTK_OBJECT (LogFile), "cancel_button1", cancel_button1); gtk_widget_show (cancel_button1); GTK_WIDGET_SET_FLAGS (cancel_button1, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (log_ok), "clicked", GTK_SIGNAL_FUNC (on_log_ok_clicked), LogFile); gtk_signal_connect_object (GTK_OBJECT (log_ok), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (LogFile)); gtk_signal_connect (GTK_OBJECT (cancel_button1), "clicked", GTK_SIGNAL_FUNC (on_log_cancel_button_clicked), NULL); gtk_signal_connect_object (GTK_OBJECT (cancel_button1), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (LogFile)); return LogFile; } GtkWidget* create_PcapFile (void) { GtkWidget *PcapFile; GtkWidget *ok_button1; GtkWidget *cancel_button2; PcapFile = gtk_file_selection_new ("Select File"); gtk_object_set_data (GTK_OBJECT (PcapFile), "PcapFile", PcapFile); gtk_container_set_border_width (GTK_CONTAINER (PcapFile), 10); ok_button1 = GTK_FILE_SELECTION (PcapFile)->ok_button; gtk_object_set_data (GTK_OBJECT (PcapFile), "ok_button1", ok_button1); gtk_widget_show (ok_button1); GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT); cancel_button2 = GTK_FILE_SELECTION (PcapFile)->cancel_button; gtk_object_set_data (GTK_OBJECT (PcapFile), "cancel_button2", cancel_button2); gtk_widget_show (cancel_button2); GTK_WIDGET_SET_FLAGS (cancel_button2, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (ok_button1), "clicked", GTK_SIGNAL_FUNC (on_pcap_ok_clicked), PcapFile); gtk_signal_connect_object (GTK_OBJECT (ok_button1), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (PcapFile)); gtk_signal_connect_object (GTK_OBJECT (cancel_button2), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (PcapFile)); return PcapFile; }