summaryrefslogtreecommitdiff
path: root/core/apps/textedit/textedit.cpp
Unidiff
Diffstat (limited to 'core/apps/textedit/textedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index d28ece8..6804918 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -332,13 +332,13 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
332 QAction *wa = new QAction( tr("Wrap lines"), QString::null, 0, this, 0 ); 332 QAction *wa = new QAction( tr("Wrap lines"), QString::null, 0, this, 0 );
333 connect( wa, SIGNAL( toggled(bool) ), this, SLOT( setWordWrap(bool) ) ); 333 connect( wa, SIGNAL( toggled(bool) ), this, SLOT( setWordWrap(bool) ) );
334 wa->setToggleAction(TRUE); 334 wa->setToggleAction(TRUE);
335 wa->addTo( font ); 335 wa->addTo( font );
336 336
337 font->insertSeparator(); 337 font->insertSeparator();
338 font->insertItem("Font", this, SLOT(changeFont()) ); 338 font->insertItem(tr("Font"), this, SLOT(changeFont()) );
339 339
340 font->insertSeparator(); 340 font->insertSeparator();
341 nStart = new QAction( tr("Start with new file"), QString::null, 0, this, 0 ); 341 nStart = new QAction( tr("Start with new file"), QString::null, 0, this, 0 );
342 connect( nStart, SIGNAL( toggled(bool) ), this, SLOT( changeStartConfig(bool) ) ); 342 connect( nStart, SIGNAL( toggled(bool) ), this, SLOT( changeStartConfig(bool) ) );
343 nStart->setToggleAction(TRUE); 343 nStart->setToggleAction(TRUE);
344 nStart->addTo( font ); 344 nStart->addTo( font );
@@ -490,13 +490,13 @@ void TextEdit::fileNew()
490 } 490 }
491 newFile(DocLnk()); 491 newFile(DocLnk());
492} 492}
493 493
494void TextEdit::fileOpen() 494void TextEdit::fileOpen()
495{ 495{
496 browseForFiles=new fileBrowser(this,"Open File",TRUE,0, "text/*"); // 496 browseForFiles=new fileBrowser(this,tr("Open File"),TRUE,0, "text/*"); //
497 browseForFiles->setFileView( viewSelection ); 497 browseForFiles->setFileView( viewSelection );
498 browseForFiles->showMaximized(); 498 browseForFiles->showMaximized();
499 if( browseForFiles->exec() != -1 ) { 499 if( browseForFiles->exec() != -1 ) {
500 QString selFile = browseForFiles->selectedFileName; 500 QString selFile = browseForFiles->selectedFileName;
501 QStringList fileList = browseForFiles->fileList; 501 QStringList fileList = browseForFiles->fileList;
502 qDebug(selFile); 502 qDebug(selFile);
@@ -531,13 +531,13 @@ void TextEdit::doSearchBar()
531 searchBar->hide(); 531 searchBar->hide();
532} 532}
533 533
534#if 0 534#if 0
535void TextEdit::slotFind() 535void TextEdit::slotFind()
536{ 536{
537 FindDialog frmFind( "Text Editor", this ); 537 FindDialog frmFind( tr("Text Editor"), this );
538 connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), 538 connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)),
539 editor, SLOT(slotDoFind( const QString&,bool,bool))); 539 editor, SLOT(slotDoFind( const QString&,bool,bool)));
540 540
541 //case sensitive, backwards, [category] 541 //case sensitive, backwards, [category]
542 542
543 connect( editor, SIGNAL(notFound()), 543 connect( editor, SIGNAL(notFound()),
@@ -744,13 +744,13 @@ bool TextEdit::saveAs()
744 return true; 744 return true;
745 } 745 }
746 746
747 QString rt = editor->text(); 747 QString rt = editor->text();
748 qDebug(currentFileName); 748 qDebug(currentFileName);
749 749
750 if( currentFileName.isEmpty() || currentFileName == "Unnamed") { 750 if( currentFileName.isEmpty() || currentFileName == tr("Unnamed")) {
751 qDebug("do silly TT filename thing"); 751 qDebug("do silly TT filename thing");
752 if ( doc->name().isEmpty() ) { 752 if ( doc->name().isEmpty() ) {
753 QString pt = rt.simplifyWhiteSpace(); 753 QString pt = rt.simplifyWhiteSpace();
754 int i = pt.find( ' ' ); 754 int i = pt.find( ' ' );
755 QString docname = pt; 755 QString docname = pt;
756 if ( i > 0 ) 756 if ( i > 0 )
@@ -760,20 +760,20 @@ bool TextEdit::saveAs()
760 docname = docname.mid( 1 ); 760 docname = docname.mid( 1 );
761 docname.replace( QRegExp("/"), "_" ); 761 docname.replace( QRegExp("/"), "_" );
762 // cut the length. filenames longer than that don't make sense and something goes wrong when they get too long. 762 // cut the length. filenames longer than that don't make sense and something goes wrong when they get too long.
763 if ( docname.length() > 40 ) 763 if ( docname.length() > 40 )
764 docname = docname.left(40); 764 docname = docname.left(40);
765 if ( docname.isEmpty() ) 765 if ( docname.isEmpty() )
766 docname = "Unnamed"; 766 docname = tr("Unnamed");
767 doc->setName(docname); 767 doc->setName(docname);
768 currentFileName=docname; 768 currentFileName=docname;
769 } 769 }
770 } 770 }
771 771
772 772
773 fileSaveDlg=new fileSaver(this,"Save File As?",TRUE, 0, currentFileName); 773 fileSaveDlg=new fileSaver(this,tr("Save File As?"),TRUE, 0, currentFileName);
774 qDebug("wanna save filename "+currentFileName); 774 qDebug("wanna save filename "+currentFileName);
775 fileSaveDlg->exec(); 775 fileSaveDlg->exec();
776 if( fileSaveDlg->result() == 1 ) { 776 if( fileSaveDlg->result() == 1 ) {
777 QString fileNm=fileSaveDlg->selectedFileName; 777 QString fileNm=fileSaveDlg->selectedFileName;
778 qDebug("saving filename "+fileNm); 778 qDebug("saving filename "+fileNm);
779 QFileInfo fi(fileNm); 779 QFileInfo fi(fileNm);
@@ -794,13 +794,13 @@ bool TextEdit::saveAs()
794 FileManager fm; 794 FileManager fm;
795 if ( !fm.saveFile( *doc, rt ) ) { 795 if ( !fm.saveFile( *doc, rt ) ) {
796 return false; 796 return false;
797 } 797 }
798 if( fileSaveDlg->filePermCheck->isChecked() ) { 798 if( fileSaveDlg->filePermCheck->isChecked() ) {
799 filePermissions *filePerm; 799 filePermissions *filePerm;
800 filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)fileNm); 800 filePerm = new filePermissions(this, tr("Permissions"),true,0,(const QString &)fileNm);
801 filePerm->exec(); 801 filePerm->exec();
802 802
803 if( filePerm) 803 if( filePerm)
804 delete filePerm; 804 delete filePerm;
805 } 805 }
806 } 806 }
@@ -885,25 +885,25 @@ void TextEdit::changeFont() {
885 int i_size = cfg.readNumEntry("Size", fontInfo.pointSize()/10); 885 int i_size = cfg.readNumEntry("Size", fontInfo.pointSize()/10);
886 QString charSet = cfg.readEntry("CharSet", QFont::encodingName( fontInfo.charSet()) ); 886 QString charSet = cfg.readEntry("CharSet", QFont::encodingName( fontInfo.charSet()) );
887 887
888 defaultFont = fdb.font(family,style,i_size,charSet); 888 defaultFont = fdb.font(family,style,i_size,charSet);
889 889
890 FontDialog *fontDlg; 890 FontDialog *fontDlg;
891 fontDlg=new FontDialog(this,"FontDialog",TRUE); 891 fontDlg=new FontDialog(this,tr("FontDialog"),TRUE);
892 892
893 fontDlg->exec(); 893 fontDlg->exec();
894 894
895 QFont myFont=fontDlg->selectedFont; 895 QFont myFont=fontDlg->selectedFont;
896 editor->setFont( myFont); 896 editor->setFont( myFont);
897 delete fontDlg; 897 delete fontDlg;
898 898
899} 899}
900 900
901void TextEdit::editDelete() 901void TextEdit::editDelete()
902{ 902{
903 switch ( QMessageBox::warning(this,"Text Editor","Do you really want\nto delete the current file\nfrom the disk?\nThis is irreversable!!","Yes","No",0,0,1) ) { 903 switch ( QMessageBox::warning(this,tr("Text Editor"),tr("Do you really want\nto delete the current file\nfrom the disk?\nThis is irreversable!!"),tr("Yes"),tr("No"),0,0,1) ) {
904 case 0: 904 case 0:
905 if(doc) { 905 if(doc) {
906 doc->removeFiles(); 906 doc->removeFiles();
907 clear(); 907 clear();
908 setCaption( tr("Text Editor") ); 908 setCaption( tr("Text Editor") );
909 } 909 }