summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-04-22 12:16:36 (UTC)
committer llornkcor <llornkcor>2002-04-22 12:16:36 (UTC)
commitc4cbc0428d013fdd3fc5744edc416669d5564ade (patch) (unidiff)
treebec11f4abf32164731bb16e6544e6a2586f146cb
parente79c930fb498f2bc3387da7133a57cd085244346 (diff)
downloadopie-c4cbc0428d013fdd3fc5744edc416669d5564ade.zip
opie-c4cbc0428d013fdd3fc5744edc416669d5564ade.tar.gz
opie-c4cbc0428d013fdd3fc5744edc416669d5564ade.tar.bz2
bug fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index fed15b4..1083f23 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -138,20 +138,20 @@ AdvancedFm::AdvancedFm( )
138 138
139 tab = new QWidget( TabWidget, "tab" ); 139 tab = new QWidget( TabWidget, "tab" );
140 tabLayout = new QGridLayout( tab ); 140 tabLayout = new QGridLayout( tab );
141 tabLayout->setSpacing( 2); 141 tabLayout->setSpacing( 2);
142 tabLayout->setMargin( 2); 142 tabLayout->setMargin( 2);
143 143
144 Local_View = new QListView( tab, "Local_View" ); 144 Local_View = new QListView( tab, "Local_View" );
145// Local_View->setResizePolicy( QListView::AutoOneFit ); 145// Local_View->setResizePolicy( QListView::AutoOneFit );
146 Local_View->addColumn( tr("File"),140); 146 Local_View->addColumn( tr("File"),130);
147 Local_View->addColumn( tr("Date"),-1);
148 Local_View->setColumnAlignment(1,QListView::AlignRight);
149 Local_View->addColumn( tr("Size"),-1); 147 Local_View->addColumn( tr("Size"),-1);
148 Local_View->setColumnAlignment(1,QListView::AlignRight);
149 Local_View->addColumn( tr("Date"),-1);
150 Local_View->setColumnAlignment(2,QListView::AlignRight); 150 Local_View->setColumnAlignment(2,QListView::AlignRight);
151 Local_View->setAllColumnsShowFocus(TRUE); 151 Local_View->setAllColumnsShowFocus(TRUE);
152// Local_View->setMultiSelection( TRUE ); 152// Local_View->setMultiSelection( TRUE );
153// Local_View->setSelectionMode(QListView::Extended); 153// Local_View->setSelectionMode(QListView::Extended);
154 QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); 154 QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold);
155 155
156 tabLayout->addWidget( Local_View, 0, 0 ); 156 tabLayout->addWidget( Local_View, 0, 0 );
157 157
@@ -163,20 +163,20 @@ AdvancedFm::AdvancedFm( )
163 TabWidget->insertTab( tab, tr("1")); 163 TabWidget->insertTab( tab, tr("1"));
164 164
165 tab_2 = new QWidget( TabWidget, "tab_2" ); 165 tab_2 = new QWidget( TabWidget, "tab_2" );
166 tabLayout_2 = new QGridLayout( tab_2 ); 166 tabLayout_2 = new QGridLayout( tab_2 );
167 tabLayout_2->setSpacing( 2); 167 tabLayout_2->setSpacing( 2);
168 tabLayout_2->setMargin( 2); 168 tabLayout_2->setMargin( 2);
169 169
170 Remote_View = new QListView( tab_2, "Remote_View" ); 170 Remote_View = new QListView( tab_2, "Remote_View" );
171 Remote_View->addColumn( tr("File"),140); 171 Remote_View->addColumn( tr("File"),130);
172 Remote_View->addColumn( tr("Date"),-1);
173 Remote_View->setColumnAlignment(1,QListView::AlignRight);
174 Remote_View->addColumn( tr("Size"),-1); 172 Remote_View->addColumn( tr("Size"),-1);
173 Remote_View->setColumnAlignment(1,QListView::AlignRight);
174 Remote_View->addColumn( tr("Date"),-1);
175 Remote_View->setColumnAlignment(2,QListView::AlignRight); 175 Remote_View->setColumnAlignment(2,QListView::AlignRight);
176 Remote_View->setAllColumnsShowFocus(TRUE); 176 Remote_View->setAllColumnsShowFocus(TRUE);
177// Remote_View->setMultiSelection( TRUE ); 177// Remote_View->setMultiSelection( TRUE );
178// Remote_View->setSelectionMode(QListView::Extended); 178// Remote_View->setSelectionMode(QListView::Extended);
179 QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); 179 QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold);
180 180
181 connect( Remote_View, SIGNAL( clicked( QListViewItem*)), 181 connect( Remote_View, SIGNAL( clicked( QListViewItem*)),
182 this,SLOT( remoteListClicked(QListViewItem *)) ); 182 this,SLOT( remoteListClicked(QListViewItem *)) );
@@ -296,17 +296,17 @@ void AdvancedFm::populateLocalView()
296 fileDate= fi->lastModified().toString(); 296 fileDate= fi->lastModified().toString();
297 if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { 297 if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) {
298 fileL+="/"; 298 fileL+="/";
299 isDir=TRUE; 299 isDir=TRUE;
300// qDebug( fileL); 300// qDebug( fileL);
301 } 301 }
302 } 302 }
303 if(fileL !="./" && fi->exists()) { 303 if(fileL !="./" && fi->exists()) {
304 item= new QListViewItem( Local_View, fileL , fileDate, fileS); 304 item= new QListViewItem( Local_View, fileL, fileS , fileDate);
305 305
306 if(isDir || fileL.find("/",0,TRUE) != -1) { 306 if(isDir || fileL.find("/",0,TRUE) != -1) {
307 if( !QDir( fi->filePath() ).isReadable()) 307 if( !QDir( fi->filePath() ).isReadable())
308 pm = Resource::loadPixmap( "lockedfolder" ); 308 pm = Resource::loadPixmap( "lockedfolder" );
309 else 309 else
310 pm= Resource::loadPixmap( "folder" ); 310 pm= Resource::loadPixmap( "folder" );
311 item->setPixmap( 0,pm ); 311 item->setPixmap( 0,pm );
312 } else { 312 } else {
@@ -349,17 +349,17 @@ void AdvancedFm::populateLocalView()
349// mode = buf.st_mode; 349// mode = buf.st_mode;
350 fileL.sprintf("%s", mydirent->d_name); 350 fileL.sprintf("%s", mydirent->d_name);
351// fileS.sprintf("%d, %d", ); //this isn't correct 351// fileS.sprintf("%d, %d", ); //this isn't correct
352 devT = buf.st_dev; 352 devT = buf.st_dev;
353 fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); 353 fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF);
354// fileS.sprintf("%d,%d", devT, devT); 354// fileS.sprintf("%d,%d", devT, devT);
355 fileDate.sprintf("%s", ctime( &buf.st_mtime)); 355 fileDate.sprintf("%s", ctime( &buf.st_mtime));
356 if( fileL.find(".") == -1 ){ 356 if( fileL.find(".") == -1 ){
357 item= new QListViewItem( Local_View, fileL, fileDate, fileS); 357 item= new QListViewItem( Local_View, fileL, fileS, fileDate);
358 pm = Resource::loadPixmap( "UnknownDocument-14" ); 358 pm = Resource::loadPixmap( "UnknownDocument-14" );
359 item->setPixmap( 0,pm); 359 item->setPixmap( 0,pm);
360 } 360 }
361 } 361 }
362 362
363 closedir(dir); 363 closedir(dir);
364 } 364 }
365 365
@@ -403,17 +403,17 @@ void AdvancedFm::populateRemoteView()
403 fileDate= fi->lastModified().toString(); 403 fileDate= fi->lastModified().toString();
404 if( QDir(QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+fileL)).exists() ) { 404 if( QDir(QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+fileL)).exists() ) {
405 fileL+="/"; 405 fileL+="/";
406 isDir=TRUE; 406 isDir=TRUE;
407// qDebug( fileL); 407// qDebug( fileL);
408 } 408 }
409 } 409 }
410 if(fileL !="./" && fi->exists()) { 410 if(fileL !="./" && fi->exists()) {
411 item= new QListViewItem( Remote_View, fileL, fileDate, fileS); 411 item= new QListViewItem( Remote_View, fileL, fileS, fileDate);
412 QPixmap pm; 412 QPixmap pm;
413 413
414 if(isDir || fileL.find("/",0,TRUE) != -1) { 414 if(isDir || fileL.find("/",0,TRUE) != -1) {
415 if( !QDir( fi->filePath() ).isReadable()) 415 if( !QDir( fi->filePath() ).isReadable())
416 pm = Resource::loadPixmap( "lockedfolder" ); 416 pm = Resource::loadPixmap( "lockedfolder" );
417 else 417 else
418 pm= Resource::loadPixmap( "folder" ); 418 pm= Resource::loadPixmap( "folder" );
419 item->setPixmap( 0,pm ); 419 item->setPixmap( 0,pm );
@@ -454,17 +454,17 @@ void AdvancedFm::populateRemoteView()
454 lstat( mydirent->d_name, &buf); 454 lstat( mydirent->d_name, &buf);
455 qDebug(mydirent->d_name); 455 qDebug(mydirent->d_name);
456// mode = buf.st_mode; 456// mode = buf.st_mode;
457 fileL.sprintf("%s", mydirent->d_name); 457 fileL.sprintf("%s", mydirent->d_name);
458// fileS.sprintf("%d, %d", ); //this isn't correct 458// fileS.sprintf("%d, %d", ); //this isn't correct
459 fileS.sprintf("%d,%d", (int) (buf.st_dev>>8)&0xFF, (int) buf.st_dev &0xFF); 459 fileS.sprintf("%d,%d", (int) (buf.st_dev>>8)&0xFF, (int) buf.st_dev &0xFF);
460 fileDate.sprintf("%s", ctime( &buf.st_mtime)); 460 fileDate.sprintf("%s", ctime( &buf.st_mtime));
461 if( fileL.find(".") == -1 ){ 461 if( fileL.find(".") == -1 ){
462 item= new QListViewItem( Remote_View, fileL, fileDate, fileS); 462 item= new QListViewItem( Remote_View, fileL, fileS, fileDate);
463 pm = Resource::loadPixmap( "UnknownDocument-14" ); 463 pm = Resource::loadPixmap( "UnknownDocument-14" );
464 item->setPixmap( 0,pm); 464 item->setPixmap( 0,pm);
465 } 465 }
466 } 466 }
467 467
468 closedir(dir); 468 closedir(dir);
469 } 469 }
470 470