Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 140eedd1 authored by Laurent Montel's avatar Laurent Montel 😁

Fix save/load dialog size

parent 5f84b4ac
......@@ -42,6 +42,12 @@ MessagePropertyDialog::MessagePropertyDialog( QWidget *parent, KTNEFMessage *msg
setMainWidget( mListView );
setButtonGuiItem(KDialog::User1,KStandardGuiItem::save());
AttachPropertyDialog::formatPropertySet( mMessage, mListView );
readConfig();
}
MessagePropertyDialog::~MessagePropertyDialog()
{
writeConfig();
}
void MessagePropertyDialog::slotUser1()
......@@ -49,3 +55,18 @@ void MessagePropertyDialog::slotUser1()
AttachPropertyDialog::saveProperty( mListView, mMessage, this );
}
void MessagePropertyDialog::readConfig()
{
KConfigGroup group( KGlobal::config(), "MessagePropertyDialog" );
const QSize size = group.readEntry( "Size", QSize(600, 400) );
if ( size.isValid() ) {
resize( size );
}
}
void MessagePropertyDialog::writeConfig()
{
KConfigGroup group( KGlobal::config(), "MessagePropertyDialog" );
group.writeEntry( "Size", size() );
group.sync();
}
......@@ -31,11 +31,13 @@ class MessagePropertyDialog : public KDialog
Q_OBJECT
public:
explicit MessagePropertyDialog( QWidget *parent, KTNEFMessage *msg );
~MessagePropertyDialog();
private slots:
void slotUser1();
private:
void readConfig();
void writeConfig();
KTNEFMessage *mMessage;
QTreeWidget *mListView;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment