diff options
| author | Peter Penz <[email protected]> | 2008-06-08 13:10:14 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-06-08 13:10:14 +0000 |
| commit | eeea9662b7963c6cbecdcc03ef650c4b6b860640 (patch) | |
| tree | 084927f59616cb597b6648853e41d820065d7455 | |
| parent | 6a9d80a1fd972057bdc10605d366695558167361 (diff) | |
* use a default size where the height of the line editor is not too small
* remember the size set by the user
CCMAIL: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=818381
| -rw-r--r-- | src/tagcloud/newtagdialog.cpp | 12 | ||||
| -rw-r--r-- | src/tagcloud/newtagdialog.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/tagcloud/newtagdialog.cpp b/src/tagcloud/newtagdialog.cpp index 4dfafedf8..94af9aad7 100644 --- a/src/tagcloud/newtagdialog.cpp +++ b/src/tagcloud/newtagdialog.cpp @@ -36,14 +36,26 @@ NewTagDialog::NewTagDialog( QWidget* parent ) connect( m_editTagLabel, SIGNAL( textChanged(const QString&) ), this, SLOT( slotLabelChanged(const QString&) ) ); + + // TODO: use KGlobal::config() if NewTagDialog will be moved to kdelibs (KDE 4.2?) + KConfigGroup group(KSharedConfig::openConfig("dolphinrc"), "NewTagDialog"); + restoreDialogSize(group); } NewTagDialog::~NewTagDialog() { + // TODO: use KGlobal::config() if NewTagDialog will be moved to kdelibs (KDE 4.2?) + KConfigGroup group(KSharedConfig::openConfig("dolphinrc"), "NewTagDialog"); + saveDialogSize(group, KConfigBase::Persistent); } +QSize NewTagDialog::sizeHint() const +{ + return QSize(400, 256); +} + void NewTagDialog::slotLabelChanged( const QString& text ) { enableButtonOk( !text.isEmpty() ); diff --git a/src/tagcloud/newtagdialog.h b/src/tagcloud/newtagdialog.h index c3f6ff017..b11cd1611 100644 --- a/src/tagcloud/newtagdialog.h +++ b/src/tagcloud/newtagdialog.h @@ -33,6 +33,8 @@ class NewTagDialog : public KDialog, public Ui_NewTagDialog public: ~NewTagDialog(); + virtual QSize sizeHint() const; + static Nepomuk::Tag createTag( QWidget* parent = 0 ); private Q_SLOTS: |
