[Kde-imaging] kdeextragear-libs-1/libkipi/libkipi
Renchi Raju
renchi at pooh.tam.uiuc.edu
Sat Dec 4 04:52:20 CET 2004
CVS commit by pahlibar:
select application selected collection in the image selector window at
start up. preserves BC.
CCMAIL: kde-imaging at kde.org
M +20 -2 imagedialog.cpp 1.11
M +1 -0 imagedialog.h 1.5
--- kdeextragear-libs-1/libkipi/libkipi/imagedialog.cpp #1.10:1.11
@@ -29,4 +29,5 @@
#include <qframe.h>
#include <qpushbutton.h>
+#include <qtimer.h>
// KDE includes.
@@ -168,4 +169,5 @@ ImageDialog::ImageDialog(QWidget* parent
new AlbumLVI(d->_albumList, *it);
}
+ QTimer::singleShot(0, this, SLOT(slotInitialShow()));
connect(d->_albumList, SIGNAL(selectionChanged(QListViewItem*)),
@@ -300,8 +302,24 @@ void ImageDialog::slotGotPreview(const K
void ImageDialog::slotHelp( void )
{
- KApplication::kApplication()->invokeHelp("",
- "kipi-plugins");
+ KApplication::kApplication()->invokeHelp("", "kipi-plugins");
}
+void ImageDialog::slotInitialShow()
+{
+ ImageCollection current = d->_interface->currentAlbum();
+
+ QListViewItemIterator it( d->_albumList );
+ while ( it.current() )
+ {
+ AlbumLVI* lvi = static_cast<AlbumLVI*>( it.current() );
+ if ( lvi->_album == current )
+ {
+ d->_albumList->ensureItemVisible( lvi );
+ d->_albumList->setSelected( lvi, true );
+ break;
+ }
+ ++it;
+ }
+}
} // namespace KIPI
--- kdeextragear-libs-1/libkipi/libkipi/imagedialog.h #1.4:1.5
@@ -73,4 +73,5 @@ private slots:
void slotGotPreview(const KFileItem* , const QPixmap&);
void slotHelp( void );
+ void slotInitialShow();
private:
More information about the Kde-imaging
mailing list