Skip to content

Commit

Permalink
Fixed tab tooltips for special folders
Browse files Browse the repository at this point in the history
  • Loading branch information
tsujan committed Apr 18, 2023
1 parent 35e7824 commit ba895dd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ V1.4.0
* Safeguard the file type filters of file dialogs from bad translations.
* Added `application/x-zerosize` to the desktop file (after a change in GLib).
* Added an option for showing window title on the menubar.
* Fixed the tab tooltip for special folders.

V1.3.5
---------
Expand Down
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Latest version:

13 Apr 2023, V1.4.0
18 Apr 2023, V1.4.0

See "ChangeLog" for changes.
2 changes: 1 addition & 1 deletion featherpad/about.ui
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ p, li { white-space: pre-wrap; }
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Portuguese (Brazil):</span> <a href="https://github.com/eltonfabricio10">eltonfabricio10 at GitHub</a>, <a href="https://github.com/alexandrecoliveira">alexandrecoliveira at GitHub</a>, Ruan O. Lima, Erik Kierski <a href="https://github.com/erikferki">(erikferki at GitHub)</a>, <a href="https://github.com/Cristian-Willian-dos-Santos">Cristian-Willian-dos-Santos at GitHub</a>, Daniel Araujo Domingues <a href="https://github.com/dadomingues">(dadomingues at GitHub)</a></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Russian:</span> Vladimir Sharonin <a href="https://github.com/Survolog">(Survolog at GitHub)</a>, <a href="https://github.com/VaYurik">VaYurik at GitHub</a>, Pavel Shlyak <a href="https://github.com/shlyakpavel">(shlyakpavel at GitHub)</a>, Schwonder Reismus <a href="https://github.com/schw0reismus">(schw0reismus at GitHub)</a>, Николай Смольянинов <a href="https://github.com/smolnp">(smolnp at GitHub)</a></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Russian:</span> Vladimir Sharonin <a href="https://github.com/Survolog">(Survolog at GitHub)</a>, <a href="https://github.com/VaYurik">VaYurik at GitHub</a>, Pavel Shlyak <a href="https://github.com/shlyakpavel">(shlyakpavel at GitHub)</a>, Schwonder Reismus <a href="https://github.com/schw0reismus">(schw0reismus at GitHub)</a>, Николай Смольянинов <a href="https://github.com/smolnp">(smolnp at GitHub)</a>, Andrei Stepanov <a href="https://github.com/adem4ik">(adem4ik at GitHub)</a></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Slovak:</span> Paolo Vigoroso, Ptrlw</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
Expand Down
6 changes: 3 additions & 3 deletions featherpad/fpwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2554,7 +2554,7 @@ void FPwin::addText (const QString& text, const QString& fileName, const QString
/* An Old comment not valid anymore: "The index may have changed because syntaxHighlighting()
waits for all events to be processed (but it won't change from here on)." */
ui->tabWidget->indexOf (tabPage) : -1);
QString tip (fInfo.absolutePath());
QString tip (fileName.contains ("/") ? fileName.section("/", 0, -2) : fInfo.absolutePath());
if (!tip.endsWith ("/")) tip += "/";
QFontMetrics metrics (QToolTip::font());
QString elidedTip = "<p style='white-space:pre'>"
Expand Down Expand Up @@ -3372,7 +3372,7 @@ bool FPwin::saveFile (bool keepSyntax,
textEdit->setLastModified (fInfo.lastModified());
ui->actionReload->setDisabled (false);
setTitle (fname);
QString tip (fInfo.absolutePath());
QString tip (fname.contains ("/") ? fname.section("/", 0, -2) : fInfo.absolutePath());
if (!tip.endsWith ("/")) tip += "/";
QFontMetrics metrics (QToolTip::font());
QString elidedTip = "<p style='white-space:pre'>"
Expand Down Expand Up @@ -3559,7 +3559,7 @@ void FPwin::saveAsRoot (const QString& fileName, TabPage *tabPage,
textEdit->setLastModified (fInfo.lastModified());
ui->actionReload->setDisabled (false);
setTitle (fileName);
QString tip (fInfo.absolutePath());
QString tip (fileName.contains ("/") ? fileName.section("/", 0, -2) : fInfo.absolutePath());
if (!tip.endsWith ("/")) tip += "/";
QFontMetrics metrics (QToolTip::font());
QString elidedTip = "<p style='white-space:pre'>"
Expand Down

0 comments on commit ba895dd

Please sign in to comment.