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-02-15 17:33:50
|
Revision: 6210
http://krusader.svn.sourceforge.net/krusader/?rev=6210&view=rev
Author: ckarai
Date: 2009-02-15 17:33:30 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
InterView: selection + colors + minor fixes
Modified Paths:
--------------
trunk/krusader_kde4/krusader/Panel/krinterview.cpp
trunk/krusader_kde4/krusader/Panel/krinterview.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-15 08:32:26 UTC (rev 6209)
+++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-15 17:33:30 UTC (rev 6210)
@@ -10,6 +10,10 @@
#include <QDir>
#include <QDirModel>
#include <QHashIterator>
+#include <QHeaderView>
+#include "../GUI/krstyleproxy.h"
+#include <QItemDelegate>
+#include <QPainter>
// dummy. remove this class when no longer needed
class KrInterViewItem: public KrViewItem
@@ -17,6 +21,7 @@
public:
KrInterViewItem(KrInterView *parent, vfile *vf): KrViewItem(vf, parent->properties()) {
_view = parent;
+ _vfile = vf;
if( parent->_model->dummyVfile() == vf )
dummyVfile = true;
}
@@ -27,7 +32,8 @@
}
void setSelected( bool s ) {
const QModelIndex & ndx = _view->_model->vfileIndex( _vfile );
- _view->selectionModel()->select( ndx, s ? QItemSelectionModel::Select : QItemSelectionModel::Deselect );
+ _view->selectionModel()->select( ndx, ( s ? QItemSelectionModel::Select : QItemSelectionModel::Deselect )
+ | QItemSelectionModel::Rows );
}
QRect itemRect() const {
const QModelIndex & ndx = _view->_model->vfileIndex( _vfile );
@@ -43,6 +49,20 @@
KrInterView * _view;
};
+class KrInterViewItemDelegate : public QItemDelegate
+{
+public:
+ KrInterViewItemDelegate( QObject *parent = 0 ) : QItemDelegate( parent ) {}
+
+ void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
+ {
+ QStyleOptionViewItemV4 opt = option;
+ opt.state &= ~QStyle::State_Selected;
+ QItemDelegate::paint( painter, opt, index );
+ }
+};
+
+
// 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*/,
@@ -61,9 +81,16 @@
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() ) );
_mouseHandler = new KrMouseHandler( this );
+ setSelectionMode( QAbstractItemView::NoSelection );
+ setAllColumnsShowFocus( true );
+
+ setStyle( new KrStyleProxy() );
+ setItemDelegate( new KrInterViewItemDelegate() );
}
KrInterView::~KrInterView()
@@ -85,7 +112,10 @@
if (!_model->ready())
return 0;
- return 0; // TODO
+ QModelIndex ndx = _model->nameIndex( name );
+ if( !ndx.isValid() )
+ return 0;
+ return getKrInterViewItem( ndx );
}
QString KrInterView::getCurrentItem() const
@@ -149,8 +179,17 @@
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)
@@ -207,8 +246,28 @@
//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()
@@ -247,7 +306,7 @@
{
_operator = new KrViewOperator(this, this);
// klistview emits selection changed, so chain them to operator
- connect(this, SIGNAL(selectionChanged()), _operator, SLOT(emitSelectionChanged()));
+ connect(selectionModel(), SIGNAL(selectionChanged( const QItemSelection &, const QItemSelection &)), _operator, SLOT(emitSelectionChanged()));
}
void KrInterView::keyPressEvent( QKeyEvent *e )
Modified: trunk/krusader_kde4/krusader/Panel/krinterview.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-15 08:32:26 UTC (rev 6209)
+++ trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-15 17:33:30 UTC (rev 6210)
@@ -12,8 +12,9 @@
class QKeyEvent;
class KrMouseHandler;
-class KrInterView : public KrView, public QTreeView {
+class KrInterView : public QTreeView, public KrView {
friend class KrInterViewItem;
+ Q_OBJECT
public:
KrInterView( QWidget *parent, bool &left, KConfig *cfg = krConfig );
@@ -49,7 +50,11 @@
virtual void prepareForActive();
virtual void prepareForPassive();
+ virtual int itemsPerPage();
+protected slots:
+ void slotMakeCurrentVisible();
+
protected:
virtual void setup();
virtual void initOperator();
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-15 08:32:26 UTC (rev 6209)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-15 17:33:30 UTC (rev 6210)
@@ -15,13 +15,14 @@
class SortProps
{
public:
- SortProps( vfile *vf, int col, const KrViewProperties * props, bool isDummy, bool asc )
+ SortProps( vfile *vf, int col, const KrViewProperties * props, bool isDummy, bool asc, int origNdx )
{
_col = col;
_prop = props;
_isdummy = isDummy;
_ascending = asc;
_vfile = vf;
+ _index = origNdx;
if( _col == KrVfsModel::Extension )
{
if( vf->vfile_isDir() ) {
@@ -51,6 +52,7 @@
inline bool isAscending() { return _ascending; }
inline QString extension() { return _ext; }
inline vfile * vf() { return _vfile; }
+ inline int originalIndex() { return _index; }
private:
int _col;
@@ -59,6 +61,7 @@
vfile * _vfile;
bool _ascending;
QString _ext;
+ int _index;
};
typedef bool(*LessThan)(SortProps *,SortProps *);
@@ -487,23 +490,33 @@
_lastSortDir = order;
emit layoutAboutToBeChanged();
+ QModelIndexList oldPersistentList = persistentIndexList();
QVector < SortProps * > sorting (_vfiles.count());
for (int i = 0; i < _vfiles.count(); ++i)
- sorting[ i ] = new SortProps( _vfiles[ i ], column, properties(), _vfiles[ i ] == _dummyVfile, order == Qt::AscendingOrder );
+ sorting[ i ] = new SortProps( _vfiles[ i ], column, properties(), _vfiles[ i ] == _dummyVfile, order == Qt::AscendingOrder, i );
LessThan compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
qSort(sorting.begin(), sorting.end(), compare);
_vfiles.clear();
_vfileNdx.clear();
+
+ QHash<int, int> changeMap;
for (int i = 0; i < sorting.count(); ++i) {
_vfiles.append( sorting[ i ]->vf() );
+ changeMap[ sorting[ i ]->originalIndex() ] = i;
_vfileNdx[ sorting[ i ]->vf() ] = index( i, 0 );
_nameNdx[ sorting[ i ]->vf()->vfile_getName() ] = index( i, 0 );
delete sorting[ i ];
}
+ QModelIndexList newPersistentList;
+ foreach( QModelIndex mndx, oldPersistentList )
+ newPersistentList << index( changeMap[ mndx.row() ], mndx.column() );
+
+ changePersistentIndexList(oldPersistentList, newPersistentList);
+
emit layoutChanged();
}
@@ -536,3 +549,20 @@
return _nameNdx[ st ];
}
+Qt::ItemFlags KrVfsModel::flags ( const QModelIndex & index ) const
+{
+ Qt::ItemFlags flags = QAbstractListModel::flags( index );
+
+ if (!index.isValid())
+ return flags;
+
+ if (index.row() >= rowCount())
+ return flags;
+ vfile *vf = _vfiles.at(index.row());
+ if( vf == _dummyVfile )
+ {
+ flags = flags & (~Qt::ItemIsSelectable);
+ }
+ return flags;
+}
+
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-15 08:32:26 UTC (rev 6209)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-15 17:33:30 UTC (rev 6210)
@@ -36,8 +36,8 @@
vfile *dummyVfile() const { return _dummyVfile; }
const QModelIndex & vfileIndex( vfile * );
const QModelIndex & nameIndex( const QString & );
+ virtual Qt::ItemFlags flags ( const QModelIndex & index ) const;
-
protected:
QVector<vfile*> _vfiles;
QHash<vfile *, QModelIndex> _vfileNdx;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-02-15 08:32:41
|
Revision: 6209
http://krusader.svn.sourceforge.net/krusader/?rev=6209&view=rev
Author: ckarai
Date: 2009-02-15 08:32:26 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Implemented: KrInterViewItem + keyboard handling
Modified Paths:
--------------
trunk/krusader_kde4/krusader/Panel/krinterview.cpp
trunk/krusader_kde4/krusader/Panel/krinterview.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-14 22:12:32 UTC (rev 6208)
+++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-15 08:32:26 UTC (rev 6209)
@@ -9,50 +9,38 @@
#include <kdirlister.h>
#include <QDir>
#include <QDirModel>
+#include <QHashIterator>
// dummy. remove this class when no longer needed
class KrInterViewItem: public KrViewItem
{
public:
- KrInterViewItem(KrInterView *parent, QModelIndex index): KrViewItem(NULL, parent->properties()), _pIndex(index) {
- // create a vfile from our persistent index
- _vfile = new vfile(
- _pIndex.data().toString(),
- 0,
- "rwxrwxrwx",
- 0,
- false,
- 0,
- 0,
- "",
- "",
- 0,
- -1);
-
- setVfile(_vfile);
+ KrInterViewItem(KrInterView *parent, vfile *vf): KrViewItem(vf, parent->properties()) {
+ _view = parent;
+ if( parent->_model->dummyVfile() == vf )
+ dummyVfile = true;
}
-
- const QString& name(bool withExtension=true) const {
- return _vfile->vfile_getName();
- }
- //virtual inline bool hasExtension() const { return _hasExtension; }
- //virtual inline const QString& extension() const { return _extension; }
- //virtual QString dateTime() const;
- //virtual QString description() const;
+
bool isSelected() const {
- return false;
+ const QModelIndex & ndx = _view->_model->vfileIndex( _vfile );
+ return _view->selectionModel()->isSelected( ndx );
}
- void setSelected( bool s ) {}
- //virtual QPixmap icon();
+ void setSelected( bool s ) {
+ const QModelIndex & ndx = _view->_model->vfileIndex( _vfile );
+ _view->selectionModel()->select( ndx, s ? QItemSelectionModel::Select : QItemSelectionModel::Deselect );
+ }
QRect itemRect() const {
- return QRect();
+ const QModelIndex & ndx = _view->_model->vfileIndex( _vfile );
+ return _view->visualRect( ndx );
}
- static void itemHeightChanged() {} // force the items to resize when icon/font size change
+ static void itemHeightChanged()
+ {
+ } // force the items to resize when icon/font size change
void redraw() {}
private:
- QPersistentModelIndex _pIndex;
vfile *_vfile;
+ KrInterView * _view;
};
// code used to register the view
@@ -86,6 +74,10 @@
_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)
@@ -100,8 +92,11 @@
{
if (!_model->ready())
return QString();
-
- return currentIndex().data().toString();
+
+ vfile * vf = _model->vfileAt( currentIndex() );
+ if( vf == 0 )
+ return QString();
+ return vf->vfile_getName();
}
KrViewItem* KrInterView::getCurrentKrViewItem()
@@ -109,7 +104,7 @@
if (!_model->ready())
return 0;
- return new KrInterViewItem(this, currentIndex());
+ return getKrInterViewItem( currentIndex() );
}
KrViewItem* KrInterView::getFirst()
@@ -117,12 +112,15 @@
if (!_model->ready())
return 0;
- return new KrInterViewItem(this, _model->index(0, 0, QModelIndex()));
+ return getKrInterViewItem( _model->index(0, 0, QModelIndex()));
}
KrViewItem* KrInterView::getKrViewItemAt(const QPoint &vp)
{
- return 0;
+ if (!_model->ready())
+ return 0;
+
+ return getKrInterViewItem( indexAt( vp ) );
}
KrViewItem* KrInterView::getLast()
@@ -130,17 +128,25 @@
if (!_model->ready())
return 0;
- return new KrInterViewItem(this, _model->index(_model->rowCount()-1, 0, QModelIndex()));
+ return getKrInterViewItem(_model->index(_model->rowCount()-1, 0, QModelIndex()));
}
KrViewItem* KrInterView::getNext(KrViewItem *current)
{
- return 0;
+ 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)
{
- return 0;
+ 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::makeItemVisible(const KrViewItem *item)
@@ -149,6 +155,10 @@
void KrInterView::setCurrentKrViewItem(KrViewItem *item)
{
+ vfile* vf = (vfile *)item->getVfile();
+ QModelIndex ndx = _model->vfileIndex( vf );
+ if( ndx.isValid() )
+ setCurrentIndex( ndx );
}
KrViewItem* KrInterView::preAddItem(vfile *vf)
@@ -179,8 +189,24 @@
void KrInterView::setCurrentItem(const QString& name)
{
+ QModelIndex ndx = _model->nameIndex( name );
+ if( ndx.isValid() )
+ setCurrentIndex( ndx );
}
+void KrInterView::prepareForActive() {
+ KrView::prepareForActive();
+ setFocus();
+ //slotItemDescription( currentItem() );
+}
+
+void KrInterView::prepareForPassive() {
+ KrView::prepareForPassive();
+ //CANCEL_TWO_CLICK_RENAME;
+ //if ( renameLineEdit() ->isVisible() )
+ //renameLineEdit() ->clearFocus();
+}
+
void KrInterView::sort()
{
}
@@ -196,13 +222,20 @@
void KrInterView::clear()
{
_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);
+
this->setCurrentIndex(_model->index(0, 0));
+ if( !nameToMakeCurrent().isEmpty() )
+ setCurrentItem( nameToMakeCurrent() );
}
void KrInterView::setup()
@@ -217,8 +250,25 @@
connect(this, SIGNAL(selectionChanged()), _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 );
}
+
+KrInterViewItem * KrInterView::getKrInterViewItem( const QModelIndex & ndx )
+{
+ vfile * vf = _model->vfileAt( ndx );
+ if( !_itemHash.contains( vf ) )
+ _itemHash[ vf ] = new KrInterViewItem( this, vf );
+ return _itemHash[ vf ];
+}
Modified: trunk/krusader_kde4/krusader/Panel/krinterview.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-14 22:12:32 UTC (rev 6208)
+++ trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-15 08:32:26 UTC (rev 6209)
@@ -9,9 +9,11 @@
class KrVfsModel;
class KrInterViewItem;
class QMouseEvent;
+class QKeyEvent;
class KrMouseHandler;
class KrInterView : public KrView, public QTreeView {
+ friend class KrInterViewItem;
public:
KrInterView( QWidget *parent, bool &left, KConfig *cfg = krConfig );
@@ -41,18 +43,23 @@
virtual void updateItem(KrViewItem* item);
virtual QModelIndex getCurrentIndex() { return currentIndex(); }
virtual bool isSelected( const QModelIndex &ndx ) { return selectionModel()->isSelected( ndx ); }
+ 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();
+
protected:
virtual void setup();
virtual void initOperator();
+ virtual void keyPressEvent( QKeyEvent *e );
virtual void mousePressEvent ( QMouseEvent * );
private:
KrVfsModel *_model;
KrMouseHandler *_mouseHandler;
- QVector<KrInterViewItem*> _items;
+ QHash<vfile *,KrInterViewItem*> _itemHash;
};
#endif // __krinterview__
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-14 22:12:32 UTC (rev 6208)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-15 08:32:26 UTC (rev 6209)
@@ -496,8 +496,11 @@
qSort(sorting.begin(), sorting.end(), compare);
_vfiles.clear();
+ _vfileNdx.clear();
for (int i = 0; i < sorting.count(); ++i) {
_vfiles.append( sorting[ i ]->vf() );
+ _vfileNdx[ sorting[ i ]->vf() ] = index( i, 0 );
+ _nameNdx[ sorting[ i ]->vf()->vfile_getName() ] = index( i, 0 );
delete sorting[ i ];
}
@@ -517,3 +520,19 @@
}
return QString();
}
+
+vfile * KrVfsModel::vfileAt( const QModelIndex &index )
+{
+ return _vfiles[ index.row() ];
+}
+
+const QModelIndex & KrVfsModel::vfileIndex( vfile * vf )
+{
+ return _vfileNdx[ vf ];
+}
+
+const QModelIndex & KrVfsModel::nameIndex( const QString & st )
+{
+ return _nameNdx[ st ];
+}
+
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-14 22:12:32 UTC (rev 6208)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-15 08:32:26 UTC (rev 6209)
@@ -32,15 +32,21 @@
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 * );
+ const QModelIndex & nameIndex( const QString & );
protected:
- QVector<vfile*> _vfiles;
- bool _extensionEnabled;
- KrView * _view;
- int _lastSortOrder;
- Qt::SortOrder _lastSortDir;
- vfile * _dummyVfile;
- bool _ready;
+ QVector<vfile*> _vfiles;
+ QHash<vfile *, QModelIndex> _vfileNdx;
+ QHash<QString, QModelIndex> _nameNdx;
+ bool _extensionEnabled;
+ KrView * _view;
+ int _lastSortOrder;
+ Qt::SortOrder _lastSortDir;
+ vfile * _dummyVfile;
+ bool _ready;
};
#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-14 23:22:37
|
Revision: 6208
http://krusader.svn.sourceforge.net/krusader/?rev=6208&view=rev
Author: ckarai
Date: 2009-02-14 22:12:32 +0000 (Sat, 14 Feb 2009)
Log Message:
-----------
Added: interview, updir + filters
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-14 21:08:24 UTC (rev 6207)
+++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-14 22:12:32 UTC (rev 6208)
@@ -201,81 +201,8 @@
void KrInterView::addItems(vfs* v, bool addUpDir)
{
- _model->setVfs(v);
+ _model->setVfs(v, addUpDir);
this->setCurrentIndex(_model->index(0, 0));
-
-#if 0
- Q3ListViewItem * item = firstChild();
- Q3ListViewItem *currentItem = item;
- QString size, name;
-
- // add the up-dir arrow if needed
- if ( addUpDir ) {
- new KrDetailedViewItem( this, ( Q3ListViewItem* ) 0L, ( vfile* ) 0L );
- }
-
- // text for updating the status bar
- QString statusText = QString("%1/ ").arg( v->vfs_getOrigin().fileName() ) + i18n("Directory");
-
- int cnt = 0;
- int cl = columnSorted();
- bool as = ascendingSort();
- setSorting( -1 ); // disable sorting
-
- for ( vfile * vf = v->vfs_getFirstFile(); vf != 0 ; vf = v->vfs_getNextFile() ) {
- size = KRpermHandler::parseSize( vf->vfile_getSize() );
- name = vf->vfile_getName();
- 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 ) )
- continue;
- break;
- case KrViewProperties::Dirs:
- if ( !vf->vfile_isDir() )
- continue;
- break;
- case KrViewProperties::Files:
- if ( vf->vfile_isDir() )
- continue;
- break;
-
- case KrViewProperties::ApplyToDirs :
- break; // no-op, stop compiler complaints
- }
- }
-
- KrDetailedViewItem *dvitem = new KrDetailedViewItem( this, item, vf );
- _dict.insert( vf->vfile_getName(), dvitem );
- if ( isDir )
- ++_numDirs;
- else
- _countSize += dvitem->VF->vfile_getSize();
- ++_count;
- // if the item should be current - make it so
- if ( dvitem->name() == nameToMakeCurrent() ) {
- currentItem = static_cast<Q3ListViewItem*>(dvitem);
- statusText = dvitem->description();
- }
-
- cnt++;
- }
-
-
- // re-enable sorting
- setSorting( cl, as );
- sort();
-
- if ( !currentItem )
- currentItem = firstChild();
- K3ListView::setCurrentItem( currentItem );
- ensureItemVisible( currentItem );
-
- op()->emitItemDescription( statusText );
-#endif
}
void KrInterView::setup()
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-14 21:08:24 UTC (rev 6207)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-14 22:12:32 UTC (rev 6208)
@@ -63,24 +63,54 @@
typedef bool(*LessThan)(SortProps *,SortProps *);
-KrVfsModel::KrVfsModel( KrView * view ): QAbstractListModel(0), _vfs(0), _extensionEnabled( true ), _view( view ),
- _lastSortOrder( KrVfsModel::Name ), _lastSortDir(Qt::AscendingOrder) {}
+KrVfsModel::KrVfsModel( KrView * view ): QAbstractListModel(0), _extensionEnabled( true ), _view( view ),
+ _lastSortOrder( KrVfsModel::Name ), _lastSortDir(Qt::AscendingOrder),
+ _dummyVfile( 0 ), _ready( false ) {}
-void KrVfsModel::setVfs(vfs* v)
+void KrVfsModel::setVfs(vfs* v, bool upDir)
{
emit layoutAboutToBeChanged();
- _vfs = v;
-
- vfile *vf = _vfs->vfs_getFirstFile();
+ _dummyVfile = 0;
+ if( upDir ) {
+ _dummyVfile = new vfile( "..", 0, "drwxrwxrwx", 0, false, 0, 0, "", "", 0, -1);
+ _dummyVfile->vfile_setIcon( "go-up" );
+ _vfiles.append(_dummyVfile);
+ }
+
+ vfile *vf = v->vfs_getFirstFile();
while (vf) {
- _vfiles.append(vf);
- vf = _vfs->vfs_getNextFile();
+ bool add = true;
+ 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 ) )
+ add = false;
+ break;
+ case KrViewProperties::Dirs:
+ if ( !isDir )
+ add = false;
+ break;
+ case KrViewProperties::Files:
+ if ( isDir )
+ add = false;
+ break;
+ default:
+ break;
+ }
+ }
+ if( add )
+ _vfiles.append(vf);
+ vf = v->vfs_getNextFile();
}
+ _ready = true;
// TODO: connect all addedVfile/deleteVfile and friends signals
// TODO: make a more efficient implementation that this dummy one :-)
- emit dataChanged(index(0, 0), index(_vfs->vfs_noOfFiles()-1, 0));
+ emit dataChanged(index(0, 0), index(_vfiles.count()-1, 0));
emit layoutChanged();
sort();
}
@@ -98,10 +128,7 @@
int KrVfsModel::rowCount(const QModelIndex& parent) const
{
- if (!_vfs) return 0;
-
- // simply return the number of items in the vfs
- return _vfs->vfs_noOfFiles();
+ return _vfiles.count();
}
@@ -111,7 +138,7 @@
QVariant KrVfsModel::data(const QModelIndex& index, int role) const
{
- if (!index.isValid() || !_vfs)
+ if (!index.isValid())
return QVariant();
if (index.row() >= rowCount())
@@ -463,7 +490,7 @@
QVector < SortProps * > sorting (_vfiles.count());
for (int i = 0; i < _vfiles.count(); ++i)
- sorting[ i ] = new SortProps( _vfiles[ i ], column, properties(), false, order == Qt::AscendingOrder );
+ sorting[ i ] = new SortProps( _vfiles[ i ], column, properties(), _vfiles[ i ] == _dummyVfile, order == Qt::AscendingOrder );
LessThan compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
qSort(sorting.begin(), sorting.end(), compare);
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-14 21:08:24 UTC (rev 6207)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-14 22:12:32 UTC (rev 6208)
@@ -20,8 +20,8 @@
KrVfsModel( KrView * );
virtual ~KrVfsModel();
- inline bool ready() const { return _vfs != 0; }
- void setVfs(vfs* v);
+ inline bool ready() const { return _ready; }
+ void setVfs(vfs* v, bool upDir);
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
@@ -35,11 +35,12 @@
protected:
- vfs * _vfs;
QVector<vfile*> _vfiles;
bool _extensionEnabled;
KrView * _view;
int _lastSortOrder;
Qt::SortOrder _lastSortDir;
+ vfile * _dummyVfile;
+ bool _ready;
};
#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-14 21:08:34
|
Revision: 6207
http://krusader.svn.sourceforge.net/krusader/?rev=6207&view=rev
Author: ckarai
Date: 2009-02-14 21:08:24 +0000 (Sat, 14 Feb 2009)
Log Message:
-----------
interview: minor fixes
Modified Paths:
--------------
trunk/krusader_kde4/krusader/Panel/CMakeLists.txt
trunk/krusader_kde4/krusader/Panel/krinterview.cpp
trunk/krusader_kde4/krusader/Panel/krinterview.h
trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp
trunk/krusader_kde4/krusader/Panel/krvfsmodel.h
trunk/krusader_kde4/krusader/Panel/krview.h
Added Paths:
-----------
trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp
trunk/krusader_kde4/krusader/Panel/krmousehandler.h
Modified: trunk/krusader_kde4/krusader/Panel/CMakeLists.txt
===================================================================
--- trunk/krusader_kde4/krusader/Panel/CMakeLists.txt 2009-02-14 20:18:44 UTC (rev 6206)
+++ trunk/krusader_kde4/krusader/Panel/CMakeLists.txt 2009-02-14 21:08:24 UTC (rev 6207)
@@ -21,7 +21,8 @@
krbriefviewitem.cpp
krvfsmodel.cpp
krinterview.cpp
- krviewfactory.cpp )
+ krviewfactory.cpp
+ krmousehandler.cpp )
kde4_add_library(Panel STATIC ${Panel_SRCS} )
Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-14 20:18:44 UTC (rev 6206)
+++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-14 21:08:24 UTC (rev 6207)
@@ -4,6 +4,7 @@
#include "krvfsmodel.h"
#include "../VFS/krpermhandler.h"
#include "../defaults.h"
+#include "krmousehandler.h"
#include <klocale.h>
#include <kdirlister.h>
#include <QDir>
@@ -73,6 +74,8 @@
this->setRootIsDecorated(false);
this->setSortingEnabled(true);
_model->sort( KrVfsModel::Name, Qt::AscendingOrder );
+
+ _mouseHandler = new KrMouseHandler( this );
}
KrInterView::~KrInterView()
@@ -82,6 +85,7 @@
delete _operator;
_operator = 0;
delete _model;
+ delete _mouseHandler;
}
KrViewItem* KrInterView::findItemByName(const QString &name)
@@ -189,6 +193,12 @@
{
}
+void KrInterView::clear()
+{
+ _model->clear();
+ KrView::clear();
+}
+
void KrInterView::addItems(vfs* v, bool addUpDir)
{
_model->setVfs(v);
@@ -279,3 +289,9 @@
// klistview emits selection changed, so chain them to operator
connect(this, SIGNAL(selectionChanged()), _operator, SLOT(emitSelectionChanged()));
}
+
+void KrInterView::mousePressEvent ( QMouseEvent * ev )
+{
+ if( _mouseHandler->mousePressEvent( ev ) )
+ QTreeView::mousePressEvent( ev );
+}
Modified: trunk/krusader_kde4/krusader/Panel/krinterview.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-14 20:18:44 UTC (rev 6206)
+++ trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-14 21:08:24 UTC (rev 6207)
@@ -8,6 +8,8 @@
class KrVfsModel;
class KrInterViewItem;
+class QMouseEvent;
+class KrMouseHandler;
class KrInterView : public KrView, public QTreeView {
@@ -15,7 +17,6 @@
KrInterView( QWidget *parent, bool &left, KConfig *cfg = krConfig );
virtual ~KrInterView();
-public:
virtual void addItems(vfs* v, bool addUpDir = true);
virtual KrViewItem* findItemByName(const QString &name);
virtual QString getCurrentItem() const;
@@ -35,6 +36,7 @@
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(); }
@@ -46,8 +48,11 @@
virtual void setup();
virtual void initOperator();
+ virtual void mousePressEvent ( QMouseEvent * );
+
private:
KrVfsModel *_model;
+ KrMouseHandler *_mouseHandler;
QVector<KrInterViewItem*> _items;
};
#endif // __krinterview__
Added: trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp (rev 0)
+++ trunk/krusader_kde4/krusader/Panel/krmousehandler.cpp 2009-02-14 21:08:24 UTC (rev 6207)
@@ -0,0 +1,26 @@
+/***************************************************************************
+ krmousehandler.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 "krmousehandler.h"
+#include "krview.h"
+
+bool KrMouseHandler::mousePressEvent( QMouseEvent *e )
+{
+ if( !_view->isFocused() )
+ _view->op()->emitNeedFocus();
+ return true;
+}
\ No newline at end of file
Added: trunk/krusader_kde4/krusader/Panel/krmousehandler.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krmousehandler.h (rev 0)
+++ trunk/krusader_kde4/krusader/Panel/krmousehandler.h 2009-02-14 21:08:24 UTC (rev 6207)
@@ -0,0 +1,35 @@
+/***************************************************************************
+ krmousehandler.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_MOUSE_HANDLER__
+#define __KR_MOUSE_HANDLER__
+
+class QMouseEvent;
+class KrView;
+
+class KrMouseHandler
+{
+public:
+ KrMouseHandler( KrView * view ) : _view( view ) {}
+
+ bool mousePressEvent( QMouseEvent *e );
+
+protected:
+ KrView * _view;
+};
+
+#endif /* __KR_MOUSE_HANDLER */
\ No newline at end of file
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-14 20:18:44 UTC (rev 6206)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-14 21:08:24 UTC (rev 6207)
@@ -89,6 +89,13 @@
{
}
+void KrVfsModel::clear()
+{
+ emit layoutAboutToBeChanged();
+ _vfiles.clear();
+ emit layoutChanged();
+}
+
int KrVfsModel::rowCount(const QModelIndex& parent) const
{
if (!_vfs) return 0;
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-14 20:18:44 UTC (rev 6206)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-14 21:08:24 UTC (rev 6207)
@@ -30,6 +30,7 @@
void setExtensionEnabled( bool exten ) { _extensionEnabled = exten; }
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 );
Modified: trunk/krusader_kde4/krusader/Panel/krview.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-14 20:18:44 UTC (rev 6206)
+++ trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-14 21:08:24 UTC (rev 6207)
@@ -255,6 +255,7 @@
virtual QString statistics();
virtual const KrViewProperties* properties() const { return _properties; }
virtual KrViewOperator* op() const { return _operator; }
+ virtual bool isFocused() const { return _focused; }
/////////////////////////////////////////////////////////////
// the following functions have a default and minimalistic //
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-02-14 20:18:59
|
Revision: 6206
http://krusader.svn.sourceforge.net/krusader/?rev=6206&view=rev
Author: ckarai
Date: 2009-02-14 20:18:44 +0000 (Sat, 14 Feb 2009)
Log Message:
-----------
InterView: sorting
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-14 16:26:46 UTC (rev 6205)
+++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-14 20:18:44 UTC (rev 6206)
@@ -71,6 +71,8 @@
_model = new KrVfsModel( this );
this->setModel(_model);
this->setRootIsDecorated(false);
+ this->setSortingEnabled(true);
+ _model->sort( KrVfsModel::Name, Qt::AscendingOrder );
}
KrInterView::~KrInterView()
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-14 16:26:46 UTC (rev 6205)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-14 20:18:44 UTC (rev 6206)
@@ -3,6 +3,7 @@
#include "../VFS/vfile.h"
#include <klocale.h>
#include <QtDebug>
+#include <QtAlgorithms>
#include "../VFS/krpermhandler.h"
#include "../defaults.h"
#include "../krusader.h"
@@ -10,8 +11,61 @@
#include "listpanel.h"
#include "krcolorcache.h"
-KrVfsModel::KrVfsModel( KrView * view ): QAbstractListModel(0), _vfs(0), _extensionEnabled( true ), _view( view ) {}
+class SortProps
+{
+public:
+ SortProps( vfile *vf, int col, const KrViewProperties * props, bool isDummy, bool asc )
+ {
+ _col = col;
+ _prop = props;
+ _isdummy = isDummy;
+ _ascending = asc;
+ _vfile = vf;
+ if( _col == KrVfsModel::Extension )
+ {
+ if( vf->vfile_isDir() ) {
+ _ext = "";
+ } else {
+ // 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 = props->atomicExtensions.begin(); i != props->atomicExtensions.end(); ++i) {
+ if (vfName.endsWith(*i) && vfName != *i ) {
+ loc = vfName.length() - (*i).length();
+ break;
+ }
+ }
+ _ext = vfName.mid(loc);
+ } else
+ _ext = "";
+ }
+ }
+ }
+
+ inline int column() { return _col; }
+ inline const KrViewProperties * properties() { return _prop; }
+ inline bool isDummy() { return _isdummy; }
+ inline bool isAscending() { return _ascending; }
+ inline QString extension() { return _ext; }
+ inline vfile * vf() { return _vfile; }
+
+private:
+ int _col;
+ const KrViewProperties * _prop;
+ bool _isdummy;
+ vfile * _vfile;
+ bool _ascending;
+ QString _ext;
+};
+
+typedef bool(*LessThan)(SortProps *,SortProps *);
+
+KrVfsModel::KrVfsModel( KrView * view ): QAbstractListModel(0), _vfs(0), _extensionEnabled( true ), _view( view ),
+ _lastSortOrder( KrVfsModel::Name ), _lastSortDir(Qt::AscendingOrder) {}
+
void KrVfsModel::setVfs(vfs* v)
{
emit layoutAboutToBeChanged();
@@ -28,6 +82,7 @@
emit dataChanged(index(0, 0), index(_vfs->vfs_noOfFiles()-1, 0));
emit layoutChanged();
+ sort();
}
KrVfsModel::~KrVfsModel()
@@ -70,7 +125,7 @@
switch (index.column()) {
case KrVfsModel::Name:
{
- if( !_extensionEnabled )
+ if( !_extensionEnabled || vf->vfile_isDir() )
return vf->vfile_getName();
// check if the file has an extension
const QString& vfName = vf->vfile_getName();
@@ -89,7 +144,7 @@
}
case KrVfsModel::Extension:
{
- if( !_extensionEnabled )
+ if( !_extensionEnabled || vf->vfile_isDir() )
return QVariant();
// check if the file has an extension
const QString& vfName = vf->vfile_getName();
@@ -185,6 +240,236 @@
}
}
+// compares numbers within two strings
+bool compareNumbers(QString& aS1, int& aPos1, QString& aS2, int& aPos2)
+{
+ int res = 0;
+ int start1 = aPos1;
+ int start2 = aPos2;
+ while ( aPos1 < aS1.length() && aS1.at( aPos1 ).isDigit() ) aPos1++;
+ while ( aPos2 < aS2.length() && aS2.at( aPos2 ).isDigit() ) aPos2++;
+ // the left-most difference determines what's bigger
+ int i1 = aPos1 - 1;
+ int i2 = aPos2 - 1;
+ for ( ; i1 >= start1 || i2 >= start2; i1--, i2--)
+ {
+ int c1 = 0;
+ int c2 = 0;
+ if ( i1 >= start1 ) c1 = aS1.at( i1 ).digitValue();
+ if ( i2 >= start2 ) c2 = aS2.at( i2 ).digitValue();
+ if ( c1 < c2 ) res = -1;
+ else if ( c1 > c2 ) res = 1;
+ }
+ return res;
+}
+
+
+bool compareTextsAlphabetical(QString& aS1, QString& aS2, const KrViewProperties * _viewProperties, bool aNumbers)
+{
+ int lPositionS1 = 0;
+ int lPositionS2 = 0;
+ // sometimes, localeAwareCompare is not case sensitive. in that case, we need to fallback to a simple string compare (KDE bug #40131)
+ bool lUseLocaleAware = (_viewProperties->sortMode & KrViewProperties::IgnoreCase)
+ || _viewProperties->localeAwareCompareIsCaseSensitive;
+ int j = 0;
+ QChar lchar1;
+ QChar lchar2;
+ while(true)
+ {
+ lchar1 = aS1[lPositionS1];
+ lchar2 = aS2[lPositionS2];
+ // detect numbers
+ if(aNumbers && lchar1.isDigit() && lchar2.isDigit() )
+ {
+ int j = compareNumbers(aS1, lPositionS1, aS2, lPositionS2);
+ if( j != 0 ) return (j == -1);
+ }
+ else
+ if( lUseLocaleAware
+ &&
+ ( ( lchar1 >= 128
+ && ( (lchar2 >= 'A' && lchar2 <= 'Z') || (lchar2 >= 'a' && lchar2 <= 'z') || lchar2 >= 128 ) )
+ ||
+ ( lchar2 >= 128
+ && ( (lchar1 >= 'A' && lchar1 <= 'Z') || (lchar1 >= 'a' && lchar1 <= 'z') || lchar1 >= 128 ) )
+ )
+ )
+ {
+ // use localeAwareCompare when a unicode character is encountered
+ j = QString::localeAwareCompare(lchar1, lchar2);
+ if(j != 0) return j < 0;
+ lPositionS1++;
+ lPositionS2++;
+ }
+ else
+ {
+ // if characters are latin or localeAwareCompare is not case sensitive then use simple characters compare is enough
+ if(lchar1 < lchar2) return true;
+ if(lchar1 > lchar2) return false;
+ lPositionS1++;
+ lPositionS2++;
+ }
+ // at this point strings are equal, check if ends of strings are reached
+ if(lPositionS1 == aS1.length() && lPositionS2 == aS2.length()) return false;
+ if(lPositionS1 == aS1.length() && lPositionS2 < aS2.length()) return true;
+ if(lPositionS1 < aS1.length() && lPositionS2 == aS2.length()) return false;
+ }
+}
+
+bool compareTextsCharacterCode(QString& aS1, QString& aS2, const KrViewProperties * _viewProperties, bool aNumbers)
+{
+ int lPositionS1 = 0;
+ int lPositionS2 = 0;
+ while(true)
+ {
+ // detect numbers
+ if(aNumbers && aS1[lPositionS1].isDigit() && aS2[lPositionS2].isDigit())
+ {
+ int j = compareNumbers(aS1, lPositionS1, aS2, lPositionS2);
+ if( j != 0 ) return (j == -1);
+ }
+ else
+ {
+ if(aS1[lPositionS1] < aS2[lPositionS2]) return true;
+ if(aS1[lPositionS1] > aS2[lPositionS2]) return false;
+ lPositionS1++;
+ lPositionS2++;
+ }
+ // at this point strings are equal, check if ends of strings are reached
+ if(lPositionS1 == aS1.length() && lPositionS2 == aS2.length()) return false;
+ if(lPositionS1 == aS1.length() && lPositionS2 < aS2.length()) return true;
+ if(lPositionS1 < aS1.length() && lPositionS2 == aS2.length()) return false;
+ }
+}
+
+bool compareTextsKrusader(QString& aS1, QString& aS2, const KrViewProperties * _viewProperties, bool asc, bool isName)
+{
+ // ensure "hidden" before others
+ if( isName )
+ {
+ if( aS1[0] == '.' && aS2[0] != '.' ) return asc;
+ if( aS1[0] != '.' && aS2[0] == '.' ) return !asc;
+ }
+
+ // sometimes, localeAwareCompare is not case sensitive. in that case, we need to fallback to a simple string compare (KDE bug #40131)
+ bool lUseLocaleAware = (_viewProperties->sortMode & KrViewProperties::IgnoreCase)
+ || _viewProperties->localeAwareCompareIsCaseSensitive;
+
+ if( lUseLocaleAware )
+ return QString::localeAwareCompare(aS1, aS2) < 0;
+ else
+ // if localeAwareCompare is not case sensitive then use simple compare is enough
+ return QString::compare(aS1, aS2) < 0;
+}
+
+bool compareTexts( QString aS1, QString aS2, const KrViewProperties * _viewProperties, bool asc, bool isName)
+{
+ //check empty strings
+ if( aS1.length() == 0 ) {
+ return false;
+ } else {
+ if( aS2.length() == 0 )
+ return true;
+ }
+
+ if( isName )
+ {
+ if ( aS1 == ".." ) {
+ return !asc;
+ } else {
+ if ( aS2 == ".." )
+ return asc;
+ }
+ }
+
+ if( _viewProperties->sortMode & KrViewProperties::IgnoreCase )
+ {
+ aS1 = aS1.toLower();
+ aS2 = aS2.toLower();
+ }
+
+ switch(_viewProperties->sortMethod)
+ {
+ case KrViewProperties::Alphabetical:
+ return compareTextsAlphabetical(aS1, aS2, _viewProperties, false);
+ case KrViewProperties::AlphabeticalNumbers:
+ return compareTextsAlphabetical(aS1, aS2, _viewProperties, true);
+ case KrViewProperties::CharacterCode:
+ return compareTextsCharacterCode(aS1, aS2, _viewProperties, false);
+ case KrViewProperties::CharacterCodeNumbers:
+ return compareTextsCharacterCode(aS1, aS2, _viewProperties, true);
+ case KrViewProperties::Krusader:
+ default:
+ return compareTextsKrusader(aS1, aS2, _viewProperties, asc, isName);
+ }
+}
+
+bool itemLessThan( SortProps *sp, SortProps *sp2 )
+{
+ vfile * file1 = sp->vf();
+ vfile * file2 = sp2->vf();
+ bool isdir1 = file1->vfile_isDir();
+ bool isdir2 = file2->vfile_isDir();
+
+ if( isdir1 && !isdir2 )
+ return sp->isAscending();
+ if( isdir2 && !isdir1 )
+ return !sp->isAscending();
+
+ if( sp->isDummy() )
+ return sp->isAscending();
+ if( sp2->isDummy() )
+ return !sp->isAscending();
+
+ bool alwaysSortDirsByName = (sp->properties()->sortMode & KrViewProperties::AlwaysSortDirsByName);
+ int column = sp->column();
+ if( alwaysSortDirsByName )
+ column = KrVfsModel::Name;
+
+ switch( sp->column() )
+ {
+ case KrVfsModel::Name:
+ return compareTexts(file1->vfile_getName(), file2->vfile_getName(), sp->properties(), sp->isAscending(), true);
+ case KrVfsModel::Extension:
+ if( sp->extension() == sp2->extension() )
+ return compareTexts(file1->vfile_getName(), file2->vfile_getName(), sp->properties(), sp->isAscending(), true);
+ return compareTexts(sp->extension(), sp2->extension(), sp->properties(), sp->isAscending(), true);
+ case KrVfsModel::Size:
+ 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();
+ }
+ file1->vfile_getName() < file2->vfile_getName();
+}
+
+bool itemGreaterThan( SortProps *sp, SortProps *sp2 )
+{
+ return !itemLessThan( sp, sp2 );
+}
+
+void KrVfsModel::sort ( int column, Qt::SortOrder order )
+{
+ _lastSortOrder = column;
+ _lastSortDir = order;
+ emit layoutAboutToBeChanged();
+
+
+ QVector < SortProps * > sorting (_vfiles.count());
+ for (int i = 0; i < _vfiles.count(); ++i)
+ sorting[ i ] = new SortProps( _vfiles[ i ], column, properties(), false, order == Qt::AscendingOrder );
+
+ LessThan compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan);
+ qSort(sorting.begin(), sorting.end(), compare);
+
+ _vfiles.clear();
+ for (int i = 0; i < sorting.count(); ++i) {
+ _vfiles.append( sorting[ i ]->vf() );
+ delete sorting[ i ];
+ }
+
+ emit layoutChanged();
+}
+
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-14 16:26:46 UTC (rev 6205)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-14 20:18:44 UTC (rev 6206)
@@ -29,12 +29,16 @@
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(); }
-
+ void sort() { sort( _lastSortOrder, _lastSortDir ); }
+ virtual void sort ( int column, Qt::SortOrder order = Qt::AscendingOrder );
+
protected:
vfs * _vfs;
QVector<vfile*> _vfiles;
bool _extensionEnabled;
KrView * _view;
+ int _lastSortOrder;
+ Qt::SortOrder _lastSortDir;
};
#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-14 16:26:59
|
Revision: 6205
http://krusader.svn.sourceforge.net/krusader/?rev=6205&view=rev
Author: ckarai
Date: 2009-02-14 16:26:46 +0000 (Sat, 14 Feb 2009)
Log Message:
-----------
interview changes
Modified Paths:
--------------
trunk/krusader_kde4/krusader/Panel/krinterview.cpp
trunk/krusader_kde4/krusader/Panel/krinterview.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/krinterview.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-14 13:57:06 UTC (rev 6204)
+++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-14 16:26:46 UTC (rev 6205)
@@ -68,14 +68,13 @@
_nameInKConfig=QString( "KrInterView" ) + QString( ( left ? "Left" : "Right" ) ) ;
KConfigGroup group( krConfig, "Private" );
- _model = new KrVfsModel;
+ _model = new KrVfsModel( this );
this->setModel(_model);
this->setRootIsDecorated(false);
}
KrInterView::~KrInterView()
{
- _model->setProperties( 0 );
delete _properties;
_properties = 0;
delete _operator;
@@ -272,12 +271,6 @@
}
-void KrInterView::initProperties()
-{
- KrView::initProperties();
- _model->setProperties( _properties );
-}
-
void KrInterView::initOperator()
{
_operator = new KrViewOperator(this, this);
Modified: trunk/krusader_kde4/krusader/Panel/krinterview.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-14 13:57:06 UTC (rev 6204)
+++ trunk/krusader_kde4/krusader/Panel/krinterview.h 2009-02-14 16:26:46 UTC (rev 6205)
@@ -37,12 +37,13 @@
virtual void sort();
virtual void updateView();
virtual void updateItem(KrViewItem* item);
+ virtual QModelIndex getCurrentIndex() { return currentIndex(); }
+ virtual bool isSelected( const QModelIndex &ndx ) { return selectionModel()->isSelected( ndx ); }
static KrView* create( QWidget *parent, bool &left, KConfig *cfg ) { return new KrInterView( parent, left, cfg ); }
protected:
virtual void setup();
- virtual void initProperties();
virtual void initOperator();
private:
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-14 13:57:06 UTC (rev 6204)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-14 16:26:46 UTC (rev 6205)
@@ -1,10 +1,16 @@
#include "krvfsmodel.h"
#include "../VFS/vfs.h"
#include "../VFS/vfile.h"
-#include "krview.h"
+#include <klocale.h>
#include <QtDebug>
+#include "../VFS/krpermhandler.h"
+#include "../defaults.h"
+#include "../krusader.h"
+#include "../krusaderview.h"
+#include "listpanel.h"
+#include "krcolorcache.h"
-KrVfsModel::KrVfsModel(): QAbstractListModel(0), _vfs(0) {}
+KrVfsModel::KrVfsModel( KrView * view ): QAbstractListModel(0), _vfs(0), _extensionEnabled( true ), _view( view ) {}
void KrVfsModel::setVfs(vfs* v)
{
@@ -38,7 +44,7 @@
int KrVfsModel::columnCount(const QModelIndex &parent) const {
- return 3;
+ return KrVfsModel::MAX_COLUMNS;
}
QVariant KrVfsModel::data(const QModelIndex& index, int role) const
@@ -54,12 +60,61 @@
switch( role )
{
+ case Qt::FontRole:
+ {
+ KConfigGroup grpSvr( krConfig, "Look&Feel" );
+ return grpSvr.readEntry( "Filelist Font", *_FilelistFont );
+ }
case Qt::DisplayRole:
{
switch (index.column()) {
- case 0: return vf->vfile_getName();
- case 1: return ("<ext>");
- case 2: return vf->vfile_getSize();
+ case KrVfsModel::Name:
+ {
+ if( !_extensionEnabled )
+ 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);
+ }
+ case KrVfsModel::Extension:
+ {
+ if( !_extensionEnabled )
+ return QVariant();
+ // 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 QVariant();
+ return vfName.mid(loc + 1);
+ }
+ case KrVfsModel::Size:
+ {
+ if (vf->vfile_isDir() && vf->vfile_getSize() <= 0)
+ return i18n("<DIR>");
+ else
+ return ( properties()->humanReadableSize) ?
+ KIO::convertSize(vf->vfile_getSize())+" " :
+ KRpermHandler::parseSize(vf->vfile_getSize())+" ";
+ }
default: return QString();
}
return QVariant();
@@ -67,9 +122,9 @@
case Qt::DecorationRole:
{
switch (index.column() ) {
- case 0:
+ case KrVfsModel::Name:
{
- if( _properties && _properties->displayIcons )
+ if( properties()->displayIcons )
return KrView::getIcon( vf );
break;
}
@@ -78,6 +133,53 @@
}
return QVariant();
}
+ case Qt::TextAlignmentRole:
+ {
+ switch (index.column() ) {
+ case KrVfsModel::Size:
+ return Qt::AlignRight;
+ default:
+ return Qt::AlignLeft;
+ }
+ return QVariant();
+ }
+ case Qt::BackgroundRole:
+ case Qt::ForegroundRole:
+ {
+ KrColorItemType colorItemType;
+ colorItemType.m_activePanel = (_view == ACTIVE_PANEL->view);
+ colorItemType.m_alternateBackgroundColor = (index.row() & 1);
+ colorItemType.m_currentItem = _view->getCurrentIndex() == index;
+ colorItemType.m_selectedItem = _view->isSelected( index );
+ if (vf->vfile_isSymLink())
+ {
+ if (vf->vfile_getMime() == "Broken Link !" )
+ colorItemType.m_fileType = KrColorItemType::InvalidSymlink;
+ else
+ colorItemType.m_fileType = KrColorItemType::Symlink;
+ }
+ else if (vf->vfile_isDir())
+ colorItemType.m_fileType = KrColorItemType::Directory;
+ else if (vf->vfile_isExecutable())
+ colorItemType.m_fileType = KrColorItemType::Executable;
+ else
+ colorItemType.m_fileType = KrColorItemType::File;
+
+ KrColorGroup cols;
+ KrColorCache::getColorCache().getColors(cols, colorItemType);
+
+ if( colorItemType.m_selectedItem )
+ {
+ if( role == Qt::ForegroundRole )
+ return cols.highlightedText();
+ else
+ return cols.highlight();
+ }
+ if( role == Qt::ForegroundRole )
+ return cols.text();
+ else
+ return cols.background();
+ }
default:
return QVariant();
}
@@ -90,9 +192,9 @@
return QVariant();
switch (section) {
- case 0: return "Name";
- case 1: return "Ext";
- case 2: return "Size";
+ case KrVfsModel::Name: return i18n( "Name" );
+ case KrVfsModel::Extension: return i18n( "Ext" );
+ case KrVfsModel::Size: return i18n( "Size" );
}
return QString();
}
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-14 13:57:06 UTC (rev 6204)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-14 16:26:46 UTC (rev 6205)
@@ -3,16 +3,21 @@
#include <QAbstractListModel>
#include <QVector>
+#include "krview.h"
class vfs;
class vfile;
class KrViewProperties;
+class KrView;
class KrVfsModel: public QAbstractListModel {
Q_OBJECT
public:
- KrVfsModel();
+ enum ColumnType { Name = 0x0, Extension = 0x1, Size = 0x2, Mime = 0x3, DateTime = 0x4,
+ Permissions = 0x5, KrPermissions = 0x6, Owner = 0x7, Group = 0x8, MAX_COLUMNS = 0x03 };
+
+ KrVfsModel( KrView * );
virtual ~KrVfsModel();
inline bool ready() const { return _vfs != 0; }
@@ -22,12 +27,14 @@
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
- void setProperties( KrViewProperties * props ) { _properties = props; }
+ void setExtensionEnabled( bool exten ) { _extensionEnabled = exten; }
+ inline const KrViewProperties * properties() const { return _view->properties(); }
protected:
- vfs *_vfs;
- QVector<vfile*> _vfiles;
- KrViewProperties * _properties;
+ vfs * _vfs;
+ QVector<vfile*> _vfiles;
+ bool _extensionEnabled;
+ KrView * _view;
};
#endif // __krvfsmodel__
Modified: trunk/krusader_kde4/krusader/Panel/krview.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-14 13:57:06 UTC (rev 6204)
+++ trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-14 16:26:46 UTC (rev 6205)
@@ -35,6 +35,7 @@
#include <qhash.h>
#include <QDropEvent>
#include <QList>
+#include <QModelIndex>
#include "../krusader.h"
#include "../VFS/vfile.h"
#include "../VFS/vfs.h"
@@ -48,6 +49,7 @@
class KrView;
class KrViewItem;
class KrQuickSearch;
+class QModelIndex;
typedef QList<KrViewItem*> KrViewItemList;
// KrViewProperties
@@ -189,6 +191,10 @@
// Every view must implement the following functions //
///////////////////////////////////////////////////////
public:
+ // interview related functions
+ virtual QModelIndex getCurrentIndex() { return QModelIndex(); }
+ virtual bool isSelected( const QModelIndex & ) { return false; }
+
virtual KrViewItem *getFirst() = 0;
virtual KrViewItem *getLast() = 0;
virtual KrViewItem *getNext(KrViewItem *current) = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-02-14 13:57:14
|
Revision: 6204
http://krusader.svn.sourceforge.net/krusader/?rev=6204&view=rev
Author: ckarai
Date: 2009-02-14 13:57:06 +0000 (Sat, 14 Feb 2009)
Log Message:
-----------
ARCH: view properties for detailed/brief/interviews are merged into one
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/krusader/Panel/krbriefview.cpp
trunk/krusader_kde4/krusader/Panel/krbriefview.h
trunk/krusader_kde4/krusader/Panel/krdetailedview.cpp
trunk/krusader_kde4/krusader/Panel/krdetailedview.h
trunk/krusader_kde4/krusader/Panel/krinterview.cpp
trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp
trunk/krusader_kde4/krusader/Panel/krvfsmodel.h
trunk/krusader_kde4/krusader/Panel/krview.cpp
trunk/krusader_kde4/krusader/Panel/krview.h
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-02-13 17:29:02 UTC (rev 6203)
+++ trunk/krusader_kde4/ChangeLog 2009-02-14 13:57:06 UTC (rev 6204)
@@ -22,6 +22,7 @@
FIXED: Krusader fails to edit files containing international chars with Shift+F4
CHANGED: Initial Konfigurator size is now 900x680
+ ARCH: view properties for detailed/brief/interviews are merged into one
I18N: Updated French translation (thanks to Henry-Nicolas Tourneur and Stanislas Zeller)
I18N: Updated Catalan translation (thanks to Joaquim Perez)
Modified: trunk/krusader_kde4/krusader/Panel/krbriefview.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krbriefview.cpp 2009-02-13 17:29:02 UTC (rev 6203)
+++ trunk/krusader_kde4/krusader/Panel/krbriefview.cpp 2009-02-14 13:57:06 UTC (rev 6204)
@@ -50,8 +50,7 @@
#include <kcolorscheme.h>
#define CANCEL_TWO_CLICK_RENAME {singleClicked = false;renameTimer.stop();}
-#define PROPS static_cast<KrBriefViewProperties*>(_properties)
-#define MAX_COLS 5
+#define PROPS _properties
#define VF getVfile()
#define BRIEFVIEW_ID 1
@@ -970,54 +969,6 @@
connect(this, SIGNAL(selectionChanged()), _operator, SLOT(emitSelectionChanged()));
}
-void KrBriefView::initProperties() {
- // TODO: move this to a general location, maybe KrViewProperties constructor ?
- _properties = new KrBriefViewProperties;
- _properties->filter = KrViewProperties::All;
- _properties->filterMask = KRQuery( "*" );
- KConfigGroup grpSvr( _config, "Look&Feel" );
- _properties->displayIcons = grpSvr.readEntry( "With Icons", _WithIcons );
- bool dirsByNameAlways = grpSvr.readEntry("Always sort dirs by name", false);
- _properties->sortMode = static_cast<KrViewProperties::SortSpec>( KrViewProperties::Name |
- KrViewProperties::DirsFirst |
- (dirsByNameAlways ? KrViewProperties::AlwaysSortDirsByName : 0) );
- if ( !grpSvr.readEntry( "Case Sensative Sort", _CaseSensativeSort ) )
- _properties->sortMode = static_cast<KrViewProperties::SortSpec>( _properties->sortMode |
- KrViewProperties::IgnoreCase );
- _properties->sortMethod = static_cast<KrViewProperties::SortMethod>(
- grpSvr.readEntry("Sort method", (int) _DefaultSortMethod) );
- _properties->humanReadableSize = grpSvr.readEntry("Human Readable Size", _HumanReadableSize);
- _properties->localeAwareCompareIsCaseSensitive = QString( "a" ).localeAwareCompare( "B" ) > 0; // see KDE bug #40131
-
- QStringList defaultAtomicExtensions;
- defaultAtomicExtensions += ".tar.gz";
- defaultAtomicExtensions += ".tar.bz2";
- defaultAtomicExtensions += ".tar.lzma";
- defaultAtomicExtensions += ".moc.cpp";
- QStringList atomicExtensions = grpSvr.readEntry("Atomic Extensions", defaultAtomicExtensions);
- for (QStringList::iterator i = atomicExtensions.begin(); i != atomicExtensions.end(); )
- {
- QString & ext = *i;
- ext = ext.trimmed();
- if (!ext.length())
- {
- i = atomicExtensions.remove(i);
- continue;
- }
- if (!ext.startsWith("."))
- ext.insert(0, '.');
- ++i;
- }
- _properties->atomicExtensions = atomicExtensions;
-
- KConfigGroup group( _config, nameInKConfig() );
- PROPS->numberOfColumns = group.readEntry( "Number Of Brief Columns", _NumberOfBriefColumns );
- if( PROPS->numberOfColumns < 1 )
- PROPS->numberOfColumns = 1;
- else if( PROPS->numberOfColumns > MAX_COLS )
- PROPS->numberOfColumns = MAX_COLS;
-}
-
void KrBriefView::setColumnNr()
{
KMenu popup( this );
@@ -1025,7 +976,7 @@
int COL_ID = 14700;
- for( int i=1; i <= MAX_COLS; i++ )
+ for( int i=1; i <= MAX_BRIEF_COLS; i++ )
{
QAction *act = popup.addAction( QString( "%1" ).arg( i ) );
act->setData( QVariant( COL_ID + i ) );
@@ -1040,7 +991,7 @@
KConfigGroup group( krConfig, nameInKConfig() );
- if( result > COL_ID && result <= COL_ID + MAX_COLS )
+ if( result > COL_ID && result <= COL_ID + MAX_BRIEF_COLS )
{
group.writeEntry( "Number Of Brief Columns", result - COL_ID );
PROPS->numberOfColumns = result - COL_ID;
Modified: trunk/krusader_kde4/krusader/Panel/krbriefview.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krbriefview.h 2009-02-13 17:29:02 UTC (rev 6203)
+++ trunk/krusader_kde4/krusader/Panel/krbriefview.h 2009-02-14 13:57:06 UTC (rev 6204)
@@ -50,12 +50,6 @@
#include <QKeyEvent>
#include <QEvent>
-// extends KrViewProperties to add detailedview-only properties
-class KrBriefViewProperties: public KrViewProperties {
-public:
- int numberOfColumns; // the number of columns in the view
-};
-
class KrBriefViewItem;
class QDragMoveEvent;
class Q3Header;
@@ -103,7 +97,6 @@
protected:
virtual void setup();
- virtual void initProperties();
virtual void initOperator();
virtual KrViewItem *preAddItem(vfile * vf);
virtual bool preDelItem(KrViewItem * item );
Modified: trunk/krusader_kde4/krusader/Panel/krdetailedview.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krdetailedview.cpp 2009-02-13 17:29:02 UTC (rev 6203)
+++ trunk/krusader_kde4/krusader/Panel/krdetailedview.cpp 2009-02-14 13:57:06 UTC (rev 6204)
@@ -1070,43 +1070,10 @@
}
void KrDetailedView::initProperties() {
- _properties = new KrDetailedViewProperties;
- KConfigGroup grpSvr( _config, "Look&Feel" );
+ KrView::initProperties();
+
for (int i=0; i<KrDetailedViewProperties::MAX_COLUMNS;++i)
PROPS->column[i]=-1;
- PROPS->displayIcons = grpSvr.readEntry( "With Icons", _WithIcons );
- bool dirsByNameAlways = grpSvr.readEntry("Always sort dirs by name", false);
- PROPS->sortMode = static_cast<KrViewProperties::SortSpec>( KrViewProperties::Name |
- KrViewProperties::DirsFirst |
- (dirsByNameAlways ? KrViewProperties::AlwaysSortDirsByName : 0) );
- PROPS->numericPermissions = grpSvr.readEntry("Numeric permissions", _NumericPermissions);
- if ( !grpSvr.readEntry( "Case Sensative Sort", _CaseSensativeSort ) )
- PROPS->sortMode = static_cast<KrViewProperties::SortSpec>( _properties->sortMode |
- KrViewProperties::IgnoreCase );
- PROPS->sortMethod = static_cast<KrViewProperties::SortMethod>(
- grpSvr.readEntry("Sort method", (int) _DefaultSortMethod) );
- PROPS->humanReadableSize = grpSvr.readEntry("Human Readable Size", _HumanReadableSize);
- PROPS->localeAwareCompareIsCaseSensitive = QString( "a" ).localeAwareCompare( "B" ) > 0; // see KDE bug #40131
- QStringList defaultAtomicExtensions;
- defaultAtomicExtensions += ".tar.gz";
- defaultAtomicExtensions += ".tar.bz2";
- defaultAtomicExtensions += ".tar.lzma";
- defaultAtomicExtensions += ".moc.cpp";
- QStringList atomicExtensions = grpSvr.readEntry("Atomic Extensions", defaultAtomicExtensions);
- for (QStringList::iterator i = atomicExtensions.begin(); i != atomicExtensions.end(); )
- {
- QString & ext = *i;
- ext = ext.trimmed();
- if (!ext.length())
- {
- i = atomicExtensions.remove(i);
- continue;
- }
- if (!ext.startsWith("."))
- ext.insert(0, '.');
- ++i;
- }
- PROPS->atomicExtensions = atomicExtensions;
}
void KrDetailedView::selectColumns()
Modified: trunk/krusader_kde4/krusader/Panel/krdetailedview.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krdetailedview.h 2009-02-13 17:29:02 UTC (rev 6203)
+++ trunk/krusader_kde4/krusader/Panel/krdetailedview.h 2009-02-14 13:57:06 UTC (rev 6204)
@@ -55,16 +55,13 @@
class KrDetailedViewProperties: public KrViewProperties {
public:
enum ColumnType { Unused = -1, Name = 0x0, Extension = 0x1, Mime = 0x2, Size = 0x3, DateTime = 0x4,
- Permissions = 0x5, KrPermissions = 0x6, Owner = 0x7, Group = 0x8 };
+ Permissions = 0x5, KrPermissions = 0x6, Owner = 0x7, Group = 0x8 };
static const int MAX_COLUMNS = 9;
- int column[ MAX_COLUMNS ]; // column[ColumnType] contains the number of the requested column.
+ int column[ MAX_COLUMNS ]; // column[ColumnType] contains the number of the requested column.
// This is used by column() and whenever item uses text() or setText()
- bool numericPermissions; // show full permission column as octal numbers
-
- KrDetailedViewProperties() {
+
+ KrDetailedViewProperties() : KrViewProperties() {
for ( int i = 0; i < MAX_COLUMNS; i++ ) column[i] = Unused;
- filter = KrViewProperties::All;
- filterMask = KRQuery( "*" );
}
};
@@ -118,6 +115,7 @@
protected:
virtual void setup();
+ virtual KrViewProperties * createViewProperties() { return new KrDetailedViewProperties(); }
virtual void initProperties();
virtual void initOperator();
virtual KrViewItem *preAddItem(vfile *vf);
Modified: trunk/krusader_kde4/krusader/Panel/krinterview.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-13 17:29:02 UTC (rev 6203)
+++ trunk/krusader_kde4/krusader/Panel/krinterview.cpp 2009-02-14 13:57:06 UTC (rev 6204)
@@ -3,6 +3,7 @@
#include "krviewitem.h"
#include "krvfsmodel.h"
#include "../VFS/krpermhandler.h"
+#include "../defaults.h"
#include <klocale.h>
#include <kdirlister.h>
#include <QDir>
@@ -74,6 +75,7 @@
KrInterView::~KrInterView()
{
+ _model->setProperties( 0 );
delete _properties;
_properties = 0;
delete _operator;
@@ -272,8 +274,8 @@
void KrInterView::initProperties()
{
- _properties = new KrViewProperties();
-
+ KrView::initProperties();
+ _model->setProperties( _properties );
}
void KrInterView::initOperator()
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-13 17:29:02 UTC (rev 6203)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.cpp 2009-02-14 13:57:06 UTC (rev 6204)
@@ -1,6 +1,7 @@
#include "krvfsmodel.h"
#include "../VFS/vfs.h"
#include "../VFS/vfile.h"
+#include "krview.h"
#include <QtDebug>
KrVfsModel::KrVfsModel(): QAbstractListModel(0), _vfs(0) {}
@@ -47,15 +48,38 @@
if (index.row() >= rowCount())
return QVariant();
-
- if (role != Qt::DisplayRole)
+ vfile *vf = _vfiles.at(index.row());
+ if( vf == 0 )
return QVariant();
- switch (index.column()) {
- case 0: return (_vfiles.at(index.row()))->vfile_getName();
- case 1: return ("<ext>");
- case 2: return (_vfiles.at(index.row()))->vfile_getSize();
- default: return QString();
+ switch( role )
+ {
+ case Qt::DisplayRole:
+ {
+ switch (index.column()) {
+ case 0: return vf->vfile_getName();
+ case 1: return ("<ext>");
+ case 2: return vf->vfile_getSize();
+ default: return QString();
+ }
+ return QVariant();
+ }
+ case Qt::DecorationRole:
+ {
+ switch (index.column() ) {
+ case 0:
+ {
+ if( _properties && _properties->displayIcons )
+ return KrView::getIcon( vf );
+ break;
+ }
+ default:
+ break;
+ }
+ return QVariant();
+ }
+ default:
+ return QVariant();
}
}
Modified: trunk/krusader_kde4/krusader/Panel/krvfsmodel.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-13 17:29:02 UTC (rev 6203)
+++ trunk/krusader_kde4/krusader/Panel/krvfsmodel.h 2009-02-14 13:57:06 UTC (rev 6204)
@@ -6,6 +6,7 @@
class vfs;
class vfile;
+class KrViewProperties;
class KrVfsModel: public QAbstractListModel {
Q_OBJECT
@@ -21,10 +22,12 @@
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+ void setProperties( KrViewProperties * props ) { _properties = props; }
protected:
vfs *_vfs;
QVector<vfile*> _vfiles;
+ KrViewProperties * _properties;
};
#endif // __krvfsmodel__
Modified: trunk/krusader_kde4/krusader/Panel/krview.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krview.cpp 2009-02-13 17:29:02 UTC (rev 6203)
+++ trunk/krusader_kde4/krusader/Panel/krview.cpp 2009-02-14 13:57:06 UTC (rev 6204)
@@ -206,6 +206,53 @@
setup();
}
+void KrView::initProperties()
+{
+ _properties = createViewProperties();
+
+ KConfigGroup grpSvr( _config, "Look&Feel" );
+ _properties->displayIcons = grpSvr.readEntry( "With Icons", _WithIcons );
+ bool dirsByNameAlways = grpSvr.readEntry("Always sort dirs by name", false);
+ _properties->sortMode = static_cast<KrViewProperties::SortSpec>( KrViewProperties::Name |
+ KrViewProperties::DirsFirst |
+ (dirsByNameAlways ? KrViewProperties::AlwaysSortDirsByName : 0) );
+ _properties->numericPermissions = grpSvr.readEntry("Numeric permissions", _NumericPermissions);
+ if ( !grpSvr.readEntry( "Case Sensative Sort", _CaseSensativeSort ) )
+ _properties->sortMode = static_cast<KrViewProperties::SortSpec>( _properties->sortMode |
+ KrViewProperties::IgnoreCase );
+ _properties->sortMethod = static_cast<KrViewProperties::SortMethod>(
+ grpSvr.readEntry("Sort method", (int) _DefaultSortMethod) );
+ _properties->humanReadableSize = grpSvr.readEntry("Human Readable Size", _HumanReadableSize);
+ _properties->localeAwareCompareIsCaseSensitive = QString( "a" ).localeAwareCompare( "B" ) > 0; // see KDE bug #40131
+ QStringList defaultAtomicExtensions;
+ defaultAtomicExtensions += ".tar.gz";
+ defaultAtomicExtensions += ".tar.bz2";
+ defaultAtomicExtensions += ".tar.lzma";
+ defaultAtomicExtensions += ".moc.cpp";
+ QStringList atomicExtensions = grpSvr.readEntry("Atomic Extensions", defaultAtomicExtensions);
+ for (QStringList::iterator i = atomicExtensions.begin(); i != atomicExtensions.end(); )
+ {
+ QString & ext = *i;
+ ext = ext.trimmed();
+ if (!ext.length())
+ {
+ i = atomicExtensions.erase(i);
+ continue;
+ }
+ if (!ext.startsWith("."))
+ ext.insert(0, '.');
+ ++i;
+ }
+ _properties->atomicExtensions = atomicExtensions;
+
+ KConfigGroup group( _config, nameInKConfig() );
+ _properties->numberOfColumns = group.readEntry( "Number Of Brief Columns", _NumberOfBriefColumns );
+ if( _properties->numberOfColumns < 1 )
+ _properties->numberOfColumns = 1;
+ else if( _properties->numberOfColumns > MAX_BRIEF_COLS )
+ _properties->numberOfColumns = MAX_BRIEF_COLS;
+}
+
QPixmap KrView::getIcon( vfile *vf /*, KRListItem::cmpColor color*/ )
{
// KConfigGroup ag( krConfig, "Advanced");
Modified: trunk/krusader_kde4/krusader/Panel/krview.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-13 17:29:02 UTC (rev 6203)
+++ trunk/krusader_kde4/krusader/Panel/krview.h 2009-02-14 13:57:06 UTC (rev 6204)
@@ -42,6 +42,9 @@
#include <kdebug.h>
+#define MAX_BRIEF_COLS 5
+
+
class KrView;
class KrViewItem;
class KrQuickSearch;
@@ -57,13 +60,20 @@
// Every property that the item needs to know about the view must be here!
class KrViewProperties {
public:
+ KrViewProperties() {
+ filter = KrViewProperties::All;
+ filterMask = KRQuery( "*" );
+ }
+
enum SortSpec { Name=0x1, Ext=0x2, Size=0x4, Type=0x8, Modified=0x10, Permissions=0x20,
- KrPermissions=0x40, Owner=0x80, Group=0x100, Descending=0x200,
- DirsFirst=0x400, IgnoreCase=0x800, AlwaysSortDirsByName=0x1000 };
+ KrPermissions=0x40, Owner=0x80, Group=0x100, Descending=0x200,
+ DirsFirst=0x400, IgnoreCase=0x800, AlwaysSortDirsByName=0x1000 };
enum SortMethod { Alphabetical=0x1, AlphabeticalNumbers=0x2,
CharacterCode=0x4, CharacterCodeNumbers=0x8, Krusader=0x10 };
enum FilterSpec { Dirs=0x1, Files=0x2, All=0x3, Custom=0x4, ApplyToDirs=0x8 };
+ bool numericPermissions; // show full permission column as octal numbers
+
bool displayIcons; // true if icons should be displayed in this view
SortSpec sortMode; // sort specifications
SortMethod sortMethod; // sort method for names and extensions
@@ -72,6 +82,7 @@
bool localeAwareCompareIsCaseSensitive; // mostly, it is not! depends on LC_COLLATE
bool humanReadableSize; // display size as KB, MB or just as a long number
QStringList atomicExtensions; // list of strings, which will be treated as one extension. Must start with a dot.
+ int numberOfColumns; // the number of columns in the brief view
};
// operator can handle two ways of doing things:
@@ -169,7 +180,8 @@
virtual void init();
protected:
- virtual void initProperties() { qFatal("Please implement your own initProperties() method"); }
+ virtual void initProperties();
+ virtual KrViewProperties * createViewProperties() { return new KrViewProperties(); }
virtual void initOperator() { qFatal("Please implement your own initOperator() method"); }
virtual void setup() { qFatal("Please implement your own setup() method"); }
@@ -253,9 +265,10 @@
// todo: what about selection modes ???
virtual ~KrView();
+ static QPixmap getIcon(vfile *vf);
+
protected:
KrView(KConfig *cfg = krConfig);
- static QPixmap getIcon(vfile *vf);
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: <des...@us...> - 2009-02-13 17:29:09
|
Revision: 6203
http://krusader.svn.sourceforge.net/krusader/?rev=6203&view=rev
Author: deschler
Date: 2009-02-13 17:29:02 +0000 (Fri, 13 Feb 2009)
Log Message:
-----------
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-02-13 17:27:17 UTC (rev 6202)
+++ trunk/krusader_kde4/ChangeLog 2009-02-13 17:29:02 UTC (rev 6203)
@@ -23,7 +23,7 @@
CHANGED: Initial Konfigurator size is now 900x680
- I18N: Updated French translation (thanks to Henry-Nicolas Tourneur)
+ 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" )
I18N: Updated Hungarian translation
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <des...@us...> - 2009-02-13 17:27:30
|
Revision: 6202
http://krusader.svn.sourceforge.net/krusader/?rev=6202&view=rev
Author: deschler
Date: 2009-02-13 17:27:17 +0000 (Fri, 13 Feb 2009)
Log Message:
-----------
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-02-13 17:25:17 UTC (rev 6201)
+++ trunk/krusader_kde4/ChangeLog 2009-02-13 17:27:17 UTC (rev 6202)
@@ -23,6 +23,7 @@
CHANGED: Initial Konfigurator size is now 900x680
+ I18N: Updated French translation (thanks to Henry-Nicolas Tourneur)
I18N: Updated Catalan translation (thanks to Joaquim Perez)
I18N: Updated Slovak translation (thanks to Zdenko Podobný and Ondrej Pačay "Yogi" )
I18N: Updated Hungarian translation
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <des...@us...> - 2009-02-13 17:25:25
|
Revision: 6201
http://krusader.svn.sourceforge.net/krusader/?rev=6201&view=rev
Author: deschler
Date: 2009-02-13 17:25:17 +0000 (Fri, 13 Feb 2009)
Log Message:
-----------
Update by Henry-Nicolas Tourneur
Modified Paths:
--------------
trunk/krusader_kde4/po/fr.po
Modified: trunk/krusader_kde4/po/fr.po
===================================================================
--- trunk/krusader_kde4/po/fr.po 2009-02-08 23:25:18 UTC (rev 6200)
+++ trunk/krusader_kde4/po/fr.po 2009-02-13 17:25:17 UTC (rev 6201)
@@ -10,14 +10,14 @@
# Guillerm David <dgu...@gm...>, 2005, 2006.
# Tourneur Henry-Nicolas <hen...@to...>, 2007, 2008.
# Henry-Nicolas Tourneur <hen...@to...>, 2008.
-# Stanislas Zeller <unc...@gm...>, 2008.
+# Stanislas Zeller <unc...@gm...>, 2008, 2009.
msgid ""
msgstr ""
"Project-Id-Version: krusader-2.0.0-beta2\n"
-"Report-Msgid-Bugs-To: kru...@go...\n"
+"Report-Msgid-Bugs-To: krusader-i18n <kru...@go...>\n"
"POT-Creation-Date: 2008-12-05 21:44+0100\n"
-"PO-Revision-Date: 2008-11-04 17:51+0100\n"
-"Last-Translator: Tourneur Henry-Nicolas <hen...@to...>\n"
+"PO-Revision-Date: 2009-02-10 10:23+0100\n"
+"Last-Translator: Stanislas Zeller <unc...@gm...>\n"
"Language-Team: krusader-i18n <kru...@go...>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -173,8 +173,7 @@
#: GUI/mediabutton.cpp:423
#, kde-format
msgid "An error occurred while accessing '%1', the system responded: %2"
-msgstr ""
-"Une erreur est survenue lors de l'accès à « %1 », le système a répondu : %2"
+msgstr "Une erreur est survenue lors de l'accès à « %1 », le système a répondu : %2"
#: GUI/mediabutton.cpp:426
#, kde-format
@@ -227,7 +226,7 @@
#: GUI/kfnkeys.cpp:50
#, kde-format
msgid "F2 Term "
-msgstr "F2 Console "
+msgstr "F2 Terminal "
#: GUI/kfnkeys.cpp:51
#, kde-format
@@ -235,8 +234,8 @@
"<p>Open terminal in current directory.</p><p>The terminal can be defined in "
"Konfigurator, default is <b>konsole</b>.</p>"
msgstr ""
-"<p>Ouvre une console dans le dossier courant.</p><p>Vous pouvez définir le "
-"type de console dans Konfigurator, par défaut c'est <b>Konsole</b>.</p>"
+"<p>Ouvre un terminal dans le dossier courant.</p><p>Vous pouvez définir le "
+"type de terminal dans Konfigurator, par défaut c'est <b>Konsole</b>.</p>"
#: GUI/kfnkeys.cpp:57
#, kde-format
@@ -285,7 +284,7 @@
#: GUI/kfnkeys.cpp:79
#, kde-format
msgid "F7 Mkdir "
-msgstr "F7 Créer Rép."
+msgstr "F7 Créer Dossier"
#: GUI/kfnkeys.cpp:80
#, kde-format
@@ -325,7 +324,7 @@
#: GUI/kfnkeys.cpp:121
#, kde-format
msgid " Term"
-msgstr " Console"
+msgstr " Terminal"
#: GUI/kfnkeys.cpp:122
#, kde-format
@@ -350,7 +349,7 @@
#: GUI/kfnkeys.cpp:126
#, kde-format
msgid " Mkdir"
-msgstr " Créer Rép."
+msgstr " Créer Dossier"
#: GUI/kfnkeys.cpp:127
#, kde-format
@@ -497,8 +496,7 @@
#: VFS/virt_vfs.cpp:180
#, kde-format
msgid "Creating new directories is allowed only in the 'virt:/' directory."
-msgstr ""
-"La création de nouveaux dossiers n'est permise que dans le dossier « virt:/ »."
+msgstr "La création de nouveaux dossiers n'est permise que dans le dossier « virt:/ »."
#: VFS/kiojobwrapper.cpp:185 Konfigurator/krresulttable.cpp:308
#, kde-format
@@ -521,9 +519,9 @@
msgstr "Déplacer"
#: VFS/kiojobwrapper.cpp:220
-#, fuzzy, kde-format
+#, kde-format
msgid "Target"
-msgstr "Tar"
+msgstr "Cible"
#: VFS/krquery.cpp:159 Filter/generalfilter.cpp:142
#: Konfigurator/konfigurator.cpp:159
@@ -740,7 +738,7 @@
#: Filter/generalfilter.cpp:113
#, kde-format
msgid "Search &for:"
-msgstr "Chercher &pour :"
+msgstr "Rechercher &pour :"
#: Filter/generalfilter.cpp:126 Synchronizer/synchronizergui.cpp:1177
#, kde-format
@@ -1103,8 +1101,7 @@
#: UserAction/expander.cpp:58
#, kde-format
msgid "Needed panel specification missing in expander %1"
-msgstr ""
-"Les spécifications nécessaires au panneau sont manquantes dans l'extenseur %1"
+msgstr "Les spécifications nécessaires au panneau sont manquantes dans l'extenseur %1"
#: UserAction/expander.cpp:73
#, kde-format
@@ -1136,8 +1133,7 @@
#: UserAction/expander.cpp:401
#, kde-format
msgid "Expander: Bad argument to Count: %1 is not valid item specifier"
-msgstr ""
-"Extenseur : mauvais argument à Count : %1 n'est pas une valeur valable."
+msgstr "Extenseur : mauvais argument à Count : %1 n'est pas une valeur valable."
#: UserAction/expander.cpp:410
#, kde-format
@@ -1270,8 +1266,7 @@
#: UserAction/expander.cpp:648
#, kde-format
msgid "Append to current clipboard content with this separator (optional):"
-msgstr ""
-"Ajouter au contenu courant du presse-papiers avec ce séparateur (optionnel) :"
+msgstr "Ajouter au contenu courant du presse-papiers avec ce séparateur (optionnel) :"
#: UserAction/expander.cpp:653
#, kde-format
@@ -1281,8 +1276,7 @@
#: UserAction/expander.cpp:659
#, kde-format
msgid "Expander: %Each% may not be in the second argument of %Clipboard%"
-msgstr ""
-"Extenseur : %Each% ne devrait pas être le second argument de %Clipboard%"
+msgstr "Extenseur : %Each% ne devrait pas être le second argument de %Clipboard%"
#: UserAction/expander.cpp:672
#, kde-format
@@ -1307,7 +1301,7 @@
#: UserAction/expander.cpp:697
#, kde-format
msgid "Expander: invalid URL's in %_Copy(\"src\", \"dest\")%"
-msgstr "Extenseur : URL non valable dans %_Copy(« src »,« dest »)%"
+msgstr "Extenseur : URL non valable dans %_Copy(« src »,« dest »)%"
#: UserAction/expander.cpp:708
#, kde-format
@@ -1337,7 +1331,7 @@
#: UserAction/expander.cpp:733
#, kde-format
msgid "Expander: invalid URL's in %_Move(\"src\", \"dest\")%"
-msgstr "Extenseur : URL non valable dans %Move(« src », « dest »)%"
+msgstr "Extenseur : URL non valable dans %Move(« src », « dest »)%"
#: UserAction/expander.cpp:744
#, kde-format
@@ -1373,8 +1367,7 @@
#: UserAction/expander.cpp:787
#, kde-format
msgid "Expander: no profile specified for %_Profile(profile)%; abort..."
-msgstr ""
-"Extenseur : pas de profile spécifié pour %_Profile(profile); annulation..."
+msgstr "Extenseur : pas de profile spécifié pour %_Profile(profile); annulation..."
#: UserAction/expander.cpp:798
#, kde-format
@@ -1457,7 +1450,7 @@
#: UserAction/expander.cpp:1016
#, kde-format
msgid "Which file to view (normally '%aCurrent%'):"
-msgstr "Quel fichier à afficher (normalement « %Current% ») :"
+msgstr "Quel fichier à afficher (normalement « %Current% ») :"
#: UserAction/expander.cpp:1017
#, kde-format
@@ -1482,8 +1475,7 @@
#: UserAction/expander.cpp:1082
#, kde-format
msgid "Expander: Bad panel specifier %1 in placeholder %2"
-msgstr ""
-"Extenseur : mauvaise spécification pour le panneau %1 dans l'emplacement %2"
+msgstr "Extenseur : mauvaise spécification pour le panneau %1 dans l'emplacement %2"
#: UserAction/expander.cpp:1111
#, kde-format
@@ -1617,8 +1609,7 @@
#: UserAction/kraction.cpp:224
#, kde-format
-msgid ""
-"Embedded terminal emulator does not work, using output collection instead."
+msgid "Embedded terminal emulator does not work, using output collection instead."
msgstr ""
"L'émulateur de terminal amélioré ne fonctionne pas, utilisation du ramasseur "
"de sortie à la place."
@@ -1803,8 +1794,7 @@
#: Panel/listpanel.cpp:654
#, kde-format
msgid "No space information on non-local filesystems"
-msgstr ""
-"Pas d'informations d'espace disque sur les systèmes de fichiers distants"
+msgstr "Pas d'informations d'espace disque sur les systèmes de fichiers distants"
#: Panel/listpanel.cpp:661
#, kde-format
@@ -1964,8 +1954,7 @@
#: Panel/panelpopup.cpp:270
#, kde-format
msgid "Tree Panel: a tree view of the local file system"
-msgstr ""
-"Panneau hiérarchique : une vue hiérarchique du système de fichiers locaux"
+msgstr "Panneau hiérarchique : une vue hiérarchique du système de fichiers locaux"
#: Panel/panelpopup.cpp:278
#, kde-format
@@ -2195,7 +2184,7 @@
#: Panel/krpopupmenu.cpp:232
#, kde-format
msgid "Text File..."
-msgstr "Fichiers textes..."
+msgstr "Fichier texte..."
#: Panel/krpopupmenu.cpp:236
#, kde-format
@@ -2205,14 +2194,12 @@
#: Panel/panelfunc.cpp:277
#, kde-format
msgid "You can edit links only on local file systems"
-msgstr ""
-"Vous ne pouvez éditer de liens que dans les systèmes de fichiers locaux"
+msgstr "Vous ne pouvez éditer de liens que dans les systèmes de fichiers locaux"
#: Panel/panelfunc.cpp:288
#, kde-format
msgid "The current file is not a link, so I can't redirect it."
-msgstr ""
-"Le fichier courant n'est pas un lien, alors la redirection est impossible."
+msgstr "Le fichier courant n'est pas un lien, alors la redirection est impossible."
#: Panel/panelfunc.cpp:295
#, kde-format
@@ -2353,8 +2340,7 @@
msgid_plural ""
"Do you really want to delete these %1 virtual items (physical files stay "
"untouched)?"
-msgstr[0] ""
-"Voulez-vous vraiment effacer cet élément virtuel (l'élément physique reste) ?"
+msgstr[0] "Voulez-vous vraiment effacer cet élément virtuel (l'élément physique reste) ?"
msgstr[1] ""
"Voulez-vous vraiment effacer ces %1 éléments virtuels (les éléments "
"physiques restent) ?"
@@ -2496,94 +2482,94 @@
"papiers !"
#: Queue/queuewidget.cpp:128 Queue/queuedialog.cpp:156
-#, fuzzy, kde-format
+#, kde-format
msgid "Queue Manager"
-msgstr "Demander le nom"
+msgstr "Gestionnaire de file d'attente"
#: Queue/queuewidget.cpp:144
#, kde-format
msgid "Deleting this job will abort the pending job. Do you wish to continue?"
-msgstr ""
+msgstr "Supprimer ce travail va arrêter le travail en cours. Voulez-vous vraiment continuer ?"
#: Queue/queue_mgr.cpp:9
-#, fuzzy, kde-format
+#, kde-format
msgid "default"
-msgstr "Par défaut"
+msgstr "par défaut"
#: Queue/queuedialog.cpp:103 Queue/queuedialog.cpp:134
#: Queue/queuedialog.cpp:389
-#, fuzzy, kde-format
+#, kde-format
msgid "Krusader::Queue Manager"
-msgstr "Krusader::File d'attente"
+msgstr "Krusader::Gestionnaire de file d'attente"
#: Queue/queuedialog.cpp:110
-#, fuzzy, kde-format
+#, kde-format
msgid "Please enter the time to start processing the queue:"
-msgstr "Saisissez la nouvelle cible du lien : "
+msgstr "Veuillez saisir l'heure de démarrage du processus de file d'attente : "
#: Queue/queuedialog.cpp:179
-#, fuzzy, kde-format
+#, kde-format
msgid "Create a new queue (Ctrl+T)"
-msgstr "Créer un nouveau lien vers : "
+msgstr "Créer une nouvelle file d'attente (Ctrl+T)"
#: Queue/queuedialog.cpp:185
-#, fuzzy, kde-format
+#, kde-format
msgid "Remove the current queue (Ctrl+W)"
-msgstr "enregistrer la sélection courante"
+msgstr "Supprimer la file d'attente courante (Ctrl+W)"
#: Queue/queuedialog.cpp:198 Queue/queuedialog.cpp:427
-#, fuzzy, kde-format
+#, kde-format
msgid "unused"
-msgstr "Suspendre"
+msgstr "inutilisé"
#: Queue/queuedialog.cpp:204
#, kde-format
msgid "Schedule queue starting (Ctrl+S)"
-msgstr ""
+msgstr "Programmer le démarrage de la file d'attente (Ctrl+S)"
#: Queue/queuedialog.cpp:343
#, kde-format
msgid "Start processing the queue (Ctrl+P)"
-msgstr ""
+msgstr "Démarrer la gestion de la file d'attente (Ctrl+P)"
#: Queue/queuedialog.cpp:346
#, kde-format
msgid "The queue is paused."
-msgstr ""
+msgstr "La file d'attente est en mode pause."
#: Queue/queuedialog.cpp:348
#, kde-format
msgid "Scheduled to start at %1."
-msgstr ""
+msgstr "Programmé pour démarrer à %1."
#: Queue/queuedialog.cpp:351
#, kde-format
msgid "The queue is running."
-msgstr ""
+msgstr "La file d'attente est en cours d'exécution."
#: Queue/queuedialog.cpp:353
#, kde-format
msgid "Pause processing the queue (Ctrl+P)"
-msgstr ""
+msgstr "Mettre en pause la file d'attente (Ctrl+P)"
#: Queue/queuedialog.cpp:390
-#, fuzzy, kde-format
+#, kde-format
msgid "Please enter the name of the new queue"
-msgstr "Veuillez définir un nom unique pour cette action"
+msgstr "Veuillez saisir le nom de cette nouvelle file d'attente"
#: Queue/queuedialog.cpp:399
#, kde-format
msgid "A queue already exists with this name!"
-msgstr ""
+msgstr "Une file d'attente existe toujours avec ce nom !"
#: Queue/queuedialog.cpp:411
-#, fuzzy, kde-format
+#, kde-format
msgid ""
"Deleting the queue requires aborting all pending jobs. Do you wish to "
"continue?"
msgstr ""
-"Se déplacer dans le dossier parent implique le chargement du contenu de « %"
-"1 ». Voulez-vous continuer ?"
+"Supprimer la file d'attente requiert d'annuler tous les travaux en cours. Voulez-vous "
+"vraiment continuer ?"
#: Queue/queue.cpp:66
#, kde-format
@@ -2698,9 +2684,9 @@
msgstr "Édition (F4)"
#: Locate/locate.cpp:396 Search/krsearchdialog.cpp:626
-#, fuzzy, kde-format
+#, kde-format
msgid "Compare by content (F10)"
-msgstr "Comparer par contenu"
+msgstr "Comparer par contenu (F10)"
#: Locate/locate.cpp:401
#, kde-format
@@ -3013,7 +2999,7 @@
#: krusader.cpp:735
#, kde-format
msgid "&Queue Manager..."
-msgstr ""
+msgstr "&Gestionnaire de file d'attente..."
#: krusader.cpp:736
#, kde-format
@@ -3184,14 +3170,14 @@
msgstr "Éditer le fichier"
#: krusader.cpp:785
-#, fuzzy, kde-format
+#, kde-format
msgid "Copy by queue..."
-msgstr "Copier..."
+msgstr "Copier par file d'attente..."
#: krusader.cpp:786
-#, fuzzy, kde-format
+#, kde-format
msgid "Move by queue..."
-msgstr "Déplacer..."
+msgstr "Déplacer par file d'attente..."
#: krusader.cpp:787
#, kde-format
@@ -3266,7 +3252,7 @@
#: krusader.cpp:810
#, kde-format
msgid "JavaScript Console..."
-msgstr "Console Javascript..."
+msgstr "Terminal Javascript..."
#: krusader.cpp:962
#, kde-format
@@ -3276,8 +3262,7 @@
#: KViewer/panelviewer.cpp:33
#, kde-format
msgid "No file selected or selected file can't be displayed."
-msgstr ""
-"Pas de fichier sélectionné ou impossible d'afficher le fichier sélectionné."
+msgstr "Pas de fichier sélectionné ou impossible d'afficher le fichier sélectionné."
#: KViewer/panelviewer.cpp:170 KViewer/krviewer.cpp:694
#, kde-format
@@ -3297,7 +3282,7 @@
#: KViewer/krviewer.cpp:86
#, kde-format
msgid "&Hex viewer"
-msgstr "Afficheur &hex"
+msgstr "Afficheur &hexadécimal"
#: KViewer/krviewer.cpp:88
#, kde-format
@@ -3652,8 +3637,7 @@
#: MountMan/kmountmangui.cpp:364
#, kde-format
-msgid ""
-"MountMan has an internal error. Please notify the developers. Thank you."
+msgid "MountMan has an internal error. Please notify the developers. Thank you."
msgstr ""
"Mountman a reporté une erreur interne. Veuillez le signaler aux "
"développeurs. Merci."
@@ -3724,14 +3708,12 @@
msgstr "Heiner Eichmann"
#: main.cpp:119
-#, fuzzy
msgid "Jonas Bähr"
-msgstr "Jonas Baehr"
+msgstr "Jonas Bähr"
#: main.cpp:120 main.cpp:125
-#, fuzzy
msgid "Václav Jůza"
-msgstr "Václav Juza"
+msgstr "Václav Jůza"
#: main.cpp:121 main.cpp:154
msgid "Dirk Eschler"
@@ -3762,7 +3744,6 @@
msgstr "Matej Urbancic"
#: main.cpp:124
-#, fuzzy
msgid "Marketing & Product Research"
msgstr "Marketing et recherche produit"
@@ -3771,14 +3752,12 @@
msgstr "AQ, résolution de bogues, patches et aide générale"
#: main.cpp:126
-#, fuzzy
msgid "Jiří Paleček"
-msgstr "Jiri Palecek"
+msgstr "Jiří Paleček"
#: main.cpp:127
-#, fuzzy
msgid "Jiří Klement"
-msgstr "Jiri Klement"
+msgstr "Jiří Klement"
#: main.cpp:127
msgid "Important help in KDE 4 porting"
@@ -3825,9 +3804,8 @@
msgstr "L'ancien module de signet"
#: main.cpp:133
-#, fuzzy
msgid "Hans Löffler"
-msgstr "Hans Loeffler"
+msgstr "Hans Löffler"
#: main.cpp:133
msgid "Dir history button"
@@ -3890,9 +3868,8 @@
msgstr "Doutor Zero"
#: main.cpp:141
-#, fuzzy
msgid "Brazilian Portuguese translation"
-msgstr "Traduction Portugaise"
+msgstr "Traduction portugaise brésilienne"
#: main.cpp:142
msgid "Milen Ivanov"
@@ -3931,9 +3908,8 @@
msgstr "Martin Sixta"
#: main.cpp:147
-#, fuzzy
msgid "Vaclav Jůza"
-msgstr "Vaclav Juza"
+msgstr "Vaclav Jůza"
#: main.cpp:147
msgid "Czech translation"
@@ -4179,8 +4155,7 @@
#: krusaderview.cpp:95
#, kde-format
msgid "Function keys allow performing fast operations on files."
-msgstr ""
-"Les touches de fonctions permettent des opérations rapides sur des fichiers."
+msgstr "Les touches de fonctions permettent des opérations rapides sur des fichiers."
#: krusaderview.cpp:307
#, kde-format
@@ -4472,8 +4447,7 @@
#: Dialogs/krkeydialog.cpp:42
#, kde-format
msgid "Load a keybinding profile, e.g., total_commander.keymap"
-msgstr ""
-"Charger un profil de raccourcis clavier, par exemple total_commander.keymap"
+msgstr "Charger un profil de raccourcis clavier, par exemple total_commander.keymap"
#: Dialogs/krkeydialog.cpp:46
#, kde-format
@@ -4532,8 +4506,7 @@
#: Dialogs/krkeydialog.cpp:135
#, kde-format
-msgid ""
-"<qt>File <b>%1</b> already exists. Do you really want to overwrite it?</qt>"
+msgid "<qt>File <b>%1</b> already exists. Do you really want to overwrite it?</qt>"
msgstr ""
"<qt>Le fichier <b>%1</b> existe déjà.\n"
"Voulez-vous vraiment l'écraser ?</qt>"
@@ -4759,8 +4732,7 @@
#: Dialogs/checksumdlg.cpp:352
#, kde-format
msgid "About to verify checksum for the following files"
-msgstr ""
-"À propos de la vérification de la somme de contrôle des fichiers suivants"
+msgstr "À propos de la vérification de la somme de contrôle des fichiers suivants"
#: Dialogs/checksumdlg.cpp:367
#, kde-format
@@ -4930,8 +4902,7 @@
#: ActionMan/ui_actionproperty.h:616 rc.cpp:21
#, kde-format
msgid "Substitute the <b>Placeholders</b> with local filenames."
-msgstr ""
-"Substituer les <b>variables spéciales</b> avec les noms de fichiers locaux."
+msgstr "Substituer les <b>variables spéciales</b> avec les noms de fichiers locaux."
#. i18n: tag string
#. i18n: file ./ActionMan/actionproperty.ui line 86
@@ -5157,9 +5128,9 @@
#. i18n: tag string
#. i18n: file ./ActionMan/actionproperty.ui line 398
#: ActionMan/ui_actionproperty.h:722 rc.cpp:116
-#, fuzzy, kde-format
+#, kde-format
msgid "If checked, the action is shown in the Useractions menus."
-msgstr "Si non coché, l'action ne sera pas visible dans les menus."
+msgstr "Si coché, l'action est affichée dans les menus Actions Utilisateur."
#. i18n: tag string
#. i18n: file ./ActionMan/actionproperty.ui line 401
@@ -5187,8 +5158,7 @@
#: ActionMan/ui_actionproperty.h:735 rc.cpp:131
#, kde-format
msgid "Separate standard out and standard error in the output collection."
-msgstr ""
-"Séparer la sortie standard et la sortie erreur dans la collection de sortie."
+msgstr "Séparer la sortie standard et la sortie erreur dans la collection de sortie."
#. i18n: tag string
#. i18n: file ./ActionMan/actionproperty.ui line 436
@@ -5428,10 +5398,8 @@
#: ActionMan/useractionpage.cpp:134
#, kde-format
-msgid ""
-"The current action has been modified. Do you want to apply these changes?"
-msgstr ""
-"La page courante a été modifiée Voulez-vous appliquer ces modifications ?"
+msgid "The current action has been modified. Do you want to apply these changes?"
+msgstr "La page courante a été modifiée Voulez-vous appliquer ces modifications ?"
#: ActionMan/useractionpage.cpp:211
#, kde-format
@@ -5642,14 +5610,12 @@
#: Synchronizer/synchronizergui.cpp:1160
#, kde-format
msgid "The left base directory used during the synchronisation process."
-msgstr ""
-"Le dossier de base de gauche utilisé pendant le processus de synchronisation."
+msgstr "Le dossier de base de gauche utilisé pendant le processus de synchronisation."
#: Synchronizer/synchronizergui.cpp:1193
#, kde-format
msgid "The right base directory used during the synchronisation process."
-msgstr ""
-"Le dossier de base de droite utilisé pendant le processus de synchronisation."
+msgstr "Le dossier de base de droite utilisé pendant le processus de synchronisation."
#: Synchronizer/synchronizergui.cpp:1207
#, kde-format
@@ -5659,8 +5625,7 @@
#: Synchronizer/synchronizergui.cpp:1210
#, kde-format
msgid "Compare not only the base directories but their subdirectories as well."
-msgstr ""
-"Compare non seulement les dossiers de base mais aussi les sous-dossiers."
+msgstr "Compare non seulement les dossiers de base mais aussi les sous-dossiers."
#: Synchronizer/synchronizergui.cpp:1211
#, kde-format
@@ -5738,8 +5703,7 @@
#: Synchronizer/synchronizergui.cpp:1257
#, kde-format
msgid "Show files marked to <i>Copy from left to right</i> (CTRL+L)."
-msgstr ""
-"Lister les fichiers marqués pour la <i>copie de gauche à droite</i> (CTRL+L)."
+msgstr "Lister les fichiers marqués pour la <i>copie de gauche à droite</i> (CTRL+L)."
#: Synchronizer/synchronizergui.cpp:1267
#, kde-format
@@ -5754,8 +5718,7 @@
#: Synchronizer/synchronizergui.cpp:1287
#, kde-format
msgid "Show files marked to <i>Copy from right to left</i> (CTRL+R)."
-msgstr ""
-"Lister les fichiers marqués pour la <i>copie de droite à gauche</i> (CTRL+R)."
+msgstr "Lister les fichiers marqués pour la <i>copie de droite à gauche</i> (CTRL+R)."
#: Synchronizer/synchronizergui.cpp:1297
#, kde-format
@@ -6032,8 +5995,7 @@
#: Synchronizer/synchronizertask.cpp:314
#, kde-format
msgid "IO error at comparing file %1 with %2!"
-msgstr ""
-"Erreur d'entrées / sorties lors de la comparaison du fichier %1 avec %2 !"
+msgstr "Erreur d'entrées / sorties lors de la comparaison du fichier %1 avec %2 !"
#: Synchronizer/synchronizertask.cpp:350
#, kde-format
@@ -6778,8 +6740,7 @@
#: Konfigurator/kggeneral.cpp:214
#, kde-format
-msgid ""
-"Make sure to install new tools in your <code>$PATH</code> (e.g. /usr/bin)"
+msgid "Make sure to install new tools in your <code>$PATH</code> (e.g. /usr/bin)"
msgstr ""
"Soyez sûr d'installer les nouveaux outils dans votre <code>$PATH</code> (par "
"ex. : /usr/bin)"
@@ -6958,8 +6919,7 @@
#: Konfigurator/konfigurator.cpp:221
#, kde-format
msgid "The current page has been changed. Do you want to apply changes?"
-msgstr ""
-"La page courante a été modifiée. Voulez-vous appliquer ces modifications ?"
+msgstr "La page courante a été modifiée. Voulez-vous appliquer ces modifications ?"
#: Konfigurator/kglookfeel.cpp:83
#, kde-format
@@ -7049,8 +7009,7 @@
#: Konfigurator/kglookfeel.cpp:100
#, kde-format
msgid "Terminal is shown instead of the Krusader window (full screen)."
-msgstr ""
-"Le terminal est affichée à la place de la fenêtre Krusader (plein écran)"
+msgstr "Le terminal est affichée à la place de la fenêtre Krusader (plein écran)"
#: Konfigurator/kglookfeel.cpp:109
#, kde-format
@@ -7094,7 +7053,7 @@
#: Konfigurator/kglookfeel.cpp:177
#, kde-format
msgid "Panel font:"
-msgstr "Police du panneau : "
+msgstr "Police du panneau : "
#: Konfigurator/kglookfeel.cpp:191
#, kde-format
@@ -7104,7 +7063,7 @@
#: Konfigurator/kglookfeel.cpp:196
#, kde-format
msgid "12"
-msgstr ""
+msgstr "12"
#: Konfigurator/kglookfeel.cpp:197
#, kde-format
@@ -7187,27 +7146,27 @@
#: Konfigurator/kglookfeel.cpp:234
#, kde-format
msgid "Sort method:"
-msgstr ""
+msgstr "Trier par méthode"
#: Konfigurator/kglookfeel.cpp:238
#, kde-format
msgid "Alphabetical"
-msgstr ""
+msgstr "Alphabétique"
#: Konfigurator/kglookfeel.cpp:239
#, kde-format
msgid "Alphabetical and numbers"
-msgstr ""
+msgstr "Alphabétique et numéros"
#: Konfigurator/kglookfeel.cpp:240
-#, fuzzy, kde-format
+#, kde-format
msgid "Character code"
-msgstr "N'importe quel caractère"
+msgstr "Code de caractères"
#: Konfigurator/kglookfeel.cpp:241
#, kde-format
msgid "Character code and numbers"
-msgstr ""
+msgstr "Numéros et code de caractères"
#: Konfigurator/kglookfeel.cpp:253
#, kde-format
@@ -7294,8 +7253,7 @@
#: Konfigurator/kglookfeel.cpp:298
#, kde-format
msgid "Changes the panel directory to the root directory."
-msgstr ""
-"Modifie le dossier actuel par le dossier racine (superutilisateur ou / )."
+msgstr "Modifie le dossier actuel par le dossier racine (superutilisateur ou / )."
#: Konfigurator/kglookfeel.cpp:299
#, kde-format
@@ -7304,8 +7262,7 @@
#: Konfigurator/kglookfeel.cpp:299
#, kde-format
-msgid ""
-"Each directory change in the panel is also performed in the other panel."
+msgid "Each directory change in the panel is also performed in the other panel."
msgstr ""
"Chaque modification de dossier dans le panneau est aussi réalisée dans "
"l'autre panneau."
@@ -7369,19 +7326,18 @@
#: Konfigurator/kglookfeel.cpp:341
#, kde-format
msgid "Ergonomic Mode"
-msgstr ""
+msgstr "Mode ergonomique"
#: 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 ""
-"Le bouton gauche ne sélectionne pas, mais définit le fichier comme courant "
-"sans l'ajouter à la sélection courante. Le bouton droit sélectionne "
-"plusieurs fichiers et le menu contextuel est invoqué par le bouton droit "
-"(appui long)."
+"Le bouton gauche ne sélectionne pas, mais définit le fichier courant "
+"sans affecter la sélection courante. Le bouton droit invoque le menu "
+"contextuel. Vous pouvez sélectionner avec la touche Ctrl et le bouton gauche."
#: Konfigurator/kglookfeel.cpp:342
#, kde-format
@@ -7424,7 +7380,7 @@
"Mouse</i></p>"
msgstr ""
"<p>Utiliser les configurations globales de KDE : </p><p><i>Centre de "
-"Contrôle de KDE / Clavier & Souris / Souris</i></p>"
+"Contrôle de KDE / Clavier &Souris / Souris</i></p>"
#: Konfigurator/kglookfeel.cpp:375
#, kde-format
@@ -7625,8 +7581,7 @@
#: Konfigurator/kgadvanced.cpp:80
#, kde-format
msgid "Request user confirmation for the following operations:"
-msgstr ""
-"Demande d'une confirmation utilisateur pour les opérations suivantes : "
+msgstr "Demande d'une confirmation utilisateur pour les opérations suivantes : "
#: Konfigurator/kgadvanced.cpp:85
#, kde-format
@@ -8308,8 +8263,7 @@
#: Konfigurator/kgstartup.cpp:98
#, kde-format
msgid "Save last position, size and panel settings"
-msgstr ""
-"Enregistrer la configuration de la dernière position, taille et panneau"
+msgstr "Enregistrer la configuration de la dernière position, taille et panneau"
#: Konfigurator/kgstartup.cpp:98
#, kde-format
@@ -8359,7 +8313,7 @@
#: Konfigurator/kgarchives.cpp:64
#, kde-format
msgid "LZMA"
-msgstr ""
+msgstr "LZMA"
#: Konfigurator/kgarchives.cpp:65
#, kde-format
@@ -8439,8 +8393,7 @@
#: Konfigurator/kgarchives.cpp:108
#, kde-format
-msgid ""
-"Some corrupted archives might cause a crash; therefore, testing is suggested."
+msgid "Some corrupted archives might cause a crash; therefore, testing is suggested."
msgstr ""
"Des archives corrompues peuvent entraîner un plantage du logiciel. Un test "
"est d'abord conseillé."
@@ -8452,8 +8405,7 @@
#: Konfigurator/kgarchives.cpp:126
#, kde-format
-msgid ""
-"Make sure to install new packers in your <code>$PATH</code> (e.g. /usr/bin)"
+msgid "Make sure to install new packers in your <code>$PATH</code> (e.g. /usr/bin)"
msgstr ""
"Soyez sûr d'installer les nouveaux outils de compression dans votre <code>"
"$PATH</code> (par ex. : /usr/bin)"
@@ -8575,8 +8527,7 @@
#: krslots.cpp:480
#, kde-format
msgid "Can't start 'mount'! Check the 'Dependencies' page in konfigurator."
-msgstr ""
-"Impossible de démarrer « mount » ! Vérifiez les dépendances dans Konfigurator."
+msgstr "Impossible de démarrer « mount » ! Vérifiez les dépendances dans Konfigurator."
#: krslots.cpp:520
#, kde-format
@@ -8775,8 +8726,7 @@
#: Splitter/combiner.cpp:154
#, kde-format
-msgid ""
-"Validity checking is impossible without a good CRC file. Continue combining?"
+msgid "Validity checking is impossible without a good CRC file. Continue combining?"
msgstr ""
"impossible de vérifier la validité du fichier sans un fichier de CRC "
"correct. Continuer la fusion ?"
@@ -8794,8 +8744,7 @@
#: Splitter/combiner.cpp:272
#, kde-format
msgid "Incorrect CRC checksum! The file might have been corrupted!"
-msgstr ""
-"Somme de contrôle CRC incorrect ! Le fichier a sans doute été corrompu !"
+msgstr "Somme de contrôle CRC incorrect ! Le fichier a sans doute été corrompu !"
#: Splitter/combiner.cpp:298 Splitter/splitter.cpp:203
#, kde-format
@@ -8907,5 +8856,3 @@
msgid "Writing to %1 is not supported"
msgstr "L'écriture dans %1 n'est pas gérée"
-#~ msgid "Brazilian Portuguese"
-#~ msgstr "Portugais Brésilien"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2009-02-08 23:25:23
|
Revision: 6200
http://krusader.svn.sourceforge.net/krusader/?rev=6200&view=rev
Author: vaclavjuza
Date: 2009-02-08 23:25:18 +0000 (Sun, 08 Feb 2009)
Log Message:
-----------
ADDED: [ 2466695 ] Archive dialog now remembers Compression level
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/krusader/Dialogs/packguibase.cpp
trunk/krusader_kde4/krusader/defaults.h
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-02-07 09:54:00 UTC (rev 6199)
+++ trunk/krusader_kde4/ChangeLog 2009-02-08 23:25:18 UTC (rev 6200)
@@ -1,3 +1,5 @@
+ ADDED: [ 2466695 ] Archive dialog now remembers Compression level
+
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/Dialogs/packguibase.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Dialogs/packguibase.cpp 2009-02-07 09:54:00 UTC (rev 6199)
+++ trunk/krusader_kde4/krusader/Dialogs/packguibase.cpp 2009-02-08 23:25:18 UTC (rev 6200)
@@ -27,6 +27,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
+#include "../defaults.h"
#include "packguibase.h"
#include <qcheckbox.h>
@@ -63,6 +64,8 @@
PackGUIBase::PackGUIBase( QWidget* parent )
: QDialog( parent ), expanded( false )
{
+ KConfigGroup group( krConfig, "Archives");
+
setModal( true );
resize( 430, 140 );
setWindowTitle( i18n( "Pack" ) );
@@ -171,7 +174,10 @@
compressLayout->addLayout ( volumeHbox );
+ int level = group.readEntry( "Compression level", _defaultCompressionLevel );
setCompressionLevel = new QCheckBox( i18n( "Set compression level" ), advancedWidget );
+ if ( level != _defaultCompressionLevel )
+ setCompressionLevel->setChecked( true );
connect( setCompressionLevel, SIGNAL( toggled( bool ) ), this, SLOT( checkConsistency() ) );
compressLayout->addWidget( setCompressionLevel, 0, 0 );
@@ -187,7 +193,7 @@
compressionSlider->setMinimum(1);
compressionSlider->setMaximum(9);
compressionSlider->setPageStep(1);
- compressionSlider->setValue(5);
+ compressionSlider->setValue( level );
compressionSlider->setTickPosition( QSlider::TicksBelow );
sliderVBox->addWidget( compressionSlider );
@@ -268,7 +274,6 @@
commandLineSwitches = new KHistoryComboBox( advancedWidget );
commandLineSwitches->setMaxCount(25); // remember 25 items
commandLineSwitches->setDuplicatesEnabled(false);
- KConfigGroup group( krConfig, "Archives");
QStringList list = group.readEntry("Command Line Switches", QStringList() );
commandLineSwitches->setHistoryItems(list);
@@ -389,6 +394,8 @@
bool PackGUIBase::extraProperties( QMap<QString,QString> & inMap ) {
inMap.clear();
+ KConfigGroup group( krConfig, "Archives");
+
if( password->isEnabled() && passwordAgain->isEnabled() ) {
if( password->text() != passwordAgain->text() ) {
KMessageBox::error( this, i18n( "Cannot pack! The passwords are different!" ) );
@@ -428,6 +435,8 @@
if( setCompressionLevel->isEnabled() && setCompressionLevel->isChecked() ) {
inMap[ "CompressionLevel" ] = QString("%1").arg( compressionSlider->value() );
+ int level = compressionSlider->value();
+ group.writeEntry( "Compression level", level );
}
QString cmdArgs = commandLineSwitches->currentText().trimmed();
@@ -472,7 +481,6 @@
commandLineSwitches->addToHistory( cmdArgs );
QStringList list = commandLineSwitches->historyItems();
- KConfigGroup group( krConfig, "Archives");
group.writeEntry("Command Line Switches", list);
inMap[ "CommandLineSwitches" ] = cmdArgs;
Modified: trunk/krusader_kde4/krusader/defaults.h
===================================================================
--- trunk/krusader_kde4/krusader/defaults.h 2009-02-07 09:54:00 UTC (rev 6199)
+++ trunk/krusader_kde4/krusader/defaults.h 2009-02-08 23:25:18 UTC (rev 6200)
@@ -200,6 +200,8 @@
// Test Before Unpack ////
#define _TestBeforeUnpack true
// Supported Packers // ====> a QStringList of SYSTEM supported archives ( also new )
+// default compression level
+#define _defaultCompressionLevel 5
/////////////////////// [UserActions]
// Terminal for UserActions ///////////
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-02-07 09:54:04
|
Revision: 6199
http://krusader.svn.sourceforge.net/krusader/?rev=6199&view=rev
Author: ckarai
Date: 2009-02-07 09:54:00 +0000 (Sat, 07 Feb 2009)
Log Message:
-----------
FIXED: [ 2543170 ] Crashes on mouse wheel in brief view
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/krusader/Panel/krbriefview.cpp
trunk/krusader_kde4/krusader/Panel/krbriefview.h
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-02-07 08:22:51 UTC (rev 6198)
+++ trunk/krusader_kde4/ChangeLog 2009-02-07 09:54:00 UTC (rev 6199)
@@ -1,3 +1,4 @@
+ FIXED: [ 2543170 ] Crashes on mouse wheel in brief view
FIXED: [ 2553396 ] Krusader exits after closing KrViewer
FIXED: [ 2563664 ] Krusader always trashes (not deletes) files
FIXED: tar.bz2 doesn't always detected automatically
Modified: trunk/krusader_kde4/krusader/Panel/krbriefview.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krbriefview.cpp 2009-02-07 08:22:51 UTC (rev 6198)
+++ trunk/krusader_kde4/krusader/Panel/krbriefview.cpp 2009-02-07 09:54:00 UTC (rev 6199)
@@ -60,7 +60,7 @@
KrBriefView::KrBriefView( Q3Header * headerIn, QWidget *parent, bool &left, KConfig *cfg ):
K3IconView(parent), KrView( cfg ), header( headerIn ), _currDragItem( 0 ),
- currentlyRenamedItem( 0 ), pressedItem( 0 ), mouseEvent( 0 ) {
+ currentlyRenamedItem( 0 ), pressedItem( 0 ), mouseEvent( 0 ), inWheelEvent( false ) {
_nameInKConfig = QString( "KrBriefView" ) + QString( ( left ? "Left" : "Right" ) );
KConfigGroup group( krConfig, "Private" );
if ( group.readEntry("Enable Input Method", true))
@@ -1137,6 +1137,18 @@
return e;
}
+
+void KrBriefView::wheelEvent( QWheelEvent *e )
+{
+ // KDE 4.2 wheel event crashes
+ // because of recursive calls
+ if( inWheelEvent )
+ return;
+ inWheelEvent = true;
+ K3IconView::wheelEvent(e);
+ inWheelEvent = false;
+}
+
KrView* KrBriefView::create( QWidget *parent, bool &left, KConfig *cfg ) {
QFrame * briefWidget = new QFrame( parent );
briefWidget->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
Modified: trunk/krusader_kde4/krusader/Panel/krbriefview.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/krbriefview.h 2009-02-07 08:22:51 UTC (rev 6198)
+++ trunk/krusader_kde4/krusader/Panel/krbriefview.h 2009-02-07 09:54:00 UTC (rev 6199)
@@ -43,6 +43,7 @@
#include <QDragMoveEvent>
#include <QDropEvent>
#include <QDragLeaveEvent>
+#include <QWheelEvent>
#include <QResizeEvent>
#include <QPixmap>
#include <QMouseEvent>
@@ -124,6 +125,7 @@
virtual void startDrag() { op()->startDrag(); }
virtual bool event( QEvent *e );
virtual bool eventFilter( QObject * watched, QEvent * e );
+ virtual void wheelEvent( QWheelEvent *e );
QMouseEvent * transformMouseEvent( QMouseEvent * );
protected slots:
@@ -175,6 +177,7 @@
KrBriefViewItem *currentlyRenamedItem;
Q3IconViewItem *pressedItem;
QMouseEvent *mouseEvent;
+ bool inWheelEvent; // fix recursion crash
};
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-02-07 08:23:10
|
Revision: 6198
http://krusader.svn.sourceforge.net/krusader/?rev=6198&view=rev
Author: ckarai
Date: 2009-02-07 08:22:51 +0000 (Sat, 07 Feb 2009)
Log Message:
-----------
FIXED: [ 2553396 ] Krusader exits after closing KrViewer
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/krusader/KViewer/krviewer.cpp
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-02-07 07:57:13 UTC (rev 6197)
+++ trunk/krusader_kde4/ChangeLog 2009-02-07 08:22:51 UTC (rev 6198)
@@ -1,3 +1,4 @@
+ FIXED: [ 2553396 ] Krusader exits after closing KrViewer
FIXED: [ 2563664 ] Krusader always trashes (not deletes) files
FIXED: tar.bz2 doesn't always detected automatically
FIXED: panel freezes if the inactive path is invalid
Modified: trunk/krusader_kde4/krusader/KViewer/krviewer.cpp
===================================================================
--- trunk/krusader_kde4/krusader/KViewer/krviewer.cpp 2009-02-07 07:57:13 UTC (rev 6197)
+++ trunk/krusader_kde4/krusader/KViewer/krviewer.cpp 2009-02-07 08:22:51 UTC (rev 6198)
@@ -408,6 +408,7 @@
krApp->raise();
krApp->activateWindow();
}
+ this->close();
this->deleteLater();
return;
} else if( tabBar.count() == 1 ){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-02-07 07:57:27
|
Revision: 6197
http://krusader.svn.sourceforge.net/krusader/?rev=6197&view=rev
Author: ckarai
Date: 2009-02-07 07:57:13 +0000 (Sat, 07 Feb 2009)
Log Message:
-----------
FIXED: [ 2563664 ] Krusader always trashes (not deletes) files
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/krusader/Panel/panelfunc.cpp
trunk/krusader_kde4/krusader/VFS/ftp_vfs.cpp
trunk/krusader_kde4/krusader/VFS/ftp_vfs.h
trunk/krusader_kde4/krusader/VFS/normal_vfs.cpp
trunk/krusader_kde4/krusader/VFS/normal_vfs.h
trunk/krusader_kde4/krusader/VFS/vfs.h
trunk/krusader_kde4/krusader/VFS/virt_vfs.cpp
trunk/krusader_kde4/krusader/VFS/virt_vfs.h
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-02-04 20:47:06 UTC (rev 6196)
+++ trunk/krusader_kde4/ChangeLog 2009-02-07 07:57:13 UTC (rev 6197)
@@ -1,3 +1,4 @@
+ FIXED: [ 2563664 ] Krusader always trashes (not deletes) files
FIXED: tar.bz2 doesn't always detected automatically
FIXED: panel freezes if the inactive path is invalid
FIXED: problem when splitter sizes are 0, 0
Modified: trunk/krusader_kde4/krusader/Panel/panelfunc.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/panelfunc.cpp 2009-02-04 20:47:06 UTC (rev 6196)
+++ trunk/krusader_kde4/krusader/Panel/panelfunc.cpp 2009-02-07 07:57:13 UTC (rev 6197)
@@ -756,14 +756,7 @@
panel->prepareToDelete();
// let the vfs do the job...
- if (reallyDelete) {
- // if reallyDelete, then make sure nothing gets moved to trash
- group.writeEntry( "Move To Trash", false );
- }
- files() ->vfs_delFiles( &fileNames );
- if (reallyDelete) {
- group.writeEntry( "Move To Trash", trash);
- }
+ files() ->vfs_delFiles( &fileNames, reallyDelete );
}
void ListPanelFunc::goInside( const QString& name )
Modified: trunk/krusader_kde4/krusader/VFS/ftp_vfs.cpp
===================================================================
--- trunk/krusader_kde4/krusader/VFS/ftp_vfs.cpp 2009-02-04 20:47:06 UTC (rev 6196)
+++ trunk/krusader_kde4/krusader/VFS/ftp_vfs.cpp 2009-02-07 07:57:13 UTC (rev 6197)
@@ -234,7 +234,7 @@
}
// remove a file from the vfs (physical)
-void ftp_vfs::vfs_delFiles( QStringList *fileNames ) {
+void ftp_vfs::vfs_delFiles( QStringList *fileNames, bool /* reallyDelete */ ) {
KUrl::List filesUrls;
KUrl url;
Modified: trunk/krusader_kde4/krusader/VFS/ftp_vfs.h
===================================================================
--- trunk/krusader_kde4/krusader/VFS/ftp_vfs.h 2009-02-04 20:47:06 UTC (rev 6196)
+++ trunk/krusader_kde4/krusader/VFS/ftp_vfs.h 2009-02-07 07:57:13 UTC (rev 6197)
@@ -47,7 +47,7 @@
/// Copy a file to the vfs (physical).
virtual void vfs_addFiles(KUrl::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = "", PreserveMode pmode = PM_DEFAULT );
/// Remove a file from the vfs (physical)
- virtual void vfs_delFiles(QStringList *fileNames);
+ virtual void vfs_delFiles(QStringList *fileNames, bool reallyDelete=false);
/// Return a list of URLs for multiple files
virtual KUrl::List* vfs_getFiles(QStringList* names);
/// Return a URL to a single file
Modified: trunk/krusader_kde4/krusader/VFS/normal_vfs.cpp
===================================================================
--- trunk/krusader_kde4/krusader/VFS/normal_vfs.cpp 2009-02-04 20:47:06 UTC (rev 6196)
+++ trunk/krusader_kde4/krusader/VFS/normal_vfs.cpp 2009-02-07 07:57:13 UTC (rev 6197)
@@ -170,7 +170,7 @@
}
// remove a file from the vfs (physical)
-void normal_vfs::vfs_delFiles(QStringList *fileNames){
+void normal_vfs::vfs_delFiles(QStringList *fileNames, bool reallyDelete){
KUrl::List filesUrls;
KUrl url;
QDir local( vfs_workingDir() );
@@ -193,7 +193,7 @@
// delete of move to trash ?
KConfigGroup group( krConfig, "General");
- if( group.readEntry("Move To Trash",_MoveToTrash) ){
+ if( !reallyDelete && group.readEntry("Move To Trash",_MoveToTrash) ){
job = KIO::trash(filesUrls);
connect(job,SIGNAL(result(KJob*)),SLOTS,SLOT(changeTrashIcon()));
}
Modified: trunk/krusader_kde4/krusader/VFS/normal_vfs.h
===================================================================
--- trunk/krusader_kde4/krusader/VFS/normal_vfs.h 2009-02-04 20:47:06 UTC (rev 6196)
+++ trunk/krusader_kde4/krusader/VFS/normal_vfs.h 2009-02-07 07:57:13 UTC (rev 6197)
@@ -55,7 +55,7 @@
/// Copy a file to the vfs (physical).
virtual void vfs_addFiles(KUrl::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = "", PreserveMode pmode = PM_DEFAULT );
/// Remove a file from the vfs (physical)
- virtual void vfs_delFiles(QStringList *fileNames);
+ virtual void vfs_delFiles(QStringList *fileNames, bool reallyDelete=false);
/// Return a list of URLs for multiple files
virtual KUrl::List* vfs_getFiles(QStringList* names);
/// Return a URL to a single file
Modified: trunk/krusader_kde4/krusader/VFS/vfs.h
===================================================================
--- trunk/krusader_kde4/krusader/VFS/vfs.h 2009-02-04 20:47:06 UTC (rev 6196)
+++ trunk/krusader_kde4/krusader/VFS/vfs.h 2009-02-07 07:57:13 UTC (rev 6197)
@@ -65,7 +65,7 @@
/// Copy a file to the vfs (physical).
virtual void vfs_addFiles(KUrl::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = "", PreserveMode pmode = PM_DEFAULT)=0;
/// Remove a file from the vfs (physical)
- virtual void vfs_delFiles(QStringList *fileNames)=0;
+ virtual void vfs_delFiles(QStringList *fileNames, bool reallyDelete=false)=0;
/// Return a list of URLs for multiple files
virtual KUrl::List* vfs_getFiles(QStringList* names)=0;
/// Return a URL to a single file
Modified: trunk/krusader_kde4/krusader/VFS/virt_vfs.cpp
===================================================================
--- trunk/krusader_kde4/krusader/VFS/virt_vfs.cpp 2009-02-04 20:47:06 UTC (rev 6196)
+++ trunk/krusader_kde4/krusader/VFS/virt_vfs.cpp 2009-02-07 07:57:13 UTC (rev 6197)
@@ -106,7 +106,7 @@
vfs_refresh();
}
-void virt_vfs::vfs_delFiles( QStringList *fileNames ) {
+void virt_vfs::vfs_delFiles( QStringList *fileNames, bool reallyDelete ) {
if ( path == "/" ) {
for ( int i = 0 ; i < fileNames->count(); ++i ) {
QString filename = ( *fileNames ) [ i ];
@@ -130,7 +130,7 @@
// delete of move to trash ?
KConfigGroup group( krConfig, "General" );
- if ( group.readEntry( "Move To Trash", _MoveToTrash ) ) {
+ if ( !reallyDelete && group.readEntry( "Move To Trash", _MoveToTrash ) ) {
job = KIO::trash( filesUrls );
connect( job, SIGNAL( result( KJob* ) ), krApp, SLOT( changeTrashIcon() ) );
} else
Modified: trunk/krusader_kde4/krusader/VFS/virt_vfs.h
===================================================================
--- trunk/krusader_kde4/krusader/VFS/virt_vfs.h 2009-02-04 20:47:06 UTC (rev 6196)
+++ trunk/krusader_kde4/krusader/VFS/virt_vfs.h 2009-02-07 07:57:13 UTC (rev 6197)
@@ -36,7 +36,7 @@
/// Copy a file to the vfs (physical).
void vfs_addFiles(KUrl::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = "", PreserveMode pmode = PM_DEFAULT );
/// Remove a file from the vfs (physical)
- void vfs_delFiles(QStringList *fileNames);
+ void vfs_delFiles(QStringList *fileNames, bool reallyDelete = true);
/// Remove a file from the collection (only its link, not the file)
void vfs_removeFiles(QStringList *fileNames);
/// Return a list of URLs for multiple files
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-02-04 20:47:25
|
Revision: 6196
http://krusader.svn.sourceforge.net/krusader/?rev=6196&view=rev
Author: ckarai
Date: 2009-02-04 20:47:06 +0000 (Wed, 04 Feb 2009)
Log Message:
-----------
FIXED: tar.bz2 doesn't always detected automatically
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/krusader/Konfigurator/kgprotocols.cpp
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-01-31 11:16:11 UTC (rev 6195)
+++ trunk/krusader_kde4/ChangeLog 2009-02-04 20:47:06 UTC (rev 6196)
@@ -1,3 +1,4 @@
+ FIXED: tar.bz2 doesn't always detected automatically
FIXED: panel freezes if the inactive path is invalid
FIXED: problem when splitter sizes are 0, 0
FIXED: iso protocol problems with images bigger than 4GByte
Modified: trunk/krusader_kde4/krusader/Konfigurator/kgprotocols.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Konfigurator/kgprotocols.cpp 2009-01-31 11:16:11 UTC (rev 6195)
+++ trunk/krusader_kde4/krusader/Konfigurator/kgprotocols.cpp 2009-02-04 20:47:06 UTC (rev 6196)
@@ -54,6 +54,7 @@
"application/x-rpm,application/zip,"
"application/x-zip,application/x-zip-compressed";
QString KgProtocols::defaultTarMimes = "application/x-tar,application/x-tarz,"
+ "application/x-bzip-compressed-tar,"
"application/x-compressed-tar,"
"application/x-tbz,application/x-tgz";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-01-31 11:16:17
|
Revision: 6195
http://krusader.svn.sourceforge.net/krusader/?rev=6195&view=rev
Author: ckarai
Date: 2009-01-31 11:16:11 +0000 (Sat, 31 Jan 2009)
Log Message:
-----------
FIXED: panel freezes if the inactive path is invalid
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/krusader/Panel/listpanel.cpp
trunk/krusader_kde4/krusader/Panel/panelfunc.cpp
trunk/krusader_kde4/krusader/Panel/panelfunc.h
trunk/krusader_kde4/krusader/VFS/vfs.cpp
trunk/krusader_kde4/krusader/VFS/vfs.h
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-01-30 07:01:37 UTC (rev 6194)
+++ trunk/krusader_kde4/ChangeLog 2009-01-31 11:16:11 UTC (rev 6195)
@@ -1,3 +1,4 @@
+ FIXED: panel freezes if the inactive path is invalid
FIXED: problem when splitter sizes are 0, 0
FIXED: iso protocol problems with images bigger than 4GByte
FIXED: Windows: iso protocol works well now
Modified: trunk/krusader_kde4/krusader/Panel/listpanel.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/listpanel.cpp 2009-01-30 07:01:37 UTC (rev 6194)
+++ trunk/krusader_kde4/krusader/Panel/listpanel.cpp 2009-01-31 11:16:11 UTC (rev 6195)
@@ -991,7 +991,8 @@
void ListPanel::panelActive() {
// don't refresh when not active (ie: hidden, application isn't focussed ...)
- func->files()->vfs_enableRefresh(true);
+ if( !func->files()->vfs_enableRefresh(true))
+ func->popErronousUrl();
}
void ListPanel::panelInactive() {
Modified: trunk/krusader_kde4/krusader/Panel/panelfunc.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/panelfunc.cpp 2009-01-30 07:01:37 UTC (rev 6194)
+++ trunk/krusader_kde4/krusader/Panel/panelfunc.cpp 2009-01-31 11:16:11 UTC (rev 6195)
@@ -98,6 +98,20 @@
, nameToMakeCurrent );
}
+void ListPanelFunc::popErronousUrl() {
+ KUrl current = urlStack.last();
+ while( urlStack.count() != 0 )
+ {
+ KUrl url = urlStack.takeLast();
+ if( !current.equals( url ) )
+ {
+ immediateOpenUrl( url );
+ return;
+ }
+ }
+ immediateOpenUrl( KUrl( ROOT_DIR ) );
+}
+
void ListPanelFunc::immediateOpenUrl( const KUrl& urlIn ) {
KUrl url = urlIn;
url.cleanPath();
@@ -138,13 +152,13 @@
}
vfs* v = 0;
- if ( !urlStack.last().equals( url ) )
+ if ( urlStack.count() == 0 || !urlStack.last().equals( url ) )
urlStack.push_back( url );
// count home many urls is in the stack, so later on, we'll know if the refresh was a success
int stackSize = urlStack.count();
bool refreshFailed = true; // assume the worst
while ( true ) {
- KUrl u = urlStack.takeLast();
+ KUrl u = urlStack.count() == 0 ? KUrl( ROOT_DIR ) : urlStack.takeLast();
//u.adjustPath(KUrl::RemoveTrailingSlash); // remove trailing "/"
u.cleanPath(); // Resolves "." and ".." components in path.
v = KrVfsHandler::getVfs( u, panel, files() );
Modified: trunk/krusader_kde4/krusader/Panel/panelfunc.h
===================================================================
--- trunk/krusader_kde4/krusader/Panel/panelfunc.h 2009-01-30 07:01:37 UTC (rev 6194)
+++ trunk/krusader_kde4/krusader/Panel/panelfunc.h 2009-01-31 11:16:11 UTC (rev 6195)
@@ -47,8 +47,9 @@
void goInside(const QString&);
void openUrl(const KUrl& path, const QString& nameToMakeCurrent = QString());
void openUrl(const QString& path, const QString& nameToMakeCurrent = QString());
- void immediateOpenUrl( const KUrl& path);
- void doOpenUrl();
+ void popErronousUrl();
+ void immediateOpenUrl( const KUrl& path);
+ void doOpenUrl();
void refresh();
void rename(const QString &oldname, const QString &newname);
Modified: trunk/krusader_kde4/krusader/VFS/vfs.cpp
===================================================================
--- trunk/krusader_kde4/krusader/VFS/vfs.cpp 2009-01-30 07:01:37 UTC (rev 6194)
+++ trunk/krusader_kde4/krusader/VFS/vfs.cpp 2009-01-31 11:16:11 UTC (rev 6195)
@@ -228,12 +228,14 @@
return true;
}
-void vfs::vfs_enableRefresh(bool enable){
- if (vfs_type != VFS_NORMAL) return;
- if (disableRefresh == !enable) return; // if gets called twice by mistake
+bool vfs::vfs_enableRefresh(bool enable){
+ if (vfs_type != VFS_NORMAL) return true;
+ if (disableRefresh == !enable) return true; // if gets called twice by mistake
disableRefresh = quietMode = !enable;
- if( enable && !postponedRefreshURL.isEmpty() ) vfs_refresh( postponedRefreshURL );
+ bool res = true;
+ if( enable && !postponedRefreshURL.isEmpty() ) res = vfs_refresh( postponedRefreshURL );
postponedRefreshURL = KUrl();
+ return res;
}
void vfs::clear()
Modified: trunk/krusader_kde4/krusader/VFS/vfs.h
===================================================================
--- trunk/krusader_kde4/krusader/VFS/vfs.h 2009-01-30 07:01:37 UTC (rev 6194)
+++ trunk/krusader_kde4/krusader/VFS/vfs.h 2009-01-31 11:16:11 UTC (rev 6195)
@@ -123,7 +123,7 @@
bool vfs_refresh(KJob * job);
bool vfs_refresh();
void vfs_setQuiet(bool beQuiet){ quietMode=beQuiet; }
- void vfs_enableRefresh(bool enable);
+ bool vfs_enableRefresh(bool enable);
void vfs_invalidate() { invalidated = true; }
signals:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-01-30 07:01:44
|
Revision: 6194
http://krusader.svn.sourceforge.net/krusader/?rev=6194&view=rev
Author: ckarai
Date: 2009-01-30 07:01:37 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
FIXED: problem when splitter sizes are 0, 0
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/krusader/Panel/panelpopup.cpp
trunk/krusader_kde4/krusader/krusaderview.cpp
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-01-24 21:44:57 UTC (rev 6193)
+++ trunk/krusader_kde4/ChangeLog 2009-01-30 07:01:37 UTC (rev 6194)
@@ -1,3 +1,4 @@
+ FIXED: problem when splitter sizes are 0, 0
FIXED: iso protocol problems with images bigger than 4GByte
FIXED: Windows: iso protocol works well now
FIXED: Windows: slow start
Modified: trunk/krusader_kde4/krusader/Panel/panelpopup.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/panelpopup.cpp 2009-01-24 21:44:57 UTC (rev 6193)
+++ trunk/krusader_kde4/krusader/Panel/panelpopup.cpp 2009-01-30 07:01:37 UTC (rev 6194)
@@ -238,6 +238,9 @@
splitterSizes = pg.readEntry( "Left PanelPopup Splitter Sizes", QList<int>() );
else
splitterSizes = pg.readEntry( "Right PanelPopup Splitter Sizes", QList<int>() );
+
+ if( splitterSizes.count() == 2 && splitterSizes[ 0 ] == 0 && splitterSizes[ 1 ] == 0 )
+ splitterSizes.clear();
if( splitterSizes.count() < 2 ) {
splitterSizes.clear();
Modified: trunk/krusader_kde4/krusader/krusaderview.cpp
===================================================================
--- trunk/krusader_kde4/krusader/krusaderview.cpp 2009-01-24 21:44:57 UTC (rev 6193)
+++ trunk/krusader_kde4/krusader/krusaderview.cpp 2009-01-30 07:01:37 UTC (rev 6194)
@@ -108,10 +108,17 @@
{
lst.push_back( 100 );
lst.push_back( 100 );
+ } else if( lst.count() == 2 && lst[ 0 ] == 0 && lst[ 1 ] == 0 )
+ {
+ lst[ 0 ] = 100;
+ lst[ 1 ] = 100;
}
+
horiz_splitter->setSizes( lst );
verticalSplitterSizes = group.readEntry( "Terminal Emulator Splitter Sizes", QList<int> () );
+ if( verticalSplitterSizes.count() == 2 && verticalSplitterSizes[ 0 ] == 0 && verticalSplitterSizes[ 1 ] == 0 )
+ verticalSplitterSizes.clear();
show();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cod...@us...> - 2009-01-24 22:22:38
|
Revision: 6193
http://krusader.svn.sourceforge.net/krusader/?rev=6193&view=rev
Author: codeknight
Date: 2009-01-24 21:44:57 +0000 (Sat, 24 Jan 2009)
Log Message:
-----------
UPDATED: FAQ, removed KDE3 issues and added KDE4 updates
Modified Paths:
--------------
trunk/krusader_kde4/FAQ
trunk/krusader_kde4/doc/ChangeLog
trunk/krusader_kde4/doc/en/faq.docbook
trunk/krusader_kde4/doc/en/index.docbook
Modified: trunk/krusader_kde4/FAQ
===================================================================
--- trunk/krusader_kde4/FAQ 2009-01-23 21:02:04 UTC (rev 6192)
+++ trunk/krusader_kde4/FAQ 2009-01-24 21:44:57 UTC (rev 6193)
@@ -1,7 +1,7 @@
--------------------------------------------
-- Documentation version: 1.80.0
-- Documentation date: 2007-05-03
-- Parsing date: Sun May 6 22:32:02 CEST 2007
+- Documentation version: 2.0.0-beta2
+- Documentation date: 2009-01-23
+- Parsing date: Sat Jan 24 21:27:32 UTC 2009
--------------------------------------------
@@ -42,27 +42,12 @@
88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88.
YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
-This textfile created with the next command: $ xmlto txt index.docbook
+
------------------------------------------------------------------------
-IMPORTANT: Crashes in Krusader caused by Qt 3.3.5
-*************************************************
-We've been getting a lot of emails and bug reports regarding random
-crashes in Krusader, especially during some file operations (copy/move
-etc.). These crashes are related to Qt 3.3.5 and NOT Krusader. It seems
-that Qt 3.3.5 introduced a serious bug which is now causing random
-crashes in many KDE applications including Konqueror. You can google for
-it to find out more.
-As far as we know, debian and suse already posted new Qt binaries that
-fix the problem, and gentoo has masked Qt 3.3.5 completely. As for now,
-you either need Qt 3.3.4 or a fixed Qt 3.3.5, depending on your
-distribution. For more information is available on our website at
-http://krusader.sourceforge.net/phpBB/viewtopic.php?t=1407
+Chapter 13. Frequently Asked Questions (FAQ)
-------------------------------------------------------------------------
-Chapter 12. Frequently Asked Questions (FAQ)
-
Table of Contents
Installation FAQ
@@ -87,7 +72,7 @@
1. Does Krusader need KDE to run?
2. Which libraries does Krusader need to run?
-3. I have followed all the steps but configurecomplains about missing libs or
+3. I have followed all the steps but make complains about missing libs or
headers. What do I need to do?
4. How do I compile Krusader when I'm using a 64 bit processor ?
5. I have downloaded the Source RPM krusader-x.xx.dist.src.rpm, what to do now?
@@ -97,15 +82,12 @@
8. I've installed Krusader, but when I start, only the "Help" menu appears.
Why?
9. Some new menu items are missing after updating Krusader, what's wrong?
-10. When I run make, it complains about libfam.la, what's wrong?
-11. Debian® complains about Qt™ when running ./configure, what's wrong?
-12. I have a libGLcore.so.1 compile error after using the NVIDIA® installer,
+10. I have a libGLcore.so.1 compile error after using the NVIDIA installer,
what to do?
-13. Why Krusader-1.60.x does not compile with gcc4?
-14. I am having trouble compiling and installing Krusader, how do I send a help
+11. I am having trouble compiling and installing Krusader, how do I send a help
request?
-15. How can I build an RPM package for Krusader?
-16. Why does Krusader-cvs show an old version number in the about box?
+12. How can I build an RPM package for Krusader?
+13. Why does Krusader-svn show an old version number in the about box?
1. Does Krusader need KDE to run?
@@ -120,7 +102,7 @@
You do not need to switch to the KDE window manager to use Krusader; you
can still use GNOME, AfterStep, XFce or another window manager. However,
the configuration of the Krusader fonts and some behavior is done by
- running Kcontrol.
+ running kcontrol.
A lot depends on what you want to do with Krusader. You should know that
Krusader uses the KDE KIOSlaves to access remote file systems, and support
@@ -142,48 +124,20 @@
you only need the C-compliler gcc when you compile Krusader from source
(see the next question).
- Here is a list of the required shared libraries when you run Krusader:
+ Take a look at the Krusader dependencies paragraph of our install chapter.
- ● kdelibs (for the required KDE version see the Installation procedure)
+ If you need more details please take a look at the Krusader requirements on
+ Ubuntu. The "depends" are required, the "suggests" make Krusader more
+ powerful.
- ● libacl1 libart-2.0 libattr1 libaudio2 libc6 libfam0 libfontconfig1
-
- ● libfreetype6 libgcc1 libgcc2 libice6 libidn11 libjpeg62 libkjsembed1
-
- ● libkonq4 libpcre3 libpng12 libqt3-mt libsm6 libstdc++6 libunwind7
- libx11-6
-
- ● libxcursor1 libxext6 libxft2 libxi6 libxinerama1 libxrandr2 libxrender1
- libxt6 zlib1g
-
- If you need more info please take a look at the requirements on Debian® .
-
-3. I have followed all the steps but configurecomplains about missing libs or
+3. I have followed all the steps but make complains about missing libs or
headers. What do I need to do?
Install the missing packages.
- Here is a list of the required packages to compile Krusader from source:
+ Take a look at the Compilation requirements paragraph of our install
+ chapter.
- ● gcc-cpp gcc-c++ glibc libgcc1 (other compilers may work but haven't
- been tested)
-
- ● autoconf automake XFree
-
- ● libqt3 libqt-devel
-
- ● kdelibs kdelibs-devel
-
- ● libjpeg62 libjpeg-devel libpng3 libmng1
-
- ● fam libfam-devel
-
- ● zlib1 arts libart_lgpl2 libstdc++5 libpcre0
-
- ● libkjsembed, if you use the JavaScript console, often found in a
- package called KDEbindings(-devel) and libkonq-dev for the Konqueror
- right-click menu entries.
-
Most RPM-based distributions separate the headers from the libs. The
headers are needed to compile Krusader. Look for packages in the form
foo-devel-*.rpm (e.g. kdelibs-devel-foo.i586.rpm) or foo-dev-*.deb for
@@ -320,30 +274,7 @@
a wrong directory, only the "Help" menu appears, please read the previous
question.
-10. When I run make, it complains about libfam.la, what's wrong?
-
- The ./configure script does not check for the presence of libfam.la, and
- make needs libfam.la to compile Krusader. If you know how this can be
- solved, please let us know. Install libfam0-devel-foo.rpm. Note: when you
- install Mandrake™-Linux® 9.2 with the default settings, this package is not
- installed. If you need more information take a look at FAQ missing libs or
- headers.
-
-11. Debian® complains about Qt™ when running ./configure, what's wrong?
-
- This problem occurs when you use gcc 2.95, you need to install gcc 3.2 (or
- higher). You also need to set the enviroment variables "CC, CPP and CXX"
- before running the ./configure script.
-
- $ export CC=/usr/bin/gcc-3.2
- $ export CXX=/usr/bin/g++-3.2
- $ export CPP=/usr/bin/cpp-3.2
-
-
- For more information please take a look in our forum and at the
- instructions on how to build a Qt™/KDE3 application on Debian®.
-
-12. I have a libGLcore.so.1 compile error after using the NVIDIA® installer,
+10. I have a libGLcore.so.1 compile error after using the NVIDIA® installer,
what to do?
This problem occurs when you use the NVIDIA® installer and not the official
@@ -371,20 +302,7 @@
$ ln -s /usr/lib/libGLU.la /usr/X11R6/lib/libGLU.la
-13. Why Krusader-1.60.x does not compile with gcc4?
-
- Because Krusader-1.60.x was not gcc4 compatible, it first needs some
- patches:
-
- ● add 'class ListPanelFunc;' in krusader/Panel/listpanel.h
-
- ● add 'class KMountManGUI;' in krusader/MountMan/kmountman.h
-
- ● add 'class KrDetailedViewItem;' in krusader/Panel/krdetailedview.h
-
- More information can be found in our forum.
-
-14. I am having trouble compiling and installing Krusader, how do I send a help
+11. I am having trouble compiling and installing Krusader, how do I send a help
request?
Please read our detailed installation procedure and the FAQ. If you can't
@@ -417,7 +335,7 @@
Thank you for your co-operation!
-15. How can I build an RPM package for Krusader?
+12. How can I build an RPM package for Krusader?
If you have experience with compiling from source, you will probably be
able to build a Krusader RPM too. Information about RPM can be found at
@@ -458,10 +376,10 @@
8. And finally: test the RPM before sending it in.
-16. Why does Krusader-cvs show an old version number in the about box?
+13. Why does Krusader-svn show an old version number in the about box?
Because we only change the version number just before we do a new release.
- Krusader-cvs will show an older version number, so ignore the version
+ Krusader-svn will show an older version number, so ignore the version
number and check the download date. We simply haven't yet decided what the
next version number will be.
@@ -473,26 +391,25 @@
3. Why does Krusader freeze or hang on a dead mountpoint?
4. When I try to resize Krusader to make it smaller, I discover that I can't
resize it below a certain size. Why?
-5. When I perform some file operations, Krusader's panel doesn't refresh / I'm
- using Krusader with fam installed, but updates to the panel are not shown.
- Why?
-6. Samba ISO 8859-x codepage / What to do if Krusader does not read shared
+5. Samba ISO 8859-x codepage / What to do if Krusader does not read shared
directories containing special international characters?
-7. Krusader reports "krarc:... protocol not supported" error at opening an
+6. Krusader reports "krarc:... protocol not supported" error at opening an
archive file, what to do?
-8. I get the error message "Protocol not supported by Krusader: "krarc:/path/to
+7. I get the error message "Protocol not supported by Krusader: "krarc:/path/to
/foo-archive", when I try to open foo-Archive, what to do?
-9. What todo if an extenal tool doesn't seem to work?
+8. What todo if an extenal tool doesn't seem to work?
+9. Howto executing jar files (and not enter the jar archive)?
10. Why do I have trouble with my FTP connection?
11. I get "FTP protocol not supported by Krusader" error when trying to open a
remote FTP directory, what to do?
-12. How can I close a remote connection (e.g. a FTP connection)?
-13. I am experiencing problems with the media:// protocol, why?
-14. How can I disable the default sounds, e.g. when I do a delete action ?
-15. Where is RemoteMan, the remote connection manager ?
-16. Why doesn't mimetype magic sometimes work inside archives?
-17. Why doesn't the handbook work?
-18. Why doesn't "save last location" work?
+12. How don't add ".part" suffix when copying files via ftp?
+13. How can I close a remote connection (e.g. a FTP connection)?
+14. I am experiencing problems with the media:/ protocol, why?
+15. How can I disable the default sounds, e.g. when I do a delete action ?
+16. Where the remote connection manager ?
+17. Why doesn't mimetype magic sometimes work inside archives?
+18. Where is Konfigurator, do i need to install the KDE Desktop Enviroment to
+ use it?
19. How can I set the look & feel of 2 different users to be the same?
1. Krusader keeps crashing, why?
@@ -542,29 +459,13 @@
resize it below a certain size. Why?
See the F1, F2 (etc.) buttons? They are not allowing Krusader to downsize
- as they have a minimum size. Just disable them View → Show FN Keys Bar and
+ as they have a minimum size. Just disable them View->Show FN Keys Bar and
you'll be able to resize Krusader to your liking. Since version 1.51 we
have improved this greatly: when downsizing the buttons will look like 'F5
..py'. When the button faces are too small to read a tooltip will give the
complete text. The minimum width is 45 pixels for each button.
-5. When I perform some file operations, Krusader's panel doesn't refresh / I'm
- using Krusader with fam installed, but updates to the panel are not shown.
- Why?
-
- The bad news is that we're not sure why, but it seems that fam (file
- alteration monitor) sometimes refuses to work. We are looking into this
- problem to make sure it is not our problem. We've tried the same source
- code on two different Gentoo installations: one worked, the other did not.
- The good news is that if you disable fam, Krusader will automatically
- revert to its internal update mechanism (which is less efficient, but
- works) without needing to recompile. You can disable fam with:
-
- $ su -c 'fam -l'
-
- Look at the manpages for more information about fam.
-
-6. Samba ISO 8859-x codepage / What to do if Krusader does not read shared
+5. Samba ISO 8859-x codepage / What to do if Krusader does not read shared
directories containing special international characters?
Krusader does not handle (yet) Samba ISO 8859-x codepages, if you use a
@@ -580,7 +481,7 @@
Unfortunately kcontrol (KDE 3.1.1) fails to configure smb.conf properly, so
this must be done manually with a text editor.
-7. Krusader reports "krarc:... protocol not supported" error at opening an
+6. Krusader reports "krarc:... protocol not supported" error at opening an
archive file, what to do?
Install the krarc slave properly:
@@ -592,7 +493,7 @@
or the directory where the KIO slaves are placed in your Linux®
distribution.
-8. I get the error message "Protocol not supported by Krusader: "krarc:/path/
+7. I get the error message "Protocol not supported by Krusader: "krarc:/path/
to/foo-archive", when I try to open foo-Archive, what to do?
The icons, kio_slaves and documentation must be installed in the correct
@@ -602,7 +503,7 @@
ldconfig on this directory when you're done. For more information click
here.
-9. What todo if an extenal tool doesn't seem to work?
+8. What todo if an extenal tool doesn't seem to work?
Krusader uses several programs as external tools, and sometimes they appear
not to work. Open a terminal and check if tool foo is installed.
@@ -617,11 +518,26 @@
Krusader, Krusader will now start the first start configuration wizard,
follow these guidelines.
+9. Howto executing jar files (and not enter the jar archive)?
+
+ Go to the Konfigurator Protocol page and remove application/x-jar from the
+ krarc node, Krusader should no longer enter the archive. Global file
+ associations are handled by KDE and not by Krusader. To assosiate the jar
+ extension:
+
+ ● Open KDEs control center: kcontrol
+
+ ● KDE Components->File Associations
+
+ ● Enter jar as filename pattern
+
+ ● Add java as application
+
10. Why do I have trouble with my FTP connection?
This problem often occurs when you are behind a firewall or proxy. Open KDE
- Control Center → Network → Preferences , "Enable Passive Mode (PASV)" has
- to be turned on or off, depending on it's current setting. Now try your FTP
+ Control Center->Network->Preferences, "Enable Passive Mode (PASV)" has to
+ be turned on or off, depending on it's current setting. Now try your FTP
session again to see if it works. Also, make sure you have no other FTP
sessions open (using web browsers, etc.), they can cause complications.
More information can be found in Active FTP vs. Passive FTP, a Definitive
@@ -635,80 +551,54 @@
the proxy settings in KDE Control Center. Modify the proxy settings to not
use HTTP proxy and FTP will work.
-12. How can I close a remote connection (e.g. a FTP connection)?
+12. How don't add ".part" suffix when copying files via ftp?
+ When uploading files a .part suffix is added to the filename, once the
+ upload is complete the filename is renamed automagically to remove the
+ .part suffix. This works great but sometimes some ftp-servers don't allow a
+ rename operation. You can solve this by unchecking the checkbox Mark
+ partially uploaded files in KDE's control center. The checkbox is located
+ at Internet and Network->Connection Preferences.
+
+13. How can I close a remote connection (e.g. a FTP connection)?
+
It's explained in the remote connections chapter.
-13. I am experiencing problems with the media:// protocol, why?
+14. I am experiencing problems with the media:/ protocol, why?
- At the moment of writing the media:// protocol is instable, we need to wait
- until the KDE team corrects it, every other protocol works properly with
- Krusader, only media fails. More information regarding this issue is
- available in our forum.
+ The media:/ protocol was removed from KDE4.
-14. How can I disable the default sounds, e.g. when I do a delete action ?
+15. How can I disable the default sounds, e.g. when I do a delete action ?
Those are the default KDE System sounds, and not related to Krusader. If
you want to disable them globally open your KDE KDE Control Center (
- kcontrol): KDE Control Center → Sound & Multimedia → System Notifications ,
+ kcontrol): KDE Control Center->Sound & Multimedia->System Notifications,
Event Source: "KDE System Notifications" and uncheck sound items you don't
like.
-15. Where is RemoteMan, the remote connection manager ?
+16. Where the remote connection manager ?
- RemoteMan has been replaced by our Bookmark Manager since Krusader
- 1.25-beta1. The Bookmark Manager handles local files and remote URL's the
- same way. RemoteMan was left as a selection until Krusader-1.51 to allow an
- easier transition and give you a chance to move your Bookmarks. RemoteMan
- was disabled, as announced, in Krusader-1.60.
+ Use our Bookmark Manager. Use a remote URL and bookmark it.
- URL transition procedure:
+17. Why doesn't mimetype magic sometimes work inside archives?
- 1. install Krusader-1.51
-
- 2. open the RemoteMan and connect to an FTP
-
- 3. once inside, bookmark the current location, select a name and save.
-
- 4. do this for all your connections, all the Bookmarks are now stored in
- krbookmarks.xml
-
- 5. install Krusader-1.60, it will use krbookmarks.xml or import it if
- needed.
-
-16. Why doesn't mimetype magic sometimes work inside archives?
-
When you enter an archive and press F3 to view a file that has no known
extension, e.g. README, INSTALL etc.. And if the viewer opens in hex-mode
- instead of the usual mode, than you need to configure: KDE Control Center →
- KDE components → File Associations → Application → octet-stream , binary
- viewer needs to be removed.
+ instead of the usual mode, than you need to configure: KDE Control Center->
+ KDE components->File Associations->Application->octet-stream, binary viewer
+ needs to be removed.
-17. Why doesn't the handbook work?
+18. Where is Konfigurator, do i need to install the KDE Desktop Enviroment to
+ use it?
- This error will happen on Debian® (or Debian® based) distro with the
- krusader_1.51-1_i386.deb package. You will see the next error message if
- you try to open the handbook: "The requested help file could not be found.
- Check that you have installed the documentation." To fix it go to /usr/
- share/doc/kde/HTML/en/krusader/, you will see the foo.docbook.gz files.
- Now, you need to extract all these files with root privileges ("File->
- Unpack" with Krusader) to create foo.docbook files. Now the handbook will
- work. This error is fixed in the krusader_1.60.0-1_i386.deb package and
- higher versions.
+ Konfigurator is Krusaders configuration module, when you have installed
+ Krusader than you have also Konfigurator. For some reason some people think
+ it's an other KDE application, but it is not, so you don't need to install
+ the KDE Desktop Enviroment to use Konfigurator. When runnig Krusader, use
+ Settings->Configure Krusader, and it will start Konfigurator. Please read
+ the manual, Krusader has many many configuration options, a lot of things
+ can be customized to your needs with Konfigurator.
-18. Why doesn't "save last location" work?
-
- Unfortunately the 1.70.x version contains a bug. The tabs are not saved if
- a "Panels Save Settings=Tabs" item is present in the configuration files.
- The fix is easy:
-
- ● open and edit ~/.kde/share/config/krusaderrc
-
- ● remove the "Panels Save Settings" item
-
- and it'll work with the <Last Session> feature in Konfigurator. More info
- can be found in our forum.
-
19. How can I set the look & feel of 2 different users to be the same?
Presuming that the current setup is the good configuration, you can copy
@@ -720,7 +610,6 @@
# cp ~/.kde/share/config/krusaderrc /root/.kde/share/config
-
General FAQ
1. How can I report a wish, a suggestion, or a comment?
@@ -734,8 +623,8 @@
9. How does the Krusader forum work?
10. How can I translate Krusader into my native language?
11. How can I support Krusader?
-12. Is there a Mac® OS X port?
-13. Is there a Windows® port?
+12. Is there a Mac OS X port?
+13. Is there a Windows port?
14. Why is Konqueror in "midnight commander style" not an OFM?
15. Why should I use an OFM?
@@ -852,7 +741,7 @@
Krusader-cvs, compile Krusader-cvs in debugmode and install it, than check
if the bug still exist.
- $ ./configure --enable-debug=full
+ $ cmake -DCMAKE_BUILD_TYPE=debugfull
Install valgrind, a suite of tools for debugging and profiling Linux®
programs. Run Valgrind/Krusader
@@ -870,7 +759,7 @@
Krusader-cvs, compile Krusader-cvs in debugmode and install it, than check
if the bug still exist.
- $ ./configure --enable-debug=full
+ $ cmake -DCMAKE_BUILD_TYPE=debugfull
If the KDEKrashhandler still doesn't provide usefull backtrace information,
than sometimes a coredump will give better information. Run Krusader, with
@@ -1007,9 +896,10 @@
13. Is there a Windows® port?
- No, but this might change in the future. Please help us with this project,
- contributions are greatly appreciated. A recommended native file manager
- for Windows® is Total Commander© (shareware).
+ Yes, since 18 June 2008, Krusader-2.x compiles on Windows®. Before Krusader
+ can be used several Qt™4-libraries and KDE4-libraries need to be installed.
+ A recommended native file manager for Windows® is Total Commander©
+ (shareware).
14. Why is Konqueror in "midnight commander style" not an OFM?
@@ -1024,5 +914,6 @@
feels, there is only one way to discover: install it on your computer and
use it for a while. If you prefer to waste time and lose productivity,
continue to use one panel filemanagers which are based on Windows®
- Explorer. Matej Urbančič has written a blogon why OFM is better than a one
+ Explorer. Matej Urbančič has written a blog on why OFM is better than a one
panel filemanager.
+
Modified: trunk/krusader_kde4/doc/ChangeLog
===================================================================
--- trunk/krusader_kde4/doc/ChangeLog 2009-01-23 21:02:04 UTC (rev 6192)
+++ trunk/krusader_kde4/doc/ChangeLog 2009-01-24 21:44:57 UTC (rev 6193)
@@ -1,7 +1,7 @@
The Krusader Handbook ChangeLog
-------------------------------
-
+UPDATED: FAQ, removed KDE3 issues and added KDE4 updates
UPDATED: shred is not longer supported by Krusader2 - KDE4
2.0.0-beta2 "Space Odyssey"
Modified: trunk/krusader_kde4/doc/en/faq.docbook
===================================================================
--- trunk/krusader_kde4/doc/en/faq.docbook 2009-01-23 21:02:04 UTC (rev 6192)
+++ trunk/krusader_kde4/doc/en/faq.docbook 2009-01-24 21:44:57 UTC (rev 6193)
@@ -124,33 +124,11 @@
only need the C-compliler &gcc; when you
compile &krusader; from source (see the next
question).</para>
- <para>Here is a list of the required shared libraries
- when you run &krusader;:</para>
+ <para>Take a look at the <link linkend="compilation">Krusader dependencies</link> paragraph of our install chapter.</para>
<para>
- <itemizedlist>
- <listitem>
- <para>kdelibs (for the required &kde;
- version see the &install-proc-lnk;)</para>
- </listitem>
- <listitem>
- <para>libacl1 libart-2.0 libattr1 libaudio2 libc6
- libfam0 libfontconfig1</para>
- </listitem>
- <listitem>
- <para>libfreetype6 libgcc1 libgcc2 libice6 libidn11
- libjpeg62 libkjsembed1</para>
- </listitem>
- <listitem>
- <para>libkonq4 libpcre3 libpng12 libqt3-mt libsm6
- libstdc++6 libunwind7 libx11-6</para>
- </listitem>
- <listitem>
- <para>libxcursor1 libxext6 libxft2 libxi6
- libxinerama1 libxrandr2 libxrender1 libxt6
- zlib1g</para>
- </listitem>
- </itemizedlist>If you need more info please take a look
- at the &deb-requirements-url; .</para>
+ If you need more details please take a look
+ at the <ulink url="http://packages.ubuntu.com/jaunty/krusader">Krusader requirements</ulink> on Ubuntu.
+ The "depends" are required, the "suggests" make Krusader more powerful.</para>
<para></para>
<!-- Empty line to make it more readable -->
</answer>
@@ -158,48 +136,12 @@
<qandaentry>
<question id="faqi_missing_libs">
<para>I have followed all the steps but
- <command>configure</command>complains about missing libs
+ <command>make</command> complains about missing libs
or headers. What do I need to do?</para>
</question>
<answer>
<para>Install the missing packages.</para>
- <para>Here is a list of the required packages to compile
- &krusader; from source:</para>
- <para>
- <itemizedlist>
- <listitem>
- <para>gcc-cpp gcc-c++ glibc libgcc1 (other
- compilers may work but haven't been tested)</para>
- </listitem>
- <listitem>
- <para>autoconf automake XFree</para>
- </listitem>
- <listitem>
- <para>libqt3 libqt-devel</para>
- </listitem>
- <listitem>
- <para>kdelibs kdelibs-devel</para>
- </listitem>
- <listitem>
- <para>libjpeg62 libjpeg-devel libpng3
- libmng1</para>
- </listitem>
- <listitem>
- <para>fam libfam-devel</para>
- </listitem>
- <listitem>
- <para>zlib1 arts libart_lgpl2 libstdc++5
- libpcre0</para>
- </listitem>
- <listitem>
- <para>libkjsembed, if you use the
- &javascript-console-lnk;, often found in
- a package called KDEbindings(-devel) and
- libkonq-dev for the &konqueror;
- right-click menu entries.</para>
- </listitem>
- </itemizedlist>
- </para>
+ <para>Take a look at the <link linkend="compilation">Compilation requirements</link> paragraph of our install chapter.</para>
<para>Most RPM-based distributions separate the headers
from the libs. The headers are needed to compile
&krusader;. Look for packages in the form
@@ -458,56 +400,8 @@
<!-- Empty line to make it more readable -->
</answer>
</qandaentry>
+
<qandaentry>
- <question id="faqi_libfam_la">
- <para>When I run
- <command>make</command>, it complains about
- <filename>libfam.la</filename>, what's wrong?</para>
- </question>
- <answer>
- <para>The
- <command>./configure</command> script does not check for
- the presence of
- <filename>libfam.la</filename>, and
- <command>make</command> needs
- <filename>libfam.la</filename> to compile
- &krusader;. If you know how this can be
- solved, please let us know. Install
- <filename>libfam0-devel-foo.rpm</filename>. Note: when
- you install &Mandrake;-&Linux; 9.2
- with the default settings, this package is not installed.
- If you need more information take a look at
- &missing-libs-lnk;.</para>
- <para></para>
- <!-- Empty line to make it more readable -->
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="faqi_deb-qt">
- <para>&debian; complains about &Qt;
- when running
- <command>./configure</command>, what's wrong?</para>
- </question>
- <answer>
- <para>This problem occurs when you use &gcc;
- 2.95, you need to install &gcc; 3.2 (or
- higher). You also need to set the enviroment variables
- "CC, CPP and CXX" before running the
- <command>./configure</command> script.
- <screen><prompt>$</prompt> <userinput><command>export</command> CC=<replaceable>/usr/bin/gcc-3.2</replaceable></userinput>
- <prompt>$</prompt> <userinput><command>export</command> CXX=<replaceable>/usr/bin/g++-3.2</replaceable></userinput>
- <prompt>$</prompt> <userinput><command>export</command> CPP=<replaceable>/usr/bin/cpp-3.2</replaceable></userinput>
- </screen>
- For more information please take a look
- &debian-qt-a-url; and at the
- &debian-qt-b-url; on how to build a
- &Qt;/&kde;3 application on
- &debian;.</para>
- <para></para>
- <!-- Empty line to make it more readable -->
- </answer>
- </qandaentry>
- <qandaentry>
<question id="faqi_nvidia">
<para>I have a
<filename>libGLcore.so.1</filename> compile error after
@@ -549,35 +443,8 @@
<!-- Empty line to make it more readable -->
</answer>
</qandaentry>
+
<qandaentry>
- <question id="faqi_gcc4">
- <para>Why &krusader;-1.60.x does not compile
- with gcc4?</para>
- </question>
- <answer>
- <para>Because &krusader;-1.60.x was not gcc4
- compatible, it first needs some patches:
- <itemizedlist>
- <listitem>
- <para>add 'class ListPanelFunc;' in
- krusader/Panel/listpanel.h</para>
- </listitem>
- <listitem>
- <para>add 'class KMountManGUI;' in
- krusader/MountMan/kmountman.h</para>
- </listitem>
- <listitem>
- <para>add 'class KrDetailedViewItem;' in
- krusader/Panel/krdetailedview.h</para>
- </listitem>
- </itemizedlist>More information can be found in our
- <ulink url="http://www.krusader.org/phpBB/viewtopic.php?t=1328">
- forum</ulink>.</para>
- <para></para>
- <!-- Empty line to make it more readable -->
- </answer>
- </qandaentry>
- <qandaentry>
<question id="faqi_help_request">
<para>I am having trouble compiling and installing
&krusader;, how do I send a help
@@ -721,13 +588,13 @@
</answer>
</qandaentry>
<qandaentry>
- <question id="faqi_cvs_verion">
- <para>Why does &krusader;-cvs show an old
+ <question id="faqi_svn_verion">
+ <para>Why does &krusader;-svn show an old
version number in the about box?</para>
</question>
<answer>
<para>Because we only change the version number just
- before we do a new release. &krusader;-cvs
+ before we do a new release. &krusader;-svn
will show an older version number, so ignore the version
number and check the download date. We simply haven't yet
decided what the next version number will be.</para>
@@ -860,37 +727,8 @@
<!-- Empty line to make it more readable -->
</answer>
</qandaentry>
+
<qandaentry>
- <question id="faqu_refresh">
- <para>When I perform some file operations,
- &krusader;'s panel doesn't refresh / I'm using
- &krusader; with fam installed, but updates to
- the panel are not shown. Why?</para>
- </question>
- <answer>
- <para>The bad news is that we're not sure why, but it
- seems that
- <command>fam</command> (file alteration monitor) sometimes
- refuses to work. We are looking into this problem to make
- sure it is not
- <emphasis>our</emphasis> problem. We've tried the same
- source code on two different Gentoo installations: one
- worked, the other did not. The good news is that if you
- disable
- <application>fam</application>, &krusader;
- will automatically revert to its internal update
- mechanism (which is less efficient, but works) without
- needing to recompile. You can disable
- <application>fam</application> with:
- <screen><prompt>$</prompt> <userinput><command>su -c 'fam -l'</command></userinput></screen>
- Look at the manpages for more information about
- <application>fam</application>.</para>
- <para></para>
- <!-- Empty line to make it more readable -->
- </answer>
- </qandaentry>
- <!-- Thanks to Karai Csaba -->
- <qandaentry>
<question id="faqu_samba_codepage">
<para>
<application>Samba</application> ISO 8859-x codepage /
@@ -1109,17 +947,11 @@
</qandaentry>
<qandaentry>
<question id="faqu_media_protocol">
- <para>I am experiencing problems with the media://
+ <para>I am experiencing problems with the media:/
protocol, why?</para>
</question>
<answer>
- <para>At the moment of writing the media:// protocol is
- instable, we need to wait until the &kde; team
- corrects it, every other protocol works properly with
- &krusader;, only media fails. More information
- regarding this issue is available in
- <ulink url="http://www.krusader.org/phpBB/viewtopic.php?t=1357">
- our forum</ulink>.</para>
+ <para>The media:/ protocol was removed from KDE4.</para>
<para></para>
<!-- Empty line to make it more readable -->
</answer>
@@ -1151,43 +983,13 @@
</qandaentry>
<qandaentry>
<question id="faqu_remoteMan">
- <para>Where is RemoteMan, the remote connection manager
+ <para>Where the remote connection manager
?</para>
</question>
<answer>
- <para>RemoteMan has been replaced by our Bookmark Manager
- since Krusader 1.25-beta1. The Bookmark Manager handles
- local files and
+ <para>Use our Bookmark Manager. Use a
<link linkend="remote-connections">remote
- &URL;'s</link> the same way. RemoteMan was left
- as a selection until &krusader;-1.51 to allow
- an easier transition and give you a chance to move your
- &bookmarks-lnk;. RemoteMan was disabled, as
- announced, in &krusader;-1.60.</para>
- <para>&URL; transition procedure:
- <orderedlist numeration="arabic">
- <listitem>
- <para>install &krusader;-1.51</para>
- </listitem>
- <listitem>
- <para>open the RemoteMan and connect to an
- &FTP;</para>
- </listitem>
- <listitem>
- <para>once inside, bookmark the current location,
- select a name and save.</para>
- </listitem>
- <listitem>
- <para>do this for all your connections, all the
- &bookmarks-lnk; are now stored in
- <filename>krbookmarks.xml</filename></para>
- </listitem>
- <listitem>
- <para>install &krusader;-1.60, it will use
- <filename>krbookmarks.xml</filename> or import it if
- needed.</para>
- </listitem>
- </orderedlist></para>
+ &URL;</link> and bookmark it.</para>
<para></para>
<!-- Empty line to make it more readable -->
</answer>
@@ -1259,61 +1061,6 @@
</answer>
</qandaentry>
- <qandaentry>
- <question id="faqu_save_last_location">
- <para>Why doesn't "save last location" work?</para>
- </question>
- <answer>
- <para>Unfortunately the 1.70.x version contains a bug.
- The tabs are not saved if a "Panels Save Settings=Tabs"
- item is present in the configuration files. The fix is
- easy:
- <itemizedlist>
- <listitem>
- <para>open and edit
- <filename>
- ~/.kde/share/config/krusaderrc</filename></para>
- </listitem>
- <listitem>
- <para>remove the "Panels Save Settings" item</para>
- </listitem>
- </itemizedlist>and it'll work with the
- <Last Session> feature in
- Konfigurator. More info can be found in
- <ulink url="http://www.krusader.org/phpBB/viewtopic.php?t=1357">
- our forum</ulink>.</para>
- <para></para>
- <!-- Empty line to make it more readable -->
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="faqu_handbook">
- <para>Why doesn't the handbook work?</para>
- </question>
- <answer>
- <para>This error will happen on &debian; (or
- &debian; based) distro with the
- krusader_1.51-1_i386.deb package. You will see the next
- error message if you try to open the handbook: "The
- requested help file could not be found. Check that you
- have installed the documentation." To fix it go to
- <filename>
- /usr/share/doc/kde/HTML/en/krusader/</filename>, you will
- see the
- <filename>foo.docbook.gz</filename> files. Now, you need
- to extract all these files with root privileges
- ("File->Unpack" with &krusader;)
- to create
- <filename>foo.docbook</filename> files. Now the handbook
- will work. This error is fixed in the
- krusader_1.60.0-1_i386.deb package and higher
- versions.</para>
- <para></para>
- <!-- Empty line to make it more readable -->
- </answer>
- </qandaentry>
-
</qandaset>
</sect1>
<sect1 id="faq_general">
@@ -1508,7 +1255,7 @@
<answer>
<para>Usually binary packages that are been used by your distribution do not contain debug information.
Since we usually only develop and fix &krusader;-cvs, compile &krusader;-cvs in debugmode and install it, than check if the bug still exist.
- <screen><prompt>$</prompt> <userinput><command>./configure</command> <option>--enable-debug=full</option></userinput></screen>
+ <screen><prompt>$</prompt> <userinput><command>cmake</command> <option>-DCMAKE_BUILD_TYPE=debugfull</option></userinput></screen>
Install <ulink url="http://valgrind.org">valgrind</ulink>, a suite of tools for debugging and profiling &Linux; programs.
@@ -1529,7 +1276,7 @@
<answer>
<para>Usually binary packages that are been used by your distribution do not contain debug information.
Since we usually only develop and fix &krusader;-cvs, compile &krusader;-cvs in debugmode and install it, than check if the bug still exist.
- <screen><prompt>$</prompt> <userinput><command>./configure</command> <option>--enable-debug=full</option></userinput></screen>
+ <screen><prompt>$</prompt> <userinput><command>cmake</command> <option>-DCMAKE_BUILD_TYPE=debugfull</option></userinput></screen>
If the KDEKrashhandler still doesn't provide usefull backtrace information, than sometimes a coredump will give better information.
Run Krusader, with disabled crashhandler.
@@ -1825,7 +1572,7 @@
Urbančič has written
a
<ulink url="http://murban.blogspot.com/2006/01/krusader-and-konqueror-twin-versus-one.html">
- blog</ulink>on why
+ blog</ulink> on why
<link linkend="gloss-ofm">OFM</link> is better than a one
panel filemanager.</para>
<para></para>
Modified: trunk/krusader_kde4/doc/en/index.docbook
===================================================================
--- trunk/krusader_kde4/doc/en/index.docbook 2009-01-23 21:02:04 UTC (rev 6192)
+++ trunk/krusader_kde4/doc/en/index.docbook 2009-01-24 21:44:57 UTC (rev 6193)
@@ -86,7 +86,6 @@
<!ENTITY docchangelog-url '<ulink url="http://cvs.sourceforge.net/viewcvs.py/krusader/krusader_kde3/doc/ChangeLog?view=markup">Documentation ChangeLog</ulink>'>
<!ENTITY i18n-page-url '<ulink url="http://www.krusader.org/i18n.php">i18n page</ulink>'>
-<!ENTITY deb-requirements-url '<ulink url="http://packages.debian.org/unstable/utils/krusader">requirements on &debian;</ulink>'>
<!ENTITY mailing-lists-url '<ulink url="http://www.krusader.org/lists.php">mailing lists</ulink>'>
<!ENTITY krunews-url '<ulink url="http://groups-beta.google.com/group/krusader-news">&krusader;-news</ulink>'>
<!ENTITY krulatestnews-url '<ulink url="http://www.krusader.org/news.php">latest news</ulink>'>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cod...@us...> - 2009-01-23 21:02:06
|
Revision: 6192
http://krusader.svn.sourceforge.net/krusader/?rev=6192&view=rev
Author: codeknight
Date: 2009-01-23 21:02:04 +0000 (Fri, 23 Jan 2009)
Log Message:
-----------
UPDATED: shred is not longer supported by Krusader2 - KDE4
Modified Paths:
--------------
trunk/krusader_kde4/doc/ChangeLog
trunk/krusader_kde4/doc/en/index.docbook
trunk/krusader_kde4/doc/en/using-krusader.docbook
Modified: trunk/krusader_kde4/doc/ChangeLog
===================================================================
--- trunk/krusader_kde4/doc/ChangeLog 2009-01-18 16:35:12 UTC (rev 6191)
+++ trunk/krusader_kde4/doc/ChangeLog 2009-01-23 21:02:04 UTC (rev 6192)
@@ -1,6 +1,9 @@
The Krusader Handbook ChangeLog
-------------------------------
+
+UPDATED: shred is not longer supported by Krusader2 - KDE4
+
2.0.0-beta2 "Space Odyssey"
==================================
Date: 2008-12-27
Modified: trunk/krusader_kde4/doc/en/index.docbook
===================================================================
--- trunk/krusader_kde4/doc/en/index.docbook 2009-01-18 16:35:12 UTC (rev 6191)
+++ trunk/krusader_kde4/doc/en/index.docbook 2009-01-23 21:02:04 UTC (rev 6192)
@@ -552,7 +552,7 @@
Back-Cover Texts. A copy of the license is included in the
&krusader; sources.</para>
</legalnotice>
- <date>2008-12-23</date>
+ <date>2009-01-23</date>
<releaseinfo>2.0.0-beta2 "Space Odyssey"</releaseinfo>
<abstract>
<para>&krusader; is an advanced, twin-panel
Modified: trunk/krusader_kde4/doc/en/using-krusader.docbook
===================================================================
--- trunk/krusader_kde4/doc/en/using-krusader.docbook 2009-01-18 16:35:12 UTC (rev 6191)
+++ trunk/krusader_kde4/doc/en/using-krusader.docbook 2009-01-23 21:02:04 UTC (rev 6192)
@@ -380,7 +380,8 @@
<keycap>F8</keycap> or
<keycap>Delete</keycap>. By
<link linkend="konfig-general">default</link> it will be moved
- to &kde;'s Trash,
+ to &kde;'s Trash. You can open the KDE Trash with <filename>trash:/</filename> ("kdebase3-runtime" needs to be installed, otherwise the KDE trash protocol will not work).
+ Phisically KDE Trash is located in <filename>~/.local/share/Trash/</filename> .
<keycombo action="simul">&Shift;
<keycap>Delete</keycap></keycombo> will delete the file
permanently. A dialog will ask for your confirmation and will
@@ -394,17 +395,12 @@
</sect2>
<sect2 id="shred">
<title>Shred Files</title>
- <para>When you delete files in your local system, they are
- not completely erased and the information stored in them can
- be recovered using special software and hardware tools. If
- you want to erase a file without recoverable traces, select
- the file and use
- <emphasis role="bold">
- <menuchoice>
- <guimenu>Right-Click menu</guimenu>
- <guimenuitem>Shred</guimenuitem>
- </menuchoice>
- </emphasis>.</para>
+ <para>Shred was removed from KDE4 (and as consequence Krusader-2 for KDE4).
+ The main reason is probably that shredding is filesystem dependent and even if you overwrite the file 100 times, it's not sure, that it'll be deleted from the disk finally.
+ Quote from the kgpg posts: "The shred feature has been removed from the KDE library. Kgpg will not support this feature anymore. Moderns file systems use journalisation. So the shred feature should be implemented in the file system. Not in kgpg."
+ But you might use a proper shred <link linkend="useractions">UserAction</link> for your filesystem.
+ But keep in mind that if you want to be 100% shure that it's impossible that someone can read a deleted file, you need to destroy your harddrive hardware ...
+ </para>
</sect2>
<sect2 id="renaming">
<title>Renaming Files, Creating Directories and Link
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-01-18 16:35:19
|
Revision: 6191
http://krusader.svn.sourceforge.net/krusader/?rev=6191&view=rev
Author: ckarai
Date: 2009-01-18 16:35:12 +0000 (Sun, 18 Jan 2009)
Log Message:
-----------
krarc Windows fixes 1.
Modified Paths:
--------------
trunk/krusader_kde4/krArc/krarc.cpp
trunk/krusader_kde4/krArc/krarc.h
trunk/krusader_kde4/krusader/Panel/panelfunc.cpp
trunk/krusader_kde4/krusader/VFS/krvfshandler.cpp
trunk/krusader_kde4/krusader/VFS/normal_vfs.cpp
trunk/krusader_kde4/krusader/defaults.h
trunk/krusader_kde4/krusader/krservices.cpp
trunk/krusader_kde4/krusader/krservices.h
Modified: trunk/krusader_kde4/krArc/krarc.cpp
===================================================================
--- trunk/krusader_kde4/krArc/krarc.cpp 2009-01-18 11:52:14 UTC (rev 6190)
+++ trunk/krusader_kde4/krArc/krarc.cpp 2009-01-18 16:35:12 UTC (rev 6191)
@@ -142,7 +142,7 @@
QString dirName = "krArc"+QDateTime::currentDateTime().toString(Qt::ISODate);
dirName.replace(QRegExp(":"),"_");
QDir(arcTempDir).mkdir(dirName);
- arcTempDir = arcTempDir+dirName+"/";
+ arcTempDir = arcTempDir+dirName+DIR_SEPARATOR;
krArcCodec = new KrArcCodec( QTextCodec::codecForLocale() );
}
@@ -165,15 +165,15 @@
}
void kio_krarcProtocol::mkdir(const KUrl& url,int permissions){
- KRDEBUG(url.path());
+ KRDEBUG(getPath( url ));
if( !setArcFile( url ) ) {
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
if( newArchiveURL && !initDirDict(url) ){
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
@@ -184,8 +184,8 @@
}
if( arcType == "arj" || arcType == "lha" ) {
- QString arcDir = url.path().mid(arcFile->url().path().length());
- if( arcDir.right(1) != "/") arcDir = arcDir+"/";
+ QString arcDir = getPath(url).mid(getPath( arcFile->url() ).length());
+ if( arcDir.right(1) != DIR_SEPARATOR ) arcDir = arcDir+DIR_SEPARATOR;
if( dirDict.find( arcDir ) == dirDict.end() )
addNewDir( arcDir );
@@ -194,24 +194,24 @@
}
QString arcDir = findArcDirectory(url);
- QString tempDir = arcDir.mid(1) + url.path().mid(url.path().lastIndexOf("/")+1);
- if( tempDir.right(1) != "/" ) tempDir = tempDir+"/";
+ QString tempDir = arcDir.mid(1) + getPath(url).mid(getPath(url).lastIndexOf( DIR_SEPARATOR )+1);
+ if( tempDir.right(1) != DIR_SEPARATOR ) tempDir = tempDir+DIR_SEPARATOR;
if( permissions == -1 ) permissions = 0777; //set default permissions
QByteArray arcTempDirEnc = arcTempDir.toLocal8Bit();
- for( int i=0;i<tempDir.length() && i >= 0; i=tempDir.indexOf("/",i+1)){
+ for( int i=0;i<tempDir.length() && i >= 0; i=tempDir.indexOf(DIR_SEPARATOR,i+1)){
QByteArray newDirs = encodeString( tempDir.left( i ) );
newDirs.prepend(arcTempDirEnc);
KDE_mkdir( newDirs, permissions);
}
- if( tempDir.endsWith( "/" ) )
+ if( tempDir.endsWith( DIR_SEPARATOR ) )
tempDir.truncate( tempDir.length() - 1 );
// pack the directory
KrLinecountingProcess proc;
- proc << putCmd << arcFile->url().path() << localeEncodedString( tempDir );
+ proc << putCmd << getPath( arcFile->url() ) << localeEncodedString( tempDir );
infoMessage(i18n("Creating %1 ...", url.fileName() ) );
QDir::setCurrent(arcTempDir);
@@ -225,7 +225,7 @@
QDir().rmdir(arcTempDir);
if( proc.exitStatus() != QProcess::NormalExit || !checkStatus( proc.exitCode() ) ) {
- error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() );
+ error(ERR_COULD_NOT_WRITE,getPath(url) + "\n\n" + proc.getErrorMsg() );
return;
}
@@ -235,17 +235,17 @@
}
void kio_krarcProtocol::put(const KUrl& url,int permissions, KIO::JobFlags flags){
- KRDEBUG(url.path());
+ KRDEBUG(getPath(url));
bool overwrite = !!( flags & KIO::Overwrite );
bool resume = !!( flags & KIO::Resume );
if( !setArcFile( url ) ) {
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
if( newArchiveURL && !initDirDict(url) ){
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
@@ -255,20 +255,20 @@
return;
}
if( !overwrite && findFileEntry(url) ){
- error( ERR_FILE_ALREADY_EXIST,url.path() );
+ error( ERR_FILE_ALREADY_EXIST,getPath(url) );
return;
}
QString arcDir = findArcDirectory(url);
- QString tempFile = arcDir.mid(1) + url.path().mid(url.path().lastIndexOf("/")+1);
+ QString tempFile = arcDir.mid(1) + getPath(url).mid(getPath(url).lastIndexOf(DIR_SEPARATOR)+1);
QString tempDir = arcDir.mid(1);
- if( tempDir.right(1) != "/" ) tempDir = tempDir+"/";
+ if( tempDir.right(1) != DIR_SEPARATOR ) tempDir = tempDir+DIR_SEPARATOR;
if( permissions == -1 ) permissions = 0777; //set default permissions
QByteArray arcTempDirEnc = arcTempDir.toLocal8Bit();
- for( int i=0;i<tempDir.length() && i >= 0; i=tempDir.indexOf("/",i+1)){
+ for( int i=0;i<tempDir.length() && i >= 0; i=tempDir.indexOf(DIR_SEPARATOR,i+1)){
QByteArray newDirs = encodeString( tempDir.left( i ) );
newDirs.prepend(arcTempDirEnc);
KDE_mkdir( newDirs, 0755 );
@@ -303,7 +303,7 @@
::close(fd);
// pack the file
KrLinecountingProcess proc;
- proc << putCmd << arcFile->url().path() << localeEncodedString( tempFile );
+ proc << putCmd << getPath(arcFile->url()) << localeEncodedString( tempFile );
infoMessage(i18n("Packing %1 ...", url.fileName() ) );
QDir::setCurrent(arcTempDir);
@@ -317,7 +317,7 @@
QDir().rmdir(arcTempDir);
if( proc.exitStatus() != QProcess::NormalExit || !checkStatus( proc.exitCode() ) ) {
- error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() );
+ error(ERR_COULD_NOT_WRITE,getPath(url) + "\n\n" + proc.getErrorMsg() );
return;
}
// force a refresh of archive information
@@ -331,14 +331,14 @@
void kio_krarcProtocol::get(const KUrl& url, int tries ){
bool decompressToFile = false;
- KRDEBUG(url.path());
+ KRDEBUG(getPath(url));
if( !setArcFile( url ) ) {
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
if( newArchiveURL && !initDirDict(url) ){
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
@@ -349,25 +349,25 @@
}
UDSEntry* entry = findFileEntry(url);
if( !entry ){
- error(KIO::ERR_DOES_NOT_EXIST,url.path());
+ error(KIO::ERR_DOES_NOT_EXIST,getPath(url));
return;
}
if(KFileItem(*entry,url).isDir()){
- error(KIO::ERR_IS_DIRECTORY,url.path());
+ error(KIO::ERR_IS_DIRECTORY,getPath(url));
return;
}
KIO::filesize_t expectedSize = KFileItem(*entry,url).size();
// for RPM files extract the cpio file first
if( !extArcReady && arcType == "rpm"){
KrLinecountingProcess cpio;
- cpio << "rpm2cpio" << arcFile->url().path(KUrl::RemoveTrailingSlash);
+ cpio << "rpm2cpio" << getPath( arcFile->url(), KUrl::RemoveTrailingSlash);
cpio.setStandardOutputFile( arcTempDir+"contents.cpio" );
cpio.start();
cpio.waitForFinished();
if( cpio.exitStatus() != QProcess::NormalExit || !checkStatus( cpio.exitCode() ) ) {
- error(ERR_COULD_NOT_READ,url.path() + "\n\n" + cpio.getErrorMsg() );
+ error(ERR_COULD_NOT_READ,getPath(url) + "\n\n" + cpio.getErrorMsg() );
return;
}
extArcReady = true;
@@ -375,26 +375,26 @@
// for DEB files extract the tar file first
if ( !extArcReady && arcType == "deb" ) {
KrLinecountingProcess dpkg;
- dpkg << cmd << "--fsys-tarfile" << arcFile->url().path( KUrl::RemoveTrailingSlash );
+ dpkg << cmd << "--fsys-tarfile" << getPath( arcFile->url(), KUrl::RemoveTrailingSlash );
dpkg.setStandardOutputFile( arcTempDir + "contents.cpio" );
dpkg.start();
dpkg.waitForFinished();
if( dpkg.exitStatus() != QProcess::NormalExit || !checkStatus( dpkg.exitCode() ) ) {
- error(ERR_COULD_NOT_READ,url.path() + "\n\n" + dpkg.getErrorMsg() );
+ error(ERR_COULD_NOT_READ,getPath(url) + "\n\n" + dpkg.getErrorMsg() );
return;
}
extArcReady = true;
}
// Use the external unpacker to unpack the file
- QString file = url.path().mid(arcFile->url().path().length()+1);
+ QString file = getPath(url).mid(getPath( arcFile->url() ).length()+1);
KrLinecountingProcess proc;
if( extArcReady ){
proc << getCmd << arcTempDir+"contents.cpio" << "*"+localeEncodedString( file );
} else if( arcType == "arj" || arcType == "ace" || arcType == "7z" ) {
- proc << getCmd << arcFile->url().path(KUrl::RemoveTrailingSlash) << localeEncodedString( file );
+ proc << getCmd << getPath(arcFile->url(),KUrl::RemoveTrailingSlash) << localeEncodedString( file );
if( arcType == "ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
proc.setStandardInputFile("/dev/ptmx");
file = url.fileName();
@@ -406,7 +406,7 @@
KMimeType::Ptr mt = KMimeType::findByUrl( arcTempDir+file, 0, false /* NOT local URL */ );
if( mt )
emit mimeType( mt->name() );
- proc << getCmd << arcFile->url().path();
+ proc << getCmd << getPath( arcFile->url() );
if( arcType != "gzip" && arcType != "bzip2" && arcType != "lzma" ) proc << localeEncodedString( file );
connect(&proc,SIGNAL(newOutputData(KProcess *, QByteArray &)),
this,SLOT(receivedData(KProcess *, QByteArray &)) );
@@ -417,6 +417,7 @@
QDir::setCurrent(arcTempDir);
SET_KRCODEC
+ proc.setTextModeEnabled( false );
proc.start();
RESET_KRCODEC
@@ -429,7 +430,7 @@
get( url, tries - 1 );
return;
}
- error( KIO::ERR_ACCESS_DENIED, url.path() + "\n\n" + proc.getErrorMsg() );
+ error( KIO::ERR_ACCESS_DENIED, getPath(url) + "\n\n" + proc.getErrorMsg() );
return;
}
}
@@ -442,7 +443,7 @@
get( url, tries - 1 );
return;
}
- error( KIO::ERR_ACCESS_DENIED, url.path() );
+ error( KIO::ERR_ACCESS_DENIED, getPath(url) );
return;
}
// the follwing block is ripped from KDE file KIO::Slave
@@ -451,22 +452,22 @@
KDE_struct_stat buff;
if( KDE_lstat( _path.data(), &buff ) == -1 ) {
if ( errno == EACCES )
- error( KIO::ERR_ACCESS_DENIED, url.path() );
+ error( KIO::ERR_ACCESS_DENIED, getPath(url) );
else
- error( KIO::ERR_DOES_NOT_EXIST, url.path() );
+ error( KIO::ERR_DOES_NOT_EXIST, getPath(url) );
return;
}
if ( S_ISDIR( buff.st_mode ) ) {
- error( KIO::ERR_IS_DIRECTORY, url.path() );
+ error( KIO::ERR_IS_DIRECTORY, getPath(url) );
return;
}
if ( !S_ISREG(buff.st_mode) ) {
- error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() );
+ error( KIO::ERR_CANNOT_OPEN_FOR_READING, getPath(url) );
return;
}
int fd = KDE_open( _path.data(), O_RDONLY );
if ( fd < 0 ) {
- error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() );
+ error( KIO::ERR_CANNOT_OPEN_FOR_READING, getPath(url) );
return;
}
// Determine the mimetype of the file to be retrieved, and emit it.
@@ -497,7 +498,7 @@
if (n == -1){
if (errno == EINTR)
continue;
- error( KIO::ERR_COULD_NOT_READ, url.path());
+ error( KIO::ERR_COULD_NOT_READ, getPath(url));
::close(fd);
return;
}
@@ -527,14 +528,14 @@
}
void kio_krarcProtocol::del(KUrl const & url, bool isFile){
- KRDEBUG(url.path());
+ KRDEBUG(getPath(url));
if( !setArcFile( url ) ) {
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
if( newArchiveURL && !initDirDict(url) ){
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
@@ -545,17 +546,17 @@
}
if( !findFileEntry(url) ){
if( ( arcType != "arj" && arcType != "lha" ) || isFile ) {
- error(KIO::ERR_DOES_NOT_EXIST,url.path());
+ error(KIO::ERR_DOES_NOT_EXIST,getPath(url));
return;
}
}
- QString file = url.path().mid(arcFile->url().path().length()+1);
- if( !isFile && file.right(1) != "/" ) {
- if(arcType == "zip") file = file + "/";
+ QString file = getPath(url).mid(getPath(arcFile->url()).length()+1);
+ if( !isFile && file.right(1) != DIR_SEPARATOR ) {
+ if(arcType == "zip") file = file + DIR_SEPARATOR;
}
KrLinecountingProcess proc;
- proc << delCmd << arcFile->url().path() << localeEncodedString( file );
+ proc << delCmd << getPath(arcFile->url()) << localeEncodedString( file );
infoMessage(i18n("Deleting %1 ...", url.fileName() ) );
SET_KRCODEC
@@ -564,7 +565,7 @@
proc.waitForFinished();
if( proc.exitStatus() != QProcess::NormalExit || !checkStatus( proc.exitCode() ) ) {
- error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() );
+ error(ERR_COULD_NOT_WRITE,getPath(url) + "\n\n" + proc.getErrorMsg() );
return;
}
// force a refresh of archive information
@@ -573,13 +574,13 @@
}
void kio_krarcProtocol::stat( const KUrl & url ){
- KRDEBUG(url.path());
+ KRDEBUG(getPath(url));
if( !setArcFile( url ) ) {
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
if( newArchiveURL && !initDirDict(url) ){
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
@@ -588,13 +589,13 @@
i18n("Accessing files is not supported with the %1 archives", arcType) );
return;
}
- QString path = url.path(KUrl::RemoveTrailingSlash);
+ QString path = getPath( url, KUrl::RemoveTrailingSlash);
KUrl newUrl = url;
// but treat the archive itself as the archive root
- if( path == arcFile->url().path(KUrl::RemoveTrailingSlash) ){
- newUrl.setPath(path+"/");
- path = newUrl.path();
+ if( path == getPath( arcFile->url(), KUrl::RemoveTrailingSlash) ){
+ newUrl.setPath(path+DIR_SEPARATOR);
+ path = getPath( newUrl );
}
// we might be stating a real file
if( QFileInfo(path).exists() ){
@@ -616,7 +617,7 @@
}
void kio_krarcProtocol::copy (const KUrl &url, const KUrl &dest, int, KIO::JobFlags flags) {
- KRDEBUG(url.path());
+ KRDEBUG(getPath(url));
bool overwrite = !!(flags & KIO::Overwrite );
// KDE HACK: opening the password dlg in copy causes error for the COPY, and further problems
@@ -630,17 +631,17 @@
break;
//the file exists and we don't want to overwrite
- if ((!overwrite) && ( QFile( dest.path() ).exists() ) ) {
- error(ERR_FILE_ALREADY_EXIST, QFile::encodeName(dest.path()) );
+ if ((!overwrite) && ( QFile( getPath(dest) ).exists() ) ) {
+ error(ERR_FILE_ALREADY_EXIST, QFile::encodeName(getPath(dest)) );
return;
};
if( !setArcFile( url ) ) {
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
if( newArchiveURL && !initDirDict(url) ){
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
@@ -648,11 +649,11 @@
if( copyCmd.isEmpty() || !entry )
break;
- QString file = url.path().mid(arcFile->url().path().length()+1);
+ QString file = getPath(url).mid(getPath(arcFile->url()).length()+1);
- QString destDir = dest.path( KUrl::RemoveTrailingSlash );
+ QString destDir = getPath(dest, KUrl::RemoveTrailingSlash );
if( !QDir( destDir ).exists() ) {
- int ndx = destDir.lastIndexOf( '/' );
+ int ndx = destDir.lastIndexOf( DIR_SEPARATOR_CHAR );
if( ndx != -1 )
destDir.truncate( ndx+1 );
}
@@ -660,7 +661,7 @@
QDir::setCurrent( destDir );
KrLinecountingProcess proc;
- proc << copyCmd << arcFile->url().path(KUrl::RemoveTrailingSlash) << file;
+ proc << copyCmd << getPath(arcFile->url(),KUrl::RemoveTrailingSlash) << file;
if( arcType == "ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
proc.setStandardInputFile("/dev/ptmx");
proc.setOutputChannelMode(KProcess::SeparateChannels); // without this output redirection has no effect
@@ -669,11 +670,11 @@
proc.start();
proc.waitForFinished();
if( proc.exitStatus() != QProcess::NormalExit || !checkStatus( proc.exitCode() ) ) {
- error(KIO::ERR_COULD_NOT_WRITE, dest.path(KUrl::RemoveTrailingSlash) + "\n\n" + proc.getErrorMsg() );
+ error(KIO::ERR_COULD_NOT_WRITE, getPath(dest,KUrl::RemoveTrailingSlash) + "\n\n" + proc.getErrorMsg() );
return;
}
- if( !QFileInfo( dest.path(KUrl::RemoveTrailingSlash) ).exists() ) {
- error( KIO::ERR_COULD_NOT_WRITE, dest.path(KUrl::RemoveTrailingSlash) );
+ if( !QFileInfo( getPath(dest,KUrl::RemoveTrailingSlash) ).exists() ) {
+ error( KIO::ERR_COULD_NOT_WRITE, getPath(dest,KUrl::RemoveTrailingSlash) );
return;
}
@@ -687,9 +688,9 @@
}
void kio_krarcProtocol::listDir(const KUrl& url){
- KRDEBUG(url.path());
+ KRDEBUG(getPath(url));
if( !setArcFile( url ) ) {
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
if( listCmd.isEmpty() ){
@@ -697,14 +698,14 @@
i18n("Listing directories is not supported for %1 archives", arcType) );
return;
}
- QString path = url.path();
- if( path.right(1) != "/" ) path = path+"/";
+ QString path = getPath(url);
+ if( path.right(1) != DIR_SEPARATOR ) path = path+DIR_SEPARATOR;
// it might be a real dir !
if( QFileInfo(path).exists() ){
if( QFileInfo(path).isDir() ){
KUrl redir;
- redir.setPath( url.path() );
+ redir.setPath( getPath(url) );
redirection(redir);
finished();
} else { // maybe it's an archive !
@@ -713,15 +714,15 @@
return;
}
if( !initDirDict(url) ){
- error( ERR_CANNOT_ENTER_DIRECTORY, url.path());
+ error( ERR_CANNOT_ENTER_DIRECTORY, getPath(url));
return;
}
- QString arcDir = path.mid(arcFile->url().path().length());
- arcDir.truncate(arcDir.lastIndexOf("/"));
- if(arcDir.right(1) != "/") arcDir = arcDir+"/";
+ QString arcDir = path.mid(getPath(arcFile->url()).length());
+ arcDir.truncate(arcDir.lastIndexOf(DIR_SEPARATOR));
+ if(arcDir.right(1) != DIR_SEPARATOR) arcDir = arcDir+DIR_SEPARATOR;
if( dirDict.find(arcDir) == dirDict.end() ) {
- error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
+ error(ERR_CANNOT_ENTER_DIRECTORY,getPath(url));
return;
}
UDSEntryList* dirList = dirDict[ arcDir ];
@@ -731,12 +732,12 @@
}
bool kio_krarcProtocol::setArcFile(const KUrl& url){
- QString path = url.path();
+ QString path = getPath(url);
time_t currTime = time( 0 );
archiveChanged = true;
newArchiveURL = true;
// is the file already set ?
- if( arcFile && arcFile->url().path(KUrl::RemoveTrailingSlash) == path.left(arcFile->url().path(KUrl::RemoveTrailingSlash).length()) ){
+ if( arcFile && getPath(arcFile->url(),KUrl::RemoveTrailingSlash) == path.left(getPath(arcFile->url(),KUrl::RemoveTrailingSlash).length()) ){
newArchiveURL = false;
// Has it changed ?
KFileItem* newArcFile = new KFileItem(arcFile->url(),QString(),arcFile->mode());
@@ -765,8 +766,8 @@
arcFile = 0L;
}
QString newPath = path;
- if(newPath.right(1) != "/") newPath = newPath+"/";
- for(int pos=0; pos >= 0; pos = newPath.indexOf("/",pos+1)){
+ if(newPath.right(1) != DIR_SEPARATOR) newPath = newPath+DIR_SEPARATOR;
+ for(int pos=0; pos >= 0; pos = newPath.indexOf(DIR_SEPARATOR,pos+1)){
QFileInfo qfi(newPath.left(pos));
if( qfi.exists() && !qfi.isDir() ){
KDE_struct_stat stat_p;
@@ -797,7 +798,7 @@
archiveChanged = true;
archiveChanging = ( currTime == (time_t)arcFile->time( KFileItem::ModificationTime ).toTime_t() );
- arcPath = arcFile->url().path(KUrl::RemoveTrailingSlash);
+ arcPath = getPath(arcFile->url(),KUrl::RemoveTrailingSlash);
arcType = detectArchive( encrypted, arcPath );
if( arcType == "tbz" )
@@ -819,9 +820,9 @@
}
bool kio_krarcProtocol::initDirDict(const KUrl&url, bool forced){
- KRDEBUG(url.path());
+ KRDEBUG(getPath(url));
// set the archive location
- //if( !setArcFile(url.path()) ) return false;
+ //if( !setArcFile(getPath(url)) ) return false;
// no need to rescan the archive if it's not changed
if( !archiveChanged && !forced ) return true;
extArcReady = false;
@@ -845,7 +846,7 @@
proc.setStandardOutputFile( temp.fileName() );
}
else {
- proc << listCmd << arcFile->url().path(KUrl::RemoveTrailingSlash);
+ proc << listCmd << getPath(arcFile->url(),KUrl::RemoveTrailingSlash);
proc.setStandardOutputFile( temp.fileName() );
}
if( arcType == "ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
@@ -865,7 +866,7 @@
// add the "/" directory
UDSEntryList* root = new UDSEntryList();
- dirDict.insert("/",root);
+ dirDict.insert(DIR_SEPARATOR,root);
// and the "/" UDSEntry
UDSEntry entry;
entry.insert( KIO::UDSEntry::UDS_NAME, "." );
@@ -945,15 +946,15 @@
}
QString kio_krarcProtocol::findArcDirectory(const KUrl& url){
- QString path = url.path();
- if( path.right(1) == "/" ) path.truncate(path.length()-1);
+ QString path = getPath(url);
+ if( path.right(1) == DIR_SEPARATOR ) path.truncate(path.length()-1);
if( !initDirDict(url) ){
return QString();
}
- QString arcDir = path.mid(arcFile->url().path().length());
- arcDir.truncate(arcDir.lastIndexOf("/"));
- if(arcDir.right(1) != "/") arcDir = arcDir+"/";
+ QString arcDir = path.mid(getPath(arcFile->url()).length());
+ arcDir.truncate(arcDir.lastIndexOf(DIR_SEPARATOR));
+ if(arcDir.right(1) != DIR_SEPARATOR) arcDir = arcDir+DIR_SEPARATOR;
return arcDir;
}
@@ -967,11 +968,11 @@
return 0;
UDSEntryList* dirList = itef.value();
- QString name = url.path();
- if( arcFile->url().path(KUrl::RemoveTrailingSlash) == url.path(KUrl::RemoveTrailingSlash) ) name = "."; // the "/" case
+ QString name = getPath(url);
+ if( getPath(arcFile->url(),KUrl::RemoveTrailingSlash) == getPath(url,KUrl::RemoveTrailingSlash) ) name = "."; // the "/" case
else{
- if( name.right(1) == "/" ) name.truncate(name.length()-1);
- name = name.mid(name.lastIndexOf("/")+1);
+ if( name.right(1) == DIR_SEPARATOR ) name.truncate(name.length()-1);
+ name = name.mid(name.lastIndexOf(DIR_SEPARATOR)+1);
}
UDSEntryList::iterator entry;
@@ -1026,10 +1027,10 @@
return itef.value();
// set dir to the parent dir
- dir = addNewDir(path.left(path.lastIndexOf("/",-2)+1));
+ dir = addNewDir(path.left(path.lastIndexOf(DIR_SEPARATOR,-2)+1));
// add a new entry in the parent dir
- QString name = path.mid(path.lastIndexOf("/",-2)+1);
+ QString name = path.mid(path.lastIndexOf(DIR_SEPARATOR,-2)+1);
name = name.left(name.length()-1);
UDSEntry entry;
@@ -1080,7 +1081,7 @@
fullName = nextWord(line,'\n');
if(perm.length() != 10)
- perm = (perm.at(0)=='d' || fullName.endsWith( "/" )) ? "drwxr-xr-x" : "-rw-r--r--" ;
+ perm = (perm.at(0)=='d' || fullName.endsWith( DIR_SEPARATOR )) ? "drwxr-xr-x" : "-rw-r--r--" ;
mode = parsePermString(perm);
}
if(arcType == "rar") {
@@ -1171,7 +1172,7 @@
nextWord(line);
// full name
fullName = nextWord(line);
- fullName = fullName.mid(fullName.lastIndexOf("/")+1);
+ fullName = fullName.mid(fullName.lastIndexOf(DIR_SEPARATOR)+1);
}
if( arcType == "lzma" ){
fullName = arcFile->name();
@@ -1241,7 +1242,7 @@
perm = nextWord( line );
mode = parsePermString( perm );
// Owner & Group
- owner = nextWord( line,'/' );
+ owner = nextWord( line,DIR_SEPARATOR_CHAR );
group = nextWord( line ).mid(1);
// size
size = nextWord( line ).toLong();
@@ -1287,9 +1288,9 @@
fullName = nextWord(line,'\n');
}
- if( fullName.right(1) == "/" ) fullName = fullName.left(fullName.length()-1);
- if( !fullName.startsWith("/") ) fullName = "/"+fullName;
- QString path = fullName.left(fullName.lastIndexOf("/")+1);
+ if( fullName.right(1) == DIR_SEPARATOR ) fullName = fullName.left(fullName.length()-1);
+ if( !fullName.startsWith(DIR_SEPARATOR) ) fullName = DIR_SEPARATOR+fullName;
+ QString path = fullName.left(fullName.lastIndexOf(DIR_SEPARATOR)+1);
// set/create the directory UDSEntryList
QHash<QString, KIO::UDSEntryList *>::iterator itef = dirDict.find( path );
if( itef == dirDict.end() )
@@ -1297,7 +1298,7 @@
else
dir = itef.value();
- QString name = fullName.mid(fullName.lastIndexOf("/")+1);
+ QString name = fullName.mid(fullName.lastIndexOf(DIR_SEPARATOR)+1);
// file name
entry.insert( KIO::UDSEntry::UDS_NAME, name );
// file type
@@ -1313,7 +1314,7 @@
entry.insert( KIO::UDSEntry::UDS_LINK_DEST, symlinkDest );
}
if( S_ISDIR(mode) ){
- fullName=fullName+"/";
+ fullName=fullName+DIR_SEPARATOR;
if(dirDict.find(fullName) == dirDict.end())
dirDict.insert(fullName,new UDSEntryList());
else {
@@ -1489,7 +1490,14 @@
}
}
}
-
+ // checking if it's an absolute path
+#ifdef Q_WS_WIN
+ if( cmd.length() > 2 && cmd[ 0 ].isLetter() && cmd[ 1 ] == ':' )
+ return true;
+#else
+ if( cmd.startsWith( DIR_SEPARATOR ) )
+ return true;
+#endif
if( KStandardDirs::findExe(cmd).isEmpty() ){
error( KIO::ERR_CANNOT_LAUNCH_PROCESS,
cmd+
@@ -1702,7 +1710,7 @@
}
void kio_krarcProtocol::invalidatePassword() {
- KRDEBUG( arcFile->url().path(KUrl::RemoveTrailingSlash) + "/" );
+ KRDEBUG( getPath(arcFile->url(),KUrl::RemoveTrailingSlash) + DIR_SEPARATOR );
if( !encrypted )
return;
@@ -1713,8 +1721,8 @@
authInfo.readOnly = true;
authInfo.keepPassword = true;
authInfo.verifyPath = true;
- QString fileName = arcFile->url().path(KUrl::RemoveTrailingSlash);
- authInfo.url = KUrl( "/" );
+ QString fileName = getPath(arcFile->url(),KUrl::RemoveTrailingSlash);
+ authInfo.url = KUrl( ROOT_DIR );
authInfo.url.setHost( fileName /*.replace('/','_')*/ );
authInfo.url.setProtocol( "krarc" );
@@ -1737,8 +1745,8 @@
authInfo.readOnly = true;
authInfo.keepPassword = true;
authInfo.verifyPath = true;
- QString fileName = arcFile->url().path(KUrl::RemoveTrailingSlash);
- authInfo.url = KUrl( "/" );
+ QString fileName = getPath(arcFile->url(),KUrl::RemoveTrailingSlash);
+ authInfo.url = KUrl( ROOT_DIR );
authInfo.url.setHost( fileName /*.replace('/','_')*/ );
authInfo.url.setProtocol( "krarc" );
@@ -1760,6 +1768,7 @@
QString kio_krarcProtocol::detectFullPathName(QString name)
{
+ name = name + EXEC_SUFFIX;
QStringList path = QString::fromLocal8Bit( getenv("PATH") ).split(":");
for ( QStringList::Iterator it = path.begin(); it != path.end(); ++it )
@@ -1767,8 +1776,8 @@
if( QDir(*it).exists( name ) )
{
QString dir = *it;
- if( !dir.endsWith( "/" ) )
- dir+="/";
+ if( !dir.endsWith( DIR_SEPARATOR ) )
+ dir+=DIR_SEPARATOR;
return dir+name;
}
@@ -1814,4 +1823,25 @@
return codec->toUnicode( buf );
}
+QString kio_krarcProtocol::getPath( const KUrl & url, KUrl::AdjustPathOption trailing )
+{
+ QString path = url.path( trailing );
+ REPLACE_DIR_SEP2( path );
+
+ #ifdef Q_WS_WIN
+ if( path.startsWith( DIR_SEPARATOR ) )
+ {
+ int p = 1;
+ while( p < path.length() && path[ p ] == DIR_SEPARATOR_CHAR )
+ p++;
+ /* /C:/Folder */
+ if( p + 2 <= path.length() && path[ p ].isLetter() && path[ p + 1 ] == ':' )
+ {
+ path = path.mid( p );
+ }
+ }
+ #endif
+ return path;
+}
+
#include "krarc.moc"
Modified: trunk/krusader_kde4/krArc/krarc.h
===================================================================
--- trunk/krusader_kde4/krArc/krarc.h 2009-01-18 11:52:14 UTC (rev 6190)
+++ trunk/krusader_kde4/krArc/krarc.h 2009-01-18 16:35:12 UTC (rev 6191)
@@ -57,6 +57,7 @@
virtual bool setArcFile(const KUrl& url);
virtual QString getPassword();
virtual void invalidatePassword();
+ QString getPath( const KUrl & url, KUrl::AdjustPathOption trailing=KUrl::LeaveTrailingSlash );
QString localeEncodedString( QString str );
QByteArray encodeString( QString );
@@ -164,4 +165,22 @@
bool mergedOutput;
};
+#ifdef Q_WS_WIN
+#define DIR_SEPARATOR "/"
+#define DIR_SEPARATOR2 "\\"
+#define DIR_SEPARATOR_CHAR '/'
+#define DIR_SEPARATOR_CHAR2 '\\'
+#define REPLACE_DIR_SEP2(x) x = x.replace( DIR_SEPARATOR2, DIR_SEPARATOR );
+#define ROOT_DIR "C:\\"
+#define EXEC_SUFFIX ".exe"
+#else
+#define DIR_SEPARATOR "/"
+#define DIR_SEPARATOR2 "/"
+#define DIR_SEPARATOR_CHAR '/'
+#define DIR_SEPARATOR_CHAR2 '/'
+#define REPLACE_DIR_SEP2(x)
+#define ROOT_DIR "/"
+#define EXEC_SUFFIX ""
#endif
+
+#endif
Modified: trunk/krusader_kde4/krusader/Panel/panelfunc.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/panelfunc.cpp 2009-01-18 11:52:14 UTC (rev 6190)
+++ trunk/krusader_kde4/krusader/Panel/panelfunc.cpp 2009-01-18 16:35:12 UTC (rev 6191)
@@ -207,7 +207,7 @@
// on local file system change the working directory
if ( files() ->vfs_getType() == vfs::VFS_NORMAL )
- QDir::setCurrent( files() ->vfs_getOrigin().path() );
+ QDir::setCurrent( KrServices::getPath( files() ->vfs_getOrigin() ) );
// see if the open url operation failed, and if so,
// put the attempted url in the origin bar and let the user change it
Modified: trunk/krusader_kde4/krusader/VFS/krvfshandler.cpp
===================================================================
--- trunk/krusader_kde4/krusader/VFS/krvfshandler.cpp 2009-01-18 11:52:14 UTC (rev 6190)
+++ trunk/krusader_kde4/krusader/VFS/krvfshandler.cpp 2009-01-18 16:35:12 UTC (rev 6191)
@@ -19,6 +19,7 @@
#include "normal_vfs.h"
#include "ftp_vfs.h"
#include "virt_vfs.h"
+#include "../krservices.h"
#include <qdir.h>
@@ -34,7 +35,7 @@
QString protocol = url.protocol();
if( ( protocol == "krarc" || protocol == "tar" || protocol == "zip" ) &&
- QDir(url.path(KUrl::RemoveTrailingSlash)).exists() )
+ QDir(KrServices::getPath(url, KUrl::RemoveTrailingSlash)).exists() )
return vfs::VFS_NORMAL;
if( url.isLocalFile() ){
Modified: trunk/krusader_kde4/krusader/VFS/normal_vfs.cpp
===================================================================
--- trunk/krusader_kde4/krusader/VFS/normal_vfs.cpp 2009-01-18 11:52:14 UTC (rev 6190)
+++ trunk/krusader_kde4/krusader/VFS/normal_vfs.cpp 2009-01-18 16:35:12 UTC (rev 6191)
@@ -56,6 +56,7 @@
#include "../defaults.h"
#include "../resources.h"
#include "../krslots.h"
+#include "../krservices.h"
// header files for ACL
#ifdef HAVE_POSIX_ACL
@@ -70,7 +71,7 @@
}
bool normal_vfs::populateVfsList(const KUrl& origin, bool showHidden){
- QString path = origin.path(KUrl::RemoveTrailingSlash);
+ QString path = KrServices::getPath( origin, KUrl::RemoveTrailingSlash);
#ifdef Q_WS_WIN
if(! path.contains("/"))
{ //change C: to C:/
Modified: trunk/krusader_kde4/krusader/defaults.h
===================================================================
--- trunk/krusader_kde4/krusader/defaults.h 2009-01-18 11:52:14 UTC (rev 6190)
+++ trunk/krusader_kde4/krusader/defaults.h 2009-01-18 16:35:12 UTC (rev 6191)
@@ -309,7 +309,19 @@
// Root directory
#ifdef Q_WS_WIN
+#define DIR_SEPARATOR "/"
+#define DIR_SEPARATOR2 "\\"
+#define DIR_SEPARATOR_CHAR '/'
+#define DIR_SEPARATOR_CHAR2 '\\'
+#define REPLACE_DIR_SEP2(x) x = x.replace( DIR_SEPARATOR2, DIR_SEPARATOR );
#define ROOT_DIR "C:\\"
+#define EXEC_SUFFIX ".exe"
#else
-#define ROOT_DIR "/"
+#define DIR_SEPARATOR "/"
+#define DIR_SEPARATOR2 "/"
+#define DIR_SEPARATOR_CHAR '/'
+#define DIR_SEPARATOR_CHAR2 '/'
+#define REPLACE_DIR_SEP2(x)
+#define ROOT_DIR "/"
+#define EXEC_SUFFIX ""
#endif
Modified: trunk/krusader_kde4/krusader/krservices.cpp
===================================================================
--- trunk/krusader_kde4/krusader/krservices.cpp 2009-01-18 11:52:14 UTC (rev 6190)
+++ trunk/krusader_kde4/krusader/krservices.cpp 2009-01-18 16:35:12 UTC (rev 6191)
@@ -25,6 +25,7 @@
// Krusader includes
#include "krservices.h"
#include "krusader.h"
+#include "defaults.h"
QMap<QString,QString>* KrServices::slaveMap=0;
@@ -205,3 +206,23 @@
return name;
}
+QString KrServices::getPath( const KUrl & url, KUrl::AdjustPathOption trailing )
+{
+ QString path = url.path( trailing );
+ REPLACE_DIR_SEP2( path );
+
+ #ifdef Q_WS_WIN
+ if( path.startsWith( DIR_SEPARATOR ) )
+ {
+ int p = 1;
+ while( p < path.length() && path[ p ] == DIR_SEPARATOR_CHAR )
+ p++;
+ /* /C:/Folder */
+ if( p + 2 <= path.length() && path[ p ].isLetter() && path[ p + 1 ] == ':' )
+ {
+ path = path.mid( p );
+ }
+ }
+ #endif
+ return path;
+}
Modified: trunk/krusader_kde4/krusader/krservices.h
===================================================================
--- trunk/krusader_kde4/krusader/krservices.h 2009-01-18 11:52:14 UTC (rev 6190)
+++ trunk/krusader_kde4/krusader/krservices.h 2009-01-18 16:35:12 UTC (rev 6191)
@@ -21,6 +21,7 @@
#include <qstring.h>
#include <qstringlist.h>
#include <qmap.h>
+#include <kurl.h>
class QTextStream;
class QFile;
@@ -40,6 +41,7 @@
static QString fullPathName( QString name, QString confName = QString() );
static QStringList separateArgs( QString args );
static QString registerdProtocol(QString mimetype);
+ static QString getPath( const KUrl &url, KUrl::AdjustPathOption trailing=KUrl::LeaveTrailingSlash );
static void clearProtocolCache();
static bool fileToStringList(QTextStream *stream, QStringList& target, bool keepEmptyLines=false);
static bool fileToStringList(QFile *file, QStringList& target, bool keepEmptyLines=false);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-01-18 13:00:31
|
Revision: 6190
http://krusader.svn.sourceforge.net/krusader/?rev=6190&view=rev
Author: ckarai
Date: 2009-01-18 11:52:14 +0000 (Sun, 18 Jan 2009)
Log Message:
-----------
FIXED: iso protocol problems with images bigger than 4GByte
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/iso/iso.cpp
trunk/krusader_kde4/iso/iso.h
trunk/krusader_kde4/iso/kiso.cpp
trunk/krusader_kde4/iso/kisofile.cpp
trunk/krusader_kde4/iso/kisofile.h
trunk/krusader_kde4/iso/libisofs/iso_fs.h
trunk/krusader_kde4/iso/libisofs/isofs.c
trunk/krusader_kde4/iso/libisofs/isofs.h
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-01-18 00:38:25 UTC (rev 6189)
+++ trunk/krusader_kde4/ChangeLog 2009-01-18 11:52:14 UTC (rev 6190)
@@ -1,3 +1,5 @@
+ FIXED: iso protocol problems with images bigger than 4GByte
+ FIXED: Windows: iso protocol works well now
FIXED: Windows: slow start
FIXED: Windows: the root directory is C:\
FIXED: MountMan saves its last size
Modified: trunk/krusader_kde4/iso/iso.cpp
===================================================================
--- trunk/krusader_kde4/iso/iso.cpp 2009-01-18 00:38:25 UTC (rev 6189)
+++ trunk/krusader_kde4/iso/iso.cpp 2009-01-18 11:52:14 UTC (rev 6190)
@@ -129,11 +129,11 @@
path = QString();
int len = fullPath.length();
- if ( len != 0 && fullPath[ len - 1 ] != '/' )
- fullPath += '/';
+ if ( len != 0 && fullPath[ len - 1 ] != DIR_SEPARATOR_CHAR )
+ fullPath += DIR_SEPARATOR_CHAR;
kDebug() << "the full path is " << fullPath << endl;
- while ( (pos=fullPath.indexOf( '/', pos+1 )) != -1 )
+ while ( (pos=fullPath.indexOf( DIR_SEPARATOR_CHAR, pos+1 )) != -1 )
{
QString tryPath = fullPath.left( pos );
kDebug() << fullPath << " trying " << tryPath << endl;
@@ -161,11 +161,11 @@
len = path.length();
if ( len > 1 )
{
- if ( path[ len - 1 ] == '/' )
+ if ( path[ len - 1 ] == DIR_SEPARATOR_CHAR )
path.truncate( len - 1 );
}
else
- path = QString::fromLatin1("/");
+ path = QString::fromLatin1( DIR_SEPARATOR );
kDebug() << "Found. isoFile=" << isoFile << " path=" << path << endl;
break;
}
@@ -227,18 +227,18 @@
kDebug() << "kio_isoProtocol::listDir " << url.url() << endl;
QString path;
- if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
+ if ( !checkNewFile( getPath( url ), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
{
- QByteArray _path( QFile::encodeName(url.path()));
+ QByteArray _path( QFile::encodeName( getPath( url )));
kDebug() << "Checking (stat) on " << _path << endl;
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
- error( KIO::ERR_DOES_NOT_EXIST, url.path() );
+ error( KIO::ERR_DOES_NOT_EXIST, getPath( url ) );
return;
}
// It's a real dir -> redirect
KUrl redir;
- redir.setPath( url.path() );
+ redir.setPath( getPath( url ) );
if (url.hasRef()) redir.setRef(url.htmlRef());
kDebug() << "Ok, redirection to " << redir.url() << endl;
redirection( redir );
@@ -252,9 +252,9 @@
if ( path.isEmpty() )
{
KUrl redir( QString::fromLatin1( "iso:/") );
- kDebug() << "url.path()==" << url.path() << endl;
+ kDebug() << "url.path()==" << getPath( url ) << endl;
if (url.hasRef()) redir.setRef(url.htmlRef());
- redir.setPath( url.path() + QString::fromLatin1("/") );
+ redir.setPath( getPath( url ) + QString::fromLatin1( DIR_SEPARATOR ) );
kDebug() << "kio_isoProtocol::listDir: redirection " << redir.url() << endl;
redirection( redir );
finished();
@@ -264,7 +264,7 @@
kDebug() << "checkNewFile done" << endl;
const KArchiveDirectory* root = m_isoFile->directory();
const KArchiveDirectory* dir;
- if (!path.isEmpty() && path != "/")
+ if (!path.isEmpty() && path != DIR_SEPARATOR )
{
kDebug() << QString("Looking for entry %1").arg(path) << endl;
const KArchiveEntry* e = root->entry( path );
@@ -311,16 +311,16 @@
UDSEntry entry;
kDebug() << "kio_isoProtocol::stat " << url.url() << endl;
- if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
+ if ( !checkNewFile( getPath( url ), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
{
// We may be looking at a real directory - this happens
// when pressing up after being in the root of an archive
- QByteArray _path( QFile::encodeName(url.path()));
+ QByteArray _path( QFile::encodeName( getPath( url ) ));
kDebug() << "kio_isoProtocol::stat (stat) on " << _path << endl;
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
kDebug() << "isdir=" << S_ISDIR( buff.st_mode ) << " errno=" << strerror(errno) << endl;
- error( KIO::ERR_DOES_NOT_EXIST, url.path() );
+ error( KIO::ERR_DOES_NOT_EXIST, getPath( url ) );
return;
}
// Real directory. Return just enough information for KRun to work
@@ -343,7 +343,7 @@
const KArchiveEntry* isoEntry;
if ( path.isEmpty() )
{
- path = QString::fromLatin1( "/" );
+ path = QString::fromLatin1( DIR_SEPARATOR );
isoEntry = root;
} else {
isoEntry = root->entry( path );
@@ -492,9 +492,9 @@
kDebug() << "kio_isoProtocol::get" << url.url() << endl;
QString path;
- if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
+ if ( !checkNewFile( getPath( url ), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
{
- error( KIO::ERR_DOES_NOT_EXIST, url.path() );
+ error( KIO::ERR_DOES_NOT_EXIST, getPath( url ) );
return;
}
@@ -525,3 +525,24 @@
getFile(isoFileEntry, path);
if (m_isoFile->device()->isOpen()) m_isoFile->device()->close();
}
+
+QString kio_isoProtocol::getPath( const KUrl & url )
+{
+ QString path = url.path();
+ REPLACE_DIR_SEP2( path );
+
+ #ifdef Q_WS_WIN
+ if( path.startsWith( DIR_SEPARATOR ) )
+ {
+ int p = 1;
+ while( p < path.length() && path[ p ] == DIR_SEPARATOR_CHAR )
+ p++;
+ /* /C:/Folder */
+ if( p + 2 <= path.length() && path[ p ].isLetter() && path[ p + 1 ] == ':' )
+ {
+ path = path.mid( p );
+ }
+ }
+ #endif
+ return path;
+}
Modified: trunk/krusader_kde4/iso/iso.h
===================================================================
--- trunk/krusader_kde4/iso/iso.h 2009-01-18 00:38:25 UTC (rev 6189)
+++ trunk/krusader_kde4/iso/iso.h 2009-01-18 11:52:14 UTC (rev 6190)
@@ -43,6 +43,7 @@
void getFile( const KIsoFile *isoFileEntry, const QString &path );
void createUDSEntry( const KArchiveEntry * isoEntry, KIO::UDSEntry & entry );
bool checkNewFile( QString fullPath, QString & path, int startsec );
+ QString getPath( const KUrl & url );
KIso * m_isoFile;
time_t m_mtime;
Modified: trunk/krusader_kde4/iso/kiso.cpp
===================================================================
--- trunk/krusader_kde4/iso/kiso.cpp 2009-01-18 00:38:25 UTC (rev 6189)
+++ trunk/krusader_kde4/iso/kiso.cpp 2009-01-18 11:52:14 UTC (rev 6190)
@@ -195,12 +195,12 @@
}
/* callback function for libisofs */
-static int readf(char *buf, int start, int len,void *udata) {
+static int readf(char *buf, unsigned int start, unsigned int len,void *udata) {
QIODevice* dev = ( static_cast<KIso*> (udata) )->device();
- if (dev->seek(start<<11)) {
- if ((dev->read(buf, len<<11)) != -1) return (len);
+ if (dev->seek( (qint64)start<<(qint64)11)) {
+ if ((dev->read(buf, len<<11u)) != -1) return (len);
}
kDebug() << "KIso::ReadRequest failed start: " << start << " len: " << len << endl;
@@ -219,7 +219,7 @@
bool special=false;
KArchiveEntry *entry=NULL,*oldentry=NULL;
char z_algo[2],z_params[2];
- int z_size=0;
+ long long z_size=0;
if ((idr->flags[0] & 1) && !iso->showhidden) return 0;
if (iso->level) {
@@ -275,7 +275,7 @@
user, group, symlink );
} else {
entry = new KIsoFile( iso, path, access, time, adate, cdate,
- user, group, symlink, isonum_733(idr->extent)<<11,isonum_733(idr->size) );
+ user, group, symlink, (long long)(isonum_733(idr->extent))<<(long long)11,isonum_733(idr->size) );
if (z_size) (static_cast <KIsoFile*> (entry))->setZF(z_algo,z_params,z_size);
}
@@ -296,7 +296,8 @@
void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) {
- int i,size;
+ int i;
+ long long size;
boot_head boot;
boot_entry *be;
QString path;
@@ -305,7 +306,7 @@
entry=new KIsoFile( this, "Catalog", dirent->permissions() & ~S_IFDIR,
dirent->date(), dirent->adate(), dirent->cdate(),
dirent->user(), dirent->group(), QString(),
- isonum_731(bootdesc->boot_catalog)<<11, 2048 );
+ (long long)isonum_731(bootdesc->boot_catalog)<<(long long)11, 2048 );
dirent->addEntry(entry);
if (!ReadBootTable(&readf,isonum_731(bootdesc->boot_catalog),&boot,this)) {
i=1;
@@ -318,7 +319,7 @@
entry=new KIsoFile( this, path, dirent->permissions() & ~S_IFDIR,
dirent->date(), dirent->adate(), dirent->cdate(),
dirent->user(), dirent->group(), QString(),
- isonum_731(((struct default_entry*) be->data)->start)<<11, size<<9 );
+ (long long)isonum_731(((struct default_entry*) be->data)->start)<<(long long)11, size << (long long)9 );
dirent->addEntry(entry);
be=be->next;
i++;
Modified: trunk/krusader_kde4/iso/kisofile.cpp
===================================================================
--- trunk/krusader_kde4/iso/kisofile.cpp 2009-01-18 00:38:25 UTC (rev 6189)
+++ trunk/krusader_kde4/iso/kisofile.cpp 2009-01-18 11:52:14 UTC (rev 6190)
@@ -20,7 +20,7 @@
KIsoFile::KIsoFile( KArchive* archive, const QString& name, int access,
int date, int adate,int cdate, const QString& user, const QString& group,
- const QString& symlink,int pos, int size) :
+ const QString& symlink,long long pos, long long size) :
KArchiveFile(archive, name, access, date, user, group, symlink, pos, size) {
@@ -32,7 +32,7 @@
KIsoFile::~KIsoFile(){
}
-void KIsoFile::setZF(char algo[2],char parms[2],int realsize) {
+void KIsoFile::setZF(char algo[2],char parms[2],long long realsize) {
m_algo[0]=algo[0];m_algo[1]=algo[1];
m_parms[0]=parms[0];m_parms[1]=parms[1];
m_realsize=realsize;
Modified: trunk/krusader_kde4/iso/kisofile.h
===================================================================
--- trunk/krusader_kde4/iso/kisofile.h 2009-01-18 00:38:25 UTC (rev 6189)
+++ trunk/krusader_kde4/iso/kisofile.h 2009-01-18 11:52:14 UTC (rev 6190)
@@ -29,9 +29,9 @@
public:
KIsoFile( KArchive* archive, const QString& name, int access, int date,
int adate,int cdate, const QString& user, const QString& group,
- const QString& symlink, int pos, int size);
+ const QString& symlink, long long pos, long long size);
~KIsoFile();
- void setZF(char algo[2],char parms[2],int realsize);
+ void setZF(char algo[2],char parms[2],long long realsize);
int adate() const { return m_adate; }
int cdate() const { return m_cdate; }
long long realsize() const { return m_realsize; }
Modified: trunk/krusader_kde4/iso/libisofs/iso_fs.h
===================================================================
--- trunk/krusader_kde4/iso/libisofs/iso_fs.h 2009-01-18 00:38:25 UTC (rev 6189)
+++ trunk/krusader_kde4/iso/libisofs/iso_fs.h 2009-01-18 11:52:14 UTC (rev 6190)
@@ -5,6 +5,21 @@
#include "bswap.h"
+
+#ifdef Q_WS_WIN
+#define DIR_SEPARATOR "/"
+#define DIR_SEPARATOR2 "\\"
+#define DIR_SEPARATOR_CHAR '/'
+#define DIR_SEPARATOR_CHAR2 '\\'
+#define REPLACE_DIR_SEP2(x) x = x.replace( DIR_SEPARATOR2, DIR_SEPARATOR );
+#else
+#define DIR_SEPARATOR "/"
+#define DIR_SEPARATOR2 "/"
+#define DIR_SEPARATOR_CHAR '/'
+#define DIR_SEPARATOR_CHAR2 '/'
+#define REPLACE_DIR_SEP2(x)
+#endif
+
/*
* The isofs filesystem constants/structures
*/
Modified: trunk/krusader_kde4/iso/libisofs/isofs.c
===================================================================
--- trunk/krusader_kde4/iso/libisofs/isofs.c 2009-01-18 00:38:25 UTC (rev 6189)
+++ trunk/krusader_kde4/iso/libisofs/isofs.c 2009-01-18 11:52:14 UTC (rev 6190)
@@ -21,6 +21,7 @@
#include <string.h>
#include "isofs.h"
+#include "iso_fs.h"
/**************************************************************/
@@ -122,8 +123,8 @@
boot->defentry=NULL;
}
-int BootImageSize(int media,int len) {
- int ret;
+long long BootImageSize(int media,unsigned int len) {
+ long long ret;
switch(media & 0xf) {
case 0:
@@ -158,7 +159,7 @@
return entry;
}
-int ReadBootTable(readfunc *read,int sector, boot_head *head, void *udata) {
+int ReadBootTable(readfunc *read,unsigned int sector, boot_head *head, void *udata) {
char buf[2048], *c, *be;
int i,end=0;
@@ -221,7 +222,7 @@
/**
* Creates the linked list of the volume descriptors
*/
-iso_vol_desc *ReadISO9660(readfunc *read,int sector,void *udata) {
+iso_vol_desc *ReadISO9660(readfunc *read,unsigned int sector,void *udata) {
int i;
struct iso_volume_descriptor buf;
@@ -408,7 +409,7 @@
}
if ( (c[0] & 0x08) == 0x08 || (c[1] && rrentry->sl &&
strlen(rrentry->sl)>1) ) {
- if (str_append(&rrentry->sl,(char *)"/")) {
+ if (str_append(&rrentry->sl,(char *) DIR_SEPARATOR )) {
FreeRR(rrentry); return -ENOMEM;
}
}
@@ -577,13 +578,13 @@
iconv_t iconv_d;
int fd;
-int readf(char *buf, int start, int len,void *udata) {
+int readf(char *buf, unsigned int start, unsigned int len,void *udata) {
int ret;
- if ((ret=lseek(fd, start << 11, SEEK_SET))<0) return ret;
- ret=read(fd, buf, len << 11);
+ if ((ret=lseek64(fd, (long long)start << (long long)11, SEEK_SET))<0) return ret;
+ ret=read(fd, buf, len << 11u);
if (ret<0) return ret;
- return (ret >> 11);
+ return (ret >> 11u);
}
void dumpchars(char *c,int len) {
Modified: trunk/krusader_kde4/iso/libisofs/isofs.h
===================================================================
--- trunk/krusader_kde4/iso/libisofs/isofs.h 2009-01-18 00:38:25 UTC (rev 6189)
+++ trunk/krusader_kde4/iso/libisofs/isofs.h 2009-01-18 11:52:14 UTC (rev 6190)
@@ -50,7 +50,7 @@
int re; /* relocated */
char z_algo[2]; /* zizofs algorithm */
char z_params[2]; /* zizofs parameters */
- int z_size; /* zizofs real_size */
+ unsigned int z_size; /* zizofs real_size */
} rr_entry;
typedef struct _iso_vol_desc {
@@ -78,7 +78,7 @@
/**
* this callback function needs to read 'len' sectors from 'start' into 'buf'
*/
-typedef int readfunc(char *buf,int start, int len,void *);
+typedef int readfunc(char *buf,unsigned int start, unsigned int len,void *);
/**
* ProcessDir uses this callback
@@ -107,7 +107,7 @@
* If the function fails, returns NULL
* Don't forget to call FreeISO9660 after using the volume descriptor list!
*/
-iso_vol_desc *ReadISO9660(readfunc *read,int sector,void *udata);
+iso_vol_desc *ReadISO9660(readfunc *read,unsigned int sector,void *udata);
/**
* Frees the linked list of volume descriptors
@@ -140,7 +140,7 @@
/**
* Returns the size of the boot image (in 512 byte sectors)
*/
-int BootImageSize(int media,int len);
+long long BootImageSize(int media,unsigned int len);
/**
* Frees the boot catalog entries in 'boot'. If you ever called ReadBootTable,
@@ -151,7 +151,7 @@
/**
* Reads the boot catalog into 'head'. Don't forget to call FreeBootTable!
*/
-int ReadBootTable(readfunc *read,int sector, boot_head *head, void *udata);
+int ReadBootTable(readfunc *read,unsigned int sector, boot_head *head, void *udata);
#ifdef __cplusplus
} //extern "C"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-01-18 00:38:39
|
Revision: 6189
http://krusader.svn.sourceforge.net/krusader/?rev=6189&view=rev
Author: ckarai
Date: 2009-01-18 00:38:25 +0000 (Sun, 18 Jan 2009)
Log Message:
-----------
FIXED: Windows: slow start
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/krusader/main.cpp
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-01-17 22:07:38 UTC (rev 6188)
+++ trunk/krusader_kde4/ChangeLog 2009-01-18 00:38:25 UTC (rev 6189)
@@ -1,3 +1,4 @@
+ FIXED: Windows: slow start
FIXED: Windows: the root directory is C:\
FIXED: MountMan saves its last size
FIXED: [ 1535954 ] krviewer hex view endian dependent
Modified: trunk/krusader_kde4/krusader/main.cpp
===================================================================
--- trunk/krusader_kde4/krusader/main.cpp 2009-01-17 22:07:38 UTC (rev 6188)
+++ trunk/krusader_kde4/krusader/main.cpp 2009-01-18 00:38:25 UTC (rev 6189)
@@ -207,8 +207,10 @@
}
QDBusInterface remoteApp( "org.krusader", "/Instances/" + appName,
- "org.krusader.Instance" );
- QDBusReply<bool> reply = remoteApp.call("isRunning");
+ "org.krusader.Instance", QDBusConnection::sessionBus() );
+ QDBusReply<bool> reply;
+ if( remoteApp.isValid() )
+ reply = remoteApp.call("isRunning");
if( !reply.isValid() && reply.error().type() != QDBusError::ServiceUnknown &&
reply.error().type() != QDBusError::UnknownObject )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-01-17 22:55:54
|
Revision: 6188
http://krusader.svn.sourceforge.net/krusader/?rev=6188&view=rev
Author: ckarai
Date: 2009-01-17 22:07:38 +0000 (Sat, 17 Jan 2009)
Log Message:
-----------
FIXED: Windows: the root directory is C:\
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/krusader/Panel/listpanel.cpp
trunk/krusader_kde4/krusader/Synchronizer/synchronizergui.cpp
trunk/krusader_kde4/krusader/defaults.h
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-01-13 23:04:37 UTC (rev 6187)
+++ trunk/krusader_kde4/ChangeLog 2009-01-17 22:07:38 UTC (rev 6188)
@@ -1,3 +1,4 @@
+ FIXED: Windows: the root directory is C:\
FIXED: MountMan saves its last size
FIXED: [ 1535954 ] krviewer hex view endian dependent
FIXED: [ 1550740 ] Wrong placeholder replacement
Modified: trunk/krusader_kde4/krusader/Panel/listpanel.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Panel/listpanel.cpp 2009-01-13 23:04:37 UTC (rev 6187)
+++ trunk/krusader_kde4/krusader/Panel/listpanel.cpp 2009-01-17 22:07:38 UTC (rev 6188)
@@ -459,7 +459,7 @@
void ListPanel::slotFocusAndCDRoot() {
slotFocusOnMe();
- func->openUrl( QString( "/" ), QString() );
+ func->openUrl( QString( ROOT_DIR ), QString() );
}
void ListPanel::select( KRQuery query, bool select) {
@@ -594,9 +594,9 @@
virt = url;
if ( !virt.isValid() )
- virt = KUrl("/");
+ virt = KUrl( ROOT_DIR );
if( virt.isLocalFile() ) _realPath = virt;
- else _realPath = KUrl("/");
+ else _realPath = KUrl( ROOT_DIR );
if( immediate )
func->immediateOpenUrl( virt );
Modified: trunk/krusader_kde4/krusader/Synchronizer/synchronizergui.cpp
===================================================================
--- trunk/krusader_kde4/krusader/Synchronizer/synchronizergui.cpp 2009-01-13 23:04:37 UTC (rev 6187)
+++ trunk/krusader_kde4/krusader/Synchronizer/synchronizergui.cpp 2009-01-17 22:07:38 UTC (rev 6188)
@@ -1101,9 +1101,9 @@
hasSelectedFiles = ( selectedFiles.count() != 0 );
if( leftURL.isEmpty() )
- leftURL = KUrl("/");
+ leftURL = KUrl( ROOT_DIR );
if( rightURL.isEmpty() )
- rightURL = KUrl("/");
+ rightURL = KUrl( ROOT_DIR );
setWindowTitle( i18n("Krusader::Synchronize Directories") );
QGridLayout *synchGrid = new QGridLayout( this );
Modified: trunk/krusader_kde4/krusader/defaults.h
===================================================================
--- trunk/krusader_kde4/krusader/defaults.h 2009-01-13 23:04:37 UTC (rev 6187)
+++ trunk/krusader_kde4/krusader/defaults.h 2009-01-17 22:07:38 UTC (rev 6188)
@@ -306,3 +306,10 @@
#define _InsertMovesDown true
// Immediate Context Menu
#define _ImmediateContextMenu true
+
+// Root directory
+#ifdef Q_WS_WIN
+#define ROOT_DIR "C:\\"
+#else
+#define ROOT_DIR "/"
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-01-13 23:23:46
|
Revision: 6186
http://krusader.svn.sourceforge.net/krusader/?rev=6186&view=rev
Author: ckarai
Date: 2009-01-13 22:39:42 +0000 (Tue, 13 Jan 2009)
Log Message:
-----------
Fixed: mountman didn't start because of an error
Modified Paths:
--------------
trunk/krusader_kde4/krusader/MountMan/kmountman.cpp
Modified: trunk/krusader_kde4/krusader/MountMan/kmountman.cpp
===================================================================
--- trunk/krusader_kde4/krusader/MountMan/kmountman.cpp 2009-01-12 20:25:26 UTC (rev 6185)
+++ trunk/krusader_kde4/krusader/MountMan/kmountman.cpp 2009-01-13 22:39:42 UTC (rev 6186)
@@ -115,7 +115,7 @@
}
KSharedPtr<KMountPoint> KMountMan::findInListByMntPoint(KMountPoint::List &lst, QString value) {
- if( value.endsWith( "/" ) )
+ if( value.length() > 1 && value.endsWith( "/" ) )
value = value.left( value.length() - 1 );
KSharedPtr<KMountPoint> m;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ck...@us...> - 2009-01-13 23:04:40
|
Revision: 6187
http://krusader.svn.sourceforge.net/krusader/?rev=6187&view=rev
Author: ckarai
Date: 2009-01-13 23:04:37 +0000 (Tue, 13 Jan 2009)
Log Message:
-----------
FIXED: MountMan saves its last size
Modified Paths:
--------------
trunk/krusader_kde4/ChangeLog
trunk/krusader_kde4/krusader/MountMan/kmountmangui.cpp
trunk/krusader_kde4/krusader/MountMan/kmountmangui.h
Modified: trunk/krusader_kde4/ChangeLog
===================================================================
--- trunk/krusader_kde4/ChangeLog 2009-01-13 22:39:42 UTC (rev 6186)
+++ trunk/krusader_kde4/ChangeLog 2009-01-13 23:04:37 UTC (rev 6187)
@@ -1,3 +1,4 @@
+ FIXED: MountMan saves its last size
FIXED: [ 1535954 ] krviewer hex view endian dependent
FIXED: [ 1550740 ] Wrong placeholder replacement
FIXED: [ 1988452 ] "Open the popup panel" button hides files from the file pane
Modified: trunk/krusader_kde4/krusader/MountMan/kmountmangui.cpp
===================================================================
--- trunk/krusader_kde4/krusader/MountMan/kmountmangui.cpp 2009-01-13 22:39:42 UTC (rev 6186)
+++ trunk/krusader_kde4/krusader/MountMan/kmountmangui.cpp 2009-01-13 23:04:37 UTC (rev 6187)
@@ -61,7 +61,7 @@
#define MTAB "/etc/mtab"
#endif
-KMountManGUI::KMountManGUI() : KDialog( krApp ), info( 0 ), mountList( 0 ) {
+KMountManGUI::KMountManGUI() : KDialog( krApp ), info( 0 ), mountList( 0 ), sizeX( -1 ), sizeY( -1 ) {
setWindowTitle( i18n("Mount.Man") );
setWindowModality( Qt::WindowModal );
@@ -86,6 +86,21 @@
connect( mountList, SIGNAL( itemSelectionChanged() ), this,
SLOT( changeActive() ) );
+
+ KConfigGroup group( krConfig, "MountMan");
+ int sx = group.readEntry( "Window Width", -1 );
+ int sy = group.readEntry( "Window Height", -1 );
+
+ if( sx != -1 && sy != -1 )
+ resize( sx, sy );
+ else
+ resize( 600, 300 );
+
+ if( group.readEntry( "Window Maximized", false ) )
+ showMaximized();
+ else
+ show();
+
getSpaceData();
exec();
@@ -95,11 +110,26 @@
watcher->stop();
delete watcher;
- KConfigGroup group( krConfig, "MountMan" );
+ KConfigGroup group( krConfig, "MountMan" );
- group.writeEntry( "Last State", mountList->header()->saveState() );
+ group.writeEntry("Window Width", sizeX );
+ group.writeEntry("Window Height", sizeY );
+ group.writeEntry("Window Maximized", isMaximized() );
+ group.writeEntry( "Last State", mountList->header()->saveState() );
}
+
+void KMountManGUI::resizeEvent( QResizeEvent *e )
+{
+ if( !isMaximized() )
+ {
+ sizeX = e->size().width();
+ sizeY = e->size().height();
+ }
+
+ KDialog::resizeEvent( e );
+}
+
void KMountManGUI::createLayout() {
mainPage = new QWidget( this );
createMainPage();
Modified: trunk/krusader_kde4/krusader/MountMan/kmountmangui.h
===================================================================
--- trunk/krusader_kde4/krusader/MountMan/kmountmangui.h 2009-01-13 22:39:42 UTC (rev 6186)
+++ trunk/krusader_kde4/krusader/MountMan/kmountmangui.h 2009-01-13 23:04:37 UTC (rev 6187)
@@ -66,6 +66,9 @@
void createLayout(); // calls the various tab layout-creators
void createMainPage(); // creator of the main page - filesystems
+protected:
+ virtual void resizeEvent( QResizeEvent *e );
+
protected slots:
void doubleClicked( QTreeWidgetItem * );
void clicked( QTreeWidgetItem *, const QPoint & );
@@ -97,6 +100,9 @@
QList<fsData> fileSystems;
QList<fsData> fileSystemsTemp; // first collect to a temporary place
int numOfMountPoints;
+
+ int sizeX;
+ int sizeY;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|