diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-12-29 01:39:02 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-12-29 01:39:02 +0000 |
commit | 5bd252c44fd47ccf95ed6cedfa8759ac1c1c9dae (patch) | |
tree | 295b7b923bd8ea4f15e75ca4873b84d318199d27 /ui/qt/time_shift_dialog.cpp | |
parent | c7dd6480e4554178e2c74114eb7421a11dc325de (diff) |
Remove some duplicate code from ui/profile.c and move in more code from
ui/gtk/profile_dialog.c. Use the correct profile list in
profile_dialog.c so that deletion works.
Add a profile dialog to the Qt port. For some reason it crashes when
changing configuration profiles, which might be related to bug 7722.
Move the Qt configuration profile initialization from main.cpp to
wireshark_application.cpp. Make sure QMenuBar doesn't grab the
configuration profiles action on OS X. Add more role color names to
tango_colors.h.
svn path=/trunk/; revision=46834
Diffstat (limited to 'ui/qt/time_shift_dialog.cpp')
-rw-r--r-- | ui/qt/time_shift_dialog.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ui/qt/time_shift_dialog.cpp b/ui/qt/time_shift_dialog.cpp index 02127d125b..141a85e264 100644 --- a/ui/qt/time_shift_dialog.cpp +++ b/ui/qt/time_shift_dialog.cpp @@ -29,7 +29,6 @@ #include <ui/time_shift.h> #include "tango_colors.h" -#include <QMessageBox> TimeShiftDialog::TimeShiftDialog(QWidget *parent, capture_file *cf) : QDialog(parent), @@ -78,7 +77,7 @@ TimeShiftDialog::~TimeShiftDialog() void TimeShiftDialog::enableWidgets() { bool enable_two = ts_ui_->setOneButton->isChecked(); - bool enable_ok = false; + bool enable_apply = false; ts_ui_->setTwoCheckBox->setEnabled(enable_two); ts_ui_->setTwoFrameLineEdit->setEnabled(enable_two); @@ -88,7 +87,7 @@ void TimeShiftDialog::enableWidgets() if (ts_ui_->shiftAllButton->isChecked()) { if (ts_ui_->shiftAllTimeLineEdit->syntaxState() == SyntaxLineEdit::Valid) - enable_ok = true; + enable_apply = true; } else if (ts_ui_->setOneButton->isChecked()) { bool set_two_valid = false; if (ts_ui_->setTwoCheckBox->isChecked()) { @@ -102,10 +101,10 @@ void TimeShiftDialog::enableWidgets() if (set_two_valid && ts_ui_->setOneFrameLineEdit->syntaxState() == SyntaxLineEdit::Valid && ts_ui_->setOneTimeLineEdit->syntaxState() == SyntaxLineEdit::Valid) { - enable_ok = true; + enable_apply = true; } } else if (ts_ui_->unshiftAllButton->isChecked()) { - enable_ok = true; + enable_apply = true; } if (syntax_err_.isEmpty()) { @@ -124,7 +123,7 @@ void TimeShiftDialog::enableWidgets() .arg(ws_css_warn_background, 6, 16, QChar('0')) ); } - apply_button_->setEnabled(enable_ok); + apply_button_->setEnabled(enable_apply); } void TimeShiftDialog::checkFrameNumber(SyntaxLineEdit &frame_le) @@ -294,4 +293,3 @@ void TimeShiftDialog::on_buttonBox_helpRequested() * ex: set shiftwidth=4 tabstop=8 expandtab: * :indentSize=4:tabSize=8:noTabs=true: */ - |