List Info

Thread: KDE/kdepim/kmail




KDE/kdepim/kmail
user name
2007-10-28 07:24:40
SVN commit 730309 by marten:

Make the "How does this work? link in the folder- and
identity-templates
dialogues available at all times, even if the checkbox is
turned off.
Improve the wording of the resulting help displayed.

GUI:


 M  +13 -1     identitydialog.cpp  
 M  +10 -1     kmfolderdialog.cpp  
 M  +19 -32    templatesconfiguration.cpp  
 M  +2 -5      templatesconfiguration.h  


--- trunk/KDE/kdepim/kmail/identitydialog.cpp
#730308:730309
 -417,11
+417,23 
     vlay = new QVBoxLayout( tab );
     vlay->setMargin( marginHint() );
     vlay->setSpacing( spacingHint() );
+
+    QHBoxLayout *tlay = new QHBoxLayout(tab);
+    vlay->addLayout(tlay);
+
     mCustom = new QCheckBox( i18n("&Use custom
message templates"), tab );
-    vlay->addWidget( mCustom );
+    tlay->addWidget(mCustom,Qt::AlignLeft);
+
     mWidget = new TemplatesConfiguration( tab ,
"identity-templates" );
     mWidget->setEnabled( false );
+
+    // Move the help label outside of the templates
configuration widget,
+    // so that the help can be read even if the widget is
not enabled.
+    tlay->addStretch(9);
+   
tlay->addWidget(mWidget->helpLabel(),Qt::AlignRight);
+
     vlay->addWidget( mWidget );
+
     QHBoxLayout *btns = new QHBoxLayout();
     btns->setSpacing( spacingHint() );
     mCopyGlobal = new KPushButton( i18n("&Copy
Global Templates"), tab );
--- trunk/KDE/kdepim/kmail/kmfolderdialog.cpp
#730308:730309
 -764,11
+764,20 
   topLayout->setMargin( 0 );
   topLayout->setSpacing( KDialog::spacingHint() );
 
+  QHBoxLayout *topItems = new QHBoxLayout(this);
+  topLayout->addLayout( topItems );
+
   mCustom = new QCheckBox( i18n("&Use custom
message templates"), this );
-  topLayout->addWidget( mCustom );
+  topItems->addWidget( mCustom,Qt::AlignLeft );
 
   mWidget = new TemplatesConfiguration( this ,
"folder-templates" );
   mWidget->setEnabled( false );
+
+  // Move the help label outside of the templates
configuration widget,
+  // so that the help can be read even if the widget is not
enabled.
+  topItems->addStretch(9);
+ 
topItems->addWidget(mWidget->helpLabel(),Qt::AlignRigh
t);
+
   topLayout->addWidget( mWidget );
 
   QHBoxLayout *btns = new QHBoxLayout();
--- trunk/KDE/kdepim/kmail/templatesconfiguration.cpp
#730308:730309
 -65,42
+65,28 
   connect( mInsertCommand, SIGNAL( insertCommand(const
QString&, int) ),
            this, SLOT( slotInsertCommand(const QString
&, int) ) );
 
+  mHelpString =
+    i18n( "<qt>"
+	  "<p>Here you can create and manage templates
to use when "
+	  "composing new messages, replies or forwarded
messages.</p>"
+	  "<p>The message templates support
substitution commands, "
+	  "either simply type them or select them from
"
+	  "the <i>Insert command</i>
menu.</p>" );
   if ( QString( name ) == "folder-templates" ) {
-    mHelpString =
-      i18n( "<qt>"
-            "<p>Here you can create message
templates to use when you "
-            "compose new messages or replies, or when
you forward messages.</p>"
-            "<p>The message templates support
substitution commands "
-            "by simple typing them or selecting them
from menu "
-            "<i>Insert
command</i>.</p>"
-            "<p>Templates specified here are
folder-specific. "
+    mHelpString +=
+      i18n( "<p>Templates specified here are
folder-specific. "
             "They override both global templates and
per-identity "
-            "templates if they are
specified.</p>"
-            "</qt>" );
+            "templates.</p>" );
   } else if ( QString( name ) ==
"identity-templates" ) {
-    mHelpString =
-      i18n( "<qt>"
-            "<p>Here you can create message
templates to use when you "
-            "compose new messages or replies, or when
you forward messages.</p>"
-            "<p>The message templates support
substitution commands "
-            "by simple typing them or selecting them
from menu "
-            "<i>Insert
command</i>.</p>"
-            "<p>Templates specified here are
mail identity-wide. "
-            "They override global templates and are
being overridden by per-folder "
-            "templates if they are
specified.</p>"
-            "</qt>" );
+    mHelpString +=
+      i18n( "<p>Templates specified here are
identity-specific. "
+            "They override global templates, but can
be overridden by "
+	    "per-folder templates if they are
specified.</p>" );
   } else {
-    mHelpString =
-      i18n( "<qt>"
-            "<p>Here you can create message
templates to use when you "
-            "compose new messages or replies, or when
you forward messages.</p>"
-            "<p>The message templates support
substitution commands "
-            "by simple typing them or selecting them
from menu "
-            "<i>Insert
command</i>.</p>"
-            "<p>This is a global (default)
template. They can be overridden "
-            "by per-identity templates and by
per-folder templates "
-            "if they are specified.</p>"
-            "</qt>" );
+    mHelpString +=
+      i18n( "<p>These are global (default)
templates. They can be overridden "
+            "by per-identity templates or per-folder
templates "
+            "if they are specified.</p>"
);
   }
 
   mHelp->setText( i18n( "<a
href="whatsthis">How does this
work?</a>" ) );
 -108,6
+94,7 
            this, SLOT( slotHelpLinkClicked( const
QString& ) ) );
 }
 
+
 void TemplatesConfiguration::slotHelpLinkClicked( const
QString& )
 {
   QWhatsThis::showText( QCursor::pos(), mHelpString );
--- trunk/KDE/kdepim/kmail/templatesconfiguration.h
#730308:730309
 -55,23
+55,20 
     static QString defaultForward();
     static QString defaultQuoteString();
 
-  public slots:
+    QLabel *helpLabel() { return mHelp; }
 
+  public slots:
     void slotInsertCommand( const QString &cmd, int
adjustCursor = 0 );
-
     void slotTextChanged();
 
   signals:
-
     void changed();
 
   protected:
-
     QString strOrBlank( const QString &str );
     QString mHelpString;
 
   private slots:
-
     void slotHelpLinkClicked( const QString& );
 };
 
_______________________________________________
kde-docbook mailing list
kde-docbookkde.org
htt
ps://mail.kde.org/mailman/listinfo/kde-docbook

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )