]> cloud.milkyroute.net Git - dolphin.git/commitdiff
* use a default size where the height of the line editor is not too small
authorPeter Penz <peter.penz19@gmail.com>
Sun, 8 Jun 2008 13:10:14 +0000 (13:10 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sun, 8 Jun 2008 13:10:14 +0000 (13:10 +0000)
* remember the size set by the user

CCMAIL: trueg@kde.org

svn path=/trunk/KDE/kdebase/apps/; revision=818381

src/tagcloud/newtagdialog.cpp
src/tagcloud/newtagdialog.h

index 4dfafedf88537c5879d526ec00730983563bfea3..94af9aad7cb1c80e0edfbded60141cbe5351f195 100644 (file)
@@ -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() );
index c3f6ff017c4b132ff142927fa29559f3019a07ab..b11cd16117f6f2bccf3c41f388b2da1b02dc0e4b 100644 (file)
@@ -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: