🎉 Added addremove button
This commit is contained in:
parent
5dc8db6919
commit
081576912e
BIN
rsrc/icons/File Refresh-01.png
Normal file
BIN
rsrc/icons/File Refresh-01.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
BIN
rsrc/icons/Folder Refresh-01.png
Normal file
BIN
rsrc/icons/Folder Refresh-01.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
@ -155,6 +155,7 @@
|
|||||||
<file>icons/Zoom-01.png</file>
|
<file>icons/Zoom-01.png</file>
|
||||||
<file>icons/Zoom In-01.png</file>
|
<file>icons/Zoom In-01.png</file>
|
||||||
<file>icons/Zoom Out-01.png</file>
|
<file>icons/Zoom Out-01.png</file>
|
||||||
|
<file alias="icon-item-addremove">icons/File Refresh-01.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/docs">
|
<qresource prefix="/docs">
|
||||||
<file>docs/Translators.txt</file>
|
<file>docs/Translators.txt</file>
|
||||||
|
@ -343,6 +343,12 @@ bool Fossil::removeFiles(const QStringList &fileList, bool deleteLocal)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
bool Fossil::addRemoveFiles()
|
||||||
|
{
|
||||||
|
return runFossil(QStringList() << "addremove");
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
bool Fossil::revertFiles(const QStringList &fileList)
|
bool Fossil::revertFiles(const QStringList &fileList)
|
||||||
{
|
{
|
||||||
|
@ -42,6 +42,7 @@ public:
|
|||||||
bool commitFiles(const QStringList &fileList, const QString &comment, const QString &newBranchName, bool isPrivateBranch);
|
bool commitFiles(const QStringList &fileList, const QString &comment, const QString &newBranchName, bool isPrivateBranch);
|
||||||
bool addFiles(const QStringList &fileList);
|
bool addFiles(const QStringList &fileList);
|
||||||
bool removeFiles(const QStringList &fileList, bool deleteLocal);
|
bool removeFiles(const QStringList &fileList, bool deleteLocal);
|
||||||
|
bool addRemoveFiles();
|
||||||
bool revertFiles(const QStringList &fileList);
|
bool revertFiles(const QStringList &fileList);
|
||||||
bool renameFile(const QString &beforePath, const QString &afterPath, bool renameLocal);
|
bool renameFile(const QString &beforePath, const QString &afterPath, bool renameLocal);
|
||||||
|
|
||||||
|
@ -600,14 +600,15 @@ void MainWindow::onOpenRecent()
|
|||||||
void MainWindow::enableActions(bool on)
|
void MainWindow::enableActions(bool on)
|
||||||
{
|
{
|
||||||
QAction *actions[] = {ui->actionCloseRepository, ui->actionCommit, ui->actionDiff, ui->actionAdd,
|
QAction *actions[] = {ui->actionCloseRepository, ui->actionCommit, ui->actionDiff, ui->actionAdd,
|
||||||
ui->actionDelete, ui->actionPush, ui->actionPull, ui->actionRename,
|
ui->actionDelete, ui->actionAddRemove, ui->actionPush, ui->actionPull,
|
||||||
ui->actionHistory, ui->actionFossilUI, ui->actionRevert, ui->actionTimeline,
|
ui->actionRename, ui->actionHistory, ui->actionFossilUI, ui->actionRevert,
|
||||||
ui->actionOpenFile, ui->actionOpenContaining, ui->actionUndo, ui->actionUpdate,
|
ui->actionTimeline, ui->actionOpenFile, ui->actionOpenContaining, ui->actionUndo,
|
||||||
ui->actionOpenFolder, ui->actionRenameFolder, ui->actionCreateStash, ui->actionDeleteStash,
|
ui->actionUpdate, ui->actionOpenFolder, ui->actionRenameFolder, ui->actionCreateStash,
|
||||||
ui->actionDiffStash, ui->actionApplyStash, ui->actionDeleteStash, ui->actionCreateTag,
|
ui->actionDeleteStash, ui->actionDiffStash, ui->actionApplyStash, ui->actionDeleteStash,
|
||||||
ui->actionDeleteTag, ui->actionCreateBranch, ui->actionMergeBranch, ui->actionFossilSettings,
|
ui->actionCreateTag, ui->actionDeleteTag, ui->actionCreateBranch, ui->actionMergeBranch,
|
||||||
ui->actionViewAll, ui->actionViewAsFolders, ui->actionViewAsList, ui->actionViewIgnored,
|
ui->actionFossilSettings, ui->actionViewAll, ui->actionViewAsFolders, ui->actionViewAsList,
|
||||||
ui->actionViewModifedOnly, ui->actionViewModified, ui->actionViewUnchanged, ui->actionViewUnknown};
|
ui->actionViewIgnored, ui->actionViewModifedOnly, ui->actionViewModified, ui->actionViewUnchanged,
|
||||||
|
ui->actionViewUnknown};
|
||||||
|
|
||||||
for (size_t i = 0; i < COUNTOF(actions); ++i)
|
for (size_t i = 0; i < COUNTOF(actions); ++i)
|
||||||
actions[i]->setEnabled(on);
|
actions[i]->setEnabled(on);
|
||||||
@ -1561,6 +1562,14 @@ void MainWindow::on_actionAdd_triggered()
|
|||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
void MainWindow::on_actionAddRemove_triggered()
|
||||||
|
{
|
||||||
|
if (!getWorkspace().addRemoveFiles())
|
||||||
|
QMessageBox::critical(this, tr("Error"), tr("Could not add files."), QMessageBox::Ok);
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void MainWindow::on_actionDelete_triggered()
|
void MainWindow::on_actionDelete_triggered()
|
||||||
{
|
{
|
||||||
|
@ -97,6 +97,7 @@ private slots:
|
|||||||
void on_actionPullRemote_triggered();
|
void on_actionPullRemote_triggered();
|
||||||
void on_actionCommit_triggered();
|
void on_actionCommit_triggered();
|
||||||
void on_actionAdd_triggered();
|
void on_actionAdd_triggered();
|
||||||
|
void on_actionAddRemove_triggered();
|
||||||
void on_actionDelete_triggered();
|
void on_actionDelete_triggered();
|
||||||
void on_actionRevert_triggered();
|
void on_actionRevert_triggered();
|
||||||
void on_actionOpenContaining_triggered();
|
void on_actionOpenContaining_triggered();
|
||||||
|
@ -85,6 +85,8 @@ public:
|
|||||||
|
|
||||||
bool removeFiles(const QStringList &fileList, bool deleteLocal) { return fossil().removeFiles(fileList, deleteLocal); }
|
bool removeFiles(const QStringList &fileList, bool deleteLocal) { return fossil().removeFiles(fileList, deleteLocal); }
|
||||||
|
|
||||||
|
bool addRemoveFiles() { return fossil().addRemoveFiles(); }
|
||||||
|
|
||||||
bool revertFiles(const QStringList &fileList) { return fossil().revertFiles(fileList); }
|
bool revertFiles(const QStringList &fileList) { return fossil().revertFiles(fileList); }
|
||||||
|
|
||||||
bool renameFile(const QString &beforePath, const QString &afterPath, bool renameLocal) { return fossil().renameFile(beforePath, afterPath, renameLocal); }
|
bool renameFile(const QString &beforePath, const QString &afterPath, bool renameLocal) { return fossil().renameFile(beforePath, afterPath, renameLocal); }
|
||||||
|
@ -118,12 +118,12 @@
|
|||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="horizontalHeaderHighlightSections">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<attribute name="horizontalHeaderHighlightSections">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
@ -222,7 +222,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>865</width>
|
<width>865</width>
|
||||||
<height>21</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
@ -324,6 +324,7 @@
|
|||||||
<addaction name="actionAdd"/>
|
<addaction name="actionAdd"/>
|
||||||
<addaction name="actionRevert"/>
|
<addaction name="actionRevert"/>
|
||||||
<addaction name="actionDelete"/>
|
<addaction name="actionDelete"/>
|
||||||
|
<addaction name="actionAddRemove"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionDiff"/>
|
<addaction name="actionDiff"/>
|
||||||
<addaction name="actionHistory"/>
|
<addaction name="actionHistory"/>
|
||||||
@ -1062,6 +1063,18 @@
|
|||||||
<string notr="true">Esc</string>
|
<string notr="true">Esc</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionAddRemove">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../rsrc/resources.qrc">
|
||||||
|
<normaloff>:/icons/icon-item-addremove</normaloff>:/icons/icon-item-addremove</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Add & Remove</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Add & Remove files</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user