Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 114 |
1 files changed, 59 insertions, 55 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index f97ae99..d0ccc3f 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -1226,5 +1226,5 @@ void AdvancedFm::copy() | |||
1226 | } | 1226 | } |
1227 | if(!copyFile(destFile, curFile) ) { | 1227 | if(!copyFile(destFile, curFile) ) { |
1228 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | 1228 | QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); |
1229 | 1229 | ||
1230 | qWarning("nothin doing"); | 1230 | qWarning("nothin doing"); |
@@ -1271,5 +1271,5 @@ void AdvancedFm::copyAs() | |||
1271 | } | 1271 | } |
1272 | if(!copyFile(destFile, curFile) ) { | 1272 | if(!copyFile(destFile, curFile) ) { |
1273 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | 1273 | QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); |
1274 | qWarning("nothin doing"); | 1274 | qWarning("nothin doing"); |
1275 | } | 1275 | } |
@@ -1304,5 +1304,5 @@ void AdvancedFm::copyAs() | |||
1304 | } | 1304 | } |
1305 | if(!copyFile(destFile, curFile) ) { | 1305 | if(!copyFile(destFile, curFile) ) { |
1306 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | 1306 | QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); |
1307 | qWarning("nothin doing"); | 1307 | qWarning("nothin doing"); |
1308 | } | 1308 | } |
@@ -1352,5 +1352,5 @@ void AdvancedFm::copySameDir() { | |||
1352 | } | 1352 | } |
1353 | if(!copyFile(destFile, curFile) ) { | 1353 | if(!copyFile(destFile, curFile) ) { |
1354 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | 1354 | QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); |
1355 | qWarning("nothin doing"); | 1355 | qWarning("nothin doing"); |
1356 | } | 1356 | } |
@@ -1389,5 +1389,5 @@ void AdvancedFm::copySameDir() { | |||
1389 | } | 1389 | } |
1390 | if(!copyFile(destFile, curFile) ) { | 1390 | if(!copyFile(destFile, curFile) ) { |
1391 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | 1391 | QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); |
1392 | qWarning("nothin doing"); | 1392 | qWarning("nothin doing"); |
1393 | } | 1393 | } |
@@ -1437,5 +1437,5 @@ void AdvancedFm::move() { | |||
1437 | }; | 1437 | }; |
1438 | if(!copyFile( destFile, curFile) ) { | 1438 | if(!copyFile( destFile, curFile) ) { |
1439 | QMessageBox::message(tr("Note"),tr("Could not move\n"+curFile)); | 1439 | QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile); |
1440 | return; | 1440 | return; |
1441 | } | 1441 | } |
@@ -1469,5 +1469,5 @@ void AdvancedFm::move() { | |||
1469 | }; | 1469 | }; |
1470 | if(!copyFile(destFile, curFile) ) { | 1470 | if(!copyFile(destFile, curFile) ) { |
1471 | QMessageBox::message(tr("Note"),tr("Could not move\n"+curFile)); | 1471 | QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile); |
1472 | return; | 1472 | return; |
1473 | } | 1473 | } |
@@ -1546,5 +1546,5 @@ void AdvancedFm::runCommand() { | |||
1546 | if ( !fp ) { | 1546 | if ( !fp ) { |
1547 | qDebug("Could not execute '" + command + "'! err=%d", fp); | 1547 | qDebug("Could not execute '" + command + "'! err=%d", fp); |
1548 | QMessageBox::warning( this, tr("AdvancedFm"), tr("command failed!"), tr("&OK") ); | 1548 | QMessageBox::warning( this, "AdvancedFm", tr("command failed!"), tr("&OK") ); |
1549 | pclose(fp); | 1549 | pclose(fp); |
1550 | return; | 1550 | return; |
@@ -1602,5 +1602,5 @@ void AdvancedFm::fileStatus() { | |||
1602 | if ( !fp ) { | 1602 | if ( !fp ) { |
1603 | qDebug("Could not execute '" + command + "'! err=%d", fp); | 1603 | qDebug("Could not execute '" + command + "'! err=%d", fp); |
1604 | QMessageBox::warning( this, tr("AdvancedFm"), tr("command failed!"), tr("&OK") ); | 1604 | QMessageBox::warning( this, "AdvancedFm", tr("command failed!"), tr("&OK") ); |
1605 | pclose(fp); | 1605 | pclose(fp); |
1606 | return; | 1606 | return; |
@@ -1639,8 +1639,8 @@ void AdvancedFm::del() { | |||
1639 | 1639 | ||
1640 | void AdvancedFm::doAbout() { | 1640 | void AdvancedFm::doAbout() { |
1641 | QMessageBox::message("AdvancedFm","Advanced FileManager\n" | 1641 | QMessageBox::message("AdvancedFm",tr("Advanced FileManager\n" |
1642 | "is copyright 2002 by\n" | 1642 | "is copyright 2002 by\n" |
1643 | "L.J.Potter<llornkcor@handhelds.org>\n" | 1643 | "L.J.Potter<llornkcor@handhelds.org>\n" |
1644 | "and is licensed by the GPL"); | 1644 | "and is licensed by the GPL")); |
1645 | } | 1645 | } |
1646 | 1646 | ||
@@ -1803,4 +1803,7 @@ QString AdvancedFm::getFileSystemType(const QString ¤tText) { | |||
1803 | } | 1803 | } |
1804 | 1804 | ||
1805 | QString AdvancedFm::getDiskSpace( const QString &) { | ||
1806 | |||
1807 | } | ||
1805 | 1808 | ||
1806 | void AdvancedFm::doBeam() { | 1809 | void AdvancedFm::doBeam() { |
@@ -1869,5 +1872,5 @@ void AdvancedFm::showFileMenu() { | |||
1869 | QFile fi(curApp); | 1872 | QFile fi(curApp); |
1870 | 1873 | ||
1871 | // QPopupMenu m; | 1874 | // QPopupMenu m; |
1872 | QPopupMenu *m = new QPopupMenu(0); | 1875 | QPopupMenu *m = new QPopupMenu(0); |
1873 | 1876 | ||
@@ -1885,55 +1888,56 @@ void AdvancedFm::showFileMenu() { | |||
1885 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); | 1888 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); |
1886 | } | 1889 | } |
1887 | m->insertSeparator(); | 1890 | m->insertSeparator(); |
1888 | 1891 | ||
1889 | 1892 | ||
1890 | if(isLocalView) | 1893 | if(isLocalView) |
1891 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 1894 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
1892 | else | 1895 | else |
1893 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 1896 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
1894 | 1897 | ||
1895 | m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); | 1898 | m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); |
1896 | m->insertSeparator(); | 1899 | m->insertSeparator(); |
1897 | 1900 | ||
1898 | if(isLocalView) | 1901 | if(isLocalView) |
1899 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 1902 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); |
1900 | else | 1903 | else |
1901 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 1904 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
1905 | |||
1906 | m->insertItem( tr( "Copy" ), this, SLOT( copy() )); | ||
1907 | m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); | ||
1908 | m->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); | ||
1909 | m->insertItem( tr( "Move" ), this, SLOT( move() )); | ||
1910 | m->insertSeparator(); | ||
1902 | 1911 | ||
1903 | m->insertItem( tr( "Copy" ), this, SLOT( copy() )); | 1912 | if(isLocalView) |
1904 | m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); | 1913 | m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); |
1905 | m->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); | 1914 | else |
1906 | m->insertItem( tr( "Move" ), this, SLOT( move() )); | 1915 | m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); |
1907 | m->insertSeparator(); | ||
1908 | 1916 | ||
1909 | if(isLocalView) | 1917 | m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); |
1910 | m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); | 1918 | m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); |
1911 | else | 1919 | m->insertSeparator(); |
1912 | m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); | ||
1913 | 1920 | ||
1914 | m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); | 1921 | if(isLocalView) |
1915 | m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); | 1922 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); |
1916 | m->insertSeparator(); | 1923 | else |
1924 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | ||
1917 | 1925 | ||
1918 | if(isLocalView) | 1926 | m->insertSeparator(); |
1919 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); | 1927 | m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); |
1920 | else | 1928 | |
1921 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | 1929 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings |
1922 | 1930 | m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); | |
1923 | m->insertSeparator(); | 1931 | m->setCheckable(TRUE); |
1924 | m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); | 1932 | if (!b) |
1925 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings | 1933 | m->setItemChecked(m->idAt(0),TRUE); |
1926 | m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); | 1934 | else |
1927 | m->setCheckable(TRUE); | 1935 | m->setItemChecked(m->idAt(0),FALSE); |
1928 | if (!b) | 1936 | if(Ir::supported()) |
1929 | m->setItemChecked(m->idAt(0),TRUE); | 1937 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); |
1930 | else | 1938 | m->setFocus(); |
1931 | m->setItemChecked(m->idAt(0),FALSE); | 1939 | m->exec( QCursor::pos() ); |
1932 | if(Ir::supported()) | 1940 | sleep(1); |
1933 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); | 1941 | if(m) delete m; |
1934 | m->setFocus(); | ||
1935 | m->exec( QCursor::pos() ); | ||
1936 | sleep(1); | ||
1937 | if(m) delete m; | ||
1938 | } | 1942 | } |
1939 | 1943 | ||