summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/fileBrowser.cpp26
-rw-r--r--core/apps/textedit/filePermissions.cpp12
-rw-r--r--core/apps/textedit/fileSaver.cpp6
-rw-r--r--core/apps/textedit/fontDialog.cpp2
-rw-r--r--core/apps/textedit/textedit.cpp18
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
@@ -47,9 +47,9 @@ static int get_unique_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())
@@ -119,9 +119,9 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags
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);
@@ -347,16 +347,16 @@ void fileBrowser::docButtonPushed() {
}
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);
@@ -411,9 +411,9 @@ void fileBrowser::doCd() {
}
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");
@@ -424,25 +424,25 @@ void fileBrowser::makDir() {
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());
@@ -453,10 +453,10 @@ void fileBrowser::localDelete() {
// 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());
@@ -492,9 +492,9 @@ void fileBrowser::updateMimeTypeMenu() {
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;
@@ -604,9 +604,9 @@ void fileBrowser::fillCombo(const QString &currentPath) {
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 ) );
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
@@ -34,10 +34,10 @@
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" ) );
@@ -247,27 +247,27 @@ void filePermissions::accept() {
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
@@ -29,9 +29,9 @@
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();
@@ -62,9 +62,9 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl
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);
@@ -78,9 +78,9 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl
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 *)) );
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
@@ -34,9 +34,9 @@ copyright 2002 by L.J. Potter ljp@llornkcor.com
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" ) );
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
@@ -334,9 +334,9 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
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) ) );
@@ -492,9 +492,9 @@ void TextEdit::fileNew()
}
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;
@@ -533,9 +533,9 @@ void TextEdit::doSearchBar()
#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]
@@ -746,9 +746,9 @@ bool TextEdit::saveAs()
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( ' ' );
@@ -762,16 +762,16 @@ bool TextEdit::saveAs()
// 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;
@@ -796,9 +796,9 @@ bool TextEdit::saveAs()
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;
@@ -887,9 +887,9 @@ void TextEdit::changeFont() {
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;
@@ -899,9 +899,9 @@ void TextEdit::changeFont() {
}
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();