Fix the wireless settings button for AirPCap devices in the
[obnox/wireshark/wip.git] / gtk / proto_dlg.c
index 25b5cbb5261d08c64adcd0de1d3a531ff864ee97..4e8d9183d9d8abfcacff7640c6cec028e53786b1 100644 (file)
@@ -30,6 +30,9 @@
 
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
+#if GTK_CHECK_VERSION(3,0,0)
+# include <gdk/gdkkeysyms-compat.h>
+#endif
 
 #include <epan/prefs.h>
 #include <epan/filesystem.h>
 
 #include <epan/prefs.h>
 #include <epan/filesystem.h>
@@ -214,8 +217,6 @@ proto_cb(GtkWidget *w _U_, gpointer data _U_)
   g_signal_connect(proto_w, "delete_event", G_CALLBACK(proto_delete_event_cb), NULL);
   g_signal_connect(proto_w, "destroy", G_CALLBACK(proto_destroy_cb), NULL);
 
   g_signal_connect(proto_w, "delete_event", G_CALLBACK(proto_delete_event_cb), NULL);
   g_signal_connect(proto_w, "destroy", G_CALLBACK(proto_destroy_cb), NULL);
 
-  gtk_quit_add_destroy(gtk_main_level(), GTK_OBJECT(proto_w));
-
   gtk_widget_show(proto_w);
 
   gtk_widget_grab_focus(proto_list); /* XXX: force focus to the tree_view. This hack req'd so "type-ahead find"
   gtk_widget_show(proto_w);
 
   gtk_widget_grab_focus(proto_list); /* XXX: force focus to the tree_view. This hack req'd so "type-ahead find"
@@ -369,14 +370,14 @@ proto_write(gpointer parent_w _U_)
   if (create_persconffile_dir(&pf_dir_path) == -1) {
     simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
                   "Can't create directory\n\"%s\"\nfor disabled protocols file: %s.", pf_dir_path,
   if (create_persconffile_dir(&pf_dir_path) == -1) {
     simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
                   "Can't create directory\n\"%s\"\nfor disabled protocols file: %s.", pf_dir_path,
-                  strerror(errno));
+                  g_strerror(errno));
     g_free(pf_dir_path);
   } else {
     save_disabled_protos_list(&pf_path, &pf_save_errno);
     if (pf_path != NULL) {
       simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
                     "Could not save to your disabled protocols file\n\"%s\": %s.",
     g_free(pf_dir_path);
   } else {
     save_disabled_protos_list(&pf_path, &pf_save_errno);
     if (pf_path != NULL) {
       simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
                     "Could not save to your disabled protocols file\n\"%s\": %s.",
-                    pf_path, strerror(pf_save_errno));
+                    pf_path, g_strerror(pf_save_errno));
       g_free(pf_path);
     }
   }
       g_free(pf_path);
     }
   }