Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/FolderList/FolderItemModel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ public class Mail.FolderItemModel : Mail.SourceList.ExpandableItem {

var offlinestore = (Camel.Store)account.service;

Camel.FolderInfo? folder_info = null;
Camel.FolderInfo? new_folder_info = null;
try {
folder_info = yield offlinestore.get_folder_info (new_full_name, FAST, GLib.Priority.DEFAULT, cancellable);
new_folder_info = yield offlinestore.get_folder_info (new_full_name, FAST, GLib.Priority.DEFAULT, cancellable);
} catch (Error e) {
warning (e.message);
}

if (null != folder_info) {
if (new_folder_info != null) {
if (name == old_name) {
notify["name"].connect (cancel_rename);
} else {
Expand Down
10 changes: 5 additions & 5 deletions src/SourceList/SourceList.vala
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,6 @@ public class Mail.SourceList : Gtk.ScrolledWindow {
base (name);
}

construct {
editable = false;
}

/**
* Adds an item.
*
Expand Down Expand Up @@ -1052,6 +1048,7 @@ public class Mail.SourceList : Gtk.ScrolledWindow {

private Item? selected;
private unowned Item? edited;
private Item? activated;

private Gtk.Entry? editable_entry;
private Gtk.CellRendererText text_cell;
Expand Down Expand Up @@ -1624,8 +1621,11 @@ public class Mail.SourceList : Gtk.ScrolledWindow {
&& item.selectable
&& over_cell (column, path, text_cell, cell_x)
) {
// Keep back reference of item so that it can be accessed in Idle.add_once()
// where item is already freed
activated = item;
// Start editing after native event handlers finished else fails
Idle.add_once (() => { start_editing_item (item); });
Idle.add_once (() => { start_editing_item (activated); });
Comment on lines +1624 to +1628

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that Idle is used here. Does tweaking when on_button_pressed is called fixes the issue? button_controller's propagations phase is set to capture, while default handlers run in bubble phase. Does changing the propagation phase make a difference?

@danirabbit danirabbit Aug 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually wonder if we can remove this whole n_press case? I don't think double-click-rename is a pattern we use anywhere else

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't confirm that changing propagation phase fixes the issue

}
}
}
Expand Down