author | llornkcor <llornkcor> | 2004-09-25 01:51:26 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-09-25 01:51:26 (UTC) |
commit | 40e681bf20db4f1e02212ae6e42a349ee000cf14 (patch) (unidiff) | |
tree | 86eea5377011775ff87ca50e1fd125ff8f30622f /noncore/apps | |
parent | 0fe000754035c737ff0de97e5b2bd2cf03c16337 (diff) | |
download | opie-40e681bf20db4f1e02212ae6e42a349ee000cf14.zip opie-40e681bf20db4f1e02212ae6e42a349ee000cf14.tar.gz opie-40e681bf20db4f1e02212ae6e42a349ee000cf14.tar.bz2 |
fix stuff
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 79 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 77 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.pro | 2 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 60 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 73 |
5 files changed, 138 insertions, 153 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 4de7d38..02898de 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -52,4 +52,3 @@ AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) | |||
52 | channel = new QCopChannel( "QPE/Application/advancedfm", this ); | 52 | channel = new QCopChannel( "QPE/Application/advancedfm", this ); |
53 | connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), | 53 | connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&))); |
54 | this, SLOT( qcopReceive(const QCString&,const QByteArray&)) ); | ||
55 | 54 | ||
@@ -78,12 +77,15 @@ void AdvancedFm::cleanUp() { | |||
78 | void AdvancedFm::tabChanged(QWidget *wd) { | 77 | void AdvancedFm::tabChanged(QWidget *wd) { |
79 | if(wd == tab) | 78 | // qDebug("tabChanged"); |
80 | odebug << "LOCAL VIEW SHOWN"<< oendl; | 79 | if(wd == tab) { |
81 | else if(wd == tab_2) | 80 | whichTab = 1; |
82 | odebug<< "REMOTE VIEW SHOWN"<< oendl; | 81 | // qDebug("tabchanged: LOCAL VIEW SHOWN"); |
83 | 82 | } | |
83 | else if(wd == tab_2) { | ||
84 | whichTab = 2; | ||
85 | // qDebug("tabchanged: REMOTE VIEW SHOWN"); | ||
86 | } | ||
87 | qApp->processEvents(); | ||
84 | QString path = CurrentDir()->canonicalPath(); | 88 | QString path = CurrentDir()->canonicalPath(); |
85 | currentPathCombo->lineEdit()->setText( path ); | 89 | // qDebug(path); |
86 | |||
87 | if ( TabWidget->currentWidget() == tab) { | 90 | if ( TabWidget->currentWidget() == tab) { |
88 | // if(whichTab == 1) { | ||
89 | viewMenu->setItemChecked(viewMenu->idAt(0), true); | 91 | viewMenu->setItemChecked(viewMenu->idAt(0), true); |
@@ -100,8 +102,3 @@ void AdvancedFm::tabChanged(QWidget *wd) { | |||
100 | chdir( path.latin1()); | 102 | chdir( path.latin1()); |
101 | if( wd == Local_View) { | 103 | currentPathCombo->lineEdit()->setText(path); |
102 | Remote_View->clearFocus(); | ||
103 | } else { | ||
104 | Local_View->clearFocus(); | ||
105 | } | ||
106 | |||
107 | } | 104 | } |
@@ -220,2 +217,3 @@ void AdvancedFm::populateView() { | |||
220 | void AdvancedFm::rePopulate() { | 217 | void AdvancedFm::rePopulate() { |
218 | // qDebug("repopulate views"); | ||
221 | populateView(); | 219 | populateView(); |
@@ -235,6 +233,6 @@ void AdvancedFm::rePopulate() { | |||
235 | void AdvancedFm::ListClicked(QListViewItem *selectedItem) { | 233 | void AdvancedFm::ListClicked(QListViewItem *selectedItem) { |
236 | if ( TabWidget->currentWidget() == tab) | 234 | // if ( TabWidget->currentWidget() == tab) |
237 | qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked local"); | 235 | // qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked local"); |
238 | else | 236 | // else |
239 | qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked remote"); | 237 | // qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked remote"); |
240 | 238 | ||
@@ -294,4 +292,6 @@ void AdvancedFm::refreshCurrentTab() { | |||
294 | void AdvancedFm::switchToLocalTab() { | 292 | void AdvancedFm::switchToLocalTab() { |
293 | qDebug("switchToLocal "); | ||
295 | TabWidget->setCurrentWidget(0); | 294 | TabWidget->setCurrentWidget(0); |
296 | Local_View->setFocus(); | 295 | Local_View->setFocus(); |
296 | whichTab = 1; | ||
297 | 297 | ||
@@ -300,4 +300,6 @@ void AdvancedFm::switchToLocalTab() { | |||
300 | void AdvancedFm::switchToRemoteTab() { | 300 | void AdvancedFm::switchToRemoteTab() { |
301 | qDebug("switchToRemoteTab() "); | ||
301 | TabWidget->setCurrentWidget(1); | 302 | TabWidget->setCurrentWidget(1); |
302 | Remote_View->setFocus(); | 303 | Remote_View->setFocus(); |
304 | whichTab = 2; | ||
303 | } | 305 | } |
@@ -400,6 +402,3 @@ void AdvancedFm::CFButtonPushed() { | |||
400 | void AdvancedFm::doAbout() { | 402 | void AdvancedFm::doAbout() { |
401 | QMessageBox::message("AdvancedFm",tr("Advanced FileManager\n" | 403 | QMessageBox::message("AdvancedFm",tr("<P>Advanced FileManager is copyright 2002-2003 by L.J.Potter<llornkcor@handhelds.org> and is licensed by the GPL</P>")); |
402 | "is copyright 2002-2003 by\n" | ||
403 | "L.J.Potter<llornkcor@handhelds.org>\n" | ||
404 | "and is licensed by the GPL")); | ||
405 | } | 404 | } |
@@ -584,4 +583,3 @@ void AdvancedFm::showFileMenu() { | |||
584 | if ( app ) | 583 | if ( app ) |
585 | m->insertItem( app->pixmap(), tr( "Open in " | 584 | m->insertItem(app->pixmap(),tr("Open in " + app->name()),this,SLOT(runThis())); |
586 | + app->name() ), this, SLOT( runThis() ) ); | ||
587 | else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this | 585 | else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this |
@@ -599,6 +597,6 @@ void AdvancedFm::showFileMenu() { | |||
599 | 597 | ||
600 | n->insertItem( tr( "Copy" ), this, SLOT( copy() )); | 598 | n->insertItem(tr("Copy"),this,SLOT(copyTimer())); |
601 | n->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); | 599 | n->insertItem(tr("Copy As"),this,SLOT(copyAsTimer())); |
602 | n->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); | 600 | n->insertItem(tr("Copy Same Dir"),this,SLOT(copySameDirTimer())); |
603 | n->insertItem( tr( "Move" ), this, SLOT( move() )); | 601 | n->insertItem(tr("Move"),this,SLOT(moveTimer())); |
604 | 602 | ||
@@ -790,11 +788,7 @@ void AdvancedFm::gotoCustomDir(const QString &dir) { | |||
790 | QDir *AdvancedFm::CurrentDir() { | 788 | QDir *AdvancedFm::CurrentDir() { |
791 | |||
792 | if ( TabWidget->currentWidget() == tab) | ||
793 | qDebug("CurrentTab is Local"); | ||
794 | else | ||
795 | qDebug("CurrentTab is Remote"); | ||
796 | |||
797 | if ( whichTab == 1) { | 789 | if ( whichTab == 1) { |
790 | // qDebug("CurrentTab is Local"); | ||
798 | return ¤tDir; | 791 | return ¤tDir; |
799 | } else { | 792 | } else { |
793 | // qDebug("CurrentTab is Remote"); | ||
800 | return ¤tRemoteDir; | 794 | return ¤tRemoteDir; |
@@ -813,7 +807,5 @@ QDir *AdvancedFm::OtherDir() { | |||
813 | QListView * AdvancedFm::CurrentView() { | 807 | QListView * AdvancedFm::CurrentView() { |
814 | if ( TabWidget->currentWidget() == tab) | ||
815 | odebug << "CurrentView local" << oendl; | ||
816 | |||
817 | // if ( TabWidget->currentWidget() == tab) { | 808 | // if ( TabWidget->currentWidget() == tab) { |
818 | if ( whichTab == 1) { | 809 | if ( whichTab == 1) { |
810 | // qDebug("CurrentView: local"); | ||
819 | return Local_View; | 811 | return Local_View; |
@@ -821,2 +813,3 @@ QListView * AdvancedFm::CurrentView() { | |||
821 | // owarn << "CurrentView Tab 2" << oendl; | 813 | // owarn << "CurrentView Tab 2" << oendl; |
814 | // qDebug("CurrentView: remote"); | ||
822 | return Remote_View; | 815 | return Remote_View; |
@@ -833,3 +826,3 @@ QListView * AdvancedFm::OtherView() { | |||
833 | void AdvancedFm::setOtherTabCurrent() { | 826 | void AdvancedFm::setOtherTabCurrent() { |
834 | qDebug("setOtherTabCurrent() %d",whichTab); | 827 | // qDebug("setOtherTabCurrent() %d",whichTab); |
835 | if ( whichTab == 1) { | 828 | if ( whichTab == 1) { |
@@ -860,3 +853,3 @@ void AdvancedFm::setDocument(const QString &file) { | |||
860 | void AdvancedFm::gotoDirectory(const QString &file) { | 853 | void AdvancedFm::gotoDirectory(const QString &file) { |
861 | qDebug("goto dir "+file); | 854 | // qDebug("goto dir "+file); |
862 | QString curDir = file; | 855 | QString curDir = file; |
@@ -895,4 +888,4 @@ void AdvancedFm::findFile(const QString &fileName) { | |||
895 | 888 | ||
896 | void AdvancedFm::slotSwitchMenu(int ) { | 889 | void AdvancedFm::slotSwitchMenu(int item) { |
897 | // odebug << "Switch " << item << "" << oendl; | 890 | // qDebug( "Switch %d",item); |
898 | // viewMenu->setItemChecked(item, true); | 891 | // viewMenu->setItemChecked(item, true); |
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index def6fe2..2234b3c 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -59,34 +59,2 @@ public: | |||
59 | ~AdvancedFm(); | 59 | ~AdvancedFm(); |
60 | protected slots: | ||
61 | void slotSwitchMenu(int); | ||
62 | void selectAll(); | ||
63 | void addToDocs(); | ||
64 | void doDirChange(); | ||
65 | void mkDir(); | ||
66 | void del(); | ||
67 | void rn(); | ||
68 | void populateView(); | ||
69 | void rePopulate(); | ||
70 | void showHidden(); | ||
71 | void showMenuHidden(); | ||
72 | void writeConfig(); | ||
73 | void readConfig(); | ||
74 | void ListClicked(QListViewItem *); | ||
75 | void ListPressed( int, QListViewItem *, const QPoint&, int); | ||
76 | void makeDir(); | ||
77 | void doDelete(); | ||
78 | void tabChanged(QWidget*); | ||
79 | void cleanUp(); | ||
80 | void renameIt(); | ||
81 | void runThis(); | ||
82 | void runText(); | ||
83 | void filePerms(); | ||
84 | void doProperties(); | ||
85 | void runCommand(); | ||
86 | void runCommandStd(); | ||
87 | QStringList getPath(); | ||
88 | void mkSym(); | ||
89 | void switchToLocalTab(); | ||
90 | void switchToRemoteTab(); | ||
91 | void refreshCurrentTab(); | ||
92 | protected: | 60 | protected: |
@@ -132,3 +100,37 @@ protected: | |||
132 | 100 | ||
101 | //protected signals: | ||
102 | // void newPath(QString); | ||
103 | |||
133 | protected slots: | 104 | protected slots: |
105 | void slotSwitchMenu(int); | ||
106 | void selectAll(); | ||
107 | void addToDocs(); | ||
108 | void doDirChange(); | ||
109 | void mkDir(); | ||
110 | void del(); | ||
111 | void rn(); | ||
112 | void populateView(); | ||
113 | void rePopulate(); | ||
114 | void showHidden(); | ||
115 | void showMenuHidden(); | ||
116 | void writeConfig(); | ||
117 | void readConfig(); | ||
118 | void ListClicked(QListViewItem *); | ||
119 | void ListPressed( int, QListViewItem *, const QPoint&, int); | ||
120 | void makeDir(); | ||
121 | void doDelete(); | ||
122 | void tabChanged(QWidget*); | ||
123 | void cleanUp(); | ||
124 | void renameIt(); | ||
125 | void runThis(); | ||
126 | void runText(); | ||
127 | void filePerms(); | ||
128 | void doProperties(); | ||
129 | void runCommand(); | ||
130 | void runCommandStd(); | ||
131 | QStringList getPath(); | ||
132 | void mkSym(); | ||
133 | void switchToLocalTab(); | ||
134 | void switchToRemoteTab(); | ||
135 | void refreshCurrentTab(); | ||
134 | 136 | ||
@@ -144,5 +146,12 @@ protected slots: | |||
144 | void currentPathComboChanged(); | 146 | void currentPathComboChanged(); |
147 | |||
145 | void copy(); | 148 | void copy(); |
149 | void copyTimer(); | ||
146 | void copyAs(); | 150 | void copyAs(); |
151 | void copyAsTimer(); | ||
147 | void copySameDir(); | 152 | void copySameDir(); |
153 | void copySameDirTimer(); | ||
154 | void move(); | ||
155 | void moveTimer(); | ||
156 | |||
148 | void currentPathComboActivated(const QString &); | 157 | void currentPathComboActivated(const QString &); |
@@ -150,3 +159,2 @@ protected slots: | |||
150 | bool copyFile( const QString & , const QString & ); | 159 | bool copyFile( const QString & , const QString & ); |
151 | void move(); | ||
152 | void fileStatus(); | 160 | void fileStatus(); |
@@ -163,3 +171,3 @@ private: | |||
163 | MenuButton *menuButton; | 171 | MenuButton *menuButton; |
164 | QString oldName; | 172 | QString oldName, localViewDir, remoteViewDir; |
165 | void startProcess(const QString &); | 173 | void startProcess(const QString &); |
@@ -182,2 +190,3 @@ private slots: | |||
182 | void setDocument(const QString &); | 190 | void setDocument(const QString &); |
191 | // void doMenu(int | ||
183 | 192 | ||
diff --git a/noncore/apps/advancedfm/advancedfm.pro b/noncore/apps/advancedfm/advancedfm.pro index 0644edb..713f61c 100644 --- a/noncore/apps/advancedfm/advancedfm.pro +++ b/noncore/apps/advancedfm/advancedfm.pro | |||
@@ -1,3 +1,3 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG += qt warn_on quick-app | 2 | CONFIG += qte warn_on quick-app |
3 | HEADERS = advancedfm.h filePermissions.h output.h | 3 | HEADERS = advancedfm.h filePermissions.h output.h |
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 1802571..d2e1d8e 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -250,40 +250,24 @@ void AdvancedFm::initConnections() | |||
250 | 250 | ||
251 | connect( qApp,SIGNAL( aboutToQuit()), | 251 | connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(cleanUp())); |
252 | this, SLOT( cleanUp()) ); | 252 | connect( qpeDirButton ,SIGNAL(released()),this,SLOT( QPEButtonPushed()) ); |
253 | connect( qpeDirButton ,SIGNAL(released()), | 253 | connect( cfButton ,SIGNAL(released()), this,SLOT( CFButtonPushed()) ); |
254 | this,SLOT( QPEButtonPushed()) ); | 254 | connect( sdButton ,SIGNAL(released()), this,SLOT( SDButtonPushed()) ); |
255 | connect( cfButton ,SIGNAL(released()), | 255 | connect( cdUpButton ,SIGNAL(released()), this,SLOT( upDir()) ); |
256 | this,SLOT( CFButtonPushed()) ); | 256 | connect( docButton,SIGNAL(released()), this,SLOT( docButtonPushed()) ); |
257 | connect( sdButton ,SIGNAL(released()), | 257 | connect( homeButton,SIGNAL(released()), this,SLOT( homeButtonPushed()) ); |
258 | this,SLOT( SDButtonPushed()) ); | 258 | connect( currentPathCombo, SIGNAL( activated(const QString&) ), this, SLOT( currentPathComboActivated(const QString&) ) ); |
259 | connect( cdUpButton ,SIGNAL(released()), | 259 | |
260 | this,SLOT( upDir()) ); | 260 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), this,SLOT(currentPathComboChanged())); |
261 | connect( docButton,SIGNAL(released()), | 261 | |
262 | this,SLOT( docButtonPushed()) ); | 262 | connect( Local_View, SIGNAL( clicked(QListViewItem*)), this,SLOT( ListClicked(QListViewItem*)) ); |
263 | connect( homeButton,SIGNAL(released()), | 263 | |
264 | this,SLOT( homeButtonPushed()) ); | 264 | connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); |
265 | connect( currentPathCombo, SIGNAL( activated(const QString&) ), | 265 | |
266 | this, SLOT( currentPathComboActivated(const QString&) ) ); | 266 | connect( Remote_View, SIGNAL( clicked(QListViewItem*)), this,SLOT( ListClicked(QListViewItem*)) ); |
267 | 267 | connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); | |
268 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), | 268 | |
269 | this,SLOT(currentPathComboChanged())); | 269 | connect( TabWidget,SIGNAL(currentChanged(QWidget*)), this,SLOT(tabChanged(QWidget*))); |
270 | 270 | ||
271 | connect( Local_View, SIGNAL( clicked(QListViewItem*)), | 271 | connect( Remote_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)), this, SLOT(showFileMenu())); |
272 | this,SLOT( ListClicked(QListViewItem*)) ); | 272 | connect( Local_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&,int)), this, SLOT(showFileMenu())); |
273 | |||
274 | connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), | ||
275 | this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); | ||
276 | |||
277 | connect( Remote_View, SIGNAL( clicked(QListViewItem*)), | ||
278 | this,SLOT( ListClicked(QListViewItem*)) ); | ||
279 | connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), | ||
280 | this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); | ||
281 | |||
282 | connect( TabWidget,SIGNAL(currentChanged(QWidget*)), | ||
283 | this,SLOT(tabChanged(QWidget*))); | ||
284 | |||
285 | connect( Remote_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)), | ||
286 | this, SLOT(showFileMenu())); | ||
287 | connect( Local_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&,int)), | ||
288 | this, SLOT(showFileMenu())); | ||
289 | 273 | ||
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 8d04c68..5a46579 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp | |||
@@ -273,4 +273,7 @@ void AdvancedFm::upDir() { | |||
273 | 273 | ||
274 | void AdvancedFm::copyTimer() { | ||
275 | QTimer::singleShot(125,this,SLOT(copy())); | ||
276 | } | ||
277 | |||
274 | void AdvancedFm::copy() { | 278 | void AdvancedFm::copy() { |
275 | qApp->processEvents(); | ||
276 | QStringList curFileList = getPath(); | 279 | QStringList curFileList = getPath(); |
@@ -314,3 +317,3 @@ void AdvancedFm::copy() { | |||
314 | switch ( QMessageBox::warning(this,tr("File Exists!"), | 317 | switch ( QMessageBox::warning(this,tr("File Exists!"), |
315 | tr("%1 exists. Ok to overwrite?").arg( item ), | 318 | tr("<p>%1 already exists. Ok to overwrite?</P>").arg(item), |
316 | tr("Yes"),tr("No"),0,0,1) ) { | 319 | tr("Yes"),tr("No"),0,0,1) ) { |
@@ -326,3 +329,3 @@ void AdvancedFm::copy() { | |||
326 | QMessageBox::message("AdvancedFm", | 329 | QMessageBox::message("AdvancedFm", |
327 | tr( "Could not copy %1 to %2").arg( curFile ).arg( destFile ) ); | 330 | tr( "<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile)); |
328 | return; | 331 | return; |
@@ -330,3 +333,2 @@ void AdvancedFm::copy() { | |||
330 | } | 333 | } |
331 | setOtherTabCurrent(); | ||
332 | rePopulate(); | 334 | rePopulate(); |
@@ -335,2 +337,6 @@ void AdvancedFm::copy() { | |||
335 | 337 | ||
338 | void AdvancedFm::copyAsTimer() { | ||
339 | QTimer::singleShot(125,this,SLOT(copyAs())); | ||
340 | } | ||
341 | |||
336 | void AdvancedFm::copyAs() { | 342 | void AdvancedFm::copyAs() { |
@@ -348,3 +354,3 @@ void AdvancedFm::copyAs() { | |||
348 | curFile = thisDir->canonicalPath()+"/"+(*it); | 354 | curFile = thisDir->canonicalPath()+"/"+(*it); |
349 | fileDlg = new InputDialog( this, tr("Copy "+curFile+" As"), TRUE, 0); | 355 | fileDlg = new InputDialog( this, tr("Copy %1 As").arg(curFile), TRUE, 0); |
350 | 356 | ||
@@ -360,3 +366,3 @@ void AdvancedFm::copyAs() { | |||
360 | switch (QMessageBox::warning(this,tr("File Exists!"), | 366 | switch (QMessageBox::warning(this,tr("File Exists!"), |
361 | item+tr("\nexists. Ok to overwrite?"), | 367 | tr("<P> %1 already exists. Ok to overwrite?</p>").arg(item), |
362 | tr("Yes"),tr("No"),0,0,1) ) { | 368 | tr("Yes"),tr("No"),0,0,1) ) { |
@@ -371,4 +377,3 @@ void AdvancedFm::copyAs() { | |||
371 | if( !copyFile( curFile, destFile) ) { | 377 | if( !copyFile( curFile, destFile) ) { |
372 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") | 378 | QMessageBox::message("AdvancedFm",tr("<p>Could not copy %1 to %2</P>").arg(curFile).arg(destFile)); |
373 | +curFile +tr("to\n")+destFile); | ||
374 | return; | 379 | return; |
@@ -380,3 +385,3 @@ void AdvancedFm::copyAs() { | |||
380 | rePopulate(); | 385 | rePopulate(); |
381 | setOtherTabCurrent(); | 386 | // setOtherTabCurrent(); |
382 | qApp->processEvents(); | 387 | qApp->processEvents(); |
@@ -385,2 +390,6 @@ void AdvancedFm::copyAs() { | |||
385 | 390 | ||
391 | void AdvancedFm::copySameDirTimer() { | ||
392 | QTimer::singleShot(125,this,SLOT(copySameDir())); | ||
393 | } | ||
394 | |||
386 | void AdvancedFm::copySameDir() { | 395 | void AdvancedFm::copySameDir() { |
@@ -409,3 +418,3 @@ void AdvancedFm::copySameDir() { | |||
409 | switch (QMessageBox::warning(this,tr("Delete"), | 418 | switch (QMessageBox::warning(this,tr("Delete"), |
410 | destFile+tr(" already exists.\nDo you really want to delete it?"), | 419 | tr("<p> %1 already exists. Do you really want to delete it?</P>").arg(destFile), |
411 | tr("Yes"),tr("No"),0,0,1) ) { | 420 | tr("Yes"),tr("No"),0,0,1) ) { |
@@ -421,4 +430,3 @@ void AdvancedFm::copySameDir() { | |||
421 | if(!copyFile( curFile,destFile) ) { | 430 | if(!copyFile( curFile,destFile) ) { |
422 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") | 431 | QMessageBox::message("AdvancedFm",tr("<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile)); |
423 | +curFile +tr("to\n")+destFile); | ||
424 | return; | 432 | return; |
@@ -433,4 +441,7 @@ void AdvancedFm::copySameDir() { | |||
433 | 441 | ||
442 | void AdvancedFm::moveTimer() { | ||
443 | QTimer::singleShot(125,this,SLOT(move())); | ||
444 | } | ||
445 | |||
434 | void AdvancedFm::move() { | 446 | void AdvancedFm::move() { |
435 | qApp->processEvents(); | ||
436 | 447 | ||
@@ -462,3 +473,2 @@ void AdvancedFm::move() { | |||
462 | } | 473 | } |
463 | |||
464 | QFile f( curFile); | 474 | QFile f( curFile); |
@@ -475,3 +485,3 @@ void AdvancedFm::move() { | |||
475 | rePopulate(); | 485 | rePopulate(); |
476 | setOtherTabCurrent(); | 486 | //setOtherTabCurrent(); |
477 | } | 487 | } |
@@ -508,8 +518,6 @@ bool AdvancedFm::copyDirectory( const QString & src, const QString & dest ) { | |||
508 | bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { | 518 | bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { |
509 | |||
510 | |||
511 | if(QFileInfo(src).isDir()) { | 519 | if(QFileInfo(src).isDir()) { |
512 | if( copyDirectory( src, dest )) { | 520 | if( copyDirectory( src, dest )) { |
513 | setOtherTabCurrent(); | 521 | // setOtherTabCurrent(); |
514 | populateView(); | 522 | rePopulate(); |
515 | return true; | 523 | return true; |
@@ -710,7 +718,5 @@ void AdvancedFm::startProcess(const QString & cmd) { | |||
710 | process = new OProcess(); | 718 | process = new OProcess(); |
711 | connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), | 719 | connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT( processEnded(Opie::Core::OProcess*))); |
712 | this, SLOT( processEnded(Opie::Core::OProcess*))); | ||
713 | 720 | ||
714 | connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), | 721 | connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int))); |
715 | this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int))); | ||
716 | 722 | ||
@@ -756,9 +762,9 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { | |||
756 | if ( e->type() == QEvent::FocusIn ) { | 762 | if ( e->type() == QEvent::FocusIn ) { |
757 | if( o == Local_View) { //keep track of which view | 763 | // if( o == Local_View) { //keep track of which view |
758 | qDebug("local view"); | 764 | // qDebug("local view"); |
759 | whichTab = 1; | 765 | // whichTab = 1; |
760 | } else { | 766 | // } else { |
761 | whichTab = 2; | 767 | // whichTab = 2; |
762 | qDebug("remote view"); | 768 | // qDebug("remote view"); |
763 | } | 769 | // } |
764 | } | 770 | } |
@@ -791,3 +797,2 @@ void AdvancedFm::doRename(QListView * view) { | |||
791 | r.setX( view->contentsX() ); | 797 | r.setX( view->contentsX() ); |
792 | |||
793 | if ( r.width() > view->visibleWidth() ) | 798 | if ( r.width() > view->visibleWidth() ) |
@@ -797,14 +802,8 @@ void AdvancedFm::doRename(QListView * view) { | |||
797 | renameBox->setFrame(true); | 802 | renameBox->setFrame(true); |
798 | |||
799 | renameBox->setText( view->currentItem()->text(0) ); | 803 | renameBox->setText( view->currentItem()->text(0) ); |
800 | |||
801 | renameBox->selectAll(); | 804 | renameBox->selectAll(); |
802 | renameBox->installEventFilter( this ); | 805 | renameBox->installEventFilter( this ); |
803 | |||
804 | view->addChild( renameBox, r.x(), r.y() ); | 806 | view->addChild( renameBox, r.x(), r.y() ); |
805 | |||
806 | renameBox->resize( r.size() ); | 807 | renameBox->resize( r.size() ); |
807 | |||
808 | view->viewport()->setFocusProxy( renameBox ); | 808 | view->viewport()->setFocusProxy( renameBox ); |
809 | |||
810 | renameBox->setFocus(); | 809 | renameBox->setFocus(); |