mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-05-11 03:24:57 +02:00
refs #1779, #1765, #1764, #1763 using a/b testing facility to show different quick start guides to different users; dialog that invites user to watch quick start guide turns itself off after 5 starts of the program
This commit is contained in:
@@ -71,7 +71,8 @@ const char* compression = SETTINGS_PATH_PREFIX "/DataFile/compression";
|
||||
const char* wdirSetpath = SETTINGS_PATH_PREFIX "/Environment/WDir";
|
||||
const char* ofdirSetpath = SETTINGS_PATH_PREFIX "/Environment/OpenFileDir";
|
||||
const char* sfdirSetpath = SETTINGS_PATH_PREFIX "/Environment/SaveFileDir";
|
||||
const char* startupActionSetpath = SETTINGS_PATH_PREFIX "/Environment/StartupAction";
|
||||
const char* startupActionSetpath =
|
||||
SETTINGS_PATH_PREFIX "/Environment/StartupAction";
|
||||
const char* labelColorPath = SETTINGS_PATH_PREFIX "/ColorLabels/color_";
|
||||
const char* labelTextPath = SETTINGS_PATH_PREFIX "/ColorLabels/text_";
|
||||
const char* lastEditedSetpath = SETTINGS_PATH_PREFIX "/Environment/LastEdited";
|
||||
@@ -87,39 +88,40 @@ const char* tooltipDelay = SETTINGS_PATH_PREFIX "/UI/tooltipDelay";
|
||||
const char* showUndoPanel = SETTINGS_PATH_PREFIX "/UI/showUndoPanel";
|
||||
const char* userWorkflowFlags = SETTINGS_PATH_PREFIX "/UI/userWorkFlowFlags";
|
||||
const char* iconsWithText = SETTINGS_PATH_PREFIX "/UI/IconWithText";
|
||||
|
||||
const char* emptyRCSLog = SETTINGS_PATH_PREFIX "/RCS/emptyLog";
|
||||
const char* rcsFilePreviewStyle = SETTINGS_PATH_PREFIX "/RCS/FilePreviewStyle";
|
||||
const char* rcsFilePreviewSortColumn = SETTINGS_PATH_PREFIX "/RCS/FilePreviewSortColumn";
|
||||
|
||||
const char* rcsFilePreviewSortColumn =
|
||||
SETTINGS_PATH_PREFIX "/RCS/FilePreviewSortColumn";
|
||||
const char* dontSaveStdLib = SETTINGS_PATH_PREFIX "/DataFormat/dontSaveStdLib";
|
||||
const char* WindowGeometrySetpath= SETTINGS_PATH_PREFIX "/Layout/";
|
||||
const char* screenPositionSetpath= SETTINGS_PATH_PREFIX "/ScreenPos/";
|
||||
|
||||
const char* showIconsInRules = SETTINGS_PATH_PREFIX "/UI/Icons/ShowIconsInRules";
|
||||
const char* showDirectionText = SETTINGS_PATH_PREFIX "/UI/Icons/ShowDirectionTextInRules";
|
||||
const char* showDirectionText =
|
||||
SETTINGS_PATH_PREFIX "/UI/Icons/ShowDirectionTextInRules";
|
||||
const char* iconsInRulesSize = SETTINGS_PATH_PREFIX "/UI/Icons/IconsInRulesSize";
|
||||
const char* rulesFont = SETTINGS_PATH_PREFIX "/UI/Fonts/RulesFont";
|
||||
const char* treeFont = SETTINGS_PATH_PREFIX "/UI/Fonts/TreeFont";
|
||||
const char* uiFont = SETTINGS_PATH_PREFIX "/UI/Fonts/UiFont";
|
||||
const char* compilerOutputFont = SETTINGS_PATH_PREFIX "/UI/Fonts/CompilerOutputFont";
|
||||
|
||||
const char* compilerOutputFont =
|
||||
SETTINGS_PATH_PREFIX "/UI/Fonts/CompilerOutputFont";
|
||||
const char* clipComment = SETTINGS_PATH_PREFIX "/UI/ClipComment";
|
||||
|
||||
const char* checkUpdates = SETTINGS_PATH_PREFIX "/UI/CheckUpdates";
|
||||
const char* updateAvailableWarningLastTime = SETTINGS_PATH_PREFIX "/UI/updateAvailableWarningLastTime";
|
||||
const char* announcementLastTime = SETTINGS_PATH_PREFIX "/UI/announcementLastTime/%1";
|
||||
const char* updateAvailableWarningLastTime =
|
||||
SETTINGS_PATH_PREFIX "/UI/updateAvailableWarningLastTime";
|
||||
const char* announcementLastTime =
|
||||
SETTINGS_PATH_PREFIX "/UI/announcementLastTime/%1";
|
||||
const char* checkUpdatesProxy = SETTINGS_PATH_PREFIX "/UI/CheckUpdatesProxy";
|
||||
|
||||
const char* reminderAboutStandardLibSuppressed = SETTINGS_PATH_PREFIX "/UI/reminderAboutStandardLibSuppressed";
|
||||
|
||||
const char* newFirewallPlatform = SETTINGS_PATH_PREFIX "/Objects/NewFireallPlatform";
|
||||
const char* newClusterFailoverProtocol = SETTINGS_PATH_PREFIX "/Objects/newClusterFailoverProtocol";
|
||||
const char* reminderAboutStandardLibSuppressed =
|
||||
SETTINGS_PATH_PREFIX "/UI/reminderAboutStandardLibSuppressed";
|
||||
const char* introDialogEnabled = SETTINGS_PATH_PREFIX "/UI/introDialogEnabled";
|
||||
const char* newFirewallPlatform =
|
||||
SETTINGS_PATH_PREFIX "/Objects/NewFireallPlatform";
|
||||
const char* newClusterFailoverProtocol =
|
||||
SETTINGS_PATH_PREFIX "/Objects/newClusterFailoverProtocol";
|
||||
const char* appGUID = SETTINGS_PATH_PREFIX "/ApplicationGUID";
|
||||
const char* abTestingGroup = SETTINGS_PATH_PREFIX "/abTestingGroup";
|
||||
|
||||
const char* startsCounter = SETTINGS_PATH_PREFIX "/startsCounter";
|
||||
const char* targetStatus = SETTINGS_PATH_PREFIX "/TargetStatus/";
|
||||
|
||||
const char* SSHPath = SETTINGS_PATH_PREFIX "/SSH/SSHPath";
|
||||
const char* SCPPath = SETTINGS_PATH_PREFIX "/SSH/SCPPath";
|
||||
|
||||
@@ -130,7 +132,6 @@ const char* SSHTimeout = SETTINGS_PATH_PREFIX "/SSH/SSHTimeout";
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Settings path defined here should match Windows registry paths used
|
||||
* in the Windows installer/uninstaller scripts.
|
||||
@@ -209,6 +210,22 @@ void FWBSettings::init(bool force_first_time_run)
|
||||
setABTestingGroup(QTime::currentTime().second() % 2 + 1);
|
||||
}
|
||||
|
||||
ok = contains(introDialogEnabled);
|
||||
if (!ok)
|
||||
{
|
||||
setIntroDialogEnabled(true);
|
||||
}
|
||||
|
||||
ok = contains(startsCounter);
|
||||
if (!ok)
|
||||
{
|
||||
setValue(startsCounter, 0);
|
||||
}
|
||||
|
||||
setValue(startsCounter, getStartsCounter() + 1);
|
||||
// disable invitation to watch quick start guide after 5 starts
|
||||
if (getStartsCounter() > 5) setIntroDialogEnabled(false);
|
||||
|
||||
/*
|
||||
* I am seeing two particular uuids a lot in the logs, both coming
|
||||
* from thousands of different instances all over the world. I
|
||||
@@ -1142,5 +1159,18 @@ void FWBSettings::setABTestingGroup(int n)
|
||||
setValue(abTestingGroup, n);
|
||||
}
|
||||
|
||||
int FWBSettings::getStartsCounter()
|
||||
{
|
||||
return value(startsCounter).toInt();
|
||||
}
|
||||
|
||||
bool FWBSettings::isIntroDialogEnabled()
|
||||
{
|
||||
return value(introDialogEnabled).toBool();
|
||||
}
|
||||
|
||||
void FWBSettings::setIntroDialogEnabled(bool f)
|
||||
{
|
||||
setValue(introDialogEnabled, f);
|
||||
}
|
||||
|
||||
|
||||
@@ -268,7 +268,11 @@ class FWBSettings : public QSettings {
|
||||
int getABTestingGroup();
|
||||
void setABTestingGroup(int n);
|
||||
|
||||
|
||||
int getStartsCounter();
|
||||
|
||||
bool isIntroDialogEnabled();
|
||||
void setIntroDialogEnabled(bool f);
|
||||
|
||||
private:
|
||||
QFont getFontByType(const char*type);
|
||||
};
|
||||
|
||||
@@ -542,7 +542,7 @@ void FWWindow::startupLoad()
|
||||
|
||||
void FWWindow::showIntroDialog()
|
||||
{
|
||||
if (!st->getBool("UI/NoIntro"))
|
||||
if (st->isIntroDialogEnabled())
|
||||
{
|
||||
// Show dialog inviting user to look at the "Quick start"
|
||||
// guide on the web site.
|
||||
@@ -571,7 +571,7 @@ void FWWindow::showIntroDialog()
|
||||
"<ul>"
|
||||
"<li>Layout of the application windows</li>"
|
||||
"<li>Location of frequently used command buttons</li>"
|
||||
"<li>How toc reate and edit objects</li>"
|
||||
"<li>How to create and edit objects</li>"
|
||||
"<li>Where to find predefined system objects</li>"
|
||||
"</ul>"
|
||||
"</p>"
|
||||
@@ -590,15 +590,15 @@ void FWWindow::showIntroDialog()
|
||||
|
||||
if (msg_box.clickedButton() == &cb)
|
||||
{
|
||||
st->setBool("UI/NoIntro", true);
|
||||
st->setIntroDialogEnabled(false);
|
||||
}
|
||||
|
||||
if (msg_box.clickedButton() == watch_button)
|
||||
{
|
||||
wfl->registerFlag(UserWorkflow::INTRO_TUTOTIAL, true);
|
||||
QDesktopServices::openUrl(
|
||||
QUrl("http://www.fwbuilder.org/4.0/quick_start_guide.html",
|
||||
QUrl::StrictMode));
|
||||
int ab_group = st->getABTestingGroup();
|
||||
QString url("http://www.fwbuilder.org/4.0/quick_start_guide_%1.html");
|
||||
QDesktopServices::openUrl(QUrl(url.arg(ab_group), QUrl::StrictMode));
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user