Deleted branches on the remote are now pruned on fetches in GuiThemeDownloader

Also made some minor GUI improvements
This commit is contained in:
Leon Styhre 2023-04-02 12:05:35 +02:00
parent 18e882fbdc
commit cc9684ac21

View file

@ -215,6 +215,9 @@ bool GuiThemeDownloader::fetchRepository(const std::string& repositoryName, bool
#else #else
git_fetch_options fetchOptions = GIT_FETCH_OPTIONS_INIT; git_fetch_options fetchOptions = GIT_FETCH_OPTIONS_INIT;
#endif #endif
// Prune branches that are no longer present on remote.
fetchOptions.prune = GIT_FETCH_PRUNE;
errorCode = git_remote_fetch(gitRemote, nullptr, &fetchOptions, nullptr); errorCode = git_remote_fetch(gitRemote, nullptr, &fetchOptions, nullptr);
if (errorCode != 0) if (errorCode != 0)
@ -639,7 +642,7 @@ void GuiThemeDownloader::populateGUI()
else if (theme.shallowRepository) { else if (theme.shallowRepository) {
mWindow->pushGui(new GuiMsgBox( mWindow->pushGui(new GuiMsgBox(
getHelpStyle(), getHelpStyle(),
"IT SEEMS AS IF THIS IS A SHALLOW REPOSITORY WHICH MEANS THAT IT'S BEEN " "IT SEEMS AS IF THIS IS A SHALLOW REPOSITORY WHICH MEANS THAT IT HAS BEEN "
"DOWNLOADED USING SOME OTHER TOOL THAN THIS THEME DOWNLOADER. A FRESH DOWNLOAD " "DOWNLOADED USING SOME OTHER TOOL THAN THIS THEME DOWNLOADER. A FRESH DOWNLOAD "
"IS REQUIRED AND THE OLD THEME DIRECTORY \"" + "IS REQUIRED AND THE OLD THEME DIRECTORY \"" +
theme.reponame + theme.manualExtension + "\" WILL BE RENAMED TO \"" + theme.reponame + theme.manualExtension + "\" WILL BE RENAMED TO \"" +
@ -693,6 +696,7 @@ void GuiThemeDownloader::populateGUI()
mStatusType = StatusType::STATUS_DOWNLOADING; mStatusType = StatusType::STATUS_DOWNLOADING;
mStatusText = "DOWNLOADING THEME"; mStatusText = "DOWNLOADING THEME";
} }
mWindow->stopInfoPopup();
}); });
mList->addRow(row); mList->addRow(row);
} }