U++: Issueshttps://www.ultimatepp.org/redmine/https://www.ultimatepp.org/redmine/redmine/favicon.ico2020-06-19T14:42:51ZRedmine
Redmine Feature #2046 (Approved): TabBar: Added features and fixeshttps://www.ultimatepp.org/redmine/issues/20462020-06-19T14:42:51ZIƱaki Zabalakoldo.ramirez@gmail.com
<p>Additions<br />- To allow user code to change style<br />SetStyle(const TabBar::Style& s)</p>
<p>- To allow close tabs without crosses, and show the ContextMenu() properly<br />bool IsCancelClose(int id)<br />bool IsCancelCloseAll(int exception, int last_closed = 0)</p>
<p>- To allow user code to allow drag and drup in certain tabs<br />Gate<int, int> CancelDragAndDrop; // Return true to cancel drag and drop from tab to tab</p>
<p>Fixes<br />- Set CancelClose() in all necessary places<br />- If crosses is on, but tab cannot be closed, tab size does include cross icon size<br />int GetExtraWidth(int n)</p> Feature #1905 (Approved): TheIde/Editor : Add a submenu, diff, between Selected text and Clipbo...https://www.ultimatepp.org/redmine/issues/19052018-09-27T11:18:07ZAbdelghani Omariab.omari@gmail.com
<pre>
void Ide::EditorMenu(Bar& bar)
{
InsertAdvanced(bar);
bar.MenuSeparator();
OnlineSearchMenu(bar);
bar.MenuSeparator();
editor.StdBar(bar);
bar.Add(editor.IsSelection() && IsClipboardAvailableText(), "Diff", [=]() {
DiffDlg dlg;
dlg.diff.left.RemoveFrame(dlg.p);
dlg.diff.Set(ReadClipboardText(), editor.GetSelection());
dlg.Run();
});
}
</pre>
<p>Thanks</p> Feature #1904 (Approved): LocalProcess : add the capability of setting process working directory https://www.ultimatepp.org/redmine/issues/19042018-09-27T11:09:11ZAbdelghani Omariab.omari@gmail.com
<p>Hi,</p>
<p>I have tested the WIN implementation<br />but i do not have tested the POSIX one.</p>
<p>Thanks</p> Feature #1856 (Approved): Abbreviation for FindFile https://www.ultimatepp.org/redmine/issues/18562018-03-08T11:30:09ZAbdelghani Omariab.omari@gmail.com
<p>in order to avoid the wrong use of FindFile, i propose adding abbriviations "ff" and "ffb".</p>
<p>the patch is for the file uppsrc/ide/abbr.cpp</p> Feature #1731 (Rejected): GDB - MingGW : Display output of target application in a separate consolehttps://www.ultimatepp.org/redmine/issues/17312017-05-28T18:35:19ZAbdelghani Omariab.omari@gmail.com
<p>the command "set new-console on" is mswindows specific, it allows the output redirection of the program to a new console.</p>
<p>the patch then in Gdb.cpp:<br /><pre>
bool Gdb::Create(One<Host>&& _host, const String& exefile, const String& cmdline, bool console)
{
....
Cmd("set prompt " GDB_PROMPT);
Cmd("set disassembly-flavor intel");
Cmd("set exec-done-display off");
Cmd("set annotate 1");
Cmd("set height 0");
Cmd("set width 0");
Cmd("set confirm off");
Cmd("set print asm-demangle");
Cmd("set print static-members off");
Cmd("set print vtbl off");
Cmd("set print repeat 0");
Cmd("set print null-stop");
Cmd("set new-console on"); // LINE ADDED
....
}
</pre></p> Feature #1706 (Approved): TextDiffCtrl: Add Find in the FileListhttps://www.ultimatepp.org/redmine/issues/17062017-05-04T06:31:40ZAbdelghani Omariab.omari@gmail.com
<p><img src="https://www.ultimatepp.org/redmine/attachments/download/553/TextDiffImg.PNG" alt="" /></p> Feature #1699 (Approved): Add "Close right tabs" menu to TabBarhttps://www.ultimatepp.org/redmine/issues/16992017-04-29T23:09:16ZAbdelghani Omariab.omari@gmail.com
<p>uppsrc\TabBar\TabBar.cpp</p>
<pre><code class="cpp syntaxhl"><span class="CodeRay"><span class="directive">void</span> TabBar::ContextMenu(Bar& bar)
{
<span class="keyword">if</span> (highlight >= <span class="integer">0</span> && crosses) {
bar.Add(tabs.GetCount() > mintabcount, t_(<span class="string"><span class="delimiter">"</span><span class="content">Close</span><span class="delimiter">"</span></span>), THISBACK2(Close, highlight, <span class="predefined-constant">true</span>));
}
<span class="keyword">if</span> (GetCursor() >= <span class="integer">0</span> && crosses) {
bar.Add(t_(<span class="string"><span class="delimiter">"</span><span class="content">Close others</span><span class="delimiter">"</span></span>), THISBACK1(CloseAll, GetCursor()));
<span class="keyword">if</span> (highlight < GetCount()-<span class="integer">1</span> && crosses) <span class="comment">// Line ADDED</span>
bar.Add(t_(<span class="string"><span class="delimiter">"</span><span class="content">Close right tabs</span><span class="delimiter">"</span></span>), THISBACK1(CloseRightTabs,highlight)); <span class="comment">// Line ADDED</span>
}
...
</span></code></pre>
<p>and the new function<br /><pre><code class="cpp syntaxhl"><span class="CodeRay">
<span class="directive">void</span> TabBar::CloseRightTabs(<span class="predefined-type">int</span> tab)
{
<span class="keyword">if</span>(tab < <span class="integer">0</span> ) <span class="keyword">return</span>;
<span class="keyword">if</span>(active > tab)
{
SetCursor(tab);
}
ValueArray vv;
<span class="keyword">for</span>(<span class="predefined-type">int</span> i = tab+<span class="integer">1</span>; i < tabs.GetCount(); i++)
vv.Add(tabs[i].key);
<span class="keyword">if</span> (tab < <span class="integer">0</span> && CancelCloseAll())
<span class="keyword">return</span>;
<span class="keyword">else</span> <span class="keyword">if</span> (tab >= <span class="integer">0</span> && CancelCloseSome(vv))
<span class="keyword">return</span>;
<span class="comment">// 2014/03/06 - FIRST the callbacks, THEN remove the tab</span>
<span class="comment">// otherwise keys in WhenCloseSome() are invalid</span>
<span class="comment">// WhenCloseSome() is called ALWAYS even if all tabs are closed</span>
WhenCloseSome(vv);
<span class="keyword">for</span>(<span class="predefined-type">int</span> i = tabs.GetCount() - <span class="integer">1</span>; i > tab; i--)
{
TabClosed(tabs[i].key);
tabs.Remove(i);
}
MakeGroups();
Repos();
Refresh();
}
</span></code></pre></p> Feature #1697 (Approved): Display (Line, Column) : Add Selection length => Display (Line, Col, Sel) https://www.ultimatepp.org/redmine/issues/16972017-04-28T18:30:59ZAbdelghani Omariab.omari@gmail.com
<p>Hi,<br />I have to use another text editor each time i want to calculate a text length<br />here the patched functions :<br /><pre><code class="cpp syntaxhl"><span class="CodeRay"><span class="directive">void</span> Ide::DoDisplay()
{
<span class="predefined-type">int</span> l, h; <span class="comment">// added</span>
Point p = editor.GetColumnLine(editor.GetCursor());
editor.GetSelection(l, h); <span class="comment">// added</span>
display.SetLabel(Format(<span class="string"><span class="delimiter">"</span><span class="content">Ln %d, Col %d, Sel %d</span><span class="delimiter">"</span></span>, p.y + <span class="integer">1</span>, p.x + <span class="integer">1</span>, h-l)); <span class="comment">// modified</span>
ManageDisplayVisibility();
}
</span></code></pre></p>
<p>and, we need to increase the display label width :</p>
<pre><code class="cpp syntaxhl"><span class="CodeRay"><span class="directive">void</span> Ide::SetupBars()
{
ClearFrames();
<span class="predefined-type">int</span> r = HorzLayoutZoom(<span class="integer">120</span>); <span class="comment">// modified line : 100 => 120</span>
<span class="predefined-type">int</span> l = HorzLayoutZoom(<span class="integer">350</span>);
...
</span></code></pre> Feature #1696 (Approved): plugin/Zip/UnZip: interface simplification & a little optimisationhttps://www.ultimatepp.org/redmine/issues/16962017-04-28T17:58:34ZAbdelghani Omariab.omari@gmail.com
<p>in the attached patch :<br /> - update UnZip::ReadDir(): a file is added to the list only if all it's field are sets.<br /> - add the possiblilty to load a file knowing it's path<br /> - add search in the zip: Vector<String> UnZip::Search(String pattern)</p>
<p>currently, i have to do loop in each file in the zip in order to find a file knowing it's name.<br /><pre>
<code class="cpp syntaxhl"><span class="CodeRay"> <span class="keyword">while</span>(!(unzip.IsEof() || unzip.IsError())) {
<span class="keyword">if</span>(path == unzip.GetPath()))
s = unzip.ReadFile();
<span class="keyword">else</span>
unzip.SkipFile();
}
</span></code><br /></pre><br />it's usefull if we add this overload:<br /><pre>
<code class="cpp syntaxhl"><span class="CodeRay">String UnZip::ReadFile(<span class="directive">const</span> <span class="predefined-type">char</span>* path, Gate<<span class="predefined-type">int</span>, <span class="predefined-type">int</span>> progress = Null)
{
<span class="keyword">for</span>(<span class="predefined-type">int</span> i = <span class="integer">0</span>; i < file.GetCount(); i++)
{
<span class="keyword">if</span>(file[i].path.IsEqual(path))
{
Seek(i);
<span class="keyword">return</span> ReadFile( progress );
}
}
<span class="keyword">return</span> String::GetVoid();
}
</span></code><br /></pre></p>
<p>then the call will be :<br /><pre>
<code class="cpp syntaxhl"><span class="CodeRay"> s = unzip.ReadFile(path);
</span></code><br /></pre></p> Feature #1689 (Approved): Add LZ4 compression to brc filehttps://www.ultimatepp.org/redmine/issues/16892017-04-22T11:24:59ZAbdelghani Omariab.omari@gmail.com
<p>patch:<br />ide/Core/Core.h, line 509 : add ENC_LZ4 to the enum:<br /><pre><code class="cpp syntaxhl"><span class="CodeRay"> <span class="keyword">enum</span> {
ENC_PLAIN,
ENC_ZIP,
ENC_BZ2,
ENC_LZ4,
};
</span></code></pre></p>
<p>ide/Core/BinObj.cpp, Line 37, Add this block "else if":<br /><pre><code class="cpp syntaxhl"><span class="CodeRay"> <span class="keyword">else</span> <span class="keyword">if</span>(binscript.Id(<span class="string"><span class="delimiter">"</span><span class="content">LZ4</span><span class="delimiter">"</span></span>))
blk.encoding = Block::ENC_LZ4;
</span></code></pre></p>
<p>ide/Core/Core.cpp <br /> add this "case" at lines 466 & 506:<br /><pre><code class="cpp syntaxhl"><span class="CodeRay"> <span class="keyword">case</span> BinObjInfo::Block::ENC_LZ4: data = LZ4Compress(data); <span class="keyword">break</span>;
</span></code></pre><br /> And at line 2 : <br /><pre><code class="cpp syntaxhl"><span class="CodeRay"><span class="preprocessor">#include</span> <span class="include"><plugin/lz4/lz4.h></span>
</span></code></pre></p>
<p>finally, in order to simplify decompression, add this util overload in:<br />plugin/lz4/lz4:<br /><pre><code class="cpp syntaxhl"><span class="CodeRay">String LZ4Decompress(Stream& in, Gate<int64, int64> progress)
{
StringStream out;
LZ4Decompress(out, in, progress);
<span class="keyword">return</span> out;
}
</span></code></pre></p> Feature #1681 (Approved): CodeEditor: HighlightOutput::Put, need another overloadhttps://www.ultimatepp.org/redmine/issues/16812017-04-15T23:46:23ZAbdelghani Omariab.omari@gmail.com
<p><a class="external" href="http://www.ultimatepp.org/forums/index.php?t=msg&goto=47868&#msg_47868">http://www.ultimatepp.org/forums/index.php?t=msg&goto=47868&#msg_47868</a></p> Feature #1680 (Approved): TextDiffCtrl: Add filter by file status Updated/Added/Removedhttps://www.ultimatepp.org/redmine/issues/16802017-04-15T23:44:19ZAbdelghani Omariab.omari@gmail.com
<p><img src="http://www.ultimatepp.org/forums/index.php?t=getfile&id=5232&private=0" alt="" /></p> Feature #1604 (In Progress): Streamlined and corrected CodeEditor bar size and positionshttps://www.ultimatepp.org/redmine/issues/16042017-01-04T15:43:24Zcbpporter cbpporter
<p>Just simply dropping a CodeEditor somewhere and setting up the correct properties can often lead to elements like change tracker, #if highlight, numbers, breakpoints, annotations to clip.</p>
<p>You either need to fiddle with them in counter intuitive ways or accept the clipping.</p>
<p>The fix makes everything add up in a simple fashion and there is no clipping.</p>
<p>Side effects: the bar can be a few pixels wider than the old one. Shouldn't be a problem with modern high width monitors. Maybe scaling needs to be added?</p> Feature #1601 (Approved): CParser nested comment supporthttps://www.ultimatepp.org/redmine/issues/16012017-01-03T11:33:41Zcbpporter cbpporterFeature #1599 (Approved): Small addition to TabBarhttps://www.ultimatepp.org/redmine/issues/15992017-01-03T10:50:06Zcbpporter cbpporter
<p>When designing GUIs, a lot of small frames and spacing is used for aesthetics.</p>
<p>You often create a "border" of indents around some GUI element to highlight it. The border I'm designing is broken by TabCtrl's scrollbar.</p>
<p>With TabBar::AddFrameToScroolBar:<br /><pre>
void AddFrameToScroolBar(CtrlFrame& fr) { sc.AddFrame(fr); }
</pre><br />one can shift the scrollbar around and add borders to it.</p>
<p>Very minor issue, the difference is only a few pixels, but aesthetics is aesthetics...</p>