Skip to content

Commit

Permalink
Use toplevel in case active window is a dialog or something
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed May 21, 2024
1 parent 60c7d2c commit 02a6c51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Widgets/TaskListGrid.vala
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public class Tasks.Widgets.TaskListGrid : Gtk.Grid {
}

if (add_task_list.get_selected_rows ().length () == 0 && task_list.get_selected_rows ().length () == 0) {
unowned var main_window = (Gtk.ApplicationWindow) ((Gtk.Application) GLib.Application.get_default ()).active_window;
unowned var main_window = (Gtk.ApplicationWindow) get_toplevel ();
((SimpleAction) main_window.lookup_action (MainWindow.ACTION_DELETE_SELECTED_LIST)).set_enabled (true);
}
}
Expand Down

0 comments on commit 02a6c51

Please sign in to comment.