summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm
Side-by-side diff
Diffstat (limited to 'noncore/apps/advancedfm') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/filePermissions.cpp48
-rw-r--r--noncore/apps/advancedfm/main.cpp4
-rw-r--r--noncore/apps/advancedfm/opie-advancedfm.control2
-rw-r--r--noncore/apps/advancedfm/output.cpp24
4 files changed, 32 insertions, 46 deletions
diff --git a/noncore/apps/advancedfm/filePermissions.cpp b/noncore/apps/advancedfm/filePermissions.cpp
index c06f14f..4de6d12 100644
--- a/noncore/apps/advancedfm/filePermissions.cpp
+++ b/noncore/apps/advancedfm/filePermissions.cpp
@@ -10,26 +10,22 @@
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
#include "filePermissions.h"
-#include <qfile.h>
#include <qfileinfo.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlineedit.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
#include <qmessagebox.h>
#include <unistd.h>
#include <sys/stat.h>
-#include <stdlib.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 )
@@ -67,68 +63,68 @@ filePermissions::filePermissions( QWidget* parent, const char* name, bool modal
CheckBox1_2 = new QCheckBox( this, "CheckBox1_2" );
CheckBox1_2->setGeometry( QRect( 135, 85, 20, 16 ) );
connect(CheckBox1_2, SIGNAL(released()),this,SLOT(ownWriteCheck()));
CheckBox1_3 = new QCheckBox( this, "CheckBox1_3" );
- CheckBox1_3->setGeometry( QRect( 195, 85, 20, 16 ) );
+ CheckBox1_3->setGeometry( QRect( 195, 85, 20, 16 ) );
connect(CheckBox1_3, SIGNAL(released()),this,SLOT(ownExeCheck()));
CheckBox1_4 = new QCheckBox( this, "CheckBox1_4" );
- CheckBox1_4->setGeometry( QRect( 75, 105, 20, 16 ) );
+ CheckBox1_4->setGeometry( QRect( 75, 105, 20, 16 ) );
connect(CheckBox1_4, SIGNAL(released()),this,SLOT(grpReadCheck()));
CheckBox1_5 = new QCheckBox( this, "CheckBox1_5" );
- CheckBox1_5->setGeometry( QRect( 135, 105, 20, 16 ) );
+ CheckBox1_5->setGeometry( QRect( 135, 105, 20, 16 ) );
connect(CheckBox1_5, SIGNAL(released()),this,SLOT(grpWriteCheck()));
CheckBox1_6 = new QCheckBox( this, "CheckBox1_6" );
- CheckBox1_6->setGeometry( QRect( 195, 105, 20, 16 ) );
+ CheckBox1_6->setGeometry( QRect( 195, 105, 20, 16 ) );
connect(CheckBox1_6, SIGNAL(released()),this,SLOT(grpExeCheck()));
CheckBox1_7 = new QCheckBox( this, "CheckBox1_7" );
- CheckBox1_7->setGeometry( QRect( 75, 125, 16, 16 ) );
+ CheckBox1_7->setGeometry( QRect( 75, 125, 16, 16 ) );
connect(CheckBox1_7, SIGNAL(released()),this,SLOT(wrldReadCheck()));
CheckBox1_8 = new QCheckBox( this, "CheckBox1_8" );
CheckBox1_8->setGeometry( QRect( 135, 125, 20, 16 ) );
connect(CheckBox1_8, SIGNAL(released()),this,SLOT(wrldWriteCheck()));
CheckBox1_8_2 = new QCheckBox( this, "CheckBox1_8_2" );
- CheckBox1_8_2->setGeometry( QRect( 195, 125, 20, 16 ) );
+ CheckBox1_8_2->setGeometry( QRect( 195, 125, 20, 16 ) );
connect(CheckBox1_8_2, SIGNAL(released()),this,SLOT(wrldExeCheck()));
GroupLineEdit = new QLineEdit( this, "GroupLineEdit" );
- GroupLineEdit->setGeometry( QRect( 125, 155, 106, 22 ) );
+ GroupLineEdit->setGeometry( QRect( 125, 155, 106, 22 ) );
OwnerLineEdit = new QLineEdit( this, "OwnerLineEdit" );
- OwnerLineEdit->setGeometry( QRect( 10, 155, 106, 22 ) );
+ OwnerLineEdit->setGeometry( QRect( 10, 155, 106, 22 ) );
TextLabel5 = new QLabel( this, "TextLabel5" );
- TextLabel5->setGeometry( QRect( 45, 180, 40, 16 ) );
+ TextLabel5->setGeometry( QRect( 45, 180, 40, 16 ) );
TextLabel5->setText( tr( "Owner" ) );
TextLabel5_2 = new QLabel( this, "TextLabel5_2" );
- TextLabel5_2->setGeometry( QRect( 155, 180, 40, 16 ) );
+ TextLabel5_2->setGeometry( QRect( 155, 180, 40, 16 ) );
TextLabel5_2->setText( tr( "Group" ) );
ModeLine = new QLineEdit( this, "TextLabelMode" );
- ModeLine->setGeometry( QRect( 10, 60, 40, 15 ) );
+ ModeLine->setGeometry( QRect( 10, 60, 40, 15 ) );
TextLabel3_2 = new QLabel( this, "TextLabel3_2" );
- TextLabel3_2->setGeometry( QRect( 60, 55, 50, 20 ) );
+ TextLabel3_2->setGeometry( QRect( 60, 55, 50, 20 ) );
TextLabel3_2->setText( tr( "read" ) );
TextLabel3_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) );
TextLabel3_2_2 = new QLabel( this, "TextLabel3_2_2" );
- TextLabel3_2_2->setGeometry( QRect( 120, 55, 50, 20 ) );
+ TextLabel3_2_2->setGeometry( QRect( 120, 55, 50, 20 ) );
TextLabel3_2_2->setText( tr( "write" ) );
TextLabel3_2_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) );
TextLabel3 = new QLabel( this, "TextLabel3" );
- TextLabel3->setGeometry( QRect( 180, 55, 50, 20 ) );
+ TextLabel3->setGeometry( QRect( 180, 55, 50, 20 ) );
TextLabel3->setText( tr( "execute" ) );
TextLabel3->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) );
struct stat buf;
mode_t mode;
file = fileName;
@@ -146,23 +142,23 @@ filePermissions::filePermissions( QWidget* parent, const char* name, bool modal
if( fi.permission( QFileInfo::WriteGroup)) { CheckBox1_5->setChecked(true); }
if( fi.permission( QFileInfo::ExeGroup)) { CheckBox1_6->setChecked(true); }
if( fi.permission( QFileInfo::ReadOther)) { CheckBox1_7->setChecked(true); }
if( fi.permission( QFileInfo::WriteOther)) { CheckBox1_8->setChecked(true); }
if( fi.permission( QFileInfo::ExeOther)) { CheckBox1_8_2->setChecked(true); }
-
+
stat(file.latin1(), &buf);
mode = buf.st_mode;
modeStr.sprintf("%#o", buf.st_mode & ~(S_IFMT) );
ModeLine->setText(modeStr);
bool ok;
i_mode = modeStr.toInt(&ok,10);
-
+
}
-/*
+/*
* Destroys the object and frees any allocated resources
*/
filePermissions::~filePermissions()
{
}
@@ -245,30 +241,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/noncore/apps/advancedfm/main.cpp b/noncore/apps/advancedfm/main.cpp
index a0401e8..8cacc4a 100644
--- a/noncore/apps/advancedfm/main.cpp
+++ b/noncore/apps/advancedfm/main.cpp
@@ -8,16 +8,12 @@
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include <qpe/qpeapplication.h>
-#include <qpe/qcopenvelope_qws.h>
-#include <qpe/config.h>
-#include <qstring.h>
-#include <qstringlist.h>
#include "advancedfm.h"
int main(int argc, char *argv[])
diff --git a/noncore/apps/advancedfm/opie-advancedfm.control b/noncore/apps/advancedfm/opie-advancedfm.control
index f17c590..1e0f9ec 100644
--- a/noncore/apps/advancedfm/opie-advancedfm.control
+++ b/noncore/apps/advancedfm/opie-advancedfm.control
@@ -1,10 +1,10 @@
Package: opie-advancedfm
Files: bin/advancedfm apps/Applications/advancedfm.desktop pics/advancedfm
Priority: optional
Section: opie/applications
Maintainer: L.J. Potter <ljp@llornkcor.com>
Architecture: arm
-Version: $QPE_VERSION-$SUB_VERSION
Depends: task-opie-minimal
Description: Advanced File Manager
The advanced file manager for the Opie environment.
+Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp
index a60cea6..33abdfc 100644
--- a/noncore/apps/advancedfm/output.cpp
+++ b/noncore/apps/advancedfm/output.cpp
@@ -4,25 +4,19 @@
** Copyright: Fri Apr 12 15:12:58 2002 L.J. Potter <ljp@llornkcor.com>
****************************************************************************/
#include "output.h"
#include <opie/oprocess.h>
-#include <qpe/filemanager.h>
#include <qpe/qpeapplication.h>
#include <qpe/applnk.h>
-#include <qmessagebox.h>
-#include <qstringlist.h>
#include <qfile.h>
-#include <qcstring.h>
-#include <qlineedit.h>
#include <qmultilineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
-#include <qvariant.h>
#include <errno.h>
/* XPM */
static char * filesave_xpm[] = {
"16 16 78 1",
@@ -124,19 +118,19 @@ static char * filesave_xpm[] = {
Output::Output( const QStringList commands, QWidget* parent, const char* name, bool modal, WFlags fl)
: QDialog( parent, name, modal, fl )
{
QStringList cmmds;
// cmmds=QStringList::split( " ", commands, false);
cmmds=commands;
-// qDebug("count %d", cmmds.count());
+// qDebug("count %d", cmmds.count());
if ( !name )
setName( tr("Output"));
- resize( 196, 269 );
+ resize( 196, 269 );
setCaption( name );
- OutputLayout = new QGridLayout( this );
+ OutputLayout = new QGridLayout( this );
OutputLayout->setSpacing( 2);
OutputLayout->setMargin( 2);
QPushButton *docButton;
docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton");
docButton->setFixedSize( QSize( 20, 20 ) );
@@ -158,24 +152,24 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name,
connect(proc, SIGNAL(receivedStderr(OProcess *, char *, int)),
this, SLOT(commandStderr(OProcess *, char *, int)));
// connect( , SIGNAL(received(const QByteArray &)),
// this, SLOT(commandStdin(const QByteArray &)));
-// * proc << commands.latin1();
+// * proc << commands.latin1();
for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) {
qDebug( "%s", (*it).latin1() );
* proc << (*it).latin1();
}
if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) {
- OutputEdit->append("Process could not start");
+ OutputEdit->append(tr("Process could not start") );
OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
perror("Error: ");
- QString errorMsg="Error\n"+(QString)strerror(errno);
+ QString errorMsg=tr("Error\n")+(QString)strerror(errno);
OutputEdit->append( errorMsg);
OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
}
}
Output::~Output() {
@@ -184,13 +178,13 @@ Output::~Output() {
void Output::saveOutput() {
InputDialog *fileDlg;
fileDlg = new InputDialog(this,tr("Save output to file (name only)"),TRUE, 0);
fileDlg->exec();
if( fileDlg->result() == 1 ) {
- QString filename = QPEApplication::documentDir();
+ QString filename = QPEApplication::documentDir();
if(filename.right(1).find('/') == -1)
filename+="/";
QString name = fileDlg->LineEdit1->text();
filename+="text/plain/"+name;
qDebug(filename);
@@ -242,13 +236,13 @@ void Output::commandStderr(OProcess*, char *buffer, int buflen) {
OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
}
void Output::processFinished() {
delete proc;
- OutputEdit->append( "\nFinished\n");
+ OutputEdit->append( tr("\nFinished\n") );
OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
// close();
// disconnect( layer(), SIGNAL(received(const QByteArray &)),
// this, SLOT(commandStdin(const QByteArray &)));
}
@@ -256,13 +250,13 @@ void Output::processFinished() {
InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "InputDialog" );
- resize( 234, 50 );
+ resize( 234, 50 );
setMaximumSize( QSize( 240, 50 ) );
setCaption( tr(name ) );
LineEdit1 = new QLineEdit( this, "LineEdit1" );
LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) );
LineEdit1->setFocus();