summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/TODO1
-rw-r--r--libopie/ofileselector.cc10
2 files changed, 6 insertions, 5 deletions
diff --git a/libopie/TODO b/libopie/TODO
index a4e1ada..d49910c 100644
--- a/libopie/TODO
+++ b/libopie/TODO
@@ -1,19 +1,20 @@
1- xmltree done 1- xmltree done
2 2
3- tododb 3- tododb
4 - set Alarms 4 - set Alarms
5 - multiple categories 5 - multiple categories
6 - Attendees 6 - Attendees
7 7
8- OFileSelector 8- OFileSelector
9 - fix the weird view change bug delete m_pseudoLayout crash
9 - DocLnk when not in Document Mode ( and vice versa ) 10 - DocLnk when not in Document Mode ( and vice versa )
10 - MultipleDocuments 11 - MultipleDocuments
11 - TreeView have a own OFileSelectorItem for this 12 - TreeView have a own OFileSelectorItem for this
12 - IconView add a QIconView to the widgetstack 13 - IconView add a QIconView to the widgetstack
13 - Move OFileSelectorItem to it's own files 14 - Move OFileSelectorItem to it's own files
14 - add functions to access the member variables 15 - add functions to access the member variables
15 - debug 16 - debug
16 - new Dirs created inside the listview 17 - new Dirs created inside the listview
17 18
18- Clickable labels? 19- Clickable labels?
19 Harlekin you wanted them in the libs? \ No newline at end of file 20 Harlekin you wanted them in the libs? \ No newline at end of file
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc
index 7451c1b..968541a 100644
--- a/libopie/ofileselector.cc
+++ b/libopie/ofileselector.cc
@@ -575,50 +575,50 @@ void OFileSelector::slotMimeCheck(const QString &view ){
575 m_select = new FileSelector(view == "All" ? QString::null : view 575 m_select = new FileSelector(view == "All" ? QString::null : view
576 , m_stack, "fileselector", FALSE, FALSE ); 576 , m_stack, "fileselector", FALSE, FALSE );
577 m_stack->addWidget( m_select, NORMAL ); 577 m_stack->addWidget( m_select, NORMAL );
578 m_stack->raiseWidget( NORMAL ); 578 m_stack->raiseWidget( NORMAL );
579 }else{ 579 }else{
580 reparse(); 580 reparse();
581 } 581 }
582} 582}
583 583
584void OFileSelector::slotViewCheck(const QString &view ){ 584void OFileSelector::slotViewCheck(const QString &view ){
585 qWarning("changed: show %s", view.latin1() ); 585 qWarning("changed: show %s", view.latin1() );
586 // if the current view is the one 586 // if the current view is the one
587 QString currMime = m_mimeCheck->currentText(); 587 QString currMime = m_mimeCheck->currentText();
588 if( view == QString::fromLatin1("Documents") ){ 588 if( view == QString::fromLatin1("Documents") ){
589 // get the mimetype now 589 // get the mimetype now
590 // check if we're the current widget and return 590 // check if we're the current widget and return
591 if( m_View != 0) { // delete 0 shouldn't crash but it did :( 591 if( m_View != 0) { // delete 0 shouldn't crash but it did :(
592 delete m_View; 592 delete m_View;
593 delete m_boxToolbar; 593 delete m_boxToolbar;
594 delete m_homeButton; 594 delete m_homeButton;
595 delete m_docButton; 595 delete m_docButton;
596 delete m_location; 596 delete m_location;
597 delete m_up; 597 delete m_up;
598 delete m_pseudo; 598 delete m_pseudo;
599 if(m_pseudoLayout!=0 ) 599 //if(m_pseudoLayout!=0 )
600 delete m_pseudoLayout; 600 //delete m_pseudoLayout;
601 } 601 }
602 m_View = 0; 602 m_View = 0;
603 m_boxToolbar = 0; 603 m_boxToolbar = 0;
604 m_homeButton = 0; 604 m_homeButton = 0;
605 m_docButton = 0; 605 m_docButton = 0;
606 m_location = 0; 606 m_location = 0;
607 m_up = 0; 607 m_up = 0;
608 m_pseudo = 0; 608 m_pseudo = 0;
609 m_pseudoLayout = 0; 609 m_pseudoLayout = 0;
610 610
611 delete m_select; 611 delete m_select;
612 m_select = new FileSelector( currMime == "All" ? QString::null : currMime, 612 m_select = new FileSelector( currMime == "All" ? QString::null : currMime,
613 m_stack,"fileselector", FALSE, FALSE ); 613 m_stack,"fileselector", FALSE, FALSE );
614 m_stack->addWidget( m_select, NORMAL ); 614 m_stack->addWidget( m_select, NORMAL );
615 m_mimeCheck->clear(); 615 m_mimeCheck->clear();
616 m_selector = NORMAL; 616 m_selector = NORMAL;
617 updateMimes(); 617 updateMimes();
618 m_mimeCheck->insertStringList( m_mimetypes ); 618 m_mimeCheck->insertStringList( m_mimetypes );
619 m_stack->raiseWidget( NORMAL ); 619 m_stack->raiseWidget( NORMAL );
620 connect(m_select, SIGNAL(fileSelected( const DocLnk &) ), this, SLOT(slotFileBridgeSelected(const DocLnk &) ) ); 620 connect(m_select, SIGNAL(fileSelected( const DocLnk &) ), this, SLOT(slotFileBridgeSelected(const DocLnk &) ) );
621 621
622 }else if(view == QString::fromLatin1("Files") ){ 622 }else if(view == QString::fromLatin1("Files") ){
623 // remove from the stack 623 // remove from the stack
624 delete m_select; 624 delete m_select;
@@ -654,51 +654,51 @@ void OFileSelector::updateMimes() // lets check which mode is active
654 m_mimetypes.append("All" ); 654 m_mimetypes.append("All" );
655 if( m_selector == NORMAL ){ 655 if( m_selector == NORMAL ){
656 DocLnkSet set; 656 DocLnkSet set;
657 Global::findDocuments(&set, QString::null ); 657 Global::findDocuments(&set, QString::null );
658 QListIterator<DocLnk> dit( set.children() ); 658 QListIterator<DocLnk> dit( set.children() );
659 for ( ; dit.current(); ++dit ) { 659 for ( ; dit.current(); ++dit ) {
660 if( !m_mimetypes.contains((*dit)->type() ) ) 660 if( !m_mimetypes.contains((*dit)->type() ) )
661 m_mimetypes.append( (*dit)->type() ); 661 m_mimetypes.append( (*dit)->type() );
662 } 662 }
663 }else{ 663 }else{
664 // should be allreday updatet 664 // should be allreday updatet
665 ; 665 ;
666 } 666 }
667}; 667};
668void OFileSelector::initializeListView() 668void OFileSelector::initializeListView()
669{ 669{
670 // just to make sure but clean it up better FIXME 670 // just to make sure but clean it up better FIXME
671 delete m_View; 671 delete m_View;
672 m_View = 0; 672 m_View = 0;
673 delete m_boxToolbar; 673 delete m_boxToolbar;
674 delete m_homeButton; 674 delete m_homeButton;
675 delete m_docButton; 675 delete m_docButton;
676 delete m_location; 676 delete m_location;
677 delete m_up; 677 delete m_up;
678 delete m_pseudo; 678 //delete m_pseudo;
679 if(m_pseudoLayout!=0 ) // why did you overload malloc 679 //if(m_pseudoLayout!=0 ) // why did you overload malloc
680 delete m_pseudoLayout; 680 //delete m_pseudoLayout;
681 m_boxToolbar = 0; 681 m_boxToolbar = 0;
682 m_homeButton = 0; 682 m_homeButton = 0;
683 m_docButton = 0; 683 m_docButton = 0;
684 m_location = 0; 684 m_location = 0;
685 m_up = 0; 685 m_up = 0;
686 m_pseudo = 0; 686 m_pseudo = 0;
687 m_pseudoLayout = 0; 687 m_pseudoLayout = 0;
688 // time for the toolbar 688 // time for the toolbar
689 m_pseudo = new QWidget(m_stack, "Pseudo Widget"); 689 m_pseudo = new QWidget(m_stack, "Pseudo Widget");
690 m_pseudoLayout = new QVBoxLayout(m_pseudo ); 690 m_pseudoLayout = new QVBoxLayout(m_pseudo );
691 if(m_shTool ){ 691 if(m_shTool ){
692 m_boxToolbar = new QHBoxLayout( ); 692 m_boxToolbar = new QHBoxLayout( );
693 m_boxToolbar->setAutoAdd( true ); 693 m_boxToolbar->setAutoAdd( true );
694 m_location = new QComboBox(m_pseudo ); 694 m_location = new QComboBox(m_pseudo );
695 695
696 m_up = new QPushButton(Resource::loadIconSet("up"),"", m_pseudo,"cdUpButton"); 696 m_up = new QPushButton(Resource::loadIconSet("up"),"", m_pseudo,"cdUpButton");
697 m_up->setMinimumSize( QSize( 20, 20 ) ); 697 m_up->setMinimumSize( QSize( 20, 20 ) );
698 m_up->setMaximumSize( QSize( 20, 20 ) ); 698 m_up->setMaximumSize( QSize( 20, 20 ) );
699 connect(m_up ,SIGNAL(clicked()),this,SLOT(cdUP() ) ); 699 connect(m_up ,SIGNAL(clicked()),this,SLOT(cdUP() ) );
700 m_up->setFlat(TRUE); 700 m_up->setFlat(TRUE);
701 701
702 m_homeButton = new QPushButton(Resource::loadIconSet("home") , "", m_pseudo); 702 m_homeButton = new QPushButton(Resource::loadIconSet("home") , "", m_pseudo);
703 m_homeButton->setMinimumSize( QSize( 20, 20 ) ); 703 m_homeButton->setMinimumSize( QSize( 20, 20 ) );
704 m_homeButton->setMaximumSize( QSize( 20, 20 ) ); 704 m_homeButton->setMaximumSize( QSize( 20, 20 ) );