You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(98) |
Sep
(138) |
Oct
(100) |
Nov
(49) |
Dec
(131) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(94) |
Feb
(65) |
Mar
(100) |
Apr
(83) |
May
(72) |
Jun
(29) |
Jul
(167) |
Aug
(127) |
Sep
(131) |
Oct
(269) |
Nov
(122) |
Dec
(100) |
2005 |
Jan
(228) |
Feb
(266) |
Mar
(63) |
Apr
(135) |
May
(157) |
Jun
(52) |
Jul
(25) |
Aug
(49) |
Sep
(184) |
Oct
(159) |
Nov
(75) |
Dec
(37) |
2006 |
Jan
(60) |
Feb
(129) |
Mar
(110) |
Apr
(34) |
May
(31) |
Jun
(42) |
Jul
(72) |
Aug
(90) |
Sep
(57) |
Oct
(66) |
Nov
(42) |
Dec
(90) |
2007 |
Jan
(106) |
Feb
(54) |
Mar
(93) |
Apr
(27) |
May
(21) |
Jun
(17) |
Jul
(19) |
Aug
(22) |
Sep
(25) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2008 |
Jan
(65) |
Feb
(70) |
Mar
(29) |
Apr
(45) |
May
(91) |
Jun
(20) |
Jul
(11) |
Aug
(24) |
Sep
(23) |
Oct
(13) |
Nov
(23) |
Dec
(39) |
2009 |
Jan
(23) |
Feb
(39) |
Mar
(15) |
Apr
(56) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ck...@us...> - 2009-03-02 19:34:33
|
Revision: 6235 http://krusader.svn.sourceforge.net/krusader/?rev=6235&view=rev Author: ckarai Date: 2009-03-02 19:34:12 +0000 (Mon, 02 Mar 2009) Log Message: ----------- InterView: final Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp trunk/krusader_kde4/krusader/Panel/krinterbriefview.h trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp trunk/krusader_kde4/krusader/Panel/krmousehandler.h trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp trunk/krusader_kde4/krusader/Panel/krvfsmodel.h Modified: trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp 2009-02-27 21:58:10 UTC (rev 6234) +++ trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp 2009-03-02 19:34:12 UTC (rev 6235) @@ -34,6 +34,11 @@ #include <KMenu> #include <QPainter> #include <QScrollBar> +#include <QHeaderView> +#include <QRegion> +#include <QItemSelection> +#include <QItemSelectionRange> +#include <KMenu> // dummy. remove this class when no longer needed class KrInterBriefViewItem: public KrViewItem @@ -80,6 +85,8 @@ KrView(cfg), QAbstractItemView(parent) { + _header = 0; + // fix the context menu problem int j = QFontMetrics( font() ).height() * 2; _mouseHandler = new KrMouseHandler( this, j ); @@ -96,6 +103,7 @@ this->setModel(_model); _model->sort( KrVfsModel::Name, Qt::AscendingOrder ); _model->setExtensionEnabled( false ); + _model->setAlternatingTable( true ); connect( _model, SIGNAL( layoutChanged() ), this, SLOT( slotMakeCurrentVisible() ) ); //header()->installEventFilter( this ); @@ -107,7 +115,6 @@ setAcceptDrops( true ); setDropIndicatorShown( true ); - restoreSettings(); connect( &KrColorCache::getColorCache(), SIGNAL( colorsRefreshed() ), this, SLOT( refreshColors() ) ); } @@ -252,13 +259,24 @@ void KrInterBriefView::restoreSettings() { - /* TODO */ - _numOfColumns = 3; + _numOfColumns = _properties->numberOfColumns; + + KConfigGroup group( krConfig, nameInKConfig() ); + + int column = group.readEntry( "Sort Indicator Column", (int)KrVfsModel::Name ); + bool isAscending = group.readEntry( "Ascending Sort Order", true ); + Qt::SortOrder sortDir = isAscending ? Qt::AscendingOrder : Qt::DescendingOrder; + + _header->setSortIndicator(column, sortDir); + _model->sort( column, sortDir ); } void KrInterBriefView::saveSettings() { - /* TODO */ + KConfigGroup group( krConfig, nameInKConfig() ); + + group.writeEntry( "Sort Indicator Column", (int)_model->getLastSortOrder() ); + group.writeEntry( "Ascending Sort Order", (_model->getLastSortDir() == Qt::AscendingOrder ) ); } void KrInterBriefView::setCurrentItem(const QString& name) @@ -334,7 +352,25 @@ void KrInterBriefView::setup() { - + _header = new QHeaderView(Qt::Horizontal, this); + _header->setDefaultAlignment(Qt::AlignLeft|Qt::AlignVCenter); + _header->setParent( this ); + _header->setModel( _model ); + _header->hideSection( KrVfsModel::Mime ); + _header->hideSection( KrVfsModel::Permissions ); + _header->hideSection( KrVfsModel::KrPermissions ); + _header->hideSection( KrVfsModel::Owner ); + _header->hideSection( KrVfsModel::Group ); + _header->setStretchLastSection( true ); + _header->setResizeMode( QHeaderView::Fixed ); + _header->setClickable( true ); + _header->setSortIndicatorShown( true ); + _header->setSortIndicator(KrVfsModel::Name, Qt::AscendingOrder); + connect(_header, SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), + _model, SLOT(sort(int,Qt::SortOrder))); + _header->installEventFilter( this ); + + restoreSettings(); } void KrInterBriefView::initOperator() @@ -539,17 +575,68 @@ bool KrInterBriefView::eventFilter(QObject *object, QEvent *event) { - /* TODO */ + if( object == _header ) + { + if( event->type() == QEvent::ContextMenu ) + { + QContextMenuEvent *me = (QContextMenuEvent *)event; + showContextMenu( me->globalPos() ); + return true; + } + } return false; } void KrInterBriefView::showContextMenu( const QPoint & p ) { - /* TODO */ + KMenu popup( this ); + popup.setTitle( i18n("Columns")); + + int COL_ID = 14700; + + for( int i=1; i <= MAX_BRIEF_COLS; i++ ) + { + QAction *act = popup.addAction( QString( "%1" ).arg( i ) ); + act->setData( QVariant( COL_ID + i ) ); + act->setCheckable( true ); + act->setChecked( properties()->numberOfColumns == i ); + } + + QAction * res = popup.exec( p ); + int result= -1; + if( res && res->data().canConvert<int>() ) + result = res->data().toInt(); + + KConfigGroup group( krConfig, nameInKConfig() ); + + if( result > COL_ID && result <= COL_ID + MAX_BRIEF_COLS ) + { + group.writeEntry( "Number Of Brief Columns", result - COL_ID ); + _properties->numberOfColumns = result - COL_ID; + _numOfColumns = result - COL_ID; + updateGeometries(); + } } bool KrInterBriefView::viewportEvent ( QEvent * event ) { + if( event->type() == QEvent::ToolTip ) + { + QHelpEvent *he = static_cast<QHelpEvent*>(event); + const QModelIndex index = indexAt(he->pos()); + + if( index.isValid() ) + { + int width = visualRect( index ).width(); + int textWidth = elementWidth( index ); + + if( textWidth <= width ) + { + event->accept(); + return true; + } + } + } return QAbstractItemView::viewportEvent( event ); } @@ -609,10 +696,55 @@ return _model->index( xs + ys, 0 ); } -QModelIndex KrInterBriefView::moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers) +QModelIndex KrInterBriefView::moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers) { - /* TODO */ - return QModelIndex(); + if( _model->rowCount() == 0 ) + return QModelIndex(); + + QModelIndex current = currentIndex(); + if (!current.isValid()) + return _model->index( 0, 0 ); + + switch (cursorAction) { + case MoveLeft: + case MovePageDown: + { + int newRow = current.row() - itemsPerPage(); + if( newRow < 0 ) + newRow = 0; + return _model->index( newRow, 0 ); + } + case MoveRight: + case MovePageUp: + { + int newRow = current.row() + itemsPerPage(); + if( newRow >= _model->rowCount() ) + newRow = _model->rowCount() - 1; + return _model->index( newRow, 0 ); + } + case MovePrevious: + case MoveUp: + { + int newRow = current.row() - 1; + if( newRow < 0 ) + newRow = 0; + return _model->index( newRow, 0 ); + } + case MoveNext: + case MoveDown: + { + int newRow = current.row() + 1; + if( newRow >= _model->rowCount() ) + newRow = _model->rowCount() - 1; + return _model->index( newRow, 0 ); + } + case MoveHome: + return _model->index(0, 0); + case MoveEnd: + return _model->index(_model->rowCount() - 1, 0); + } + + return current; } int KrInterBriefView::horizontalOffset() const @@ -632,18 +764,41 @@ void KrInterBriefView::setSelection(const QRect&, QFlags<QItemSelectionModel::SelectionFlag>) { - /* TODO */ + /* Don't do anything, selections are handled by the mouse handler and not by QAbstractItemView */ } -QRegion KrInterBriefView::visualRegionForSelection(const QItemSelection&) const +QRegion KrInterBriefView::visualRegionForSelection(const QItemSelection &selection) const { - /* TODO */ - return QRegion(); + if (selection.isEmpty()) + return QRegion(); + + QRegion selectionRegion; + for (int i = 0; i < selection.count(); ++i) { + QItemSelectionRange range = selection.at(i); + if (!range.isValid()) + continue; + QModelIndex leftIndex = range.topLeft(); + if (!leftIndex.isValid()) + continue; + const QRect leftRect = visualRect(leftIndex); + int top = leftRect.top(); + QModelIndex rightIndex = range.bottomRight(); + if (!rightIndex.isValid()) + continue; + const QRect rightRect = visualRect(rightIndex); + int bottom = rightRect.bottom(); + if (top > bottom) + qSwap<int>(top, bottom); + int height = bottom - top + 1; + QRect combined = leftRect|rightRect; + combined.setX(range.left()); + selectionRegion += combined; + } + return selectionRegion; } void KrInterBriefView::paintEvent(QPaintEvent *e) { - /* TODO */ QStyleOptionViewItemV4 option = viewOptions(); option.widget = this; option.decorationSize = QSize( _fileIconSize, _fileIconSize ); @@ -652,16 +807,20 @@ QModelIndex curr = currentIndex(); + QVector<QModelIndex> intersectVector; + QRect area = e->rect(); + area.adjust( horizontalOffset(), verticalOffset(), horizontalOffset(), verticalOffset() ); + intersectionSet( area, intersectVector ); - for( int i=0; i != _model->rowCount(); i++ ) + foreach( QModelIndex mndx, intersectVector ) { option.state = QStyle::State_None; - option.rect = visualRect( _model->index( i, 0 ) ); + option.rect = visualRect( mndx ); painter.save(); - bool focus = curr.isValid() && curr.row() == i && hasFocus(); + bool focus = curr.isValid() && curr.row() == mndx.row() && hasFocus(); - itemDelegate()->paint(&painter, option, _model->index( i, 0 ) ); + itemDelegate()->paint(&painter, option, mndx ); if( focus ) { QStyleOptionFocusRect o; @@ -683,11 +842,38 @@ iconSize = _fileIconSize; if( iconSize > textHeight ) height = iconSize; + if( height == 0 ) + height++; return height; } void KrInterBriefView::updateGeometries() { + if( _header ) + { + QSize hint = _header->sizeHint(); + setViewportMargins(0, hint.height(), 0, 0); + QRect vg = viewport()->geometry(); + QRect geometryRect(vg.left(), vg.top() - hint.height(), vg.width(), hint.height()); + _header->setGeometry(geometryRect); + + int items = 0; + for( int i=0; i!= _header->count(); i++ ) + if( !_header->isSectionHidden( i ) ) + items++; + if( items == 0 ) + items++; + + int sectWidth = viewport()->width() / items; + for( int i=0; i!= _header->count(); i++ ) + if( !_header->isSectionHidden( i ) ) + _header->resizeSection( i, sectWidth ); + + QMetaObject::invokeMethod(_header, "updateGeometries"); + } + + + if (_model->rowCount() <= 0 ) horizontalScrollBar()->setRange(0, 0); else @@ -735,6 +921,8 @@ int column = _model->convertSortOrderFromKrViewProperties( mode, sortDir ); if( column == _model->getLastSortOrder() && sortDir == _model->getLastSortDir() ) sortDir = (sortDir == Qt::AscendingOrder) ? Qt::DescendingOrder : Qt::AscendingOrder; + + _header->setSortIndicator(column, sortDir); _model->sort( column, sortDir ); } @@ -755,4 +943,39 @@ } return textWidth; -} \ No newline at end of file +} + +void KrInterBriefView::intersectionSet( const QRect &rect, QVector<QModelIndex> &ndxList ) +{ + int maxNdx = _model->rowCount(); + int width = (viewport()->width())/_numOfColumns; + if( (viewport()->width())%_numOfColumns ) + width++; + + int height = getItemHeight(); + int items = viewport()->height() / height; + if( items == 0 ) + items++; + + int xmin = -1; + int ymin = -1; + int xmax = -1; + int ymax = -1; + + xmin = rect.x() / width; + ymin = rect.y() / height; + xmax = ( rect.x() + rect.width() ) / width; + if(( rect.x() + rect.width() ) % width ) + xmax++; + ymax = ( rect.y() + rect.height() ) / height; + if(( rect.y() + rect.height() ) % height ) + ymax++; + + for( int i=ymin; i < ymax; i++ ) + for( int j=xmin; j < xmax; j++ ) + { + int ndx = j * items + i; + if( ndx < maxNdx ) + ndxList.append( _model->index( ndx, 0 ) ); + } +} Modified: trunk/krusader_kde4/krusader/Panel/krinterbriefview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterbriefview.h 2009-02-27 21:58:10 UTC (rev 6234) +++ trunk/krusader_kde4/krusader/Panel/krinterbriefview.h 2009-03-02 19:34:12 UTC (rev 6235) @@ -27,6 +27,7 @@ class KrInterBriefViewItem; class KrMouseHandler; class KrVfsModel; +class QHeaderView; class KrInterBriefView : public QAbstractItemView, public KrView { friend class KrInterBriefViewItem; @@ -113,6 +114,8 @@ int getItemHeight() const; int elementWidth( const QModelIndex & index ); + void intersectionSet( const QRect &, QVector<QModelIndex> & ); + private: KrVfsModel *_model; KrMouseHandler *_mouseHandler; @@ -120,5 +123,6 @@ QFont _viewFont; int _numOfColumns; int _fileIconSize; + QHeaderView * _header; }; #endif // __krinterbriefview__ Modified: trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-27 21:58:10 UTC (rev 6234) +++ trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-03-02 19:34:12 UTC (rev 6235) @@ -511,8 +511,7 @@ { KMenu popup( this ); popup.setTitle( i18n("Columns")); -// -// bool refresh = false; + bool hasExtension = !isColumnHidden( KrVfsModel::Extension ); bool hasMime = !isColumnHidden( KrVfsModel::Mime ); bool hasSize = !isColumnHidden( KrVfsModel::Size ); Modified: trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-27 21:58:10 UTC (rev 6234) +++ trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-03-02 19:34:12 UTC (rev 6235) @@ -26,7 +26,7 @@ KrMouseHandler::KrMouseHandler( KrView * view, int contextMenuShift ) : _view( view ), _rightClickedItem( 0 ), _contextMenuTimer(), _contextMenuShift( contextMenuShift ), _singleClicked( false ), _singleClickTime(), - _renameTimer(), _dragStartPos( -1, -1 ) + _renameTimer(), _dragStartPos( -1, -1 ), _emptyContextMenu( false ) { KConfigGroup grpSvr( krConfig, "Look&Feel" ); // decide on single click/double click selection @@ -37,6 +37,7 @@ bool KrMouseHandler::mousePressEvent( QMouseEvent *e ) { + _rightClickedItem = 0; KrViewItem * item = _view->getKrViewItemAt( e->pos() ); if( !_view->isFocused() ) _view->op()->emitNeedFocus(); @@ -112,8 +113,8 @@ } } _view->setCurrentKrViewItem( item ); - handleContextMenu( item, e->globalPos() ); } + handleContextMenu( item, e->globalPos() ); e->accept(); return true; } @@ -271,23 +272,27 @@ { if (_rightClickedItem) _rightClickedItem->setSelected(true); - _view->op()->emitContextMenu( _contextMenuPoint ); + if( _emptyContextMenu ) + _view->op()->emitEmptyContextMenu( _contextMenuPoint ); + else + _view->op()->emitContextMenu( _contextMenuPoint ); } void KrMouseHandler::handleContextMenu( KrViewItem * it, const QPoint & pos ) { if ( !_view->isFocused() ) _view->op()->emitNeedFocus(); - if ( !it ) - return; - if( it->isDummy() ) - return; int i = KrSelectionMode::getSelectionHandler()->showContextMenu(); _contextMenuPoint = QPoint( pos.x(), pos.y() - _contextMenuShift ); if (i < 0) { - _view->setCurrentKrViewItem( it ); - _view->op()->emitContextMenu( _contextMenuPoint ); + if ( !it || it->isDummy() ) + _view->op()->emitEmptyContextMenu( _contextMenuPoint ); + else { + _view->setCurrentKrViewItem( it ); + _view->op()->emitContextMenu( _contextMenuPoint ); + } } else if (i > 0) { + _emptyContextMenu = !it || it->isDummy(); _contextMenuTimer.setSingleShot( true ); _contextMenuTimer.start(i); } Modified: trunk/krusader_kde4/krusader/Panel/krmousehandler.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krmousehandler.h 2009-02-27 21:58:10 UTC (rev 6234) +++ trunk/krusader_kde4/krusader/Panel/krmousehandler.h 2009-03-02 19:34:12 UTC (rev 6235) @@ -70,6 +70,7 @@ QTime _singleClickTime; QTimer _renameTimer; QPoint _dragStartPos; + bool _emptyContextMenu; }; #endif /* __KR_MOUSE_HANDLER */ Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-27 21:58:10 UTC (rev 6234) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-03-02 19:34:12 UTC (rev 6235) @@ -128,7 +128,8 @@ KrVfsModel::KrVfsModel( KrView * view ): QAbstractListModel(0), _extensionEnabled( true ), _view( view ), _lastSortOrder( KrVfsModel::Name ), _lastSortDir(Qt::AscendingOrder), - _dummyVfile( 0 ), _ready( false ), _justForSizeHint( false ) + _dummyVfile( 0 ), _ready( false ), _justForSizeHint( false ), + _alternatingTable( false ) { KConfigGroup grpSvr( krConfig, "Look&Feel" ); _defaultFont = grpSvr.readEntry( "Filelist Font", *_FilelistFont ); @@ -332,7 +333,16 @@ { KrColorItemType colorItemType; colorItemType.m_activePanel = (_view == ACTIVE_PANEL->view); - colorItemType.m_alternateBackgroundColor = (index.row() & 1); + int actRow = index.row(); + if( _alternatingTable ) + { + int itemNum = _view->itemsPerPage(); + if( itemNum == 0 ) + itemNum++; + if( ( itemNum & 1 ) == 0 ) + actRow += (actRow / itemNum ); + } + colorItemType.m_alternateBackgroundColor = (actRow & 1); colorItemType.m_currentItem = _view->getCurrentIndex() == index; colorItemType.m_selectedItem = _view->isSelected( index ); if (vf->vfile_isSymLink()) Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-27 21:58:10 UTC (rev 6234) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-03-02 19:34:12 UTC (rev 6235) @@ -36,7 +36,6 @@ inline const KrViewProperties * properties() const { return _view->properties(); } void sort() { sort( _lastSortOrder, _lastSortDir ); } void clear(); - virtual void sort ( int column, Qt::SortOrder order = Qt::AscendingOrder ); vfile * vfileAt( const QModelIndex &index ); vfile *dummyVfile() const { return _dummyVfile; } const QModelIndex & vfileIndex( vfile * ); @@ -49,7 +48,11 @@ Qt::SortOrder getLastSortDir() { return _lastSortDir; } int getLastSortOrder() { return _lastSortOrder; } + void setAlternatingTable( bool altTable ) { _alternatingTable = altTable; } +public slots: + virtual void sort ( int column, Qt::SortOrder order = Qt::AscendingOrder ); + protected: QString nameWithoutExtension( const vfile * vf, bool checkEnabled = true ) const; @@ -66,5 +69,6 @@ QFont _defaultFont; bool _justForSizeHint; int _fileIconSize; + bool _alternatingTable; }; #endif // __krvfsmodel__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-27 21:58:21
|
Revision: 6234 http://krusader.svn.sourceforge.net/krusader/?rev=6234&view=rev Author: ckarai Date: 2009-02-27 21:58:10 +0000 (Fri, 27 Feb 2009) Log Message: ----------- InterBriefView: page up, page down, left, right Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp Modified: trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp 2009-02-27 20:26:09 UTC (rev 6233) +++ trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp 2009-02-27 21:58:10 UTC (rev 6234) @@ -212,6 +212,10 @@ void KrInterBriefView::setCurrentKrViewItem(KrViewItem *item) { + if( item == 0 ) { + setCurrentIndex( QModelIndex() ); + return; + } vfile* vf = (vfile *)item->getVfile(); QModelIndex ndx = _model->vfileIndex( vf ); if( ndx.isValid() && ndx.row() != currentIndex().row() ) { @@ -282,8 +286,11 @@ } int KrInterBriefView::itemsPerPage() { - /* TODO */ - return 0; + int height = getItemHeight(); + if( height == 0 ) + height ++; + int numRows = viewport()->height() / height; + return numRows; } void KrInterBriefView::sort() @@ -341,9 +348,77 @@ { if ( !e || !_model->ready() ) return ; // subclass bug - if( handleKeyEvent( e ) ) // did the view class handled the event? - return; - QAbstractItemView::keyPressEvent( e ); + if(( e->key() != Qt::Key_Left && e->key() != Qt::Key_Right ) && + ( handleKeyEvent( e ) ) ) // did the view class handled the event? + return; + switch ( e->key() ) { + case Qt::Key_Right : + { + if ( e->modifiers() == Qt::ControlModifier ) { // let the panel handle it + e->ignore(); + break; + } + KrViewItem *i = getCurrentKrViewItem(); + KrViewItem *newCurrent = i; + + if ( !i ) + break; + + int num = itemsPerPage() + 1; + + if ( e->modifiers() & Qt::ShiftModifier ) i->setSelected( !i->isSelected() ); + + while( i && num > 0 ) + { + if ( e->modifiers() & Qt::ShiftModifier ) i->setSelected( !i->isSelected() ); + newCurrent = i; + i = getNext( i ); + num--; + } + + if( newCurrent ) { + setCurrentKrViewItem( newCurrent ); + slotMakeCurrentVisible(); + } + if ( e->modifiers() & Qt::ShiftModifier ) + op()->emitSelectionChanged(); + break; + } + case Qt::Key_Left : + { + if ( e->modifiers() == Qt::ControlModifier ) { // let the panel handle it + e->ignore(); + break; + } + KrViewItem *i = getCurrentKrViewItem(); + KrViewItem *newCurrent = i; + + if ( !i ) + break; + + int num = itemsPerPage() + 1; + + if ( e->modifiers() & Qt::ShiftModifier ) i->setSelected( !i->isSelected() ); + + while( i && num > 0 ) + { + if ( e->modifiers() & Qt::ShiftModifier ) i->setSelected( !i->isSelected() ); + newCurrent = i; + i = getPrev( i ); + num--; + } + + if( newCurrent ) { + setCurrentKrViewItem( newCurrent ); + slotMakeCurrentVisible(); + } + if ( e->modifiers() & Qt::ShiftModifier ) + op()->emitSelectionChanged(); + break; + } + default: + QAbstractItemView::keyPressEvent( e ); + } } void KrInterBriefView::mousePressEvent ( QMouseEvent * ev ) @@ -475,14 +550,12 @@ bool KrInterBriefView::viewportEvent ( QEvent * event ) { - /* TODO */ return QAbstractItemView::viewportEvent( event ); } QRect KrInterBriefView::visualRect(const QModelIndex&ndx) const { - /* TODO */ int width = (viewport()->width())/_numOfColumns; if( (viewport()->width())%_numOfColumns ) width++; Modified: trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-27 20:26:09 UTC (rev 6233) +++ trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-27 21:58:10 UTC (rev 6234) @@ -200,6 +200,10 @@ void KrInterDetailedView::setCurrentKrViewItem(KrViewItem *item) { + if( item == 0 ) { + setCurrentIndex( QModelIndex() ); + return; + } vfile* vf = (vfile *)item->getVfile(); QModelIndex ndx = _model->vfileIndex( vf ); if( ndx.isValid() && ndx.row() != currentIndex().row() ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-27 20:26:20
|
Revision: 6233 http://krusader.svn.sourceforge.net/krusader/?rev=6233&view=rev Author: ckarai Date: 2009-02-27 20:26:09 +0000 (Fri, 27 Feb 2009) Log Message: ----------- InterBriefView: focus rectangle + scrollTo Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp trunk/krusader_kde4/krusader/Panel/krinterbriefview.h Modified: trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp 2009-02-27 18:50:12 UTC (rev 6232) +++ trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp 2009-02-27 20:26:09 UTC (rev 6233) @@ -495,9 +495,27 @@ return mapToViewport(QRect( x, y, width, height )); } -void KrInterBriefView::scrollTo(const QModelIndex&, QAbstractItemView::ScrollHint) +void KrInterBriefView::scrollTo(const QModelIndex &ndx, QAbstractItemView::ScrollHint hint) { - /* TODO */ + const QRect rect = visualRect( ndx ); + if (hint == EnsureVisible && viewport()->rect().contains(rect)) { + setDirtyRegion(rect); + return; + } + + const QRect area = viewport()->rect(); + + const bool leftOf = rect.left() < area.left(); + const bool rightOf = rect.right() > area.right(); + + int horizontalValue = horizontalScrollBar()->value(); + + if (leftOf) + horizontalValue -= area.left() - rect.left(); + else if (rightOf) + horizontalValue += rect.right() - area.right(); + + horizontalScrollBar()->setValue( horizontalValue ); } QModelIndex KrInterBriefView::indexAt(const QPoint& p) const @@ -553,15 +571,33 @@ void KrInterBriefView::paintEvent(QPaintEvent *e) { /* TODO */ - QStyleOptionViewItemV4 option; + QStyleOptionViewItemV4 option = viewOptions(); option.widget = this; + option.decorationSize = QSize( _fileIconSize, _fileIconSize ); + option.decorationPosition = QStyleOptionViewItem::Left; QPainter painter( viewport() ); + QModelIndex curr = currentIndex(); + + for( int i=0; i != _model->rowCount(); i++ ) { + option.state = QStyle::State_None; option.rect = visualRect( _model->index( i, 0 ) ); painter.save(); + + bool focus = curr.isValid() && curr.row() == i && hasFocus(); + itemDelegate()->paint(&painter, option, _model->index( i, 0 ) ); + + if( focus ) { + QStyleOptionFocusRect o; + o.QStyleOption::operator=(option); + QPalette::ColorGroup cg = QPalette::Normal; + o.backgroundColor = option.palette.color(cg, QPalette::Background); + style()->drawPrimitive(QStyle::PE_FrameFocusRect, &o, &painter); + } + painter.restore(); } } @@ -628,3 +664,22 @@ sortDir = (sortDir == Qt::AscendingOrder) ? Qt::DescendingOrder : Qt::AscendingOrder; _model->sort( column, sortDir ); } + +int KrInterBriefView::elementWidth( const QModelIndex & index ) +{ + QString text = index.data( Qt::DisplayRole ).toString(); + + int textWidth = QFontMetrics( _viewFont ).width( text ); + + const int textMargin = QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1; + textWidth += 2 * textMargin; + + QVariant decor = index.data( Qt::DecorationRole ); + if( decor.isValid() && decor.type() == QVariant::Pixmap ) + { + QPixmap p = decor.value<QPixmap>(); + textWidth += p.width() + 2 * textMargin; + } + + return textWidth; +} \ No newline at end of file Modified: trunk/krusader_kde4/krusader/Panel/krinterbriefview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterbriefview.h 2009-02-27 18:50:12 UTC (rev 6232) +++ trunk/krusader_kde4/krusader/Panel/krinterbriefview.h 2009-02-27 20:26:09 UTC (rev 6233) @@ -111,6 +111,7 @@ void showContextMenu( const QPoint & p ); int getItemHeight() const; + int elementWidth( const QModelIndex & index ); private: KrVfsModel *_model; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-27 18:50:21
|
Revision: 6232 http://krusader.svn.sourceforge.net/krusader/?rev=6232&view=rev Author: ckarai Date: 2009-02-27 18:50:12 +0000 (Fri, 27 Feb 2009) Log Message: ----------- InterView: file removing bug Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-27 11:27:52 UTC (rev 6231) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-27 18:50:12 UTC (rev 6232) @@ -714,6 +714,7 @@ QModelIndex KrVfsModel::removeItem( vfile * vf ) { + QModelIndex currIndex = _view->getCurrentIndex(); for( int i=0; i != _vfiles.count(); i++ ) { if( _vfiles[ i ] == vf ) @@ -724,6 +725,19 @@ _vfiles.remove( i ); + if( currIndex.row() == i ) + { + if( _vfiles.count() == 0 ) + currIndex = QModelIndex(); + else if( i >= _vfiles.count() ) + currIndex = index( _vfiles.count() - 1, 0 ); + else + currIndex = index( i, 0 ); + } else if( currIndex.row() > i ) + { + currIndex = index( currIndex.row()-1, 0 ); + } + for (int ri = i; ri < _vfiles.count(); ++ri) { _vfileNdx[ _vfiles[ ri ] ] = index( ri, 0 ); _nameNdx[ _vfiles[ ri ]->vfile_getName() ] = index( ri, 0 ); @@ -740,14 +754,10 @@ } changePersistentIndexList(oldPersistentList, newPersistentList); emit layoutChanged(); - if( _vfiles.count() == 0 ) - return QModelIndex(); - if( i >= _vfiles.count() ) - i = _vfiles.count() - 1; - return index( i, 0 ); + return currIndex; } } - return QModelIndex(); + return currIndex; } void KrVfsModel::updateItem( vfile * vf ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cod...@us...> - 2009-02-27 11:27:54
|
Revision: 6231 http://krusader.svn.sourceforge.net/krusader/?rev=6231&view=rev Author: codeknight Date: 2009-02-27 11:27:52 +0000 (Fri, 27 Feb 2009) Log Message: ----------- I18N: Updated Italian translation (thanks Giuseppe Bordoni) Modified Paths: -------------- trunk/krusader_kde4/ChangeLog trunk/krusader_kde4/po/it.po Modified: trunk/krusader_kde4/ChangeLog =================================================================== --- trunk/krusader_kde4/ChangeLog 2009-02-27 11:10:34 UTC (rev 6230) +++ trunk/krusader_kde4/ChangeLog 2009-02-27 11:27:52 UTC (rev 6231) @@ -27,6 +27,7 @@ CHANGED: Initial Konfigurator size is now 900x680 ARCH: view properties for detailed/brief/interviews are merged into one + I18N: Updated Italian translation (thanks Giuseppe Bordoni) I18N: Updated French translation (thanks to Henry-Nicolas Tourneur and Stanislas Zeller) I18N: Updated Catalan translation (thanks to Joaquim Perez) I18N: Updated Slovak translation (thanks to Zdenko Podobný and Ondrej Pačay "Yogi" ) Modified: trunk/krusader_kde4/po/it.po =================================================================== --- trunk/krusader_kde4/po/it.po 2009-02-27 11:10:34 UTC (rev 6230) +++ trunk/krusader_kde4/po/it.po 2009-02-27 11:27:52 UTC (rev 6231) @@ -4,21 +4,21 @@ # Copyright (C) 2004-2008, Krusader Krew # This file is distributed under the same license as the Krusader package # +# # Luigi Curzi <lui...@ya...>, 2006. -# Giuseppe Bordoni <ge...@ge...>, 2003, 2004, 2005, 2006, 2007. -# +# Giuseppe Bordoni <ge...@ge...>, 2003, 2004, 2005, 2006, 2007, 2009. msgid "" msgstr "" "Project-Id-Version: krusader-2.0.0-beta2\n" "Report-Msgid-Bugs-To: kru...@go...\n" "POT-Creation-Date: 2008-12-05 21:44+0100\n" -"PO-Revision-Date: 2007-04-05 14:23+0200\n" +"PO-Revision-Date: 2009-02-26 22:44+0100\n" "Last-Translator: Giuseppe Bordoni <ge...@ge...>\n" -"Language-Team: krusader-i18n <kru...@go...>\n" +"Language-Team: Italian <kde...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.9.1\n" +"X-Generator: Lokalize 0.2\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: GUI/dirhistorybutton.cpp:36 GUI/dirhistorybutton.cpp:37 @@ -59,7 +59,7 @@ #: GUI/profilemanager.cpp:117 #, kde-format msgid "Enter the profile name:" -msgstr "Immetti il nome del profilo:" +msgstr "Inserire il nome del profilo:" #: GUI/krremoteencodingmenu.cpp:128 #, kde-format @@ -90,27 +90,27 @@ #: GUI/mediabutton.cpp:177 #, kde-format msgid "Floppy" -msgstr "Floppy" +msgstr "Dischetto" #: GUI/mediabutton.cpp:179 -#, fuzzy, kde-format +#, kde-format msgid "CD/DVD-ROM" -msgstr "Lettore CD" +msgstr "Lettore CD/DVD" #: GUI/mediabutton.cpp:181 #, kde-format msgid "USB pen drive" -msgstr "" +msgstr "Penna USB" #: GUI/mediabutton.cpp:183 #, kde-format msgid "USB device" -msgstr "" +msgstr "Periferica USB" #: GUI/mediabutton.cpp:185 #, kde-format msgid "Removable media" -msgstr "" +msgstr "Dispositivi removibili" #: GUI/mediabutton.cpp:187 #, kde-format @@ -118,24 +118,24 @@ msgstr "Disco rigido" #: GUI/mediabutton.cpp:189 -#, fuzzy, kde-format +#, kde-format msgid "Camera" -msgstr "Nome" +msgstr "Macchina fotografica" #: GUI/mediabutton.cpp:191 #, kde-format msgid "Video CD/DVD-ROM" -msgstr "" +msgstr "CD/DVD-ROM video" #: GUI/mediabutton.cpp:193 #, kde-format msgid "Audio CD/DVD-ROM" -msgstr "" +msgstr "CD/DVD-ROM audio" #: GUI/mediabutton.cpp:195 #, kde-format msgid "Recordable CD/DVD-ROM" -msgstr "" +msgstr "CD/DVD-ROM registrabile" #: GUI/mediabutton.cpp:325 Panel/krpopupmenu.cpp:69 #: BookMan/krbookmarkhandler.cpp:557 @@ -169,12 +169,12 @@ #: GUI/mediabutton.cpp:423 #, kde-format msgid "An error occurred while accessing '%1', the system responded: %2" -msgstr "" +msgstr "Si è verificato un errore accedendo a '%1', il sistema ha risposto: %2" #: GUI/mediabutton.cpp:426 #, kde-format msgid "An error occurred while accessing '%1'" -msgstr "" +msgstr "Si è verificato un errore accedendo a '%1'" #: GUI/syncbrowsebutton.cpp:45 GUI/syncbrowsebutton.cpp:48 #, kde-format @@ -183,7 +183,7 @@ "When active, each directory change is performed in the\n" "active and inactive panel - if possible." msgstr "" -"Questo bottone commuta la modalità sincronizzazione navigazione.\n" +"Questo pulsante commuta la modalità sincronizzazione navigazione.\n" "Se attivo, ogni modifica alla directory è eseguita nel\n" "pannello attivo e, se possibile, in quello inattivo." @@ -390,7 +390,7 @@ "%1" #: VFS/preserveattrcopyjob.cpp:334 VFS/virtualcopyjob.cpp:389 -#, fuzzy, kde-format +#, kde-format msgctxt "@title job" msgid "Moving" msgstr "Spostamento file" @@ -399,29 +399,29 @@ #: VFS/preserveattrcopyjob.cpp:349 VFS/preserveattrcopyjob.cpp:373 #: VFS/kiojobwrapper.cpp:221 VFS/virtualcopyjob.cpp:384 #: VFS/virtualcopyjob.cpp:390 -#, fuzzy, kde-format +#, kde-format msgid "Source" -msgstr "Sorgente:" +msgstr "Sorgente" #: VFS/preserveattrcopyjob.cpp:336 VFS/preserveattrcopyjob.cpp:343 #: VFS/preserveattrcopyjob.cpp:350 VFS/preserveattrcopyjob.cpp:374 #: VFS/virtualcopyjob.cpp:385 VFS/virtualcopyjob.cpp:391 -#, fuzzy, kde-format +#, kde-format msgid "Destination" -msgstr "Destinazione:" +msgstr "Destinazione" #: VFS/preserveattrcopyjob.cpp:341 VFS/preserveattrcopyjob.cpp:348 #: VFS/preserveattrcopyjob.cpp:372 VFS/virtualcopyjob.cpp:383 -#, fuzzy, kde-format +#, kde-format msgctxt "@title job" msgid "Copying" msgstr "Copia file" #: VFS/preserveattrcopyjob.cpp:361 -#, fuzzy, kde-format +#, kde-format msgctxt "@title job" msgid "Creating directory" -msgstr "Directory superiore" +msgstr "Creazione directory" #: VFS/preserveattrcopyjob.cpp:362 Panel/krinterview.cpp:205 #: Panel/krbriefview.cpp:226 Panel/krdetailedview.cpp:317 @@ -431,9 +431,9 @@ msgstr "Directory" #: VFS/preserveattrcopyjob.cpp:793 -#, fuzzy, kde-format +#, kde-format msgid "Folder Already Exists" -msgstr "Il file già esiste" +msgstr "La directory esiste già" #: VFS/preserveattrcopyjob.cpp:1074 VFS/preserveattrcopyjob.cpp:1594 #: Synchronizer/synchronizer.cpp:1171 Synchronizer/synchronizer.cpp:1181 @@ -442,9 +442,9 @@ msgstr "Il file già esiste" #: VFS/preserveattrcopyjob.cpp:1074 VFS/preserveattrcopyjob.cpp:1594 -#, fuzzy, kde-format +#, kde-format msgid "Already Exists as Folder" -msgstr "Il file già esiste" +msgstr "Esiste già come directory" #: VFS/normal_vfs.cpp:98 #, kde-format @@ -499,24 +499,24 @@ msgstr "Stato" #: VFS/kiojobwrapper.cpp:187 -#, fuzzy, kde-format +#, kde-format msgid "Directory Size" -msgstr "Directory" +msgstr "Dimensione directory" #: VFS/kiojobwrapper.cpp:190 -#, fuzzy, kde-format +#, kde-format msgid "Copy" -msgstr " Copia" +msgstr "Copia" #: VFS/kiojobwrapper.cpp:193 -#, fuzzy, kde-format +#, kde-format msgid "Move" -msgstr " Sposta" +msgstr "Sposta" #: VFS/kiojobwrapper.cpp:220 -#, fuzzy, kde-format +#, kde-format msgid "Target" -msgstr "Tar" +msgstr "Destinazione" #: VFS/krquery.cpp:159 Filter/generalfilter.cpp:142 #: Konfigurator/konfigurator.cpp:159 @@ -670,60 +670,55 @@ #: Filter/generalfilter.cpp:56 msgid "Any Character" -msgstr "" +msgstr "Qualsiasi carattere" #: Filter/generalfilter.cpp:57 -#, fuzzy msgid "Start of Line" -msgstr "All'avvio usa il profilo:" +msgstr "Inizio riga" #: Filter/generalfilter.cpp:58 msgid "End of Line" -msgstr "" +msgstr "Fine riga" #: Filter/generalfilter.cpp:59 msgid "Set of Characters" -msgstr "" +msgstr "Set di caratteri" #: Filter/generalfilter.cpp:60 msgid "Repeats, Zero or More Times" -msgstr "" +msgstr "Ripetuto, zero o più volte" #: Filter/generalfilter.cpp:61 msgid "Repeats, One or More Times" -msgstr "" +msgstr "Ripetuto, uno o più volte" #: Filter/generalfilter.cpp:62 -#, fuzzy msgid "Optional" -msgstr "&Opzioni" +msgstr "&Opzionale" #: Filter/generalfilter.cpp:63 msgid "Escape" -msgstr "" +msgstr "Esc" #: Filter/generalfilter.cpp:64 msgid "TAB" -msgstr "" +msgstr "Tabulazione" #: Filter/generalfilter.cpp:65 -#, fuzzy msgid "Newline" -msgstr "Nuovo collegamento" +msgstr "Nuova riga" #: Filter/generalfilter.cpp:66 msgid "Carriage Return" -msgstr "" +msgstr "Ritorno carrello" #: Filter/generalfilter.cpp:67 -#, fuzzy msgid "White Space" -msgstr "Bianco" +msgstr "Spazio bianco" #: Filter/generalfilter.cpp:68 -#, fuzzy msgid "Digit" -msgstr "Destra" +msgstr "Cifra" #: Filter/generalfilter.cpp:101 #, kde-format @@ -733,7 +728,7 @@ #: Filter/generalfilter.cpp:108 #, kde-format msgid "&Case sensitive" -msgstr "&Maiuscolo/minuscolo" +msgstr "&Distingui maiuscole" #: Filter/generalfilter.cpp:113 #, kde-format @@ -837,12 +832,12 @@ #: Filter/generalfilter.cpp:265 #, kde-format msgid "RegExp" -msgstr "" +msgstr "Espr. Reg." #: Filter/generalfilter.cpp:286 -#, fuzzy, kde-format +#, kde-format msgid "Encoding:" -msgstr " Modifica" +msgstr "Codifica:" #: Filter/generalfilter.cpp:301 #, kde-format @@ -852,7 +847,7 @@ #: Filter/generalfilter.cpp:309 #, kde-format msgid "Cas&e sensitive" -msgstr "&Maiuscolo/minuscolo" +msgstr "&Distingui maiuscole" #: Filter/generalfilter.cpp:327 #, kde-format @@ -1056,7 +1051,7 @@ "date (use the date button for easy access)." msgstr "" "La data %1 non è valida secondo le tue impostazioni. Per favore inserisci " -"una data valida (per semplicità si può usare il bottone 'data')." +"una data valida (per semplicità si può usare il pulsante 'data')." #: Filter/advancedfilter.cpp:531 #, kde-format @@ -1069,7 +1064,8 @@ "Please re-enter the values, so that the left side size will be smaller than " "(or equal to) the right side size." msgstr "" -"Per favore immetti i valori in modo che la dimensione di sinistrasia minore " +"Per favore inserisci i valori in modo che la dimensione di sinistrasia " +"minore " "o uguale a quella di destra." #: Filter/advancedfilter.cpp:552 Filter/advancedfilter.cpp:622 @@ -1085,7 +1081,8 @@ "date." msgstr "" "La data nella parte sinistra è precedente alla data di destra. Per favore " -"immetti di nuovo le date in modo che la data di sinistra sia più recente di " +"inserisci di nuovo le date in modo che la data di sinistra sia più recente " +"di " "quella di destra." #: Filter/advancedfilter.cpp:623 @@ -1094,7 +1091,8 @@ "The date on top is later than the date on the bottom. Please re-enter the " "dates, so that the top date will be earlier than the bottom date." msgstr "" -"La data in alto è precedente alla data in basso. Per favore immetti di nuovo " +"La data in alto è precedente alla data in basso. Per favore inserisci di " +"nuovo " "le date in modo che la data in alto sia più recente di quella in basso." #: UserAction/expander.cpp:58 @@ -1117,7 +1115,7 @@ #: UserAction/expander.cpp:804 #, kde-format msgid "Automatically escape spaces" -msgstr "Escape automatico degli spazi" +msgstr "Esclusione automatica degli spazi" #: UserAction/expander.cpp:383 #, kde-format @@ -1220,7 +1218,7 @@ #: UserAction/expander.cpp:572 #, kde-format msgid "Expander: at least 1 parameter is required for Goto!" -msgstr "" +msgstr "Almeno un paramentro è necessario per Goto!" #: UserAction/expander.cpp:603 #, kde-format @@ -1245,7 +1243,7 @@ #: UserAction/expander.cpp:614 #, kde-format msgid "Expander: at least 1 parameter is required for Ask!" -msgstr "" +msgstr "Almeno un paramentro è necessario per Ask!" #: UserAction/expander.cpp:619 #, kde-format @@ -1270,7 +1268,7 @@ #: UserAction/expander.cpp:653 #, kde-format msgid "Expander: at least 1 parameter is required for Clipboard!" -msgstr "" +msgstr "Almeno un paramentro è necessario per Clipboard!" #: UserAction/expander.cpp:659 #, kde-format @@ -1290,7 +1288,7 @@ #: UserAction/expander.cpp:680 #, kde-format msgid "Expander: at least 2 parameter is required for Copy!" -msgstr "" +msgstr "Almeno due paramentri sono necessari per Copy!" #: UserAction/expander.cpp:687 #, kde-format @@ -1320,7 +1318,7 @@ #: UserAction/expander.cpp:716 #, kde-format msgid "Expander: at least 2 parameter is required for Move!" -msgstr "" +msgstr "Almeno due paramentri sono necessari per Move!" #: UserAction/expander.cpp:723 #, kde-format @@ -1479,19 +1477,19 @@ msgstr "Identificatore di pannello errato %1 nel segnaposto %2" #: UserAction/expander.cpp:1111 -#, fuzzy, kde-format +#, kde-format msgid "Error: unterminated % in Expander::expandCurrent" -msgstr "Errore: simbolo % non terminato in Expander::expandCurrent" +msgstr "Errore: testo non racchiuso tra i simboli '%'" #: UserAction/expander.cpp:1141 #, kde-format msgid "Error: unrecognized %%%1%2%% in Expander::expand" -msgstr "Errore: %%%1%2%% non riconosciuto in Expander::expand" +msgstr "Errore: %%%1%2%% non riconosciuto" #: UserAction/expander.cpp:1179 #, kde-format msgid "Error: missing ')' in Expander::separateParameter" -msgstr "Errore: ')' mancante in Expander::separateParameter" +msgstr "Errore: ')' mancante" #: UserAction/useractionpopupmenu.cpp:23 Panel/krpopupmenu.cpp:123 #: Konfigurator/konfigurator.cpp:165 @@ -1630,7 +1628,7 @@ #: UserAction/useraction.cpp:169 #, kde-format msgid "The actionfile's root-element isn't called " -msgstr "" +msgstr "L'elemento iniziale del file 'Menu utente' non è stato chiamato" #: UserAction/useraction.cpp:181 #, kde-format @@ -1653,9 +1651,9 @@ msgstr "Menu utente - azione non valida" #: Panel/krinterview.cpp:58 -#, fuzzy, kde-format +#, kde-format msgid "&Experimental View" -msgstr "Vista &dettagliata" +msgstr "Vista s&perimentale" #: Panel/krdetailedviewitem.cpp:79 Panel/krdetailedviewitem.cpp:113 #: Synchronizer/synchronizergui.cpp:2064 Synchronizer/synchronizergui.cpp:2071 @@ -1705,7 +1703,7 @@ "edit bookmarks or add subfolder to the list." msgstr "" "Apre il menu con i segnalibri. Si può anche aggiungere la posizione attuale " -"alla lista, modificare i segnalibri o aggiungere sottocategorie alla lista." +"alla lista, modificare i segnalibri o aggiungere sotto-cartella alla lista." #: Panel/listpanel.cpp:166 #, kde-format @@ -1719,7 +1717,7 @@ #: Panel/listpanel.cpp:182 Panel/listpanel.cpp:379 #, kde-format msgid "Open the popup panel" -msgstr "Apri il pannello popup" +msgstr "Apri il pannello a comparsa" #: Panel/listpanel.cpp:201 #, kde-format @@ -1733,7 +1731,7 @@ "Name of directory where you are. You can also enter name of desired location " "to move there. Use of Net protocols like ftp or fish is possible." msgstr "" -"Nome della directory nella quale si è. Si può anche immettere il nome della " +"Nome della directory nella quale si è. Si può anche inserire il nome della " "posizione desiderata per spostarcisi. Usare i protocolli di rete come ftp o " "fish se possibile." @@ -1780,7 +1778,7 @@ #: Panel/listpanel.cpp:373 #, kde-format msgid "Close the popup panel" -msgstr "Chiudi il pannello popup" +msgstr "Chiudi il pannello a comparsa" #: Panel/listpanel.cpp:477 Panel/listpanel.cpp:863 #, kde-format @@ -2179,7 +2177,7 @@ #: Panel/krpopupmenu.cpp:231 #, kde-format msgid "Folder..." -msgstr "Cartella..." +msgstr "Directory..." #: Panel/krpopupmenu.cpp:232 #, kde-format @@ -2210,7 +2208,7 @@ #: Panel/panelfunc.cpp:296 #, kde-format msgid "Please enter the new link destination:" -msgstr "Per favore immetti la destinazione del nuovo collegamento:" +msgstr "Per favore inserisci la destinazione del nuovo collegamento:" #: Panel/panelfunc.cpp:303 #, kde-format @@ -2334,7 +2332,7 @@ msgstr "&Cestino" #: Panel/panelfunc.cpp:691 -#, fuzzy, kde-format +#, kde-format msgid "" "Do you really want to delete this virtual item (physical files stay " "untouched)?" @@ -2356,7 +2354,7 @@ msgstr "&Elimina" #: Panel/panelfunc.cpp:694 -#, fuzzy, kde-format +#, kde-format msgid "" "<qt>Do you really want to delete this item <b>physically</b> (not just " "removing it from the virtual items)?</qt>" @@ -2451,7 +2449,7 @@ #: Panel/panelfunc.cpp:983 #, kde-format msgid "%1, test failed!" -msgstr "%1, test fallito!" +msgstr "%1, test non riuscito!" #: Panel/panelfunc.cpp:999 #, kde-format @@ -2481,104 +2479,106 @@ msgstr "Non è possibile copiare un URL virtuale negli appunti!" #: Queue/queuewidget.cpp:128 Queue/queuedialog.cpp:156 -#, fuzzy, kde-format +#, kde-format msgid "Queue Manager" -msgstr "Nome interrogazione" +msgstr "Gestione code" #: Queue/queuewidget.cpp:144 #, kde-format msgid "Deleting this job will abort the pending job. Do you wish to continue?" msgstr "" +"Cancellando questo lavoro verrà interrotto il lavoro in attesa. Vuoi " +"continuare?" #: Queue/queue_mgr.cpp:9 -#, fuzzy, kde-format +#, kde-format msgid "default" -msgstr "Valori predefiniti" +msgstr "predefinito" #: Queue/queuedialog.cpp:103 Queue/queuedialog.cpp:134 #: Queue/queuedialog.cpp:389 -#, fuzzy, kde-format +#, kde-format msgid "Krusader::Queue Manager" -msgstr "Krusader::Localizza" +msgstr "Krusader::Gestione code" #: Queue/queuedialog.cpp:110 -#, fuzzy, kde-format +#, kde-format msgid "Please enter the time to start processing the queue:" -msgstr "Per favore immetti la destinazione del nuovo collegamento:" +msgstr "Per favore inserisci quando iniziare l'elaborazione della coda:" #: Queue/queuedialog.cpp:179 -#, fuzzy, kde-format +#, kde-format msgid "Create a new queue (Ctrl+T)" -msgstr "Crea un nuovo collegamento a: " +msgstr "Crea una nuova coda (Ctrl+T)" #: Queue/queuedialog.cpp:185 -#, fuzzy, kde-format +#, kde-format msgid "Remove the current queue (Ctrl+W)" -msgstr "memorizza la selezione attuale" +msgstr "Rimuove la coda attuale (Ctrl+W)" #: Queue/queuedialog.cpp:198 Queue/queuedialog.cpp:427 -#, fuzzy, kde-format +#, kde-format msgid "unused" -msgstr "Aggiungi" +msgstr "inutilizzato" #: Queue/queuedialog.cpp:204 #, kde-format msgid "Schedule queue starting (Ctrl+S)" -msgstr "" +msgstr "Pianifica avvio coda (Ctrl+S)" #: Queue/queuedialog.cpp:343 #, kde-format msgid "Start processing the queue (Ctrl+P)" -msgstr "" +msgstr "Avvia elaborazione della coda (Ctrl+P)" #: Queue/queuedialog.cpp:346 #, kde-format msgid "The queue is paused." -msgstr "" +msgstr "La coda è in pausa." #: Queue/queuedialog.cpp:348 #, kde-format msgid "Scheduled to start at %1." -msgstr "" +msgstr "Avvio pianificato: %1." #: Queue/queuedialog.cpp:351 #, kde-format msgid "The queue is running." -msgstr "" +msgstr "La coda è in elaborazione." #: Queue/queuedialog.cpp:353 #, kde-format msgid "Pause processing the queue (Ctrl+P)" -msgstr "" +msgstr "Metti in pausa l'elaborazione della coda (Ctrl+P)" #: Queue/queuedialog.cpp:390 -#, fuzzy, kde-format +#, kde-format msgid "Please enter the name of the new queue" -msgstr "Per favore imposta un nome univoco per il Menu utente" +msgstr "Per favore inserisci il nome della nuova coda" #: Queue/queuedialog.cpp:399 #, kde-format msgid "A queue already exists with this name!" -msgstr "" +msgstr "Una coda con questo nome già esiste!" #: Queue/queuedialog.cpp:411 -#, fuzzy, kde-format +#, kde-format msgid "" "Deleting the queue requires aborting all pending jobs. Do you wish to " "continue?" msgstr "" -"Entrare nella directory superiore richiede di caricare il contenuto dello " -"URL \"%1\". Vuoi continuare?" +"Cancellando la coda saranno interrotti tutti i lavori. " +"Vuoi continuare?" #: Queue/queue.cpp:66 #, kde-format msgid "An error occurred during processing the queue.\n" -msgstr "" +msgstr "Si è verificato un errore durante l'elaborazione della coda.\n" #: Queue/queue.cpp:68 #, kde-format msgid "The last processed element in the queue was aborted.\n" -msgstr "" +msgstr "L'ultimo elemento elaborato nella coda è stato interrotto.\n" #: Queue/queue.cpp:69 #, kde-format @@ -2586,16 +2586,18 @@ "Do you wish to continue with the next element, delete the queue or suspend " "the queue?" msgstr "" +"Vuoi continuare con il prossimo elemento, cancellare la coda o sospendere " +"la coda?" #: Queue/queue.cpp:71 -#, fuzzy, kde-format +#, kde-format msgid "Krusader::Queue" -msgstr "Krusader::Localizza" +msgstr "Krusader::Coda" #: Queue/queue.cpp:72 -#, fuzzy, kde-format +#, kde-format msgid "Suspend" -msgstr "Aggiungi" +msgstr "Sospendi" #: Locate/locate.cpp:121 Locate/locate.cpp:125 Locate/locate.cpp:392 #, kde-format @@ -2636,7 +2638,7 @@ #: Locate/locate.cpp:171 #, kde-format msgid "Case Sensitive" -msgstr "Maiuscolo/minuscolo" +msgstr "Distingui maiuscole" #: Locate/locate.cpp:183 #, kde-format @@ -2681,9 +2683,9 @@ msgstr "Modifica (F4)" #: Locate/locate.cpp:396 Search/krsearchdialog.cpp:626 -#, fuzzy, kde-format +#, kde-format msgid "Compare by content (F10)" -msgstr "Confronta per contenuto" +msgstr "Confronta per contenuto (F10)" #: Locate/locate.cpp:401 #, kde-format @@ -2995,7 +2997,7 @@ #: krusader.cpp:735 #, kde-format msgid "&Queue Manager..." -msgstr "" +msgstr "Gestione &Code..." #: krusader.cpp:736 #, kde-format @@ -3096,7 +3098,7 @@ #: krusader.cpp:761 #, kde-format msgid "Toggle Popup Panel" -msgstr "Commuta pannello popup" +msgstr "Commuta pannello a comparsa" #: krusader.cpp:762 krusaderview.cpp:303 #, kde-format @@ -3166,14 +3168,14 @@ msgstr "Modifica file" #: krusader.cpp:785 -#, fuzzy, kde-format +#, kde-format msgid "Copy by queue..." -msgstr "Copia..." +msgstr "Copia da coda..." #: krusader.cpp:786 -#, fuzzy, kde-format +#, kde-format msgid "Move by queue..." -msgstr "Sposta..." +msgstr "Sposta da coda..." #: krusader.cpp:787 #, kde-format @@ -3387,7 +3389,7 @@ msgstr "" "Siccome hai scelto di cercare anche negli archivi, nota la seguente " "limitazione:\n" -"Non è possibile cercare del testo (grep) con una ricerca che include gli " +"non è possibile cercare del testo (grep) con una ricerca che include gli " "archivi." #: Search/krsearchdialog.cpp:503 @@ -3500,7 +3502,7 @@ #: BookMan/kraddbookmarkdlg.cpp:20 BookMan/kraddbookmarkdlg.cpp:118 #, kde-format msgid "New Folder" -msgstr "Nuova directory" +msgstr "Nuova cartella" #: BookMan/kraddbookmarkdlg.cpp:34 DiskUsage/diskusage.cpp:1081 #, kde-format @@ -3518,9 +3520,9 @@ msgstr "Crea in: " #: BookMan/kraddbookmarkdlg.cpp:74 -#, fuzzy, kde-format +#, kde-format msgid "Folders" -msgstr "Cartella..." +msgstr "Cartelle" #: BookMan/kraddbookmarkdlg.cpp:118 #, kde-format @@ -3528,15 +3530,15 @@ msgstr "Nome cartella:" #: MountMan/kmountman.cpp:203 -#, fuzzy, kde-format +#, kde-format msgid "" "<qt>Error ejecting device!\n" " You have to configure the path to the 'eject' tool. Please check the " "<b>Dependencies</b> page in Krusader's settings.</qt>" msgstr "" -"<qt>Krusader non riesce a trovare uno strumento per i checksum che gestisca %" -"1. Per favore controllare la pagina <b>Dipendenze</b> nelle impostazioni di " -"Krusader.</qt>" +"<qt>Errore espellendo il supporto!\n" +"Devi configurare il percorso dello strumento 'eject'. Per favore controlla " +"la pagina <b>Dipendenze</b> nelle impostazioni di Krusader.</qt>" #: MountMan/kmountman.cpp:233 #, kde-format @@ -3569,9 +3571,9 @@ msgstr "MountMan non è operativo. Siamo spiacenti." #: MountMan/kmountmangui.cpp:65 -#, fuzzy, kde-format +#, kde-format msgid "Mount.Man" -msgstr "MountMan" +msgstr "Mount.Man" #: MountMan/kmountmangui.cpp:72 Synchronizer/synchronizedialog.cpp:126 #, kde-format @@ -3604,9 +3606,9 @@ msgstr "Spazio libero %" #: MountMan/kmountmangui.cpp:164 -#, fuzzy, kde-format +#, kde-format msgid "MountMan.Info" -msgstr "MountMan" +msgstr "MountMan.Info" #: MountMan/kmountmangui.cpp:214 MountMan/kmountmangui.cpp:332 #, kde-format @@ -3662,9 +3664,10 @@ "(c) 2000-2003, Shie Erlich, Rafi Yanai\n" "(c) 2004-2008, Krusader Krew" msgstr "" +"(c) 2000-2003, Shie Erlich, Rafi Yanai\n" +"(c) 2004-2008, Krusader Krew" #: main.cpp:112 -#, fuzzy msgid "" "Feedback:\n" "http://www.krusader.org/phpBB/\n" @@ -3672,7 +3675,7 @@ "IRC\n" "server: irc.freenode.net, channel: #krusader" msgstr "" -"Commenti\n" +"Commenti:\n" "http://www.krusader.org/phpBB/\n" "\n" "IRC\n" @@ -3680,463 +3683,455 @@ #: main.cpp:115 msgid "Rafi Yanai" -msgstr "" +msgstr "Rafi Yanai" #: main.cpp:115 main.cpp:116 -#, fuzzy msgid "Author" -msgstr "ore" +msgstr "Autore" #: main.cpp:116 msgid "Shie Erlich" -msgstr "" +msgstr "Shie Erlich" #: main.cpp:117 msgid "Karai Csaba" -msgstr "" +msgstr "Karai Csaba" #: main.cpp:117 main.cpp:118 main.cpp:119 main.cpp:120 msgid "Developer" -msgstr "" +msgstr "Sviluppatore" #: main.cpp:118 msgid "Heiner Eichmann" -msgstr "" +msgstr "Heiner Eichmann" #: main.cpp:119 msgid "Jonas Bähr" -msgstr "" +msgstr "Jonas Bähr" #: main.cpp:120 main.cpp:125 msgid "Václav Jůza" -msgstr "" +msgstr "Václav Jůza" #: main.cpp:121 main.cpp:154 msgid "Dirk Eschler" -msgstr "" +msgstr "Dirk Eschler" #: main.cpp:121 msgid "Webmaster and i18n coordinator" -msgstr "" +msgstr "Webmaster e coordinatore i18n" #: main.cpp:122 main.cpp:150 msgid "Frank Schoolmeesters" -msgstr "" +msgstr "Frank Schoolmeesters" #: main.cpp:122 msgid "Documentation and marketing coordinator" -msgstr "" +msgstr "Documentazione e coordinatore marketing" #: main.cpp:123 msgid "Richard Holt" -msgstr "" +msgstr "Richard Holt" #: main.cpp:123 msgid "Documentation & Proofing" -msgstr "" +msgstr "Documentazione e prove" #: main.cpp:124 main.cpp:170 msgid "Matej Urbancic" -msgstr "" +msgstr "Matej Urbancic" #: main.cpp:124 msgid "Marketing & Product Research" -msgstr "" +msgstr "Marketing e Ricerca prodotto" #: main.cpp:125 main.cpp:126 main.cpp:137 msgid "QA, bug-hunting, patches and general help" -msgstr "" +msgstr "Assicurazione Qualità, ricerca errori, correzioni ed aiuto in generale" #: main.cpp:126 msgid "Jiří Paleček" -msgstr "" +msgstr "Jiří Paleček" #: main.cpp:127 msgid "Jiří Klement" -msgstr "" +msgstr "Jiří Klement" #: main.cpp:127 msgid "Important help in KDE 4 porting" -msgstr "" +msgstr "Importante aiuto nel passaggio a KDE 4" #: main.cpp:128 msgid "Andrew Neupokoev" -msgstr "" +msgstr "Andrew Neupokoev" #: main.cpp:128 msgid "Killer Logo and Icons for Krusader (contest winner)" -msgstr "" +msgstr "Killer logo ed icone per Krusader (vincitore del concorso)" #: main.cpp:129 msgid "The UsefulArts Organization" -msgstr "" +msgstr "The UsefulArts Organization" #: main.cpp:129 -#, fuzzy msgid "Icon for krusader" -msgstr "Configura &Krusader..." +msgstr "Icona di Krusader" #: main.cpp:130 msgid "Gábor Lehel" -msgstr "" +msgstr "Gábor Lehel" #: main.cpp:130 msgid "Viewer module for 3rd Hand" -msgstr "" +msgstr "Modulo visualizzatore per pannello a comparsa" #: main.cpp:131 msgid "Mark Eatough" -msgstr "" +msgstr "Mark Eatough" #: main.cpp:131 msgid "Handbook Proof-Reader" -msgstr "" +msgstr "Revisione manuale" #: main.cpp:132 msgid "Jan Halasa" -msgstr "" +msgstr "Jan Halasa" #: main.cpp:132 msgid "The old Bookmark Module" -msgstr "" +msgstr "Il vecchio gestore dei segnalibri" #: main.cpp:133 msgid "Hans Löffler" -msgstr "" +msgstr "Hans Löffler" #: main.cpp:133 msgid "Dir history button" -msgstr "" +msgstr "Il pulsante cronologia delle directory" #: main.cpp:134 msgid "Szombathelyi György" -msgstr "" +msgstr "Szombathelyi György" #: main.cpp:134 msgid "ISO KIO slave" -msgstr "" +msgstr "KIO slave ISO" #: main.cpp:135 msgid "Jan Willem van de Meent (Adios)" -msgstr "" +msgstr "Jan Willem van de Meent (Adios)" #: main.cpp:135 -#, fuzzy msgid "Icons for Krusader" -msgstr "Configura &Krusader..." +msgstr "Icone di Krusader" #: main.cpp:136 msgid "Mikolaj Machowski" -msgstr "" +msgstr "Mikolaj Machowski" #: main.cpp:136 msgid "Usability and QA" -msgstr "" +msgstr "Usabilità e Assicurazione Qualità" #: main.cpp:137 msgid "Cristi Dumitrescu" -msgstr "" +msgstr "Cristi Dumitrescu" #: main.cpp:138 msgid "Aurelien Gateau" -msgstr "" +msgstr "Aurelien Gateau" #: main.cpp:138 -#, fuzzy msgid "patch for KViewer" -msgstr "Ricerca file" +msgstr "Correzioni di KViewer" #: main.cpp:139 msgid "Milan Brabec" -msgstr "" +msgstr "Milan Brabec" #: main.cpp:139 msgid "the first patch ever !" -msgstr "" +msgstr "La prima correzione in assoluto!" #: main.cpp:140 msgid "Asim Husanovic" -msgstr "" +msgstr "Asim Husanovic" #: main.cpp:140 msgid "Bosnian translation" -msgstr "" +msgstr "Traduzione Bosniaco" #: main.cpp:141 msgid "Doutor Zero" -msgstr "" +msgstr "Doutor Zero" #: main.cpp:141 -#, fuzzy msgid "Brazilian Portuguese translation" -msgstr "Importa Menu utente" +msgstr "Traduzione Portoghese Brasialiano" #: main.cpp:142 msgid "Milen Ivanov" -msgstr "" +msgstr "Milen Ivanov" #: main.cpp:142 msgid "Bulgarian translation" -msgstr "" +msgstr "Traduzione Bulgaro" #: main.cpp:143 msgid "Quim Perez" -msgstr "" +msgstr "Quim Perez" #: main.cpp:143 msgid "Catalan translation" -msgstr "" +msgstr "Traduzione Catalano" #: main.cpp:144 msgid "Jinghua Luo" -msgstr "" +msgstr "Jinghua Luo" #: main.cpp:144 msgid "Chinese Simplified translation" -msgstr "" +msgstr "Traduzione Cinese semplificato" #: main.cpp:145 -#, fuzzy msgid "Mitek" -msgstr "Titolo" +msgstr "Mitek" #: main.cpp:145 main.cpp:146 msgid "Old Czech translation" -msgstr "" +msgstr "Vecchia traduzione Ceco" #: main.cpp:146 msgid "Martin Sixta" -msgstr "" +msgstr "Martin Sixta" #: main.cpp:147 msgid "Vaclav Jůza" -msgstr "" +msgstr "Vaclav Jůza" #: main.cpp:147 msgid "Czech translation" -msgstr "" +msgstr "Traduzione Ceco" #: main.cpp:148 msgid "Anders Bruun Olsen" -msgstr "" +msgstr "Anders Bruun Olsen" #: main.cpp:148 msgid "Old Danish translation" -msgstr "" +msgstr "Vecchia traduzione Danese" #: main.cpp:149 msgid "Peter H. Sorensen" -msgstr "" +msgstr "Peter H. Sorensen" #: main.cpp:149 -#, fuzzy msgid "Danish translation" -msgstr "Destinazione:" +msgstr "Traduzione Danese" #: main.cpp:150 msgid "Dutch translation" -msgstr "" +msgstr "Traduzione Olandese" #: main.cpp:151 msgid "Rene-Pierre Lehmann" -msgstr "" +msgstr "Rene-Pierre Lehmann" #: main.cpp:151 msgid "Old French translation" -msgstr "" +msgstr "Vecchia traduzione Francese" #: main.cpp:152 msgid "David Guillerm" -msgstr "" +msgstr "David Guillerm" #: main.cpp:152 msgid "French translation" -msgstr "" +msgstr "Traduzione Francese" #: main.cpp:153 msgid "Christoph Thielecke" -msgstr "" +msgstr "Christoph Thielecke" #: main.cpp:153 msgid "Old German translation" -msgstr "" +msgstr "Vecchia traduzione Tedesco" #: main.cpp:154 msgid "German translation" -msgstr "" +msgstr "Traduzione Tedesco" #: main.cpp:155 msgid "Spiros Georgaras" -msgstr "" +msgstr "Spiros Georgaras" #: main.cpp:155 msgid "Greek translation" -msgstr "" +msgstr "Traduzione Greco" #: main.cpp:156 msgid "Kukk Zoltan" -msgstr "" +msgstr "Kukk Zoltan" #: main.cpp:156 msgid "Old Hungarian translation" -msgstr "" +msgstr "Vecchia traduzione Ungherese" #: main.cpp:157 msgid "Arpad Biro" -msgstr "" +msgstr "Arpad Biro" #: main.cpp:157 msgid "Hungarian translation" -msgstr "" +msgstr "Traduzione Ungherese" #: main.cpp:158 msgid "Giuseppe Bordoni" -msgstr "" +msgstr "Giuseppe Bordoni" #: main.cpp:158 msgid "Italian translation" -msgstr "" +msgstr "Traduzione Italiano" #: main.cpp:159 msgid "Hideki Kimura" -msgstr "" +msgstr "Hideki Kimura" #: main.cpp:159 msgid "Japanese translation" -msgstr "" +msgstr "Traduzione Giapponese" #: main.cpp:160 msgid "UTUMI Hirosi" -msgstr "" +msgstr "UTUMI Hirosi" #: main.cpp:160 msgid "Old Japanese translation" -msgstr "" +msgstr "Vecchia traduzione Giapponese" #: main.cpp:161 msgid "Dovydas Sankauskas" -msgstr "" +msgstr "Dovydas Sankauskas" #: main.cpp:161 msgid "Lithuanian translation" -msgstr "" +msgstr "Traduzione Lituano" #: main.cpp:162 msgid "Bruno Queiros" -msgstr "" +msgstr "Bruno Queiros" #: main.cpp:162 -#, fuzzy msgid "Portuguese translation" -msgstr "Importa Menu utente" +msgstr "Traduzione Portoghese" #: main.cpp:163 msgid "Lukasz Janyst" -msgstr "" +msgstr "Lukasz Janyst" #: main.cpp:163 msgid "Old Polish translation" -msgstr "" +msgstr " Vecchia traduzione Polacco" #: main.cpp:164 msgid "Pawel Salawa" -msgstr "" +msgstr "Pawel Salawa" #: main.cpp:164 main.cpp:165 msgid "Polish translation" -msgstr "" +msgstr "Traduzione Polacco" #: main.cpp:165 msgid "Tomek Grzejszczyk" -msgstr "" +msgstr "Tomek Grzejszczyk" #: main.cpp:166 msgid "Dmitry A. Bugay" -msgstr "" +msgstr "Dmitry A. Bugay" #: main.cpp:166 msgid "Russian translation" -msgstr "" +msgstr "Traduzione Russo" #: main.cpp:167 msgid "Dmitry Chernyak" -msgstr "" +msgstr "Dmitry Chernyak" #: main.cpp:167 msgid "Old Russian translation" -msgstr "" +msgstr "Vecchia traduzione Russo" #: main.cpp:168 msgid "Sasa Tomic" -msgstr "" +msgstr "Sasa Tomic" #: main.cpp:168 msgid "Serbian translation" -msgstr "" +msgstr "Traduzione Serbo" #: main.cpp:169 msgid "Zdenko Podobna" -msgstr "" +msgstr "Zdenko Podobna" #: main.cpp:169 msgid "Slovak translation" -msgstr "" +msgstr "Traduzione Slovacco" #: main.cpp:170 msgid "Slovenian translation" -msgstr "" +msgstr "Traduzione Sloveno" #: main.cpp:171 msgid "Rafael Munoz" -msgstr "" +msgstr "Rafael Munoz" #: main.cpp:171 msgid "Old Spanish translation" -msgstr "" +msgstr "Vecchia traduzione Spagnolo" #: main.cpp:172 msgid "Alejandro Araiza Alvarado" -msgstr "" +msgstr "Alejandro Araiza Alvarado" #: main.cpp:172 msgid "Spanish translation" -msgstr "" +msgstr "Traduzione Spagnolo" #: main.cpp:173 msgid "Erik Johanssen" -msgstr "" +msgstr "Erik Johanssen" #: main.cpp:173 main.cpp:174 msgid "Old Swedish translation" -msgstr "" +msgstr "Vecchia traduzione Svedese" #: main.cpp:174 msgid "Anders Linden" -msgstr "" +msgstr "Anders Linden" #: main.cpp:175 msgid "Peter Landgren" -msgstr "" +msgstr "Peter Landgren" #: main.cpp:175 msgid "Swedish translation" -msgstr "" +msgstr "Traduzione Svedese" #: main.cpp:176 msgid "Bekir Sonat" -msgstr "" +msgstr "Bekir Sonat" #: main.cpp:176 msgid "Turkish translation" -msgstr "" +msgstr "Traduzione Turco" #: main.cpp:177 msgid "Ivan Petrouchtchak" -msgstr "" +msgstr "Ivan Petrouchtchak" #: main.cpp:177 msgid "Ukrainian translation" -msgstr "" +msgstr "Traduzione Ucraino" #: main.cpp:183 msgid "Start left panel at <path>" @@ -4161,14 +4156,14 @@ msgstr "I tasti funzione consentono operazioni veloci sui file." #: krusaderview.cpp:307 -#, fuzzy, kde-format +#, kde-format msgid "Horizontal Mode" -msgstr "Modo verticale" +msgstr "Modo orizzontale" #: Dialogs/krdialogs.cpp:142 #, kde-format msgid "F2 Queue" -msgstr "" +msgstr "F2 Coda" #: Dialogs/krdialogs.cpp:158 #, kde-format @@ -4294,7 +4289,7 @@ "Una selezione predefinita è un filtro di file che si usa spesso\n" "Alcuni esempi sono \"*.c, *.h\", \"*.c, *.o\", ecc.\n" "Si possono aggiungere questi filtri alla lista scrivendoli e premendo il " -"bottone 'Aggiungi'.\n" +"pulsante 'Aggiungi'.\n" "'Elimina' rimuove una selezione predefinita e 'Pulisci' le rimuove tutte.\n" "Notare che la linea in cui si modifica il filtro ha una propria cronologia " "che può essere scorsa se necessario." @@ -4634,7 +4629,7 @@ #: Dialogs/krspwidgets.cpp:155 #, kde-format msgid "Enter a selection:" -msgstr "Immetti una selezione:" +msgstr "Inserisci una selezione:" #: Dialogs/krspwidgets.cpp:308 Dialogs/krspwidgets.cpp:319 #, kde-format @@ -4691,7 +4686,7 @@ #: Dialogs/checksumdlg.cpp:234 Dialogs/checksumdlg.cpp:353 #, kde-format msgid " and folders:" -msgstr " e cartelle:" +msgstr " e directory:" #: Dialogs/checksumdlg.cpp:248 #, kde-format @@ -4966,7 +4961,7 @@ msgstr "" "I <b>Menu utente</b> possono essere raggruppati in categorie per una " "migliore distinzione. Scegliere una <i>Categoria</i> esistente o crearne una " -"nuova immettendo un nome." +"nuova inserendo un nome." #. i18n: tag string #. i18n: file ./ActionMan/actionproperty.ui line 176 @@ -5126,14 +5121,14 @@ #: ActionMan/ui_actionproperty.h:722 rc.cpp:116 #, kde-format msgid "If checked, the action is shown in the Useractions menus." -msgstr "" +msgstr "Se selezionato, questo elemento sarà mostrato nel Menu utente." #. i18n: tag string #. i18n: file ./ActionMan/actionproperty.ui line 401 #: ActionMan/ui_actionproperty.h:725 rc.cpp:119 -#, fuzzy, kde-format +#, kde-format msgid "Enabled" -msgstr "abilitato" +msgstr "Abilitato" #. i18n: tag string #. i18n: file ./ActionMan/actionproperty.ui line 420 @@ -5187,16 +5182,16 @@ #. i18n: tag string #. i18n: file ./ActionMan/actionproperty.ui line 463 #: ActionMan/ui_actionproperty.h:748 rc.cpp:146 -#, fuzzy, kde-format +#, kde-format msgid "Run the command in the embedded terminal emulator." -msgstr "Esegui il comando in un terminale." +msgstr "Esegui il comando nell'emulatore di terminale integrato." #. i18n: tag string #. i18n: file ./ActionMan/actionproperty.ui line 466 #: ActionMan/ui_actionproperty.h:751 rc.cpp:149 -#, fuzzy, kde-format +#, kde-format msgid "Run in the embedded terminal emulator" -msgstr "Invia all'&emulatore di terminale integrato" +msgstr "Esegui nell'emulatore di terminale integrato" #. i18n: tag string #. i18n: file ./ActionMan/actionproperty.ui line 39 @@ -5210,7 +5205,7 @@ #: ActionMan/ui_actionproperty.h:753 rc.cpp:155 #, kde-format msgid "The Useraction is only available for" -msgstr "Questo Menu utente è disponibile solo per quanto segue" +msgstr "Il Menu utente è disponibile solo per quanto segue" #. i18n: tag string #. i18n: file ./ActionMan/actionproperty.ui line 523 @@ -5579,7 +5574,7 @@ #: ActionMan/addplaceholderpopup.cpp:288 ActionMan/addplaceholderpopup.cpp:487 #, kde-format msgid "list-add" -msgstr "" +msgstr "aggiungi lista" #: UserMenu/usermenu.cpp:58 #, kde-format @@ -5682,7 +5677,7 @@ #: Synchronizer/synchronizergui.cpp:1228 #, kde-format msgid "Ignore Case" -msgstr "Ignora maiuscole/minuscole" +msgstr "Ignora maiuscole" #: Synchronizer/synchronizergui.cpp:1231 #, kde-format @@ -5690,7 +5685,7 @@ "<p>Case insensitive filename compare.</p><p><b>Note</b>: useful when " "synchronizing Windows filesystems.</p>" msgstr "" -"<p>Confronto nome file ignorando maiuscole/minuscole.</p><p><b>Nota</b>: " +"<p>Confronto nome file ignorando le maiuscole.</p><p><b>Nota</b>: " "utile per sincronizzazioni su filesystem Windows.</p>" #: Synchronizer/synchronizergui.cpp:1238 @@ -5721,7 +5716,7 @@ "Mostra i file selezionati per la <i>copia da destra a sinistra</i> (Ctrl+R)." #: Synchronizer/synchronizergui.cpp:1297 -#, fuzzy, kde-format +#, kde-format msgid "Show files marked to delete (CTRL+T)." msgstr "Mostra i file selezionati per l'eliminazione (Ctrl+T)." @@ -6021,11 +6016,11 @@ #: Synchronizer/synchronizedialog.cpp:64 Synchronizer/synchronizedialog.cpp:77 #: Synchronizer/synchronizedialog.cpp:90 -#, fuzzy, kde-format +#, kde-format msgid "Ready: %2/1 file, %3/%4" msgid_plural "Ready: %2/%1 files, %3/%4" -msgstr[0] "Pronto: %2/1 file, %4/%5" -msgstr[1] "Pronto: %2/%1 file, %4/%5" +msgstr[0] "Pronto: %2/1 file, %3/%4" +msgstr[1] "Pronto: %2/%1 file, %3/%4" #: Synchronizer/synchronizedialog.cpp:70 #, kde-format @@ -6102,13 +6097,13 @@ #: Synchronizer/synchronizer.cpp:1408 #, kde-format msgid "Feeding the URLs to Kget" -msgstr "Immettere lo URL per Kget" +msgstr "Inserire lo URL per Kget" #: Synchronizer/synchronizer.cpp:1457 krslots.cpp:147 krslots.cpp:224 #: krslots.cpp:509 krslots.cpp:551 krslots.cpp:569 -#, fuzzy, kde-format +#, kde-format msgid "Error executing %1!" -msgstr "Errore nell'esecuzione " +msgstr "Errore eseguendo %1!" #: Synchronizer/feedtolistboxdialog.cpp:56 #, kde-format @@ -6826,9 +6821,9 @@ msgstr "Strumento" #: Konfigurator/konfigurator.cpp:67 -#, fuzzy, kde-format +#, kde-format msgid "Konfigurator" -msgstr "Conferme" +msgstr "Konfigurator" #: Konfigurator/konfigurator.cpp:68 #, kde-format @@ -7020,7 +7015,7 @@ #: Konfigurator/kglookfeel.cpp:115 #, kde-format msgid "Case sensitive quicksearch" -msgstr "Ricerca rapida maiuscolo/minuscolo" +msgstr "Ricerca rapida distinguendo maiuscole" #: Konfigurator/kglookfeel.cpp:115 Konfigurator/kglookfeel.cpp:253 #, kde-format @@ -7054,7 +7049,7 @@ #: Konfigurator/kglookfeel.cpp:196 #, kde-format msgid "12" -msgstr "" +msgstr "12" #: Konfigurator/kglookfeel.cpp:197 #, kde-format @@ -7089,12 +7084,14 @@ #: Konfigurator/kglookfeel.cpp:216 #, kde-format msgid "Load the user defined folder icons" -msgstr "" +msgstr "Carica le icone definite dall'utente per le directory" #: Konfigurator/kglookfeel.cpp:216 #, kde-format msgid "Load the user defined folder icons (can cause decrease in performance)." msgstr "" +"Carica le icone definite dall'utente per le directory (può peggiorare le " +"prestazioni)." #: Konfigurator/kglookfeel.cpp:217 #, kde-format @@ -7135,32 +7132,32 @@ #: Konfigurator/kglookfeel.cpp:234 #, kde-format msgid "Sort method:" -msgstr "" +msgstr "Metodo di ordinamento:" #: Konfigurator/kglookfeel.cpp:238 #, kde-format msgid "Alphabetical" -msgstr "" +msgstr "Alfabetico" #: Konfigurator/kglookfeel.cpp:239 #, kde-format msgid "Alphabetical and numbers" -msgstr "" +msgstr "Alfabetico e numeri" #: Konfigurator/kglookfeel.cpp:240 #, kde-format msgid "Character code" -msgstr "" +msgstr "Codice carattere" #: Konfigurator/kglookfeel.cpp:241 #, kde-format msgid "Character code and numbers" -msgstr "" +msgstr "Codice carattere e numeri" #: Konfigurator/kglookfeel.cpp:253 #, kde-format msgid "Case sensitive sorting" -msgstr "Ordinamento maiuscolo/minuscolo" +msgstr "Ordinamento distinguendo maiuscole" #: Konfigurator/kglookfeel.cpp:254 #, kde-format @@ -7191,22 +7188,22 @@ #: Konfigurator/kglookfeel.cpp:288 #, kde-format msgid "Visible Panel Toolbar buttons" -msgstr "Bottoni visibili nella barra degli strumenti del pannello" +msgstr "Pulsanti visibili nella barra degli strumenti del pannello" #: Konfigurator/kglookfeel.cpp:294 #, kde-format msgid "Open button" -msgstr "Bottone 'Apri'" +msgstr "Pulsante 'Apri'" #: Konfigurator/kglookfeel.cpp:294 #, kde-format msgid "Opens the directory browser." -msgstr "Apre il browser di directory." +msgstr "Apre il browser delle directory." #: Konfigurator/kglookfeel.cpp:295 #, kde-format msgid "Equal button (=)" -msgstr "Bottone 'Uguale' (=)" +msgstr "Pulsante 'Uguale' (=)" #: Konfigurator/kglookfeel.cpp:295 #, kde-format @@ -7216,7 +7213,7 @@ #: Konfigurator/kglookfeel.cpp:296 #, kde-format msgid "Up button (..)" -msgstr "Bottone 'Alto' (..)" +msgstr "Pulsante 'Alto' (..)" #: Konfigurator/kglookfeel.cpp:296 #, kde-format @@ -7226,7 +7223,7 @@ #: Konfigurator/kglookfeel.cpp:297 #, kde-format msgid "Home button (~)" -msgstr "Bottone 'Home' (~)" +msgstr "Pulsante 'Home' (~)" #: Konfigurator/kglookfeel.cpp:297 #, kde-format @@ -7236,7 +7233,7 @@ #: Konfigurator/kglookfeel.cpp:298 #, kde-format msgid "Root button (/)" -msgstr "Bottone 'Root' (/)" +msgstr "Pulsante 'Root' (/)" #: Konfigurator/kglookfeel.cpp:298 #, kde-format @@ -7246,7 +7243,7 @@ #: Konfigurator/kglookfeel.cpp:299 #, kde-format msgid "Toggle-button for sync-browsing" -msgstr "Bottone commutazione sincronizzazione navigazione" +msgstr "Pulsante commutazione sincronizzazione navigazione" #: Konfigurator/kglookfeel.cpp:299 #, kde-format @@ -7313,19 +7310,20 @@ #: Konfigurator/kglookfeel.cpp:341 #, kde-format msgid "Ergonomic Mode" -msgstr "" +msgstr "Modalità ergonomica" #: Konfigurator/kglookfeel.cpp:341 -#, fuzzy, kde-format +#, kde-format msgid "" "The left mouse button does not select, but sets the current file without " "affecting the current selection. The right mouse button invokes the context-" "menu. You can select with Ctrl key and the left button." msgstr "" "Il tasto sinistro del mouse non seleziona ma imposta il file attuale senza " -"influenzare la selezione corrente. Il tasto destro del mouse seleziona più " -"file ed il menu contestuale è richiamato cliccando e tenendo premuto il " -"tasto destro del mouse." +"influenzare la selezione corrente. Il tasto destro del mouse richiama il " +"menu " +"contestuale. Si può selezionare usando il tasto Ctrl ed il tasto sinistro " +"del mouse." #: Konfigurator/kglookfeel.cpp:342 #, kde-format @@ -7416,7 +7414,7 @@ "Note: This is meaningless if 'Left Button Selects' is checked." msgstr "" "Se impostato, Shift/Ctrl - clic sinistro seleziona gli elementi. \n" -"Nota: questo è valido a meno che sia impostato 'Bottone sinistro seleziona'." +"Nota: questo è valido a meno che sia impostato 'Tasto sinistro seleziona'." #: Konfigurator/kglookfeel.cpp:387 #, kde-format @@ -7454,7 +7452,7 @@ "Note: This is meaningless if 'Right Button Selects' is checked." msgstr "" "Se impostato, Shift/Ctrl - clic destro seleziona gli elementi. \n" -"Nota: questo è valido a meno che sia impostato 'Bottone destro seleziona'." +"Nota: questo è valido a meno che sia impostato 'Tasto destro seleziona'." #: Konfigurator/kglookfeel.cpp:396 #, kde-format @@ -7485,7 +7483,7 @@ "calculate space occupied by the folder (recursively)." msgstr "" "Se impostato, la pressione della barra spaziatrice su una directory ne \n" -" calcola lo spazio occupato ricorsivamente anziché selezionarla." +"calcola lo spazio occupato ricorsivamente anziché selezionarla." #: Konfigurator/kglookfeel.cpp:402 #, kde-format @@ -8016,24 +8014,24 @@ msgstr "Sfondo Da eliminare:" #: Konfigurator/kgcolors.cpp:211 -#, fuzzy, kde-format +#, kde-format msgid "Other" -msgstr "Altro..." +msgstr "Altro" #: Konfigurator/kgcolors.cpp:219 -#, fuzzy, kde-format +#, kde-format msgid "Quicksearch, match foreground:" -msgstr "Primo piano directory:" +msgstr "Ricerca rapida, primo piano corrispondenze:" #: Konfigurator/kgcolors.cpp:220 Konfigurator/kgcolors.cpp:222 -#, fuzzy, kde-format +#, kde-format msgid "Quicksearch, non-match background:" -msgstr "Sfondo alternato:" +msgstr "Ricerca rapida, sfondo nessuna corrispondenza:" #: Konfigurator/kgcolors.cpp:221 -#, fuzzy, kde-format +#, kde-format msgid "Quicksearch, non-match foreground:" -msgstr "Primo piano attuale:" +msgstr "Ricerca rapida, primo piano nessuna corrispondenza:" #: Konfigurator/kgcolors.cpp:255 #, kde-format @@ -8101,14 +8099,14 @@ msgstr "Uguali" #: Konfigurator/kgcolors.cpp:526 -#, fuzzy, kde-format +#, kde-format msgid "Quicksearch non-match" -msgstr "Ricerca rapida" +msgstr "Ricerca rapida, nessuna corrispondenza" #: Konfigurator/kgcolors.cpp:527 -#, fuzzy, kde-format +#, kde-format msgid "Quicksearch match" -msgstr "Ricerca rapida" +msgstr "Ricerca rapida, corrispondenza" #: Konfigurator/kgcolors.cpp:546 #, kde-format @@ -8126,11 +8124,9 @@ msgstr "Seleziona un file schema di colori" #: Konfigurator/kgcolors.cpp:564 -#, fuzzy, kde-format +#, kde-format msgid "File %1 already exists. Are you sure you want to overwrite it?" -msgstr "" -"Il file %1 esiste già.\n" -"Sei sicuro di volerlo sovrascrivere?" +msgstr "Il file %1 esiste già. Sei sicuro di volerlo sovrascrivere?" #: Konfigurator/kgcolors.cpp:567 #, kde-format @@ -8302,7 +8298,7 @@ #: Konfigurator/kgarchives.cpp:64 #, kde-format msgid "LZMA" -msgstr "" +msgstr "LZMA" #: Konfigurator/kgarchives.cpp:65 #, kde-format @@ -8359,7 +8355,7 @@ "Gli archivi che sono \"ingrigiti\" non erano disponibili sul tuo\n" "sistema l'ultima volta che Krusader ha controllato. Se desideri che " "Krusader\n" -"cerchi ancora, premi il bottone 'Configurazione automatica'." +"cerchi ancora, premi il pulsante 'Configurazione automatica'." #: Konfigurator/kgarchives.cpp:88 #, kde-format @@ -8453,9 +8449,9 @@ msgstr "Usa come predefinito un carattere a larghezza fissa" #: krslots.cpp:101 -#, fuzzy, kde-format +#, kde-format msgid "No selected files to send!" -msgstr "Solo file selezionati" +msgstr "Nessun file selezionato da inviare!" #: krslots.cpp:109 #, kde-format @@ -8467,11 +8463,11 @@ "nel tuo percorso. Consiglio: Krusader supporta kmail." #: krslots.cpp:118 -#, fuzzy, kde-format +#, kde-format msgid "Sending file: %2" msgid_plural "Sending files: %2" -msgstr[0] "Invio file: " -msgstr[1] "Invio file: " +msgstr[0] "Invio file: %2" +msgstr[1] "Invio file: %2" #: krslots.cpp:176 #, kde-format @@ -8503,9 +8499,9 @@ "Kompare, Kdiff3, e Xxdiff." #: krslots.cpp:205 krslots.cpp:211 -#, fuzzy, kde-format +#, kde-format msgid "Krusader is unable to download %1" -msgstr "Krusader non può scaricare: " +msgstr "Krusader non può scaricare %1" #: krslots.cpp:460 #, kde-format @@ -8552,12 +8548,12 @@ #: krslots.cpp:630 #, kde-format msgid "Enter a URL to view:" -msgstr "Immetti un URL da visualizzare:" +msgstr "Inserisci un URL da visualizzare:" #: krslots.cpp:641 #, kde-format msgid "Enter the filename to edit:" -msgstr "Immetti il nome del file da modificare:" +msgstr "Inserisci il nome del file da modificare:" #: krslots.cpp:698 #, kde-format @@ -8774,52 +8770,52 @@ #: krarc.cpp:182 #, kde-format msgid "Creating directories is not supported with %1 archives" -msgstr "" +msgstr "La creazione di directory non è supportata con gli archivi %1" #: krarc.cpp:215 -#, fuzzy, kde-format +#, kde-format msgid "Creating %1 ..." -msgstr "Eliminazione di %1 in corso..." +msgstr "Creazione %1..." #: krarc.cpp:254 -#, fuzzy, kde-format +#, kde-format msgid "Writing to %1 archives is not supported" -msgstr "Lo spostamento all'interno degli archivi è disabilitato" +msgstr "La scrittura negli archivi %1 non è supportata" #: krarc.cpp:307 -#, fuzzy, kde-format +#, kde-format msgid "Packing %1 ..." -msgstr "Ri-compressione..." +msgstr "Compressione %1..." #: krarc.cpp:347 #, kde-format msgid "Retrieving data from %1 archives is not supported" -msgstr "" +msgstr "Il recupero dei dati dagli archivi %1 non è supportato" #: krarc.cpp:414 krarc.cpp:667 -#, fuzzy, kde-format +#, kde-format msgid "Unpacking %1 ..." -msgstr "Estrazione" +msgstr "Estrazione %1..." #: krarc.cpp:542 #, kde-format msgid "Deleting files from %1 archives is not supported" -msgstr "" +msgstr "L'eliminazione dei file dagli archivi %1 non è supportata" #: krarc.cpp:558 -#, fuzzy, kde-format +#, kde-format msgid "Deleting %1 ..." -msgstr "Eliminazione di %1 in corso..." +msgstr "Eliminazione di %1..." #: krarc.cpp:587 #, kde-format msgid "Accessing files is not supported with the %1 archives" -msgstr "" +msgstr "L'accesso ai file negli archivi %1 non è supportata" #: krarc.cpp:696 #, kde-format msgid "Listing directories is not supported for %1 archives" -msgstr "" +msgstr "L'elencazione delle directory negli archivi %1 non è supportata" #: krarc.cpp:1495 #, kde-format @@ -8827,26 +8823,28 @@ "\n" "Make sure that the %1 binary are installed properly on your system." msgstr "" +"\n" +"Assicurarsi che il programma %1 sia installato correttamente nel sistema." #: krarc.cpp:1710 krarc.cpp:1734 #, kde-format msgid "Krarc Password Dialog" -msgstr "" +msgstr "Finestra di dialogo Password Krarc" #: krarc.cpp:1751 #, kde-format msgid "Accessing the file requires password." -msgstr "" +msgstr "L'accesso al file richiede la password." #: tar.cc:56 #, kde-format msgid "This protocol does not support resuming" -msgstr "" +msgstr "Questo protocollo non supporta la ripresa del trasferimento" #: tar.cc:78 #, kde-format msgid "Writing to %1 is not supported" -msgstr "" +msgstr "La scrittura in %1 non è supportata" #~ msgid "" #~ "Don't use KDE's media protocol for media button (if it's buggy or missing)" @@ -9020,3 +9018,5 @@ #~ "Prova il nuovo gestore di segnalibri: apri una nuova connessione remota. " #~ "Una volta fatto, premi il bottone segnalibro, seleziona 'Aggiungi " #~ "segnalibro' ed è tutto!" + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cod...@us...> - 2009-02-27 11:10:40
|
Revision: 6230 http://krusader.svn.sourceforge.net/krusader/?rev=6230&view=rev Author: codeknight Date: 2009-02-27 11:10:34 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Removed CVNNEWS, SVNNEWS is the successor Removed Paths: ------------- trunk/krusader_kde4/CVSNEWS Deleted: trunk/krusader_kde4/CVSNEWS =================================================================== --- trunk/krusader_kde4/CVSNEWS 2009-02-27 10:36:09 UTC (rev 6229) +++ trunk/krusader_kde4/CVSNEWS 2009-02-27 11:10:34 UTC (rev 6230) @@ -1,360 +0,0 @@ ------------------------------------------------------------------------- -- Krusader SVNNEWS ------------------------------------------------------------------------- -- This file is only intended for krusader-svn. -- It should contain a brief description of new features. In some way an -- extension to the ChangeLog. ------------------------------------------------------------------------- - -New feature: Krusader is able to send e-mails by thunderbird - - one can set up thunderbird as an e-mail sender in the dependencies - - from now more than one file can be sent in an attachment - -New feature: for content searching (searcher, advanced selection, - synchronizer), the content encoding can be given. - -New feature: select remote encoding for krarc - - the file name encoding for zip, rar, arj, lha can be set from now - - as 7z always uses UTF-16, remote encoding will not work for 7z - - it's imporant because zip files that were created on Windows can - have different encoding - -New feature: new synchronizer shortcuts - - CTRL + W : reverse direction - - ALT + Down : exclude - - ALT + Up : restore original task - - ALT + Left : copy to left - - ALT + Right : copy to right - - ALT + Delete : mark for delete - -UserActions: Expander: Many fixes, better error handling, sensible - %_Each&-handling. Finally I managed to implement Jiri's 100k patch for - the useractions. This patch handles the Each-placeholder much better - (i.e. allows Each inside Copy and can deal with multiple Each's) and - provides a good base for future extensions. Thanks a lot! - -New feature: atomic extension. - - Extensions known to be atomic (like tar.gz) are now handled properly - both in the panel and during rename. The list of atomic extensions - can be provided through "Atomic Extensions" in [Look&Feel] in - krusaderrc. - -New feature: rename just the filename, without extension - - in the look&feel page, disable "rename selects extension", and then, - when you rename a file, only the filename will be selected, but not - the extension - -New feature: full screen terminal (mc style) - - if enabled in look&feel, pressing the required shortcut to show - the terminal emulator will hide all of krusader, just like midnight - commander. - -New feature: right click menu for bookmarks - - after right clicking on a bookmark, a popup menu appears with - - Open - Open in new tab - Delete - - menu items. - -New feature: enable/disable the special bookmarks - - right click on a special bookmark - (Popular URLs, Devices, Local Network, Virtual Filesystem, Jumb - back, Set jump back, Bookmark Current or Manage Bookmarks) - - a new rightclick menu appears containing the special bookmark items - if a menu item is checked then the bookmark is enabled - - one can enable/disable separately the following special bookmarks - - the "Popular URLs" bookmark - - the "Devices" bookmark - - the "Local Network" bookmark - - the "Virtual Filesystem" - - the "Jump back" and "Set jump back" bookmarks - -New feature: keeping the directory structure of copying/moving from - virtual folders - - assume we have 3 URL-s in a virtual subfolder - /home/myhome/mydir1/myfile1 - /home/myhome/mydir1/myfile2 - /home/myhome/mydir2/myfile3 - - in the destination folder we would like to get: - mydir1/myfile1 - mydir1/myfile2 - mydir2/myfile3 - - Just press F5 for copy (dialog appears) - source MUST be a virtual subfolder! - target MUST NOT be a virtual folder! - - in the dialog, there's a new option: - "Keep virtual directory structure" - - check it - - select /home/myhome/ for base URL - - start the copy / move - - - AND: the directory structure will be kept at copying! - that's it! :-) - -New option in look&feel: directories are always sorted by name - -Big cleanup in the UserAction module: - - dropped support of "same_as"-attribute in the description-tag - - dropped need for a manual name-conflict-resolution, now a nummer is - append on double names - - reduced the memory-consumption drasticly due to internal changes - - added copy actions to clipboard / past actions from clipboard - - multiselection for export/remove/copy - - renamed the actionfile we provide to useraction_examples.xml, - so that we can merge new examples with existing installations - - on export one can now choose between overwrite and merge is the - file already exists and contains useractions - - Actions are now manages with ActionMan; the list is now a - categorized tree with icon and title instead of the identifyer. - - On the UserAction page in Konfigurator you can now change the - Terminal for UserActions and the font for the output-collection. - -New archive handling: - supports passworded arj, ace, rar, zip - step into hidden archives by pressing <RIGHT> on the archive - decompressing debian packages by Alt+U - using KWallet to store the passwords - writes out the error messages of the archiver - archive type autodetection by its header (first 512 byte) - --------------------------------- 1.70.0 -------------------------------- - -New global calculate space function: - Used to calculate occupied space inside archives remote FS and in - virtual VFS need KDE >= 3.3 - for local FS the old (and faster) code is still used. - -New zip/tar slave - based on KDE's but support writing to archive - Modified KDE tar slave (which also handle ZIP archives) to support - writing. Compared to kr_arc: - Pros: Speed. No need for external binary. Speed. did I mentioned - speed? - Cons: does not support delete from archive. - (You need to change the protocol registration to use this slave) - -New configure-switches: - --without-konqueror - builds Krusader without Konqueror's servicemenus - --without-javascript - builds Krusader without JS support - In the past the support was always compiled in when the headers where - found. - -Jump-Back: - If you create a new tab the startup-path is saved. You can now step - deep into the dir-tree and Ctrl-J brings you back to your starting - position. It's also possible to set the current directory manually as - Jump-Back-Point. - --------------------------------- 1.60.0 -------------------------------- - -Useraction: new placeholder: %_ListFile()% - is replaced by path/filename of a temporary file containing a list of - items usefull for external scripts - -Custom Selection Mode - -Popular Links - krusader's answer to google-ranking :-) - In the bookmarks menu, you'll see a new submenu called "popular urls" - From now on, krusader keeps track of every url you visit (also remote) - and keeps a ranking for every url. the more you visit the url, the - higher the ranking. clicking the popular links menu displays the top - 15 links sorted by popularity. the top is the most popular. this is - easy for when u need to visit urls often, but don't want to create a - bookmark. this is also a better "history" since unlike the 'history' - button, this ranking accumulates urls from all tabs. - - also use the two-enter dialog: - * open it - (ctrl-z or bookmarks->popular urls->popular urls(bottom of list)) - * type few letter to narrow the search - * hit enter (you'll go to the url list) - * hit enter again and the panel is refreshed! - - -Virtual VFS. - This is not a virtual folder ! - but more a container for URL's from different file system. - just perfect for displaying search results and so on... - Action you perform on the files in this VFS are performed on the - 'real' files. you don't just delete files from the VFS - you delete - them from your hard drive. - limitations:: you can't create directories inside a virtual VFS. - -Primitive scripting support. -condition: KJSEmbed is installed (package: KDEbindings) - Ctrl+Alt+J opens the JavaScript-console. There you can play around: - try 'Krusader.setCaption("Hey Ho, Let's go!");', - "Krusader.children();", "Krusader.child("help").slots();", - "alert(Krusader.properties())" and "Krusader.child("help").show();"... - In addition a new placeholder for the useraction, - %_Script(path/to/script.js)% executes an external file. - If the path is relative the file will be read from - <KDE-app-data>/krusader/js/ - If a UserAction should execute the return of a script, set the second - parameter of %_Script()% to "return=cmd". - In this case the Variable 'cmd' will be read. - additional the second parameter can be used to pass variables to the - script: - "return=lala;foo=bar". here the variable foo will have at the - beginning of the execution the value 'bar' and the return-variable is - called lala instead of cmd. Warning: very alpha!! - -krusader has now a new toolbar: actions toolbar. you can show/hide it -using the view menu --> show actions toolbar. useful to put actions (and -later bookmarks), put in as a side toolbar with small icons. __you'll -have to overwrite krusaderui.rc__ - -color scheme can now be imported/exported. reacable in the colors page -in konfigurator - -disk usage (tools menu + 3rd panel) - -changing the coloumns by right clicking on the panel's header - -Refresh-in-the-background: from now on, reading a remote url or -the contents of an archive is done in the background. this means -that krusader remains responsive and can be used to do whatever you need -in any other panel or tab. - -useraction:new placeholder %_PanelSize% - This placeholder can change the ration between the two panels. - %aPanelSize("80")% makes the active panel use 80% of krusader's width - (height in vertical-mode) - ommiting the parameter means 50% - -useraction: new placeholder: %_Each% - This placeholder splitts the commandline into a list where - %_Each(...)% is replaced by one - list-item (all, all files, all dirs, all selected). These commands are - executed one after another. - -Full viewer in the 3rd hand (thanks to illissius) - -Shift-DEL will delete a file and not move it to the trash as DEL does. -(total commander like) - -Import/Export keyboard shortcuts from/to a file. want krusader to become -total commander in a single click? no problem! - -Mouse selection modes is back! check out the Look'N'Feel section - --------------------------------- 1.51 ---------------------------------- - -The long awaited feature: Fn keys can be changed to different shortcuts - -Total-commander refresh: when krusader isn't focused, it is not refreshed -at all. - -Pressing ctrl-up arrow from the panel, jumps to the origin bar - --------------------------------- 1.50 ---------------------------------- - -Human-readable file sizes is implemented (located in look&feel->panel) - -From now on, Konqueror's right click menu is imported to Krusader - -Cut (ctrl+x), Copy (ctrl+c) and Paste (ctrl+v) - are available. They even work with Konqueror. Please test it. - -Compare by content: you can now either: - - select (mark) one file in the left panel, and one in the right panel - - select exactly two files in the active panel - - make sure there is a file in the other panel with the same name as - the current file in the active panel - -Panel profiles: now it is possible to store environment profiles. - An environment profile contains the following: - - all the tabs path (left / right) - - the current tab (left / right) - - and the selected side (left or right) - You can save / restore these tabulator profiles. Please test it. - - Those users who use the CVS version of Krusader, should delete the - krusaderui.rc from their home directory, to make the new menu and - toolbar items visible. - (rm ~/.kde/share/apps/krusader/krusaderui.rc) - -Synchronizer: now you can use the search filters in the synchronizer - -Useraction: removed placeholder 'Bookmark'. It is deprecated now since -the new bookmark-system can be accessed directly like a user action. If -you need it anyway, use 'Goto' instead. - -TC like searching: if you type 'text' -> results the same as '*text*' -You can exclude files from the search with '|' -(ex. '*.cpp *.h | *.moc.cpp' ) - -Search is possible on remote file systems as well. - -If you have filesystems that you don't want to accidentally unmount (or -mount), just go to Konfigurator->Advanced, and enter a list of mount -points separated by commas, for example: /, /boot, /tmp) and mountman -won't try to (un)mount them. - -Mountman got a big nose-job ;-) please test it well. - -You can now drag'n'drop to the new tree view - -Shift+left/right changes tabs (thanks to Dmitry Suzdalev) - -New vfs_refresh() function only updates changes when you re-read a panel -and changes the content without the annoying full redraw effect. - -When closing Krusader, the tabs are saved and restored - -Synchronizer profiles: - Krusader handles synchronizer profiles. In synchronizer press - the 'profile' button, and you'll be able to add / load / save / remove - synchronizer profiles. - -Synchronize with Kget: - If you want to synchronize a local directory with an unstable ftp - server, Kget is a much better solution than simple file copying. After - comparing you may right click on the result list and select - 'Synchronize with kget' to execute the synchronization, after that the - listed files will be downloaded with kget instead of Krusader. - -Dropping URLs onto the status / totals line: - If a directory contains a lot of subdirectories, it may not be - possible to drop the URL onto the panel (on which only directories are - visible). Now the URL can be dropped onto the status / totals line - instead. - -Sync-browsing: - With a little toggle-button in the panel-level toolbar the SyncBrowse - mode is activated/deactivated. - When active, each directory change in the specific panel is performed - in the other panel also. - -User-Actions: - With the user action system the user can make his own actions on files - in the panel or access Krusader internal functions with parameters - directly using the placeholder. - The actions integrate seamless into KDE's action-system, so the - standard edit-toolbar/shortcut-dialogs can show/manipulate the user - actions, too. The user actions are stored in - ~/.kde/share/apps/krusader/useraction.xml (the file-structure is - documented in doxygen-headers of UserActionXML) User Actions can be - edited/added/im-/exported using a new Konfigurator module (although I - plan to move all action-related to a new ActionMan. For more info, see - http://www.jonas-baehr.de/forum/Krusader-ideas.txt) - Currently, these placeholder are implemented (for details see - UserAction/expander.cpp or doxygen): - Path replaced by the panels path - Count replaced by the number of <first parameter> - Filter replaced by the panels filter-mask - Current replaced by the current item - List replaced by a list of all <first paremeter> - Select manipulates the selection in a panel - Goto changes the panels's path to <first parameter> - Ask asks the user for a some text and is replaced by the - answer - Clipboard manipulates the clipboard - Copy copies a file, useful for quick, local, backups - Sync opens the Synchronizer with a given profile - NewSearch opens the search-windows with a given profile - Profile loads a given panel-profile - - A GUI-based helper for placeholder-adding is provided. - In Path, Current and List spaces are per default automaticly escaped. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cod...@us...> - 2009-02-27 10:36:17
|
Revision: 6229 http://krusader.svn.sourceforge.net/krusader/?rev=6229&view=rev Author: codeknight Date: 2009-02-27 10:36:09 +0000 (Fri, 27 Feb 2009) Log Message: ----------- French handbook translation Added Paths: ----------- trunk/krusader_kde4/doc/i18n/fr/glossary.docbook.po trunk/krusader_kde4/doc/i18n/fr/installation.docbook.po trunk/krusader_kde4/doc/i18n/fr/introduction.docbook.po trunk/krusader_kde4/doc/i18n/fr/java.docbook.po trunk/krusader_kde4/doc/i18n/fr/viewer-editor.docbook.po Added: trunk/krusader_kde4/doc/i18n/fr/glossary.docbook.po =================================================================== --- trunk/krusader_kde4/doc/i18n/fr/glossary.docbook.po (rev 0) +++ trunk/krusader_kde4/doc/i18n/fr/glossary.docbook.po 2009-02-27 10:36:09 UTC (rev 6229) @@ -0,0 +1,338 @@ +# translation of glossary.docbook.po to français +# Copyright (C) 2009, Krusader Krew +# This file is distributed under the same license as the Krusader package +# +# Stanislas Zeller <unc...@gm...>, 2008, 2009. +msgid "" +msgstr "" +"Project-Id-Version: glossary.docbook\n" +"Report-Msgid-Bugs-To: <fra...@ya...>\n" +"POT-Creation-Date: 2008-08-03 20:04+0000\n" +"PO-Revision-Date: 2009-02-07 09:13+0100\n" +"Last-Translator: Stanislas Zeller <unc...@gm...>\n" +"Language-Team: français <kde...@kd...>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. Tag: primary +#: glossary.docbook:23 +#, no-c-format +msgid "Glossary" +msgstr "Glossaire" + +#. Tag: para +#: glossary.docbook:25 +#, no-c-format +msgid "This chapter is intended to explain the various words which have been used throughout the &krusader; documentation. If you believe some acronyms or terms are missing, please do not hesitate to contact the &krusader; documentation team." +msgstr "Ce chapitre se destine à expliquer les divers mots qui ont été utilisés dans la documentation de &krusader;. Si vous croyez que des acronymes ou termes sont manquants, n'hésitez pas à contacter l'équipe de documentation de &krusader;." + +#. Tag: para +#: glossary.docbook:30 +#, no-c-format +msgid "Thanks to <ulink url=\"http://en.wikipedia.org/\">wikipedia.org</ulink> the free encyclopedia that anyone can edit." +msgstr "Merci à <ulink url=\"http://fr.wikipedia.org/\">wikipedia.org</ulink> l'encyclopédie libre que tout le monde peut modifier." + +#. Tag: acronym +#: glossary.docbook:35 +#, no-c-format +msgid "<acronym>ACL</acronym>" +msgstr "<acronym>ACL</acronym>" + +#. Tag: para +#: glossary.docbook:38 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Access_control_list\"> Access Control List</ulink>; a concept in computer security used to enforce privilege separation. It is a means of determining the appropriate access rights to a given object depending on certain aspects of the process that is making the request." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Access_Control_List\"> Access Control List</ulink> est un concept dans la sécurité informatique utilisé pour renforcer la séparation des privilèges. C'est un moyen de déterminer les droits accès appropriés à un objet donné dépendant de certains aspects du processus qui en fait la demande." + +#. Tag: acronym +#: glossary.docbook:49 +#, no-c-format +msgid "<acronym>BSD</acronym>" +msgstr "<acronym>BSD</acronym>" + +#. Tag: para +#: glossary.docbook:52 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Bsd\">Berkeley Software Distribution</ulink>; refers to any of several free &UNIX;-compatible operating systems, derived from <acronym>BSD</acronym>&UNIX;." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Berkeley_Software_Distribution\">Berkeley Software Distribution</ulink> : renvoie à tous les systèmes d'exploitation libres compatibles &UNIX; dérivés de l'&UNIX; <acronym>BSD</acronym>." + +#. Tag: acronym +#: glossary.docbook:61 +#, no-c-format +msgid "<acronym>CVS</acronym>" +msgstr "<acronym>CVS</acronym>" + +#. Tag: para +#: glossary.docbook:64 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Concurrent_Versions_System\"> Concurrent Versions System</ulink>; an important component of Source Configuration Management (SCM). By using it, developers can record the history of source files and documents." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Concurrent_versions_system\"> Concurrent Versions System</ulink> est un important composant du gestionnaire de configuration de sources (SCM). En l'utilisant, les développeurs peuvent enregistrer l'historique des fichiers sources et des documents." + +#. Tag: acronym +#: glossary.docbook:74 +#, no-c-format +msgid "<acronym>DEB</acronym>" +msgstr "<acronym>DEB</acronym>" + +#. Tag: para +#: glossary.docbook:77 +#, no-c-format +msgid "This is a binary file format that is used by <ulink url=\"http://en.wikipedia.org/wiki/Debian\"> &debian;</ulink> and &debian;-based distributions. It is a suffix of a installation file specifically built for these distributions; e.g. <filename>krusader_1.70.1-1_amd64.deb</filename>. Simply described it is a special archive containing all the program files and their proposed location on the system." +msgstr "C'est un format de fichier binaire qui est utilisé par <ulink url=\"http://fr.wikipedia.org/wiki/Debian\">&debian;</ulink> et les distributions fondées sur &debian;. C'est un suffixe d'un fichier d'installation spécialement construit pour ces distributions, &pex; <filename>krusader_1.70.1-1_amd64.deb</filename>. Décrit simplement, c'est une archive spéciale contenant les fichiers programme et leurs emplacements proposés sur le système." + +#. Tag: acronym +#: glossary.docbook:90 +#, no-c-format +msgid "DCOP" +msgstr "<acronym>DCOP</acronym>" + +#. Tag: para +#: glossary.docbook:93 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Dcop\">Desktop Communication Protocol</ulink>; the interprocess communication protocol used by &kde; desktop environment. It enables various &kde; applications to communicate with each other." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/DCOP\">Desktop Communication Protocol</ulink> est le protocole de communication inter processus utilisé par l'environnement de bureau &kde;. Cela permet aux différentes applications &kde; de communiquer entre elles." + +#. Tag: acronym +#: glossary.docbook:103 +#, no-c-format +msgid "<acronym>FAQ</acronym>" +msgstr "<acronym>FAQ</acronym>" + +#. Tag: para +#: glossary.docbook:106 +#, no-c-format +msgid "<link linkend=\"faq\">Frequently Asked Questions</link>; a document where questions that arise many times are answered. If you have a question to the developers of &krusader;, you should always have a look at the &faq-lnk; first." +msgstr "<link linkend=\"faq\">Foire aux questions</link> : un document où les questions qui reviennent souvent sont répondues. Si vous avez une question pour les développeurs de &krusader;, vous devriez toujours avoir un œil sur la &faq-lnk; en premier." + +#. Tag: glossterm +#: glossary.docbook:115 +#, no-c-format +msgid "&FTP;" +msgstr "&FTP;" + +#. Tag: para +#: glossary.docbook:117 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/File_Transfer_Protocol\"> File Transfer Protocol</ulink>; it is an Internet protocol that allows you to retrieve files from so-called &FTP; servers." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/File_Transfer_Protocol\"> File Transfer Protocol</ulink> est un protocole Internet qui vous permet de recevoir des fichiers depuis des serveurs appelés &FTP;." + +#. Tag: acronym +#: glossary.docbook:126 +#, no-c-format +msgid "<acronym>GPL</acronym>" +msgstr "<acronym>GPL</acronym>" + +#. Tag: para +#: glossary.docbook:129 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Gpl\">GNU General Public License</ulink>; a software license created by the <ulink url=\"http://www.fsf.org/\">Free Software Foundation</ulink> defining the terms for releasing free software." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Licence_publique_générale_GNU\">GNU General Public License</ulink> : une licence logiciel créée par la <ulink url=\"http://www.fsf.org/\">Free Software Foundation</ulink> définissant les termes pour la version d'un logiciel libre." + +#. Tag: glossterm +#: glossary.docbook:138 +#, no-c-format +msgid "&GUI;" +msgstr "&GUI;" + +#. Tag: para +#: glossary.docbook:140 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Graphical_user_interface\"> Graphical User Interface</ulink>." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Environnement_graphique\"> Interface Graphique Utilisateur</ulink>." + +#. Tag: acronym +#: glossary.docbook:147 +#, no-c-format +msgid "<acronym>ISO</acronym>" +msgstr "<acronym>ISO</acronym>" + +#. Tag: para +#: glossary.docbook:150 +#, no-c-format +msgid "An <ulink url=\"http://en.wikipedia.org/wiki/ISO_image\">ISO image</ulink> (.iso) is an informal term for a disk image of an ISO 9660 file system. More loosely, it refers to any optical disk image, even a UDF image." +msgstr "Une <ulink url=\"http://fr.wikipedia.org/wiki/Image_disque\">image ISO</ulink> (.iso) est un terme informel pour une image disque d'un système de fichiers ISO 9660. Plus généralement, cela renvoie aux images disque optique, même une image UDF." + +#. Tag: glossterm +#: glossary.docbook:158 +#, no-c-format +msgid "&kde;" +msgstr "&kde;" + +#. Tag: para +#: glossary.docbook:160 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Kde\">K Desktop Environment</ulink>; a project to develop a free graphical desktop environment for &UNIX; compatible systems." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/KDE\">K Desktop Environment</ulink> : un projet pour développer un environnement de bureau graphique libre pour les systèmes compatibles &UNIX;." + +#. Tag: glossterm +#: glossary.docbook:168 +#, no-c-format +msgid "Key Binding" +msgstr "Raccourcis clavier" + +#. Tag: para +#: glossary.docbook:170 +#, no-c-format +msgid "All features of &krusader; are available through the menubar, but you can also bind (link) a certain key combination to that function. You will find, however, that using the <link linkend=\"keyboard-commands\">keyboard</link> is remakably faster than using the menubar or <link linkend=\"gloss-gui\">GUI</link>. <link linkend=\"keyboard-commands\">Keyboard usage</link> is an important tool for <link linkend=\"gloss-ofm\">Orthodox File Managers</link>. &krusader; comes with several predefined &keybindigs-lnk;." +msgstr "Toutes les fonctionnalités de &krusader; sont disponibles dans la barre de menus, mais vous pouvez aussi créer un raccourci (ou lier) une combinaison de touche pour cette fonctionnalité. Vous trouverez, cependant, qu'utiliser le <link linkend=\"keyboard-commands\">clavier</link> est plus rapide qu'utiliser la barre de menus ou le <link linkend=\"gloss-gui\">GUI</link>. <link linkend=\"keyboard-commands\">L'utilisation du clavier</link> est un outil important pour les <link linkend=\"gloss-ofm\">OFM</link>. &krusader; est fourni avec plusieurs &keybindigs-lnk;. pré définis." + +#. Tag: glossterm +#: glossary.docbook:185 +#, no-c-format +msgid "Kpart" +msgstr "KPart" + +#. Tag: para +#: glossary.docbook:187 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/KPart\"> Kpart</ulink>; KParts is the name of the component framework for the &kde; desktop environment. KParts are analogous to Bonobo components in &gnome-url;, both of which are based on the same concepts as &Microsoft;'s Object Linking and Embedding. e.g. if you use &krusader;'s viewer to view a PDF file, KPDF wil be launched inside &krusader;'s viewer." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/KParts\"> KParts</ulink> est le nom du composant de l'architecture pour le bureau d'environnement &kde;. KParts est analogue au composant Bonobo dans &gnome-url;, les deux étant fondés sur les mêmes concepts que Object Linking and Embedding de Microsoft, &pex; si vous utilisez l'afficheur de &krusader; pour afficher un fichier PDF, KPDF sera lancé dans l'afficheur de &krusader;." + +#. Tag: glossterm +#: glossary.docbook:200 +#, no-c-format +msgid "<acronym>KIO</acronym> or kioslave" +msgstr "<acronym>KIO</acronym> ou module d'entrées / sorties" + +#. Tag: para +#: glossary.docbook:203 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Kioslave\">KDE Input/Output</ulink>; also known as &kioslaves1-url; is part of the &kde; architecture. It provides access to files, web sites and other resources through a single consistent API." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/KIO\">Le module entrées / sorties de KDE</ulink> aussi connue comme &kioslaves1-url; est une partie de l'architecture de &kde;. Cela fournit un accès aux fichiers, sites web et d'autres ressources à travers une simple API compatible." + +#. Tag: glossterm +#: glossary.docbook:212 +#, no-c-format +msgid "mount" +msgstr "Mount" + +#. Tag: para +#: glossary.docbook:214 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Mount_%28computing%29\"> Mouting</ulink>; in computer science, is the process of making a file system ready for use by the operating system, typically by reading certain index data structures from storage into memory ahead of time. The term recalls a period in the history of computing when an operator had to mount a magnetic tape or hard disk on a spindle before using it." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Point_de_montage\">Le point de montage</ulink>, en science de l'informatique, est le procédé par lequel réaliser un système de fichiers prêt à être utilisé par un système d'exploitation, typiquement en lisant certaines structures de données indexées depuis un stockage dans une mémoire dans le temps. Le terme fait appel à une période de l'histoire de l'informatique quand un opérateur devait monter une cassette magnétique ou un disque dur sur un axe avant de l'utiliser." + +#. Tag: acronym +#: glossary.docbook:227 +#, no-c-format +msgid "<acronym>OFM</acronym>" +msgstr "<acronym>OFM</acronym>" + +#. Tag: para +#: glossary.docbook:230 +#, no-c-format +msgid "<ulink url=\"http://www.softpanorama.org/OFM/index.shtml\"> Orthodox File Manager</ulink>; also known as \"Commanders\". Members of this family of file managers use simple yet very powerful interface that is a direct derivative of the <ulink url=\"http://en.wikipedia.org/wiki/Norton_Commander\"> Norton Commander</ulink> (NC) interface." +msgstr "<ulink url=\"http://www.softpanorama.org/OFM/index.shtml\"> Orthodox File Manager</ulink> ou Gestionnaire de Fichiers Orthodox aussi connu sous le nom « Commanders ». Membres de cette famille de gestionnaires de fichiers utilisant une interface simple et très puissante qui est un dérivé direct de l'interface <ulink url=\"http://en.wikipedia.org/wiki/Norton_Commander\"> Norton Commander</ulink> (NC)." + +#. Tag: glossterm +#: glossary.docbook:240 +#, no-c-format +msgid "<glossterm>RPM</glossterm>" +msgstr "<glossterm>RPM</glossterm>" + +#. Tag: para +#: glossary.docbook:242 +#, no-c-format +msgid "This is the binary file format for distributions based on the <ulink url=\"http://www.rpm.org/\">RPM Package Manager</ulink>, a widely used packaging tool for the &Linux; operating system. If you still have to get &krusader; and your system supports RPM packages, you should get &krusader; packages ending in .rpm." +msgstr "C'est le format de fichier binaire pour les distributions fondées sur le <ulink url=\"http://www.rpm.org/\">RPM Package Manager</ulink>, un outil de paquetages largement utilisé pour les systèmes d'exploitation &Linux;. Si vous vous devez toujours récupérer &krusader; et que votre système gère les paquetages RPM, vous devriez prendre le paquetage &krusader; se terminant par .rpm." + +#. Tag: glossterm +#: glossary.docbook:253 +#, no-c-format +msgid "<acronym>SSH</acronym>, Secure Shell" +msgstr "<acronym>SSH</acronym>, Secure Shell" + +#. Tag: para +#: glossary.docbook:256 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/SSH\">SSH</ulink>; is a set of standards and an associated network protocol that allows establishing a secure channel between a local and a remote computer." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Secure_shell\">SSH</ulink> est un ensemble de standards et un protocole réseau associé qui permet d'établir un canal sécurisé entre un ordinateur local et distant." + +#. Tag: glossterm +#: glossary.docbook:263 +#, no-c-format +msgid "<acronym>SVN</acronym>, Subversion" +msgstr "<acronym>SVN</acronym>, Subversion" + +#. Tag: para +#: glossary.docbook:266 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Subversion\"> Subversion</ulink>; a version control system that is a compelling replacement for <link linkend=\"gloss-cvs\">CVS</link>. It is used by many software projects including &kde; and &krusader;." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Subversion_(logiciel)\"> Subversion</ulink> est un système de contrôle de version qui est un remplaçant convaincant à <link linkend=\"gloss-cvs\">CVS</link>. Il est utilisé par de nombreux projets logiciels incluant &kde; et &krusader;." + +#. Tag: glossterm +#: glossary.docbook:276 +#, no-c-format +msgid "Terminal emulator" +msgstr "Émulateur de terminal" + +#. Tag: para +#: glossary.docbook:278 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Terminal_emulator\"> Terminal emulator</ulink>; simply a windowed shell; this is known as command line window in some other environments. If you want to use the shell and type the commands, you should know at least a few of the system-level commands for your operating system." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Émulateur_de_terminal\">Un émulateur de terminal</ulink> est un interpréteur de commande sous forme de fenêtre, connu sous le nom de « fenêtre de ligne de commande » dans d'autres environnements. Si vous voulez utiliser le terminal et saisir les commandes, vous devez connaître au moins quelques commandes système pour votre système d'exploitation." + +#. Tag: acronym +#: glossary.docbook:289 +#, no-c-format +msgid "POSIX" +msgstr "POSIX" + +#. Tag: para +#: glossary.docbook:292 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Posix\">\"Portable Operating System Interface for uniX\"</ulink>; a collective name of a family of related standards specified by the IEEE to define the application programming interface (API) for software compatible with variants of the &UNIX; operating system." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/POSIX\">Portable Operating System Interface for uniX</ulink> est un nom collectif d'une famille de de standards relatifs spécifiés par l'IEEE pour définir l'interface de programme d'application (API) pour un logiciel compatible avec les variantes du système d'exploitation &UNIX;." + +#. Tag: acronym +#: glossary.docbook:303 +#, no-c-format +msgid "&URL;" +msgstr "&URL;" + +#. Tag: para +#: glossary.docbook:306 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/URL\">Universal Resource Locater</ulink>; a universal resource locater is the technical term for what is commonly referred to as a websites address. Examples of URLs include <ulink url=\"http://krusader.sourceforge.net\"> http://krusader.sourceforge.net</ulink> and &remote-connections-lnk;." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Uniform_Resource_Locator\">Universal Resource Locater</ulink> : une URL est un terme technique pour ce qui se réfère communément à une adresse de site web. Des exemples d'URL inclus <ulink url=\"http://krusader.sourceforge.net\"> http://krusader.sourceforge.net</ulink> et &remote-connections-lnk;." + +#. Tag: acronym +#: glossary.docbook:318 +#, no-c-format +msgid "<acronym>VFS</acronym>" +msgstr "<acronym>VFS</acronym>" + +#. Tag: para +#: glossary.docbook:321 +#, no-c-format +msgid "&vfs-lnk; is a basic <link linkend=\"features\">OFM feature</link>, this an abstracted layer over all kinds of archived information (ZIP files, FTP servers, TAR archives, NFS filesystems, SAMBA shares, ISO cd/dvd images, RPM catalogs, etc.), which allows the user to access all the information in these divergent types of file systems transparently - just like entering an ordinary sub-directory! &krusader; supports several &vfs-lnk;." +msgstr "&vfs-lnk; est une <link linkend=\"features\">fonctionnalité OFM</link> basique. C'est une couche abstraite au dessus de tous types d'informations archivées (fichiers ZIP, serveurs FTP, archives TAR, systèmes de fichiers NFS, partages SAMBA, images CD et DVD ISO, catalogues de RPM, etc.) qui permet à l'utilisateur d'avoir accès à toutes les informations dans ces types divergents de systèmes de fichiers de manière transparente - comme simplement naviguer dans un sous dossier ordinaire ! &krusader; gère de nombreux &vfs-lnk;." + +#. Tag: glossterm +#: glossary.docbook:333 +#, no-c-format +msgid "<glossterm>XML</glossterm>" +msgstr "<glossterm>XML</glossterm>" + +#. Tag: para +#: glossary.docbook:335 +#, no-c-format +#, fuzzy +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Xml\">Extensible Markup Language</ulink>; a very flexible text format derived from SGML (ISO 8879). Originally designed to meet the challenges of large-scale electronic publishing, XML is also playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Extensible_Markup_Language\">Extensible Markup Language</ulink> est un format de texte très flexible dérivé de SGML (ISO 8879). ?????????????????????????. XML joue aussi un rôle de plus en plus important dans l'échange d'une large variété de données sur le Web et ailleurs." + +#. Tag: glossterm +#: glossary.docbook:345 +#, no-c-format +msgid "Zeroconf" +msgstr "Zeroconf" + +#. Tag: para +#: glossary.docbook:347 +#, no-c-format +msgid "<ulink url=\"http://en.wikipedia.org/wiki/Zeroconf\">Zeroconf</ulink>; or Zero Configuration Networking is a set of techniques that automatically create a usable IP network without configuration or special servers. This allows inexpert users to connect computers, networked printers, and other items together and expect them to work automatically." +msgstr "<ulink url=\"http://fr.wikipedia.org/wiki/Zeroconf\">Zeroconf</ulink> ou Zero Configuration Networking est un ensemble de techniques qui créée automatiquement un réseau d'IP utilisable sans configuration ou serveurs spéciaux. Cela permet aux utilisateurs inexpérimentés de connecter des ordinateurs, des imprimantes en réseaux et d'autres éléments et attendre d'eux qu'ils fonctionnent automatiquement." + Added: trunk/krusader_kde4/doc/i18n/fr/installation.docbook.po =================================================================== --- trunk/krusader_kde4/doc/i18n/fr/installation.docbook.po (rev 0) +++ trunk/krusader_kde4/doc/i18n/fr/installation.docbook.po 2009-02-27 10:36:09 UTC (rev 6229) @@ -0,0 +1,1081 @@ +# translation of installation.docbook.po to français +# Copyright (C) 2009, Krusader Krew +# This file is distributed under the same license as the Krusader package +# +# Stanislas Zeller <unc...@gm...>, 2009. +msgid "" +msgstr "" +"Project-Id-Version: installation.docbook\n" +"Report-Msgid-Bugs-To: <fra...@ya...>\n" +"POT-Creation-Date: 2008-08-03 20:04+0000\n" +"PO-Revision-Date: 2009-02-09 13:51+0100\n" +"Last-Translator: Stanislas Zeller <unc...@gm...>\n" +"Language-Team: français <kde...@kd...>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. Tag: title +#: installation.docbook:22 +#, no-c-format +msgid "Installation of Krusader on KDE4.x" +msgstr "Installation de Krusader sur KDE4.x" + +#. Tag: primary +#: installation.docbook:24 +#, no-c-format +msgid "Installation" +msgstr "Installation" + +#. Tag: title +#: installation.docbook:27 +#, no-c-format +msgid "Requirements" +msgstr "Exigences" + +#. Tag: para +#: installation.docbook:28 +#, no-c-format +msgid "In order to successfully use the most recent &krusader;, you need &kde;libs >= 4.x" +msgstr "Pour utiliser correctement la plus récente version de &krusader;, vous avez besoin de &kde;libs >= 4.x" + +#. Tag: para +#: installation.docbook:31 +#, no-c-format +msgid "Required &kde; version: <itemizedlist> <listitem> <para>&krusader; v1.01: &kde; 2</para> </listitem> <listitem> <para>&krusader; v1.02 - 1.40: &kde; 3.0 - &kde; 3.2</para> </listitem> <listitem> <para>&krusader; 1.40: prefers &kde; 3.2 (otherwise all features will not be available)</para> </listitem> <listitem> <para>&krusader; v1.50 - v1.51: &kde; 3.2 - &kde; 3.3 (Konfigurator crash on &kde; 3.4)</para> </listitem> <listitem> <para>&krusader; v1.60.0 - v1.70.0: &kde; 3.3 - &kde; 3.5</para> </listitem> <listitem> <para>&krusader; 1.70.x: prefers &kde; >= 3.4 (otherwise all features will not be available)</para> </listitem> <listitem> <para>&krusader; 1.80.0: &kde; 3.4 - &kde; 3.5</para> </listitem> <listitem> <para>&krusader; 1.90.0: &kde; 3.2 - &kde; 3.5</para> </listitem> <listitem> <para>&krusader; v2.x.x: &kde; 4.x</para> </listitem> </itemizedlist> NOTE: for installation instructions for &krusader;-1.x for &kde; 2 click <link linkend=\"kde3_install\">here</link>." +msgstr "Version de &kde; requise : <itemizedlist> <listitem> <para>&krusader; v1.01 : &kde; 2</para> </listitem> <listitem> <para>&krusader; v1.02 - 1.40 : &kde; 3.0 - &kde; 3.2</para> </listitem> <listitem> <para>&krusader; 1.40 : préfère &kde; 3.2 (sinon toutes les fonctionnalités ne seront pas possible)</para> </listitem> <listitem> <para>&krusader; v1.50 - v1.51 : &kde; 3.2 - &kde; 3.3 (Konfigurator plante avec &kde; 3.4)</para> </listitem> <listitem> <para>&krusader; v1.60.0 - v1.70.0 : &kde; 3.3 - &kde; 3.5</para> </listitem> <listitem> <para>&krusader; 1.70.x : préfère &kde; >= 3.4 (sinon toutes les fonctionnalités ne seront pas possible)</para> </listitem> <listitem> <para>&krusader; 1.80.0 : &kde; 3.4 - &kde; 3.5</para> </listitem> <listitem> <para>&krusader; 1.90.0 : &kde; 3.2 - &kde; 3.5</para> </listitem> <listitem> <para>&krusader; v2.x.x : &kde; 4.x</para> </listitem> </itemizedlist> REMARQUE : pour les instructions d'installation pour la version de &krusader;-1.x de &kde; 2 cliquez <link linkend=\"kde3_install\">ici</link>." + +#. Tag: para +#: installation.docbook:73 +#, no-c-format +msgid "Platforms:" +msgstr "Plate formes : " + +#. Tag: para +#: installation.docbook:76 +#, no-c-format +msgid "All POSIX (&Linux;/BSD/&UNIX;-like OSes), &Solaris;" +msgstr "Tous les systèmes POSIX (&Linux; / BSD / &UNIX;), &Solaris;" + +#. Tag: para +#: installation.docbook:81 +#, no-c-format +msgid "All BSD Platforms (&freebsd;/&netbsd;/&openbsd;/&MacOS;)" +msgstr "Toutes les plate formes BSD (&freebsd; / &netbsd; / &openbsd; / &MacOS;)" + +#. Tag: para +#: installation.docbook:85 +#, no-c-format +msgid "&Windows; XP and Vista" +msgstr "&Windows; XP et Vista" + +#. Tag: para +#: installation.docbook:88 +#, no-c-format +msgid "In order to handle archives, checksums and other utilities they must be configured in our <link linkend=\"konfig-dependencies\">configuration tool</link>. When running &krusader; for the first time the available utilities will be autodetected, and a report will be shown in the first lanch wizard. Afterwards additional utilities can be <link linkend=\"konfig-dependencies\">added/removed/changed</link>." +msgstr "Afin de prendre en main les archives, les sommes de contrôle et autres utilitaires, ils doivent être configurés dans votre <link linkend=\"konfig-dependencies\">outil de configuration</link>. Quand &krusader; est lancé pour la première fois, les utilitaires disponibles seront automatiquement détectés, et un rapport sera affiché au premier lancement de l'assistant. Ensuite des utilitaires additionnels peuvent être <link linkend=\"konfig-dependencies\">ajoutés / supprimés / modifiés</link>." + +#. Tag: para +#: installation.docbook:93 +#, no-c-format +msgid "A package of popular (un)packers, &krusader; itself and add-ons can be found on the &krudownload-url;." +msgstr "Un paquetage des (dé)compresseurs populaires, &krusader; lui même et les accessoires peuvent être trouvés sur le &krudownload-url;." + +#. Tag: para +#: installation.docbook:96 +#, no-c-format +msgid "For more requirements, see below. Have a look at the &faq-lnk; section as well." +msgstr "Pour plus d'exigences, voir ci-dessous. Jetez aussi un œil à la section &faq-lnk;." + +#. Tag: title +#: installation.docbook:100 +#, no-c-format +msgid "Obtaining &krusader;" +msgstr "Obtenir &krusader;" + +#. Tag: para +#: installation.docbook:101 +#, no-c-format +msgid "The latest information about &krusader; can be found on the &kruwebsite-url; ." +msgstr "La dernière information à propos de &krusader; peut être trouvée sur le &kruwebsite-url;." + +#. Tag: title +#: installation.docbook:104 +#, no-c-format +msgid "&krusader; Downloads" +msgstr "Télécharger &krusader;" + +#. Tag: para +#: installation.docbook:105 +#, no-c-format +msgid "It is recommended to use the &krusader; package that is provided by your distribution. &distrowatch-com-url; is a great resource to check the availability. If your distribution does not offer &krusader;, please contact the creators of your distribution and ask them to provide a &krusader; package" +msgstr "Il est recommandé d'utiliser le paquetage de &krusader; qui est fourni avec votre distribution. &distrowatch-com-url; est une superbe ressource pour vérifier sa disponibilité. Si votre distribution n'inclut pas &krusader;, veuillez contacter les créateurs de votre distribution et demandez leur de fournir un paquetage de &krusader;." + +#. Tag: para +#: installation.docbook:112 +#, no-c-format +msgid "The latest version, as well as the older versions, can be found on the &krudownload-url; and on the &sfmirrors-url;. It contains the source tarballs, RPM and DEB packages to whatever distro the &krusader;-Krew is using and packages build by &krusader; users and third parties." +msgstr "La dernière version, au bien que les anciennes versions peuvent être trouvées sur le &krudownload-url; et sur le &sfmirrors-url;. Il contient les archives source, des paquetages RPM et DEB pour les distributions que l'équipe de &krusader; utilise et des paquetages construits par les utilisateurs de &krusader; et externes." + +#. Tag: para +#: installation.docbook:118 +#, no-c-format +msgid "Distributions who provide &krusader;: <itemizedlist> <listitem> <para>&suse-download-url;</para> </listitem> <listitem> <para>&fedora-download-url; via <command># yum install krusader</command> will do the job, thanks to Marcin Garski. &RedHat; RPM packages can usually found on the &krudownload-url; or at &dag-wiers-download-url; and &dries-verachtert-download-url; .</para> </listitem> <listitem> <para>&debian-download-url;, on our &krudownload-url; you might find more recent DEB packages. Note: usually &debian; packages work also on distributions that are \"based on &debian;\", and some of these provide their own (incompatible) packages. &ubuntu-kubuntu-download-url;, &linspire-freespire-download-url;, &knoppix; 4.x DVD, &kanotix;, etc.</para> </listitem> <listitem> <para>&mandriva-download-url; via the contrib repository <command># urpmi krusader</command> will do the job, &gentoo-download-url;, &yoper-download-url;.</para> </listitem> <listitem> <para>&archlinux-download-url;, &frugalware-linux-download-url;, &pclinuxos-download-url;, &altlinux-download-url;.</para> </listitem> <listitem> <para>&freebsd-download-url;, the port is maintained by <link linkend=\"credits\">Heiner Eichmann</link>.</para> </listitem> <listitem> <para>&netbsd-download-url;, &lunarlinux-download-url; ,&arklinux;, &openlx;, &sourcemage;.</para> </listitem> <listitem> <para>Even more distributions can be found with &distrowatch-com-url;.</para> </listitem> </itemizedlist>Use the installation tools included in your distro to install the &krusader; package. You might need an internet connection if &krusader; is not included on the &CD; or DVD. There are probably other distributions which include &krusader;. If you know of one, please send feedback so that we can include it on the distrolist." +msgstr "Les distributions qui fournissent &krusader; : <itemizedlist> <listitem> <para>&suse-download-url;</para> </listitem> <listitem> <para>&fedora-download-url; via <command># yum install krusader</command> feront leur travail, merci à Marcin Garski. &RedHat; les paquetages RPM peuvent être habituellement trouvés sur le &krudownload-url; ou sur &dag-wiers-download-url; et &dries-verachtert-download-url; .</para> </listitem> <listitem> <para>&debian-download-url;, sur notre &krudownload-url; vous devriez trouver les plus récents paquetages DEB. Remarque : habituellement les paquetages &debian; fonctionnent aussi sur les distributions qui sont fondées sur &debian;, et certaine d'entres elles fournissent leurs propres paquetages (incompatibles). &ubuntu-kubuntu-download-url;, &linspire-freespire-download-url;, &knoppix; 4.x DVD, &kanotix;, etc.</para> </listitem> <listitem> <para>&mandriva-download-url; via le dépôt contrib <command># urpmi krusader</command> fera le travail, &gentoo-download-url;, &yoper-download-url;.</para> </listitem> <listitem> <para>&archlinux-download-url;, &frugalware-linux-download-url;, &pclinuxos-download-url;, &altlinux-download-url;.</para> </listitem> <listitem> <para>&freebsd-download-url;, le port est maintenu par <link linkend=\"credits\">Heiner Eichmann</link>.</para> </listitem> <listitem> <para>&netbsd-download-url;, &lunarlinux-download-url; ,&arklinux;, &openlx;, &sourcemage;.</para> </listitem> <listitem> <para>Plus de distributions peuvent être trouvés avec &distrowatch-com-url;.</para> </listitem> </itemizedlist>Utilisez l'outil d'installation inclu dans votre distribution pour installer le paquetage &krusader;. Vous aurez besoin d'une connexion internet si &krusader; n'est pas inclu sur le &CD; ou DVD. Il y a probablement d'autres distributions qui incluent &krusader;. Si vous en connaissez une, veuillez envoyer un commentaire pour que nous l'incluions dans la liste des distributions." + +#. Tag: para +#: installation.docbook:177 +#, no-c-format +msgid "Others" +msgstr "Autres" + +#. Tag: para +#: installation.docbook:180 +#, no-c-format +msgid "&slackware; tgz binaries can usually be found on the &krudownload-url;. You can also use &portpkg-url; that contains a &kru-slackbuild-url;, <command># portpkg krusader</command> will do the job." +msgstr "Les binaires tgz de &slackware; peuvent être habituellement trouvés sur le &krudownload-url;. Vous pouvez aussi utiliser &portpkg-url; qui contient un &kru-slackbuild-url;, <command># portpkg krusader</command> fera le travail." + +#. Tag: para +#: installation.docbook:188 +#, no-c-format +msgid "There is a &macosx-port-url; with the help of &fink-url; , the port is maintained by <ulink url=\"http://hritcu.wordpress.com/about/\">Catalin Hritcu</ulink>." +msgstr "Il y a un &macosx-port-url; avec l'aide de &fink-url;, le port est maintenu par <ulink url=\"http://hritcu.wordpress.com/about/\">Catalin Hritcu</ulink>." + +#. Tag: para +#: installation.docbook:193 +#, no-c-format +msgid "Installation via the &klik-protocol-url;" +msgstr "Installation par le &klik-protocol-url;" + +#. Tag: para +#: installation.docbook:196 +#, no-c-format +msgid "&klik-krusader-url; downloads &krusader; provided by &debian; stable, more information is &klik-available-url; ." +msgstr "&klik-krusader-url; télécharge &krusader; fourni par la branche stable de &debian;, plus d'informations est &klik-available-url;." + +#. Tag: para +#: installation.docbook:202 +#, no-c-format +msgid "&klik-krusader-latest-url; downloads the latest &klik-stable-krusader-url; provided by the &krusader; Krew." +msgstr "&klik-krusader-latest-url; télécharge la dernière &klik-stable-krusader-url; fourni par l'équipe de &krusader;." + +#. Tag: para +#: installation.docbook:207 +#, no-c-format +msgid "&klik-krusader-cvs-url; downloads a &klik-cvs-krusader-url; provided by the &krusader; Krew." +msgstr "&klik-krusader-cvs-url; télécharge un &klik-cvs-krusader-url; fourni par l'équipe de &krusader;." + +#. Tag: para +#: installation.docbook:212 +#, no-c-format +msgid "Search engines <itemizedlist> <listitem> <para>You can also find packages on &Linux; software archives such as &freshmeat-url; or &kde-apps-url; .</para> </listitem> <listitem> <para>If you can notfind a package for your distribution, we recommend searching for it with &rpmfind-url;, &rpmpbone-url; or &rpmseek-url;.</para> </listitem> </itemizedlist>If you enjoy using &krusader;, we would appreciate it if you went to one of these sites and rated it." +msgstr "Moteurs de recherche <itemizedlist> <listitem> <para>Vous pouvez aussi trouver des paquetages dans les archives logiciels de &Linux; comme &freshmeat-url; ou &kde-apps-url; .</para> </listitem> <listitem> <para>Si vous ne pouvez pas trouver un paquetage pour votre distribution, nous vous recommandons de le chercher avec &rpmfind-url;, &rpmpbone-url; ou &rpmseek-url;.</para> </listitem> </itemizedlist>Si vous appréciez l'utilisation de &krusader;, nous apprécierions si vous alliez sur un de ces sites et le notiez." + +#. Tag: para +#: installation.docbook:228 +#, no-c-format +msgid "If you still can not find a package, follow the installation procedure on how to compile &krusader; from source. This very thorough HowTo describes the process in such detail that even newcomers should not have any problems." +msgstr "Si vous ne trouver toujours pas un paquetage, suivez la procédure d'installation sur la manière de compiler &krusader; depuis les sources. Ce très exhaustif HOWTO (Comment Faire) décrit le processus dans de tels détails que même un nouveau venu ne devrait pas avoir de problèmes." + +#. Tag: title +#: installation.docbook:235 +#, no-c-format +msgid "Version Scheme" +msgstr "Version de projet" + +#. Tag: para +#: installation.docbook:236 +#, no-c-format +msgid "A new version scheme has been used since &krusader;-1.60.0 <itemizedlist> <listitem> <para>First digit - the major version</para> </listitem> <listitem> <para>Second digit(s) - percentage of features completed for this major version</para> </listitem> <listitem> <para>Third digit(s) - bugfixes.</para> </listitem> </itemizedlist>In essence, releasing &krusader;-1.60.0 means that we believe that &krusader; is about 60% done with all the features we had scheduled for the 1.x.x series. Series 2.x.x will be &kde; 4.x releases. Hopefully, it is easy to understand." +msgstr "Une nouvelle version de projet a été utilisée depuis &krusader;-1.60.0 <itemizedlist> <listitem> <para>Premier chiffre - la version majeure</para> </listitem> <listitem> <para>Deuxième chiffre(s) - pourcentage des fonctionnalités complétées pour cette version majeure</para> </listitem> <listitem> <para>Troisième chiffre - correctifs de bogues.</para> </listitem> </itemizedlist>Par définition, sortir la version de &krusader;-1.60.0 signifie que nous croyons que &krusader; est développé à 60 % avec toutes les fonctionnalités que nous avons planifiées pour les séries 1.x.x. Les séries 2.x.x seront des versions pour &kde; 4.x. Nous espérons que cela est simple à comprendre." + +#. Tag: title +#: installation.docbook:257 +#, no-c-format +msgid "Stable Version" +msgstr "Version stable" + +#. Tag: filename +#: installation.docbook:259 +#, no-c-format +msgid "krusader-x.xx.tar.gz" +msgstr "krusader-x.xx.tar.gz" + +#. Tag: para +#: installation.docbook:262 +#, no-c-format +msgid "&krusader; is released under the &gpl-lnk;. This means that THE PROGRAM IS PROVIDED \"AS IS\" WITH NO WARRANTY OF ANY KIND, even when it is marked as a stable release." +msgstr "&krusader; est enregistré sous la licence &gpl-lnk;. Cela signifie que LE PROGRAMME EST FOURNI « TEL QUEL » SANS GARANTIES DE QUELQUES SORTES QUE CE SOIT, même quand la version est marquée comme une version stable." + +#. Tag: title +#: installation.docbook:269 +#, no-c-format +msgid "Development Version (beta release)" +msgstr "Version de développement (version beta)" + +#. Tag: filename +#: installation.docbook:271 +#, no-c-format +msgid "krusader-x.xx-betax.tar.gz" +msgstr "krusader-x.xx-betax.tar.gz" + +#. Tag: para +#: installation.docbook:273 +#, no-c-format +msgid "Before every stable release we release at least one development version in order to hunt down the bugs." +msgstr "Avant chaque version stable, nous sortons au moins une version de développement afin de chasser les bogues." + +#. Tag: para +#: installation.docbook:276 +#, no-c-format +msgid "These releases are beta releases and will probably contain some bugs." +msgstr "Ces versions sont des versions beta et contiendront probablement des bogues." + +#. Tag: sect2 +#: installation.docbook:277 +#, no-c-format +msgid "&dev-svn-note;" +msgstr "&dev-svn-note;" + +#. Tag: para +#: installation.docbook:279 +#, no-c-format +msgid "The beta release has 3 goals:" +msgstr "La version beta a trois buts : " + +#. Tag: para +#: installation.docbook:282 +#, no-c-format +msgid "Apply a feature-freeze until the stable is released, only bugs will be fixed. New features have to wait until the stable is released." +msgstr "Appliquer un gel des fonctionnalités développées jusqu'à ce que la version stable est sortie, seul les bogues seront corrigés. Les nouvelles fonctionnalités attendrons la sortie de la nouvelle version stable." + +#. Tag: para +#: installation.docbook:287 +#, no-c-format +msgid "Obtain feedback from &krusader; users so that we can fix the bugs." +msgstr "Obtenir des remarques des utilisateurs de &krusader; afin de corriger des bogues." + +#. Tag: para +#: installation.docbook:291 +#, no-c-format +msgid "Give translators time to update the translations for the coming stable. Please read the &i18n-page-url;." +msgstr "Donner le temps aux traducteurs de mettre à jour les traductions pour la version stable à venir. Veuillez lire la &i18n-page-url;." + +#. Tag: title +#: installation.docbook:387 +#, no-c-format +msgid "Subversion" +msgstr "Subversion" + +#. Tag: para +#: installation.docbook:389 +#, no-c-format +msgid "&subversion-url; is used for our sourcecode repository. It is also possible to &browse-svn-repo-url;." +msgstr "&subversion-url; est utilisé pour le dépôt du code source. Il est aussi possible de &browse-svn-repo-url;." + +#. Tag: para +#: installation.docbook:392 +#, no-c-format +msgid "Currently, there are four module options:" +msgstr "Actuellement, il y a quatre options de module : " + +#. Tag: para +#: installation.docbook:395 +#, no-c-format +msgid "krusader_kde2: the &kde;2 branch, stable but it is basically v1.01 and there are no planned changes" +msgstr "krusader_kde2 : la branche &kde;2 qui est stable mais c'est basiquement une v1.01 et il n'y a pas de modifications de prévues." + +#. Tag: para +#: installation.docbook:400 +#, no-c-format +msgid "krusader_kde3: the &kde;3 branch, stable but it is basically v1.90.0 and there are no planned changes" +msgstr "krusader_kde3 : la branche &kde;3 qui est stable mais c'est basiquement une v1.90.0 et il n'y a pas de modifications de prévues." + +#. Tag: para +#: installation.docbook:405 +#, no-c-format +msgid "krusader_kde4: the &kde;4 branch that we currently use" +msgstr "krusader_kde4 : la branche &kde;4 que nous utilisons actuellement." + +#. Tag: para +#: installation.docbook:409 +#, no-c-format +msgid "trunc: the &kde;4 the development version" +msgstr "trunk : la version de développement de &kde;4." + +#. Tag: para +#: installation.docbook:414 +#, no-c-format +msgid "To check out the latest &krusader; 1.x for &kde; 3 from SVN: <screen><prompt>$</prompt> <userinput><command>svn</command> <option>co https://krusader.svn.sourceforge.net/svnroot/krusader/branches/krusader_kde3/</option></userinput></screen> To check out the latest &krusader; 2.x for &kde; 4 from SVN: <screen><prompt>$</prompt> <userinput><command>svn</command> <option>co https://krusader.svn.sourceforge.net/svnroot/krusader/branches/krusader_kde4/</option></userinput></screen> To check out the latest developement &krusader; 2.x for &kde; 4 from SVN:" +msgstr "Pour réceptionner la dernière version de &krusader; 1.x pour &kde; 3 depuis le SVN : <screen><prompt>$</prompt> <userinput><command>svn</command> <option>co https://krusader.svn.sourceforge.net/svnroot/krusader/branches/krusader_kde3/</option></userinput></screen> Pour réceptionner la dernière version de &krusader; 2.x pour &kde; 4 depuis le SVN : <screen><prompt>$</prompt> <userinput><command>svn</command> <option>co https://krusader.svn.sourceforge.net/svnroot/krusader/branches/krusader_kde4/</option></userinput></screen> Pour réceptionner la dernière version de développement de &krusader; 2.x pour &kde; 4 depuis le SVN : " + +#. Tag: screen +#: installation.docbook:424 +#, no-c-format +msgid "<prompt>$</prompt> <userinput><command>svn</command> <option>co http://krusader.svn.sourceforge.net/svnroot/krusader/trunk/krusader_kde4</option></userinput>" +msgstr "<prompt>$</prompt> <userinput><command>svn</command> <option>co http://krusader.svn.sourceforge.net/svnroot/krusader/trunk/krusader_kde4</option></userinput>" + +#. Tag: title +#: installation.docbook:428 +#, no-c-format +msgid "Older Releases" +msgstr "Anciennes versions" + +#. Tag: para +#: installation.docbook:429 +#, no-c-format +msgid "If you are looking for older releases we recommend the &sfmirrors-url;, available from our project page." +msgstr "SI vous recherchez des anciennes versions, nous recommandons le &sfmirrors-url; disponible sur notre page web." + +#. Tag: title +#: installation.docbook:439 +#, no-c-format +msgid "Krusader installation instructions on KDE4.x" +msgstr "Instructions d'installation de Krusader sur KDE4.x" + +#. Tag: para +#: installation.docbook:441 +#, no-c-format +msgid "From version &krusader;-2.0.0 and higher is &kde;-4 only." +msgstr "Depuis la version &krusader;-2.0.0 et supérieure pour &kde;-4 seulement." + +#. Tag: para +#: installation.docbook:445 +#, no-c-format +msgid "At moment of writing &krusader;-2.0.0 is still under development, though it works :)" +msgstr "Au moment de l'écriture de ces lignes, &krusader;-2.0.0 est toujours en développement, en espérant que cela fonctionne :)" + +#. Tag: para +#: installation.docbook:449 +#, no-c-format +msgid "Even more details about Krusader compilation-installation can be found in the INSTALL file of the Krusader source tarball." +msgstr "Encore plus d'informations à propos de l'installation et la compilation Krusader peuvent être trouvées dans le fichier INSTALL de l'archive source de Krusader." + +#. Tag: para +#: installation.docbook:453 +#, no-c-format +msgid "\"krusader_kde4.tar.gz\" is the supposed name of the krusader tarball (it will be probably a different one ;)" +msgstr "krusader_kde4.tar.gz est le nom supposé de l'archive de Krusader (cela sera probablement un nom différent)." + +#. Tag: para +#: installation.docbook:455 +#, no-c-format +msgid "You can download the latest available krusader-2.x <link linkend=\"krusader_svn\">from SVN</link>." +msgstr "Vous pouvez télécharger la dernière version disponible de krusader-2.x <link linkend=\"krusader_svn\">depuis le SVN</link>." + +#. Tag: title +#: installation.docbook:459 +#, no-c-format +msgid "Krusader dependencies" +msgstr "Dépendances de Krusader" + +#. Tag: para +#: installation.docbook:460 +#, no-c-format +msgid "The next packages are needed to run the Krusader binary." +msgstr "Les paquetages suivants ont besoin de la bibliothèque de Krusader pour se lancer." + +#. Tag: para +#: installation.docbook:464 +#, no-c-format +msgid "c libraries" +msgstr "Bibliothèques C" + +#. Tag: para +#: installation.docbook:467 +#, no-c-format +msgid "kdelibs5 (KDE4 core libraries and binaries for all KDE4 applications)" +msgstr "kdelibs5 (les bibliothèques du cœur de KDE4 et les binaires pour toutes les applications de KDE4)" + +#. Tag: para +#: installation.docbook:470 +#, no-c-format +msgid "libkjsembed1 (Embedded JavaScript library) (for the the optional Javascripting function in Krusader)" +msgstr "libkjsembed1 (Embedded JavaScript library) (pour la fonctionnalité optionnelle du Javascript dans Krusader)" + +#. Tag: title +#: installation.docbook:478 +#, no-c-format +msgid "Suggested packages" +msgstr "Paquetages suggérés" + +#. Tag: para +#: installation.docbook:479 +#, no-c-format +msgid "These packages are optional but they will make Krusader much more powerful and useful." +msgstr "Ces paquetages sont optionnels mais ils rendront Krusader plus puissant et utilisable." + +#. Tag: para +#: installation.docbook:481 +#, no-c-format +msgid "The next packages are the names that Debian/Ubuntu uses, other Linux distros will probably use similar names." +msgstr "Les paquetages suivants ont les noms que Debian / Ubuntu utilisent, les autres distributions Linux auront probablement des noms similaires." + +#. Tag: para +#: installation.docbook:486 +#, no-c-format +msgid "arj: archiver for .arj files" +msgstr "arj : archiveur pour les fichiers .arj" + +#. Tag: para +#: installation.docbook:489 +#, no-c-format +msgid "ark: graphical archiving tool for KDE" +msgstr "ark : outil d'archivage graphique pour KDE" + +#. Tag: para +#: installation.docbook:492 +#, no-c-format +msgid "bzip2: high-quality block-sorting file compressor - utilities" +msgstr "bzip2 : compresseur de fichiers de haute qualité - utilitaires" + +#. Tag: para +#: installation.docbook:495 +#, no-c-format +msgid "cpio: GNU cpio -- a program to manage archives of files" +msgstr "cpio : GNU cpio - un programme pour gérer des archives de fichiers" + +#. Tag: para +#: installation.docbook:498 installation.docbook:501 +#, no-c-format +msgid "kdebase-bin: core binaries for the KDE base module" +msgstr "kdebase-bin : binaires principaux pour le module de base de KDE" + +#. Tag: para +#: installation.docbook:504 +#, no-c-format +msgid "kdiff3: compares and merges 2 or 3 files or directories" +msgstr "kdiff3 : compare et fusionne deux ou trois fichiers ou dossiers" + +#. Tag: para +#: installation.docbook:507 +#, no-c-format +msgid "OR kompare: a KDE GUI for viewing differences between files" +msgstr "OR kompare : une interface graphique KDE pour afficher les différences entres les fichiers" + +#. Tag: para +#: installation.docbook:510 +#, no-c-format +msgid "OR xxdiff: a graphical file and directories comparison and merge tool" +msgstr "OR xxdiff : un fichier graphique et une comparaison de dossiers ainsi qu'un outils de fusion" + +#. Tag: para +#: installation.docbook:513 installation.docbook:519 +#, no-c-format +msgid "khexedit: KDE hex editor" +msgstr "khexedit : éditeur hexadécimal pour KDE" + +#. Tag: para +#: installation.docbook:516 +#, no-c-format +msgid "kmail: KDE Email client" +msgstr "kmail : client de courrier électronique pour KDE" + +#. Tag: para +#: installation.docbook:522 +#, no-c-format +msgid "konsole: X terminal emulator for KDE" +msgstr "konsole : émulateur de terminal X pour KDE" + +#. Tag: para +#: installation.docbook:525 +#, no-c-format +msgid "krename: Powerful batch renamer for KDE" +msgstr "krename : puissant renommeur par lot pour KDE" + +#. Tag: para +#: installation.docbook:528 +#, no-c-format +msgid "lha: lzh archiver" +msgstr "lha : archiveur lzh" + +#. Tag: para +#: installation.docbook:531 +#, no-c-format +msgid "md5deep: versatile file checksum creator and verifier" +msgstr "md5deep : créateur et vérificateur versatile de somme de contrôle de fichiers" + +#. Tag: para +#: installation.docbook:534 +#, no-c-format +msgid "cfv: versatile file checksum creator and verifier" +msgstr "cfv : créateur et vérificateur versatile de somme de contrôle de fichiers" + +#. Tag: para +#: installation.docbook:537 +#, no-c-format +msgid "p7zip: 7zr file archiver with high compression ratio" +msgstr "p7zip : archiveur de fichiers 7zr avec un ratio de compression élevé" + +#. Tag: para +#: installation.docbook:540 +#, no-c-format +msgid "rpm: Red Hat package manager" +msgstr "rpm : gestionnaire de paquetages Red Hat" + +#. Tag: para +#: installation.docbook:543 +#, no-c-format +msgid "unace: extract, test and view .ace archives" +msgstr "unace : extraire, tester et afficher des archives .ace" + +#. Tag: para +#: installation.docbook:546 +#, no-c-format +msgid "unrar: Unarchiver for .rar files (non-free version)" +msgstr "unrar : compresseur pour des fichiers .rar (version non-libre)" + +#. Tag: para +#: installation.docbook:549 +#, no-c-format +msgid "OR unrar-free: Unarchiver for .rar files" +msgstr "OR unrar-free : décompresseur de fichiers .rar" + +#. Tag: para +#: installation.docbook:552 +#, no-c-format +msgid "OR rar: Archiver for .rar files" +msgstr "OR rar : compresseur de fichiers .rar" + +#. Tag: para +#: installation.docbook:555 +#, no-c-format +msgid "unzip: De-archiver for .zip files" +msgstr "unzip : décompresseur de fichiers .zip" + +#. Tag: para +#: installation.docbook:558 +#, no-c-format +msgid "zip: Archiver for .zip files" +msgstr "zip : compresseur de fichiers .zip" + +#. Tag: title +#: installation.docbook:566 +#, no-c-format +msgid "Compilation requirements" +msgstr "Exigences de compilation" + +#. Tag: para +#: installation.docbook:567 +#, no-c-format +msgid "The next packages are needed for compiling Krusader, if you only run a Krusader binary you don't need these packages." +msgstr "Les paquetages suivants sont obligatoires pour compiler Krusader, si vous lancer simplement un binaire de Krusader, vous n'avez pas besoin de ces paquetages." + +#. Tag: para +#: installation.docbook:572 +#, no-c-format +msgid "gcc (The GNU C compiler)" +msgstr "gcc (le compileur GNU C)" + +#. Tag: para +#: installation.docbook:575 +#, no-c-format +msgid "g++ (The GNU C++ compiler)" +msgstr "g++ (le compileur GNU C++)" + +#. Tag: para +#: installation.docbook:578 +#, no-c-format +msgid "cmake (A cross-platform, open-source make system)" +msgstr "cmake (un système make open-source et inter plate formes)" + +#. Tag: para +#: installation.docbook:581 +#, no-c-format +msgid "zlib1g-dev: (library for implementing the deflate compression method found in gzip and PKZIP)" +msgstr "zlib1g-dev (bibliothèques pour implanter la méthode de compression deflate trouvée dans gzip et PKZIP)" + +#. Tag: para +#: installation.docbook:584 +#, no-c-format +msgid "gettext (contains msgfmt)" +msgstr "gettext (contient msgfmt)" + +#. Tag: para +#: installation.docbook:587 +#, no-c-format +msgid "kdelibs5-dev (installs many development libraries for KDE4)" +msgstr "kdelibs5-dev (installe des bibliothèques de développement pour KDE4)" + +#. Tag: para +#: installation.docbook:590 +#, no-c-format +msgid "libphonon-dev (libphonon-dev cross-platform multimedia framework development)" +msgstr "libphonon-dev (architecture multimédia inter plate formes de développement)" + +#. Tag: title +#: installation.docbook:601 +#, no-c-format +msgid "Installing on Linux and BSD platforms" +msgstr "Installation sur des plate formes Linux et BSD" + +#. Tag: para +#: installation.docbook:603 +#, no-c-format +msgid "<command>-DQT_INCLUDES=/usr/share/qt4/include</command> is the location of the QT4 includes" +msgstr "<command>-DQT_INCLUDES=/usr/share/qt4/include</command> est l'emplacement des fichiers d'includes de QT4." + +#. Tag: para +#: installation.docbook:605 +#, no-c-format +msgid "<command>-DCMAKE_INSTALL_PREFIX=/usr/</command> is the location where Krusader will be installed with the make command." +msgstr "<command>-DCMAKE_INSTALL_PREFIX=/usr/</command> est l'emplacement où Krusader sera installé avec la commande make." + +#. Tag: para +#: installation.docbook:608 +#, no-c-format +msgid "An other example is: <command>-DCMAKE_INSTALL_PRFIX=/opt/krusader</command> to install the compiled Krusader in an other directory to not overwrite the Krusader version installed by your package manager." +msgstr "Un autre exemple est : <command>-DCMAKE_INSTALL_PRFIX=/opt/krusader</command> pour installer Krusader compilé dans un autre dossier pour ne pas écraser la version de Krusader installée avec votre gestionnaire de paquetages." + +#. Tag: screen +#: installation.docbook:613 +#, no-c-format +msgid "" +"<prompt>$</prompt> <userinput><command>tar -xzvf</command> <option>krusader_kde4.tar.gz</option></userinput>" +"\n" +" <prompt>$</prompt> <userinput><command>cd </command> <option>krusader_kde4</option></userinput>" +"\n" +" <prompt>$</prompt> <userinput><command>cmake </command> <option>-DCMAKE_INSTALL_PREFIX=/usr/ -DQT_INCLUDES=/usr/share/qt4/include</option></userinput>" +"\n" +" <prompt>$</prompt> <userinput><command>make</command></userinput>" +"\n" +" <prompt>$</prompt> <userinput><command>su -c </command> <option>\"make install\"</option></userinput>" +msgstr "" +"<prompt>$</prompt> <userinput><command>tar -xzvf</command> <option>krusader_kde4.tar.gz</option></userinput>" +"\n" +" <prompt>$</prompt> <userinput><command>cd </command> <option>krusader_kde4</option></userinput>" +"\n" +" <prompt>$</prompt> <userinput><command>cmake </command> <option>-DCMAKE_INSTALL_PREFIX=/usr/ -DQT_INCLUDES=/usr/share/qt4/include</option></userinput>" +"\n" +" <prompt>$</prompt> <userinput><command>make</command></userinput>" +"\n" +" <prompt>$</prompt> <userinput><command>su -c </command> <option>'make install'</option></userinput>" + +#. Tag: para +#: installation.docbook:622 +#, no-c-format +msgid "Uninstall" +msgstr "Désinstallation" + +#. Tag: screen +#: installation.docbook:624 +#, no-c-format +msgid "<prompt>$</prompt> <userinput><command>su -c \"make uninstall\"</command></userinput>" +msgstr "<prompt>$</prompt> <userinput><command>su -c 'make uninstall'</command></userinput>" + +#. Tag: title +#: installation.docbook:632 +#, no-c-format +msgid "Installing on the &MacOS;-X platform" +msgstr "Installation sur la plate forme &MacOS;-X" + +#. Tag: para +#: installation.docbook:636 +#, no-c-format +msgid "Follow the install guidelines of <ulink url=\"http://techbase.kde.org/Getting_Started/Build/KDE4/Mac_OS_X\">techbase.kde.org</ulink>" +msgstr "Suivez le guide d'installation de <ulink url=\"http://techbase.kde.org/Getting_Started/Build/KDE4/Mac_OS_X\">techbase.kde.org</ulink>" + +#. Tag: para +#: installation.docbook:640 +#, no-c-format +msgid "Install the dependencies (including cmake) with <ulink url=\"http://www.finkproject.org/\">Fink</ulink>." +msgstr "Installez les dépendances (incluant cmake) avec <ulink url=\"http://www.finkproject.org/\">Fink</ulink>." + +#. Tag: para +#: installation.docbook:644 +#, no-c-format +msgid "Install the &Qt;-4 binaries available from <ulink url=\"http://mac.kde.org/\">mac.kde.org</ulink>" +msgstr "Installez les binaires &Qt;-4 disponibles sur <ulink url=\"http://mac.kde.org/\">mac.kde.org</ulink>" + +#. Tag: para +#: installation.docbook:648 +#, no-c-format +msgid "Once kdelibs and it's dependencies are up and running." +msgstr "Une fois que kdelibs et ses dépendances sont installées, lancez la compilation." + +#. Tag: para +#: installation.docbook:652 +#, no-c-format +msgid "Proceed with the step of techbase.kde.org \"# Setting_Up_Your_Build_Environment\" and \"# Building_kdelibs\" (here replacing \"kdelibs\" by \"Krusader\" ;-))." +msgstr "Suivez les étapes de techbase.kde.org « # Setting_Up_Your_Build_Environment » et « # Building_kdelibs » (remplacez ici « kdelibs » par « Krusader » ;-))" + +#. Tag: title +#: installation.docbook:661 +#, no-c-format +msgid "Installing on the &Windows; platform" +msgstr "Installation sur une plate forme &Windows;" + +#. Tag: para +#: installation.docbook:663 +#, no-c-format +msgid "Tested on &Windows; XP, not yet tested on &Windows; Vista but it should work." +msgstr "Testé sur &Windows; XP, pas encore testé sur &Windows; Vista mais cela devrait fonctionner." + +#. Tag: para +#: installation.docbook:665 +#, no-c-format +msgid "It's the first time that Krusader compiles on &Windows;, some work needs to be done to make Krusader stable and usable on the &Windows; platform. All feedback is welcome!" +msgstr "C'est la première fois que Krusader compile sous &Windows;, des ajustements sont à prévoir pour rendre Krusader stable et u... [truncated message content] |
From: <vac...@us...> - 2009-02-26 23:26:34
|
Revision: 6228 http://krusader.svn.sourceforge.net/krusader/?rev=6228&view=rev Author: vaclavjuza Date: 2009-02-26 23:26:26 +0000 (Thu, 26 Feb 2009) Log Message: ----------- CHANGED: Changed default Alt+letter shortcuts because of [ 2564684 ]. See the details in SVNNEWS Modified Paths: -------------- trunk/krusader_kde4/ChangeLog trunk/krusader_kde4/SVNNEWS trunk/krusader_kde4/krusader/krusader.cpp Modified: trunk/krusader_kde4/ChangeLog =================================================================== --- trunk/krusader_kde4/ChangeLog 2009-02-25 21:52:24 UTC (rev 6227) +++ trunk/krusader_kde4/ChangeLog 2009-02-26 23:26:26 UTC (rev 6228) @@ -22,6 +22,8 @@ FIXED: [ 2381505 ] Ctrl+Shift+D in editor (KWrite) not work FIXED: Krusader fails to edit files containing international chars with Shift+F4 + CHANGED: Changed default Alt+letter shortcuts because of [ 2564684 ]. + See the details in SVNNEWS CHANGED: Initial Konfigurator size is now 900x680 ARCH: view properties for detailed/brief/interviews are merged into one Modified: trunk/krusader_kde4/SVNNEWS =================================================================== --- trunk/krusader_kde4/SVNNEWS 2009-02-25 21:52:24 UTC (rev 6227) +++ trunk/krusader_kde4/SVNNEWS 2009-02-26 23:26:26 UTC (rev 6228) @@ -6,6 +6,31 @@ - extension to the ChangeLog. ------------------------------------------------------------------------ +Change: alt+letter shortcuts had collisions with dynamically assigned hotkeys +Old schortcut New shortcut Function +Alt+C Alt+Shift+C Compare directories +Alt+D Alt+Shift+S Disk usage +Alt+E Alt+Shift+E Test archive +Alt+K Alt+Shift+K Start Root Mode Krusader +Alt+L Alt+Shift+L Profiles +Alt+O Alt+Shift+O Sync Panels +Alt+P Alt+Shift+P Pack +Alt+Q Alt+Shift+Q Queue Manager +Alt+U Alt+Shift+U Unpack +Alt+Y Alt+Shift+Y Synchron directory changes +not changed: +Alt+Shift+B Brief view +Alt+Shift+D Detailed view +Alt+Home Home +Alt+* Invert Selection +Alt+Left Left Bookmarks +Alt+Right Right Bookmarks +Alt+/ MountMan +Alt+Enter Properties +Alt++ Select All +Alt+- Unselect All +Alt+Down Toggle Popup Panel + New feature: support for tar.lzma (KDE's tar protocol doesn't support it yet) http://www.krusader.org/phpBB/viewtopic.php?t=2032 http://bugs.kde.org/show_bug.cgi?id=176881 Modified: trunk/krusader_kde4/krusader/krusader.cpp =================================================================== --- trunk/krusader_kde4/krusader/krusader.cpp 2009-02-25 21:52:24 UTC (rev 6227) +++ trunk/krusader_kde4/krusader/krusader.cpp 2009-02-26 23:26:26 UTC (rev 6228) @@ -664,17 +664,17 @@ KAction *tmp1, *tmp2, *tmp3; NEW_KACTION( tmp1, i18n( "&New Text File..." ), "document-new", Qt::SHIFT + Qt::Key_F4, SLOTS, SLOT( editDlg() ), "edit_new_file" ); - NEW_KACTION( tmp2, i18n( "Start &Root Mode Krusader" ), "krusader_root", Qt::ALT + Qt::Key_K, SLOTS, SLOT( rootKrusader() ), "root krusader" ); + NEW_KACTION( tmp2, i18n( "Start &Root Mode Krusader" ), "krusader_root", Qt::ALT + Qt::SHIFT + Qt::Key_K, SLOTS, SLOT( rootKrusader() ), "root krusader" ); NEW_KACTION( tmp3, i18n( "F3 View Dialog" ), 0, Qt::SHIFT + Qt::Key_F3, SLOTS, SLOT( viewDlg() ), "F3_ViewDlg" ); - NEW_KACTION(actTest, i18n( "T&est Archive" ), "ark", Qt::ALT + Qt::Key_E, SLOTS, SLOT( testArchive() ), "test archives" ); + NEW_KACTION(actTest, i18n( "T&est Archive" ), "ark", Qt::ALT + Qt::SHIFT + Qt::Key_E, SLOTS, SLOT( testArchive() ), "test archives" ); NEW_KACTION(actFTPNewConnect, i18n( "New Net &Connection..." ), "connect_creating", Qt::CTRL + Qt::Key_N, SLOTS, SLOT( newFTPconnection() ), "ftp new connection" ); - NEW_KACTION(actProfiles, i18n( "Pro&files" ), "kr_profile", Qt::ALT + Qt::Key_L, MAIN_VIEW, SLOT( profiles() ), "profile" ); + NEW_KACTION(actProfiles, i18n( "Pro&files" ), "kr_profile", Qt::ALT + Qt::SHIFT + Qt::Key_L, MAIN_VIEW, SLOT( profiles() ), "profile" ); NEW_KACTION(actCalculate, i18n( "Calculate &Occupied Space" ), "kcalc", 0, SLOTS, SLOT( calcSpace() ), "calculate" ); NEW_KACTION(actCreateChecksum, i18n( "Create Checksum..." ), "binary", 0, SLOTS, SLOT( createChecksum() ), "create checksum" ); NEW_KACTION(actMatchChecksum, i18n( "Verify Checksum..." ), "match_checksum", 0, SLOTS, SLOT( matchChecksum() ), "match checksum" ); NEW_KACTION(actProperties, i18n( "&Properties..." ), 0, Qt::ALT+Qt::Key_Enter, SLOTS, SLOT( properties() ), "properties" ); - NEW_KACTION(actPack, i18n( "Pac&k..." ), "kr_arc_pack", Qt::ALT + Qt::Key_P, SLOTS, SLOT( slotPack() ), "pack" ); - NEW_KACTION(actUnpack, i18n( "&Unpack..." ), "kr_arc_unpack", Qt::ALT + Qt::Key_U, SLOTS, SLOT( slotUnpack() ), "unpack" ); + NEW_KACTION(actPack, i18n( "Pac&k..." ), "kr_arc_pack", Qt::ALT + Qt::SHIFT + Qt::Key_P, SLOTS, SLOT( slotPack() ), "pack" ); + NEW_KACTION(actUnpack, i18n( "&Unpack..." ), "kr_arc_unpack", Qt::ALT + Qt::SHIFT + Qt::Key_U, SLOTS, SLOT( slotUnpack() ), "unpack" ); NEW_KACTION(actSplit, i18n( "Sp&lit File..." ), "kr_split", Qt::CTRL + Qt::Key_P, SLOTS, SLOT( slotSplit() ), "split" ); NEW_KACTION(actCombine, i18n( "Com&bine Files..." ), "kr_combine", Qt::CTRL + Qt::Key_B, SLOTS, SLOT( slotCombine() ), "combine" ); NEW_KACTION(actSelect, i18n( "Select &Group..." ), "kr_select", Qt::CTRL + Qt::Key_Plus, SLOTS, SLOT( markGroup() ), "select group" ); @@ -682,7 +682,7 @@ NEW_KACTION(actUnselect, i18n( "&Unselect Group..." ), "kr_unselect", Qt::CTRL + Qt::Key_Minus, SLOTS, SLOT( unmarkGroup() ), "unselect group" ); NEW_KACTION(actUnselectAll, i18n( "U&nselect All" ), "kr_unselectall", Qt::ALT + Qt::Key_Minus, SLOTS, SLOT( unmarkAll() ), "unselect all" ); NEW_KACTION(actInvert, i18n( "&Invert Selection" ), "kr_invert", Qt::ALT + Qt::Key_Asterisk, SLOTS, SLOT( invert() ), "invert" ); - NEW_KACTION(actCompDirs, i18n( "&Compare Directories" ), "view_left_right", Qt::ALT + Qt::Key_C, SLOTS, SLOT( compareDirs() ), "compare dirs" ); + NEW_KACTION(actCompDirs, i18n( "&Compare Directories" ), "view_left_right", Qt::ALT + Qt::SHIFT + Qt::Key_C, SLOTS, SLOT( compareDirs() ), "compare dirs" ); NEW_KACTION(actSelectNewerAndSingle, i18n( "&Select Newer and Single" ), 0, 0, SLOTS, SLOT( compareSetup() ), "select_newer_and_single" ); NEW_KACTION(actSelectNewer, i18n( "Select &Newer" ), 0, 0, SLOTS, SLOT( compareSetup() ), "select_newer" ); NEW_KACTION(actSelectSingle, i18n( "Select &Single" ), 0, 0, SLOTS, SLOT( compareSetup() ), "select_single" ); @@ -731,9 +731,9 @@ NEW_KACTION(actFind, i18n( "&Search..." ), "system-search", Qt::CTRL + Qt::Key_S, SLOTS, SLOT( search() ), "find" ); NEW_KACTION(actLocate, i18n( "&Locate..." ), "edit-find", Qt::SHIFT+ Qt::CTRL + Qt::Key_L, SLOTS, SLOT( locate() ), "locate" ); NEW_KACTION(actSyncDirs, i18n( "Synchronize &Directories..." ), "kr_syncdirs", Qt::CTRL + Qt::Key_Y, SLOTS, SLOT( slotSynchronizeDirs() ), "sync dirs" ); - NEW_KACTION(actSyncBrowse, i18n( "S&ynchron Directory Changes" ), "kr_syncbrowse_off", Qt::ALT + Qt::Key_Y, SLOTS, SLOT( slotSyncBrowse() ), "sync browse" ); - NEW_KACTION(actDiskUsage, i18n( "D&isk Usage..." ), "kr_diskusage", Qt::ALT + Qt::Key_D, SLOTS, SLOT( slotDiskUsage() ), "disk usage" ); - NEW_KACTION(actQueueManager, i18n( "&Queue Manager..." ), "document-multiple", Qt::ALT + Qt::Key_Q, SLOTS, SLOT( slotQueueManager() ), "queue manager" ); + NEW_KACTION(actSyncBrowse, i18n( "S&ynchron Directory Changes" ), "kr_syncbrowse_off", Qt::ALT + Qt::SHIFT + Qt::Key_Y, SLOTS, SLOT( slotSyncBrowse() ), "sync browse" ); + NEW_KACTION(actDiskUsage, i18n( "D&isk Usage..." ), "kr_diskusage", Qt::ALT + Qt::SHIFT + Qt::Key_S, SLOTS, SLOT( slotDiskUsage() ), "disk usage" ); + NEW_KACTION(actQueueManager, i18n( "&Queue Manager..." ), "document-multiple", Qt::ALT + Qt::SHIFT + Qt::Key_Q, SLOTS, SLOT( slotQueueManager() ), "queue manager" ); NEW_KACTION(actKonfigurator, i18n( "Configure &Krusader..." ), "configure", 0, SLOTS, SLOT( startKonfigurator() ), "konfigurator" ); NEW_KACTION(actBack, i18n( "Back" ), "go-previous", 0, SLOTS, SLOT( back() ), "back" ); NEW_KACTION(actRoot, i18n( "Root" ), "go-top", Qt::CTRL + Qt::Key_Backspace, SLOTS, SLOT( root() ), "root" ); @@ -752,7 +752,7 @@ NEW_KACTION(t6, i18n( "Bookmarks" ), 0, Qt::CTRL + Qt::Key_D, SLOTS, SLOT( openBookmarks() ), "bookmarks" ); NEW_KACTION(t7, i18n( "Bookmark Current" ), 0, Qt::CTRL + Qt::SHIFT + Qt::Key_D, SLOTS, SLOT( bookmarkCurrent() ), "bookmark current" ); NEW_KACTION(t8, i18n( "History" ), 0, Qt::CTRL + Qt::Key_H, SLOTS, SLOT( openHistory() ), "history" ); - NEW_KACTION(t9, i18n( "Sync Panels" ), 0, Qt::ALT + Qt::Key_O, SLOTS, SLOT( syncPanels() ), "sync panels"); + NEW_KACTION(t9, i18n( "Sync Panels" ), 0, Qt::ALT + Qt::SHIFT + Qt::Key_O, SLOTS, SLOT( syncPanels() ), "sync panels"); NEW_KACTION(t10, i18n( "Left History" ), 0, Qt::ALT + Qt::CTRL + Qt::Key_Left, SLOTS, SLOT( openLeftHistory() ), "left history" ); NEW_KACTION(t11, i18n( "Right History" ), 0, Qt::ALT + Qt::CTRL + Qt::Key_Right, SLOTS, SLOT( openRightHistory() ), "right history" ); NEW_KACTION(t12, i18n( "Media" ), 0, Qt::CTRL + Qt::Key_M, SLOTS, SLOT( openMedia() ), "media" ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-25 23:24:06
|
Revision: 6227 http://krusader.svn.sourceforge.net/krusader/?rev=6227&view=rev Author: ckarai Date: 2009-02-25 21:52:24 +0000 (Wed, 25 Feb 2009) Log Message: ----------- InterView: sort order can't be changed from UserActions Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp trunk/krusader_kde4/krusader/Panel/krinterbriefview.h trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp trunk/krusader_kde4/krusader/Panel/krinterdetailedview.h trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp trunk/krusader_kde4/krusader/Panel/krvfsmodel.h trunk/krusader_kde4/krusader/Panel/krview.h Modified: trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp 2009-02-23 20:38:37 UTC (rev 6226) +++ trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp 2009-02-25 21:52:24 UTC (rev 6227) @@ -618,3 +618,13 @@ result.adjust(dx, dy, dx, dy); return result; } + + +void KrInterBriefView::setSortMode(KrViewProperties::SortSpec mode) +{ + Qt::SortOrder sortDir; + int column = _model->convertSortOrderFromKrViewProperties( mode, sortDir ); + if( column == _model->getLastSortOrder() && sortDir == _model->getLastSortDir() ) + sortDir = (sortDir == Qt::AscendingOrder) ? Qt::DescendingOrder : Qt::AscendingOrder; + _model->sort( column, sortDir ); +} Modified: trunk/krusader_kde4/krusader/Panel/krinterbriefview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterbriefview.h 2009-02-23 20:38:37 UTC (rev 6226) +++ trunk/krusader_kde4/krusader/Panel/krinterbriefview.h 2009-02-25 21:52:24 UTC (rev 6227) @@ -68,6 +68,7 @@ virtual void prepareForPassive(); virtual bool ensureVisibilityAfterSelect() { return false; } virtual int itemsPerPage(); + virtual void setSortMode(KrViewProperties::SortSpec mode); // abstract item view classes virtual QRect visualRect(const QModelIndex&) const; Modified: trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-23 20:38:37 UTC (rev 6226) +++ trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-25 21:52:24 UTC (rev 6227) @@ -662,3 +662,12 @@ } return QTreeView::viewportEvent( event ); } + +void KrInterDetailedView::setSortMode(KrViewProperties::SortSpec mode) +{ + Qt::SortOrder sortDir; + int column = _model->convertSortOrderFromKrViewProperties( mode, sortDir ); + if( column == _model->getLastSortOrder() && sortDir == _model->getLastSortDir() ) + sortDir = (sortDir == Qt::AscendingOrder) ? Qt::DescendingOrder : Qt::AscendingOrder; + this->sortByColumn( column, sortDir ); +} Modified: trunk/krusader_kde4/krusader/Panel/krinterdetailedview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.h 2009-02-23 20:38:37 UTC (rev 6226) +++ trunk/krusader_kde4/krusader/Panel/krinterdetailedview.h 2009-02-25 21:52:24 UTC (rev 6227) @@ -55,6 +55,7 @@ virtual void prepareForPassive(); virtual bool ensureVisibilityAfterSelect() { return false; } virtual int itemsPerPage(); + virtual void setSortMode(KrViewProperties::SortSpec mode); public slots: virtual void refreshColors(); Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-23 20:38:37 UTC (rev 6226) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-25 21:52:24 UTC (rev 6227) @@ -611,6 +611,10 @@ { _lastSortOrder = column; _lastSortDir = order; + + if( _view->properties() != 0 ) + _view->sortModeUpdated( convertSortOrderToKrViewProperties( _lastSortOrder, _lastSortDir ) ); + emit layoutAboutToBeChanged(); QModelIndexList oldPersistentList = persistentIndexList(); @@ -846,4 +850,66 @@ case NO_PERM: tmp+='-'; break; } return tmp; -} \ No newline at end of file +} + +int KrVfsModel::convertSortOrderFromKrViewProperties( KrViewProperties::SortSpec sortOrder, Qt::SortOrder & sortDir ) +{ + sortDir = ( sortDir & KrViewProperties::Descending ) ? Qt::DescendingOrder : Qt::AscendingOrder; + if ( sortOrder & KrViewProperties::Name ) + return KrVfsModel::Name; + if ( sortOrder & KrViewProperties::Ext ) + return KrVfsModel::Extension; + if ( sortOrder & KrViewProperties::Size ) + return KrVfsModel::Size; + if ( sortOrder & KrViewProperties::Type ) + return KrVfsModel::Mime; + if ( sortOrder & KrViewProperties::Modified ) + return KrVfsModel::DateTime; + if ( sortOrder & KrViewProperties::Permissions ) + return KrVfsModel::Permissions; + if ( sortOrder & KrViewProperties::KrPermissions ) + return KrVfsModel::KrPermissions; + if ( sortOrder & KrViewProperties::Owner ) + return KrVfsModel::Owner; + if ( sortOrder & KrViewProperties::Group ) + return KrVfsModel::Group; + return -1; +} + +KrViewProperties::SortSpec KrVfsModel::convertSortOrderToKrViewProperties( int sortOrder, Qt::SortOrder sortDir ) +{ + KrViewProperties::SortSpec sp = KrViewProperties::Name; + switch( sortOrder ) + { + case KrVfsModel::Name: + sp = KrViewProperties::Name; + case KrVfsModel::Extension: + sp = KrViewProperties::Ext; + case KrVfsModel::Mime: + sp = KrViewProperties::Type; + case KrVfsModel::Size: + sp = KrViewProperties::Size; + case KrVfsModel::DateTime: + sp = KrViewProperties::Modified; + case KrVfsModel::Permissions: + sp = KrViewProperties::Permissions; + case KrVfsModel::KrPermissions: + sp = KrViewProperties::KrPermissions; + case KrVfsModel::Owner: + sp = KrViewProperties::Owner; + case KrVfsModel::Group: + sp = KrViewProperties::Group; + } + + int sortMode = _view->sortMode(); + + if (sortMode & KrViewProperties::DirsFirst) + sp = static_cast<KrViewProperties::SortSpec>(sp | KrViewProperties::DirsFirst); + if (sortMode & KrViewProperties::IgnoreCase) + sp = static_cast<KrViewProperties::SortSpec>(sp | KrViewProperties::IgnoreCase); + if (sortMode & KrViewProperties::AlwaysSortDirsByName) + sp = static_cast<KrViewProperties::SortSpec>(sp | KrViewProperties::AlwaysSortDirsByName); + if (sortMode & KrViewProperties::Descending) + sp = static_cast<KrViewProperties::SortSpec>(sp | KrViewProperties::Descending); + return sp; +} Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-23 20:38:37 UTC (rev 6226) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-25 21:52:24 UTC (rev 6227) @@ -44,7 +44,12 @@ virtual Qt::ItemFlags flags ( const QModelIndex & index ) const; static QString krPermissionString( const vfile * vf ); void emitChanged() { emit layoutChanged(); } + int convertSortOrderFromKrViewProperties( KrViewProperties::SortSpec, Qt::SortOrder & ); + KrViewProperties::SortSpec convertSortOrderToKrViewProperties( int, Qt::SortOrder ); + Qt::SortOrder getLastSortDir() { return _lastSortDir; } + int getLastSortOrder() { return _lastSortOrder; } + protected: QString nameWithoutExtension( const vfile * vf, bool checkEnabled = true ) const; Modified: trunk/krusader_kde4/krusader/Panel/krview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-23 20:38:37 UTC (rev 6226) +++ trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-25 21:52:24 UTC (rev 6227) @@ -265,6 +265,7 @@ // implementation, and may be re-implemented if needed // ///////////////////////////////////////////////////////////// virtual void setSortMode(KrViewProperties::SortSpec mode) { _properties->sortMode = mode; } + virtual void sortModeUpdated(KrViewProperties::SortSpec mode) { _properties->sortMode = mode; } virtual KrViewProperties::SortSpec sortMode() const { return _properties->sortMode; } virtual void setFilter(KrViewProperties::FilterSpec filter) { _properties->filter = filter; } virtual KrViewProperties::FilterSpec filter() const { return _properties->filter; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-23 20:38:53
|
Revision: 6226 http://krusader.svn.sourceforge.net/krusader/?rev=6226&view=rev Author: ckarai Date: 2009-02-23 20:38:37 +0000 (Mon, 23 Feb 2009) Log Message: ----------- InterBriefView: alpha Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/CMakeLists.txt trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp trunk/krusader_kde4/krusader/Panel/krviewfactory.cpp Added Paths: ----------- trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp trunk/krusader_kde4/krusader/Panel/krinterbriefview.h Modified: trunk/krusader_kde4/krusader/Panel/CMakeLists.txt =================================================================== --- trunk/krusader_kde4/krusader/Panel/CMakeLists.txt 2009-02-22 12:04:14 UTC (rev 6225) +++ trunk/krusader_kde4/krusader/Panel/CMakeLists.txt 2009-02-23 20:38:37 UTC (rev 6226) @@ -20,6 +20,7 @@ krbriefview.cpp krbriefviewitem.cpp krvfsmodel.cpp + krinterbriefview.cpp krinterdetailedview.cpp krinterviewitemdelegate.cpp krviewfactory.cpp Added: trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp (rev 0) +++ trunk/krusader_kde4/krusader/Panel/krinterbriefview.cpp 2009-02-23 20:38:37 UTC (rev 6226) @@ -0,0 +1,620 @@ +/*************************************************************************** + krinterbriefview.cpp - description + ------------------- + begin : Sat Feb 14 2009 + copyright : (C) 2009+ by Csaba Karai + email : + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "krinterbriefview.h" +#include "krviewfactory.h" +#include "krinterviewitemdelegate.h" +#include "krviewitem.h" +#include "krvfsmodel.h" +#include "../VFS/krpermhandler.h" +#include "../defaults.h" +#include "krmousehandler.h" +#include "krcolorcache.h" +#include <klocale.h> +#include <kdirlister.h> +#include <QDir> +#include <QDirModel> +#include <QHashIterator> +#include <QHeaderView> +#include "../GUI/krstyleproxy.h" +#include <KMenu> +#include <QPainter> +#include <QScrollBar> + +// dummy. remove this class when no longer needed +class KrInterBriefViewItem: public KrViewItem +{ +public: + KrInterBriefViewItem(KrInterBriefView *parent, vfile *vf): KrViewItem(vf, parent->properties()) { + _view = parent; + _vfile = vf; + if( parent->_model->dummyVfile() == vf ) + dummyVfile = true; + } + + bool isSelected() const { + const QModelIndex & ndx = _view->_model->vfileIndex( _vfile ); + return _view->selectionModel()->isSelected( ndx ); + } + void setSelected( bool s ) { + const QModelIndex & ndx = _view->_model->vfileIndex( _vfile ); + _view->selectionModel()->select( ndx, ( s ? QItemSelectionModel::Select : QItemSelectionModel::Deselect ) + | QItemSelectionModel::Rows ); + } + QRect itemRect() const { + const QModelIndex & ndx = _view->_model->vfileIndex( _vfile ); + return _view->visualRect( ndx ); + } + static void itemHeightChanged() + { + } // force the items to resize when icon/font size change + void redraw() {} + +private: + vfile *_vfile; + KrInterBriefView * _view; +}; + + +// code used to register the view +#define INTERBRIEFVIEW_ID 3 +KrViewInstance interBriefView( INTERBRIEFVIEW_ID, i18n( "&Experimental View" ), 0 /*Qt::ALT + Qt::SHIFT + Qt::Key_D*/, + KrInterBriefView::create, KrInterBriefViewItem::itemHeightChanged ); +// end of register code + +KrInterBriefView::KrInterBriefView( QWidget *parent, bool &left, KConfig *cfg ): + KrView(cfg), + QAbstractItemView(parent) +{ + // fix the context menu problem + int j = QFontMetrics( font() ).height() * 2; + _mouseHandler = new KrMouseHandler( this, j ); + connect( _mouseHandler, SIGNAL( renameCurrentItem() ), this, SLOT( renameCurrentItem() ) ); + setWidget( this ); + _nameInKConfig=QString( "KrInterBriefView" ) + QString( ( left ? "Left" : "Right" ) ) ; + KConfigGroup group( krConfig, "Private" ); + + KConfigGroup grpSvr( _config, "Look&Feel" ); + _viewFont = grpSvr.readEntry( "Filelist Font", *_FilelistFont ); + _fileIconSize = (grpSvr.readEntry("Filelist Icon Size",_FilelistIconSize)).toInt(); + + _model = new KrVfsModel( this ); + this->setModel(_model); + _model->sort( KrVfsModel::Name, Qt::AscendingOrder ); + _model->setExtensionEnabled( false ); + connect( _model, SIGNAL( layoutChanged() ), this, SLOT( slotMakeCurrentVisible() ) ); + //header()->installEventFilter( this ); + + setSelectionMode( QAbstractItemView::NoSelection ); + + setStyle( new KrStyleProxy() ); + setItemDelegate( new KrInterViewItemDelegate() ); + setMouseTracking( true ); + setAcceptDrops( true ); + setDropIndicatorShown( true ); + + restoreSettings(); + connect( &KrColorCache::getColorCache(), SIGNAL( colorsRefreshed() ), this, SLOT( refreshColors() ) ); +} + +KrInterBriefView::~KrInterBriefView() +{ + delete _properties; + _properties = 0; + delete _operator; + _operator = 0; + delete _model; + delete _mouseHandler; + QHashIterator< vfile *, KrInterBriefViewItem *> it( _itemHash ); + while( it.hasNext() ) + delete it.next().value(); + _itemHash.clear(); +} + +KrViewItem* KrInterBriefView::findItemByName(const QString &name) +{ + if (!_model->ready()) + return 0; + + QModelIndex ndx = _model->nameIndex( name ); + if( !ndx.isValid() ) + return 0; + return getKrInterViewItem( ndx ); +} + +QString KrInterBriefView::getCurrentItem() const +{ + if (!_model->ready()) + return QString(); + + vfile * vf = _model->vfileAt( currentIndex() ); + if( vf == 0 ) + return QString(); + return vf->vfile_getName(); +} + +KrViewItem* KrInterBriefView::getCurrentKrViewItem() +{ + if (!_model->ready()) + return 0; + + return getKrInterViewItem( currentIndex() ); +} + +KrViewItem* KrInterBriefView::getFirst() +{ + if (!_model->ready()) + return 0; + + return getKrInterViewItem( _model->index(0, 0, QModelIndex())); +} + +KrViewItem* KrInterBriefView::getKrViewItemAt(const QPoint &vp) +{ + if (!_model->ready()) + return 0; + + return getKrInterViewItem( indexAt( vp ) ); +} + +KrViewItem* KrInterBriefView::getLast() +{ + if (!_model->ready()) + return 0; + + return getKrInterViewItem(_model->index(_model->rowCount()-1, 0, QModelIndex())); +} + +KrViewItem* KrInterBriefView::getNext(KrViewItem *current) +{ + vfile* vf = (vfile *)current->getVfile(); + QModelIndex ndx = _model->vfileIndex( vf ); + if( ndx.row() >= _model->rowCount()-1 ) + return 0; + return getKrInterViewItem( _model->index(ndx.row() + 1, 0, QModelIndex())); +} + +KrViewItem* KrInterBriefView::getPrev(KrViewItem *current) +{ + vfile* vf = (vfile *)current->getVfile(); + QModelIndex ndx = _model->vfileIndex( vf ); + if( ndx.row() <= 0 ) + return 0; + return getKrInterViewItem( _model->index(ndx.row() - 1, 0, QModelIndex())); +} + +void KrInterBriefView::slotMakeCurrentVisible() +{ + scrollTo( currentIndex() ); +} + +void KrInterBriefView::makeItemVisible(const KrViewItem *item) +{ + vfile* vf = (vfile *)item->getVfile(); + QModelIndex ndx = _model->vfileIndex( vf ); + if( ndx.isValid() ) + scrollTo( ndx ); +} + +void KrInterBriefView::setCurrentKrViewItem(KrViewItem *item) +{ + vfile* vf = (vfile *)item->getVfile(); + QModelIndex ndx = _model->vfileIndex( vf ); + if( ndx.isValid() && ndx.row() != currentIndex().row() ) { + _mouseHandler->cancelTwoClickRename(); + setCurrentIndex( ndx ); + } +} + +KrViewItem* KrInterBriefView::preAddItem(vfile *vf) +{ + return getKrInterViewItem( _model->addItem( vf ) ); +} + +bool KrInterBriefView::preDelItem(KrViewItem *item) +{ + if( item == 0 ) + return true; + QModelIndex ndx = _model->removeItem( (vfile *)item->getVfile() ); + if( ndx.isValid() ) + setCurrentIndex( ndx ); + _itemHash.remove( (vfile *)item->getVfile() ); + return true; +} + +void KrInterBriefView::redraw() +{ +} + +void KrInterBriefView::refreshColors() +{ + if( _model->rowCount() != 0 ) + _model->emitChanged(); +} + +void KrInterBriefView::restoreSettings() +{ + /* TODO */ + _numOfColumns = 3; +} + +void KrInterBriefView::saveSettings() +{ + /* TODO */ +} + +void KrInterBriefView::setCurrentItem(const QString& name) +{ + QModelIndex ndx = _model->nameIndex( name ); + if( ndx.isValid() ) + setCurrentIndex( ndx ); +} + +void KrInterBriefView::prepareForActive() { + KrView::prepareForActive(); + setFocus(); + KrViewItem * current = getCurrentKrViewItem(); + if( current != 0 ) { + QString desc = current->description(); + op()->emitItemDescription( desc ); + } +} + +void KrInterBriefView::prepareForPassive() { + KrView::prepareForPassive(); + _mouseHandler->cancelTwoClickRename(); + //if ( renameLineEdit() ->isVisible() ) + //renameLineEdit() ->clearFocus(); +} + +int KrInterBriefView::itemsPerPage() { + /* TODO */ + return 0; +} + +void KrInterBriefView::sort() +{ + _model->sort(); +} + +void KrInterBriefView::updateView() +{ +} + +void KrInterBriefView::updateItem(KrViewItem* item) +{ + if( item == 0 ) + return; + _model->updateItem( (vfile *)item->getVfile() ); +} + +void KrInterBriefView::clear() +{ + clearSelection(); + _model->clear(); + QHashIterator< vfile *, KrInterBriefViewItem *> it( _itemHash ); + while( it.hasNext() ) + delete it.next().value(); + _itemHash.clear(); + KrView::clear(); +} + +void KrInterBriefView::addItems(vfs* v, bool addUpDir) +{ + _model->setVfs(v, addUpDir); + _count = _model->rowCount(); + if( addUpDir ) + _count--; + + this->setCurrentIndex(_model->index(0, 0)); + if( !nameToMakeCurrent().isEmpty() ) + setCurrentItem( nameToMakeCurrent() ); +} + +void KrInterBriefView::setup() +{ + +} + +void KrInterBriefView::initOperator() +{ + _operator = new KrViewOperator(this, this); + // klistview emits selection changed, so chain them to operator + connect(selectionModel(), SIGNAL(selectionChanged( const QItemSelection &, const QItemSelection &)), _operator, SLOT(emitSelectionChanged())); +} + +void KrInterBriefView::keyPressEvent( QKeyEvent *e ) +{ + if ( !e || !_model->ready() ) + return ; // subclass bug + if( handleKeyEvent( e ) ) // did the view class handled the event? + return; + QAbstractItemView::keyPressEvent( e ); +} + +void KrInterBriefView::mousePressEvent ( QMouseEvent * ev ) +{ + if( !_mouseHandler->mousePressEvent( ev ) ) + QAbstractItemView::mousePressEvent( ev ); +} + +void KrInterBriefView::mouseReleaseEvent ( QMouseEvent * ev ) +{ + if( !_mouseHandler->mouseReleaseEvent( ev ) ) + QAbstractItemView::mouseReleaseEvent( ev ); +} + +void KrInterBriefView::mouseDoubleClickEvent ( QMouseEvent *ev ) +{ + if( !_mouseHandler->mouseDoubleClickEvent( ev ) ) + QAbstractItemView::mouseDoubleClickEvent( ev ); +} + +void KrInterBriefView::mouseMoveEvent ( QMouseEvent * ev ) +{ + if( !_mouseHandler->mouseMoveEvent( ev ) ) + QAbstractItemView::mouseMoveEvent( ev ); +} + +void KrInterBriefView::wheelEvent ( QWheelEvent *ev ) +{ + if( !_mouseHandler->wheelEvent( ev ) ) + QAbstractItemView::wheelEvent( ev ); +} + +void KrInterBriefView::dragEnterEvent ( QDragEnterEvent *ev ) +{ + if( !_mouseHandler->dragEnterEvent( ev ) ) + QAbstractItemView::dragEnterEvent( ev ); +} + +void KrInterBriefView::dragMoveEvent ( QDragMoveEvent *ev ) +{ + QAbstractItemView::dragMoveEvent( ev ); + _mouseHandler->dragMoveEvent( ev ); +} + +void KrInterBriefView::dragLeaveEvent ( QDragLeaveEvent *ev ) +{ + if( !_mouseHandler->dragLeaveEvent( ev ) ) + QAbstractItemView::dragLeaveEvent( ev ); +} + +void KrInterBriefView::dropEvent ( QDropEvent *ev ) +{ + if( !_mouseHandler->dropEvent( ev ) ) + QAbstractItemView::dropEvent( ev ); +} + +bool KrInterBriefView::event( QEvent * e ) +{ + _mouseHandler->otherEvent( e ); + return QAbstractItemView::event( e ); +} + +KrInterBriefViewItem * KrInterBriefView::getKrInterViewItem( const QModelIndex & ndx ) +{ + if( !ndx.isValid() ) + return 0; + vfile * vf = _model->vfileAt( ndx ); + if( vf == 0 ) + return 0; + QHash<vfile *,KrInterBriefViewItem*>::iterator it = _itemHash.find( vf ); + if( it == _itemHash.end() ) { + KrInterBriefViewItem * newItem = new KrInterBriefViewItem( this, vf ); + _itemHash[ vf ] = newItem; + _dict.insert( vf->vfile_getName(), newItem ); + return newItem; + } + return *it; +} + +void KrInterBriefView::selectRegion( KrViewItem *i1, KrViewItem *i2, bool select) +{ + vfile* vf1 = (vfile *)i1->getVfile(); + QModelIndex mi1 = _model->vfileIndex( vf1 ); + vfile* vf2 = (vfile *)i2->getVfile(); + QModelIndex mi2 = _model->vfileIndex( vf2 ); + + if( mi1.isValid() && mi2.isValid() ) + { + int r1 = mi1.row(); + int r2 = mi2.row(); + + if( r1 > r2 ) { + int t = r1; + r1 = r2; + r2 = t; + } + + for( int row = r1; row <= r2; row++ ) + { + const QModelIndex & ndx = _model->index( row, 0 ); + selectionModel()->select( ndx, ( select ? QItemSelectionModel::Select : QItemSelectionModel::Deselect ) + | QItemSelectionModel::Rows ); + } + } + else if( mi1.isValid() && !mi2.isValid() ) + i1->setSelected( select ); + else if( mi2.isValid() && !mi1.isValid() ) + i2->setSelected( select ); +} + +void KrInterBriefView::renameCurrentItem() { + QModelIndex cIndex = currentIndex(); + QModelIndex nameIndex = _model->index( cIndex.row(), KrVfsModel::Name ); + edit( nameIndex ); + updateEditorData(); + update( nameIndex ); +} + +bool KrInterBriefView::eventFilter(QObject *object, QEvent *event) +{ + /* TODO */ + return false; +} + +void KrInterBriefView::showContextMenu( const QPoint & p ) +{ + /* TODO */ +} + +bool KrInterBriefView::viewportEvent ( QEvent * event ) +{ + /* TODO */ + return QAbstractItemView::viewportEvent( event ); +} + + +QRect KrInterBriefView::visualRect(const QModelIndex&ndx) const +{ + /* TODO */ + int width = (viewport()->width())/_numOfColumns; + if( (viewport()->width())%_numOfColumns ) + width++; + int height = getItemHeight(); + int numRows = viewport()->height() / height; + if( numRows == 0 ) + numRows++; + int x = width * (ndx.row()/numRows); + int y = height * (ndx.row() % numRows ); + return mapToViewport(QRect( x, y, width, height )); +} + +void KrInterBriefView::scrollTo(const QModelIndex&, QAbstractItemView::ScrollHint) +{ + /* TODO */ +} + +QModelIndex KrInterBriefView::indexAt(const QPoint& p) const +{ + int x = p.x() + horizontalOffset(); + int y = p.y() + verticalOffset(); + + int width = (viewport()->width())/_numOfColumns; + if( (viewport()->width())%_numOfColumns ) + width++; + int height = getItemHeight(); + int numRows = viewport()->height() / height; + if( numRows == 0 ) + numRows++; + int ys = y / height; + int xs = (x / width) * numRows; + + return _model->index( xs + ys, 0 ); +} + +QModelIndex KrInterBriefView::moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers) +{ + /* TODO */ + return QModelIndex(); +} + +int KrInterBriefView::horizontalOffset() const +{ + return horizontalScrollBar()->value(); +} + +int KrInterBriefView::verticalOffset() const +{ + return 0; +} + +bool KrInterBriefView::isIndexHidden(const QModelIndex&ndx) const +{ + return ndx.column() != 0; +} + +void KrInterBriefView::setSelection(const QRect&, QFlags<QItemSelectionModel::SelectionFlag>) +{ + /* TODO */ +} + +QRegion KrInterBriefView::visualRegionForSelection(const QItemSelection&) const +{ + /* TODO */ + return QRegion(); +} + +void KrInterBriefView::paintEvent(QPaintEvent *e) +{ + /* TODO */ + QStyleOptionViewItemV4 option; + option.widget = this; + QPainter painter( viewport() ); + + for( int i=0; i != _model->rowCount(); i++ ) + { + option.rect = visualRect( _model->index( i, 0 ) ); + painter.save(); + itemDelegate()->paint(&painter, option, _model->index( i, 0 ) ); + painter.restore(); + } +} + +int KrInterBriefView::getItemHeight() const { + int textHeight = QFontMetrics( _viewFont ).height(); + int height = textHeight; + int iconSize = 0; + if( properties()->displayIcons ) + iconSize = _fileIconSize; + if( iconSize > textHeight ) + height = iconSize; + return height; +} + +void KrInterBriefView::updateGeometries() +{ + if (_model->rowCount() <= 0 ) + horizontalScrollBar()->setRange(0, 0); + else + { + int itemsPerColumn = viewport()->height() / getItemHeight(); + if( itemsPerColumn <= 0 ) + itemsPerColumn = 1; + int columnWidth = (viewport()->width())/_numOfColumns; + if( (viewport()->width())%_numOfColumns ) + columnWidth++; + int maxWidth = _model->rowCount() / itemsPerColumn; + if( _model->rowCount() % itemsPerColumn ) + maxWidth++; + maxWidth *= columnWidth; + if( maxWidth > viewport()->width() ) + { + horizontalScrollBar()->setSingleStep(columnWidth); + horizontalScrollBar()->setPageStep(columnWidth * _numOfColumns); + horizontalScrollBar()->setRange(0, maxWidth - viewport()->width()); + } else { + horizontalScrollBar()->setRange(0, 0); + } + } + + QAbstractItemView::updateGeometries(); +} + +QRect KrInterBriefView::mapToViewport(const QRect &rect) const +{ + if (!rect.isValid()) + return rect; + + QRect result = rect; + + int dx = -horizontalOffset(); + int dy = -verticalOffset(); + result.adjust(dx, dy, dx, dy); + return result; +} Added: trunk/krusader_kde4/krusader/Panel/krinterbriefview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterbriefview.h (rev 0) +++ trunk/krusader_kde4/krusader/Panel/krinterbriefview.h 2009-02-23 20:38:37 UTC (rev 6226) @@ -0,0 +1,122 @@ +/*************************************************************************** + krinterbriefview.h - description + ------------------- + begin : Sat Feb 14 2009 + copyright : (C) 2009+ by Csaba Karai + email : + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef __krinterbriefview__ +#define __krinterbriefview__ + +#include "krview.h" + +#include <QAbstractItemView> +#include <QVector> +#include <QFont> + +class KrInterBriefViewItem; +class KrMouseHandler; +class KrVfsModel; + +class KrInterBriefView : public QAbstractItemView, public KrView { + friend class KrInterBriefViewItem; + Q_OBJECT + +public: + KrInterBriefView( QWidget *parent, bool &left, KConfig *cfg = krConfig ); + virtual ~KrInterBriefView(); + + virtual void addItems(vfs* v, bool addUpDir = true); + virtual KrViewItem* findItemByName(const QString &name); + virtual QString getCurrentItem() const; + virtual KrViewItem* getCurrentKrViewItem(); + virtual KrViewItem* getFirst(); + virtual KrViewItem* getKrViewItemAt(const QPoint &vp); + virtual KrViewItem* getLast(); + virtual KrViewItem* getNext(KrViewItem *current); + virtual KrViewItem* getPrev(KrViewItem *current); + virtual void makeItemVisible(const KrViewItem *item); + virtual KrViewItem* preAddItem(vfile *vf); + virtual bool preDelItem(KrViewItem *item); + virtual void redraw(); + virtual void restoreSettings(); + virtual void saveSettings(); + virtual void setCurrentItem(const QString& name); + virtual void setCurrentKrViewItem(KrViewItem *current); + virtual void sort(); + virtual void clear(); + virtual void updateView(); + virtual void updateItem(KrViewItem* item); + virtual QModelIndex getCurrentIndex() { return currentIndex(); } + virtual bool isSelected( const QModelIndex &ndx ) { return selectionModel()->isSelected( ndx ); } + virtual void selectRegion( KrViewItem *, KrViewItem *, bool ); + KrInterBriefViewItem * getKrInterViewItem( const QModelIndex & ); + + static KrView* create( QWidget *parent, bool &left, KConfig *cfg ) { return new KrInterBriefView( parent, left, cfg ); } + + virtual void prepareForActive(); + virtual void prepareForPassive(); + virtual bool ensureVisibilityAfterSelect() { return false; } + virtual int itemsPerPage(); + + // abstract item view classes + virtual QRect visualRect(const QModelIndex&) const; + virtual void scrollTo(const QModelIndex&, QAbstractItemView::ScrollHint = QAbstractItemView::EnsureVisible); + virtual QModelIndex indexAt(const QPoint&) const; + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers); + virtual int horizontalOffset() const; + virtual int verticalOffset() const; + virtual bool isIndexHidden(const QModelIndex&) const; + virtual void setSelection(const QRect&, QFlags<QItemSelectionModel::SelectionFlag>); + virtual QRegion visualRegionForSelection(const QItemSelection&) const; + virtual void updateGeometries(); + virtual QRect mapToViewport(const QRect &rect) const; + +public slots: + virtual void refreshColors(); + +protected slots: + void slotMakeCurrentVisible(); + virtual void renameCurrentItem(); + +protected: + virtual void setup(); + virtual void initOperator(); + + virtual void keyPressEvent( QKeyEvent *e ); + virtual void mousePressEvent ( QMouseEvent * ); + virtual void mouseReleaseEvent ( QMouseEvent * ); + virtual void mouseDoubleClickEvent ( QMouseEvent *ev ); + virtual void mouseMoveEvent ( QMouseEvent * ); + virtual void wheelEvent ( QWheelEvent * ); + virtual bool event( QEvent * e ); + virtual void dragEnterEvent(QDragEnterEvent *e); + virtual void dragMoveEvent(QDragMoveEvent *e); + virtual void dragLeaveEvent(QDragLeaveEvent *e); + virtual void dropEvent ( QDropEvent * ); + virtual bool eventFilter(QObject *object, QEvent *event); + virtual bool viewportEvent ( QEvent * event ); + virtual void paintEvent(QPaintEvent *e); + + void showContextMenu( const QPoint & p ); + int getItemHeight() const; + +private: + KrVfsModel *_model; + KrMouseHandler *_mouseHandler; + QHash<vfile *,KrInterBriefViewItem*> _itemHash; + QFont _viewFont; + int _numOfColumns; + int _fileIconSize; +}; +#endif // __krinterbriefview__ Modified: trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-22 12:04:14 UTC (rev 6225) +++ trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-23 20:38:37 UTC (rev 6226) @@ -255,6 +255,7 @@ header()->resizeSection( KrVfsModel::DateTime, QFontMetrics( _viewFont ).width( desc ) ); } else { header()->restoreState( savedState ); + _model->setExtensionEnabled( !isColumnHidden( KrVfsModel::Extension ) ); } } Modified: trunk/krusader_kde4/krusader/Panel/krviewfactory.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krviewfactory.cpp 2009-02-22 12:04:14 UTC (rev 6225) +++ trunk/krusader_kde4/krusader/Panel/krviewfactory.cpp 2009-02-23 20:38:37 UTC (rev 6226) @@ -31,12 +31,14 @@ #include "krdetailedview.h" #include "krbriefview.h" #include "krinterdetailedview.h" +#include "krinterbriefview.h" #include "krviewfactory.h" #include <cstdio> extern KrViewInstance detailedView; // hold reference for linking extern KrViewInstance briefView; // hold reference for linking extern KrViewInstance interDetailedView; // hold reference for linking +extern KrViewInstance interBriefView; // hold reference for linking KrViewInstance::KrViewInstance( int id, QString desc, QKeySequence shortcut, KrViewFactoryFunction fun, KrViewItemHeightChange fun2 ) : m_id( id ), m_description( desc ), m_shortcut( shortcut ), m_factoryfun( fun ), m_ihchangefun( fun2 ) @@ -86,4 +88,5 @@ KrViewFactory::registerView( &detailedView ); KrViewFactory::registerView( &briefView ); KrViewFactory::registerView( &interDetailedView ); + KrViewFactory::registerView( &interBriefView ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-22 13:01:14
|
Revision: 6224 http://krusader.svn.sourceforge.net/krusader/?rev=6224&view=rev Author: ckarai Date: 2009-02-22 11:46:55 +0000 (Sun, 22 Feb 2009) Log Message: ----------- compile fix Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp trunk/krusader_kde4/krusader/Panel/krviewfactory.cpp Modified: trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-22 11:08:45 UTC (rev 6223) +++ trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-22 11:46:55 UTC (rev 6224) @@ -53,8 +53,8 @@ // code used to register the view #define INTERVIEW_ID 2 -KrViewInstance interView( INTERVIEW_ID, i18n( "&Experimental View" ), 0 /*Qt::ALT + Qt::SHIFT + Qt::Key_D*/, - KrInterDetailedView::create, KrInterDetailedViewItem::itemHeightChanged ); +KrViewInstance interDetailedView( INTERVIEW_ID, i18n( "&Experimental View" ), 0 /*Qt::ALT + Qt::SHIFT + Qt::Key_D*/, + KrInterDetailedView::create, KrInterDetailedViewItem::itemHeightChanged ); // end of register code KrInterDetailedView::KrInterDetailedView( QWidget *parent, bool &left, KConfig *cfg ): Modified: trunk/krusader_kde4/krusader/Panel/krviewfactory.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krviewfactory.cpp 2009-02-22 11:08:45 UTC (rev 6223) +++ trunk/krusader_kde4/krusader/Panel/krviewfactory.cpp 2009-02-22 11:46:55 UTC (rev 6224) @@ -30,13 +30,13 @@ #include "krdetailedview.h" #include "krbriefview.h" -#include "krinterview.h" +#include "krinterdetailedview.h" #include "krviewfactory.h" #include <cstdio> extern KrViewInstance detailedView; // hold reference for linking extern KrViewInstance briefView; // hold reference for linking -extern KrViewInstance interView; // hold reference for linking +extern KrViewInstance interDetailedView; // hold reference for linking KrViewInstance::KrViewInstance( int id, QString desc, QKeySequence shortcut, KrViewFactoryFunction fun, KrViewItemHeightChange fun2 ) : m_id( id ), m_description( desc ), m_shortcut( shortcut ), m_factoryfun( fun ), m_ihchangefun( fun2 ) @@ -85,5 +85,5 @@ { KrViewFactory::registerView( &detailedView ); KrViewFactory::registerView( &briefView ); - KrViewFactory::registerView( &interView ); + KrViewFactory::registerView( &interDetailedView ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-22 12:04:30
|
Revision: 6225 http://krusader.svn.sourceforge.net/krusader/?rev=6225&view=rev Author: ckarai Date: 2009-02-22 12:04:14 +0000 (Sun, 22 Feb 2009) Log Message: ----------- InterView: rendering bug Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp Modified: trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-22 11:46:55 UTC (rev 6224) +++ trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-22 12:04:14 UTC (rev 6225) @@ -230,7 +230,8 @@ void KrInterDetailedView::refreshColors() { - _model->emitChanged(); + if( _model->rowCount() != 0 ) + _model->emitChanged(); } void KrInterDetailedView::restoreSettings() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-22 11:08:52
|
Revision: 6223 http://krusader.svn.sourceforge.net/krusader/?rev=6223&view=rev Author: ckarai Date: 2009-02-22 11:08:45 +0000 (Sun, 22 Feb 2009) Log Message: ----------- InterView: restructuring Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/CMakeLists.txt trunk/krusader_kde4/krusader/Panel/krvfsmodel.h Added Paths: ----------- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp trunk/krusader_kde4/krusader/Panel/krinterdetailedview.h trunk/krusader_kde4/krusader/Panel/krinterviewitemdelegate.cpp trunk/krusader_kde4/krusader/Panel/krinterviewitemdelegate.h Removed Paths: ------------- trunk/krusader_kde4/krusader/Panel/krinterview.cpp trunk/krusader_kde4/krusader/Panel/krinterview.h Modified: trunk/krusader_kde4/krusader/Panel/CMakeLists.txt =================================================================== --- trunk/krusader_kde4/krusader/Panel/CMakeLists.txt 2009-02-22 10:03:33 UTC (rev 6222) +++ trunk/krusader_kde4/krusader/Panel/CMakeLists.txt 2009-02-22 11:08:45 UTC (rev 6223) @@ -20,7 +20,8 @@ krbriefview.cpp krbriefviewitem.cpp krvfsmodel.cpp - krinterview.cpp + krinterdetailedview.cpp + krinterviewitemdelegate.cpp krviewfactory.cpp krmousehandler.cpp ) Added: trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp (rev 0) +++ trunk/krusader_kde4/krusader/Panel/krinterdetailedview.cpp 2009-02-22 11:08:45 UTC (rev 6223) @@ -0,0 +1,662 @@ +#include "krviewfactory.h" +#include "krinterdetailedview.h" +#include "krinterviewitemdelegate.h" +#include "krviewitem.h" +#include "krvfsmodel.h" +#include "../VFS/krpermhandler.h" +#include "../defaults.h" +#include "krmousehandler.h" +#include "krcolorcache.h" +#include <klocale.h> +#include <kdirlister.h> +#include <QDir> +#include <QDirModel> +#include <QHashIterator> +#include <QHeaderView> +#include "../GUI/krstyleproxy.h" +#include <KMenu> + +// dummy. remove this class when no longer needed +class KrInterDetailedViewItem: public KrViewItem +{ +public: + KrInterDetailedViewItem(KrInterDetailedView *parent, vfile *vf): KrViewItem(vf, parent->properties()) { + _view = parent; + _vfile = vf; + if( parent->_model->dummyVfile() == vf ) + dummyVfile = true; + } + + bool isSelected() const { + const QModelIndex & ndx = _view->_model->vfileIndex( _vfile ); + return _view->selectionModel()->isSelected( ndx ); + } + void setSelected( bool s ) { + const QModelIndex & ndx = _view->_model->vfileIndex( _vfile ); + _view->selectionModel()->select( ndx, ( s ? QItemSelectionModel::Select : QItemSelectionModel::Deselect ) + | QItemSelectionModel::Rows ); + } + QRect itemRect() const { + const QModelIndex & ndx = _view->_model->vfileIndex( _vfile ); + return _view->visualRect( ndx ); + } + static void itemHeightChanged() + { + } // force the items to resize when icon/font size change + void redraw() {} + +private: + vfile *_vfile; + KrInterDetailedView * _view; +}; + + +// code used to register the view +#define INTERVIEW_ID 2 +KrViewInstance interView( INTERVIEW_ID, i18n( "&Experimental View" ), 0 /*Qt::ALT + Qt::SHIFT + Qt::Key_D*/, + KrInterDetailedView::create, KrInterDetailedViewItem::itemHeightChanged ); +// end of register code + +KrInterDetailedView::KrInterDetailedView( QWidget *parent, bool &left, KConfig *cfg ): + KrView(cfg), + QTreeView(parent) +{ + // fix the context menu problem + int j = QFontMetrics( font() ).height() * 2; + _mouseHandler = new KrMouseHandler( this, j ); + connect( _mouseHandler, SIGNAL( renameCurrentItem() ), this, SLOT( renameCurrentItem() ) ); + setWidget( this ); + _nameInKConfig=QString( "KrInterDetailedView" ) + QString( ( left ? "Left" : "Right" ) ) ; + KConfigGroup group( krConfig, "Private" ); + + KConfigGroup grpSvr( _config, "Look&Feel" ); + _viewFont = grpSvr.readEntry( "Filelist Font", *_FilelistFont ); + + _model = new KrVfsModel( this ); + this->setModel(_model); + this->setRootIsDecorated(false); + this->setSortingEnabled(true); + this->sortByColumn( KrVfsModel::Name, Qt::AscendingOrder ); + _model->sort( KrVfsModel::Name, Qt::AscendingOrder ); + connect( _model, SIGNAL( layoutChanged() ), this, SLOT( slotMakeCurrentVisible() ) ); + header()->installEventFilter( this ); + + setSelectionMode( QAbstractItemView::NoSelection ); + setAllColumnsShowFocus( true ); + + setStyle( new KrStyleProxy() ); + setItemDelegate( new KrInterViewItemDelegate() ); + setMouseTracking( true ); + setAcceptDrops( true ); + setDropIndicatorShown( true ); + + for( int i=0; i != KrVfsModel::MAX_COLUMNS; i++) + header()->setResizeMode( i, QHeaderView::Interactive ); + header()->setStretchLastSection( false ); + + restoreSettings(); + connect( header(), SIGNAL( sectionResized( int, int, int ) ), this, SLOT( sectionResized( int, int, int ) ) ); + connect( &KrColorCache::getColorCache(), SIGNAL( colorsRefreshed() ), this, SLOT( refreshColors() ) ); +} + +KrInterDetailedView::~KrInterDetailedView() +{ + delete _properties; + _properties = 0; + delete _operator; + _operator = 0; + delete _model; + delete _mouseHandler; + QHashIterator< vfile *, KrInterDetailedViewItem *> it( _itemHash ); + while( it.hasNext() ) + delete it.next().value(); + _itemHash.clear(); +} + +KrViewItem* KrInterDetailedView::findItemByName(const QString &name) +{ + if (!_model->ready()) + return 0; + + QModelIndex ndx = _model->nameIndex( name ); + if( !ndx.isValid() ) + return 0; + return getKrInterViewItem( ndx ); +} + +QString KrInterDetailedView::getCurrentItem() const +{ + if (!_model->ready()) + return QString(); + + vfile * vf = _model->vfileAt( currentIndex() ); + if( vf == 0 ) + return QString(); + return vf->vfile_getName(); +} + +KrViewItem* KrInterDetailedView::getCurrentKrViewItem() +{ + if (!_model->ready()) + return 0; + + return getKrInterViewItem( currentIndex() ); +} + +KrViewItem* KrInterDetailedView::getFirst() +{ + if (!_model->ready()) + return 0; + + return getKrInterViewItem( _model->index(0, 0, QModelIndex())); +} + +KrViewItem* KrInterDetailedView::getKrViewItemAt(const QPoint &vp) +{ + if (!_model->ready()) + return 0; + + return getKrInterViewItem( indexAt( vp ) ); +} + +KrViewItem* KrInterDetailedView::getLast() +{ + if (!_model->ready()) + return 0; + + return getKrInterViewItem(_model->index(_model->rowCount()-1, 0, QModelIndex())); +} + +KrViewItem* KrInterDetailedView::getNext(KrViewItem *current) +{ + vfile* vf = (vfile *)current->getVfile(); + QModelIndex ndx = _model->vfileIndex( vf ); + if( ndx.row() >= _model->rowCount()-1 ) + return 0; + return getKrInterViewItem( _model->index(ndx.row() + 1, 0, QModelIndex())); +} + +KrViewItem* KrInterDetailedView::getPrev(KrViewItem *current) +{ + vfile* vf = (vfile *)current->getVfile(); + QModelIndex ndx = _model->vfileIndex( vf ); + if( ndx.row() <= 0 ) + return 0; + return getKrInterViewItem( _model->index(ndx.row() - 1, 0, QModelIndex())); +} + +void KrInterDetailedView::slotMakeCurrentVisible() +{ + scrollTo( currentIndex() ); +} + +void KrInterDetailedView::makeItemVisible(const KrViewItem *item) +{ + vfile* vf = (vfile *)item->getVfile(); + QModelIndex ndx = _model->vfileIndex( vf ); + if( ndx.isValid() ) + scrollTo( ndx ); +} + +void KrInterDetailedView::setCurrentKrViewItem(KrViewItem *item) +{ + vfile* vf = (vfile *)item->getVfile(); + QModelIndex ndx = _model->vfileIndex( vf ); + if( ndx.isValid() && ndx.row() != currentIndex().row() ) { + _mouseHandler->cancelTwoClickRename(); + setCurrentIndex( ndx ); + } +} + +KrViewItem* KrInterDetailedView::preAddItem(vfile *vf) +{ + return getKrInterViewItem( _model->addItem( vf ) ); +} + +bool KrInterDetailedView::preDelItem(KrViewItem *item) +{ + if( item == 0 ) + return true; + QModelIndex ndx = _model->removeItem( (vfile *)item->getVfile() ); + if( ndx.isValid() ) + setCurrentIndex( ndx ); + _itemHash.remove( (vfile *)item->getVfile() ); + return true; +} + +void KrInterDetailedView::redraw() +{ +} + +void KrInterDetailedView::refreshColors() +{ + _model->emitChanged(); +} + +void KrInterDetailedView::restoreSettings() +{ + KConfigGroup grpSvr( krConfig, _nameInKConfig ); + QByteArray savedState = grpSvr.readEntry( "Saved State", QByteArray() ); + + if( savedState.isEmpty() ) + { + hideColumn( KrVfsModel::Mime ); + hideColumn( KrVfsModel::Permissions ); + hideColumn( KrVfsModel::Owner ); + hideColumn( KrVfsModel::Group ); + header()->resizeSection( KrVfsModel::Extension, QFontMetrics( _viewFont ).width( "tar.bz2 " ) ); + header()->resizeSection( KrVfsModel::KrPermissions, QFontMetrics( _viewFont ).width( "rwx " ) ); + header()->resizeSection( KrVfsModel::Size, QFontMetrics( _viewFont ).width( "9" ) * 10 ); + + QDateTime tmp(QDate(2099, 12, 29), QTime(23, 59)); + QString desc = KGlobal::locale()->formatDateTime(tmp) + " "; + + header()->resizeSection( KrVfsModel::DateTime, QFontMetrics( _viewFont ).width( desc ) ); + } else { + header()->restoreState( savedState ); + } +} + +void KrInterDetailedView::saveSettings() +{ + QByteArray state = header()->saveState(); + KConfigGroup grpSvr( krConfig, _nameInKConfig ); + grpSvr.writeEntry( "Saved State", state ); +} + +void KrInterDetailedView::setCurrentItem(const QString& name) +{ + QModelIndex ndx = _model->nameIndex( name ); + if( ndx.isValid() ) + setCurrentIndex( ndx ); +} + +void KrInterDetailedView::prepareForActive() { + KrView::prepareForActive(); + setFocus(); + KrViewItem * current = getCurrentKrViewItem(); + if( current != 0 ) { + QString desc = current->description(); + op()->emitItemDescription( desc ); + } +} + +void KrInterDetailedView::prepareForPassive() { + KrView::prepareForPassive(); + _mouseHandler->cancelTwoClickRename(); + //if ( renameLineEdit() ->isVisible() ) + //renameLineEdit() ->clearFocus(); +} + +int KrInterDetailedView::itemsPerPage() { + QRect rect = visualRect( currentIndex() ); + if( !rect.isValid() ) + { + for( int i=0; i != _model->rowCount(); i++ ) + { + rect = visualRect( _model->index( i, 0 ) ); + if( rect.isValid() ) + break; + } + } + if( !rect.isValid() ) + return 0; + int size = (height() - header()->height() ) / rect.height(); + if( size < 0 ) + size = 0; + return size; +} + +void KrInterDetailedView::sort() +{ + _model->sort(); +} + +void KrInterDetailedView::updateView() +{ +} + +void KrInterDetailedView::updateItem(KrViewItem* item) +{ + if( item == 0 ) + return; + _model->updateItem( (vfile *)item->getVfile() ); +} + +void KrInterDetailedView::clear() +{ + clearSelection(); + _model->clear(); + QHashIterator< vfile *, KrInterDetailedViewItem *> it( _itemHash ); + while( it.hasNext() ) + delete it.next().value(); + _itemHash.clear(); + KrView::clear(); +} + +void KrInterDetailedView::addItems(vfs* v, bool addUpDir) +{ + _model->setVfs(v, addUpDir); + _count = _model->rowCount(); + if( addUpDir ) + _count--; + + this->setCurrentIndex(_model->index(0, 0)); + if( !nameToMakeCurrent().isEmpty() ) + setCurrentItem( nameToMakeCurrent() ); +} + +void KrInterDetailedView::setup() +{ + +} + +void KrInterDetailedView::initOperator() +{ + _operator = new KrViewOperator(this, this); + // klistview emits selection changed, so chain them to operator + connect(selectionModel(), SIGNAL(selectionChanged( const QItemSelection &, const QItemSelection &)), _operator, SLOT(emitSelectionChanged())); +} + +void KrInterDetailedView::keyPressEvent( QKeyEvent *e ) +{ + if ( !e || !_model->ready() ) + return ; // subclass bug + if( handleKeyEvent( e ) ) // did the view class handled the event? + return; + QTreeView::keyPressEvent( e ); +} + +void KrInterDetailedView::mousePressEvent ( QMouseEvent * ev ) +{ + if( !_mouseHandler->mousePressEvent( ev ) ) + QTreeView::mousePressEvent( ev ); +} + +void KrInterDetailedView::mouseReleaseEvent ( QMouseEvent * ev ) +{ + if( !_mouseHandler->mouseReleaseEvent( ev ) ) + QTreeView::mouseReleaseEvent( ev ); +} + +void KrInterDetailedView::mouseDoubleClickEvent ( QMouseEvent *ev ) +{ + if( !_mouseHandler->mouseDoubleClickEvent( ev ) ) + QTreeView::mouseDoubleClickEvent( ev ); +} + +void KrInterDetailedView::mouseMoveEvent ( QMouseEvent * ev ) +{ + if( !_mouseHandler->mouseMoveEvent( ev ) ) + QTreeView::mouseMoveEvent( ev ); +} + +void KrInterDetailedView::wheelEvent ( QWheelEvent *ev ) +{ + if( !_mouseHandler->wheelEvent( ev ) ) + QTreeView::wheelEvent( ev ); +} + +void KrInterDetailedView::dragEnterEvent ( QDragEnterEvent *ev ) +{ + if( !_mouseHandler->dragEnterEvent( ev ) ) + QTreeView::dragEnterEvent( ev ); +} + +void KrInterDetailedView::dragMoveEvent ( QDragMoveEvent *ev ) +{ + QTreeView::dragMoveEvent( ev ); + _mouseHandler->dragMoveEvent( ev ); +} + +void KrInterDetailedView::dragLeaveEvent ( QDragLeaveEvent *ev ) +{ + if( !_mouseHandler->dragLeaveEvent( ev ) ) + QTreeView::dragLeaveEvent( ev ); +} + +void KrInterDetailedView::dropEvent ( QDropEvent *ev ) +{ + if( !_mouseHandler->dropEvent( ev ) ) + QTreeView::dropEvent( ev ); +} + +bool KrInterDetailedView::event( QEvent * e ) +{ + _mouseHandler->otherEvent( e ); + return QTreeView::event( e ); +} + +KrInterDetailedViewItem * KrInterDetailedView::getKrInterViewItem( const QModelIndex & ndx ) +{ + if( !ndx.isValid() ) + return 0; + vfile * vf = _model->vfileAt( ndx ); + if( vf == 0 ) + return 0; + QHash<vfile *,KrInterDetailedViewItem*>::iterator it = _itemHash.find( vf ); + if( it == _itemHash.end() ) { + KrInterDetailedViewItem * newItem = new KrInterDetailedViewItem( this, vf ); + _itemHash[ vf ] = newItem; + _dict.insert( vf->vfile_getName(), newItem ); + return newItem; + } + return *it; +} + +void KrInterDetailedView::selectRegion( KrViewItem *i1, KrViewItem *i2, bool select) +{ + vfile* vf1 = (vfile *)i1->getVfile(); + QModelIndex mi1 = _model->vfileIndex( vf1 ); + vfile* vf2 = (vfile *)i2->getVfile(); + QModelIndex mi2 = _model->vfileIndex( vf2 ); + + if( mi1.isValid() && mi2.isValid() ) + { + int r1 = mi1.row(); + int r2 = mi2.row(); + + if( r1 > r2 ) { + int t = r1; + r1 = r2; + r2 = t; + } + + for( int row = r1; row <= r2; row++ ) + { + const QModelIndex & ndx = _model->index( row, 0 ); + selectionModel()->select( ndx, ( select ? QItemSelectionModel::Select : QItemSelectionModel::Deselect ) + | QItemSelectionModel::Rows ); + } + } + else if( mi1.isValid() && !mi2.isValid() ) + i1->setSelected( select ); + else if( mi2.isValid() && !mi1.isValid() ) + i2->setSelected( select ); +} + +void KrInterDetailedView::renameCurrentItem() { + QModelIndex cIndex = currentIndex(); + QModelIndex nameIndex = _model->index( cIndex.row(), KrVfsModel::Name ); + edit( nameIndex ); + updateEditorData(); + update( nameIndex ); +} + +bool KrInterDetailedView::eventFilter(QObject *object, QEvent *event) +{ + if( object == header() ) + { + if( event->type() == QEvent::ContextMenu ) + { + QContextMenuEvent *me = (QContextMenuEvent *)event; + showContextMenu( me->globalPos() ); + return true; + } else if( event->type() == QEvent::Resize ) + { + recalculateColumnSizes(); + return false; + } + } + return false; +} + +void KrInterDetailedView::showContextMenu( const QPoint & p ) +{ + KMenu popup( this ); + popup.setTitle( i18n("Columns")); +// +// bool refresh = false; + bool hasExtension = !isColumnHidden( KrVfsModel::Extension ); + bool hasMime = !isColumnHidden( KrVfsModel::Mime ); + bool hasSize = !isColumnHidden( KrVfsModel::Size ); + bool hasDate = !isColumnHidden( KrVfsModel::DateTime ); + bool hasPerms = !isColumnHidden( KrVfsModel::Permissions ); + bool hasKrPerms = !isColumnHidden( KrVfsModel::KrPermissions ); + bool hasOwner = !isColumnHidden( KrVfsModel::Owner ); + bool hasGroup = !isColumnHidden( KrVfsModel::Group ); + + QAction *extAct = popup.addAction( i18n( "Ext" ) ); + extAct->setCheckable( true ); + extAct->setChecked( hasExtension ); + + QAction *typeAct = popup.addAction( i18n( "Type" ) ); + typeAct->setCheckable( true ); + typeAct->setChecked( hasMime ); + + QAction *sizeAct = popup.addAction( i18n( "Size" ) ); + sizeAct->setCheckable( true ); + sizeAct->setChecked( hasSize ); + + QAction *modifAct = popup.addAction( i18n( "Modified" ) ); + modifAct->setCheckable( true ); + modifAct->setChecked( hasDate ); + + QAction *permAct = popup.addAction( i18n( "Perms" ) ); + permAct->setCheckable( true ); + permAct->setChecked( hasPerms ); + + QAction *rwxAct = popup.addAction( i18n( "rwx" ) ); + rwxAct->setCheckable( true ); + rwxAct->setChecked( hasKrPerms ); + + QAction *ownerAct = popup.addAction( i18n( "Owner" ) ); + ownerAct->setCheckable( true ); + ownerAct->setChecked( hasOwner ); + + QAction *groupAct = popup.addAction( i18n( "Group" ) ); + groupAct->setCheckable( true ); + groupAct->setChecked( hasGroup ); + + QAction *res = popup.exec( p ); + if( res == extAct ) + { + _model->setExtensionEnabled( !hasExtension ); + if( hasExtension ) + hideColumn( KrVfsModel::Extension ); + else + showColumn( KrVfsModel::Extension ); + } else if( res == typeAct ) { + _model->setExtensionEnabled( !hasMime ); + if( hasMime ) + hideColumn( KrVfsModel::Mime ); + else + showColumn( KrVfsModel::Mime ); + } else if( res == sizeAct ) { + _model->setExtensionEnabled( !hasSize ); + if( hasSize ) + hideColumn( KrVfsModel::Size ); + else + showColumn( KrVfsModel::Size ); + } else if( res == modifAct ) { + _model->setExtensionEnabled( !hasDate ); + if( hasDate ) + hideColumn( KrVfsModel::DateTime ); + else + showColumn( KrVfsModel::DateTime ); + } else if( res == permAct ) { + _model->setExtensionEnabled( !hasPerms ); + if( hasPerms ) + hideColumn( KrVfsModel::Permissions ); + else + showColumn( KrVfsModel::Permissions ); + } else if( res == rwxAct ) { + _model->setExtensionEnabled( !hasKrPerms ); + if( hasKrPerms ) + hideColumn( KrVfsModel::KrPermissions ); + else + showColumn( KrVfsModel::KrPermissions ); + } else if( res == ownerAct ) { + _model->setExtensionEnabled( !hasOwner ); + if( hasOwner ) + hideColumn( KrVfsModel::Owner ); + else + showColumn( KrVfsModel::Owner ); + } else if( res == groupAct ) { + _model->setExtensionEnabled( !hasGroup ); + if( hasGroup ) + hideColumn( KrVfsModel::Group ); + else + showColumn( KrVfsModel::Group ); + } +} + +void KrInterDetailedView::sectionResized( int column, int oldSize, int newSize ) +{ + if( oldSize == newSize || !_model->ready() ) + return; + + recalculateColumnSizes(); +} + +void KrInterDetailedView::recalculateColumnSizes() +{ + int sum = 0; + for( int i=0; i != KrVfsModel::MAX_COLUMNS; i++ ) + { + if( !isColumnHidden( i ) ) + sum += header()->sectionSize( i ); + } + + if( sum != header()->width() ) + { + int delta = sum - header()->width(); + int nameSize = header()->sectionSize( KrVfsModel::Name ); + if( nameSize - delta > 20 ) + header()->resizeSection( KrVfsModel::Name, nameSize - delta ); + } +} + +bool KrInterDetailedView::viewportEvent ( QEvent * event ) +{ + if( event->type() == QEvent::ToolTip ) + { + QHelpEvent *he = static_cast<QHelpEvent*>(event); + const QModelIndex index = indexAt(he->pos()); + + if( index.isValid() ) + { + int width = header()->sectionSize( index.column() ); + QString text = index.data( Qt::DisplayRole ).toString(); + + int textWidth = QFontMetrics( _viewFont ).width( text ); + + const int textMargin = QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1; + textWidth += 2 * textMargin; + + QVariant decor = index.data( Qt::DecorationRole ); + if( decor.isValid() && decor.type() == QVariant::Pixmap ) + { + QPixmap p = decor.value<QPixmap>(); + textWidth += p.width() + 2 * textMargin; + } + + if( textWidth <= width ) + { + event->accept(); + return true; + } + } + } + return QTreeView::viewportEvent( event ); +} Added: trunk/krusader_kde4/krusader/Panel/krinterdetailedview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterdetailedview.h (rev 0) +++ trunk/krusader_kde4/krusader/Panel/krinterdetailedview.h 2009-02-22 11:08:45 UTC (rev 6223) @@ -0,0 +1,94 @@ +#ifndef __krinterdetailedview__ +#define __krinterdetailedview__ + +#include "krview.h" + +#include <QTreeView> +#include <QVector> +#include <QFont> + +class KrVfsModel; +class KrInterDetailedViewItem; +class QMouseEvent; +class QKeyEvent; +class QDragEnterEvent; +class QContextMenuEvent; +class KrMouseHandler; + +class KrInterDetailedView : public QTreeView, public KrView { + friend class KrInterDetailedViewItem; + Q_OBJECT + +public: + KrInterDetailedView( QWidget *parent, bool &left, KConfig *cfg = krConfig ); + virtual ~KrInterDetailedView(); + + virtual void addItems(vfs* v, bool addUpDir = true); + virtual KrViewItem* findItemByName(const QString &name); + virtual QString getCurrentItem() const; + virtual KrViewItem* getCurrentKrViewItem(); + virtual KrViewItem* getFirst(); + virtual KrViewItem* getKrViewItemAt(const QPoint &vp); + virtual KrViewItem* getLast(); + virtual KrViewItem* getNext(KrViewItem *current); + virtual KrViewItem* getPrev(KrViewItem *current); + virtual void makeItemVisible(const KrViewItem *item); + virtual KrViewItem* preAddItem(vfile *vf); + virtual bool preDelItem(KrViewItem *item); + virtual void redraw(); + virtual void restoreSettings(); + virtual void saveSettings(); + virtual void setCurrentItem(const QString& name); + virtual void setCurrentKrViewItem(KrViewItem *current); + virtual void sort(); + virtual void clear(); + virtual void updateView(); + virtual void updateItem(KrViewItem* item); + virtual QModelIndex getCurrentIndex() { return currentIndex(); } + virtual bool isSelected( const QModelIndex &ndx ) { return selectionModel()->isSelected( ndx ); } + virtual void selectRegion( KrViewItem *, KrViewItem *, bool ); + KrInterDetailedViewItem * getKrInterViewItem( const QModelIndex & ); + + static KrView* create( QWidget *parent, bool &left, KConfig *cfg ) { return new KrInterDetailedView( parent, left, cfg ); } + + virtual void prepareForActive(); + virtual void prepareForPassive(); + virtual bool ensureVisibilityAfterSelect() { return false; } + virtual int itemsPerPage(); + +public slots: + virtual void refreshColors(); + +protected slots: + void slotMakeCurrentVisible(); + virtual void renameCurrentItem(); + void sectionResized( int, int, int ); + +protected: + virtual void setup(); + virtual void initOperator(); + + virtual void keyPressEvent( QKeyEvent *e ); + virtual void mousePressEvent ( QMouseEvent * ); + virtual void mouseReleaseEvent ( QMouseEvent * ); + virtual void mouseDoubleClickEvent ( QMouseEvent *ev ); + virtual void mouseMoveEvent ( QMouseEvent * ); + virtual void wheelEvent ( QWheelEvent * ); + virtual bool event( QEvent * e ); + virtual void dragEnterEvent(QDragEnterEvent *e); + virtual void dragMoveEvent(QDragMoveEvent *e); + virtual void dragLeaveEvent(QDragLeaveEvent *e); + virtual void dropEvent ( QDropEvent * ); + virtual bool eventFilter(QObject *object, QEvent *event); + virtual bool viewportEvent ( QEvent * event ); + + void showContextMenu( const QPoint & p ); + void recalculateColumnSizes(); + +private: + KrVfsModel *_model; + KrMouseHandler *_mouseHandler; + QHash<vfile *,KrInterDetailedViewItem*> _itemHash; + QFont _viewFont; +}; +#endif // __krinterview__ Deleted: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-22 10:03:33 UTC (rev 6222) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-22 11:08:45 UTC (rev 6223) @@ -1,779 +0,0 @@ -#include "krviewfactory.h" -#include "krinterview.h" -#include "krviewitem.h" -#include "krvfsmodel.h" -#include "../VFS/krpermhandler.h" -#include "../defaults.h" -#include "krmousehandler.h" -#include <klocale.h> -#include <kdirlister.h> -#include <QDir> -#include <QDirModel> -#include <QHashIterator> -#include <QHeaderView> -#include "../GUI/krstyleproxy.h" -#include <QItemDelegate> -#include <QPainter> -#include <QLineEdit> -#include <QDialog> -#include <KMenu> - -// dummy. remove this class when no longer needed -class KrInterViewItem: public KrViewItem -{ -public: - KrInterViewItem(KrInterView *parent, vfile *vf): KrViewItem(vf, parent->properties()) { - _view = parent; - _vfile = vf; - if( parent->_model->dummyVfile() == vf ) - dummyVfile = true; - } - - bool isSelected() const { - const QModelIndex & ndx = _view->_model->vfileIndex( _vfile ); - return _view->selectionModel()->isSelected( ndx ); - } - void setSelected( bool s ) { - const QModelIndex & ndx = _view->_model->vfileIndex( _vfile ); - _view->selectionModel()->select( ndx, ( s ? QItemSelectionModel::Select : QItemSelectionModel::Deselect ) - | QItemSelectionModel::Rows ); - } - QRect itemRect() const { - const QModelIndex & ndx = _view->_model->vfileIndex( _vfile ); - return _view->visualRect( ndx ); - } - static void itemHeightChanged() - { - } // force the items to resize when icon/font size change - void redraw() {} - -private: - vfile *_vfile; - KrInterView * _view; -}; - -class KrInterViewItemDelegate : public QItemDelegate -{ -private: - mutable int _currentlyEdited; - mutable bool _dontDraw; - -public: - KrInterViewItemDelegate( QObject *parent = 0 ) : QItemDelegate( parent ), _currentlyEdited( -1 ) {} - - void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const - { - QStyleOptionViewItemV4 opt = option; - opt.state &= ~QStyle::State_Selected; - _dontDraw = ( _currentlyEdited == index.row() ) && (index.column() == KrVfsModel::Extension ); - QItemDelegate::paint( painter, opt, index ); - } - - void drawDisplay ( QPainter * painter, const QStyleOptionViewItem & option, const QRect & rect, const QString & text ) const - { - if( !_dontDraw ) - QItemDelegate::drawDisplay( painter, option, rect, text ); - } - - QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &sovi, const QModelIndex &index) const - { - _currentlyEdited = index.row(); - return QItemDelegate::createEditor( parent, sovi, index ); - } - - void setEditorData(QWidget *editor, const QModelIndex &index) const - { - QItemDelegate::setEditorData( editor, index ); - if( editor->inherits( "QLineEdit" ) ) - { - QLineEdit *lineEdit = qobject_cast<QLineEdit *> ( editor ); - if( lineEdit ) { - QString nameWithoutExt = index.data( Qt::UserRole ).toString(); - lineEdit->deselect(); - lineEdit->setSelection( 0, nameWithoutExt.length() ); - } - } - } - - QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const - { - ((QAbstractItemModel*)index.model())->setData( index, QVariant( true ), Qt::UserRole ); - QSize size = QItemDelegate::sizeHint( option, index ); - ((QAbstractItemModel*)index.model())->setData( index, QVariant( false ), Qt::UserRole ); - return size; - } - - bool eventFilter(QObject *object, QEvent *event) - { - QWidget *editor = qobject_cast<QWidget*>(object); - if (!editor) - return false; - if (event->type() == QEvent::KeyPress) - { - switch (static_cast<QKeyEvent *>(event)->key()) { - case Qt::Key_Tab: - case Qt::Key_Backtab: - _currentlyEdited = -1; - emit closeEditor(editor, QAbstractItemDelegate::RevertModelCache); - return true; - case Qt::Key_Enter: - case Qt::Key_Return: - if (QLineEdit *e = qobject_cast<QLineEdit*>(editor)) - { - if (!e->hasAcceptableInput()) - return true; - event->accept(); - emit commitData(editor); - emit closeEditor(editor, QAbstractItemDelegate::SubmitModelCache); - _currentlyEdited = -1; - return true; - } - return false; - case Qt::Key_Escape: - event->accept(); - // don't commit data - _currentlyEdited = -1; - emit closeEditor(editor, QAbstractItemDelegate::RevertModelCache); - break; - default: - return false; - } - - if (editor->parentWidget()) - editor->parentWidget()->setFocus(); - return true; - } else if (event->type() == QEvent::FocusOut) { - if (!editor->isActiveWindow() || (QApplication::focusWidget() != editor)) { - QWidget *w = QApplication::focusWidget(); - while (w) { // don't worry about focus changes internally in the editor - if (w == editor) - return false; - w = w->parentWidget(); - } - // Opening a modal dialog will start a new eventloop - // that will process the deleteLater event. - if (QApplication::activeModalWidget() - && !QApplication::activeModalWidget()->isAncestorOf(editor) - && qobject_cast<QDialog*>(QApplication::activeModalWidget())) - return false; - _currentlyEdited = -1; - emit closeEditor(editor, RevertModelCache); - } - } else if (event->type() == QEvent::ShortcutOverride) { - if (static_cast<QKeyEvent*>(event)->key() == Qt::Key_Escape) { - event->accept(); - return true; - } - } - return false; - } -}; - - -// code used to register the view -#define INTERVIEW_ID 2 -KrViewInstance interView( INTERVIEW_ID, i18n( "&Experimental View" ), 0 /*Qt::ALT + Qt::SHIFT + Qt::Key_D*/, - KrInterView::create, KrInterViewItem::itemHeightChanged ); -// end of register code - -KrInterView::KrInterView( QWidget *parent, bool &left, KConfig *cfg ): - KrView(cfg), - QTreeView(parent) -{ - // fix the context menu problem - int j = QFontMetrics( font() ).height() * 2; - _mouseHandler = new KrMouseHandler( this, j ); - connect( _mouseHandler, SIGNAL( renameCurrentItem() ), this, SLOT( renameCurrentItem() ) ); - setWidget( this ); - _nameInKConfig=QString( "KrInterView" ) + QString( ( left ? "Left" : "Right" ) ) ; - KConfigGroup group( krConfig, "Private" ); - - KConfigGroup grpSvr( _config, "Look&Feel" ); - _viewFont = grpSvr.readEntry( "Filelist Font", *_FilelistFont ); - - _model = new KrVfsModel( this ); - this->setModel(_model); - this->setRootIsDecorated(false); - this->setSortingEnabled(true); - this->sortByColumn( KrVfsModel::Name, Qt::AscendingOrder ); - _model->sort( KrVfsModel::Name, Qt::AscendingOrder ); - connect( _model, SIGNAL( layoutChanged() ), this, SLOT( slotMakeCurrentVisible() ) ); - header()->installEventFilter( this ); - - setSelectionMode( QAbstractItemView::NoSelection ); - setAllColumnsShowFocus( true ); - - setStyle( new KrStyleProxy() ); - setItemDelegate( new KrInterViewItemDelegate() ); - setMouseTracking( true ); - setAcceptDrops( true ); - setDropIndicatorShown( true ); - - for( int i=0; i != KrVfsModel::MAX_COLUMNS; i++) - header()->setResizeMode( i, QHeaderView::Interactive ); - header()->setStretchLastSection( false ); - - restoreSettings(); - connect( header(), SIGNAL( sectionResized( int, int, int ) ), this, SLOT( sectionResized( int, int, int ) ) ); -} - -KrInterView::~KrInterView() -{ - delete _properties; - _properties = 0; - delete _operator; - _operator = 0; - delete _model; - delete _mouseHandler; - QHashIterator< vfile *, KrInterViewItem *> it( _itemHash ); - while( it.hasNext() ) - delete it.next().value(); - _itemHash.clear(); -} - -KrViewItem* KrInterView::findItemByName(const QString &name) -{ - if (!_model->ready()) - return 0; - - QModelIndex ndx = _model->nameIndex( name ); - if( !ndx.isValid() ) - return 0; - return getKrInterViewItem( ndx ); -} - -QString KrInterView::getCurrentItem() const -{ - if (!_model->ready()) - return QString(); - - vfile * vf = _model->vfileAt( currentIndex() ); - if( vf == 0 ) - return QString(); - return vf->vfile_getName(); -} - -KrViewItem* KrInterView::getCurrentKrViewItem() -{ - if (!_model->ready()) - return 0; - - return getKrInterViewItem( currentIndex() ); -} - -KrViewItem* KrInterView::getFirst() -{ - if (!_model->ready()) - return 0; - - return getKrInterViewItem( _model->index(0, 0, QModelIndex())); -} - -KrViewItem* KrInterView::getKrViewItemAt(const QPoint &vp) -{ - if (!_model->ready()) - return 0; - - return getKrInterViewItem( indexAt( vp ) ); -} - -KrViewItem* KrInterView::getLast() -{ - if (!_model->ready()) - return 0; - - return getKrInterViewItem(_model->index(_model->rowCount()-1, 0, QModelIndex())); -} - -KrViewItem* KrInterView::getNext(KrViewItem *current) -{ - vfile* vf = (vfile *)current->getVfile(); - QModelIndex ndx = _model->vfileIndex( vf ); - if( ndx.row() >= _model->rowCount()-1 ) - return 0; - return getKrInterViewItem( _model->index(ndx.row() + 1, 0, QModelIndex())); -} - -KrViewItem* KrInterView::getPrev(KrViewItem *current) -{ - vfile* vf = (vfile *)current->getVfile(); - QModelIndex ndx = _model->vfileIndex( vf ); - if( ndx.row() <= 0 ) - return 0; - return getKrInterViewItem( _model->index(ndx.row() - 1, 0, QModelIndex())); -} - -void KrInterView::slotMakeCurrentVisible() -{ - scrollTo( currentIndex() ); -} - -void KrInterView::makeItemVisible(const KrViewItem *item) -{ - vfile* vf = (vfile *)item->getVfile(); - QModelIndex ndx = _model->vfileIndex( vf ); - if( ndx.isValid() ) - scrollTo( ndx ); -} - -void KrInterView::setCurrentKrViewItem(KrViewItem *item) -{ - vfile* vf = (vfile *)item->getVfile(); - QModelIndex ndx = _model->vfileIndex( vf ); - if( ndx.isValid() && ndx.row() != currentIndex().row() ) { - _mouseHandler->cancelTwoClickRename(); - setCurrentIndex( ndx ); - } -} - -KrViewItem* KrInterView::preAddItem(vfile *vf) -{ - return getKrInterViewItem( _model->addItem( vf ) ); -} - -bool KrInterView::preDelItem(KrViewItem *item) -{ - if( item == 0 ) - return true; - QModelIndex ndx = _model->removeItem( (vfile *)item->getVfile() ); - if( ndx.isValid() ) - setCurrentIndex( ndx ); - _itemHash.remove( (vfile *)item->getVfile() ); - return true; -} - -void KrInterView::redraw() -{ -} - -void KrInterView::refreshColors() -{ -} - -void KrInterView::restoreSettings() -{ - KConfigGroup grpSvr( krConfig, _nameInKConfig ); - QByteArray savedState = grpSvr.readEntry( "Saved State", QByteArray() ); - - if( savedState.isEmpty() ) - { - hideColumn( KrVfsModel::Mime ); - hideColumn( KrVfsModel::Permissions ); - hideColumn( KrVfsModel::Owner ); - hideColumn( KrVfsModel::Group ); - header()->resizeSection( KrVfsModel::Extension, QFontMetrics( _viewFont ).width( "tar.bz2 " ) ); - header()->resizeSection( KrVfsModel::KrPermissions, QFontMetrics( _viewFont ).width( "rwx " ) ); - header()->resizeSection( KrVfsModel::Size, QFontMetrics( _viewFont ).width( "9" ) * 10 ); - - QDateTime tmp(QDate(2099, 12, 29), QTime(23, 59)); - QString desc = KGlobal::locale()->formatDateTime(tmp) + " "; - - header()->resizeSection( KrVfsModel::DateTime, QFontMetrics( _viewFont ).width( desc ) ); - } else { - header()->restoreState( savedState ); - } -} - -void KrInterView::saveSettings() -{ - QByteArray state = header()->saveState(); - KConfigGroup grpSvr( krConfig, _nameInKConfig ); - grpSvr.writeEntry( "Saved State", state ); -} - -void KrInterView::setCurrentItem(const QString& name) -{ - QModelIndex ndx = _model->nameIndex( name ); - if( ndx.isValid() ) - setCurrentIndex( ndx ); -} - -void KrInterView::prepareForActive() { - KrView::prepareForActive(); - setFocus(); - KrViewItem * current = getCurrentKrViewItem(); - if( current != 0 ) { - QString desc = current->description(); - op()->emitItemDescription( desc ); - } -} - -void KrInterView::prepareForPassive() { - KrView::prepareForPassive(); - _mouseHandler->cancelTwoClickRename(); - //if ( renameLineEdit() ->isVisible() ) - //renameLineEdit() ->clearFocus(); -} - -int KrInterView::itemsPerPage() { - QRect rect = visualRect( currentIndex() ); - if( !rect.isValid() ) - { - for( int i=0; i != _model->rowCount(); i++ ) - { - rect = visualRect( _model->index( i, 0 ) ); - if( rect.isValid() ) - break; - } - } - if( !rect.isValid() ) - return 0; - int size = (height() - header()->height() ) / rect.height(); - if( size < 0 ) - size = 0; - return size; -} - -void KrInterView::sort() -{ - _model->sort(); -} - -void KrInterView::updateView() -{ -} - -void KrInterView::updateItem(KrViewItem* item) -{ - if( item == 0 ) - return; - _model->updateItem( (vfile *)item->getVfile() ); -} - -void KrInterView::clear() -{ - clearSelection(); - _model->clear(); - QHashIterator< vfile *, KrInterViewItem *> it( _itemHash ); - while( it.hasNext() ) - delete it.next().value(); - _itemHash.clear(); - KrView::clear(); -} - -void KrInterView::addItems(vfs* v, bool addUpDir) -{ - _model->setVfs(v, addUpDir); - _count = _model->rowCount(); - if( addUpDir ) - _count--; - - this->setCurrentIndex(_model->index(0, 0)); - if( !nameToMakeCurrent().isEmpty() ) - setCurrentItem( nameToMakeCurrent() ); -} - -void KrInterView::setup() -{ - -} - -void KrInterView::initOperator() -{ - _operator = new KrViewOperator(this, this); - // klistview emits selection changed, so chain them to operator - connect(selectionModel(), SIGNAL(selectionChanged( const QItemSelection &, const QItemSelection &)), _operator, SLOT(emitSelectionChanged())); -} - -void KrInterView::keyPressEvent( QKeyEvent *e ) -{ - if ( !e || !_model->ready() ) - return ; // subclass bug - if( handleKeyEvent( e ) ) // did the view class handled the event? - return; - QTreeView::keyPressEvent( e ); -} - -void KrInterView::mousePressEvent ( QMouseEvent * ev ) -{ - if( !_mouseHandler->mousePressEvent( ev ) ) - QTreeView::mousePressEvent( ev ); -} - -void KrInterView::mouseReleaseEvent ( QMouseEvent * ev ) -{ - if( !_mouseHandler->mouseReleaseEvent( ev ) ) - QTreeView::mouseReleaseEvent( ev ); -} - -void KrInterView::mouseDoubleClickEvent ( QMouseEvent *ev ) -{ - if( !_mouseHandler->mouseDoubleClickEvent( ev ) ) - QTreeView::mouseDoubleClickEvent( ev ); -} - -void KrInterView::mouseMoveEvent ( QMouseEvent * ev ) -{ - if( !_mouseHandler->mouseMoveEvent( ev ) ) - QTreeView::mouseMoveEvent( ev ); -} - -void KrInterView::wheelEvent ( QWheelEvent *ev ) -{ - if( !_mouseHandler->wheelEvent( ev ) ) - QTreeView::wheelEvent( ev ); -} - -void KrInterView::dragEnterEvent ( QDragEnterEvent *ev ) -{ - if( !_mouseHandler->dragEnterEvent( ev ) ) - QTreeView::dragEnterEvent( ev ); -} - -void KrInterView::dragMoveEvent ( QDragMoveEvent *ev ) -{ - QTreeView::dragMoveEvent( ev ); - _mouseHandler->dragMoveEvent( ev ); -} - -void KrInterView::dragLeaveEvent ( QDragLeaveEvent *ev ) -{ - if( !_mouseHandler->dragLeaveEvent( ev ) ) - QTreeView::dragLeaveEvent( ev ); -} - -void KrInterView::dropEvent ( QDropEvent *ev ) -{ - if( !_mouseHandler->dropEvent( ev ) ) - QTreeView::dropEvent( ev ); -} - -bool KrInterView::event( QEvent * e ) -{ - _mouseHandler->otherEvent( e ); - return QTreeView::event( e ); -} - -KrInterViewItem * KrInterView::getKrInterViewItem( const QModelIndex & ndx ) -{ - if( !ndx.isValid() ) - return 0; - vfile * vf = _model->vfileAt( ndx ); - if( vf == 0 ) - return 0; - QHash<vfile *,KrInterViewItem*>::iterator it = _itemHash.find( vf ); - if( it == _itemHash.end() ) { - KrInterViewItem * newItem = new KrInterViewItem( this, vf ); - _itemHash[ vf ] = newItem; - _dict.insert( vf->vfile_getName(), newItem ); - return newItem; - } - return *it; -} - -void KrInterView::selectRegion( KrViewItem *i1, KrViewItem *i2, bool select) -{ - vfile* vf1 = (vfile *)i1->getVfile(); - QModelIndex mi1 = _model->vfileIndex( vf1 ); - vfile* vf2 = (vfile *)i2->getVfile(); - QModelIndex mi2 = _model->vfileIndex( vf2 ); - - if( mi1.isValid() && mi2.isValid() ) - { - int r1 = mi1.row(); - int r2 = mi2.row(); - - if( r1 > r2 ) { - int t = r1; - r1 = r2; - r2 = t; - } - - for( int row = r1; row <= r2; row++ ) - { - const QModelIndex & ndx = _model->index( row, 0 ); - selectionModel()->select( ndx, ( select ? QItemSelectionModel::Select : QItemSelectionModel::Deselect ) - | QItemSelectionModel::Rows ); - } - } - else if( mi1.isValid() && !mi2.isValid() ) - i1->setSelected( select ); - else if( mi2.isValid() && !mi1.isValid() ) - i2->setSelected( select ); -} - -void KrInterView::renameCurrentItem() { - QModelIndex cIndex = currentIndex(); - QModelIndex nameIndex = _model->index( cIndex.row(), KrVfsModel::Name ); - edit( nameIndex ); - updateEditorData(); - update( nameIndex ); -} - -bool KrInterView::eventFilter(QObject *object, QEvent *event) -{ - if( object == header() ) - { - if( event->type() == QEvent::ContextMenu ) - { - QContextMenuEvent *me = (QContextMenuEvent *)event; - showContextMenu( me->globalPos() ); - return true; - } else if( event->type() == QEvent::Resize ) - { - recalculateColumnSizes(); - return false; - } - } - return false; -} - -void KrInterView::showContextMenu( const QPoint & p ) -{ - KMenu popup( this ); - popup.setTitle( i18n("Columns")); -// -// bool refresh = false; - bool hasExtension = !isColumnHidden( KrVfsModel::Extension ); - bool hasMime = !isColumnHidden( KrVfsModel::Mime ); - bool hasSize = !isColumnHidden( KrVfsModel::Size ); - bool hasDate = !isColumnHidden( KrVfsModel::DateTime ); - bool hasPerms = !isColumnHidden( KrVfsModel::Permissions ); - bool hasKrPerms = !isColumnHidden( KrVfsModel::KrPermissions ); - bool hasOwner = !isColumnHidden( KrVfsModel::Owner ); - bool hasGroup = !isColumnHidden( KrVfsModel::Group ); - - QAction *extAct = popup.addAction( i18n( "Ext" ) ); - extAct->setCheckable( true ); - extAct->setChecked( hasExtension ); - - QAction *typeAct = popup.addAction( i18n( "Type" ) ); - typeAct->setCheckable( true ); - typeAct->setChecked( hasMime ); - - QAction *sizeAct = popup.addAction( i18n( "Size" ) ); - sizeAct->setCheckable( true ); - sizeAct->setChecked( hasSize ); - - QAction *modifAct = popup.addAction( i18n( "Modified" ) ); - modifAct->setCheckable( true ); - modifAct->setChecked( hasDate ); - - QAction *permAct = popup.addAction( i18n( "Perms" ) ); - permAct->setCheckable( true ); - permAct->setChecked( hasPerms ); - - QAction *rwxAct = popup.addAction( i18n( "rwx" ) ); - rwxAct->setCheckable( true ); - rwxAct->setChecked( hasKrPerms ); - - QAction *ownerAct = popup.addAction( i18n( "Owner" ) ); - ownerAct->setCheckable( true ); - ownerAct->setChecked( hasOwner ); - - QAction *groupAct = popup.addAction( i18n( "Group" ) ); - groupAct->setCheckable( true ); - groupAct->setChecked( hasGroup ); - - QAction *res = popup.exec( p ); - if( res == extAct ) - { - _model->setExtensionEnabled( !hasExtension ); - if( hasExtension ) - hideColumn( KrVfsModel::Extension ); - else - showColumn( KrVfsModel::Extension ); - } else if( res == typeAct ) { - _model->setExtensionEnabled( !hasMime ); - if( hasMime ) - hideColumn( KrVfsModel::Mime ); - else - showColumn( KrVfsModel::Mime ); - } else if( res == sizeAct ) { - _model->setExtensionEnabled( !hasSize ); - if( hasSize ) - hideColumn( KrVfsModel::Size ); - else - showColumn( KrVfsModel::Size ); - } else if( res == modifAct ) { - _model->setExtensionEnabled( !hasDate ); - if( hasDate ) - hideColumn( KrVfsModel::DateTime ); - else - showColumn( KrVfsModel::DateTime ); - } else if( res == permAct ) { - _model->setExtensionEnabled( !hasPerms ); - if( hasPerms ) - hideColumn( KrVfsModel::Permissions ); - else - showColumn( KrVfsModel::Permissions ); - } else if( res == rwxAct ) { - _model->setExtensionEnabled( !hasKrPerms ); - if( hasKrPerms ) - hideColumn( KrVfsModel::KrPermissions ); - else - showColumn( KrVfsModel::KrPermissions ); - } else if( res == ownerAct ) { - _model->setExtensionEnabled( !hasOwner ); - if( hasOwner ) - hideColumn( KrVfsModel::Owner ); - else - showColumn( KrVfsModel::Owner ); - } else if( res == groupAct ) { - _model->setExtensionEnabled( !hasGroup ); - if( hasGroup ) - hideColumn( KrVfsModel::Group ); - else - showColumn( KrVfsModel::Group ); - } -} - -void KrInterView::sectionResized( int column, int oldSize, int newSize ) -{ - if( oldSize == newSize || !_model->ready() ) - return; - - recalculateColumnSizes(); -} - -void KrInterView::recalculateColumnSizes() -{ - int sum = 0; - for( int i=0; i != KrVfsModel::MAX_COLUMNS; i++ ) - { - if( !isColumnHidden( i ) ) - sum += header()->sectionSize( i ); - } - - if( sum != header()->width() ) - { - int delta = sum - header()->width(); - int nameSize = header()->sectionSize( KrVfsModel::Name ); - if( nameSize - delta > 20 ) - header()->resizeSection( KrVfsModel::Name, nameSize - delta ); - } -} - -bool KrInterView::viewportEvent ( QEvent * event ) -{ - if( event->type() == QEvent::ToolTip ) - { - QHelpEvent *he = static_cast<QHelpEvent*>(event); - const QModelIndex index = indexAt(he->pos()); - - if( index.isValid() ) - { - int width = header()->sectionSize( index.column() ); - QString text = index.data( Qt::DisplayRole ).toString(); - - int textWidth = QFontMetrics( _viewFont ).width( text ); - - const int textMargin = QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1; - textWidth += 2 * textMargin; - - QVariant decor = index.data( Qt::DecorationRole ); - if( decor.isValid() && decor.type() == QVariant::Pixmap ) - { - QPixmap p = decor.value<QPixmap>(); - textWidth += p.width() + 2 * textMargin; - } - - if( textWidth <= width ) - { - event->accept(); - return true; - } - } - } - return QTreeView::viewportEvent( event ); -} Deleted: trunk/krusader_kde4/krusader/Panel/krinterview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-22 10:03:33 UTC (rev 6222) +++ trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-22 11:08:45 UTC (rev 6223) @@ -1,92 +0,0 @@ -#ifndef __krinterview__ -#define __krinterview__ - -#include "krview.h" - -#include <QTreeView> -#include <QVector> -#include <QFont> - -class KrVfsModel; -class KrInterViewItem; -class QMouseEvent; -class QKeyEvent; -class QDragEnterEvent; -class QContextMenuEvent; -class KrMouseHandler; - -class KrInterView : public QTreeView, public KrView { - friend class KrInterViewItem; - Q_OBJECT - -public: - KrInterView( QWidget *parent, bool &left, KConfig *cfg = krConfig ); - virtual ~KrInterView(); - - virtual void addItems(vfs* v, bool addUpDir = true); - virtual KrViewItem* findItemByName(const QString &name); - virtual QString getCurrentItem() const; - virtual KrViewItem* getCurrentKrViewItem(); - virtual KrViewItem* getFirst(); - virtual KrViewItem* getKrViewItemAt(const QPoint &vp); - virtual KrViewItem* getLast(); - virtual KrViewItem* getNext(KrViewItem *current); - virtual KrViewItem* getPrev(KrViewItem *current); - virtual void makeItemVisible(const KrViewItem *item); - virtual KrViewItem* preAddItem(vfile *vf); - virtual bool preDelItem(KrViewItem *item); - virtual void redraw(); - virtual void refreshColors(); - virtual void restoreSettings(); - virtual void saveSettings(); - virtual void setCurrentItem(const QString& name); - virtual void setCurrentKrViewItem(KrViewItem *current); - virtual void sort(); - virtual void clear(); - virtual void updateView(); - virtual void updateItem(KrViewItem* item); - virtual QModelIndex getCurrentIndex() { return currentIndex(); } - virtual bool isSelected( const QModelIndex &ndx ) { return selectionModel()->isSelected( ndx ); } - virtual void selectRegion( KrViewItem *, KrViewItem *, bool ); - KrInterViewItem * getKrInterViewItem( const QModelIndex & ); - - static KrView* create( QWidget *parent, bool &left, KConfig *cfg ) { return new KrInterView( parent, left, cfg ); } - - virtual void prepareForActive(); - virtual void prepareForPassive(); - virtual bool ensureVisibilityAfterSelect() { return false; } - virtual int itemsPerPage(); - -protected slots: - void slotMakeCurrentVisible(); - virtual void renameCurrentItem(); - void sectionResized( int, int, int ); - -protected: - virtual void setup(); - virtual void initOperator(); - - virtual void keyPressEvent( QKeyEvent *e ); - virtual void mousePressEvent ( QMouseEvent * ); - virtual void mouseReleaseEvent ( QMouseEvent * ); - virtual void mouseDoubleClickEvent ( QMouseEvent *ev ); - virtual void mouseMoveEvent ( QMouseEvent * ); - virtual void wheelEvent ( QWheelEvent * ); - virtual bool event( QEvent * e ); - virtual void dragEnterEvent(QDragEnterEvent *e); - virtual void dragMoveEvent(QDragMoveEvent *e); - virtual void dragLeaveEvent(QDragLeaveEvent *e); - virtual void dropEvent ( QDropEvent * ); - virtual bool eventFilter(QObject *object, QEvent *event); - virtual bool viewportEvent ( QEvent * event ); - - void showContextMenu( const QPoint & p ); - void recalculateColumnSizes(); - -private: - KrVfsModel *_model; - KrMouseHandler *_mouseHandler; - QHash<vfile *,KrInterViewItem*> _itemHash; - QFont _viewFont; -}; -#endif // __krinterview__ Added: trunk/krusader_kde4/krusader/Panel/krinterviewitemdelegate.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterviewitemdelegate.cpp (rev 0) +++ trunk/krusader_kde4/krusader/Panel/krinterviewitemdelegate.cpp 2009-02-22 11:08:45 UTC (rev 6223) @@ -0,0 +1,133 @@ +/*************************************************************************** + krinterviewitemdelegate.cpp - description + ------------------- + begin : Sat Feb 14 2009 + copyright : (C) 2009+ by Csaba Karai + email : + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "krinterviewitemdelegate.h" +#include "krvfsmodel.h" + +#include <QDialog> +#include <QPainter> +#include <QLineEdit> + +KrInterViewItemDelegate::KrInterViewItemDelegate( QObject *parent ) : + QItemDelegate( parent ), _currentlyEdited( -1 ) {} + +void KrInterViewItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const +{ + QStyleOptionViewItemV4 opt = option; + opt.state &= ~QStyle::State_Selected; + _dontDraw = ( _currentlyEdited == index.row() ) && (index.column() == KrVfsModel::Extension ); + QItemDelegate::paint( painter, opt, index ); +} + +void KrInterViewItemDelegate::drawDisplay ( QPainter * painter, const QStyleOptionViewItem & option, const QRect & rect, const QString & text ) const +{ + if( !_dontDraw ) + QItemDelegate::drawDisplay( painter, option, rect, text ); +} + +QWidget * KrInterViewItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &sovi, const QModelIndex &index) const +{ + _currentlyEdited = index.row(); + return QItemDelegate::createEditor( parent, sovi, index ); +} + +void KrInterViewItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const +{ + QItemDelegate::setEditorData( editor, index ); + if( editor->inherits( "QLineEdit" ) ) + { + QLineEdit *lineEdit = qobject_cast<QLineEdit *> ( editor ); + if( lineEdit ) { + QString nameWithoutExt = index.data( Qt::UserRole ).toString(); + lineEdit->deselect(); + lineEdit->setSelection( 0, nameWithoutExt.length() ); + } + } +} + +QSize KrInterViewItemDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const +{ + ((QAbstractItemModel*)index.model())->setData( index, QVariant( true ), Qt::UserRole ); + QSize size = QItemDelegate::sizeHint( option, index ); + ((QAbstractItemModel*)index.model())->setData( index, QVariant( false ), Qt::UserRole ); + return size; +} + +bool KrInterViewItemDelegate::eventFilter(QObject *object, QEvent *event) +{ + QWidget *editor = qobject_cast<QWidget*>(object); + if (!editor) + return false; + if (event->type() == QEvent::KeyPress) + { + switch (static_cast<QKeyEvent *>(event)->key()) { + case Qt::Key_Tab: + case Qt::Key_Backtab: + _currentlyEdited = -1; + emit closeEditor(editor, QAbstractItemDelegate::RevertModelCache); + return true; + case Qt::Key_Enter: + case Qt::Key_Return: + if (QLineEdit *e = qobject_cast<QLineEdit*>(editor)) + { + if (!e->hasAcceptableInput()) + return true; + event->accept(); + emit commitData(editor); + emit closeEditor(editor, QAbstractItemDelegate::SubmitModelCache); + _currentlyEdited = -1; + return true; + } + return false; + case Qt::Key_Escape: + event->accept(); + // don't commit data + _currentlyEdited = -1; + emit closeEditor(editor, QAbstractItemDelegate::RevertModelCache); + break; + default: + return false; + } + + if (editor->parentWidget()) + editor->parentWidget()->setFocus(); + return true; + } else if (event->type() == QEvent::FocusOut) { + if (!editor->isActiveWindow() || (QApplication::focusWidget() != editor)) { + QWidget *w = QApplication::focusWidget(); + while (w) { // don't worry about focus changes internally in the editor + if (w == editor) + return false; + w = w->parentWidget(); + } + // Opening a modal dialog will start a new eventloop + // that will process the deleteLater event. + if (QApplication::activeModalWidget() + && !QApplication::activeModalWidget()->isAncestorOf(editor) + && qobject_cast<QDialog*>(QApplication::activeModalWidget())) + return false; + _currentlyEdited = -1; + emit closeEditor(editor, RevertModelCache); + } + } else if (event->type() == QEvent::ShortcutOverride) { + if (static_cast<QKeyEvent*>(event)->key() == Qt::Key_Escape) { + event->accept(); + return true; + } + } + return false; +} Added: trunk/krusader_kde4/krusader/Panel/krinterviewitemdelegate.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterviewitemdelegate.h (rev 0) +++ trunk/krusader_kde4/krusader/Panel/krinterviewitemdelegate.h 2009-02-22 11:08:45 UTC (rev 6223) @@ -0,0 +1,40 @@ +/*************************************************************************** + krinterviewitemdelegate.h - description + ------------------- + begin : Sat Feb 14 2009 + copyright : (C) 2009+ by Csaba Karai + email : + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef __KR_INTERVIEW_ITEM_DELEGATE__ +#define __KR_INTERVIEW_ITEM_DELEGATE__ + +#include <QItemDelegate> + +class KrInterViewItemDelegate : public QItemDelegate +{ +public: + KrInterViewItemDelegate( QObject *parent = 0 ); + + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; + void drawDisplay ( QPainter * painter, const QStyleOptionViewItem & option, const QRect & rect, const QString & text ) const; + QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &sovi, const QModelIndex &index) const; + void setEditorData(QWidget *editor, const QModelIndex &index) const; + QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const; + bool eventFilter(QObject *object, QEvent *event); + +private: + mutable int _currentlyEdited; + mutable bool _dontDraw; +}; + +#endif // __KR_INTERVIEW_ITEM_DELEGATE__ Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-22 10:03:33 UTC (rev 6222) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-22 11:08:45 UTC (rev 6223) @@ -43,6 +43,7 @@ const QModelIndex & nameIndex( const QString & ); virtual Qt::ItemFlags flags ( const QModelIndex & index ) const; static QString krPermissionString( const vfile * vf ); + void emitChanged() { emit layoutChanged(); } protected: QString nameWithoutExtension( const vfile * vf, bool checkEnabled = true ) const; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-22 10:03:45
|
Revision: 6222 http://krusader.svn.sourceforge.net/krusader/?rev=6222&view=rev Author: ckarai Date: 2009-02-22 10:03:33 +0000 (Sun, 22 Feb 2009) Log Message: ----------- InterView: saving settings Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterview.cpp Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-22 09:12:48 UTC (rev 6221) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-22 10:03:33 UTC (rev 6222) @@ -352,22 +352,33 @@ void KrInterView::restoreSettings() { - hideColumn( KrVfsModel::Mime ); - hideColumn( KrVfsModel::Permissions ); - hideColumn( KrVfsModel::Owner ); - hideColumn( KrVfsModel::Group ); - header()->resizeSection( KrVfsModel::Extension, QFontMetrics( _viewFont ).width( "tar.bz2 " ) ); - header()->resizeSection( KrVfsModel::KrPermissions, QFontMetrics( _viewFont ).width( "rwx " ) ); - header()->resizeSection( KrVfsModel::Size, QFontMetrics( _viewFont ).width( "9" ) * 10 ); + KConfigGroup grpSvr( krConfig, _nameInKConfig ); + QByteArray savedState = grpSvr.readEntry( "Saved State", QByteArray() ); - QDateTime tmp(QDate(2099, 12, 29), QTime(23, 59)); - QString desc = KGlobal::locale()->formatDateTime(tmp) + " "; - - header()->resizeSection( KrVfsModel::DateTime, QFontMetrics( _viewFont ).width( desc ) ); + if( savedState.isEmpty() ) + { + hideColumn( KrVfsModel::Mime ); + hideColumn( KrVfsModel::Permissions ); + hideColumn( KrVfsModel::Owner ); + hideColumn( KrVfsModel::Group ); + header()->resizeSection( KrVfsModel::Extension, QFontMetrics( _viewFont ).width( "tar.bz2 " ) ); + header()->resizeSection( KrVfsModel::KrPermissions, QFontMetrics( _viewFont ).width( "rwx " ) ); + header()->resizeSection( KrVfsModel::Size, QFontMetrics( _viewFont ).width( "9" ) * 10 ); + + QDateTime tmp(QDate(2099, 12, 29), QTime(23, 59)); + QString desc = KGlobal::locale()->formatDateTime(tmp) + " "; + + header()->resizeSection( KrVfsModel::DateTime, QFontMetrics( _viewFont ).width( desc ) ); + } else { + header()->restoreState( savedState ); + } } void KrInterView::saveSettings() { + QByteArray state = header()->saveState(); + KConfigGroup grpSvr( krConfig, _nameInKConfig ); + grpSvr.writeEntry( "Saved State", state ); } void KrInterView::setCurrentItem(const QString& name) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-22 09:13:02
|
Revision: 6221 http://krusader.svn.sourceforge.net/krusader/?rev=6221&view=rev Author: ckarai Date: 2009-02-22 09:12:48 +0000 (Sun, 22 Feb 2009) Log Message: ----------- InterView: section size + tooltips + show/hide columns Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterview.cpp trunk/krusader_kde4/krusader/Panel/krinterview.h trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-21 17:45:45 UTC (rev 6220) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-22 09:12:48 UTC (rev 6221) @@ -16,6 +16,7 @@ #include <QPainter> #include <QLineEdit> #include <QDialog> +#include <KMenu> // dummy. remove this class when no longer needed class KrInterViewItem: public KrViewItem @@ -187,6 +188,9 @@ _nameInKConfig=QString( "KrInterView" ) + QString( ( left ? "Left" : "Right" ) ) ; KConfigGroup group( krConfig, "Private" ); + KConfigGroup grpSvr( _config, "Look&Feel" ); + _viewFont = grpSvr.readEntry( "Filelist Font", *_FilelistFont ); + _model = new KrVfsModel( this ); this->setModel(_model); this->setRootIsDecorated(false); @@ -194,6 +198,7 @@ this->sortByColumn( KrVfsModel::Name, Qt::AscendingOrder ); _model->sort( KrVfsModel::Name, Qt::AscendingOrder ); connect( _model, SIGNAL( layoutChanged() ), this, SLOT( slotMakeCurrentVisible() ) ); + header()->installEventFilter( this ); setSelectionMode( QAbstractItemView::NoSelection ); setAllColumnsShowFocus( true ); @@ -204,10 +209,12 @@ setAcceptDrops( true ); setDropIndicatorShown( true ); - hideColumn( KrVfsModel::Mime ); - hideColumn( KrVfsModel::Permissions ); - hideColumn( KrVfsModel::Owner ); - hideColumn( KrVfsModel::Group ); + for( int i=0; i != KrVfsModel::MAX_COLUMNS; i++) + header()->setResizeMode( i, QHeaderView::Interactive ); + header()->setStretchLastSection( false ); + + restoreSettings(); + connect( header(), SIGNAL( sectionResized( int, int, int ) ), this, SLOT( sectionResized( int, int, int ) ) ); } KrInterView::~KrInterView() @@ -345,6 +352,18 @@ void KrInterView::restoreSettings() { + hideColumn( KrVfsModel::Mime ); + hideColumn( KrVfsModel::Permissions ); + hideColumn( KrVfsModel::Owner ); + hideColumn( KrVfsModel::Group ); + header()->resizeSection( KrVfsModel::Extension, QFontMetrics( _viewFont ).width( "tar.bz2 " ) ); + header()->resizeSection( KrVfsModel::KrPermissions, QFontMetrics( _viewFont ).width( "rwx " ) ); + header()->resizeSection( KrVfsModel::Size, QFontMetrics( _viewFont ).width( "9" ) * 10 ); + + QDateTime tmp(QDate(2099, 12, 29), QTime(23, 59)); + QString desc = KGlobal::locale()->formatDateTime(tmp) + " "; + + header()->resizeSection( KrVfsModel::DateTime, QFontMetrics( _viewFont ).width( desc ) ); } void KrInterView::saveSettings() @@ -569,3 +588,181 @@ updateEditorData(); update( nameIndex ); } + +bool KrInterView::eventFilter(QObject *object, QEvent *event) +{ + if( object == header() ) + { + if( event->type() == QEvent::ContextMenu ) + { + QContextMenuEvent *me = (QContextMenuEvent *)event; + showContextMenu( me->globalPos() ); + return true; + } else if( event->type() == QEvent::Resize ) + { + recalculateColumnSizes(); + return false; + } + } + return false; +} + +void KrInterView::showContextMenu( const QPoint & p ) +{ + KMenu popup( this ); + popup.setTitle( i18n("Columns")); +// +// bool refresh = false; + bool hasExtension = !isColumnHidden( KrVfsModel::Extension ); + bool hasMime = !isColumnHidden( KrVfsModel::Mime ); + bool hasSize = !isColumnHidden( KrVfsModel::Size ); + bool hasDate = !isColumnHidden( KrVfsModel::DateTime ); + bool hasPerms = !isColumnHidden( KrVfsModel::Permissions ); + bool hasKrPerms = !isColumnHidden( KrVfsModel::KrPermissions ); + bool hasOwner = !isColumnHidden( KrVfsModel::Owner ); + bool hasGroup = !isColumnHidden( KrVfsModel::Group ); + + QAction *extAct = popup.addAction( i18n( "Ext" ) ); + extAct->setCheckable( true ); + extAct->setChecked( hasExtension ); + + QAction *typeAct = popup.addAction( i18n( "Type" ) ); + typeAct->setCheckable( true ); + typeAct->setChecked( hasMime ); + + QAction *sizeAct = popup.addAction( i18n( "Size" ) ); + sizeAct->setCheckable( true ); + sizeAct->setChecked( hasSize ); + + QAction *modifAct = popup.addAction( i18n( "Modified" ) ); + modifAct->setCheckable( true ); + modifAct->setChecked( hasDate ); + + QAction *permAct = popup.addAction( i18n( "Perms" ) ); + permAct->setCheckable( true ); + permAct->setChecked( hasPerms ); + + QAction *rwxAct = popup.addAction( i18n( "rwx" ) ); + rwxAct->setCheckable( true ); + rwxAct->setChecked( hasKrPerms ); + + QAction *ownerAct = popup.addAction( i18n( "Owner" ) ); + ownerAct->setCheckable( true ); + ownerAct->setChecked( hasOwner ); + + QAction *groupAct = popup.addAction( i18n( "Group" ) ); + groupAct->setCheckable( true ); + groupAct->setChecked( hasGroup ); + + QAction *res = popup.exec( p ); + if( res == extAct ) + { + _model->setExtensionEnabled( !hasExtension ); + if( hasExtension ) + hideColumn( KrVfsModel::Extension ); + else + showColumn( KrVfsModel::Extension ); + } else if( res == typeAct ) { + _model->setExtensionEnabled( !hasMime ); + if( hasMime ) + hideColumn( KrVfsModel::Mime ); + else + showColumn( KrVfsModel::Mime ); + } else if( res == sizeAct ) { + _model->setExtensionEnabled( !hasSize ); + if( hasSize ) + hideColumn( KrVfsModel::Size ); + else + showColumn( KrVfsModel::Size ); + } else if( res == modifAct ) { + _model->setExtensionEnabled( !hasDate ); + if( hasDate ) + hideColumn( KrVfsModel::DateTime ); + else + showColumn( KrVfsModel::DateTime ); + } else if( res == permAct ) { + _model->setExtensionEnabled( !hasPerms ); + if( hasPerms ) + hideColumn( KrVfsModel::Permissions ); + else + showColumn( KrVfsModel::Permissions ); + } else if( res == rwxAct ) { + _model->setExtensionEnabled( !hasKrPerms ); + if( hasKrPerms ) + hideColumn( KrVfsModel::KrPermissions ); + else + showColumn( KrVfsModel::KrPermissions ); + } else if( res == ownerAct ) { + _model->setExtensionEnabled( !hasOwner ); + if( hasOwner ) + hideColumn( KrVfsModel::Owner ); + else + showColumn( KrVfsModel::Owner ); + } else if( res == groupAct ) { + _model->setExtensionEnabled( !hasGroup ); + if( hasGroup ) + hideColumn( KrVfsModel::Group ); + else + showColumn( KrVfsModel::Group ); + } +} + +void KrInterView::sectionResized( int column, int oldSize, int newSize ) +{ + if( oldSize == newSize || !_model->ready() ) + return; + + recalculateColumnSizes(); +} + +void KrInterView::recalculateColumnSizes() +{ + int sum = 0; + for( int i=0; i != KrVfsModel::MAX_COLUMNS; i++ ) + { + if( !isColumnHidden( i ) ) + sum += header()->sectionSize( i ); + } + + if( sum != header()->width() ) + { + int delta = sum - header()->width(); + int nameSize = header()->sectionSize( KrVfsModel::Name ); + if( nameSize - delta > 20 ) + header()->resizeSection( KrVfsModel::Name, nameSize - delta ); + } +} + +bool KrInterView::viewportEvent ( QEvent * event ) +{ + if( event->type() == QEvent::ToolTip ) + { + QHelpEvent *he = static_cast<QHelpEvent*>(event); + const QModelIndex index = indexAt(he->pos()); + + if( index.isValid() ) + { + int width = header()->sectionSize( index.column() ); + QString text = index.data( Qt::DisplayRole ).toString(); + + int textWidth = QFontMetrics( _viewFont ).width( text ); + + const int textMargin = QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1; + textWidth += 2 * textMargin; + + QVariant decor = index.data( Qt::DecorationRole ); + if( decor.isValid() && decor.type() == QVariant::Pixmap ) + { + QPixmap p = decor.value<QPixmap>(); + textWidth += p.width() + 2 * textMargin; + } + + if( textWidth <= width ) + { + event->accept(); + return true; + } + } + } + return QTreeView::viewportEvent( event ); +} Modified: trunk/krusader_kde4/krusader/Panel/krinterview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-21 17:45:45 UTC (rev 6220) +++ trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-22 09:12:48 UTC (rev 6221) @@ -5,12 +5,14 @@ #include <QTreeView> #include <QVector> +#include <QFont> class KrVfsModel; class KrInterViewItem; class QMouseEvent; class QKeyEvent; class QDragEnterEvent; +class QContextMenuEvent; class KrMouseHandler; class KrInterView : public QTreeView, public KrView { @@ -58,6 +60,7 @@ protected slots: void slotMakeCurrentVisible(); virtual void renameCurrentItem(); + void sectionResized( int, int, int ); protected: virtual void setup(); @@ -74,10 +77,16 @@ virtual void dragMoveEvent(QDragMoveEvent *e); virtual void dragLeaveEvent(QDragLeaveEvent *e); virtual void dropEvent ( QDropEvent * ); + virtual bool eventFilter(QObject *object, QEvent *event); + virtual bool viewportEvent ( QEvent * event ); + void showContextMenu( const QPoint & p ); + void recalculateColumnSizes(); + private: KrVfsModel *_model; KrMouseHandler *_mouseHandler; QHash<vfile *,KrInterViewItem*> _itemHash; + QFont _viewFont; }; #endif // __krinterview__ Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-21 17:45:45 UTC (rev 6220) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-22 09:12:48 UTC (rev 6221) @@ -226,6 +226,7 @@ } return QVariant(); } + case Qt::ToolTipRole: case Qt::DisplayRole: { switch (index.column()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-21 17:45:55
|
Revision: 6220 http://krusader.svn.sourceforge.net/krusader/?rev=6220&view=rev Author: ckarai Date: 2009-02-21 17:45:45 +0000 (Sat, 21 Feb 2009) Log Message: ----------- InterView: performance problems II. Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterview.cpp trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp trunk/krusader_kde4/krusader/Panel/krvfsmodel.h Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-21 14:03:16 UTC (rev 6219) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-21 17:45:45 UTC (rev 6220) @@ -94,6 +94,14 @@ } } + QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const + { + ((QAbstractItemModel*)index.model())->setData( index, QVariant( true ), Qt::UserRole ); + QSize size = QItemDelegate::sizeHint( option, index ); + ((QAbstractItemModel*)index.model())->setData( index, QVariant( false ), Qt::UserRole ); + return size; + } + bool eventFilter(QObject *object, QEvent *event) { QWidget *editor = qobject_cast<QWidget*>(object); @@ -195,6 +203,11 @@ setMouseTracking( true ); setAcceptDrops( true ); setDropIndicatorShown( true ); + + hideColumn( KrVfsModel::Mime ); + hideColumn( KrVfsModel::Permissions ); + hideColumn( KrVfsModel::Owner ); + hideColumn( KrVfsModel::Group ); } KrInterView::~KrInterView() Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-21 14:03:16 UTC (rev 6219) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-21 17:45:45 UTC (rev 6220) @@ -128,7 +128,12 @@ KrVfsModel::KrVfsModel( KrView * view ): QAbstractListModel(0), _extensionEnabled( true ), _view( view ), _lastSortOrder( KrVfsModel::Name ), _lastSortDir(Qt::AscendingOrder), - _dummyVfile( 0 ), _ready( false ) {} + _dummyVfile( 0 ), _ready( false ), _justForSizeHint( false ) +{ + KConfigGroup grpSvr( krConfig, "Look&Feel" ); + _defaultFont = grpSvr.readEntry( "Filelist Font", *_FilelistFont ); + _fileIconSize = (grpSvr.readEntry("Filelist Icon Size",_FilelistIconSize)).toInt(); +} void KrVfsModel::setVfs(vfs* v, bool upDir) { @@ -195,11 +200,8 @@ QVariant KrVfsModel::data(const QModelIndex& index, int role) const { - if (!index.isValid()) + if (!index.isValid() || index.row() >= rowCount()) return QVariant(); - - if (index.row() >= rowCount()) - return QVariant(); vfile *vf = _vfiles.at(index.row()); if( vf == 0 ) return QVariant(); @@ -207,10 +209,7 @@ switch( role ) { case Qt::FontRole: - { - KConfigGroup grpSvr( krConfig, "Look&Feel" ); - return grpSvr.readEntry( "Filelist Font", *_FilelistFont ); - } + return _defaultFont; case Qt::EditRole: { if( index.column() == 0 ) @@ -305,8 +304,11 @@ switch (index.column() ) { case KrVfsModel::Name: { - if( properties()->displayIcons ) + if( properties()->displayIcons ) { + if( _justForSizeHint ) + return QPixmap( _fileIconSize, _fileIconSize ); return KrView::getIcon( vf ); + } break; } default: @@ -378,6 +380,10 @@ _view->op()->emitRenameItem( vf->vfile_getName(), value.toString() ); } } + if( role == Qt::UserRole && index.isValid() ) + { + _justForSizeHint = value.toBool(); + } return QAbstractListModel::setData( index, value, role ); } Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-21 14:03:16 UTC (rev 6219) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-21 17:45:45 UTC (rev 6220) @@ -3,6 +3,7 @@ #include <QAbstractListModel> #include <QVector> +#include <QFont> #include "krview.h" class vfs; @@ -46,6 +47,7 @@ protected: QString nameWithoutExtension( const vfile * vf, bool checkEnabled = true ) const; + QVector<vfile*> _vfiles; QHash<vfile *, QModelIndex> _vfileNdx; QHash<QString, QModelIndex> _nameNdx; @@ -55,5 +57,8 @@ Qt::SortOrder _lastSortDir; vfile * _dummyVfile; bool _ready; + QFont _defaultFont; + bool _justForSizeHint; + int _fileIconSize; }; #endif // __krvfsmodel__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-21 14:03:28
|
Revision: 6219 http://krusader.svn.sourceforge.net/krusader/?rev=6219&view=rev Author: ckarai Date: 2009-02-21 14:03:16 +0000 (Sat, 21 Feb 2009) Log Message: ----------- InterView: performance fixes I. Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterview.cpp trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-21 11:07:49 UTC (rev 6218) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-21 14:03:16 UTC (rev 6219) @@ -508,12 +508,14 @@ vfile * vf = _model->vfileAt( ndx ); if( vf == 0 ) return 0; - if( !_itemHash.contains( vf ) ) { + QHash<vfile *,KrInterViewItem*>::iterator it = _itemHash.find( vf ); + if( it == _itemHash.end() ) { KrInterViewItem * newItem = new KrInterViewItem( this, vf ); _itemHash[ vf ] = newItem; _dict.insert( vf->vfile_getName(), newItem ); + return newItem; } - return _itemHash[ vf ]; + return *it; } void KrInterView::selectRegion( KrViewItem *i1, KrViewItem *i2, bool select) Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-21 11:07:49 UTC (rev 6218) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-21 14:03:16 UTC (rev 6219) @@ -132,8 +132,6 @@ void KrVfsModel::setVfs(vfs* v, bool upDir) { - emit layoutAboutToBeChanged(); - _dummyVfile = 0; if( upDir ) { _dummyVfile = new vfile( "..", 0, "drwxrwxrwx", 0, false, 0, 0, "", "", 0, -1); @@ -173,8 +171,6 @@ // TODO: connect all addedVfile/deleteVfile and friends signals // TODO: make a more efficient implementation that this dummy one :-) - emit dataChanged(index(0, 0), index(_vfiles.count()-1, 0)); - emit layoutChanged(); sort(); } @@ -184,9 +180,7 @@ void KrVfsModel::clear() { - emit layoutAboutToBeChanged(); _vfiles.clear(); - emit layoutChanged(); } int KrVfsModel::rowCount(const QModelIndex& parent) const This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-21 11:07:54
|
Revision: 6218 http://krusader.svn.sourceforge.net/krusader/?rev=6218&view=rev Author: ckarai Date: 2009-02-21 11:07:49 +0000 (Sat, 21 Feb 2009) Log Message: ----------- InterView: missing columns Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterview.cpp trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp trunk/krusader_kde4/krusader/Panel/krvfsmodel.h Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-21 08:10:23 UTC (rev 6217) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-21 11:07:49 UTC (rev 6218) @@ -411,6 +411,9 @@ void KrInterView::addItems(vfs* v, bool addUpDir) { _model->setVfs(v, addUpDir); + _count = _model->rowCount(); + if( addUpDir ) + _count--; this->setCurrentIndex(_model->index(0, 0)); if( !nameToMakeCurrent().isEmpty() ) Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-21 08:10:23 UTC (rev 6217) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-21 11:07:49 UTC (rev 6218) @@ -11,6 +11,7 @@ #include "listpanel.h" #include "krcolorcache.h" +#define PERM_BITMASK (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) class SortProps { @@ -23,8 +24,11 @@ _ascending = asc; _vfile = vf; _index = origNdx; - if( _col == KrVfsModel::Extension ) + + switch( _col ) { + case KrVfsModel::Extension: + { if( vf->vfile_isDir() ) { _ext = ""; } else { @@ -43,7 +47,61 @@ } else _ext = ""; } + break; } + case KrVfsModel::Mime: + { + if( isDummy ) + _data = ""; + else + { + KMimeType::Ptr mt = KMimeType::mimeType(vf->vfile_getMime()); + if( mt ) + _data = mt->comment(); + } + break; + } + case KrVfsModel::Permissions: + { + if( isDummy ) + _data = ""; + else + { + if (properties()->numericPermissions) { + QString perm; + _data = perm.sprintf("%.4o", vf->vfile_getMode() & PERM_BITMASK); + } else + _data = vf->vfile_getPerm(); + } + break; + } + case KrVfsModel::KrPermissions: + { + if( isDummy ) + _data = ""; + else + { + _data = KrVfsModel::krPermissionString( vf ); + } + break; + } + case KrVfsModel::Owner: + { + if( isDummy ) + _data = ""; + else + _data = vf->vfile_getOwner(); + } + case KrVfsModel::Group: + { + if( isDummy ) + _data = ""; + else + _data = vf->vfile_getGroup(); + } + default: + break; + } } inline int column() { return _col; } @@ -53,7 +111,8 @@ inline QString extension() { return _ext; } inline vfile * vf() { return _vfile; } inline int originalIndex() { return _index; } - + inline QString data() { return _data; } + private: int _col; const KrViewProperties * _prop; @@ -62,6 +121,7 @@ bool _ascending; QString _ext; int _index; + QString _data; }; typedef bool(*LessThan)(SortProps *,SortProps *); @@ -195,6 +255,53 @@ KIO::convertSize(vf->vfile_getSize())+" " : KRpermHandler::parseSize(vf->vfile_getSize())+" "; } + case KrVfsModel::Mime: + { + if( vf == _dummyVfile ) + return QVariant(); + KMimeType::Ptr mt = KMimeType::mimeType(vf->vfile_getMime()); + if( mt ) + return mt->comment(); + return QVariant(); + } + case KrVfsModel::DateTime: + { + if( vf == _dummyVfile ) + return QVariant(); + time_t time = vf->vfile_getTime_t(); + struct tm* t=localtime((time_t *)&time); + + QDateTime tmp(QDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), QTime(t->tm_hour, t->tm_min)); + return KGlobal::locale()->formatDateTime(tmp); + } + case KrVfsModel::Permissions: + { + if( vf == _dummyVfile ) + return QVariant(); + if (properties()->numericPermissions) { + QString perm; + return perm.sprintf("%.4o", vf->vfile_getMode() & PERM_BITMASK); + } + return vf->vfile_getPerm(); + } + case KrVfsModel::KrPermissions: + { + if( vf == _dummyVfile ) + return QVariant(); + return krPermissionString( vf ); + } + case KrVfsModel::Owner: + { + if( vf == _dummyVfile ) + return QVariant(); + return vf->vfile_getOwner(); + } + case KrVfsModel::Group: + { + if( vf == _dummyVfile ) + return QVariant(); + return vf->vfile_getGroup(); + } default: return QString(); } return QVariant(); @@ -322,7 +429,7 @@ if(aNumbers && lchar1.isDigit() && lchar2.isDigit() ) { int j = compareNumbers(aS1, lPositionS1, aS2, lPositionS2); - if( j != 0 ) return (j == -1); + if( j != 0 ) return j < 0; } else if( lUseLocaleAware @@ -366,7 +473,7 @@ if(aNumbers && aS1[lPositionS1].isDigit() && aS2[lPositionS2].isDigit()) { int j = compareNumbers(aS1, lPositionS1, aS2, lPositionS2); - if( j != 0 ) return (j == -1); + if( j != 0 ) return j < 0; } else { @@ -478,6 +585,18 @@ if( file1->vfile_getSize() == file2->vfile_getSize() ) return compareTexts(file1->vfile_getName(), file2->vfile_getName(), sp->properties(), sp->isAscending(), true); return file1->vfile_getSize() < file2->vfile_getSize(); + case KrVfsModel::DateTime: + if( file1->vfile_getTime_t() == file2->vfile_getTime_t() ) + return compareTexts(file1->vfile_getName(), file2->vfile_getName(), sp->properties(), sp->isAscending(), true); + return file1->vfile_getTime_t() < file2->vfile_getTime_t(); + case KrVfsModel::Mime: + case KrVfsModel::Permissions: + case KrVfsModel::KrPermissions: + case KrVfsModel::Owner: + case KrVfsModel::Group: + if( sp->data() == sp2->data() ) + return compareTexts(file1->vfile_getName(), file2->vfile_getName(), sp->properties(), sp->isAscending(), true); + return compareTexts( sp->data(), sp2->data(), sp->properties(), sp->isAscending(), true ); } file1->vfile_getName() < file2->vfile_getName(); } @@ -642,6 +761,12 @@ case KrVfsModel::Name: return i18n( "Name" ); case KrVfsModel::Extension: return i18n( "Ext" ); case KrVfsModel::Size: return i18n( "Size" ); + case KrVfsModel::Mime: return i18n( "Type" ); + case KrVfsModel::DateTime: return i18n( "Modified" ); + case KrVfsModel::Permissions: return i18n( "Perms" ); + case KrVfsModel::KrPermissions: return i18n( "rwx" ); + case KrVfsModel::Owner: return i18n( "Owner" ); + case KrVfsModel::Group: return i18n( "Group" ); } return QString(); } @@ -700,3 +825,24 @@ return vfName; return vfName.left(loc); } + +QString KrVfsModel::krPermissionString( const vfile * vf ) +{ + QString tmp; + switch ( vf->vfile_isReadable() ){ + case ALLOWED_PERM: tmp+='r'; break; + case UNKNOWN_PERM: tmp+='?'; break; + case NO_PERM: tmp+='-'; break; + } + switch ( vf->vfile_isWriteable()){ + case ALLOWED_PERM: tmp+='w'; break; + case UNKNOWN_PERM: tmp+='?'; break; + case NO_PERM: tmp+='-'; break; + } + switch ( vf->vfile_isExecutable()){ + case ALLOWED_PERM: tmp+='x'; break; + case UNKNOWN_PERM: tmp+='?'; break; + case NO_PERM: tmp+='-'; break; + } + return tmp; +} \ No newline at end of file Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-21 08:10:23 UTC (rev 6217) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-21 11:07:49 UTC (rev 6218) @@ -15,7 +15,7 @@ public: enum ColumnType { Name = 0x0, Extension = 0x1, Size = 0x2, Mime = 0x3, DateTime = 0x4, - Permissions = 0x5, KrPermissions = 0x6, Owner = 0x7, Group = 0x8, MAX_COLUMNS = 0x03 }; + Permissions = 0x5, KrPermissions = 0x6, Owner = 0x7, Group = 0x8, MAX_COLUMNS = 0x09 }; KrVfsModel( KrView * ); virtual ~KrVfsModel(); @@ -41,6 +41,7 @@ const QModelIndex & vfileIndex( vfile * ); const QModelIndex & nameIndex( const QString & ); virtual Qt::ItemFlags flags ( const QModelIndex & index ) const; + static QString krPermissionString( const vfile * vf ); protected: QString nameWithoutExtension( const vfile * vf, bool checkEnabled = true ) const; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-21 08:10:29
|
Revision: 6217 http://krusader.svn.sourceforge.net/krusader/?rev=6217&view=rev Author: ckarai Date: 2009-02-21 08:10:23 +0000 (Sat, 21 Feb 2009) Log Message: ----------- FIXED: tab change at dragging doesn't work Modified Paths: -------------- trunk/krusader_kde4/ChangeLog trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp trunk/krusader_kde4/krusader/paneltabbar.cpp trunk/krusader_kde4/krusader/paneltabbar.h Modified: trunk/krusader_kde4/ChangeLog =================================================================== --- trunk/krusader_kde4/ChangeLog 2009-02-21 07:39:16 UTC (rev 6216) +++ trunk/krusader_kde4/ChangeLog 2009-02-21 08:10:23 UTC (rev 6217) @@ -1,5 +1,6 @@ ADDED: [ 2466695 ] Archive dialog now remembers Compression level + FIXED: tab change at dragging doesn't work FIXED: [ 2543170 ] Crashes on mouse wheel in brief view FIXED: [ 2553396 ] Krusader exits after closing KrViewer FIXED: [ 2563664 ] Krusader always trashes (not deletes) files Modified: trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-21 07:39:16 UTC (rev 6216) +++ trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-21 08:10:23 UTC (rev 6217) @@ -230,17 +230,19 @@ if ( ( _singleClicked || _renameTimer.isActive() ) && item != _singleClickedItem ) CANCEL_TWO_CLICK_RENAME; + if ( !item ) + return false; + + QString desc = item->description(); + _view->op()->emitItemDescription(desc); + if ( _dragStartPos != QPoint( -1, -1 ) && ( e->buttons() & Qt::LeftButton ) && ( _dragStartPos - e->pos() ).manhattanLength() > QApplication::startDragDistance() ) { _view->op()->startDrag(); + return true; } - if ( !item ) - return false; - QString desc = item->description(); - _view->op()->emitItemDescription(desc); - if (KrSelectionMode::getSelectionHandler()->rightButtonPreservesSelection() && KrSelectionMode::getSelectionHandler()->rightButtonSelects() && KrSelectionMode::getSelectionHandler()->showContextMenu() >= 0 && e->buttons() == Qt::RightButton) Modified: trunk/krusader_kde4/krusader/paneltabbar.cpp =================================================================== --- trunk/krusader_kde4/krusader/paneltabbar.cpp 2009-02-21 07:39:16 UTC (rev 6216) +++ trunk/krusader_kde4/krusader/paneltabbar.cpp 2009-02-21 08:10:23 UTC (rev 6217) @@ -252,24 +252,27 @@ //layoutTabs(); } -#if 0 // TODO: fix this void PanelTabBar::dragEnterEvent(QDragEnterEvent *e) { - QTab *t = selectTab(e->pos()); - if (!t) return; - if (tab(currentIndex()) != t) { + e->accept(); + int t = tabAt(e->pos()); + if (t == -1) + return; + if ( currentIndex() != t) { setCurrentIndex(t); - emit changePanel(static_cast<ListPanel*>((ListPanel*)tabData(t))); + emit changePanel((ListPanel*)tabData(t).toLongLong()); } + QTabBar::dragEnterEvent( e ); } void PanelTabBar::dragMoveEvent(QDragMoveEvent *e) { - QTab *t = selectTab(e->pos()); - if (!t) return; - if (tab(currentIndex()) != t) { + e->ignore(); + int t = tabAt(e->pos()); + if (t == -1) return; + if (currentIndex() != t) { setCurrentIndex(t); - emit changePanel(static_cast<ListPanel*>((ListPanel*)tabData(t))); + emit changePanel((ListPanel*)tabData(t).toLongLong()); } + QTabBar::dragMoveEvent( e ); } -#endif #include "paneltabbar.moc" Modified: trunk/krusader_kde4/krusader/paneltabbar.h =================================================================== --- trunk/krusader_kde4/krusader/paneltabbar.h 2009-02-21 07:39:16 UTC (rev 6216) +++ trunk/krusader_kde4/krusader/paneltabbar.h 2009-02-21 08:10:23 UTC (rev 6217) @@ -20,8 +20,8 @@ #include <kurl.h> //#include <QResizeEvent> //#include <QMouseEvent> -//#include <QDragMoveEvent> -//#include <QDragEnterEvent> +#include <QDragMoveEvent> +#include <QDragEnterEvent> #include <QTabBar> #include <QVariant> @@ -80,10 +80,8 @@ void mousePressEvent( QMouseEvent* ); void insertAction( KAction* ); QString squeeze(QString text, int index=-1); -#if 0 // TODO: fix this virtual void dragEnterEvent(QDragEnterEvent *); virtual void dragMoveEvent(QDragMoveEvent *); -#endif virtual void resizeEvent ( QResizeEvent *e ); protected slots: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-21 07:39:31
|
Revision: 6216 http://krusader.svn.sourceforge.net/krusader/?rev=6216&view=rev Author: ckarai Date: 2009-02-21 07:39:16 +0000 (Sat, 21 Feb 2009) Log Message: ----------- InterView: drag & drop Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterview.cpp trunk/krusader_kde4/krusader/Panel/krinterview.h trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp trunk/krusader_kde4/krusader/Panel/krmousehandler.h trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-19 22:42:21 UTC (rev 6215) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-21 07:39:16 UTC (rev 6216) @@ -193,6 +193,8 @@ setStyle( new KrStyleProxy() ); setItemDelegate( new KrInterViewItemDelegate() ); setMouseTracking( true ); + setAcceptDrops( true ); + setDropIndicatorShown( true ); } KrInterView::~KrInterView() @@ -466,6 +468,30 @@ QTreeView::wheelEvent( ev ); } +void KrInterView::dragEnterEvent ( QDragEnterEvent *ev ) +{ + if( !_mouseHandler->dragEnterEvent( ev ) ) + QTreeView::dragEnterEvent( ev ); +} + +void KrInterView::dragMoveEvent ( QDragMoveEvent *ev ) +{ + QTreeView::dragMoveEvent( ev ); + _mouseHandler->dragMoveEvent( ev ); +} + +void KrInterView::dragLeaveEvent ( QDragLeaveEvent *ev ) +{ + if( !_mouseHandler->dragLeaveEvent( ev ) ) + QTreeView::dragLeaveEvent( ev ); +} + +void KrInterView::dropEvent ( QDropEvent *ev ) +{ + if( !_mouseHandler->dropEvent( ev ) ) + QTreeView::dropEvent( ev ); +} + bool KrInterView::event( QEvent * e ) { _mouseHandler->otherEvent( e ); Modified: trunk/krusader_kde4/krusader/Panel/krinterview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-19 22:42:21 UTC (rev 6215) +++ trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-21 07:39:16 UTC (rev 6216) @@ -10,6 +10,7 @@ class KrInterViewItem; class QMouseEvent; class QKeyEvent; +class QDragEnterEvent; class KrMouseHandler; class KrInterView : public QTreeView, public KrView { @@ -69,6 +70,10 @@ virtual void mouseMoveEvent ( QMouseEvent * ); virtual void wheelEvent ( QWheelEvent * ); virtual bool event( QEvent * e ); + virtual void dragEnterEvent(QDragEnterEvent *e); + virtual void dragMoveEvent(QDragMoveEvent *e); + virtual void dragLeaveEvent(QDragLeaveEvent *e); + virtual void dropEvent ( QDropEvent * ); private: KrVfsModel *_model; Modified: trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-19 22:42:21 UTC (rev 6215) +++ trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-21 07:39:16 UTC (rev 6216) @@ -25,7 +25,8 @@ #define CANCEL_TWO_CLICK_RENAME {_singleClicked = false;_renameTimer.stop();} KrMouseHandler::KrMouseHandler( KrView * view, int contextMenuShift ) : _view( view ), _rightClickedItem( 0 ), - _contextMenuTimer(), _contextMenuShift( contextMenuShift ), _singleClicked( false ), _singleClickTime(), _renameTimer() + _contextMenuTimer(), _contextMenuShift( contextMenuShift ), _singleClicked( false ), _singleClickTime(), + _renameTimer(), _dragStartPos( -1, -1 ) { KConfigGroup grpSvr( krConfig, "Look&Feel" ); // decide on single click/double click selection @@ -41,7 +42,7 @@ _view->op()->emitNeedFocus(); if (e->button() == Qt::LeftButton) { - //dragStartPos = e->pos(); + _dragStartPos = e->pos(); if( e->modifiers() == Qt::NoModifier ) { if( item ) @@ -148,6 +149,8 @@ bool KrMouseHandler::mouseReleaseEvent( QMouseEvent *e ) { + if( e->button() == Qt::LeftButton ) + _dragStartPos = QPoint( -1, -1 ); KrViewItem * item = _view->getKrViewItemAt( e->pos() ); if( e->button() == Qt::RightButton ) { @@ -227,6 +230,12 @@ if ( ( _singleClicked || _renameTimer.isActive() ) && item != _singleClickedItem ) CANCEL_TWO_CLICK_RENAME; + if ( _dragStartPos != QPoint( -1, -1 ) && + ( e->buttons() & Qt::LeftButton ) && ( _dragStartPos - e->pos() ).manhattanLength() > QApplication::startDragDistance() ) + { + _view->op()->startDrag(); + } + if ( !item ) return false; QString desc = item->description(); @@ -298,3 +307,28 @@ { CANCEL_TWO_CLICK_RENAME; } + +bool KrMouseHandler::dragEnterEvent(QDragEnterEvent *e) +{ + KUrl::List URLs = KUrl::List::fromMimeData( e->mimeData() ); + e->setAccepted( !URLs.isEmpty() ); + return true; +} + +bool KrMouseHandler::dragMoveEvent(QDragMoveEvent *e) +{ + KUrl::List URLs = KUrl::List::fromMimeData( e->mimeData() ); + e->setAccepted( !URLs.isEmpty() ); + return true; +} + +bool KrMouseHandler::dragLeaveEvent(QDragLeaveEvent *e) +{ + return false; +} + +bool KrMouseHandler::dropEvent ( QDropEvent *e ) +{ + _view->op()->emitGotDrop( e ); + return true; +} Modified: trunk/krusader_kde4/krusader/Panel/krmousehandler.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krmousehandler.h 2009-02-19 22:42:21 UTC (rev 6215) +++ trunk/krusader_kde4/krusader/Panel/krmousehandler.h 2009-02-21 07:39:16 UTC (rev 6216) @@ -26,6 +26,10 @@ class QWheelEvent; class KrView; class KrViewItem; +class QDragEnterEvent; +class QDragMoveEvent; +class QDragLeaveEvent; +class QDropEvent; class KrMouseHandler : public QObject { @@ -39,6 +43,10 @@ bool mouseDoubleClickEvent( QMouseEvent *e ); bool mouseMoveEvent ( QMouseEvent *e ); bool wheelEvent ( QWheelEvent * ); + bool dragEnterEvent(QDragEnterEvent *e); + bool dragMoveEvent(QDragMoveEvent *e); + bool dragLeaveEvent(QDragLeaveEvent *e); + bool dropEvent ( QDropEvent *e ); void handleContextMenu( KrViewItem * it, const QPoint & pos ); void otherEvent( QEvent * e ); void cancelTwoClickRename(); @@ -61,6 +69,7 @@ KrViewItem * _singleClickedItem; QTime _singleClickTime; QTimer _renameTimer; + QPoint _dragStartPos; }; #endif /* __KR_MOUSE_HANDLER */ Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-19 22:42:21 UTC (rev 6215) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-21 07:39:16 UTC (rev 6216) @@ -675,9 +675,9 @@ vfile *vf = _vfiles.at(index.row()); if( vf == _dummyVfile ) { - flags = flags & (~Qt::ItemIsSelectable); + flags = (flags & (~Qt::ItemIsSelectable)) | Qt::ItemIsDropEnabled; } else - flags = flags | Qt::ItemIsEditable; + flags = flags | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled; return flags; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-19 23:27:24
|
Revision: 6215 http://krusader.svn.sourceforge.net/krusader/?rev=6215&view=rev Author: ckarai Date: 2009-02-19 22:42:21 +0000 (Thu, 19 Feb 2009) Log Message: ----------- InterView: add/delete/update file events Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterview.cpp trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp trunk/krusader_kde4/krusader/Panel/krvfsmodel.h Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-19 20:50:30 UTC (rev 6214) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-19 22:42:21 UTC (rev 6215) @@ -306,12 +306,18 @@ KrViewItem* KrInterView::preAddItem(vfile *vf) { - return 0; + return getKrInterViewItem( _model->addItem( vf ) ); } bool KrInterView::preDelItem(KrViewItem *item) { - return false; + if( item == 0 ) + return true; + QModelIndex ndx = _model->removeItem( (vfile *)item->getVfile() ); + if( ndx.isValid() ) + setCurrentIndex( ndx ); + _itemHash.remove( (vfile *)item->getVfile() ); + return true; } void KrInterView::redraw() @@ -384,6 +390,9 @@ void KrInterView::updateItem(KrViewItem* item) { + if( item == 0 ) + return; + _model->updateItem( (vfile *)item->getVfile() ); } void KrInterView::clear() @@ -470,8 +479,11 @@ vfile * vf = _model->vfileAt( ndx ); if( vf == 0 ) return 0; - if( !_itemHash.contains( vf ) ) - _itemHash[ vf ] = new KrInterViewItem( this, vf ); + if( !_itemHash.contains( vf ) ) { + KrInterViewItem * newItem = new KrInterViewItem( this, vf ); + _itemHash[ vf ] = newItem; + _dict.insert( vf->vfile_getName(), newItem ); + } return _itemHash[ vf ]; } Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-19 20:50:30 UTC (rev 6214) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-19 22:42:21 UTC (rev 6215) @@ -523,6 +523,115 @@ emit layoutChanged(); } +QModelIndex KrVfsModel::addItem( vfile * vf ) +{ + bool isDir = vf->vfile_isDir(); + if ( !isDir || ( isDir && ( properties()->filter & KrViewProperties::ApplyToDirs ) ) ) { + switch ( properties()->filter ) { + case KrViewProperties::All : + break; + case KrViewProperties::Custom : + if ( !properties()->filterMask.match( vf ) ) + return QModelIndex(); + break; + case KrViewProperties::Dirs: + if ( !isDir ) + return QModelIndex(); + break; + case KrViewProperties::Files: + if ( isDir ) + return QModelIndex(); + break; + default: + break; + } + } + emit layoutAboutToBeChanged(); + + QModelIndexList oldPersistentList = persistentIndexList(); + + SortProps insSort( vf, _lastSortOrder, properties(), vf == _dummyVfile, _lastSortDir == Qt::AscendingOrder, -1 ); + + QVector < SortProps * > sorting (_vfiles.count()); + for (int i = 0; i < _vfiles.count(); ++i) + sorting[ i ] = new SortProps( _vfiles[ i ], _lastSortOrder, properties(), _vfiles[ i ] == _dummyVfile, _lastSortDir == Qt::AscendingOrder, i ); + + LessThan compare = (_lastSortDir == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan); + QVector<SortProps *>::iterator it = qLowerBound(sorting.begin(), sorting.end(), &insSort, compare); + + int insertIndex = _vfiles.count(); + if( it != sorting.end() ) { + insertIndex = (*it)->originalIndex(); + _vfiles.insert( insertIndex, vf ); + } else + _vfiles.append( vf ); + + for (int di = 0; di != sorting.count(); di++ ) + delete sorting[ di ]; + + for (int i = insertIndex; i < _vfiles.count(); ++i) { + _vfileNdx[ _vfiles[ i ] ] = index( i, 0 ); + _nameNdx[ _vfiles[ i ]->vfile_getName() ] = index( i, 0 ); + } + + QModelIndexList newPersistentList; + foreach( QModelIndex mndx, oldPersistentList ) { + int newRow = mndx.row(); + if( newRow >= insertIndex ) + newRow++; + newPersistentList << index( newRow, mndx.column() ); + } + + changePersistentIndexList(oldPersistentList, newPersistentList); + emit layoutChanged(); + + return index( insertIndex, 0 ); +} + +QModelIndex KrVfsModel::removeItem( vfile * vf ) +{ + for( int i=0; i != _vfiles.count(); i++ ) + { + if( _vfiles[ i ] == vf ) + { + emit layoutAboutToBeChanged(); + QModelIndexList oldPersistentList = persistentIndexList(); + QModelIndexList newPersistentList; + + _vfiles.remove( i ); + + for (int ri = i; ri < _vfiles.count(); ++ri) { + _vfileNdx[ _vfiles[ ri ] ] = index( ri, 0 ); + _nameNdx[ _vfiles[ ri ]->vfile_getName() ] = index( ri, 0 ); + } + + foreach( QModelIndex mndx, oldPersistentList ) { + int newRow = mndx.row(); + if( newRow > i ) + newRow--; + if( newRow != i ) + newPersistentList << index( newRow, mndx.column() ); + else + newPersistentList << QModelIndex(); + } + changePersistentIndexList(oldPersistentList, newPersistentList); + emit layoutChanged(); + if( _vfiles.count() == 0 ) + return QModelIndex(); + if( i >= _vfiles.count() ) + i = _vfiles.count() - 1; + return index( i, 0 ); + } + } + return QModelIndex(); +} + +void KrVfsModel::updateItem( vfile * vf ) +{ + // TODO: make it faster + sort(); +} + QVariant KrVfsModel::headerData(int section, Qt::Orientation orientation, int role) const { // ignore anything that's not display, and not horizontal Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-19 20:50:30 UTC (rev 6214) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-19 22:42:21 UTC (rev 6215) @@ -22,6 +22,9 @@ inline bool ready() const { return _ready; } void setVfs(vfs* v, bool upDir); + QModelIndex addItem( vfile * ); + QModelIndex removeItem( vfile * ); + void updateItem( vfile * ); int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-19 20:50:45
|
Revision: 6214 http://krusader.svn.sourceforge.net/krusader/?rev=6214&view=rev Author: ckarai Date: 2009-02-19 20:50:30 +0000 (Thu, 19 Feb 2009) Log Message: ----------- InterView: inplace rename Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterview.cpp trunk/krusader_kde4/krusader/Panel/krinterview.h trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp trunk/krusader_kde4/krusader/Panel/krmousehandler.h trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp trunk/krusader_kde4/krusader/Panel/krvfsmodel.h Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-17 21:23:14 UTC (rev 6213) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-19 20:50:30 UTC (rev 6214) @@ -14,6 +14,8 @@ #include "../GUI/krstyleproxy.h" #include <QItemDelegate> #include <QPainter> +#include <QLineEdit> +#include <QDialog> // dummy. remove this class when no longer needed class KrInterViewItem: public KrViewItem @@ -51,15 +53,111 @@ class KrInterViewItemDelegate : public QItemDelegate { +private: + mutable int _currentlyEdited; + mutable bool _dontDraw; + public: - KrInterViewItemDelegate( QObject *parent = 0 ) : QItemDelegate( parent ) {} + KrInterViewItemDelegate( QObject *parent = 0 ) : QItemDelegate( parent ), _currentlyEdited( -1 ) {} void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const { QStyleOptionViewItemV4 opt = option; opt.state &= ~QStyle::State_Selected; + _dontDraw = ( _currentlyEdited == index.row() ) && (index.column() == KrVfsModel::Extension ); QItemDelegate::paint( painter, opt, index ); } + + void drawDisplay ( QPainter * painter, const QStyleOptionViewItem & option, const QRect & rect, const QString & text ) const + { + if( !_dontDraw ) + QItemDelegate::drawDisplay( painter, option, rect, text ); + } + + QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &sovi, const QModelIndex &index) const + { + _currentlyEdited = index.row(); + return QItemDelegate::createEditor( parent, sovi, index ); + } + + void setEditorData(QWidget *editor, const QModelIndex &index) const + { + QItemDelegate::setEditorData( editor, index ); + if( editor->inherits( "QLineEdit" ) ) + { + QLineEdit *lineEdit = qobject_cast<QLineEdit *> ( editor ); + if( lineEdit ) { + QString nameWithoutExt = index.data( Qt::UserRole ).toString(); + lineEdit->deselect(); + lineEdit->setSelection( 0, nameWithoutExt.length() ); + } + } + } + + bool eventFilter(QObject *object, QEvent *event) + { + QWidget *editor = qobject_cast<QWidget*>(object); + if (!editor) + return false; + if (event->type() == QEvent::KeyPress) + { + switch (static_cast<QKeyEvent *>(event)->key()) { + case Qt::Key_Tab: + case Qt::Key_Backtab: + _currentlyEdited = -1; + emit closeEditor(editor, QAbstractItemDelegate::RevertModelCache); + return true; + case Qt::Key_Enter: + case Qt::Key_Return: + if (QLineEdit *e = qobject_cast<QLineEdit*>(editor)) + { + if (!e->hasAcceptableInput()) + return true; + event->accept(); + emit commitData(editor); + emit closeEditor(editor, QAbstractItemDelegate::SubmitModelCache); + _currentlyEdited = -1; + return true; + } + return false; + case Qt::Key_Escape: + event->accept(); + // don't commit data + _currentlyEdited = -1; + emit closeEditor(editor, QAbstractItemDelegate::RevertModelCache); + break; + default: + return false; + } + + if (editor->parentWidget()) + editor->parentWidget()->setFocus(); + return true; + } else if (event->type() == QEvent::FocusOut) { + if (!editor->isActiveWindow() || (QApplication::focusWidget() != editor)) { + QWidget *w = QApplication::focusWidget(); + while (w) { // don't worry about focus changes internally in the editor + if (w == editor) + return false; + w = w->parentWidget(); + } + // Opening a modal dialog will start a new eventloop + // that will process the deleteLater event. + if (QApplication::activeModalWidget() + && !QApplication::activeModalWidget()->isAncestorOf(editor) + && qobject_cast<QDialog*>(QApplication::activeModalWidget())) + return false; + _currentlyEdited = -1; + emit closeEditor(editor, RevertModelCache); + } + } else if (event->type() == QEvent::ShortcutOverride) { + if (static_cast<QKeyEvent*>(event)->key() == Qt::Key_Escape) { + event->accept(); + return true; + } + } + return false; + } }; @@ -73,6 +171,10 @@ KrView(cfg), QTreeView(parent) { + // fix the context menu problem + int j = QFontMetrics( font() ).height() * 2; + _mouseHandler = new KrMouseHandler( this, j ); + connect( _mouseHandler, SIGNAL( renameCurrentItem() ), this, SLOT( renameCurrentItem() ) ); setWidget( this ); _nameInKConfig=QString( "KrInterView" ) + QString( ( left ? "Left" : "Right" ) ) ; KConfigGroup group( krConfig, "Private" ); @@ -85,9 +187,6 @@ _model->sort( KrVfsModel::Name, Qt::AscendingOrder ); connect( _model, SIGNAL( layoutChanged() ), this, SLOT( slotMakeCurrentVisible() ) ); - // fix the context menu problem - int j = QFontMetrics( font() ).height() * 2; - _mouseHandler = new KrMouseHandler( this, j ); setSelectionMode( QAbstractItemView::NoSelection ); setAllColumnsShowFocus( true ); @@ -199,8 +298,10 @@ { vfile* vf = (vfile *)item->getVfile(); QModelIndex ndx = _model->vfileIndex( vf ); - if( ndx.isValid() ) + if( ndx.isValid() && ndx.row() != currentIndex().row() ) { + _mouseHandler->cancelTwoClickRename(); setCurrentIndex( ndx ); + } } KrViewItem* KrInterView::preAddItem(vfile *vf) @@ -239,12 +340,16 @@ void KrInterView::prepareForActive() { KrView::prepareForActive(); setFocus(); - //slotItemDescription( currentItem() ); + KrViewItem * current = getCurrentKrViewItem(); + if( current != 0 ) { + QString desc = current->description(); + op()->emitItemDescription( desc ); + } } void KrInterView::prepareForPassive() { KrView::prepareForPassive(); - //CANCEL_TWO_CLICK_RENAME; + _mouseHandler->cancelTwoClickRename(); //if ( renameLineEdit() ->isVisible() ) //renameLineEdit() ->clearFocus(); } @@ -352,11 +457,19 @@ QTreeView::wheelEvent( ev ); } +bool KrInterView::event( QEvent * e ) +{ + _mouseHandler->otherEvent( e ); + return QTreeView::event( e ); +} + KrInterViewItem * KrInterView::getKrInterViewItem( const QModelIndex & ndx ) { if( !ndx.isValid() ) return 0; vfile * vf = _model->vfileAt( ndx ); + if( vf == 0 ) + return 0; if( !_itemHash.contains( vf ) ) _itemHash[ vf ] = new KrInterViewItem( this, vf ); return _itemHash[ vf ]; @@ -392,3 +505,11 @@ else if( mi2.isValid() && !mi1.isValid() ) i2->setSelected( select ); } + +void KrInterView::renameCurrentItem() { + QModelIndex cIndex = currentIndex(); + QModelIndex nameIndex = _model->index( cIndex.row(), KrVfsModel::Name ); + edit( nameIndex ); + updateEditorData(); + update( nameIndex ); +} Modified: trunk/krusader_kde4/krusader/Panel/krinterview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-17 21:23:14 UTC (rev 6213) +++ trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-19 20:50:30 UTC (rev 6214) @@ -56,6 +56,7 @@ protected slots: void slotMakeCurrentVisible(); + virtual void renameCurrentItem(); protected: virtual void setup(); @@ -67,6 +68,7 @@ virtual void mouseDoubleClickEvent ( QMouseEvent *ev ); virtual void mouseMoveEvent ( QMouseEvent * ); virtual void wheelEvent ( QWheelEvent * ); + virtual bool event( QEvent * e ); private: KrVfsModel *_model; Modified: trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-17 21:23:14 UTC (rev 6213) +++ trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-19 20:50:30 UTC (rev 6214) @@ -22,13 +22,16 @@ #include "../krusader.h" #include "../defaults.h" +#define CANCEL_TWO_CLICK_RENAME {_singleClicked = false;_renameTimer.stop();} + KrMouseHandler::KrMouseHandler( KrView * view, int contextMenuShift ) : _view( view ), _rightClickedItem( 0 ), - _contextMenuShift( contextMenuShift ) + _contextMenuTimer(), _contextMenuShift( contextMenuShift ), _singleClicked( false ), _singleClickTime(), _renameTimer() { KConfigGroup grpSvr( krConfig, "Look&Feel" ); // decide on single click/double click selection _singleClick = grpSvr.readEntry( "Single Click Selects", _SingleClickSelects ) && KGlobalSettings::singleClick(); connect( &_contextMenuTimer, SIGNAL (timeout()), this, SLOT (showContextMenu())); + connect( &_renameTimer, SIGNAL( timeout() ), this, SIGNAL( renameCurrentItem() ) ); } bool KrMouseHandler::mousePressEvent( QMouseEvent *e ) @@ -38,7 +41,6 @@ _view->op()->emitNeedFocus(); if (e->button() == Qt::LeftButton) { - KrViewItem * oldCurrent = _view->getCurrentKrViewItem(); //dragStartPos = e->pos(); if( e->modifiers() == Qt::NoModifier ) { @@ -88,7 +90,6 @@ } if (e->button() == Qt::RightButton) { - KrViewItem * oldCurrent = _view->getCurrentKrViewItem(); //dragStartPos = e->pos(); if( e->modifiers() == Qt::NoModifier ) { @@ -155,13 +156,43 @@ } if( _singleClick && e->button() == Qt::LeftButton ) { + CANCEL_TWO_CLICK_RENAME; e->accept(); if( item == 0 ) return true; QString tmp = item->name(); _view->op()->emitExecuted(tmp); return true; + } else if( !_singleClick && e->button() == Qt::LeftButton ) + { + if( item && e->modifiers() == Qt::NoModifier ) + { + if ( _singleClicked && !_renameTimer.isActive() && _singleClickedItem == item ) { + KSharedConfigPtr config = KGlobal::config(); + KConfigGroup group( krConfig, "KDE" ); + int doubleClickInterval = group.readEntry( "DoubleClickInterval", 400 ); + + int msecsFromLastClick = _singleClickTime.msecsTo( QTime::currentTime() ); + + if ( msecsFromLastClick > doubleClickInterval && msecsFromLastClick < 5 * doubleClickInterval ) { + _singleClicked = false; + _renameTimer.setSingleShot( true ); + _renameTimer.start( doubleClickInterval ); + return true; + } + } + + CANCEL_TWO_CLICK_RENAME; + _singleClicked = true; + _singleClickedItem = item; + _singleClickTime = QTime::currentTime(); + + return true; + } } + + CANCEL_TWO_CLICK_RENAME; + if ( e->button() == Qt::MidButton && item != 0 ) { e->accept(); @@ -175,6 +206,8 @@ bool KrMouseHandler::mouseDoubleClickEvent( QMouseEvent *e ) { + CANCEL_TWO_CLICK_RENAME; + KrViewItem * item = _view->getKrViewItemAt( e->pos() ); if( _singleClick ) return false; @@ -191,6 +224,9 @@ bool KrMouseHandler::mouseMoveEvent( QMouseEvent *e ) { KrViewItem * item = _view->getKrViewItemAt( e->pos() ); + if ( ( _singleClicked || _renameTimer.isActive() ) && item != _singleClickedItem ) + CANCEL_TWO_CLICK_RENAME; + if ( !item ) return false; QString desc = item->description(); @@ -246,3 +282,19 @@ } } +void KrMouseHandler::otherEvent( QEvent * e ) { + switch ( e->type() ) { + case QEvent::Timer: + case QEvent::MouseMove: + case QEvent::MouseButtonPress: + case QEvent::MouseButtonRelease: + break; + default: + CANCEL_TWO_CLICK_RENAME; + } +} + +void KrMouseHandler::cancelTwoClickRename() +{ + CANCEL_TWO_CLICK_RENAME; +} Modified: trunk/krusader_kde4/krusader/Panel/krmousehandler.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krmousehandler.h 2009-02-17 21:23:14 UTC (rev 6213) +++ trunk/krusader_kde4/krusader/Panel/krmousehandler.h 2009-02-19 20:50:30 UTC (rev 6214) @@ -20,13 +20,14 @@ #include <QPoint> #include <QTimer> +#include <QTime> class QMouseEvent; class QWheelEvent; class KrView; class KrViewItem; -class KrMouseHandler : QObject +class KrMouseHandler : public QObject { Q_OBJECT @@ -39,10 +40,15 @@ bool mouseMoveEvent ( QMouseEvent *e ); bool wheelEvent ( QWheelEvent * ); void handleContextMenu( KrViewItem * it, const QPoint & pos ); + void otherEvent( QEvent * e ); + void cancelTwoClickRename(); public slots: void showContextMenu(); +signals: + void renameCurrentItem(); + protected: KrView * _view; KrViewItem * _rightClickedItem; @@ -51,6 +57,10 @@ QPoint _contextMenuPoint; QTimer _contextMenuTimer; int _contextMenuShift; + bool _singleClicked; + KrViewItem * _singleClickedItem; + QTime _singleClickTime; + QTimer _renameTimer; }; #endif /* __KR_MOUSE_HANDLER */ Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-17 21:23:14 UTC (rev 6213) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-19 20:50:30 UTC (rev 6214) @@ -157,46 +157,34 @@ KConfigGroup grpSvr( krConfig, "Look&Feel" ); return grpSvr.readEntry( "Filelist Font", *_FilelistFont ); } + case Qt::EditRole: + { + if( index.column() == 0 ) + { + return vf->vfile_getName(); + } + return QVariant(); + } + case Qt::UserRole: + { + if( index.column() == 0 ) + { + return nameWithoutExtension( vf, false ); + } + return QVariant(); + } case Qt::DisplayRole: { switch (index.column()) { case KrVfsModel::Name: { - if( !_extensionEnabled || vf->vfile_isDir() ) - return vf->vfile_getName(); - // check if the file has an extension - const QString& vfName = vf->vfile_getName(); - int loc = vfName.lastIndexOf('.'); - if (loc>0) { // avoid mishandling of .bashrc and friend - // check if it has one of the predefined 'atomic extensions' - for (QStringList::const_iterator i = properties()->atomicExtensions.begin(); i != properties()->atomicExtensions.end(); ++i) { - if (vfName.endsWith(*i) && vfName != *i ) { - loc = vfName.length() - (*i).length(); - break; - } - } - } else - return vfName; - return vfName.left(loc); + return nameWithoutExtension( vf ); } case KrVfsModel::Extension: { - if( !_extensionEnabled || vf->vfile_isDir() ) - return QVariant(); - // check if the file has an extension + QString nameOnly = nameWithoutExtension( vf ); const QString& vfName = vf->vfile_getName(); - int loc = vfName.lastIndexOf('.'); - if (loc>0) { // avoid mishandling of .bashrc and friend - // check if it has one of the predefined 'atomic extensions' - for (QStringList::const_iterator i = properties()->atomicExtensions.begin(); i != properties()->atomicExtensions.end(); ++i) { - if (vfName.endsWith(*i) && vfName != *i ) { - loc = vfName.length() - (*i).length(); - break; - } - } - } else - return QVariant(); - return vfName.mid(loc + 1); + return vfName.mid(nameOnly.length() + 1); } case KrVfsModel::Size: { @@ -277,6 +265,21 @@ } } +bool KrVfsModel::setData ( const QModelIndex & index, const QVariant & value, int role ) +{ + if( role == Qt::EditRole && index.isValid() ) + { + if (index.row() < rowCount() && index.row() > 0 ) + { + vfile *vf = _vfiles.at(index.row()); + if( vf == 0 ) + return false; + _view->op()->emitRenameItem( vf->vfile_getName(), value.toString() ); + } + } + return QAbstractListModel::setData( index, value, role ); +} + // compares numbers within two strings bool compareNumbers(QString& aS1, int& aPos1, QString& aS2, int& aPos2) { @@ -536,6 +539,8 @@ vfile * KrVfsModel::vfileAt( const QModelIndex &index ) { + if( index.row() < 0 || index.row() >= _vfiles.count() ) + return 0; return _vfiles[ index.row() ]; } @@ -562,7 +567,27 @@ if( vf == _dummyVfile ) { flags = flags & (~Qt::ItemIsSelectable); - } + } else + flags = flags | Qt::ItemIsEditable; return flags; } +QString KrVfsModel::nameWithoutExtension( const vfile * vf, bool checkEnabled ) const +{ + if( (checkEnabled && !_extensionEnabled ) || vf->vfile_isDir() ) + return vf->vfile_getName(); + // check if the file has an extension + const QString& vfName = vf->vfile_getName(); + int loc = vfName.lastIndexOf('.'); + if (loc>0) { // avoid mishandling of .bashrc and friend + // check if it has one of the predefined 'atomic extensions' + for (QStringList::const_iterator i = properties()->atomicExtensions.begin(); i != properties()->atomicExtensions.end(); ++i) { + if (vfName.endsWith(*i) && vfName != *i ) { + loc = vfName.length() - (*i).length(); + break; + } + } + } else + return vfName; + return vfName.left(loc); +} Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-17 21:23:14 UTC (rev 6213) +++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-19 20:50:30 UTC (rev 6214) @@ -26,6 +26,7 @@ int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index, int role) const; + bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ); QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; void setExtensionEnabled( bool exten ) { _extensionEnabled = exten; } inline const KrViewProperties * properties() const { return _view->properties(); } @@ -39,6 +40,8 @@ virtual Qt::ItemFlags flags ( const QModelIndex & index ) const; protected: + QString nameWithoutExtension( const vfile * vf, bool checkEnabled = true ) const; + QVector<vfile*> _vfiles; QHash<vfile *, QModelIndex> _vfileNdx; QHash<QString, QModelIndex> _nameNdx; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-17 21:23:27
|
Revision: 6213 http://krusader.svn.sourceforge.net/krusader/?rev=6213&view=rev Author: ckarai Date: 2009-02-17 21:23:14 +0000 (Tue, 17 Feb 2009) Log Message: ----------- InterView: mouse handling Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krbriefview.h trunk/krusader_kde4/krusader/Panel/krdetailedview.h trunk/krusader_kde4/krusader/Panel/krinterview.cpp trunk/krusader_kde4/krusader/Panel/krinterview.h trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp trunk/krusader_kde4/krusader/Panel/krmousehandler.h trunk/krusader_kde4/krusader/Panel/krview.h Modified: trunk/krusader_kde4/krusader/Panel/krbriefview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krbriefview.h 2009-02-16 22:24:31 UTC (rev 6212) +++ trunk/krusader_kde4/krusader/Panel/krbriefview.h 2009-02-17 21:23:14 UTC (rev 6213) @@ -92,6 +92,7 @@ virtual QString nameInKConfig() {return _nameInKConfig;} virtual void redraw() { ((QWidget *)parent())->show(); header->show(); viewport()->show(); show(); } virtual int itemsPerPage(); + virtual void selectRegion( KrViewItem *, KrViewItem *, bool ) {} // not used static KrView* create( QWidget *parent, bool &left, KConfig *cfg ); Modified: trunk/krusader_kde4/krusader/Panel/krdetailedview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krdetailedview.h 2009-02-16 22:24:31 UTC (rev 6212) +++ trunk/krusader_kde4/krusader/Panel/krdetailedview.h 2009-02-17 21:23:14 UTC (rev 6213) @@ -109,8 +109,8 @@ virtual inline void restoreSettings() { K3ListView::restoreLayout( _config, nameInKConfig() ); } virtual void redraw() { viewport()->show(); header()->show(); show(); } virtual int itemsPerPage(); + virtual void selectRegion( KrViewItem *, KrViewItem *, bool ) {} // not used - static KrView* create( QWidget *parent, bool &left, KConfig *cfg ) { return new KrDetailedView( parent, left, cfg ); } protected: Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-16 22:24:31 UTC (rev 6212) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-17 21:23:14 UTC (rev 6213) @@ -85,7 +85,9 @@ _model->sort( KrVfsModel::Name, Qt::AscendingOrder ); connect( _model, SIGNAL( layoutChanged() ), this, SLOT( slotMakeCurrentVisible() ) ); - _mouseHandler = new KrMouseHandler( this ); + // fix the context menu problem + int j = QFontMetrics( font() ).height() * 2; + _mouseHandler = new KrMouseHandler( this, j ); setSelectionMode( QAbstractItemView::NoSelection ); setAllColumnsShowFocus( true ); @@ -359,3 +361,34 @@ _itemHash[ vf ] = new KrInterViewItem( this, vf ); return _itemHash[ vf ]; } + +void KrInterView::selectRegion( KrViewItem *i1, KrViewItem *i2, bool select) +{ + vfile* vf1 = (vfile *)i1->getVfile(); + QModelIndex mi1 = _model->vfileIndex( vf1 ); + vfile* vf2 = (vfile *)i2->getVfile(); + QModelIndex mi2 = _model->vfileIndex( vf2 ); + + if( mi1.isValid() && mi2.isValid() ) + { + int r1 = mi1.row(); + int r2 = mi2.row(); + + if( r1 > r2 ) { + int t = r1; + r1 = r2; + r2 = t; + } + + for( int row = r1; row <= r2; row++ ) + { + const QModelIndex & ndx = _model->index( row, 0 ); + selectionModel()->select( ndx, ( select ? QItemSelectionModel::Select : QItemSelectionModel::Deselect ) + | QItemSelectionModel::Rows ); + } + } + else if( mi1.isValid() && !mi2.isValid() ) + i1->setSelected( select ); + else if( mi2.isValid() && !mi1.isValid() ) + i2->setSelected( select ); +} Modified: trunk/krusader_kde4/krusader/Panel/krinterview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-16 22:24:31 UTC (rev 6212) +++ trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-17 21:23:14 UTC (rev 6213) @@ -44,6 +44,7 @@ virtual void updateItem(KrViewItem* item); virtual QModelIndex getCurrentIndex() { return currentIndex(); } virtual bool isSelected( const QModelIndex &ndx ) { return selectionModel()->isSelected( ndx ); } + virtual void selectRegion( KrViewItem *, KrViewItem *, bool ); KrInterViewItem * getKrInterViewItem( const QModelIndex & ); static KrView* create( QWidget *parent, bool &left, KConfig *cfg ) { return new KrInterView( parent, left, cfg ); } Modified: trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-16 22:24:31 UTC (rev 6212) +++ trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-17 21:23:14 UTC (rev 6213) @@ -22,10 +22,13 @@ #include "../krusader.h" #include "../defaults.h" -KrMouseHandler::KrMouseHandler( KrView * view ) : _view( view ) { +KrMouseHandler::KrMouseHandler( KrView * view, int contextMenuShift ) : _view( view ), _rightClickedItem( 0 ), + _contextMenuShift( contextMenuShift ) +{ KConfigGroup grpSvr( krConfig, "Look&Feel" ); // decide on single click/double click selection _singleClick = grpSvr.readEntry( "Single Click Selects", _SingleClickSelects ) && KGlobalSettings::singleClick(); + connect( &_contextMenuTimer, SIGNAL (timeout()), this, SLOT (showContextMenu())); } bool KrMouseHandler::mousePressEvent( QMouseEvent *e ) @@ -55,9 +58,90 @@ } e->accept(); return true; - // KrSelectionMode::getSelectionHandler()->shiftCtrlLeftButtonSelects() } + else if( e->modifiers() == Qt::ControlModifier ) + { + if( item && (KrSelectionMode::getSelectionHandler()->shiftCtrlLeftButtonSelects() || + KrSelectionMode::getSelectionHandler()->leftButtonSelects() ) ) + { + item->setSelected(!item->isSelected()); + } + if( item ) + _view->setCurrentKrViewItem( item ); + e->accept(); + return true; + } + else if( e->modifiers() == Qt::ShiftModifier ) + { + if( item && (KrSelectionMode::getSelectionHandler()->shiftCtrlLeftButtonSelects() || + KrSelectionMode::getSelectionHandler()->leftButtonSelects() ) ) + { + KrViewItem * current = _view->getCurrentKrViewItem(); + if( current != 0 ) + _view->selectRegion( item, current, true ); + } + if( item ) + _view->setCurrentKrViewItem( item ); + e->accept(); + return true; + } } + if (e->button() == Qt::RightButton) + { + KrViewItem * oldCurrent = _view->getCurrentKrViewItem(); + //dragStartPos = e->pos(); + if( e->modifiers() == Qt::NoModifier ) + { + if( item ) + { + if( KrSelectionMode::getSelectionHandler()->rightButtonSelects() ) + { + if( KrSelectionMode::getSelectionHandler()->rightButtonPreservesSelection() ) { + if (KrSelectionMode::getSelectionHandler()->showContextMenu() >= 0) + { + _rightClickSelects = !item->isSelected(); + _rightClickedItem = item; + } + item->setSelected(!item->isSelected()); + } else { + // clear the current selection + _view->changeSelection( KRQuery( "*" ), false, true); + item->setSelected( true ); + } + } + _view->setCurrentKrViewItem( item ); + handleContextMenu( item, e->globalPos() ); + } + e->accept(); + return true; + } + else if( e->modifiers() == Qt::ControlModifier ) + { + if( item && (KrSelectionMode::getSelectionHandler()->shiftCtrlRightButtonSelects() || + KrSelectionMode::getSelectionHandler()->rightButtonSelects() ) ) + { + item->setSelected(!item->isSelected()); + } + if( item ) + _view->setCurrentKrViewItem( item ); + e->accept(); + return true; + } + else if( e->modifiers() == Qt::ShiftModifier ) + { + if( item && (KrSelectionMode::getSelectionHandler()->shiftCtrlRightButtonSelects() || + KrSelectionMode::getSelectionHandler()->rightButtonSelects() ) ) + { + KrViewItem * current = _view->getCurrentKrViewItem(); + if( current != 0 ) + _view->selectRegion( item, current, true ); + } + if( item ) + _view->setCurrentKrViewItem( item ); + e->accept(); + return true; + } + } return false; } @@ -65,6 +149,10 @@ { KrViewItem * item = _view->getKrViewItemAt( e->pos() ); + if( e->button() == Qt::RightButton ) { + _rightClickedItem = 0; + _contextMenuTimer.stop(); + } if( _singleClick && e->button() == Qt::LeftButton ) { e->accept(); @@ -87,13 +175,13 @@ bool KrMouseHandler::mouseDoubleClickEvent( QMouseEvent *e ) { - KrViewItem * i = _view->getKrViewItemAt( e->pos() ); + KrViewItem * item = _view->getKrViewItemAt( e->pos() ); if( _singleClick ) return false; - if( e->button() == Qt::LeftButton ) + if( e->button() == Qt::LeftButton && item != 0 ) { e->accept(); - QString tmp = i->name(); + QString tmp = item->name(); _view->op()->emitExecuted(tmp); return true; } @@ -102,6 +190,26 @@ bool KrMouseHandler::mouseMoveEvent( QMouseEvent *e ) { + KrViewItem * item = _view->getKrViewItemAt( e->pos() ); + if ( !item ) + return false; + QString desc = item->description(); + _view->op()->emitItemDescription(desc); + + if (KrSelectionMode::getSelectionHandler()->rightButtonPreservesSelection() + && KrSelectionMode::getSelectionHandler()->rightButtonSelects() + && KrSelectionMode::getSelectionHandler()->showContextMenu() >= 0 && e->buttons() == Qt::RightButton) + { + e->accept(); + if (item != _rightClickedItem && item && _rightClickedItem) + { + _view->selectRegion( item, _rightClickedItem, _rightClickSelects ); + _rightClickedItem = item; + _view->setCurrentKrViewItem( item ); + _contextMenuTimer.stop(); + } + return true; + } return false; } @@ -112,6 +220,13 @@ return false; } +void KrMouseHandler::showContextMenu() +{ + if (_rightClickedItem) + _rightClickedItem->setSelected(true); + _view->op()->emitContextMenu( _contextMenuPoint ); +} + void KrMouseHandler::handleContextMenu( KrViewItem * it, const QPoint & pos ) { if ( !_view->isFocused() ) _view->op()->emitNeedFocus(); @@ -120,14 +235,14 @@ if( it->isDummy() ) return; int i = KrSelectionMode::getSelectionHandler()->showContextMenu(); - _contextMenuPoint = QPoint( pos.x(), pos.y() /*TODO: - header() ->height() */ ); + _contextMenuPoint = QPoint( pos.x(), pos.y() - _contextMenuShift ); if (i < 0) { _view->setCurrentKrViewItem( it ); _view->op()->emitContextMenu( _contextMenuPoint ); } else if (i > 0) { - contextMenuTimer.setSingleShot( true ); - contextMenuTimer.start(i); + _contextMenuTimer.setSingleShot( true ); + _contextMenuTimer.start(i); } } Modified: trunk/krusader_kde4/krusader/Panel/krmousehandler.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krmousehandler.h 2009-02-16 22:24:31 UTC (rev 6212) +++ trunk/krusader_kde4/krusader/Panel/krmousehandler.h 2009-02-17 21:23:14 UTC (rev 6213) @@ -31,7 +31,7 @@ Q_OBJECT public: - KrMouseHandler( KrView * view ); + KrMouseHandler( KrView * view, int contextMenuShift ); bool mousePressEvent( QMouseEvent *e ); bool mouseReleaseEvent( QMouseEvent *e ); @@ -40,11 +40,17 @@ bool wheelEvent ( QWheelEvent * ); void handleContextMenu( KrViewItem * it, const QPoint & pos ); +public slots: + void showContextMenu(); + protected: - KrView * _view; - bool _singleClick; - QPoint _contextMenuPoint; - QTimer contextMenuTimer; + KrView * _view; + KrViewItem * _rightClickedItem; + bool _rightClickSelects; + bool _singleClick; + QPoint _contextMenuPoint; + QTimer _contextMenuTimer; + int _contextMenuShift; }; #endif /* __KR_MOUSE_HANDLER */ Modified: trunk/krusader_kde4/krusader/Panel/krview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-16 22:24:31 UTC (rev 6212) +++ trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-17 21:23:14 UTC (rev 6213) @@ -195,6 +195,7 @@ virtual QModelIndex getCurrentIndex() { return QModelIndex(); } virtual bool isSelected( const QModelIndex & ) { return false; } virtual bool ensureVisibilityAfterSelect() { return true; } + virtual void selectRegion( KrViewItem *, KrViewItem *, bool ) = 0; virtual KrViewItem *getFirst() = 0; virtual KrViewItem *getLast() = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-16 22:28:16
|
Revision: 6212 http://krusader.svn.sourceforge.net/krusader/?rev=6212&view=rev Author: ckarai Date: 2009-02-16 22:24:31 +0000 (Mon, 16 Feb 2009) Log Message: ----------- InterView: minor fixes Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterview.cpp trunk/krusader_kde4/krusader/Panel/krinterview.h trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp trunk/krusader_kde4/krusader/Panel/krmousehandler.h trunk/krusader_kde4/krusader/Panel/krview.cpp trunk/krusader_kde4/krusader/Panel/krview.h Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-15 18:05:40 UTC (rev 6211) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-16 22:24:31 UTC (rev 6212) @@ -91,6 +91,7 @@ setStyle( new KrStyleProxy() ); setItemDelegate( new KrInterViewItemDelegate() ); + setMouseTracking( true ); } KrInterView::~KrInterView() @@ -321,12 +322,38 @@ void KrInterView::mousePressEvent ( QMouseEvent * ev ) { - if( _mouseHandler->mousePressEvent( ev ) ) + if( !_mouseHandler->mousePressEvent( ev ) ) QTreeView::mousePressEvent( ev ); } +void KrInterView::mouseReleaseEvent ( QMouseEvent * ev ) +{ + if( !_mouseHandler->mouseReleaseEvent( ev ) ) + QTreeView::mouseReleaseEvent( ev ); +} + +void KrInterView::mouseDoubleClickEvent ( QMouseEvent *ev ) +{ + if( !_mouseHandler->mouseDoubleClickEvent( ev ) ) + QTreeView::mouseDoubleClickEvent( ev ); +} + +void KrInterView::mouseMoveEvent ( QMouseEvent * ev ) +{ + if( !_mouseHandler->mouseMoveEvent( ev ) ) + QTreeView::mouseMoveEvent( ev ); +} + +void KrInterView::wheelEvent ( QWheelEvent *ev ) +{ + if( !_mouseHandler->wheelEvent( ev ) ) + QTreeView::wheelEvent( ev ); +} + KrInterViewItem * KrInterView::getKrInterViewItem( const QModelIndex & ndx ) { + if( !ndx.isValid() ) + return 0; vfile * vf = _model->vfileAt( ndx ); if( !_itemHash.contains( vf ) ) _itemHash[ vf ] = new KrInterViewItem( this, vf ); Modified: trunk/krusader_kde4/krusader/Panel/krinterview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-15 18:05:40 UTC (rev 6211) +++ trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-16 22:24:31 UTC (rev 6212) @@ -50,6 +50,7 @@ virtual void prepareForActive(); virtual void prepareForPassive(); + virtual bool ensureVisibilityAfterSelect() { return false; } virtual int itemsPerPage(); protected slots: @@ -61,6 +62,10 @@ virtual void keyPressEvent( QKeyEvent *e ); virtual void mousePressEvent ( QMouseEvent * ); + virtual void mouseReleaseEvent ( QMouseEvent * ); + virtual void mouseDoubleClickEvent ( QMouseEvent *ev ); + virtual void mouseMoveEvent ( QMouseEvent * ); + virtual void wheelEvent ( QWheelEvent * ); private: KrVfsModel *_model; Modified: trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-15 18:05:40 UTC (rev 6211) +++ trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-16 22:24:31 UTC (rev 6212) @@ -17,10 +17,117 @@ #include "krmousehandler.h" #include "krview.h" +#include "krviewitem.h" +#include "krselectionmode.h" +#include "../krusader.h" +#include "../defaults.h" +KrMouseHandler::KrMouseHandler( KrView * view ) : _view( view ) { + KConfigGroup grpSvr( krConfig, "Look&Feel" ); + // decide on single click/double click selection + _singleClick = grpSvr.readEntry( "Single Click Selects", _SingleClickSelects ) && KGlobalSettings::singleClick(); +} + bool KrMouseHandler::mousePressEvent( QMouseEvent *e ) { + KrViewItem * item = _view->getKrViewItemAt( e->pos() ); if( !_view->isFocused() ) _view->op()->emitNeedFocus(); - return true; -} \ No newline at end of file + if (e->button() == Qt::LeftButton) + { + KrViewItem * oldCurrent = _view->getCurrentKrViewItem(); + //dragStartPos = e->pos(); + if( e->modifiers() == Qt::NoModifier ) + { + if( item ) + { + if( KrSelectionMode::getSelectionHandler()->leftButtonSelects() ) + { + if( KrSelectionMode::getSelectionHandler()->leftButtonPreservesSelection() ) + item->setSelected(!item->isSelected()); + else { + // clear the current selection + _view->changeSelection( KRQuery( "*" ), false, true); + item->setSelected( true ); + } + } + _view->setCurrentKrViewItem( item ); + } + e->accept(); + return true; + // KrSelectionMode::getSelectionHandler()->shiftCtrlLeftButtonSelects() + } + } + return false; +} + +bool KrMouseHandler::mouseReleaseEvent( QMouseEvent *e ) +{ + KrViewItem * item = _view->getKrViewItemAt( e->pos() ); + + if( _singleClick && e->button() == Qt::LeftButton ) + { + e->accept(); + if( item == 0 ) + return true; + QString tmp = item->name(); + _view->op()->emitExecuted(tmp); + return true; + } + if ( e->button() == Qt::MidButton && item != 0 ) + { + e->accept(); + if( item == 0 ) + return true; + _view->op()->emitMiddleButtonClicked( item ); + return true; + } + return false; +} + +bool KrMouseHandler::mouseDoubleClickEvent( QMouseEvent *e ) +{ + KrViewItem * i = _view->getKrViewItemAt( e->pos() ); + if( _singleClick ) + return false; + if( e->button() == Qt::LeftButton ) + { + e->accept(); + QString tmp = i->name(); + _view->op()->emitExecuted(tmp); + return true; + } + return false; +} + +bool KrMouseHandler::mouseMoveEvent( QMouseEvent *e ) +{ + return false; +} + +bool KrMouseHandler::wheelEvent ( QWheelEvent * ) +{ + if( !_view->isFocused() ) + _view->op()->emitNeedFocus(); + return false; +} + +void KrMouseHandler::handleContextMenu( KrViewItem * it, const QPoint & pos ) { + if ( !_view->isFocused() ) + _view->op()->emitNeedFocus(); + if ( !it ) + return; + if( it->isDummy() ) + return; + int i = KrSelectionMode::getSelectionHandler()->showContextMenu(); + _contextMenuPoint = QPoint( pos.x(), pos.y() /*TODO: - header() ->height() */ ); + if (i < 0) { + _view->setCurrentKrViewItem( it ); + _view->op()->emitContextMenu( _contextMenuPoint ); + } + else if (i > 0) { + contextMenuTimer.setSingleShot( true ); + contextMenuTimer.start(i); + } +} + Modified: trunk/krusader_kde4/krusader/Panel/krmousehandler.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krmousehandler.h 2009-02-15 18:05:40 UTC (rev 6211) +++ trunk/krusader_kde4/krusader/Panel/krmousehandler.h 2009-02-16 22:24:31 UTC (rev 6212) @@ -18,18 +18,33 @@ #ifndef __KR_MOUSE_HANDLER__ #define __KR_MOUSE_HANDLER__ +#include <QPoint> +#include <QTimer> + class QMouseEvent; +class QWheelEvent; class KrView; +class KrViewItem; -class KrMouseHandler +class KrMouseHandler : QObject { + Q_OBJECT + public: - KrMouseHandler( KrView * view ) : _view( view ) {} + KrMouseHandler( KrView * view ); bool mousePressEvent( QMouseEvent *e ); + bool mouseReleaseEvent( QMouseEvent *e ); + bool mouseDoubleClickEvent( QMouseEvent *e ); + bool mouseMoveEvent ( QMouseEvent *e ); + bool wheelEvent ( QWheelEvent * ); + void handleContextMenu( KrViewItem * it, const QPoint & pos ); protected: KrView * _view; + bool _singleClick; + QPoint _contextMenuPoint; + QTimer contextMenuTimer; }; -#endif /* __KR_MOUSE_HANDLER */ \ No newline at end of file +#endif /* __KR_MOUSE_HANDLER */ Modified: trunk/krusader_kde4/krusader/Panel/krview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krview.cpp 2009-02-15 18:05:40 UTC (rev 6211) +++ trunk/krusader_kde4/krusader/Panel/krview.cpp 2009-02-16 22:24:31 UTC (rev 6212) @@ -378,7 +378,8 @@ if( op() ) op()->setMassSelectionUpdate( false ); updateView(); - makeItemVisible( temp ); + if( ensureVisibilityAfterSelect() ) + makeItemVisible( temp ); } void KrView::invertSelection() @@ -402,7 +403,8 @@ } if( op() ) op()->setMassSelectionUpdate( false ); updateView(); - makeItemVisible( temp ); + if( ensureVisibilityAfterSelect() ) + makeItemVisible( temp ); } QString KrView::firstUnmarkedBelowCurrent() Modified: trunk/krusader_kde4/krusader/Panel/krview.h =================================================================== --- trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-15 18:05:40 UTC (rev 6211) +++ trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-16 22:24:31 UTC (rev 6212) @@ -194,6 +194,7 @@ // interview related functions virtual QModelIndex getCurrentIndex() { return QModelIndex(); } virtual bool isSelected( const QModelIndex & ) { return false; } + virtual bool ensureVisibilityAfterSelect() { return true; } virtual KrViewItem *getFirst() = 0; virtual KrViewItem *getLast() = 0; @@ -256,6 +257,7 @@ virtual const KrViewProperties* properties() const { return _properties; } virtual KrViewOperator* op() const { return _operator; } virtual bool isFocused() const { return _focused; } + void changeSelection(const KRQuery& filter, bool select, bool includeDirs = false); ///////////////////////////////////////////////////////////// // the following functions have a default and minimalistic // @@ -276,7 +278,6 @@ protected: KrView(KConfig *cfg = krConfig); - void changeSelection(const KRQuery& filter, bool select, bool includeDirs = false); bool handleKeyEventInt (QKeyEvent *e); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ck...@us...> - 2009-02-15 18:05:53
|
Revision: 6211 http://krusader.svn.sourceforge.net/krusader/?rev=6211&view=rev Author: ckarai Date: 2009-02-15 18:05:40 +0000 (Sun, 15 Feb 2009) Log Message: ----------- Fixed: selection bug Modified Paths: -------------- trunk/krusader_kde4/krusader/Panel/krinterview.cpp Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp =================================================================== --- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-15 17:33:30 UTC (rev 6210) +++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-15 18:05:40 UTC (rev 6211) @@ -280,6 +280,7 @@ void KrInterView::clear() { + clearSelection(); _model->clear(); QHashIterator< vfile *, KrInterViewItem *> it( _itemHash ); while( it.hasNext() ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |