Promote Expert preference UAT to main preference tree.

"Expert" has been treated as a protocol "internally", but I
doubt users would consider it one.  Since the only preference
is a UAT, just make it its own leaf off of the main preference
tree (similar to Filter Expressions UAT) and not have it buried
with all of the protocols.

Change-Id: I385314d8791440e6ced3dbd71305ee75bc373e52
Reviewed-on: https://code.wireshark.org/review/22580
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Michael Mann 2017-07-10 22:29:03 -04:00 committed by Anders Broman
parent 2483ef02c8
commit d4d30faeb8
3 changed files with 21 additions and 3 deletions

View File

@ -40,8 +40,7 @@
#include <QTreeWidgetItemIterator>
// To do:
// - Test with custom expert levels (Preferences -> Protocols -> Expert).
// - Figure out why the expert level prefs are buried under "Protocols".
// - Test with custom expert levels (Preferences -> Expert).
// - Test with large captures. Add a custom model if needed.
// - Promote to a fourth pane in the main window?
// - Make colors configurable? In theory we could condense image/expert_indicators.svg,

View File

@ -442,7 +442,18 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) :
// Printing prefs don't apply here.
module_t *print_module = prefs_find_module("print");
if (print_module) print_module->use_gui = FALSE;
if (print_module)
print_module->use_gui = FALSE;
//Since "expert" is really a pseudo protocol, it shouldn't be
//categorized with other "real" protocols when it comes to
//preferences. Since it's just a UAT, don't bury it in
//with the other protocols
pd_ui_->expertFrame->setUat(uat_get_table_by_name("Expert Info Severity Level Configuration"));
module_t *expert_module = prefs_find_module("_ws.expert");
if (expert_module)
expert_module->use_gui = FALSE;
// We called takeChildren above so this shouldn't be necessary.
while (tmp_item.childCount() > 0) {
@ -903,6 +914,7 @@ void PreferencesDialog::on_buttonBox_accepted()
pd_ui_->columnFrame->unstash();
pd_ui_->filterExpressonsFrame->acceptChanges();
pd_ui_->expertFrame->acceptChanges();
prefs_main_write();
if (save_decode_as_entries(&err) < 0)
@ -954,6 +966,7 @@ void PreferencesDialog::on_buttonBox_rejected()
{
//handle frames that don't have their own OK/Cancel "buttons"
pd_ui_->filterExpressonsFrame->rejectChanges();
pd_ui_->expertFrame->rejectChanges();
}
void PreferencesDialog::on_buttonBox_helpRequested()

View File

@ -59,6 +59,11 @@
<string>Capture</string>
</property>
</item>
<item>
<property name="text">
<string>Expert</string>
</property>
</item>
<item>
<property name="text">
<string>Filter Buttons</string>
@ -85,6 +90,7 @@
<widget class="ColumnPreferencesFrame" name="columnFrame"/>
<widget class="FontColorPreferencesFrame" name="fontandcolorFrame"/>
<widget class="CapturePreferencesFrame" name="captureFrame"/>
<widget class="UatFrame" name="expertFrame"/>
<widget class="UatFrame" name="filterExpressonsFrame"/>
<widget class="QFrame" name="advancedFrame">
<layout class="QVBoxLayout" name="verticalLayout_2">