NewTagDialog::NewTagDialog( QWidget* parent )
: KDialog( parent )
{
- setCaption( i18n( "Create new Tag" ) );
+ setCaption( i18nc( "@title:window", "Create New Tag" ) );
setButtons( Ok|Cancel );
enableButtonOk( false );
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() );
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();