Diffstat (limited to 'libopie2/opieui/fileselector/ofileselector.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index 346eeae..e8d502f 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp | |||
@@ -532,2 +532,10 @@ bool OFileViewFileListView::eventFilter (QObject *, QEvent *e) | |||
532 | 532 | ||
533 | /** | ||
534 | * @return true if the item show all files or directories | ||
535 | */ | ||
536 | bool OFileViewFileListView::allItem( const QString& item )const | ||
537 | { | ||
538 | return m_sel->allItem( item ); | ||
539 | } | ||
540 | |||
533 | void OFileViewFileListView::connectSlots() | 541 | void OFileViewFileListView::connectSlots() |
@@ -819,3 +827,3 @@ void OFileViewFileSystem::activate( const QString& str) | |||
819 | { | 827 | { |
820 | m_all = ( str.find( "All" ) != -1 ); | 828 | m_all = m_view->allItem( str ); |
821 | } | 829 | } |
@@ -869,2 +877,4 @@ OFileSelector::OFileSelector( QWidget* parent, int mode, int sel, | |||
869 | 877 | ||
878 | m_allList = new QStringList(); | ||
879 | |||
870 | initUI(); | 880 | initUI(); |
@@ -1025,2 +1035,3 @@ void OFileSelector::initViews() | |||
1025 | m_views.insert( QObject::tr("All Directories"), in ); | 1035 | m_views.insert( QObject::tr("All Directories"), in ); |
1036 | m_allList->append( QObject::tr("All Directories") ); | ||
1026 | } else { | 1037 | } else { |
@@ -1029,2 +1040,3 @@ void OFileSelector::initViews() | |||
1029 | m_views.insert( QObject::tr("All Files"), in ); | 1040 | m_views.insert( QObject::tr("All Files"), in ); |
1041 | m_allList->append( QObject::tr("All Files") ); | ||
1030 | } | 1042 | } |
@@ -1148,2 +1160,10 @@ int OFileSelector::selector()const | |||
1148 | 1160 | ||
1161 | /** | ||
1162 | * @return true if the item show all files or directories | ||
1163 | */ | ||
1164 | bool OFileSelector::allItem( const QString& item )const | ||
1165 | { | ||
1166 | return ( m_allList->findIndex( item ) != -1 ); | ||
1167 | } | ||
1168 | |||
1149 | QStringList OFileSelector::currentMimeType()const | 1169 | QStringList OFileSelector::currentMimeType()const |
@@ -1177,3 +1197,2 @@ void OFileSelector::slotViewChange( const QString& view ) | |||
1177 | 1197 | ||
1178 | interface->activate( view ); | ||
1179 | if (m_current) | 1198 | if (m_current) |
@@ -1186,2 +1205,3 @@ void OFileSelector::slotViewChange( const QString& view ) | |||
1186 | 1205 | ||
1206 | interface->activate( view ); | ||
1187 | interface->reread(); | 1207 | interface->reread(); |