summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/microkde.pro2
-rw-r--r--microkde/ofileselector_p.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/microkde/microkde.pro b/microkde/microkde.pro
index 71d662b..21da158 100644
--- a/microkde/microkde.pro
+++ b/microkde/microkde.pro
@@ -20,157 +20,155 @@ MOC_DIR = moc/win
20include( ../variables.pri ) 20include( ../variables.pri )
21 21
22 22
23 23
24HEADERS = \ 24HEADERS = \
25qlayoutengine_p.h \ 25qlayoutengine_p.h \
26KDGanttMinimizeSplitter.h \ 26KDGanttMinimizeSplitter.h \
27 kapplication.h \ 27 kapplication.h \
28 kaudioplayer.h \ 28 kaudioplayer.h \
29 kcalendarsystem.h \ 29 kcalendarsystem.h \
30 kcalendarsystemgregorian.h \ 30 kcalendarsystemgregorian.h \
31 kcolorbutton.h \ 31 kcolorbutton.h \
32 kcolordialog.h \ 32 kcolordialog.h \
33 kcombobox.h \ 33 kcombobox.h \
34 kconfig.h \ 34 kconfig.h \
35 kdatetbl.h \ 35 kdatetbl.h \
36 kdebug.h \ 36 kdebug.h \
37 kdialog.h \ 37 kdialog.h \
38 kdialogbase.h \ 38 kdialogbase.h \
39 keditlistbox.h \ 39 keditlistbox.h \
40 kemailsettings.h \ 40 kemailsettings.h \
41 kfiledialog.h \ 41 kfiledialog.h \
42 kfontdialog.h \ 42 kfontdialog.h \
43 kglobal.h \ 43 kglobal.h \
44 kglobalsettings.h \ 44 kglobalsettings.h \
45 kiconloader.h \ 45 kiconloader.h \
46 klineedit.h \ 46 klineedit.h \
47 klineeditdlg.h \ 47 klineeditdlg.h \
48 kmessagebox.h \ 48 kmessagebox.h \
49 knotifyclient.h \ 49 knotifyclient.h \
50 kprinter.h \ 50 kprinter.h \
51 kprocess.h \ 51 kprocess.h \
52 krestrictedline.h \ 52 krestrictedline.h \
53 krun.h \ 53 krun.h \
54 ksimpleconfig.h \ 54 ksimpleconfig.h \
55 kstaticdeleter.h \ 55 kstaticdeleter.h \
56 ksystemtray.h \ 56 ksystemtray.h \
57 ktempfile.h \ 57 ktempfile.h \
58 ktextedit.h \ 58 ktextedit.h \
59 kunload.h \ 59 kunload.h \
60 kurl.h \ 60 kurl.h \
61 kdeui/kguiitem.h \ 61 kdeui/kguiitem.h \
62 kdeui/kcmodule.h \ 62 kdeui/kcmodule.h \
63 kdeui/kbuttonbox.h \ 63 kdeui/kbuttonbox.h \
64 kdeui/klistbox.h \ 64 kdeui/klistbox.h \
65 kdeui/klistview.h \ 65 kdeui/klistview.h \
66 kdeui/kjanuswidget.h \ 66 kdeui/kjanuswidget.h \
67 kdeui/kseparator.h \ 67 kdeui/kseparator.h \
68 kdeui/knuminput.h \ 68 kdeui/knuminput.h \
69 kdeui/knumvalidator.h \ 69 kdeui/knumvalidator.h \
70 kdeui/ksqueezedtextlabel.h \ 70 kdeui/ksqueezedtextlabel.h \
71 kio/job.h \ 71 kio/job.h \
72 kio/kio/kdirwatch.h \ 72 kio/kio/kdirwatch.h \
73 kio/kio/kdirwatch_p.h \ 73 kio/kio/kdirwatch_p.h \
74 kio/kfile/kurlrequester.h \ 74 kio/kfile/kurlrequester.h \
75 kresources/resource.h \ 75 kresources/resource.h \
76 kresources/factory.h \ 76 kresources/factory.h \
77 kresources/managerimpl.h \ 77 kresources/managerimpl.h \
78 kresources/manager.h \ 78 kresources/manager.h \
79 kresources/selectdialog.h \ 79 kresources/selectdialog.h \
80 kresources/configpage.h \ 80 kresources/configpage.h \
81 kresources/configwidget.h \ 81 kresources/configwidget.h \
82 kresources/configdialog.h \ 82 kresources/configdialog.h \
83 kresources/kcmkresources.h \ 83 kresources/kcmkresources.h \
84 kresources/syncwidget.h \
85 kdecore/kmdcodec.h \ 84 kdecore/kmdcodec.h \
86 kdecore/kconfigbase.h \ 85 kdecore/kconfigbase.h \
87 kdecore/klocale.h \ 86 kdecore/klocale.h \
88 kdecore/kcatalogue.h \ 87 kdecore/kcatalogue.h \
89 kdecore/ksharedptr.h \ 88 kdecore/ksharedptr.h \
90 kdecore/kshell.h \ 89 kdecore/kshell.h \
91 kdecore/kstandarddirs.h \ 90 kdecore/kstandarddirs.h \
92 kdecore/kstringhandler.h \ 91 kdecore/kstringhandler.h \
93 kdecore/kshortcut.h \ 92 kdecore/kshortcut.h \
94 kutils/kcmultidialog.h \ 93 kutils/kcmultidialog.h \
95 kdeui/kxmlguiclient.h \ 94 kdeui/kxmlguiclient.h \
96 kdeui/kstdaction.h \ 95 kdeui/kstdaction.h \
97 kdeui/kmainwindow.h \ 96 kdeui/kmainwindow.h \
98 kdeui/ktoolbar.h \ 97 kdeui/ktoolbar.h \
99 kdeui/ktoolbarbutton.h \ 98 kdeui/ktoolbarbutton.h \
100 kdeui/ktoolbarhandler.h \ 99 kdeui/ktoolbarhandler.h \
101 kdeui/kaction.h \ 100 kdeui/kaction.h \
102 kdeui/kactionclasses.h \ 101 kdeui/kactionclasses.h \
103 kdeui/kactioncollection.h \ 102 kdeui/kactioncollection.h \
104 kdecore/kprefs.h \ 103 kdecore/kprefs.h \
105 kdecore/klibloader.h \ 104 kdecore/klibloader.h \
106 kidmanager.h 105 kidmanager.h
107 106
108 107
109# kdecore/klibloader.h \ 108# kdecore/klibloader.h \
110 109
111 110
112SOURCES = \ 111SOURCES = \
113KDGanttMinimizeSplitter.cpp \ 112KDGanttMinimizeSplitter.cpp \
114 kapplication.cpp \ 113 kapplication.cpp \
115 kcalendarsystem.cpp \ 114 kcalendarsystem.cpp \
116 kcalendarsystemgregorian.cpp \ 115 kcalendarsystemgregorian.cpp \
117 kcolorbutton.cpp \ 116 kcolorbutton.cpp \
118 kcolordialog.cpp \ 117 kcolordialog.cpp \
119 kconfig.cpp \ 118 kconfig.cpp \
120 kdatetbl.cpp \ 119 kdatetbl.cpp \
121 kdialog.cpp \ 120 kdialog.cpp \
122 kdialogbase.cpp \ 121 kdialogbase.cpp \
123 keditlistbox.cpp \ 122 keditlistbox.cpp \
124 kemailsettings.cpp \ 123 kemailsettings.cpp \
125 kfontdialog.cpp \ 124 kfontdialog.cpp \
126 kfiledialog.cpp \ 125 kfiledialog.cpp \
127 kglobal.cpp \ 126 kglobal.cpp \
128 kglobalsettings.cpp \ 127 kglobalsettings.cpp \
129 kiconloader.cpp \ 128 kiconloader.cpp \
130 kmessagebox.cpp \ 129 kmessagebox.cpp \
131 ktextedit.cpp \ 130 ktextedit.cpp \
132 kprocess.cpp \ 131 kprocess.cpp \
133 krun.cpp \ 132 krun.cpp \
134 ksystemtray.cpp \ 133 ksystemtray.cpp \
135 ktempfile.cpp \ 134 ktempfile.cpp \
136 kurl.cpp \ 135 kurl.cpp \
137 kdecore/kcatalogue.cpp \ 136 kdecore/kcatalogue.cpp \
138 kdecore/klocale.cpp \ 137 kdecore/klocale.cpp \
139 kdecore/kmdcodec.cpp \ 138 kdecore/kmdcodec.cpp \
140 kdecore/kshell.cpp \ 139 kdecore/kshell.cpp \
141 kdecore/kstandarddirs.cpp \ 140 kdecore/kstandarddirs.cpp \
142 kdecore/kstringhandler.cpp \ 141 kdecore/kstringhandler.cpp \
143 kdeui/kbuttonbox.cpp \ 142 kdeui/kbuttonbox.cpp \
144 kdeui/kcmodule.cpp \ 143 kdeui/kcmodule.cpp \
145 kdeui/kguiitem.cpp \ 144 kdeui/kguiitem.cpp \
146 kdeui/kjanuswidget.cpp \ 145 kdeui/kjanuswidget.cpp \
147 kdeui/klistbox.cpp \ 146 kdeui/klistbox.cpp \
148 kdeui/klistview.cpp \ 147 kdeui/klistview.cpp \
149 kdeui/knuminput.cpp \ 148 kdeui/knuminput.cpp \
150 kdeui/knumvalidator.cpp \ 149 kdeui/knumvalidator.cpp \
151 kdeui/kseparator.cpp \ 150 kdeui/kseparator.cpp \
152 kdeui/ksqueezedtextlabel.cpp \ 151 kdeui/ksqueezedtextlabel.cpp \
153 kio/kio/kdirwatch.cpp \ 152 kio/kio/kdirwatch.cpp \
154 kio/kfile/kurlrequester.cpp \ 153 kio/kfile/kurlrequester.cpp \
155 kresources/configpage.cpp \ 154 kresources/configpage.cpp \
156 kresources/configdialog.cpp \ 155 kresources/configdialog.cpp \
157 kresources/configwidget.cpp \ 156 kresources/configwidget.cpp \
158 kresources/factory.cpp \ 157 kresources/factory.cpp \
159 kresources/kcmkresources.cpp \ 158 kresources/kcmkresources.cpp \
160 kresources/managerimpl.cpp \ 159 kresources/managerimpl.cpp \
161 kresources/resource.cpp \ 160 kresources/resource.cpp \
162 kresources/selectdialog.cpp \ 161 kresources/selectdialog.cpp \
163 kresources/syncwidget.cpp \
164 kutils/kcmultidialog.cpp \ 162 kutils/kcmultidialog.cpp \
165 kdeui/kaction.cpp \ 163 kdeui/kaction.cpp \
166 kdeui/kactionclasses.cpp \ 164 kdeui/kactionclasses.cpp \
167 kdeui/kactioncollection.cpp \ 165 kdeui/kactioncollection.cpp \
168 kdeui/kmainwindow.cpp \ 166 kdeui/kmainwindow.cpp \
169 kdeui/ktoolbar.cpp \ 167 kdeui/ktoolbar.cpp \
170 kdeui/ktoolbarbutton.cpp \ 168 kdeui/ktoolbarbutton.cpp \
171 kdeui/ktoolbarhandler.cpp \ 169 kdeui/ktoolbarhandler.cpp \
172 kdeui/kstdaction.cpp \ 170 kdeui/kstdaction.cpp \
173 kdeui/kxmlguiclient.cpp \ 171 kdeui/kxmlguiclient.cpp \
174 kdecore/kprefs.cpp \ 172 kdecore/kprefs.cpp \
175 kdecore/klibloader.cpp \ 173 kdecore/klibloader.cpp \
176 kidmanager.cpp 174 kidmanager.cpp
diff --git a/microkde/ofileselector_p.cpp b/microkde/ofileselector_p.cpp
index cf6074d..fd5f965 100644
--- a/microkde/ofileselector_p.cpp
+++ b/microkde/ofileselector_p.cpp
@@ -1,86 +1,88 @@
1#include <qcombobox.h> 1#include <qcombobox.h>
2#include <qdir.h> 2#include <qdir.h>
3#include <qhbox.h> 3#include <qhbox.h>
4#include <qheader.h> 4#include <qheader.h>
5#include <qlabel.h> 5#include <qlabel.h>
6#include <qlayout.h> 6#include <qlayout.h>
7#include <qlineedit.h> 7#include <qlineedit.h>
8#include <qlistview.h> 8#include <qlistview.h>
9#include <qpopupmenu.h> 9#include <qpopupmenu.h>
10#include <qwidgetstack.h> 10#include <qwidgetstack.h>
11#include <qregexp.h> 11#include <qregexp.h>
12#include <qobjectlist.h> 12#include <qobjectlist.h>
13 13
14/* hacky but we need to get FileSelector::filter */ 14/* hacky but we need to get FileSelector::filter */
15#define private public 15#define private public
16#include <qpe/fileselector.h> 16#include <qpe/fileselector.h>
17#undef private 17#undef private
18 18
19#include <qpe/qpeapplication.h> 19#include <qpe/qpeapplication.h>
20#include <qpe/mimetype.h> 20#include <qpe/mimetype.h>
21#include <qpe/resource.h> 21#include <qpe/resource.h>
22#include <qpe/storage.h> 22#include <qpe/storage.h>
23#include <kglobal.h>
24#include <klocale.h>
23 25
24#include "ofileselector_p.h" 26#include "ofileselector_p.h"
25//US#include "ofileselector.h" 27//US#include "ofileselector.h"
26 28
27#include "klocale.h" 29#include "klocale.h"
28 30
29OFileViewInterface::OFileViewInterface( OFileSelector* selector ) 31OFileViewInterface::OFileViewInterface( OFileSelector* selector )
30 : m_selector( selector ) { 32 : m_selector( selector ) {
31} 33}
32OFileViewInterface::~OFileViewInterface() { 34OFileViewInterface::~OFileViewInterface() {
33} 35}
34QString OFileViewInterface::name()const{ 36QString OFileViewInterface::name()const{
35 return m_name; 37 return m_name;
36} 38}
37void OFileViewInterface::setName( const QString& name ) { 39void OFileViewInterface::setName( const QString& name ) {
38 m_name = name; 40 m_name = name;
39} 41}
40OFileSelector* OFileViewInterface::selector()const { 42OFileSelector* OFileViewInterface::selector()const {
41 return m_selector; 43 return m_selector;
42} 44}
43 45
44DocLnk OFileViewInterface::selectedDocument()const { 46DocLnk OFileViewInterface::selectedDocument()const {
45 return DocLnk( selectedName() ); 47 return DocLnk( selectedName() );
46} 48}
47 49
48bool OFileViewInterface::showNew()const { 50bool OFileViewInterface::showNew()const {
49 return selector()->showNew(); 51 return selector()->showNew();
50} 52}
51bool OFileViewInterface::showClose()const { 53bool OFileViewInterface::showClose()const {
52 return selector()->showClose(); 54 return selector()->showClose();
53} 55}
54MimeTypes OFileViewInterface::mimeTypes()const { 56MimeTypes OFileViewInterface::mimeTypes()const {
55 return selector()->mimeTypes(); 57 return selector()->mimeTypes();
56} 58}
57QStringList OFileViewInterface::currentMimeType()const { 59QStringList OFileViewInterface::currentMimeType()const {
58 return selector()->currentMimeType(); 60 return selector()->currentMimeType();
59} 61}
60void OFileViewInterface::activate( const QString& ) { 62void OFileViewInterface::activate( const QString& ) {
61 // not implemented here 63 // not implemented here
62} 64}
63void OFileViewInterface::ok() { 65void OFileViewInterface::ok() {
64 emit selector()->ok(); 66 emit selector()->ok();
65} 67}
66void OFileViewInterface::cancel() { 68void OFileViewInterface::cancel() {
67 emit selector()->cancel(); 69 emit selector()->cancel();
68} 70}
69void OFileViewInterface::closeMe() { 71void OFileViewInterface::closeMe() {
70 emit selector()->closeMe(); 72 emit selector()->closeMe();
71} 73}
72void OFileViewInterface::fileSelected( const QString& str) { 74void OFileViewInterface::fileSelected( const QString& str) {
73 emit selector()->fileSelected( str); 75 emit selector()->fileSelected( str);
74} 76}
75void OFileViewInterface::fileSelected( const DocLnk& lnk) { 77void OFileViewInterface::fileSelected( const DocLnk& lnk) {
76 emit selector()->fileSelected( lnk ); 78 emit selector()->fileSelected( lnk );
77} 79}
78void OFileViewInterface::setCurrentFileName( const QString& str ) { 80void OFileViewInterface::setCurrentFileName( const QString& str ) {
79 selector()->m_lneEdit->setText( str ); 81 selector()->m_lneEdit->setText( str );
80} 82}
81QString OFileViewInterface::currentFileName()const{ 83QString OFileViewInterface::currentFileName()const{
82 return selector()->m_lneEdit->text(); 84 return selector()->m_lneEdit->text();
83} 85}
84QString OFileViewInterface::startDirectory()const{ 86QString OFileViewInterface::startDirectory()const{
85 return selector()->m_startDir; 87 return selector()->m_startDir;
86} 88}
@@ -406,149 +408,150 @@ void OFileViewFileListView::slotCurrentChanged( QListViewItem* item) {
406#if 0 408#if 0
407 409
408 OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); 410 OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item);
409 411
410 if (!sel->isDir() ) { 412 if (!sel->isDir() ) {
411 selector()->m_lneEdit->setText( sel->text(1) ); 413 selector()->m_lneEdit->setText( sel->text(1) );
412 // if in fileselector mode we will emit selected 414 // if in fileselector mode we will emit selected
413 if ( selector()->mode() == OFileSelector::FileSelector ) { 415 if ( selector()->mode() == OFileSelector::FileSelector ) {
414 qWarning("slot Current Changed"); 416 qWarning("slot Current Changed");
415 QStringList str = QStringList::split("->", sel->text(1) ); 417 QStringList str = QStringList::split("->", sel->text(1) );
416 QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); 418 QString path = sel->directory() + "/" + str[0].stripWhiteSpace();
417 emit selector()->fileSelected( path ); 419 emit selector()->fileSelected( path );
418 DocLnk lnk( path ); 420 DocLnk lnk( path );
419 emit selector()->fileSelected( lnk ); 421 emit selector()->fileSelected( lnk );
420 } 422 }
421 } 423 }
422#endif 424#endif
423} 425}
424void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const QPoint&, int ) { 426void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const QPoint&, int ) {
425 if (!item || ( button != Qt::LeftButton) ) 427 if (!item || ( button != Qt::LeftButton) )
426 return; 428 return;
427 429
428 OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); 430 OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item);
429 if (!sel->isLocked() ) { 431 if (!sel->isLocked() ) {
430 QStringList str = QStringList::split("->", sel->text(1) ); 432 QStringList str = QStringList::split("->", sel->text(1) );
431 if (sel->isDir() ) { 433 if (sel->isDir() ) {
432 m_currentDir = sel->directory() + "/" + str[0].stripWhiteSpace(); 434 m_currentDir = sel->directory() + "/" + str[0].stripWhiteSpace();
433 emit selector()->dirSelected( m_currentDir ); 435 emit selector()->dirSelected( m_currentDir );
434 reread( m_all ); 436 reread( m_all );
435 }else { // file 437 }else { // file
436 qWarning("slot Clicked"); 438 qWarning("slot Clicked");
437 selector()->m_lneEdit->setText( str[0].stripWhiteSpace() ); 439 selector()->m_lneEdit->setText( str[0].stripWhiteSpace() );
438 QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); 440 QString path = sel->directory() + "/" + str[0].stripWhiteSpace();
439 emit selector()->fileSelected( path ); 441 emit selector()->fileSelected( path );
440 DocLnk lnk( path ); 442 DocLnk lnk( path );
441 emit selector()->fileSelected( lnk ); 443 emit selector()->fileSelected( lnk );
442 } 444 }
443 } // not locked 445 } // not locked
444} 446}
445void OFileViewFileListView::addFile( QFileInfo* info, bool symlink ) { 447void OFileViewFileListView::addFile( QFileInfo* info, bool symlink ) {
446 MimeType type( info->absFilePath() ); 448 MimeType type( info->absFilePath() );
447 if (!compliesMime( type.id() ) ) 449 if (!compliesMime( type.id() ) )
448 return; 450 return;
449 451
450 QPixmap pix = type.pixmap(); 452 QPixmap pix = type.pixmap();
451 QString dir, name; bool locked; 453 QString dir, name; bool locked;
452 if ( pix.isNull() ) { 454 if ( pix.isNull() ) {
453 QWMatrix matrix; 455 QWMatrix matrix;
454 QPixmap pixer(Resource::loadPixmap("UnknownDocument") ); 456 QPixmap pixer(Resource::loadPixmap("UnknownDocument") );
455 matrix.scale( .4, .4 ); 457 matrix.scale( .4, .4 );
456 pix = pixer.xForm( matrix ); 458 pix = pixer.xForm( matrix );
457 } 459 }
458 dir = info->dirPath( true ); 460 dir = info->dirPath( true );
459 locked = false; 461 locked = false;
460 if ( symlink ) 462 if ( symlink )
461 name = info->fileName() + " -> " + info->dirPath() + "/" + info->readLink(); 463 name = info->fileName() + " -> " + info->dirPath() + "/" + info->readLink();
462 else{ 464 else{
463 name = info->fileName(); 465 name = info->fileName();
464 if ( ( (selector()->mode() == OFileSelector::Open)&& !info->isReadable() ) || 466 if ( ( (selector()->mode() == OFileSelector::Open)&& !info->isReadable() ) ||
465 ( (selector()->mode() == OFileSelector::Save)&& !info->isWritable() ) ) { 467 ( (selector()->mode() == OFileSelector::Save)&& !info->isWritable() ) ) {
466 locked = true; pix = Resource::loadPixmap("locked"); 468 locked = true; pix = Resource::loadPixmap("locked");
467 } 469 }
468 } 470 }
469 (void)new OFileSelectorItem( m_view, pix, name, 471 (void)new OFileSelectorItem( m_view, pix, name,
470 info->lastModified().toString(), QString::number( info->size() ), 472 KGlobal::locale()->formatDateTime(info->lastModified(),true, true, KLocale::ISODate),
473 QString::number( info->size() ),
471 dir, locked ); 474 dir, locked );
472} 475}
473void OFileViewFileListView::addDir( QFileInfo* info, bool symlink ) { 476void OFileViewFileListView::addDir( QFileInfo* info, bool symlink ) {
474 bool locked = false; QString name; QPixmap pix; 477 bool locked = false; QString name; QPixmap pix;
475 478
476 if ( ( ( selector()->mode() == OFileSelector::Open ) && !info->isReadable() ) || 479 if ( ( ( selector()->mode() == OFileSelector::Open ) && !info->isReadable() ) ||
477 ( ( selector()->mode() == OFileSelector::Save ) && !info->isWritable() ) ) { 480 ( ( selector()->mode() == OFileSelector::Save ) && !info->isWritable() ) ) {
478 locked = true; 481 locked = true;
479 if ( symlink ) 482 if ( symlink )
480 pix = Resource::loadPixmap( "symlink" ); 483 pix = Resource::loadPixmap( "symlink" );
481 else 484 else
482 pix = Resource::loadPixmap( "lockedfolder" ); 485 pix = Resource::loadPixmap( "lockedfolder" );
483 }else 486 }else
484 pix = symlink ? Resource::loadPixmap( "symlink") : Resource::loadPixmap("folder"); 487 pix = symlink ? Resource::loadPixmap( "symlink") : Resource::loadPixmap("folder");
485 488
486 name = symlink ? info->fileName() + " -> " + info->dirPath(true) + "/" + info->readLink() : 489 name = symlink ? info->fileName() + " -> " + info->dirPath(true) + "/" + info->readLink() :
487 info->fileName(); 490 info->fileName();
488 491
489 (void)new OFileSelectorItem( m_view, pix, name, 492 (void)new OFileSelectorItem( m_view, pix, name,
490 info->lastModified().toString(), 493 KGlobal::locale()->formatDateTime(info->lastModified(),true, true, KLocale::ISODate),
491 QString::number( info->size() ), 494 QString::number( info->size() ),
492 info->dirPath( true ), locked, true ); 495 info->dirPath( true ), locked, true );
493 496
494 497
495} 498}
496void OFileViewFileListView::addSymlink( QFileInfo* , bool ) { 499void OFileViewFileListView::addSymlink( QFileInfo* , bool ) {
497 500
498} 501}
499void OFileViewFileListView::cdUP() { 502void OFileViewFileListView::cdUP() {
500 QDir dir( m_currentDir ); 503 QDir dir( m_currentDir );
501 dir.cdUp(); 504 dir.cdUp();
502 505
503 if (!dir.exists() ) 506 if (!dir.exists() )
504 m_currentDir = "/"; 507 m_currentDir = "/";
505 else 508 else
506 m_currentDir = dir.absPath(); 509 m_currentDir = dir.absPath();
507 510
508 emit selector()->dirSelected( m_currentDir ); 511 emit selector()->dirSelected( m_currentDir );
509 reread( m_all ); 512 reread( m_all );
510} 513}
511void OFileViewFileListView::cdHome() { 514void OFileViewFileListView::cdHome() {
512 m_currentDir = QDir::homeDirPath(); 515 m_currentDir = QDir::homeDirPath();
513 emit selector()->dirSelected( m_currentDir ); 516 emit selector()->dirSelected( m_currentDir );
514 reread( m_all ); 517 reread( m_all );
515} 518}
516void OFileViewFileListView::cdDoc() { 519void OFileViewFileListView::cdDoc() {
517 m_currentDir = QPEApplication::documentDir(); 520 m_currentDir = QPEApplication::documentDir();
518 emit selector()->dirSelected( m_currentDir ); 521 emit selector()->dirSelected( m_currentDir );
519 reread( m_all ); 522 reread( m_all );
520} 523}
521void OFileViewFileListView::changeDir( const QString& dir ) { 524void OFileViewFileListView::changeDir( const QString& dir ) {
522 m_currentDir = dir; 525 m_currentDir = dir;
523 emit selector()->dirSelected( m_currentDir ); 526 emit selector()->dirSelected( m_currentDir );
524 reread( m_all ); 527 reread( m_all );
525} 528}
526void OFileViewFileListView::slotFSActivated( int id ) { 529void OFileViewFileListView::slotFSActivated( int id ) {
527 changeDir ( m_dev[m_fsPop->text(id)] ); 530 changeDir ( m_dev[m_fsPop->text(id)] );
528} 531}
529 532
530/* check if the mimetype in mime 533/* check if the mimetype in mime
531 * complies with the one which is current 534 * complies with the one which is current
532 */ 535 */
533/* 536/*
534 * We've the mimetype of the file 537 * We've the mimetype of the file
535 * We need to get the stringlist of the current mimetype 538 * We need to get the stringlist of the current mimetype
536 * 539 *
537 * mime = image@slashjpeg 540 * mime = image@slashjpeg
538 * QStringList = 'image@slash*' 541 * QStringList = 'image@slash*'
539 * or QStringList = image/jpeg;image/png;application/x-ogg 542 * or QStringList = image/jpeg;image/png;application/x-ogg
540 * or QStringList = application/x-ogg;image@slash*; 543 * or QStringList = application/x-ogg;image@slash*;
541 * with all these mime filters it should get acceptes 544 * with all these mime filters it should get acceptes
542 * to do so we need to look if mime is contained inside 545 * to do so we need to look if mime is contained inside
543 * the stringlist 546 * the stringlist
544 * if it's contained return true 547 * if it's contained return true
545 * if not ( I'm no RegExp expert at all ) we'll look if a '@slash*' 548 * if not ( I'm no RegExp expert at all ) we'll look if a '@slash*'
546 * is contained in the mimefilter and then we will 549 * is contained in the mimefilter and then we will
547 * look if both are equal until the '/' 550 * look if both are equal until the '/'
548 */ 551 */
549bool OFileViewFileListView::compliesMime( const QString& str) { 552bool OFileViewFileListView::compliesMime( const QString& str) {
550 if (str.isEmpty() || m_mimes.isEmpty() || str.stripWhiteSpace().isEmpty() ) 553 if (str.isEmpty() || m_mimes.isEmpty() || str.stripWhiteSpace().isEmpty() )
551 return true; 554 return true;
552 555
553 for (QStringList::Iterator it = m_mimes.begin(); it != m_mimes.end(); ++it ) { 556 for (QStringList::Iterator it = m_mimes.begin(); it != m_mimes.end(); ++it ) {
554 QRegExp reg( (*it) ); 557 QRegExp reg( (*it) );