diff options
author | Gerald Combs <gerald@wireshark.org> | 2008-07-21 18:51:05 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2008-07-21 18:51:05 +0000 |
commit | a7d388325e6f4ef2c36baf74d9b74aaf43ef9d50 (patch) | |
tree | 9bab50e4f60b9865d85f1000cf0c3cc390bc32ea /gtk | |
parent | d37870e8a7440d5f12ca472f089a1897ff8a230e (diff) |
From Dustin Johnson: Don't pop up a warning dialog every time we can't save
our AirPcap configuration. Just print out a warning to the console instead.
svn path=/trunk/; revision=25781
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/airpcap_dlg.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gtk/airpcap_dlg.c b/gtk/airpcap_dlg.c index e0d64b9f8a..c8182dcffc 100644 --- a/gtk/airpcap_dlg.c +++ b/gtk/airpcap_dlg.c @@ -628,25 +628,23 @@ on_key_management_apply_bt_clicked(GtkWidget *button _U_, gpointer data) toolbar = GTK_WIDGET(g_object_get_data(G_OBJECT(key_management_w),AIRPCAP_TOOLBAR_KEY)); toolbar_cm = GTK_WIDGET(g_object_get_data(G_OBJECT(key_management_w),AIRPCAP_TOOLBAR_DECRYPTION_KEY)); -#define CANT_SAVE_ERR_STR "Cannot save configuration!\n" \ - "In order to store the configuration in the registry you must:\n\n" \ - "- Close all the airpcap-based applications.\n"\ - "- Have administrative privileges." +#define CANT_SAVE_ERR_STR "Cannot save configuration! Another application" \ + "might be using AirPcap, or you might not have sufficient privileges." /* Set the Decryption Mode */ if (g_ascii_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_WIRESHARK) == 0) { set_wireshark_decryption(TRUE); - if (!set_airpcap_decryption(FALSE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR); + if (!set_airpcap_decryption(FALSE)) g_warning(CANT_SAVE_ERR_STR); } else if (g_ascii_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_AIRPCAP) == 0) { set_wireshark_decryption(FALSE); - if (!set_airpcap_decryption(TRUE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR); + if (!set_airpcap_decryption(TRUE)) g_warning(CANT_SAVE_ERR_STR); } else if (g_ascii_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_NONE) == 0) { set_wireshark_decryption(FALSE); - if (!set_airpcap_decryption(FALSE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR); + if (!set_airpcap_decryption(FALSE)) g_warning(CANT_SAVE_ERR_STR); } /* Save the configuration */ @@ -1791,17 +1789,17 @@ on_enable_decryption_en_changed(GtkWidget *w, gpointer data) if (g_ascii_strcasecmp(gtk_entry_get_text(decryption_en),AIRPCAP_DECRYPTION_TYPE_STRING_WIRESHARK) == 0) { set_wireshark_decryption(TRUE); - if (!set_airpcap_decryption(FALSE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR); + if (!set_airpcap_decryption(FALSE)) g_warning(CANT_SAVE_ERR_STR); } else if (g_ascii_strcasecmp(gtk_entry_get_text(decryption_en),AIRPCAP_DECRYPTION_TYPE_STRING_AIRPCAP) == 0) { set_wireshark_decryption(FALSE); - if (!set_airpcap_decryption(TRUE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR); + if (!set_airpcap_decryption(TRUE)) g_warning(CANT_SAVE_ERR_STR); } else if (g_ascii_strcasecmp(gtk_entry_get_text(decryption_en),AIRPCAP_DECRYPTION_TYPE_STRING_NONE) == 0) { set_wireshark_decryption(FALSE); - if (!set_airpcap_decryption(FALSE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR); + if (!set_airpcap_decryption(FALSE)) g_warning(CANT_SAVE_ERR_STR); } /* Redissect all the packets, and re-evaluate the display filter. */ @@ -1825,7 +1823,7 @@ update_decryption_mode_cm(GtkWidget *w) { gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(w)->entry),AIRPCAP_DECRYPTION_TYPE_STRING_WIRESHARK); /* We don't know if AirPcap decryption is on or off, but we just turn it off */ - if (!set_airpcap_decryption(FALSE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR); + if (!set_airpcap_decryption(FALSE)) g_warning(CANT_SAVE_ERR_STR); } /* AirPcap decryption is on */ else if (airpcap_decryption_on()) |