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
@@ -45,13 +45,13 @@ 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())
// QStringList filterList;
// filterList=QStringList::split(";",mimeFilter,FALSE);
@@ -117,13 +117,13 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags
// 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 );
@@ -345,20 +345,20 @@ void fileBrowser::docButtonPushed() {
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();
@@ -409,56 +409,56 @@ void fileBrowser::showListMenu(QListViewItem *item) {
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();
}
@@ -490,13 +490,13 @@ void fileBrowser::updateMimeTypeMenu() {
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);
@@ -602,13 +602,13 @@ 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 ) );
LineEdit1 = new QLineEdit( this, "LineEdit1" );
LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) );
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
@@ -32,14 +32,14 @@
#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 ) );
@@ -245,30 +245,30 @@ 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
@@ -27,13 +27,13 @@
#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");
@@ -60,13 +60,13 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl
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);
@@ -76,13 +76,13 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl
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();
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
@@ -32,13 +32,13 @@ copyright 2002 by L.J. Potter ljp@llornkcor.com
#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" );
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 )
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 );
@@ -490,13 +490,13 @@ void TextEdit::fileNew()
}
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);
@@ -531,13 +531,13 @@ void TextEdit::doSearchBar()
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()),
@@ -744,13 +744,13 @@ bool TextEdit::saveAs()
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 )
@@ -760,20 +760,20 @@ bool TextEdit::saveAs()
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);
@@ -794,13 +794,13 @@ bool TextEdit::saveAs()
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;
}
}
@@ -885,25 +885,25 @@ void TextEdit::changeFont() {
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") );
}