aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/enabled_protocols_dialog.cpp
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-04-08 18:59:17 -0700
committerGuy Harris <guy@alum.mit.edu>2017-04-09 02:00:37 +0000
commit23a7890b6a2133a559fc691c865e617c19b26a7a (patch)
tree86c981542f9270215e1010720e4ad2280cb814d8 /ui/qt/enabled_protocols_dialog.cpp
parent92ebd6389203448168a2769fa473bbbad95ec159 (diff)
Pull the code to save enabled/disabled lists into libwireshark.
It's identical in the GTK+ and Qt UIs, and it should just be done in libwireshark. Rename some routines to just speak of enabled_and_disabled_lists, so we don't have to say enabled_and_disabled_protos_and_heuristic_dissectors or something such as that. Clean up indentation. Change-Id: Ief2e612d9e1b60d8d0123b6bd3409dce5faf6495 Reviewed-on: https://code.wireshark.org/review/20970 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/enabled_protocols_dialog.cpp')
-rw-r--r--ui/qt/enabled_protocols_dialog.cpp41
1 files changed, 1 insertions, 40 deletions
diff --git a/ui/qt/enabled_protocols_dialog.cpp b/ui/qt/enabled_protocols_dialog.cpp
index f6f891374c..1f1703f051 100644
--- a/ui/qt/enabled_protocols_dialog.cpp
+++ b/ui/qt/enabled_protocols_dialog.cpp
@@ -261,46 +261,7 @@ bool EnabledProtocolsDialog::applyChanges()
void EnabledProtocolsDialog::writeChanges()
{
- char *pf_dir_path;
- char *pf_path;
- int pf_save_errno;
-
- /* Create the directory that holds personal configuration files, if necessary. */
- 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,
- 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.",
- pf_path, g_strerror(pf_save_errno));
- g_free(pf_path);
- }
-
- save_enabled_protos_list(&pf_path, &pf_save_errno);
- if (pf_path != NULL)
- {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "Could not save to your enabled protocols file\n\"%s\": %s.",
- pf_path, g_strerror(pf_save_errno));
- g_free(pf_path);
- }
-
- save_disabled_heur_dissector_list(&pf_path, &pf_save_errno);
- if (pf_path != NULL)
- {
- simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
- "Could not save to your disabled heuristic protocol file\n\"%s\": %s.",
- pf_path, g_strerror(pf_save_errno));
- g_free(pf_path);
- }
- }
+ save_enabled_and_disabled_lists();
}
void EnabledProtocolsDialog::on_search_line_edit__textChanged(const QString &search_re)