author | llornkcor <llornkcor> | 2002-04-06 22:38:50 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-06 22:38:50 (UTC) |
commit | 08f0cefd22cb2122850b0786dafae15d0a5efebb (patch) (side-by-side diff) | |
tree | 9b3b576e557b92e9cb60f97d6a20875968910f1b | |
parent | 6c651fd3b48421fe2fb0f76968c29ef142efc162 (diff) | |
download | opie-08f0cefd22cb2122850b0786dafae15d0a5efebb.zip opie-08f0cefd22cb2122850b0786dafae15d0a5efebb.tar.gz opie-08f0cefd22cb2122850b0786dafae15d0a5efebb.tar.bz2 |
translation stuff
-rw-r--r-- | core/apps/textedit/fileBrowser.cpp | 26 | ||||
-rw-r--r-- | core/apps/textedit/filePermissions.cpp | 12 | ||||
-rw-r--r-- | core/apps/textedit/fileSaver.cpp | 6 | ||||
-rw-r--r-- | core/apps/textedit/fontDialog.cpp | 2 | ||||
-rw-r--r-- | core/apps/textedit/textedit.cpp | 18 |
5 files changed, 32 insertions, 32 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp index b655c96..bc99348 100644 --- a/core/apps/textedit/fileBrowser.cpp +++ b/core/apps/textedit/fileBrowser.cpp @@ -35,33 +35,33 @@ #include <qlineedit.h> #include <qstringlist.h> #include <unistd.h> #include <stdlib.h> static int u_id = 1; static int get_unique_id() { return u_id++; } fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags fl , const QString mimeFilter ) : QDialog( parent, name, modal, fl ) { if ( !name ) - setName( "fileBrowser" ); + setName( tr("fileBrowser") ); setCaption(tr( name ) ); // mimeType = mimeFilter; // MimeType mt( mimeType); // if( mt.extension().isEmpty()) // QStringList filterList; // filterList=QStringList::split(";",mimeFilter,FALSE); // for ( QStringList::Iterator it = filterList.begin(); it != filterList.end(); ++it ) { // printf( "%s \n", (*it).latin1() ); // } filterStr = mimeFilter.right(mimeFilter.length() - mimeFilter.find("/",0,TRUE) - 1);// "*"; qDebug(filterStr); // else // filterStr = "*."+ mt.extension(); // qDebug("description "+mt.description()); @@ -107,33 +107,33 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton"); homeButton->setMinimumSize( QSize( 20, 20 ) ); homeButton->setMaximumSize( QSize( 20, 20 ) ); connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); homeButton->setFlat(TRUE); layout->addMultiCellWidget( homeButton, 0, 0, 7, 7 ); FileStack = new QWidgetStack( this ); ListView = new QListView( this, "ListView" ); // ListView->setMinimumSize( QSize( 100, 25 ) ); ListView->addColumn( tr( "Name" ) ); ListView->setColumnWidth(0,120); ListView->setSorting( 2, FALSE); ListView->addColumn( tr( "Size" ) ); ListView->setColumnWidth(1,-1); - ListView->addColumn( "Date",-1); + ListView->addColumn( tr("Date"),-1); ListView->setColumnWidthMode(0,QListView::Manual); ListView->setColumnAlignment(1,QListView::AlignRight); ListView->setColumnAlignment(2,QListView::AlignRight); ListView->setAllColumnsShowFocus( TRUE ); QPEApplication::setStylusOperation( ListView->viewport(),QPEApplication::RightOnHold); connect( ListView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), this, SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); connect( ListView, SIGNAL( clicked( QListViewItem*)), SLOT(listClicked(QListViewItem *)) ); FileStack->addWidget( ListView, get_unique_id() ); fileSelector = new FileSelector( mimeType, FileStack, "fileselector" , FALSE, FALSE); //buggy // connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( showEditTools() ) ); @@ -335,40 +335,40 @@ void fileBrowser::homeButtonPushed() { currentDir.cd( current, TRUE); populateList(); update(); } void fileBrowser::docButtonPushed() { QString current = QPEApplication::documentDir(); chdir( current.latin1() ); currentDir.cd( current, TRUE); populateList(); update(); } void fileBrowser::selectionChanged( const QString &select ) { - if ( select == "Documents") { + if ( select == tr("Documents")) { FileStack->raiseWidget( fileSelector ); dirPathCombo->hide(); cdUpButton->hide(); docButton->hide(); homeButton->hide(); } else { - if ( select == "All files" ) + if ( select == tr("All files") ) currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::All); else currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); populateList(); update(); dirPathCombo->show(); cdUpButton->show(); docButton->show(); homeButton->show(); FileStack->raiseWidget( ListView ); } } void fileBrowser::docOpen( const DocLnk &doc ) { @@ -399,76 +399,76 @@ void fileBrowser::showListMenu(QListViewItem *item) { m.insertSeparator(); m.insertItem( tr( "Delete" ), this, SLOT( localDelete() )); } else { m.insertItem( tr( "Make Directory" ), this, SLOT( makDir() )); m.insertItem( tr( "Rescan" ), this, SLOT( populateList() )); } m.exec( QCursor::pos() ); } void fileBrowser::doCd() { listClicked( ListView->currentItem()); } void fileBrowser::makDir() { InputDialog *fileDlg; - fileDlg = new InputDialog(this,"Make Directory",TRUE, 0); + fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); fileDlg->exec(); if( fileDlg->result() == 1 ) { QString filename = fileDlg->LineEdit1->text(); qDebug("Make dir"); currentDir.mkdir( currentDir.canonicalPath()+"/"+filename); } populateList(); } void fileBrowser::localRename() { QString curFile = ListView->currentItem()->text(0); InputDialog *fileDlg; - fileDlg = new InputDialog(this,"Rename",TRUE, 0); + fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); fileDlg->setTextEdit((const QString &) curFile); fileDlg->exec(); if( fileDlg->result() == 1 ) { QString oldname = currentDir.canonicalPath() + "/" + curFile; QString newName = currentDir.canonicalPath() + "/" + fileDlg->LineEdit1->text();//+".playlist"; if( rename(oldname.latin1(), newName.latin1())== -1) - QMessageBox::message("Note","Could not rename"); + QMessageBox::message(tr("Note"),tr("Could not rename")); } populateList(); } void fileBrowser::localDelete() { QString f = ListView->currentItem()->text(0); if(QDir(f).exists() ) { - switch ( QMessageBox::warning(this,"Delete","Do you really want to delete\n"+f+ - " ?\nIt must be empty","Yes","No",0,0,1) ) { + switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+ + tr(" ?\nIt must be empty"),tr("Yes"),tr("No"),0,0,1) ) { case 0: { f=currentDir.canonicalPath()+"/"+f; QString cmd="rmdir "+f; system( cmd.latin1()); populateList(); } break; case 1: // exit break; }; } else { - switch ( QMessageBox::warning(this,"Delete","Do you really want to delete\n"+f - +" ?","Yes","No",0,0,1) ) { + switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f + +" ?",tr("Yes"),tr("No"),0,0,1) ) { case 0: { f=currentDir.canonicalPath()+"/"+f; QString cmd="rm "+f; system( cmd.latin1()); populateList(); } break; case 1: // exit break; }; } } void fileBrowser::updateMimeTypeMenu() { @@ -480,33 +480,33 @@ void fileBrowser::updateMimeTypeMenu() { // Type filter QStringList types; types << tr("All"); types << "--"; types += getMimeTypes(); prev = typemb->currentText(); typemb->clear(); typemb->insertItems(types); // typemb->select(prev); connect(typemb, SIGNAL(selected(const QString&)), this, SLOT(showType(const QString&))); } void fileBrowser::showType(const QString &t) { qDebug(t); - if(t.find("All",0,TRUE) != -1) { + if(t.find(tr("All"),0,TRUE) != -1) { filterStr = "*"; } else { QStringList list = mimetypes.grep( t,TRUE); QString ext; for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { mimeType =(*it); MimeType mt( mimeType); // qDebug("mime "+mimeType); // qDebug("description "+mt.description()); // qDebug( "id "+mt.id()); // qDebug("extension "+mt.extension()); // if( mt.extension().isEmpty()) filterStr = "*"; // else // filterStr = "*."+ mt.extension()+" "; // printf( "%s \n", (*it).latin1() ); @@ -592,33 +592,33 @@ void fileBrowser::dirPathEditPressed() { void fileBrowser::fillCombo(const QString ¤tPath) { dirPathCombo->lineEdit()->setText(currentPath); if( dirPathStringList.grep(currentPath,TRUE).isEmpty() ) { dirPathCombo->clear(); dirPathStringList.prepend(currentPath ); dirPathCombo->insertStringList( dirPathStringList,-1); } } InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) - setName( "InputDialog" ); + setName( tr("InputDialog") ); resize( 234, 50 ); setMaximumSize( QSize( 240, 50 ) ); setCaption( tr(name ) ); LineEdit1 = new QLineEdit( this, "LineEdit1" ); LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) ); } InputDialog::~InputDialog() { inputText= LineEdit1->text(); } void InputDialog::setTextEdit(const QString &string) { LineEdit1->setText(string); diff --git a/core/apps/textedit/filePermissions.cpp b/core/apps/textedit/filePermissions.cpp index 5af3971..def957b 100644 --- a/core/apps/textedit/filePermissions.cpp +++ b/core/apps/textedit/filePermissions.cpp @@ -22,34 +22,34 @@ #include <qlayout.h> #include <qvariant.h> #include <qtooltip.h> #include <qmessagebox.h> #include <unistd.h> #include <sys/stat.h> #include <stdlib.h> #include <sys/types.h> #include <pwd.h> #include <grp.h> filePermissions::filePermissions( QWidget* parent, const char* name, bool modal, WFlags fl, const QString &fileName ) : QDialog( parent, name, modal, fl ) { if ( !name ) - setName( "filePermissions" ); - qDebug("FilePermissions "+fileName); + setName( tr("filePermissions") ); +// qDebug("FilePermissions "+fileName); resize( 236, 210 ); setMaximumSize( QSize( 236, 210 ) ); setCaption( tr( "Set File Permissions" ) ); TextLabel1 = new QLabel( this, "TextLabel1" ); TextLabel1->setGeometry( QRect( 25, 5, 175, 20 ) ); TextLabel1->setText( tr( "Set file permissions for:" ) ); LineEdit1 = new QLineEdit( this, "LineEdit1" ); LineEdit1->setGeometry( QRect( 10, 25, 218, 22 ) ); LineEdit1->setReadOnly(true); TextLabel4 = new QLabel( this, "TextLabel4" ); TextLabel4->setGeometry( QRect( 5, 85, 50, 15 ) ); TextLabel4->setText( tr( "owner" ) ); @@ -235,40 +235,40 @@ void filePermissions::wrldWriteCheck() { void filePermissions::wrldExeCheck() { if(CheckBox1_8_2->isChecked()) { i_mode +=1; } else i_mode -=1; modeStr.sprintf("0%d",i_mode); ModeLine->setText(modeStr); // 0001 } void filePermissions::accept() { QFileInfo fi(file); struct passwd *pwd=0; struct group *grp=0; pwd = getpwnam(OwnerLineEdit->text().latin1() ); if(pwd == NULL) { perror("getpwnam"); - QMessageBox::warning(this,"Warning","Error- no user"); + QMessageBox::warning(this,tr("Warning"),tr("Error- no user")); return; } else { grp = getgrnam(GroupLineEdit->text().latin1()); if(grp==NULL) { perror("getgrnam"); - QMessageBox::warning(this,"Warning","Error- no group"); + QMessageBox::warning(this,tr("Warning"),tr("Error- no group")); return; } if( chown( file.latin1(), pwd->pw_uid, grp->gr_gid) <0) { perror("chown"); - QMessageBox::warning(this,"Warning","Error setting ownership or group"); + QMessageBox::warning(this,tr("Warning"),tr("Error setting ownership or group")); return; } bool ok; uint moder = modeStr.toUInt(&ok,8); if( chmod( file.latin1(), moder) < 0) { perror("chmod"); - QMessageBox::warning(this,"Warning","Error setting mode"); + QMessageBox::warning(this,tr("Warning"),tr("Error setting mode")); return; } } close(); } diff --git a/core/apps/textedit/fileSaver.cpp b/core/apps/textedit/fileSaver.cpp index f2a5355..b1ddc0b 100644 --- a/core/apps/textedit/fileSaver.cpp +++ b/core/apps/textedit/fileSaver.cpp @@ -17,82 +17,82 @@ #include <qpe/mimetype.h> #include <qpe/qpeapplication.h> #include <qlistview.h> #include <qpushbutton.h> #include <qfile.h> #include <qmessagebox.h> #include <qlineedit.h> #include <qcheckbox.h> #include <unistd.h> fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl , const QString currentFileName ) : QDialog( parent, name, modal, fl ) { if ( !name ) - setName( "fileSaver" ); + setName( tr("fileSaver")); resize( 240, 280 ); setCaption(tr( name ) ); QFileInfo fi(currentFileName); QString tmpFileName=fi.fileName(); // qDebug( tmpFileName); dirLabel = new QLabel(this, "DirLabel"); dirLabel->setText(currentDir.canonicalPath()); dirLabel->setGeometry(10,20,230,15); homeButton = new QPushButton(Resource::loadIconSet("home"),"",this,"homeButton"); homeButton->setGeometry(200,4,25,25); connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); homeButton->setFlat(TRUE); docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); docButton->setGeometry(170,4,25,25); connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); docButton->setFlat(TRUE); hideButton = new QPushButton( Resource::loadIconSet("textedit/s_hidden"),"",this,"hideButton"); hideButton->setGeometry(140,4,25,25); connect( hideButton,SIGNAL(toggled(bool)),this,SLOT( hideButtonPushed(bool)) ); hideButton->setToggleButton(TRUE); hideButton->setFlat(TRUE); ListView = new QListView( this, "ListView" ); ListView->addColumn( tr( "Name" ) ); ListView->setColumnWidth(0,120); ListView->setSorting( 2, FALSE); ListView->addColumn( tr( "Size" ) ); ListView->setColumnWidth(1,-1); - ListView->addColumn( "Date",-1); + ListView->addColumn( tr("Date"),-1); ListView->setColumnWidthMode(0,QListView::Manual); ListView->setColumnAlignment(1,QListView::AlignRight); // ListView->setMultiSelection(true); // ListView->setSelectionMode(QListView::Extended); ListView->setAllColumnsShowFocus( TRUE ); ListView->setGeometry( QRect( 10,35,220,125)); fileEdit= new QLineEdit(this); fileEdit->setGeometry( QRect( 10, 162, 205, 17)); fileEdit->setText( tmpFileName); filePermCheck = new QCheckBox( this, "SetFilePerms" ); - filePermCheck->setText("set file permissions"); + filePermCheck->setText(tr("set file permissions")); filePermCheck->setGeometry(10, 178, 150,17); // signals and slots connections connect( ListView, SIGNAL(doubleClicked( QListViewItem*)), SLOT(listDoubleClicked(QListViewItem *)) ); connect( ListView, SIGNAL(pressed( QListViewItem*)), SLOT(listClicked(QListViewItem *)) ); // tmpFileName=fi.FilePath(); // qDebug( tmpFileName); currentDir.setPath( QDir::currentDirPath() ); currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden */| QDir::All); populateList(); move(0,15); fileEdit->setFocus(); } fileSaver::~fileSaver() { diff --git a/core/apps/textedit/fontDialog.cpp b/core/apps/textedit/fontDialog.cpp index e7bd924..681e8a6 100644 --- a/core/apps/textedit/fontDialog.cpp +++ b/core/apps/textedit/fontDialog.cpp @@ -22,33 +22,33 @@ copyright 2002 by L.J. Potter ljp@llornkcor.com #include <qpe/qpeapplication.h> #include <qgroupbox.h> #include <qlabel.h> #include <qlistbox.h> #include <qmultilineedit.h> #include <qpushbutton.h> #include <qlayout.h> #include <qvariant.h> #include <qtooltip.h> #include <qwhatsthis.h> FontDialog::FontDialog( QWidget * parent, const char* name , bool modal, WFlags fl ) :QDialog /*QWidget*/( parent, name , modal, fl ) { if ( !name ) - setName( "FontDialog" ); + setName( tr("FontDialog") ); setCaption( tr( "Font Dialog" ) ); FontTextLabel4 = new QLabel( this, "TextLabel4" ); FontTextLabel4->setGeometry( QRect( 145, 100, 30, 19 /*192, 0, 43, 19*/ ) ); FontTextLabel4->setText( tr( "Size" ) ); FamilyGroup = new QGroupBox( this, "FamilyGroup" ); FamilyGroup->setGeometry( QRect( 5, 5, 115, 135 /*0, 6, 185, 131 */) ); FamilyGroup->setTitle( tr( "Font" ) ); familyListBox = new QListBox( FamilyGroup, "familyListBox" ); familyListBox->setGeometry( QRect( 5, 20, 100, 105 /* 6, 18, 170, 105 */) ); GroupBox2 = new QGroupBox( this, "GroupBox2" ); GroupBox2->setGeometry( QRect( 120, 5, 100, 90/* 0, 138, 170, 90*/ ) ); GroupBox2->setTitle( tr( "Font Style" ) ); 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 @@ -322,33 +322,33 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) connect( ia, SIGNAL( toggled(bool) ), this, SLOT( setItalic(bool) ) ); ia->setToggleAction(TRUE); ia->addTo( font ); ba->setOn(defb); ia->setOn(defi); font->insertSeparator(); #endif QAction *wa = new QAction( tr("Wrap lines"), QString::null, 0, this, 0 ); connect( wa, SIGNAL( toggled(bool) ), this, SLOT( setWordWrap(bool) ) ); wa->setToggleAction(TRUE); wa->addTo( font ); font->insertSeparator(); - font->insertItem("Font", this, SLOT(changeFont()) ); + font->insertItem(tr("Font"), this, SLOT(changeFont()) ); font->insertSeparator(); nStart = new QAction( tr("Start with new file"), QString::null, 0, this, 0 ); connect( nStart, SIGNAL( toggled(bool) ), this, SLOT( changeStartConfig(bool) ) ); nStart->setToggleAction(TRUE); nStart->addTo( font ); mb->insertItem( tr( "File" ), file ); mb->insertItem( tr( "Edit" ), edit ); mb->insertItem( tr( "View" ), font ); searchBar = new QPEToolBar(this); addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); searchBar->setHorizontalStretchable( TRUE ); @@ -480,33 +480,33 @@ void TextEdit::setWordWrap(bool y) { bool state = editor->edited(); editor->setWordWrap(y ? QMultiLineEdit::WidgetWidth : QMultiLineEdit::NoWrap ); editor->setEdited( state ); } void TextEdit::fileNew() { if( !bFromDocView ) { saveAs(); } newFile(DocLnk()); } void TextEdit::fileOpen() { - browseForFiles=new fileBrowser(this,"Open File",TRUE,0, "text/*"); // + browseForFiles=new fileBrowser(this,tr("Open File"),TRUE,0, "text/*"); // browseForFiles->setFileView( viewSelection ); browseForFiles->showMaximized(); if( browseForFiles->exec() != -1 ) { QString selFile = browseForFiles->selectedFileName; QStringList fileList = browseForFiles->fileList; qDebug(selFile); QStringList::ConstIterator f; QString fileTemp; for ( f = fileList.begin(); f != fileList.end(); f++ ) { fileTemp = *f; fileTemp.right( fileTemp.length()-5); QString fileName = fileTemp; if( fileName != "Unnamed" || fileName != "Empty Text" ) { currentFileName = fileName; qDebug("please open "+currentFileName); openFile(fileName ); @@ -521,33 +521,33 @@ void TextEdit::fileOpen() if(caption().left(1)=="*") setCaption(caption().right(caption().length()-1)); doSearchBar(); } void TextEdit::doSearchBar() { Config cfg("TextEdit"); cfg.setGroup("View"); if(cfg.readEntry("SearchBar","Closed") != "Opened") searchBar->hide(); } #if 0 void TextEdit::slotFind() { - FindDialog frmFind( "Text Editor", this ); + FindDialog frmFind( tr("Text Editor"), this ); connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), editor, SLOT(slotDoFind( const QString&,bool,bool))); //case sensitive, backwards, [category] connect( editor, SIGNAL(notFound()), &frmFind, SLOT(slotNotFound()) ); connect( editor, SIGNAL(searchWrapped()), &frmFind, SLOT(slotWrapAround()) ); frmFind.exec(); } #endif @@ -734,83 +734,83 @@ bool TextEdit::saveAs() // case of nothing to save... /// there's always something to save // if ( !doc )//|| !bFromDocView) // { // qDebug("no doc"); // return true; // } if ( !editor->edited() ) { delete doc; doc = 0; return true; } QString rt = editor->text(); qDebug(currentFileName); - if( currentFileName.isEmpty() || currentFileName == "Unnamed") { + if( currentFileName.isEmpty() || currentFileName == tr("Unnamed")) { qDebug("do silly TT filename thing"); if ( doc->name().isEmpty() ) { QString pt = rt.simplifyWhiteSpace(); int i = pt.find( ' ' ); QString docname = pt; if ( i > 0 ) docname = pt.left( i ); // remove "." at the beginning while( docname.startsWith( "." ) ) docname = docname.mid( 1 ); docname.replace( QRegExp("/"), "_" ); // cut the length. filenames longer than that don't make sense and something goes wrong when they get too long. if ( docname.length() > 40 ) docname = docname.left(40); if ( docname.isEmpty() ) - docname = "Unnamed"; + docname = tr("Unnamed"); doc->setName(docname); currentFileName=docname; } } - fileSaveDlg=new fileSaver(this,"Save File As?",TRUE, 0, currentFileName); + fileSaveDlg=new fileSaver(this,tr("Save File As?"),TRUE, 0, currentFileName); qDebug("wanna save filename "+currentFileName); fileSaveDlg->exec(); if( fileSaveDlg->result() == 1 ) { QString fileNm=fileSaveDlg->selectedFileName; qDebug("saving filename "+fileNm); QFileInfo fi(fileNm); currentFileName=fi.fileName(); if(doc) { // QString file = doc->file(); // doc->removeFiles(); delete doc; DocLnk nf; nf.setType("text/plain"); nf.setFile( fileNm); doc = new DocLnk(nf); // editor->setText(rt); // qDebug("openFile doclnk "+currentFileName); doc->setName( currentFileName); updateCaption( currentFileName); FileManager fm; if ( !fm.saveFile( *doc, rt ) ) { return false; } if( fileSaveDlg->filePermCheck->isChecked() ) { filePermissions *filePerm; - filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)fileNm); + filePerm = new filePermissions(this, tr("Permissions"),true,0,(const QString &)fileNm); filePerm->exec(); if( filePerm) delete filePerm; } } } editor->setEdited(TRUE); edited1=FALSE; edited=TRUE; if(caption().left(1)=="*") setCaption(caption().right(caption().length()-1)); if(fileSaveDlg) delete fileSaveDlg; return true; @@ -875,45 +875,45 @@ void TextEdit::accept() } void TextEdit::changeFont() { FontDatabase fdb; QFont defaultFont=editor->font(); QFontInfo fontInfo(defaultFont); Config cfg("TextEdit"); cfg.setGroup("Font"); QString family = cfg.readEntry("Family", fontInfo.family()); QString style = cfg.readEntry("Style", fdb.styleString(defaultFont)); int i_size = cfg.readNumEntry("Size", fontInfo.pointSize()/10); QString charSet = cfg.readEntry("CharSet", QFont::encodingName( fontInfo.charSet()) ); defaultFont = fdb.font(family,style,i_size,charSet); FontDialog *fontDlg; - fontDlg=new FontDialog(this,"FontDialog",TRUE); + fontDlg=new FontDialog(this,tr("FontDialog"),TRUE); fontDlg->exec(); QFont myFont=fontDlg->selectedFont; editor->setFont( myFont); delete fontDlg; } void TextEdit::editDelete() { - 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) ) { + 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) ) { case 0: if(doc) { doc->removeFiles(); clear(); setCaption( tr("Text Editor") ); } break; case 1: // exit break; }; } void TextEdit::changeStartConfig( bool b ) { Config cfg("TextEdit"); |