diff --git a/TODO b/TODO index 3dc6d02..d039121 100644 --- a/TODO +++ b/TODO @@ -23,8 +23,6 @@ Random plans and ideas for 1.1 and beyond: hopefully be able to get meaningful progress status reporting while resizing, checking and so on. -* Default size of File System Support dialog window. - * Re-design partition list. Maybe include all disks into the list and drop the devices panel? diff --git a/src/gui/filesystemsupportdialog.cpp b/src/gui/filesystemsupportdialog.cpp index 428fe53..a44d00a 100644 --- a/src/gui/filesystemsupportdialog.cpp +++ b/src/gui/filesystemsupportdialog.cpp @@ -39,8 +39,6 @@ FileSystemSupportDialog::FileSystemSupportDialog(QWidget* parent) : setCaption(i18nc("@title:window", "File System Support")); setButtons(KDialog::Ok); - resize(dialogWidget().width(), dialogWidget().height()); - setupDialog(); setupConnections(); @@ -54,6 +52,11 @@ FileSystemSupportDialog::~FileSystemSupportDialog() saveDialogSize(kcg); } +QSize FileSystemSupportDialog::sizeHint() const +{ + return QSize(690, 490); +} + void FileSystemSupportDialog::setupDialog() { QPixmap yes(BarIcon("dialog-ok")); diff --git a/src/gui/filesystemsupportdialog.h b/src/gui/filesystemsupportdialog.h index 17e3eb7..612bfc2 100644 --- a/src/gui/filesystemsupportdialog.h +++ b/src/gui/filesystemsupportdialog.h @@ -48,18 +48,24 @@ class FileSystemSupportDialog : public KDialog public: QTreeWidget& tree() { Q_ASSERT(m_Tree); return *m_Tree; } + const QTreeWidget& tree() const { Q_ASSERT(m_Tree); return *m_Tree; } KPushButton& buttonRescan() { Q_ASSERT(m_ButtonRescan); return *m_ButtonRescan; } + const KPushButton& buttonRescan() const { Q_ASSERT(m_ButtonRescan); return *m_ButtonRescan; } }; public: FileSystemSupportDialog(QWidget* parent); ~FileSystemSupportDialog(); + public: + QSize sizeHint() const; + protected slots: void onButtonRescanClicked(); protected: FileSystemSupportDialogWidget& dialogWidget() { Q_ASSERT(m_FileSystemSupportDialogWidget); return *m_FileSystemSupportDialogWidget; } + const FileSystemSupportDialogWidget& dialogWidget() const { Q_ASSERT(m_FileSystemSupportDialogWidget); return *m_FileSystemSupportDialogWidget; } void setupDialog(); void setupConnections();