Fixed currentWorkspace
Refactored projectName FossilOrigin-Name: 1d1ec089cdb02738d99efcc66c1b32bb0e3208e0
This commit is contained in:
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;
|
||||
|
Reference in New Issue
Block a user