]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tagcloud/newtagdialog.cpp
use a smaller step size when using the scroll wheel
[dolphin.git] / src / tagcloud / newtagdialog.cpp
index 0fe574fdc9e022979ef29b16921e495b3416e8eb..8785d578c1c72126f413c7258f6e48c5a795d89a 100644 (file)
@@ -28,7 +28,7 @@
 NewTagDialog::NewTagDialog( QWidget* parent )
     : KDialog( parent )
 {
-    setCaption( i18n( "Create new Tag" ) );
+    setCaption( i18nc( "@title:window", "Create New Tag" ) );
     setButtons( Ok|Cancel );
     enableButtonOk( false );
 
@@ -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() );
@@ -53,8 +65,8 @@ void NewTagDialog::slotLabelChanged( const QString& text )
 Nepomuk::Tag NewTagDialog::createTag( QWidget* parent )
 {
     NewTagDialog dlg( parent );
-    dlg.m_labelTitle->setText( i18n( "Create New Tag" ) );
-    dlg.m_labelTitle->setComment( i18n( "with optional icon and description" ) );
+    dlg.m_labelTitle->setText( i18nc( "@title:window", "Create New Tag" ) );
+    dlg.m_labelTitle->setComment( i18nc( "@title:window subtitle to previous message", "with optional icon and description" ) );
     dlg.m_labelTitle->setPixmap( KIcon( "nepomuk" ).pixmap( 32, 32 ) );
 
     dlg.m_editTagLabel->setFocus();