<table><tr><td style="">rkflx added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D12130">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>I wonder if having a filter feature even makes any sense when saving files, and if it does--why only for Kate?</p></blockquote>
<p>Well, you should ask <a href="https://phabricator.kde.org/tag/kate/" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">#Kate</a>. I suspect this is because there cannot be a static list of file types, because there are so much weird text-based file formats out there. Say you work on <tt style="background: #ebebeb; font-size: 13px;">.xyz</tt> files, and want to save <tt style="background: #ebebeb; font-size: 13px;">complicated_name_1.xyz</tt> and to save on typing you first filter for <tt style="background: #ebebeb; font-size: 13px;">.xyz</tt> or even for <tt style="background: #ebebeb; font-size: 13px;">complicated_name.xyz</tt> which you then simply modify to your needs.</p>
<p>Also, KIO is a library, it can be used in all sorts of applications you don't even know about. Maybe there is some weird use case out there where files need to be saved to places with thousands of entries where filtering is useful…</p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>If necessary I can make the string return to "Filter" for these save-with-filter dialogs, but I'm still left wondering what the feature is actually for or if Kate is affected by a bug that should be fixed...</p></blockquote>
<p>You absolutely should return to "Filter" for this case (even though I agree that for most dialogs it does not make sense), because this is application-defined behaviour which you don't know a thing about. In particular Kate handles it in such a way that what you type in there is <em>not</em> appended as the file extension. Your change and your help text imply it is, but actually trying it out you'll see that Kate won't append the extension (rightly so, because filtering for <tt style="background: #ebebeb; font-size: 13px;">*.txt</tt> and typing <tt style="background: #ebebeb; font-size: 13px;">aa.txt</tt> as the filename should not result in <tt style="background: #ebebeb; font-size: 13px;">aa.txt.txt</tt>).</p>
<p>At least we'll now have <tt style="background: #ebebeb; font-size: 13px;">setFilterLabel</tt> for customization.</p>
<hr class="remarkup-hr" />
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>in a new user account</p></blockquote>
<p>That's a bit pointless in this case, why would you let your reviewers jump through such hoops…</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D12130#inline-61452">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kfilewidget.cpp:1340-1341</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">i18n</span><span class="p">(</span><span class="n">autocompletionWhatsThisText</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">filterWhatsThisText</span> <span style="color: #aa2211">=</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"<qt>This is the file type selector. "</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #766510">"Use it to choose the type for the file that will be saved.</qt>"</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="p">}</span> <span style="color: #aa4000">else</span> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">ops</span><span style="color: #aa2211">-></span><span class="n">mode</span><span class="p">()</span> <span style="color: #aa2211">&</span> <span class="n">KFile</span><span style="color: #aa2211">::</span><span class="n">Files</span><span class="p">)</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Personally I hate it when a help text just repeats what's already written in the UI. I'd say here you can utilize <tt style="background: #ebebeb; font-size: 13px;">…the format the file will be saved in.</tt>, which helps out everyone not understanding "type" in the first place, looking for help, and then finding something they recognize.</p>
<p style="padding: 0; margin: 8px;">After all, Wikipedia also calls the concept "File format" (keep "type" for the label, though).</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D12130#inline-61455">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kfilewidget.cpp:1344-1345</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="bright"></span><span class="n"><span class="bright">w</span>hatsThisText</span> <span style="color: #aa2211">=</span> <span style="color: #766510">"<qt>"</span> <span style="color: #aa2211">+</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"This is the list of files to open. More than "</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="bright"></span><span class="n"><span class="bright">locationW</span>hatsThisText</span> <span style="color: #aa2211">=</span> <span style="color: #766510">"<qt>"</span> <span style="color: #aa2211">+</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"This is the list of files to open. More than "</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span style="color: #766510">"one file can be specified by listing several "</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span style="color: #766510">"files, separated by spaces."</span><span class="p">)</span> <span style="color: #aa2211">+</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">i18n</span><span class="p">(</span><span class="n">autocompletionWhatsThisText</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Indentation?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D12130#inline-61451">View Inline</a><span style="color: #4b4d51; font-weight: bold;">kfilewidget.h:362</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d"> */</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">void</span> <span style="color: #004012">setFilterLabel</span><span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">QString</span> <span style="color: #aa2211">&</span><span class="n">text</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Needs <tt style="background: #ebebeb; font-size: 13px;">@since</tt> and possibly <tt style="background: #ebebeb; font-size: 13px;">@param</tt>.</p>
<p style="padding: 0; margin: 8px;">This addition to the API might also be worth mentioning in the commit message.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12130">https://phabricator.kde.org/D12130</a></div></div><br /><div><strong>To: </strong>ngraham, Frameworks, VDG, bruns, alexeymin, rkflx, abetts<br /><strong>Cc: </strong>davidc, ltoscano, cfeck, rkflx, alexeymin, abetts, bruns, michaelh, ngraham<br /></div>