CtrlLib: Do not ask again option in Prompts, ide: Compare with now has LRU list

git-svn-id: svn://ultimatepp.org/upp/trunk@15971 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2021-05-31 09:00:13 +00:00
parent a0f0f92a6f
commit 10fc7a1e99
14 changed files with 494 additions and 209 deletions

View file

@ -605,9 +605,10 @@ public:
void NewEntry(const String& path);
void RemoveEntry(const String& path);
int GetCount() const { return lru.GetCount(); }
LRUList& Limit(int _limit) { limit = _limit; return *this; }
int GetLimit() const { return limit; }
int GetCount() const { return lru.GetCount(); }
typedef LRUList CLASSNAME;

View file

@ -74,7 +74,7 @@ void SerializePromptOptHistory(Stream& s)
s % dsa_history;
}
int Prompt(bool dontshowagain, const char *dsa_id_, int beep,
int Prompt(int dontshowagain, const char *dsa_id_, int beep,
Event<const String&> WhenLink,
const char *title, const Image& iconbmp, const char *qtf, bool okcancel,
const char *button1, const char *button2, const char *button3,
@ -86,7 +86,6 @@ int Prompt(bool dontshowagain, const char *dsa_id_, int beep,
button1, button2, button3,
cx, im1, im2, im3);
String dsa_id;
Option dsa;
if(dontshowagain) {
dsa_id = dsa_id_;
if(IsNull(dsa_id)) {
@ -101,7 +100,6 @@ int Prompt(bool dontshowagain, const char *dsa_id_, int beep,
int q = dsa_history.Find(dsa_id);
if(q >= 0)
return dsa_history[q];
dsa.SetLabel(t_("Do not show this again"));
}
switch(beep) {
case BEEP_INFORMATION:
@ -122,6 +120,8 @@ int Prompt(bool dontshowagain, const char *dsa_id_, int beep,
PromptDlgWnd__ dlg;
RichTextCtrl qtfctrl;
Icon icon;
Option dsa;
dsa.SetLabel(t_("Do not show this again"));
qtfctrl.WhenLink = WhenLink;
icon.SetImage(iconbmp);
Button b1, b2, b3;
@ -201,7 +201,7 @@ int Prompt(bool dontshowagain, const char *dsa_id_, int beep,
LeaveGuiMutex();
int result;
Ctrl::Call(callback2(sExecutePrompt, &dlg, &result));
if(dontshowagain && dsa && result > 0)
if(dontshowagain && dsa && (dontshowagain > 0 || result > 0))
dsa_history.Add(dsa_id, result);
return result;
}
@ -517,4 +517,148 @@ int PromptSaveDontSaveCancelOpt(const char *qtf, const char *opt_id) {
CtrlImg::save(), NoButtonImage(), Null);
}
int PromptOpt1(const char *opt_id, int beep, Event<const String&> WhenLink,
const char *title, const Image& icon, const char *qtf, bool okcancel,
const char *button1, const char *button2, const char *button3,
int cx, Image im1, Image im2, Image im3)
{
return Prompt(-1, opt_id, beep, WhenLink, title, icon, qtf, okcancel, button1, button2, button3, cx, im1, im2, im3);
}
int PromptOpt1(const char *opt_id, int beep,
const char *title, const Image& icon, const char *qtf, bool okcancel,
const char *button1, const char *button2, const char *button3,
int cx)
{
return PromptOpt1(opt_id, beep, callback(LaunchWebBrowser), title,
icon, qtf, okcancel, button1, button2, button3, cx, Null, Null, Null);
}
int PromptOpt1(const char *opt_id, int beep,
const char *title, const Image& icon, const char *qtf,
const char *button1, const char *button2, const char *button3,
int cx)
{
return PromptOpt1(opt_id, beep, title, icon, qtf, true, button1, button2, button3, cx);
}
void PromptOKOpt1(const char *qtf, const char *opt_id) {
PromptOpt1(opt_id, BEEP_INFORMATION, Ctrl::GetAppName(), CtrlImg::information(), qtf, t_("OK"));
}
void ExclamationOpt1(const char *qtf, const char *opt_id) {
PromptOpt1(opt_id, BEEP_EXCLAMATION, Ctrl::GetAppName(), CtrlImg::exclamation(), qtf, t_("OK"));
}
void ShowExcOpt1(const Exc& exc, const char *opt_id) {
PromptOpt1(opt_id, BEEP_EXCLAMATION, Ctrl::GetAppName(), CtrlImg::exclamation(), DeQtf(exc), t_("OK"));
}
void ErrorOKOpt1(const char *qtf, const char *opt_id) {
PromptOpt1(opt_id, BEEP_ERROR, Ctrl::GetAppName(), CtrlImg::error(), qtf, t_("OK"));
}
int PromptOKCancelOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_QUESTION, Ctrl::GetAppName(), CtrlImg::question(), qtf, t_("OK"), t_("Cancel"));
}
int PromptOKCancelAllOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_QUESTION, Ctrl::GetAppName(), CtrlImg::question(), qtf, t_("OK"), t_("Cancel"), t_("All"));
}
int ErrorOKCancelOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_ERROR, Ctrl::GetAppName(), CtrlImg::error(), qtf, t_("OK"), t_("Cancel"));
}
int PromptYesNoOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_QUESTION, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::question(), qtf, false,
t_("&Yes"), t_("&No"), NULL, 0,
YesButtonImage(), NoButtonImage(), Null);
}
int PromptYesNoAllOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_QUESTION, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::question(), qtf, false,
t_("&Yes"), t_("&No"), t_("All"), 0,
YesButtonImage(), NoButtonImage(), Null);
}
int ErrorYesNoOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_ERROR, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::error(), qtf, false,
t_("&Yes"), t_("&No"), NULL, 0,
YesButtonImage(), NoButtonImage(), Null);
}
int PromptYesNoCancelOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_QUESTION, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::question(), qtf, true,
t_("&Yes"), t_("&No"), t_("Cancel"), 0,
YesButtonImage(), NoButtonImage(), Null);
}
int ErrorYesNoCancelOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_ERROR, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::error(), qtf, true,
t_("&Yes"), t_("&No"), t_("Cancel"), 0,
YesButtonImage(), NoButtonImage(), Null);
}
int ErrorYesNoAllOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_ERROR, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::error(), qtf, true,
t_("&Yes"), t_("&No"), t_("All"), 0,
YesButtonImage(), NoButtonImage(), Null);
}
int PromptAbortRetryOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_EXCLAMATION, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::exclamation(), qtf, false,
t_("&Abort"), t_("&Retry"), NULL, 0,
AbortButtonImage(), RetryButtonImage(), Null);
}
int ErrorAbortRetryOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_ERROR, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::error(), qtf, false,
t_("&Abort"), t_("&Retry"), NULL, 0,
AbortButtonImage(), RetryButtonImage(), Null);
}
int PromptRetryCancelOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_EXCLAMATION, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::exclamation(), qtf, true,
t_("&Retry"), t_("Cancel"), NULL, 0,
RetryButtonImage(), Null, Null);
}
int ErrorRetryCancelOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_ERROR, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::error(), qtf, true,
t_("&Retry"), t_("Cancel"), NULL, 0,
RetryButtonImage(), Null, Null);
}
int PromptAbortRetryIgnoreOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_EXCLAMATION, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::exclamation(), qtf, false,
t_("&Abort"), t_("&Retry"), t_("&Ignore"), 0,
AbortButtonImage(), RetryButtonImage(), Null);
}
int ErrorAbortRetryIgnoreOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_ERROR, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::error(), qtf, false,
t_("&Abort"), t_("&Retry"), t_("&Ignore"), 0,
AbortButtonImage(), RetryButtonImage(), Null);
}
int PromptSaveDontSaveCancelOpt1(const char *qtf, const char *opt_id) {
return PromptOpt1(opt_id, BEEP_QUESTION, callback(LaunchWebBrowser),
Ctrl::GetAppName(), CtrlImg::question(), qtf, true,
t_("&Save"), t_("&Don't Save"), t_("Cancel"), 0,
CtrlImg::save(), NoButtonImage(), Null);
}
}

View file

@ -128,7 +128,7 @@ public:
RichTextCtrl();
};
int Prompt(bool dontshowagain, const char *opt_id,
int Prompt(int dontshowagain, const char *opt_id,
Event<const String&> WhenLink, int beep,
const char *title, const Image& iconbmp, const char *qtf, bool okcancel,
const char *button1, const char *button2, const char *button3,
@ -169,6 +169,21 @@ int PromptOpt(const char *opt_id, int beep,
const char *button1, const char *button2 = NULL, const char *button3 = NULL,
int cx = 0);
int PromptOpt1(const char *opt_id, int beep, Event<const String&> WhenLink,
const char *title, const Image& icon, const char *qtf, bool okcancel,
const char *button1, const char *button2, const char *button3,
int cx, Image im1, Image im2, Image im3);
int PromptOpt1(const char *opt_id, int beep,
const char *title, const Image& icon, const char *qtf, bool okcancel,
const char *button1, const char *button2 = NULL, const char *button3 = NULL,
int cx = 0);
int PromptOpt1(const char *opt_id, int beep,
const char *title, const Image& icon, const char *qtf,
const char *button1, const char *button2 = NULL, const char *button3 = NULL,
int cx = 0);
void PromptOK(const char *qtf);
int PromptOKCancel(const char *qtf);
int PromptOKCancelAll(const char *qtf);
@ -179,6 +194,7 @@ int PromptRetryCancel(const char *qtf);
int PromptAbortRetry(const char *qtf);
int PromptAbortRetryIgnore(const char *qtf);
int PromptSaveDontSaveCancel(const char *qtf);
void ShowExc(const Exc& exc);
void Exclamation(const char *qtf);
@ -212,6 +228,30 @@ int ErrorYesNoAllOpt(const char *qtf, const char *opt_id = NULL);
int ErrorRetryCancelOpt(const char *qtf, const char *opt_id = NULL);
int ErrorAbortRetryOpt(const char *qtf, const char *opt_id = NULL);
int ErrorAbortRetryIgnoreOpt(const char *qtf, const char *opt_id = NULL);
void ShowExcOpt(const Exc& exc, const char *opt_id);
void PromptOKOpt1(const char *qtf, const char *opt_id = NULL);
int PromptOKCancelOpt1(const char *qtf, const char *opt_id = NULL);
int PromptOKCancelAllOpt1(const char *qtf, const char *opt_id = NULL);
int PromptYesNoOpt1(const char *qtf, const char *opt_id = NULL);
int PromptYesNoCancelOpt1(const char *qtf, const char *opt_id = NULL);
int PromptYesNoAllOpt1(const char *qtf, const char *opt_id = NULL);
int PromptRetryCancelOpt1(const char *qtf, const char *opt_id = NULL);
int PromptAbortRetryOpt1(const char *qtf, const char *opt_id = NULL);
int PromptAbortRetryIgnoreOpt1(const char *qtf, const char *opt_id = NULL);
int PromptSaveDontSaveCancelOpt1(const char *qtf, const char *opt_id = NULL);
void ExclamationOpt1(const char *qtf, const char *opt_id = NULL);
void ErrorOKOpt1(const char *qtf, const char *opt_id = NULL);
int ErrorOKCancelOpt1(const char *qtf, const char *opt_id = NULL);
int ErrorYesNoOpt1(const char *qtf, const char *opt_id = NULL);
int ErrorYesNoCancelOpt1(const char *qtf, const char *opt_id = NULL);
int ErrorYesNoAllOpt1(const char *qtf, const char *opt_id = NULL);
int ErrorRetryCancelOpt1(const char *qtf, const char *opt_id = NULL);
int ErrorAbortRetryOpt1(const char *qtf, const char *opt_id = NULL);
int ErrorAbortRetryIgnoreOpt1(const char *qtf, const char *opt_id = NULL);
void ShowExcOpt1(const Exc& exc, const char *opt_id);
Image YesButtonImage();
Image NoButtonImage();
@ -235,9 +275,6 @@ int (*RedirectPromptFn)(Event<const String&> WhenLink,
void RedirectPrompts(RedirectPromptFn r);
void ShowExc(const Exc& exc);
void ShowExcOpt(const Exc& exc, const char *opt_id);
class HelpWindow : public TopWindow {
public:
virtual bool Key(dword key, int);

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,238 @@
topic "Message Boxes";
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
[l288;2 $$2,2#27521748481378242620020725143825:desc]
[0 $$3,0#96390100711032703541132217272105:end]
[H6;0 $$4,0#05600065144404261032431302351956:begin]
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
[b42;ph2 $$9,9#13035079074754324216151401829390:normal]
[b42;a42;ph2 $$10,10#E71D914572A169C91BE52E3FB27F810F:text]
[2 $$0,0#00000000000000000000000000000000:Default]
[{_}
[ {{10000@(113.42.0) [s0;%% [*@7;4 Message Boxes]]}}&]
[s10;%% Message boxes in U`+`+ provide up to 3 buttons. The message
is using [*^topic`:`/`/RichText`/srcdoc`/QTF`_en`-us^ QTF] rich
text format `- it means that you can for example embed hyper`-link
or even table or image. This however can cause issues if some
non`-literal text is presented which can accidentally contain
QTF formatting characters. To solve this, you can use [*^topic`:`/`/RichText`/src`/Utilities`$en`-us`#Upp`:`:DeQtf`(const char`*`)^ D
eQtf][* ]function `'`\1`' switch (supresses QTF parsing till the
next `'`\1`'), e.g.:&]
[s10;l160;%% [/@(28.42.150) PromptOK(DeQtf(`"C:`\`\Program Files`\`\Upp`\`\theide`"));]&]
[s10;l160;%% [/@(28.42.150) PromptOK(`"`\1C:`\`\Program Files`\`\Upp`\`\theide`");]&]
[s10; &]
[s5;:Upp`:`:PromptOK`(const char`*`): [@(0.0.255) void]_[* PromptOK]([@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 qtf])&]
[s2;%% [%-*@3 qtf] .&]
[s3;%% &]
[s10; &]
[s10; &]
[s0; &]
[ {{10000F(128)G(128)@1 [s0;%% [* Functions]]}}&]
[s3; &]
[s5;:Upp`:`:PromptOKCancel`(const char`*`): [@(0.0.255) int]_[* PromptOKCancel]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:PromptOKCancelAll`(const char`*`): [@(0.0.255) int]_[* PromptOKCancelAll]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:PromptYesNo`(const char`*`): [@(0.0.255) int]_[* PromptYesNo]([@(0.0.255) const
]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:PromptYesNoCancel`(const char`*`): [@(0.0.255) int]_[* PromptYesNoCancel]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:PromptYesNoAll`(const char`*`): [@(0.0.255) int]_[* PromptYesNoAll]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:PromptRetryCancel`(const char`*`): [@(0.0.255) int]_[* PromptRetryCancel]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:PromptAbortRetry`(const char`*`): [@(0.0.255) int]_[* PromptAbortRetry]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:PromptAbortRetryIgnore`(const char`*`): [@(0.0.255) int]_[* PromptAbortRetryI
gnore]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:PromptSaveDontSaveCancel`(const char`*`): [@(0.0.255) int]_[* PromptSaveDontS
aveCancel]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:ShowExc`(const Upp`:`:Exc`&`): [@(0.0.255) void]_[* ShowExc]([@(0.0.255) const]_
[_^Upp`:`:Exc^ Exc][@(0.0.255) `&]_[*@3 exc])&]
[s5;:Upp`:`:Exclamation`(const char`*`): [@(0.0.255) void]_[* Exclamation]([@(0.0.255) cons
t]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:ErrorOK`(const char`*`): [@(0.0.255) void]_[* ErrorOK]([@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 qtf])&]
[s5;:Upp`:`:ErrorOKCancel`(const char`*`): [@(0.0.255) int]_[* ErrorOKCancel]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:ErrorYesNo`(const char`*`): [@(0.0.255) int]_[* ErrorYesNo]([@(0.0.255) const]_
[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:ErrorYesNoCancel`(const char`*`): [@(0.0.255) int]_[* ErrorYesNoCancel]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:ErrorYesNoAll`(const char`*`): [@(0.0.255) int]_[* ErrorYesNoAll]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:ErrorRetryCancel`(const char`*`): [@(0.0.255) int]_[* ErrorRetryCancel]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:ErrorAbortRetry`(const char`*`): [@(0.0.255) int]_[* ErrorAbortRetry]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:ErrorAbortRetryIgnore`(const char`*`): [@(0.0.255) int]_[* ErrorAbortRetryIgn
ore]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf])&]
[s5;:Upp`:`:PromptOKOpt`(const char`*`,const char`*`): [@(0.0.255) void]_[* PromptOKOpt](
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 o
pt`_id]_`=_NULL)&]
[s5;:Upp`:`:PromptOKCancelOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* PromptOK
CancelOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:PromptOKCancelAllOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* Promp
tOKCancelAllOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:PromptYesNoOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* PromptYesNo
Opt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) char]_
`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:PromptYesNoCancelOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* Promp
tYesNoCancelOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:PromptYesNoAllOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* PromptYe
sNoAllOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:PromptRetryCancelOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* Promp
tRetryCancelOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:PromptAbortRetryOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* Prompt
AbortRetryOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:PromptAbortRetryIgnoreOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* P
romptAbortRetryIgnoreOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:PromptSaveDontSaveCancelOpt`(const char`*`,const char`*`): [@(0.0.255) int]_
[* PromptSaveDontSaveCancelOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:ExclamationOpt`(const char`*`,const char`*`): [@(0.0.255) void]_[* Exclamatio
nOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) char
]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:ErrorOKOpt`(const char`*`,const char`*`): [@(0.0.255) void]_[* ErrorOKOpt]([@(0.0.255) c
onst]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id]_`=
_NULL)&]
[s5;:Upp`:`:ErrorOKCancelOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* ErrorOKCa
ncelOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:ErrorYesNoOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* ErrorYesNoOp
t]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) char]_`*
[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:ErrorYesNoCancelOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* ErrorY
esNoCancelOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:ErrorYesNoAllOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* ErrorYesN
oAllOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:ErrorRetryCancelOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* ErrorR
etryCancelOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id]_`=_NULL)&]
[s5;:Upp`:`:ErrorAbortRetryOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* ErrorAb
ortRetryOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:ErrorAbortRetryIgnoreOpt`(const char`*`,const char`*`): [@(0.0.255) int]_[* E
rrorAbortRetryIgnoreOpt]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:ShowExcOpt`(const Upp`:`:Exc`&`,const char`*`): [@(0.0.255) void]_[* ShowExcO
pt]([@(0.0.255) const]_[_^Upp`:`:Exc^ Exc][@(0.0.255) `&]_[*@3 exc],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:PromptOKOpt1`(const char`*`,const char`*`): [@(0.0.255) void]_[* PromptOKOpt1
]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) char]_`*
[*@3 opt`_id])&]
[s5;:Upp`:`:PromptOKCancelOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* PromptO
KCancelOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:PromptOKCancelAllOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* Prom
ptOKCancelAllOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:PromptYesNoOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* PromptYesN
oOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) cha
r]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:PromptYesNoCancelOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* Prom
ptYesNoCancelOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:PromptYesNoAllOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* PromptY
esNoAllOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:PromptRetryCancelOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* Prom
ptRetryCancelOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:PromptAbortRetryOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* Promp
tAbortRetryOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:PromptAbortRetryIgnoreOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_
[* PromptAbortRetryIgnoreOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:PromptSaveDontSaveCancelOpt1`(const char`*`,const char`*`): [@(0.0.255) int
]_[* PromptSaveDontSaveCancelOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:ExclamationOpt1`(const char`*`,const char`*`): [@(0.0.255) void]_[* Exclamati
onOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) ch
ar]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:ErrorOKOpt1`(const char`*`,const char`*`): [@(0.0.255) void]_[* ErrorOKOpt1](
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 o
pt`_id])&]
[s5;:Upp`:`:ErrorOKCancelOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* ErrorOKC
ancelOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:ErrorYesNoOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* ErrorYesNoO
pt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) char]_
`*[*@3 opt`_id])&]
[s5;:Upp`:`:ErrorYesNoCancelOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* Error
YesNoCancelOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:ErrorYesNoAllOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* ErrorYes
NoAllOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:ErrorRetryCancelOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* Error
RetryCancelOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:ErrorAbortRetryOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* ErrorA
bortRetryOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf], [@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:ErrorAbortRetryIgnoreOpt1`(const char`*`,const char`*`): [@(0.0.255) int]_[* E
rrorAbortRetryIgnoreOpt1]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 qtf],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s5;:Upp`:`:ShowExcOpt1`(const Upp`:`:Exc`&`,const char`*`): [@(0.0.255) void]_[* ShowExc
Opt1]([@(0.0.255) const]_[_^Upp`:`:Exc^ Exc][@(0.0.255) `&]_[*@3 exc],
[@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 opt`_id])&]
[s2; There are many various functions providing message boxes. The
first word in camel case function name designates the icon used
in the message box and possible associated sound. It is followed
by the name of buttons and optional [* Opt] or [* Opt1] part. [* Opt]
and [* Opt1] mean that the dialog has `"Do not show this again`"
option (more on that later).&]
[s2; If there are 2 or 3 buttons, the function returns an int to
report which button was pressed. First button listed in the name
returns 1, second 0 and third `-1 (e.g. in PromptYesNo Yes is
1 and No is 0, in PromptYesNoCancle Yes is 1, No is 0 and Cancel
is `-1).&]
[s2; If the name contains [* Opt] or [* Opt1], the process of ignoring
the dialog next time is automated via storing specific String
key `- this key is passed as second const char `* parameter to
the function `- if it is NULL (default), it is generated by hashing
the message.&]
[s2; The diference between [* Opt] and [* Opt1] is that [* Opt] remembers
which button was pressed and returns the same value next time
(e.g. if in PromptOKCancel `"Do not show again`" is checked and
user presses Cancel, the next the same PromptOKCancel is invoked,
it returns without displaying the dialog with 0). As this behaviour
can be confusing in certain context, [* Opt1] variant only grants
`"Do not show again`" request if the user chooses button that
returns 1 (e.g. OK or Yes).&]
[s3;%% &]
[s4; &]
[s5;:Upp`:`:ClearPromptOptHistory`(`): [@(0.0.255) void]_[* ClearPromptOptHistory]()&]
[s2;%% Clears the list of `"Do not show again`" message boxes.&]
[s3; &]
[s4; &]
[s5;:Upp`:`:ClearPromptOptHistory`(Upp`:`:Gate`<Upp`:`:String`>`): [@(0.0.255) void]_[* C
learPromptOptHistory]([_^Upp`:`:Gate^ Gate]<[_^Upp`:`:String^ String]>_[*@3 filter])&]
[s2;%% Clears the list of `"Do not show again`" message boxes `-
only removes those where [%-*@3 filter] returns true for [%-*@3 opt`_id].&]
[s3;%% &]
[s4; &]
[s5;:Upp`:`:SerializePromptOptHistory`(Upp`:`:Stream`&`): [@(0.0.255) void]_[* SerializeP
romptOptHistory]([_^Upp`:`:Stream^ Stream][@(0.0.255) `&]_[*@3 s])&]
[s2;%% Serializes the list of `"Do not show again`" message boxes.&]
[s3;%% &]
[s4; &]
[s5;:Upp`:`:RedirectPrompts`(Upp`:`:RedirectPromptFn`): [@(0.0.255) void]_[* RedirectProm
pts]([_^Upp`:`:RedirectPromptFn^ RedirectPromptFn]_[*@3 r])&]
[s2;%% Completely redirects all message boxes to another function.&]
[s3;%% &]
[s0; ]]

View file

@ -0,0 +1,13 @@
TITLE("Message Boxes")
COMPRESSED
120,156,205,91,107,115,219,182,18,253,43,152,56,73,37,87,145,9,62,68,61,122,59,206,203,109,38,189,205,109,30,31,58,42,109,66,20,36,97,66,145,42,65,201,113,51,201,111,191,187,32,41,145,180,148,88,38,167,82,198,17,37,0,123,176,103,119,241,32,102,49,20,166,217,29,48,221,26,124,124,253,166,55,208,201,195,135,180,165,157,24,54,53,186,150,65,77,189,3,31,212,160,186,165,27,38,237,234,61,179,107,24,93,173,239,249,76,74,103,232,235,221,174,18,210,91,250,137,110,91,58,181,205,174,217,165,134,221,213,65,86,215,52,93,179,117,139,154,70,87,183,250,99,46,61,103,168,65,115,3,250,232,117,140,158,70,53,205,166,84,51,116,91,51,44,147,82,67,7,8,221,214,169,102,245,121,48,118,134,191,118,6,40,96,130,128,102,117,52,77,235,0,154,105,106,128,142,98,166,65,13,77,55,44,218,179,58,253,17,159,138,192,25,222,166,100,125,151,146,173,245,69,204,231,41,35,102,14,78,207,173,1,5,209,78,171,115,98,67,183,166,5,157,245,144,145,
1,98,186,222,177,122,212,50,65,37,83,211,251,17,255,123,41,34,62,231,65,156,34,8,74,117,58,24,81,123,0,42,124,253,250,181,77,77,45,177,148,13,186,80,13,244,214,41,148,1,15,155,90,61,173,103,117,105,87,51,108,83,183,108,160,190,96,17,155,167,76,70,166,62,72,121,116,91,221,147,14,237,128,69,181,46,232,111,245,0,64,3,18,240,4,67,90,240,103,116,251,113,42,140,114,139,25,138,245,90,189,19,48,147,97,105,118,79,179,77,219,50,129,139,78,59,20,76,169,161,5,192,17,253,32,140,230,204,79,196,216,90,148,106,45,170,157,188,180,233,139,30,53,45,91,127,74,59,189,231,61,250,236,165,165,191,52,46,158,233,246,69,151,106,23,253,152,127,2,230,40,160,161,163,190,243,175,255,130,79,216,210,7,137,207,87,95,200,144,124,254,76,177,248,188,1,254,111,155,122,91,107,146,161,212,6,143,30,145,225,233,185,61,48,201,127,185,148,108,202,201,179,240,19,151,142,243,229,203,99,103,40,169,106,145,85,141,176,138,136,128,124,112,127,116,127,
36,139,40,92,137,49,39,203,5,137,67,98,144,209,50,142,195,64,182,201,251,25,39,243,84,70,72,178,148,34,152,66,55,151,113,184,16,158,219,119,207,220,179,183,194,155,189,7,66,238,153,140,188,113,232,185,103,127,188,191,112,175,120,224,62,89,202,75,2,63,28,18,65,27,130,172,201,4,237,22,19,247,9,17,49,32,179,64,146,120,6,5,55,225,146,120,44,192,122,194,63,177,249,194,231,132,207,71,124,76,102,55,11,30,185,79,124,17,124,36,88,185,226,1,137,217,8,234,225,151,152,131,102,168,38,40,55,11,175,161,50,82,48,30,91,74,212,88,46,145,230,132,200,112,206,73,16,6,136,19,243,136,249,137,54,32,181,136,184,132,64,132,142,174,103,168,37,74,51,207,3,107,4,49,243,253,27,226,133,240,5,44,5,68,82,237,99,52,130,55,131,184,241,0,11,173,20,66,7,254,138,3,21,33,91,107,46,168,194,55,108,229,158,125,136,5,168,35,184,116,31,38,230,114,79,62,44,22,208,20,92,254,71,60,113,27,208,183,140,85,87,238,169,219,188,36,
170,216,25,158,18,226,76,150,129,23,139,48,32,238,15,238,95,212,253,129,200,107,17,131,254,13,185,68,74,18,120,163,198,16,221,202,103,208,19,112,6,111,6,200,59,149,105,182,8,111,79,219,253,52,62,124,218,73,194,232,236,188,161,119,49,180,168,5,193,245,191,40,156,47,226,55,175,27,170,247,134,251,224,121,223,253,203,253,11,138,167,48,114,200,133,240,129,0,20,160,234,240,128,78,192,120,238,131,102,115,224,220,17,216,125,0,234,220,17,117,13,74,240,105,13,250,169,197,50,176,178,209,250,100,120,222,208,218,90,27,38,128,38,89,133,98,236,92,129,1,179,230,78,35,95,173,68,161,62,95,4,56,206,149,123,10,99,203,32,127,131,245,155,216,175,142,116,200,240,209,147,172,148,180,177,216,192,226,188,126,217,51,121,100,67,247,162,65,245,110,243,23,245,121,78,55,163,151,92,164,78,93,143,90,99,23,205,231,44,240,184,255,109,178,34,136,11,92,19,153,123,50,222,165,194,83,255,94,90,128,88,77,138,252,201,229,239,225,62,42,40,129,58,59,223,223,
23,57,177,58,21,217,211,23,153,76,77,42,188,229,113,116,179,191,45,114,98,53,41,242,116,20,70,9,236,62,122,108,164,106,87,227,213,20,182,11,252,126,202,36,178,53,169,244,142,173,248,11,88,207,240,185,191,167,110,75,87,86,235,29,44,218,47,63,121,153,22,105,41,150,60,222,57,117,167,50,219,251,190,186,220,96,92,18,108,150,111,229,62,70,4,80,133,67,69,73,21,104,235,51,88,221,97,250,189,227,26,146,147,168,108,136,151,81,20,70,119,94,189,210,214,117,245,186,79,40,20,68,234,81,96,143,25,124,211,190,198,174,247,166,95,231,244,189,1,188,243,236,93,16,169,71,129,189,231,238,178,84,61,106,236,59,115,151,132,234,86,98,159,121,123,171,104,109,123,173,55,139,184,164,70,107,175,109,46,200,239,175,75,139,236,35,17,130,138,87,216,173,251,159,171,223,63,252,246,219,55,119,141,123,242,217,190,135,60,54,82,48,26,107,225,149,224,28,5,53,53,203,84,34,149,33,28,15,157,26,34,176,136,115,60,212,170,70,96,14,228,40,72,229,22,152,
74,188,138,56,71,65,109,179,84,84,98,86,128,57,50,98,201,26,88,19,189,53,216,81,144,188,253,42,84,137,230,86,184,3,19,205,189,221,220,119,247,81,132,56,52,159,228,197,229,222,92,214,226,199,193,163,82,212,149,49,142,129,82,149,173,70,1,224,104,200,84,119,209,81,237,51,10,175,157,149,89,29,197,46,163,252,22,91,133,213,81,237,49,74,111,163,85,120,29,100,135,113,151,247,242,122,72,253,235,251,138,237,39,160,57,50,133,67,208,187,45,78,27,144,202,167,162,181,144,202,29,59,208,170,231,22,244,64,142,185,117,214,176,23,147,157,39,22,199,65,39,153,125,107,96,148,2,29,148,84,182,240,87,160,179,134,56,60,145,58,226,173,4,116,120,82,149,227,45,143,114,80,58,197,101,190,2,163,18,208,65,73,21,214,248,10,156,138,56,71,66,105,189,194,215,66,108,131,118,80,122,91,79,12,42,16,220,142,119,168,237,94,225,220,224,126,59,136,18,198,33,55,174,21,246,65,57,249,195,50,168,22,99,183,64,14,73,166,210,118,161,136,112,112,26,53,
184,229,56,246,10,229,131,129,138,124,14,187,83,216,114,30,112,127,62,199,177,79,184,125,20,112,127,70,71,177,75,216,117,12,80,7,173,131,239,17,54,231,1,180,150,83,133,29,60,254,157,99,5,125,128,105,232,17,39,12,254,207,89,112,67,86,44,18,225,82,146,44,7,90,166,9,236,152,232,60,207,103,184,39,9,236,19,17,1,217,235,48,26,99,198,187,199,230,220,135,79,201,215,242,36,128,50,50,230,82,76,3,22,115,169,18,165,5,40,137,41,220,74,40,206,229,193,3,50,97,193,152,44,66,41,5,230,161,51,41,67,79,48,204,33,151,225,50,24,183,201,43,149,90,62,9,125,63,188,134,210,209,77,146,122,141,189,132,147,44,187,94,129,0,83,80,128,249,152,253,139,199,55,152,212,158,124,165,14,38,111,199,237,117,13,54,95,87,97,234,124,146,57,143,200,99,193,252,112,74,102,76,18,247,193,139,144,4,97,76,36,120,79,37,164,19,54,101,34,112,31,164,125,145,198,28,130,147,132,169,184,15,122,71,205,118,106,232,87,19,196,75,109,173,163,50,
235,203,0,45,213,211,218,100,17,143,151,145,34,129,163,0,175,13,68,124,1,3,32,77,163,79,132,200,53,75,50,236,193,140,109,114,161,252,144,214,248,66,198,27,219,42,211,100,144,180,69,36,7,235,143,137,166,72,3,9,112,157,251,132,146,6,166,171,163,76,238,165,144,252,137,41,254,32,165,218,194,111,248,174,181,74,141,112,254,4,79,101,77,91,89,59,37,147,76,174,248,27,250,40,153,34,209,204,75,238,0,200,109,94,74,236,2,1,232,1,77,116,175,192,209,175,114,238,55,158,81,89,247,177,152,171,91,20,108,25,135,115,21,46,43,193,136,140,147,214,114,193,61,49,17,30,121,23,171,223,31,249,13,94,147,80,30,196,239,120,87,129,161,33,33,222,50,251,108,134,49,113,79,137,186,201,194,193,157,232,141,130,179,240,186,197,4,111,92,0,8,158,22,147,198,56,185,83,210,108,165,165,83,30,240,72,233,4,193,10,113,52,203,8,164,81,223,222,140,68,224,52,129,16,1,155,145,17,143,175,57,15,182,135,168,72,175,118,100,149,120,227,103,62,226,145,
220,25,34,74,62,139,2,236,92,162,241,87,204,95,242,156,5,211,32,152,108,92,156,237,44,75,193,159,197,61,40,226,205,184,247,49,237,0,198,116,68,178,59,18,137,96,107,115,53,98,221,109,9,90,224,117,153,85,8,32,202,100,153,150,215,34,158,133,203,24,108,34,23,62,187,41,185,29,107,137,214,108,147,167,50,113,228,136,207,216,10,230,174,228,150,202,72,69,214,36,185,85,131,83,19,143,212,85,19,12,55,208,165,181,177,37,206,120,12,134,89,24,248,55,100,26,193,215,242,72,207,200,226,229,42,14,65,33,146,240,85,100,189,89,24,34,217,212,226,202,43,235,193,150,218,243,205,107,12,106,24,32,205,226,77,6,179,124,3,225,185,207,89,148,26,103,17,255,42,48,126,111,220,198,206,85,100,107,123,167,177,185,70,161,26,36,254,198,73,1,135,208,118,106,197,169,61,119,61,226,174,58,166,181,191,64,156,187,63,101,75,165,26,109,238,207,251,234,191,89,252,16,238,146,224,167,243,211,166,52,193,189,76,71,179,243,115,178,20,78,132,15,227,211,169,74,
30,7,180,10,5,24,83,225,74,45,88,224,96,24,87,56,117,167,183,82,210,174,54,227,41,130,81,132,215,171,210,250,108,141,253,142,187,223,113,136,60,95,252,195,119,154,19,24,114,54,255,86,194,246,46,136,188,21,19,20,101,47,142,247,241,182,109,36,100,206,112,107,208,251,70,206,46,194,111,249,88,68,220,139,19,101,229,154,102,177,252,34,216,73,183,4,144,39,89,198,184,36,229,146,148,105,33,68,66,188,13,23,115,229,238,164,53,172,33,190,95,10,9,152,243,25,16,135,16,88,207,251,69,166,218,128,56,206,255,1,208,218,74,231,

View file

@ -0,0 +1,13 @@
topic "";
[H6;0 $$1,0#05600065144404261032431302351956:begin]
[i448;a25;kKO9;2 $$2,0#37138531426314131252341829483370:codeitem]
[l288;2 $$3,0#27521748481378242620020725143825:desc]
[0 $$4,0#96390100711032703541132217272105:end]
[ $$0,0#00000000000000000000000000000000:Default]
[{_}%EN-US
[s1;%- &]
[s2;:Upp`:`:PromptOK`(const char`*`):%- [@(0.0.255) void]_[* PromptOK]([@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 qtf])&]
[s3; [%-*@3 qtf] .&]
[s4; &]
[s0; ]]

View file

@ -0,0 +1,5 @@
TITLE("")
COMPRESSED
120,156,133,143,79,75,195,64,16,197,191,202,130,173,180,193,150,249,179,155,221,236,94,122,80,16,10,86,144,158,150,37,169,73,170,193,182,169,77,244,34,126,119,55,133,66,111,206,97,14,111,222,111,230,141,127,76,29,136,209,8,239,224,6,84,10,0,169,66,41,37,72,74,17,152,36,35,3,177,194,76,165,246,181,126,107,14,193,55,82,26,183,33,229,62,150,171,204,81,164,41,210,172,145,141,98,140,96,108,200,72,138,88,162,161,76,26,102,13,182,108,171,186,233,235,125,240,59,50,230,204,113,228,72,43,66,45,141,52,200,218,80,196,9,128,64,83,204,193,134,148,173,234,174,12,126,8,41,163,61,75,57,3,4,208,56,196,211,192,74,34,50,197,21,164,9,65,217,250,80,5,31,205,48,124,244,79,217,251,122,187,249,218,245,193,255,228,191,227,135,167,217,250,69,248,14,221,120,38,110,131,239,200,217,245,241,88,216,194,62,159,218,253,177,95,45,139,73,217,30,186,94,148,239,155,83,145,20,83,27,157,126,49,129,57,204,73,169,169,248,110,155,42,228,62,17,
23,32,76,174,199,103,56,206,175,165,184,41,228,69,226,147,5,139,207,126,27,166,195,101,118,66,248,241,236,162,137,249,32,74,119,78,5,78,132,240,7,197,213,110,110,

View file

@ -0,0 +1,8 @@
TOPIC("MessageBoxes_en-us")
#include "MessageBoxes_en-us.tppi"
END_TOPIC
TOPIC("Upp_en-us")
#include "Upp_en-us.tppi"
END_TOPIC

View file

@ -4,7 +4,7 @@
void Ide::SerializeWorkspace(Stream& s) {
int i;
int version = 19;
int version = 20;
s / version;
s.Magic(0x12354);
if(s.IsStoring()) {
@ -122,6 +122,8 @@ void Ide::SerializeWorkspace(Stream& s) {
}
if(version >= 12)
SerializePlacement(s);
if(version >= 20)
s % difflru;
}
void Ide::SerializeLastMain(Stream& s)

View file

@ -714,6 +714,9 @@ void Ide::Diff()
diffdlg.diff.WhenLeftLine = THISBACK1(GotoDiffLeft, &diffdlg);
diffdlg.diff.WhenRightLine = THISBACK1(GotoDiffRight, &diffdlg);
diffdlg.Execute(editfile);
String s = diffdlg.GetExtPath();
if(FileExists(s))
LruAdd(difflru, s);
}
void Ide::DiffWith(const String& path)

View file

@ -545,6 +545,8 @@ public:
ArrayMap<String, FileData> filedata;
Index<String> editastext;
Index<String> editashex;
Vector<String> difflru;
DropList mainconfiglist;
String mainconfigname;

View file

@ -120,8 +120,8 @@ KEY(COMMENTLINES, "Comment code lines", K_SHIFT|K_ALT_K)
KEY(UNCOMMENT, "Uncomment code", K_CTRL_K|K_ALT_K)
KEY(REFORMAT_COMMENT, "Reformat comment paragraph", K_ALT_R)
KEY(DIFF, "Compare with file..", 0)
KEY(DIFFLOG, "Compare with log..", 0)
KEY(DIFF, "File..", 0)
KEY(DIFFLOG, "Log..", 0)
KEY(SVNDIFF, "Show repository history of file..", 0)
KEY(PATCH, "Display/apply patch..", 0)
KEY(DIRDIFF, "Compare directories..", 0)

View file

@ -497,18 +497,26 @@ void Ide::FilePropertiesMenu(Bar& menu)
menu.Add(IsActiveFile() && !designer, AK_SAVEENCODING, THISBACK(ChangeCharset))
.Help("Convert actual file to different encoding");
bool candiff = IsActiveFile() && !editfile_isfolder && !designer;
menu.AddMenu(candiff, AK_DIFF, IdeImg::Diff(), THISBACK(Diff))
.Help("Show differences between the current and arbitrary files");
String path;
int i = filelist.GetCursor() + 1;
if(i >= 0 && i < fileindex.GetCount() && fileindex[i] < actual.file.GetCount())
path = SourcePath(actualpackage, actual.file[fileindex[i]]);
menu.AddMenu(candiff && FileExists(path), "Compare with " + Nvl(GetFileName(path), "next file"),
IdeImg::DiffNext(), [=] { DiffWith(path); })
.Help("Show differences between the current and the next file");
menu.AddMenu(candiff && FileExists(GetTargetLogPath()),
AK_DIFFLOG, IdeImg::DiffLog(), [=] { DiffWith(GetTargetLogPath()); })
.Help("Show differences between the current and the log");
menu.Sub(candiff, "Compare with", [=](Bar& bar) {
bar.AddMenu(candiff, AK_DIFF, IdeImg::Diff(), THISBACK(Diff))
.Help("Show differences between the current and selected file");
bar.AddMenu(candiff && FileExists(GetTargetLogPath()),
AK_DIFFLOG, IdeImg::DiffLog(), [=] { DiffWith(GetTargetLogPath()); })
.Help("Show differences between the current file and the log");
if(FileExists(path))
bar.AddMenu(candiff && FileExists(path), path,
IdeImg::DiffNext(), [=] { DiffWith(path); })
.Help("Show differences between the current and the next file");
for(String p : difflru)
if(p != path)
bar.AddMenu(candiff && FileExists(p), p,
IdeImg::DiffNext(), [=] { DiffWith(p); })
.Help("Show differences between the current and that file");
});
if(editfile_repo) {
String txt = String("Show ") + (editfile_repo == SVN_DIR ? "svn" : "git") + " history of ";
menu.AddMenu(candiff, AK_SVNDIFF, IdeImg::SvnDiff(), [=] {