diff options
author | Ken Moore <ken@pcbsd.org> | 2014-10-03 08:31:58 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-10-03 08:31:58 -0400 |
commit | d16d91377b66593a747eeabea3f2769fbac55d59 (patch) | |
tree | 88d84b9e68a15ba194ccbf08ad8182bbb9610df5 | |
parent | Update MimeIconProvider.h (diff) | |
download | lumina-d16d91377b66593a747eeabea3f2769fbac55d59.tar.gz lumina-d16d91377b66593a747eeabea3f2769fbac55d59.tar.bz2 lumina-d16d91377b66593a747eeabea3f2769fbac55d59.zip |
Clean up the icon/list views in Insight. Now the "icon" view will use something close to 64x64 images, and the "list" view will have 20x20 images.
-rw-r--r-- | lumina-fm/MainUI.cpp | 21 | ||||
-rw-r--r-- | lumina-fm/MainUI.h | 4 | ||||
-rw-r--r-- | lumina-fm/MainUI.ui | 4 |
3 files changed, 17 insertions, 12 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index 5fa0a30d..e662e8e1 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -44,8 +44,6 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ iconProv = new MimeIconProvider(); fsmod->setIconProvider(iconProv); snapmod->setIconProvider(iconProv); - fswatcher = new QFileSystemWatcher(this); - connect(fswatcher, SIGNAL(directoryChanged(QString)), this, SLOT(reloadDirectory()) ); contextMenu = new QMenu(this); radio_view_details = new QRadioButton(tr("Detailed List"), this); radio_view_list = new QRadioButton(tr("Basic List"), this); @@ -74,7 +72,6 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ ui->videoControlLayout->insertWidget(4, playerSlider); ui->tool_player_stop->setEnabled(false); //nothing to stop yet ui->tool_player_pause->setVisible(false); //nothing to pause yet - //Setup any specialty keyboard shortcuts nextTabLShort = new QShortcut( QKeySequence(tr("Shift+Left")), this); nextTabRShort = new QShortcut( QKeySequence(tr("Shift+Right")), this); @@ -93,7 +90,6 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ } MainUI::~MainUI(){ - } void MainUI::OpenDirs(QStringList dirs){ @@ -337,8 +333,8 @@ void MainUI::setCurrentDir(QString dir){ ui->list_dir_view->setRootIndex(fsmod->index(dir)); } //Setup the directory watcher here - if( !fswatcher->directories().isEmpty() ){ fswatcher->removePaths(fswatcher->directories()); } - fswatcher->addPath(dir); + //if( !fswatcher->directories().isEmpty() ){ fswatcher->removePaths(fswatcher->directories()); } + //fswatcher->addPath(dir); //Adjust the tab data tabBar->setTabWhatsThis( tabBar->currentIndex(), rawdir ); if(dir!="/"){ tabBar->setTabText( tabBar->currentIndex(), dir.section("/",-1) ); } @@ -410,9 +406,13 @@ void MainUI::checkForMultimediaFiles(){ void MainUI::checkForBackups(){ ui->tool_goToRestore->setVisible(false); - //Check for ZFS snapshots not implemented yet! snapDirs.clear(); //clear the internal variable - if(!isUserWritable){ return; } //cannot restore files into a non-writable directory + if(!isUserWritable){ + //cannot restore files into a non-writable directory + //No dir found: put the snapmod on the lumina directory (someplace out of the way) + snapmod->setRootPath(QDir::homePath()+"/.lumina"); + return; + } //Now recursively try to find snapshots of this directory QString cdir = getCurrentDir(); QDir dir(cdir); @@ -446,6 +446,9 @@ void MainUI::checkForBackups(){ QApplication::processEvents(); //keep the UI snappy } //qDebug() << "Found snapshots:" << snapDirs; + }else{ + //No dir found: put the snapmod on the lumina directory (someplace out of the way) + snapmod->setRootPath(QDir::homePath()+"/.lumina"); } //Now enable the button if any snapshots available ui->tool_goToRestore->setVisible(!snapDirs.isEmpty()); @@ -628,12 +631,14 @@ void MainUI::viewModeChanged(bool active){ ui->list_dir_view->setVisible(true); ui->list_dir_view->setViewMode( QListView::ListMode ); ui->list_dir_view->setUniformItemSizes(false); + ui->list_dir_view->setIconSize( QSize(20,20) ); settings->setValue("viewmode","list"); }else{ //icons ui->tree_dir_view->setVisible(false); ui->list_dir_view->setVisible(true); ui->list_dir_view->setViewMode( QListView::IconMode ); ui->list_dir_view->setUniformItemSizes(true); + ui->list_dir_view->setIconSize( QSize(90,64) ); settings->setValue("viewmode","icons"); } //Re-load the view widget diff --git a/lumina-fm/MainUI.h b/lumina-fm/MainUI.h index 886d3fa7..d065d3fc 100644 --- a/lumina-fm/MainUI.h +++ b/lumina-fm/MainUI.h @@ -31,12 +31,12 @@ #include <QListWidgetItem> #include <QRadioButton> #include <QWidgetAction> -#include <QFileSystemWatcher> #include <QImageReader> #include <QScrollBar> #include <QFileDialog> #include <QResizeEvent> #include <QDesktopWidget> +#include <QThread> //Phonon widgets #include <Phonon/BackendCapabilities> @@ -73,7 +73,7 @@ private: QTabBar *tabBar; QLineEdit *currentDir; QFileSystemModel *fsmod, *snapmod; - QFileSystemWatcher *fswatcher; + //QFileSystemWatcher *fswatcher; MimeIconProvider *iconProv; QMenu *contextMenu; QRadioButton *radio_view_details, *radio_view_list, *radio_view_icons; diff --git a/lumina-fm/MainUI.ui b/lumina-fm/MainUI.ui index eec9e7df..d26e20b1 100644 --- a/lumina-fm/MainUI.ui +++ b/lumina-fm/MainUI.ui @@ -54,7 +54,7 @@ <bool>true</bool> </property> <property name="batchSize"> - <number>100</number> + <number>30</number> </property> <property name="wordWrap"> <bool>true</bool> @@ -79,7 +79,7 @@ <bool>false</bool> </property> <property name="uniformRowHeights"> - <bool>false</bool> + <bool>true</bool> </property> <property name="itemsExpandable"> <bool>false</bool> |