author | zautrix <zautrix> | 2005-02-05 12:03:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-05 12:03:42 (UTC) |
commit | f5902d0e08e0b10321c555e8846a8a8ce2087d30 (patch) (unidiff) | |
tree | 5aeaa9689b3161867fb0c8707adc5908b5072f06 | |
parent | 86c0d35262454a31ed7d50d3e20cbdace954ebdf (diff) | |
download | kdepimpi-f5902d0e08e0b10321c555e8846a8a8ce2087d30.zip kdepimpi-f5902d0e08e0b10321c555e8846a8a8ce2087d30.tar.gz kdepimpi-f5902d0e08e0b10321c555e8846a8a8ce2087d30.tar.bz2 |
file selector fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 5 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 2 | ||||
-rw-r--r-- | microkde/kfiledialog.cpp | 2 | ||||
-rw-r--r-- | microkde/ofileselector_p.cpp | 28 | ||||
-rw-r--r-- | microkde/ofileselector_p.h | 1 |
5 files changed, 35 insertions, 3 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 9ba4f3e..4421e61 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -21,3 +21,6 @@ Fixed bug that the todo view flat mode was reset after first view update. | |||
21 | 21 | ||
22 | If a todo is displayed closed in the todo view, it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. | 22 | If a todo is displayed closed in the todo view, |
23 | it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. | ||
24 | |||
25 | Added info about the numbers of years to the caption (title) information about a birthday event. | ||
23 | 26 | ||
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index d0dbb47..acd9265 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -522,3 +522,3 @@ void KOListView::saveDescriptionToFile() | |||
522 | 522 | ||
523 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 523 | int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), |
524 | i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), | 524 | i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), |
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp index 977499e..309f8dc 100644 --- a/microkde/kfiledialog.cpp +++ b/microkde/kfiledialog.cpp | |||
@@ -24,2 +24,3 @@ QString KFileDialog::getSaveFileName( const QString & fn, | |||
24 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() ); | 24 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() ); |
25 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); | ||
25 | lay.addWidget( &o); | 26 | lay.addWidget( &o); |
@@ -49,2 +50,3 @@ QString KFileDialog::getOpenFileName( const QString & fn, | |||
49 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); | 50 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); |
51 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); | ||
50 | lay.addWidget( &o); | 52 | lay.addWidget( &o); |
diff --git a/microkde/ofileselector_p.cpp b/microkde/ofileselector_p.cpp index fd5f965..f85f8f4 100644 --- a/microkde/ofileselector_p.cpp +++ b/microkde/ofileselector_p.cpp | |||
@@ -387,2 +387,3 @@ OFileSelector* OFileViewFileListView::selector() { | |||
387 | bool OFileViewFileListView::eventFilter (QObject *o, QEvent *e) { | 387 | bool OFileViewFileListView::eventFilter (QObject *o, QEvent *e) { |
388 | #if 0 | ||
388 | if ( e->type() == QEvent::KeyPress ) { | 389 | if ( e->type() == QEvent::KeyPress ) { |
@@ -394,2 +395,3 @@ bool OFileViewFileListView::eventFilter (QObject *o, QEvent *e) { | |||
394 | } | 395 | } |
396 | #endif | ||
395 | return false; | 397 | return false; |
@@ -403,2 +405,6 @@ void OFileViewFileListView::connectSlots() { | |||
403 | this, SLOT(slotClicked(int, QListViewItem*, const QPoint&, int ) ) ); | 405 | this, SLOT(slotClicked(int, QListViewItem*, const QPoint&, int ) ) ); |
406 | connect(m_view, SIGNAL(doubleClicked( QListViewItem* )), | ||
407 | this, SLOT(slotDoubleClicked(QListViewItem* ) ) ); | ||
408 | connect(m_view, SIGNAL(returnPressed( QListViewItem* )), | ||
409 | this, SLOT(slotDoubleClicked(QListViewItem* ) ) ); | ||
404 | } | 410 | } |
@@ -425,2 +431,22 @@ void OFileViewFileListView::slotCurrentChanged( QListViewItem* item) { | |||
425 | } | 431 | } |
432 | void OFileViewFileListView::slotDoubleClicked(QListViewItem* item ) { | ||
433 | if (!item ) return; | ||
434 | OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); | ||
435 | if (!sel->isLocked() ) { | ||
436 | QStringList str = QStringList::split("->", sel->text(1) ); | ||
437 | if (sel->isDir() ) { | ||
438 | m_currentDir = sel->directory() + "/" + str[0].stripWhiteSpace(); | ||
439 | emit selector()->dirSelected( m_currentDir ); | ||
440 | reread( m_all ); | ||
441 | }else { // file | ||
442 | //qWarning("slot Clicked"); | ||
443 | selector()->m_lneEdit->setText( str[0].stripWhiteSpace() ); | ||
444 | QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); | ||
445 | emit selector()->fileSelected( path ); | ||
446 | DocLnk lnk( path ); | ||
447 | emit selector()->fileSelected( lnk ); | ||
448 | emit selector()->ok(); | ||
449 | } | ||
450 | } // not locked | ||
451 | } | ||
426 | void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const QPoint&, int ) { | 452 | void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const QPoint&, int ) { |
@@ -437,3 +463,3 @@ void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const | |||
437 | }else { // file | 463 | }else { // file |
438 | qWarning("slot Clicked"); | 464 | //qWarning("slot Clicked"); |
439 | selector()->m_lneEdit->setText( str[0].stripWhiteSpace() ); | 465 | selector()->m_lneEdit->setText( str[0].stripWhiteSpace() ); |
diff --git a/microkde/ofileselector_p.h b/microkde/ofileselector_p.h index b371806..834fd70 100644 --- a/microkde/ofileselector_p.h +++ b/microkde/ofileselector_p.h | |||
@@ -128,2 +128,3 @@ private slots: | |||
128 | void slotClicked(int, QListViewItem*, const QPoint&, int ); | 128 | void slotClicked(int, QListViewItem*, const QPoint&, int ); |
129 | void slotDoubleClicked(QListViewItem*); | ||
129 | void slotFSActivated(int); | 130 | void slotFSActivated(int); |