[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    PATCH auto-format diag
From:       Thomas Zander <zander () planescape ! com>
Date:       2002-03-22 21:15:46
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


Attached is a patch for the auto-formatting dialog in kotext.

* "Use number style" ) ); // what does this do??
* I think the config option to replace bulleting to a special char in that 
dialog is very out of place and confusing. I think it should be moved or 
removed.

The rest should be obvious.

Anyone comment on the above? 
Ok to commit?

-- 
Thomas Zander                                            zander@earthling.net
The only thing worse than failure is the fear of trying something new

["autoformat.diff" (text/plain)]

Index: koAutoFormatDia.cc
===================================================================
RCS file: /home/kde/koffice/lib/kotext/koAutoFormatDia.cc,v
retrieving revision 1.25
diff -u -3 -p -r1.25 koAutoFormatDia.cc
--- koAutoFormatDia.cc	2002/03/22 13:52:18	1.25
+++ koAutoFormatDia.cc	2002/03/22 21:18:09
@@ -28,6 +28,7 @@
 #include <klistview.h>
 
 #include <qlayout.h>
+#include <qwhatsthis.h> 
 #include <qvbox.h>
 #include <qcheckbox.h>
 #include <qpushbutton.h>
@@ -151,8 +152,9 @@ void KoAutoFormatDia::setupTab1()
     grid->setAutoAdd( true );
 
     cbUpperCase = new QCheckBox( tab1 );
-    cbUpperCase->setText( i18n( "Convert first letter from the first word of a \
                sentence automatically\n"
-                                "to &Upper Case (e.g. \"bla. this is a Test\" to \
\"bla. This is a Test\")" ) ); +    cbUpperCase->setText( i18n( "Convert &first \
letter of a sentence automatically to &uppercase\n" +                                \
"(e.g. \"my house. in this town\" to \"my house. In this town\")" ) ); +    \
QWhatsThis::add( cbUpperCase, i18n("Detect when a new sentence is started and always \
ensure that the first character is an uppercase character."));  cbUpperCase->resize( \
cbUpperCase->sizeHint() );  
     cbUpperCase->setChecked( m_autoFormat.getConfigUpperCase() );
@@ -160,51 +162,58 @@ void KoAutoFormatDia::setupTab1()
     ( void )new QWidget( tab1 );
 
     cbUpperUpper = new QCheckBox( tab1 );
-    cbUpperUpper->setText( i18n( "Convert two Upper &Case letters to one Upper Case \
                and one Lower Case letter.\n"
-                                 "(e.g. HEllo to Hello)" ) );
+    cbUpperUpper->setText( i18n( "Convert two uppercase characters to one uppercase \
and one lowercase character.\n" +                                 "(e.g. PErfect to \
Perfect)" ) ); +    QWhatsThis::add( cbUpperUpper, i18n("All words are checked for \
the common mistake to hold the shift key a bit too long. If some words have to have \
two uppercase characters then those exceptions should be added in the %1 \
tab.").arg(i18n("Exceptions")));  cbUpperUpper->resize( cbUpperUpper->sizeHint() );
     cbUpperUpper->setChecked( m_autoFormat.getConfigUpperUpper() );
     ( void )new QWidget( tab1 );
 
     cbDetectUrl=new QCheckBox( tab1 );
-    cbDetectUrl->setText( i18n( "Auto detect URL" ) );
+    cbDetectUrl->setText( i18n( "Auto format &URLs" ) );
+    QWhatsThis::add( cbDetectUrl, i18n("Detect when a URL (Universal Remote \
Location) is typed and provide formatting that matches the way an internet browser \
would show a URL."));  cbDetectUrl->resize( cbDetectUrl->sizeHint() );
     cbDetectUrl->setChecked( m_autoFormat.getConfigAutoDetectUrl());
     ( void )new QWidget( tab1 );
 
     cbIgnoreDoubleSpace=new QCheckBox( tab1 );
-    cbIgnoreDoubleSpace->setText( i18n( "Suppress Double Spaces" ) );
+    cbIgnoreDoubleSpace->setText( i18n( "Suppress double spaces" ) );
+    QWhatsThis::add( cbIgnoreDoubleSpace, i18n("Make sure that more then one space \
can not be typed as this is a common mistake which is quite hard to find in formatted \
text."));  cbIgnoreDoubleSpace->resize( cbIgnoreDoubleSpace->sizeHint() );
     cbIgnoreDoubleSpace->setChecked( m_autoFormat.getConfigIgnoreDoubleSpace());
     ( void )new QWidget( tab1 );
 
     cbRemoveSpaceBeginEndLine=new QCheckBox( tab1 );
-    cbRemoveSpaceBeginEndLine->setText( i18n( "Remove spaces at the begining and the \
end of lines" ) ); +    cbRemoveSpaceBeginEndLine->setText( i18n( "Remove spaces at \
the beginning and the end of paragraphs" ) ); +    QWhatsThis::add( \
cbRemoveSpaceBeginEndLine, i18n("Keep correct formatting and indenting of sentences \
                by automatically removing spaces typed at beginning and end of a \
                paragraph."));
     cbRemoveSpaceBeginEndLine->resize( cbRemoveSpaceBeginEndLine->sizeHint() );
     cbRemoveSpaceBeginEndLine->setChecked( \
m_autoFormat.getConfigRemoveSpaceBeginEndLine());  ( void )new QWidget( tab1 );
 
     cbAutoChangeFormat=new QCheckBox( tab1 );
-    cbAutoChangeFormat->setText( i18n( "Automatic *Bold* and  _Underline_ \
formatting" ) ); +    cbAutoChangeFormat->setText( i18n( "Automatically do bold and \
underline formatting") ); +    QWhatsThis::add( cbAutoChangeFormat, i18n("When you \
use _underline_ or *bolding* then the words in between the underscores or stars will \
be converted to have an underline or a bold formatting") );  \
                cbAutoChangeFormat->resize( cbAutoChangeFormat->sizeHint() );
     cbAutoChangeFormat->setChecked( m_autoFormat.getConfigAutoChangeFormat());
     ( void )new QWidget( tab1 );
 
     cbAutoReplaceNumber=new QCheckBox( tab1 );
-    cbAutoReplaceNumber->setText( i18n( "Replace 1/2... with " )+QString("½...") );
+    cbAutoReplaceNumber->setText( i18n( "We add the 1/2 char at the %1", "Replace \
1/2... with %1..." ).arg(QString("½")) ); +    QWhatsThis::add( cbAutoReplaceNumber, \
i18n("Most standard fraction notations will be converted when available") );  \
                cbAutoReplaceNumber->resize( cbAutoReplaceNumber->sizeHint() );
     cbAutoReplaceNumber->setChecked( m_autoFormat.getConfigAutoReplaceNumber());
     ( void )new QWidget( tab1 );
 
     cbUseNumberStyle=new QCheckBox( tab1 );
-    cbUseNumberStyle->setText( i18n( "Use number style" ) );
+    cbUseNumberStyle->setText( i18n( "Use number style" ) ); // what does this do??
+    //QWhatsThis::add( cbUseNumberStyle, i18n("") );
     cbUseNumberStyle->resize( cbUseNumberStyle->sizeHint() );
     cbUseNumberStyle->setChecked( m_autoFormat.getConfigAutoNumberStyle());
     ( void )new QWidget( tab1 );
 
-
     cbUseBulletStyle=new QCheckBox( tab1 );
-    cbUseBulletStyle->setText( i18n( "Use bullet style - * " ) );
+    cbUseBulletStyle->setText( i18n( "Automatically convert to bullet style" ) );
+    QWhatsThis::add( cbUseBulletStyle, i18n("Automatically use the bullet style when \
the sentence starts with '-' or '*'") );  cbUseBulletStyle->resize( \
cbUseBulletStyle->sizeHint() );  cbUseBulletStyle->setChecked( \
m_autoFormat.getConfigUseBulletSyle());  ( void )new QWidget( tab1 );


[Attachment #6 (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic