summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector.cc36
1 files changed, 30 insertions, 6 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc
index 98290e0..824acf2 100644
--- a/libopie/ofileselector.cc
+++ b/libopie/ofileselector.cc
@@ -127,3 +127,3 @@ OFileSelector::OFileSelector(const QString &mimeFilter, QWidget *parent,
127 m_currentDir = QPEApplication::documentDir(); 127 m_currentDir = QPEApplication::documentDir();
128 m_mode = OPEN; 128 m_mode = FILESELECTOR;
129 m_selector = NORMAL; 129 m_selector = NORMAL;
@@ -157,2 +157,4 @@ void OFileSelector::setNewVisible( bool visible )
157 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) ); 157 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) );
158 connect(m_select, SIGNAL(closeMe() ),
159 this, SIGNAL(closeMe() ) );
158 //connect to close me and other signals as well 160 //connect to close me and other signals as well
@@ -437,5 +439,7 @@ void OFileSelector::slotViewCheck(const QString &sel)
437 m_stack, "fileselector", 439 m_stack, "fileselector",
438 FALSE, FALSE); 440 m_shNew, m_shClose);
439 connect(m_select, SIGNAL(fileSelected( const DocLnk & ) ), 441 connect(m_select, SIGNAL(fileSelected( const DocLnk & ) ),
440 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) ); 442 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) );
443 connect(m_select, SIGNAL(closeMe() ),
444 this, SIGNAL(closeMe() ) );
441 //connect to close me and other signals as well 445 //connect to close me and other signals as well
@@ -496,3 +500,3 @@ void OFileSelector::slotMimeCheck(const QString &mime)
496 m_stack, "fileselector", 500 m_stack, "fileselector",
497 FALSE, FALSE); 501 m_shNew, m_shClose);
498 502
@@ -500,2 +504,4 @@ void OFileSelector::slotMimeCheck(const QString &mime)
500 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) ); 504 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) );
505 connect(m_select, SIGNAL(closeMe() ),
506 this, SIGNAL(closeMe() ) );
501 //connect to close me and other signals as well 507 //connect to close me and other signals as well
@@ -562,3 +568,3 @@ void OFileSelector::init()
562 m_stack, "fileselector", 568 m_stack, "fileselector",
563 FALSE, FALSE); 569 m_shNew, m_shClose);
564 570
@@ -566,2 +572,4 @@ void OFileSelector::init()
566 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) ); 572 this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) );
573 connect(m_select, SIGNAL(closeMe() ),
574 this, SIGNAL( closeMe() ) );
567 //connect to close me and other signals as well 575 //connect to close me and other signals as well
@@ -876,4 +884,4 @@ void OFileSelector::initializeListView()
876 m_close->hide(); 884 m_close->hide();
877 if(!m_shNew) 885 //if(!m_shNew)
878 m_close->hide(); 886 //m_close->hide();
879 887
@@ -1024,2 +1032,3 @@ void OFileSelector::slotCurrentChanged(QListViewItem* item )
1024 OFileSelectorItem *sel = (OFileSelectorItem*) item; // start to use the C++ casts ;) 1032 OFileSelectorItem *sel = (OFileSelectorItem*) item; // start to use the C++ casts ;)
1033 qWarning("current changed");
1025 if(!sel->isDir() ){ 1034 if(!sel->isDir() ){
@@ -1027,2 +1036,10 @@ void OFileSelector::slotCurrentChanged(QListViewItem* item )
1027 m_edit->setText( sel->text(1) ); 1036 m_edit->setText( sel->text(1) );
1037
1038 if (m_mode == FILESELECTOR ) {
1039 QStringList str = QStringList::split("->", sel->text(1) );
1040 QString path =sel->directory() + "/" + str[0].stripWhiteSpace();
1041 emit fileSelected(path );
1042 DocLnk lnk( path );
1043 emit fileSelected(lnk );
1044 }
1028 } 1045 }
@@ -1052,3 +1069,7 @@ void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint &
1052 m_edit->setText( str[0].stripWhiteSpace() ); 1069 m_edit->setText( str[0].stripWhiteSpace() );
1070 qWarning("selected here in slot clicked");
1053 emit fileSelected( sel->directory() + "/" + str[0].stripWhiteSpace() ); 1071 emit fileSelected( sel->directory() + "/" + str[0].stripWhiteSpace() );
1072 DocLnk lnk( sel->directory() + "/" + str[0].stripWhiteSpace() );
1073 qWarning("file selected");
1074 emit fileSelected( lnk );
1054 } 1075 }
@@ -1086,2 +1107,5 @@ void OFileSelector::slotOpen()
1086 slotFileSelected( sel->directory() +"/" +str[0].stripWhiteSpace() ); 1107 slotFileSelected( sel->directory() +"/" +str[0].stripWhiteSpace() );
1108 qWarning("slot open");
1109 // DocLnk lnk( sel->directory() + "/" + str[0].stripWhiteSpace() );
1110 //emit fileSelected( lnk );
1087 } 1111 }