Skip to content

Commit a81631f

Browse files
authored
No tooltip and not selectable if dummy row (#1621)
1 parent cbd2550 commit a81631f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/FolderManager/FolderItem.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ namespace Scratch.FolderManager {
4848

4949
dummy = new Code.Widgets.SourceList.Item ("");
5050
// Must add dummy on unexpanded folders else expander will not show
51+
dummy.selectable = false;
5152
((Code.Widgets.SourceList.ExpandableItem)this).add (dummy);
5253
has_dummy = true;
5354

src/Widgets/SourceList/SourceList.vala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,8 +1891,10 @@ public class SourceList : Gtk.ScrolledWindow {
18911891
set_tooltip_row (tooltip, path);
18921892

18931893
if (item.tooltip == null) {
1894-
tooltip.set_markup (item.name);
1895-
should_show = true;
1894+
if (item.name != "") {
1895+
tooltip.set_markup (item.name);
1896+
should_show = true;
1897+
}
18961898
} else if (item.tooltip != "") {
18971899
tooltip.set_markup (item.tooltip);
18981900
should_show = true;
@@ -2019,8 +2021,9 @@ public class SourceList : Gtk.ScrolledWindow {
20192021

20202022
if (item != null) {
20212023
// Main categories ARE NOT selectable, so check for that
2022-
if (!data_model.is_category (item, null, path))
2024+
if (!data_model.is_category (item, null, path)) {
20232025
selectable = item.selectable;
2026+
}
20242027
}
20252028

20262029
return selectable;

0 commit comments

Comments
 (0)