summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/fileBrowser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp
index c9366e7..7eac5d2 100644
--- a/core/apps/textedit/fileBrowser.cpp
+++ b/core/apps/textedit/fileBrowser.cpp
@@ -428,54 +428,54 @@ void fileBrowser::updateMimeTypeMenu() {
428 this, SLOT(showType(const QString&)) ); 428 this, SLOT(showType(const QString&)) );
429 429
430 QString prev; 430 QString prev;
431 431
432 // Type filter 432 // Type filter
433 QStringList types; 433 QStringList types;
434 types << tr("All"); 434 types << tr("All");
435 types << "--"; 435 types << "--";
436 types += getMimeTypes(); 436 types += getMimeTypes();
437 prev = typemb->currentText(); 437 prev = typemb->currentText();
438 typemb->clear(); 438 typemb->clear();
439 typemb->insertItems(types); 439 typemb->insertItems(types);
440 // typemb->select(prev); 440 // typemb->select(prev);
441 441
442 connect(typemb, SIGNAL(selected(const QString&)), this, SLOT(showType(const QString&))); 442 connect(typemb, SIGNAL(selected(const QString&)), this, SLOT(showType(const QString&)));
443} 443}
444 444
445void fileBrowser::showType(const QString &t) { 445void fileBrowser::showType(const QString &t) {
446 446
447 qDebug(t); 447 qDebug(t);
448 mimeType = t+"/*"; 448 mimeType = t+"/*";
449// if(fileSelector) { 449// if(fileSelector) {
450// disconnect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( docOpen( const DocLnk & ) ) ); 450// disconnect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( docOpen( const DocLnk & ) ) );
451// delete fileSelector; 451// delete fileSelector;
452 } 452 // }
453 // fileSelector = new FileSelector( mimeType, FileStack, "fileselector" , FALSE, FALSE); //buggy 453 // fileSelector = new FileSelector( mimeType, FileStack, "fileselector" , FALSE, FALSE); //buggy
454// connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( showEditTools() ) ); 454// connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( showEditTools() ) );
455// connect( fileSelector, SIGNAL( newSelected( const DocLnk &) ), this, SLOT( newFile( const DocLnk & ) ) ); 455// connect( fileSelector, SIGNAL( newSelected( const DocLnk &) ), this, SLOT( newFile( const DocLnk & ) ) );
456 // connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( docOpen( const DocLnk & ) ) ); 456 // connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( docOpen( const DocLnk & ) ) );
457 fileSelector->reread(); 457// fileSelector->reread();
458 repaint(); 458 repaint();
459// if ( t == tr("All") ) { 459// if ( t == tr("All") ) {
460// icons->setTypeFilter("",TRUE); 460// icons->setTypeFilter("",TRUE);
461// } else { 461// } else {
462// icons->setTypeFilter(t+"/*",TRUE); 462// icons->setTypeFilter(t+"/*",TRUE);
463// } 463// }
464 464
465} 465}
466 466
467QStringList fileBrowser::getMimeTypes() { 467QStringList fileBrowser::getMimeTypes() {
468 QStringList r; 468 QStringList r;
469 AppLnkSet apps( QPEApplication::qpeDir() + "apps" ); 469 AppLnkSet apps( QPEApplication::qpeDir() + "apps" );
470 QFile file( QPEApplication::qpeDir()+"etc/available.mime"); 470 QFile file( QPEApplication::qpeDir()+"etc/available.mime");
471 file.open( IO_WriteOnly|IO_Truncate);//) 471 file.open( IO_WriteOnly|IO_Truncate);//)
472 for ( QListIterator<AppLnk> it( apps.children() ); it.current(); ++it ) { 472 for ( QListIterator<AppLnk> it( apps.children() ); it.current(); ++it ) {
473 AppLnk* l; 473 AppLnk* l;
474 l = it.current(); 474 l = it.current();
475 QStringList maj = l->mimeTypes(); 475 QStringList maj = l->mimeTypes();
476 QStringList::ConstIterator f; 476 QStringList::ConstIterator f;
477 for ( f = maj.begin(); f != maj.end(); f++ ) { 477 for ( f = maj.begin(); f != maj.end(); f++ ) {
478 QString temp = *f; 478 QString temp = *f;
479 int sl = temp.find('/'); 479 int sl = temp.find('/');
480 if (sl >= 0) { 480 if (sl >= 0) {
481 QString k = temp.left(sl); 481 QString k = temp.left(sl);