Fixed currentWorkspace
Refactored projectName FossilOrigin-Name: 1d1ec089cdb02738d99efcc66c1b32bb0e3208e0
This commit is contained in:
parent
17736bd719
commit
e8c8f9e506
16
manifest
16
manifest
@ -1,5 +1,5 @@
|
||||
C Moved\scurrentWorkspace\sto\sBridge
|
||||
D 2015-04-26T11:13:24.835
|
||||
C Fixed\scurrentWorkspace\nRefactored\s\sprojectName
|
||||
D 2015-04-26T11:33:07.285
|
||||
F .travis.yml 77966888a81c4ceee1fcc79bce842c9667ad8a35
|
||||
F debian/changelog eb4304dfcb6bb66850ec740838090eb50ce1249b
|
||||
F debian/compat b6abd567fa79cbe0196d093a067271361dc6ca8b
|
||||
@ -185,7 +185,7 @@ F rsrc/icons/fuel.ico eb529ab3332a17b9302ef3e851db5b9ebce2a038
|
||||
F rsrc/icons/fuel.png 40daf53b7f6bdcdd0d6aa5ef433d078ec5ea4342
|
||||
F rsrc/resources.qrc 4098be128fd6c045db933d041fe8844b14643a6f
|
||||
F src/Bridge.cpp b34f14d8d887c9db6b27a84b6423931bf262e7a0
|
||||
F src/Bridge.h b06c1db4906305a83ec1d32a7241bde9d1776ecb
|
||||
F src/Bridge.h 4d761a594415105f765c90baf081e7ae1f48f614
|
||||
F src/BrowserWidget.cpp 8b8f545cdff4a4188edc698a1b4777f5df46f056
|
||||
F src/BrowserWidget.h 764d66aa9a93b890298bd0301097739cb4e16597
|
||||
F src/CloneDialog.cpp 812ef7d361c16da21540b7047c9d4d5e74f18539
|
||||
@ -200,8 +200,8 @@ F src/FileTableView.cpp 5ddf8c391c9a3ac449ec61fb1db837b577afeec2
|
||||
F src/FileTableView.h 03e56d87c2d46411b9762b87f4d301619aaf18df
|
||||
F src/LoggedProcess.cpp 2a1e5c94bc1e57c8984563e66c210e43a14dc60c
|
||||
F src/LoggedProcess.h 85df7c635c807a5a0e8c4763f17a0752aaff7261
|
||||
F src/MainWindow.cpp 7bc9f5ce1da7a8c19e923440a1f08c492d7387d0
|
||||
F src/MainWindow.h e087145f0eab2319ffac281993a9944a354e15c1
|
||||
F src/MainWindow.cpp 1f54b516ab93e11b3ac6019215be70ede4a83f06
|
||||
F src/MainWindow.h 27ec1b2e2925d9b5005a60f9c2546ca0bf724b4c
|
||||
F src/SettingsDialog.cpp a46cff5e5dd425e3dbdd15632abfd5829f5562b4
|
||||
F src/SettingsDialog.h 4e2790f581e991c744ae9f86580f1972b8c7ff43
|
||||
F src/Utils.cpp 9aff456712e4276b49083426301b3b96d3819c77
|
||||
@ -215,7 +215,7 @@ F ui/CommitDialog.ui 6200f6cabdcf40a20812e811be28e0793f82516f
|
||||
F ui/FileActionDialog.ui 89bb4dc2d0b8adcd41adcb11ec65f2028a09a12d
|
||||
F ui/MainWindow.ui 8677f5c8bca5bf7561d5f64bfdd0cef5157c6ac7
|
||||
F ui/SettingsDialog.ui 2b7c2870e0054b0f4106f495d85d02c0b814df8b
|
||||
P 9c198b023e2df1b5cfe64dd745d070732b5ab843
|
||||
R d0adfbb3f952b08bd7432dd99b039a0b
|
||||
P a7ac992f6f87abee63c74696cb372a1564250103
|
||||
R 50596001f3be473af30beed2e9989cea
|
||||
U kostas
|
||||
Z 7e132583e7db752dfecd3420482d5c4a
|
||||
Z 3eeb9c3b313f41a766a406d8d644c6ab
|
||||
|
@ -1 +1 @@
|
||||
a7ac992f6f87abee63c74696cb372a1564250103
|
||||
1d1ec089cdb02738d99efcc66c1b32bb0e3208e0
|
12
src/Bridge.h
12
src/Bridge.h
@ -61,17 +61,22 @@ public:
|
||||
currentWorkspace = workspace;
|
||||
}
|
||||
|
||||
const QString &getCurrentWorkspace()
|
||||
const QString &getCurrentWorkspace() const
|
||||
{
|
||||
return currentWorkspace;
|
||||
}
|
||||
|
||||
|
||||
const QString &getProjectName() const
|
||||
{
|
||||
return projectName;
|
||||
}
|
||||
|
||||
|
||||
bool uiRunning() const;
|
||||
bool startUI(const QString &httpPort);
|
||||
void stopUI();
|
||||
|
||||
QString projectName;
|
||||
QString repositoryFile;
|
||||
|
||||
private:
|
||||
@ -92,6 +97,9 @@ private:
|
||||
QString currentWorkspace;
|
||||
QString fossilPath; // The value from the settings
|
||||
|
||||
QString projectName;
|
||||
|
||||
|
||||
QProcess fossilUI;
|
||||
};
|
||||
|
||||
|
@ -232,12 +232,13 @@ MainWindow::MainWindow(Settings &_settings, QWidget *parent, QString *workspaceP
|
||||
|
||||
viewMode = VIEWMODE_TREE;
|
||||
|
||||
applySettings();
|
||||
|
||||
#ifdef BRIDGE_ENABLED
|
||||
// Need to be before applySettings which sets the last workspace
|
||||
bridge.Init(this, &log, ui->textBrowser, "", "");
|
||||
#endif
|
||||
|
||||
applySettings();
|
||||
|
||||
// Apply any explicit workspace path if available
|
||||
if(workspacePath && !workspacePath->isEmpty())
|
||||
openWorkspace(*workspacePath);
|
||||
@ -673,8 +674,9 @@ bool MainWindow::refresh()
|
||||
enableActions(true);
|
||||
|
||||
QString title = "Fuel";
|
||||
if(!projectName.isEmpty())
|
||||
title += " - "+projectName;
|
||||
|
||||
if(!getProjectName().isEmpty())
|
||||
title += " - " + getProjectName();
|
||||
|
||||
setWindowTitle(title);
|
||||
return true;
|
||||
@ -903,7 +905,7 @@ void MainWindow::updateDirView()
|
||||
header << tr("Folders");
|
||||
repoDirModel.setHorizontalHeaderLabels(header);
|
||||
|
||||
QStandardItem *root = new QStandardItem(QIcon(":icons/icons/My Documents-01.png"), projectName);
|
||||
QStandardItem *root = new QStandardItem(QIcon(":icons/icons/My Documents-01.png"), getProjectName());
|
||||
root->setData(""); // Empty Path
|
||||
root->setEditable(false);
|
||||
|
||||
|
@ -258,18 +258,19 @@ private:
|
||||
bool abortOperation;
|
||||
|
||||
Settings &settings;
|
||||
QString projectName;
|
||||
QString repositoryFile;
|
||||
QStringList workspaceHistory;
|
||||
#ifndef BRIDGE_ENABLED
|
||||
QString projectName;
|
||||
QString currentWorkspace;
|
||||
const QString & getProjectName() const { return projectName; }
|
||||
#else
|
||||
Bridge bridge;
|
||||
const QString & getProjectName() const { return bridge.getProjectName(); }
|
||||
#endif
|
||||
ViewMode viewMode;
|
||||
stringset_t selectedDirs; // The directory selected in the tree
|
||||
|
||||
#ifdef BRIDGE_ENABLED
|
||||
Bridge bridge;
|
||||
#endif
|
||||
|
||||
// Repository State
|
||||
typedef QList<RepoFile*> filelist_t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user