diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-02-28 19:23:20 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2016-02-28 18:25:50 +0000 |
commit | 1a716800e37ae482901e9cce36c40005742dd78e (patch) | |
tree | 6dc88f72f082fa795646442e086363ff3d2f1b9f /ui/qt/filter_dialog.cpp | |
parent | f0425e83a16acabfec103f52099a3f20ea7b35c2 (diff) | |
download | wireshark-1a716800e37ae482901e9cce36c40005742dd78e.tar.gz |
Qt: Add dialog geometry restore
Add GeometryStateDialog class to handle load and save dialog geometry.
The QDialog class name will be used as window name. For shared
classes the UAT name or the statistics title or abbr will be used.
Change-Id: I5a019598307fb3861518f41e733de834788184d8
Reviewed-on: https://code.wireshark.org/review/14139
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/qt/filter_dialog.cpp')
-rw-r--r-- | ui/qt/filter_dialog.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ui/qt/filter_dialog.cpp b/ui/qt/filter_dialog.cpp index 7aff57e19f..0c211d0ce4 100644 --- a/ui/qt/filter_dialog.cpp +++ b/ui/qt/filter_dialog.cpp @@ -52,7 +52,7 @@ enum { }; FilterDialog::FilterDialog(QWidget *parent, FilterType filter_type, const QString new_filter) : - QDialog(parent), + GeometryStateDialog(parent), ui(new Ui::FilterDialog), filter_type_(filter_type), // syntax_worker_(NULL), @@ -60,11 +60,9 @@ FilterDialog::FilterDialog(QWidget *parent, FilterType filter_type, const QStrin new_filter_(new_filter) { ui->setupUi(this); + if (parent) loadGeometry(parent->width() * 2 / 3, parent->height() * 2 / 3); setWindowIcon(wsApp->normalIcon()); - // XXX Use recent settings instead - resize(parent->width() * 2 / 3, parent->height() * 2 / 3); - ui->filterTreeWidget->setDragEnabled(true); ui->filterTreeWidget->viewport()->setAcceptDrops(true); ui->filterTreeWidget->setDropIndicatorShown(true); |