Added support for stashes

Generalized the commit dialog to support stashes
Parameters are now quoted in the log if necessary
Fixed another issue with the folderview show/hide logic
Various minor ui tweaks

FossilOrigin-Name: ce70efe67a1fe0087cc6d3aa79757a5011c57db2
This commit is contained in:
kostas
2012-04-15 06:56:51 +00:00
parent 022db4d4e9
commit 0ea4fd9831
8 changed files with 460 additions and 55 deletions

View File

@ -108,8 +108,6 @@ private:
QString Path;
};
//////////////////////////////////////////////////////////////////////////
// MainWindow
//////////////////////////////////////////////////////////////////////////
@ -148,6 +146,7 @@ private:
void getSelectionFilenames(QStringList &filenames, int includeMask=RepoFile::TYPE_ALL, bool allIfEmpty=false);
void getFileViewSelection(QStringList &filenames, int includeMask=RepoFile::TYPE_ALL, bool allIfEmpty=false);
void getDirViewSelection(QStringList &filenames, int includeMask=RepoFile::TYPE_ALL, bool allIfEmpty=false);
void getStashViewSelection(QStringList &stashNames, bool allIfEmpty=false);
void getSelectionPaths(stringset_t &paths);
bool startUI();
void stopUI();
@ -161,7 +160,9 @@ private:
bool scanDirectory(QFileInfoList &entries, const QString& dirPath, const QString &baseDir, const QString ignoreSpec);
void updateDirView();
void updateFileView();
void updateStashView();
void selectRootDir();
virtual QMenu *createPopupMenu();
enum RepoStatus
@ -218,6 +219,11 @@ private slots:
void on_actionNewRepository_triggered();
void on_actionOpenRepository_triggered();
void on_actionCloseRepository_triggered();
void on_actionViewStash_triggered();
void on_actionNewStash_triggered();
void on_actionApplyStash_triggered();
void on_actionDeleteStash_triggered();
void on_actionDiffStash_triggered();
private:
enum
@ -229,6 +235,7 @@ private:
Ui::MainWindow *ui;
QStandardItemModel repoFileModel;
QStandardItemModel repoDirModel;
QStandardItemModel repoStashModel;
QProcess fossilUI;
QString fossilUIPort;
class QAction *recentWorkspaceActs[MAX_RECENT];
@ -246,8 +253,10 @@ private:
// Repo State
typedef QList<RepoFile*> filelist_t;
typedef QMap<QString, RepoFile*> filemap_t;
typedef QMap<QString, QString> stashmap_t;
filemap_t workspaceFiles;
stringset_t pathSet;
stashmap_t stashMap;
};
#endif // MAINWINDOW_H