summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shemov.cpp6
-rw-r--r--shemov.h1
-rw-r--r--smdirmodel.cpp8
3 files changed, 7 insertions, 8 deletions
diff --git a/shemov.cpp b/shemov.cpp
index f5b8942..5289291 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -431,13 +431,14 @@ void SheMov::createActions(){
connect(mMoveToArchiveA, SIGNAL(triggered()), mFSWidget, SLOT(moveToArchive()));
//View menu (FS)
-
mRefreshA = new QAction(QIcon(":/refresh.png"), tr("Refresh"), this);
connect(mRefreshA, SIGNAL(triggered()), mFSWidget->fileModel(), SLOT(refresh()));
mFSViewPropertiesA = new QAction(QIcon(":/bizarre_amputee.png"), tr("Properties..."), this);
connect(mFSViewPropertiesA, SIGNAL(triggered()), mFSWidget->fileView(), SLOT(properties()));
mFSPreviewA = new QAction(QIcon(":/male_chastity_belt.png"), tr("Preview..."), this);
connect(mFSPreviewA, SIGNAL(triggered()), mFSWidget, SLOT(preview()));
+ mFSResizeA = new QAction(QIcon(":/analstretcher.png"), tr("Resize"), this);
+ connect(mFSResizeA, SIGNAL(triggered()), mFSWidget, SLOT(resizeFileView()));
//Help menu
QString aboutLabel = QString(tr("About %1...")).arg(qApp->applicationName());
@@ -705,6 +706,8 @@ void SheMov::createMenus(){
fsHeaderMenu->addActions(mFileSysHeaderGroup->actions());
mFSViewMenu->addMenu(fsHeaderMenu);
mFSViewMenu->addSeparator();
+ mFSViewMenu->addAction(mFSResizeA);
+ mFSViewMenu->addSeparator();
mFSViewMenu->addAction(mRefreshA);
mViewFSMenuA = menuBar()->addMenu(mFSViewMenu);
@@ -857,6 +860,7 @@ void SheMov::createToolBar(){
mFSWidget->toolBar()->addSeparator();
mFSWidget->toolBar()->addAction(mFSPreviewA);
mFSWidget->toolBar()->addAction(mFSViewPropertiesA);
+ mFSWidget->toolBar()->addAction(mFSResizeA);
mFSWidget->toolBar()->addSeparator();
mFSWidget->toolBar()->addAction(mConfigA);
diff --git a/shemov.h b/shemov.h
index 58ee3b2..9dd466a 100644
--- a/shemov.h
+++ b/shemov.h
@@ -106,6 +106,7 @@ class SheMov : public QMainWindow {
QAction *mMoveToArchiveA;
QAction *mFSViewPropertiesA;
QAction *mFSPreviewA;
+ QAction *mFSResizeA;
//Filesystem View Actions
QActionGroup *mOpenWithGroupFS;
diff --git a/smdirmodel.cpp b/smdirmodel.cpp
index 2b1e7dc..2cdfb8d 100644
--- a/smdirmodel.cpp
+++ b/smdirmodel.cpp
@@ -102,7 +102,6 @@ bool SmDirModel::setData(const QModelIndex &index, const QVariant &value, int ro
QString dir = fileInfo(index).absolutePath();
QString newPath = QString("%1/%2").arg(dir).arg(newName);
QFile::rename(old, newPath);
- emit needResize();
return true;
}
return SmTreeModel::setData(index, value, role);
@@ -160,7 +159,6 @@ void SmDirModel::dirEvent(const QList<QVariant> &data, int e){
}
}
}
- emit needResize();
}
void SmDirModel::readSettings(){
@@ -198,7 +196,7 @@ void SmDirModel::setMd5Sum(QString path, QString md5){
}else if(mimeType.startsWith("image")){
presentQ.prepare("SELECT COUNT(*) FROM pics WHERE cmd5sum = :md5");
}else{
- goto out;
+ return;
}
presentQ.bindValue(":md5", md5);
presentQ.exec();
@@ -210,8 +208,6 @@ void SmDirModel::setMd5Sum(QString path, QString md5){
setData(presentIdx, present, Qt::EditRole);
}
}
- out:
- emit needResize();
}
void SmDirModel::setFfmpeg(QString path, QVariantMap data){
@@ -222,7 +218,6 @@ void SmDirModel::setFfmpeg(QString path, QVariantMap data){
QModelIndex bitrateIdx = createIndex(idx.column(), Bitrate, idx.internalPointer());
setData(bitrateIdx, data["bit_rate"], Qt::EditRole);
}
- emit needResize();
}
void SmDirModel::setPicSize(QString path, QVariant data){
@@ -231,7 +226,6 @@ void SmDirModel::setPicSize(QString path, QVariant data){
QModelIndex psIdx = createIndex(idx.column(), DurSize, idx.internalPointer());
setData(psIdx, data, Qt::EditRole);
}
- emit needResize();
}
void SmDirModel::populate(SmTreeItem *root){