mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: Compare windows now have specific icons
This commit is contained in:
parent
d296532560
commit
f9160ad466
5 changed files with 37 additions and 7 deletions
|
|
@ -259,6 +259,8 @@ Event<const String&, Vector<LineEdit::Highlight>&, const WString&> DiffDlg::When
|
|||
|
||||
DiffDlg::DiffDlg()
|
||||
{
|
||||
Icon(DiffImg::Diff());
|
||||
|
||||
Add(diff.SizePos());
|
||||
Sizeable().Zoomable();
|
||||
diff.InsertFrameLeft(p);
|
||||
|
|
|
|||
|
|
@ -964,7 +964,7 @@ void Ide::Diff()
|
|||
DoDiff(&diffdlg);
|
||||
}
|
||||
|
||||
void Ide::DiffWith(const String& path)
|
||||
void Ide::DiffWith(const String& path, const Image& icon)
|
||||
{
|
||||
#ifdef CPU_64
|
||||
int64 maxsize = 2000*1024*1024;
|
||||
|
|
@ -978,6 +978,7 @@ void Ide::DiffWith(const String& path)
|
|||
return;
|
||||
}
|
||||
FileDiff& diffdlg = CreateNewWindow<FileDiff>(AnySourceFs());
|
||||
diffdlg.Icon(icon);
|
||||
diffdlg.Set(editfile, path);
|
||||
DoDiff(&diffdlg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -857,7 +857,7 @@ public:
|
|||
void Print();
|
||||
void DoDiff(FileDiff *diffdlg);
|
||||
void Diff();
|
||||
void DiffWith(const String& path);
|
||||
void DiffWith(const String& path, const Image& icon);
|
||||
void DiffFiles(const char *lname, const String& l, const char *rname, const String& r);
|
||||
String LoadConflictFile(const String& n);
|
||||
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ IMAGE_ID(svn_dir)
|
|||
IMAGE_ID(svn_dir__DARK)
|
||||
IMAGE_ID(svn_dir__UHD)
|
||||
IMAGE_ID(svn_dir__UHD__DARK)
|
||||
IMAGE_ID(DiffClip__UHD)
|
||||
IMAGE_ID(DiffLog__UHD)
|
||||
IMAGE_ID(DiffNext__UHD)
|
||||
IMAGE_ID(Diff__UHD)
|
||||
|
|
@ -161,6 +162,7 @@ IMAGE_ID(Navigator)
|
|||
IMAGE_ID(opposite)
|
||||
IMAGE_ID(HelpAll)
|
||||
IMAGE_ID(show)
|
||||
IMAGE_ID(DiffClip)
|
||||
IMAGE_ID(Go_forward)
|
||||
IMAGE_ID(star)
|
||||
IMAGE_ID(CurrentOK)
|
||||
|
|
@ -4255,6 +4257,30 @@ IMAGE_DATA(122,253,55,101,75,248,147,77,6,213,49,24,178,37,253,111,71,50,72,92,2
|
|||
IMAGE_DATA(229,146,65,11,54,217,100,240,59,77,212,48,39,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
|
||||
IMAGE_END_DATA(2208, 10)
|
||||
|
||||
IMAGE_BEGIN_DATA
|
||||
IMAGE_DATA(120,156,237,221,49,110,219,64,16,133,97,30,38,85,14,224,36,149,174,224,218,128,19,31,66,141,78,96,55,134,125,140)
|
||||
IMAGE_DATA(20,46,82,164,79,151,155,36,77,0,193,85,82,218,102,65,123,33,236,48,92,238,44,103,118,247,31,96,42,11,228,236)
|
||||
IMAGE_DATA(247,164,145,224,134,239,175,134,171,129,162,40,106,170,243,139,47,79,177,182,158,171,245,146,220,201,161,124,45,181,39,3)
|
||||
IMAGE_DATA(253,90,226,75,6,249,165,241,190,230,179,145,94,218,59,165,247,29,117,125,57,60,197,58,117,135,151,246,151,90,154,191)
|
||||
IMAGE_DATA(164,153,102,149,240,79,157,1,127,252,173,170,85,255,221,110,87,69,151,240,79,157,1,127,253,239,223,45,236,91,240,191)
|
||||
IMAGE_DATA(249,60,68,251,231,221,59,247,254,227,140,210,252,225,61,142,199,163,219,158,243,207,205,224,246,254,199,108,231,218,227,191)
|
||||
IMAGE_DATA(46,7,141,107,246,226,175,149,129,102,135,179,245,224,239,37,135,216,76,61,249,91,102,32,205,211,170,255,175,175,103,42)
|
||||
IMAGE_DATA(253,91,104,173,235,227,143,63,254,248,227,143,63,254,248,107,249,75,110,165,61,83,239,139,63,254,248,227,143,63,254,248)
|
||||
IMAGE_DATA(247,237,63,12,195,166,254,227,253,240,127,179,183,240,159,50,232,217,127,114,176,242,31,187,87,255,208,192,210,95,43,131)
|
||||
IMAGE_DATA(154,252,79,207,111,237,175,145,65,45,254,177,179,123,240,207,205,160,6,127,233,220,94,252,115,50,240,238,63,119,102,79)
|
||||
IMAGE_DATA(254,107,51,240,236,255,191,243,122,243,95,147,129,87,255,37,103,245,232,159,154,129,71,255,165,231,244,220,181,250,91,187)
|
||||
IMAGE_DATA(109,157,129,39,127,107,47,139,12,36,103,233,245,248,183,235,223,90,6,57,251,199,202,191,149,12,114,191,127,45,253,45)
|
||||
IMAGE_DATA(126,127,46,241,209,182,247,236,191,52,3,111,254,41,246,222,253,151,100,160,229,255,231,225,67,180,195,179,107,219,207,181)
|
||||
IMAGE_DATA(52,79,171,255,127,203,245,215,180,247,230,63,151,129,7,127,109,123,143,254,82,6,214,254,37,236,189,250,199,50,176,244)
|
||||
IMAGE_DATA(47,101,239,217,255,52,3,43,255,146,246,222,253,195,12,180,252,31,191,125,140,118,120,246,233,158,167,185,148,112,150,230)
|
||||
IMAGE_DATA(241,226,63,101,176,181,127,236,115,209,171,255,154,206,241,151,246,18,254,248,227,143,63,254,245,250,255,253,254,41,218,169)
|
||||
IMAGE_DATA(185,164,182,116,125,105,30,252,241,199,31,127,252,211,251,112,56,224,111,104,143,191,173,253,156,255,191,151,179,197,90,114)
|
||||
IMAGE_DATA(40,221,210,60,181,249,143,230,251,253,254,181,241,223,254,125,143,191,237,206,193,223,118,231,76,61,254,13,255,237,119,206)
|
||||
IMAGE_DATA(100,143,191,205,206,9,95,147,250,251,211,91,123,245,159,219,57,248,219,238,28,252,109,119,14,254,182,59,7,127,219,157)
|
||||
IMAGE_DATA(131,191,237,206,9,59,124,102,135,116,150,90,186,198,231,143,72,207,79,177,182,92,99,142,63,254,248,183,241,252,53,107)
|
||||
IMAGE_DATA(87,252,235,232,218,253,41,138,162,40,138,162,40,138,162,40,42,167,158,1,38,104,208,111,0,0,0,0,0,0,0,0)
|
||||
IMAGE_END_DATA(672, 1)
|
||||
|
||||
IMAGE_BEGIN_DATA
|
||||
IMAGE_DATA(120,156,237,216,177,106,2,65,16,6,224,171,83,167,75,17,235,52,137,144,126,123,11,173,82,36,66,8,118,233,45,180)
|
||||
IMAGE_DATA(8,6,172,3,41,108,181,79,94,34,207,32,62,128,144,90,124,133,139,87,156,44,199,236,184,251,223,200,78,96,70,166)
|
||||
|
|
|
|||
|
|
@ -587,14 +587,14 @@ void Ide::FilePropertiesMenu(Bar& menu)
|
|||
if(i >= 0 && i < fileindex.GetCount() && fileindex[i] < actual.file.GetCount())
|
||||
path = SourcePath(actualpackage, actual.file[fileindex[i]]);
|
||||
menu.Sub(candiff, "Compare with", [=](Bar& bar) {
|
||||
bar.AddMenu(candiff, AK_DIFF, IdeImg::Diff(), THISBACK(Diff))
|
||||
bar.AddMenu(candiff, AK_DIFF, IdeImg::Diff(), [=] { Diff(); })
|
||||
.Help("Show differences between the current and selected file");
|
||||
bar.AddMenu(candiff && FileExists(GetTargetLogPath()),
|
||||
AK_DIFFLOG, IdeImg::DiffLog(), [=] { DiffWith(GetTargetLogPath()); })
|
||||
AK_DIFFLOG, IdeImg::DiffLog(), [=] { DiffWith(GetTargetLogPath(), IdeImg::DiffLog()); })
|
||||
.Help("Show differences between the current file and the log");
|
||||
if(FileExists(path))
|
||||
bar.AddMenu(candiff && FileExists(path), path,
|
||||
IdeImg::DiffNext(), [=] { DiffWith(path); })
|
||||
IdeImg::DiffNext(), [=] { DiffWith(path, IdeImg::DiffNext()); })
|
||||
.Help("Show differences between the current and the next file");
|
||||
Vector<String> file;
|
||||
if(bar.IsMenuBar()) {
|
||||
|
|
@ -613,7 +613,7 @@ void Ide::FilePropertiesMenu(Bar& menu)
|
|||
sep = false;
|
||||
if(++ii > 80) // sanity..
|
||||
return;
|
||||
bar.AddMenu(p, IdeImg::DiffNext(), [=] { DiffWith(p); })
|
||||
bar.AddMenu(p, IdeImg::DiffNext(), [=] { DiffWith(p, IdeImg::DiffNext()); })
|
||||
.Help("Show differences between the current and that file");
|
||||
}
|
||||
}
|
||||
|
|
@ -1111,12 +1111,13 @@ void Ide::EditorMenu(Bar& bar)
|
|||
bar.MenuSeparator();
|
||||
OnlineSearchMenu(bar);
|
||||
bar.Add(IsClipboardAvailableText() && (editor.IsSelection() || editor.GetLength() < 1024*1024),
|
||||
"Compare with clipboard..", [=]() {
|
||||
"Compare with clipboard..", IdeImg::DiffClip(), [=]() {
|
||||
DiffDlg& dlg = CreateNewWindow<DiffDlg>();
|
||||
dlg.diff.left.RemoveFrame(dlg.p);
|
||||
dlg.diff.Set(ReadClipboardText(), editor.IsSelection() ? editor.GetSelection()
|
||||
: editor.Get());
|
||||
dlg.Title("Compare with clipboard");
|
||||
dlg.Icon(IdeImg::DiffClip());
|
||||
dlg.OpenMain();
|
||||
});
|
||||
bar.MenuSeparator();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue