diff --git a/data/Application.css b/data/Application.css index b65b64ad25..6b743ee581 100644 --- a/data/Application.css +++ b/data/Application.css @@ -45,7 +45,7 @@ textview.scrubber { background-color: transparent; } -.fuzzy-item:focused, +.fuzzy-item:focus, .fuzzy-item:hover { border-radius: 0.5rem; } @@ -54,7 +54,7 @@ textview.scrubber { background-color: @theme_unfocused_selected_bg_color; } -.fuzzy-item:focused { +.fuzzy-item:focus { background-color: @selected_bg_color; color: @selected_fg_color; } diff --git a/src/Services/Document.vala b/src/Services/Document.vala index 60bd7fc563..b784b0d439 100644 --- a/src/Services/Document.vala +++ b/src/Services/Document.vala @@ -286,7 +286,10 @@ namespace Scratch.Services { this.source_view.buffer.create_tag ("highlight_search_all", "background", "yellow", null); this.source_view.notify["is-focus"].connect (() => { - return_if_fail (!locked); + if (locked) { + return; + } + if (source_view.is_focus) { if (!is_file_temporary) { check_undoable_actions (); diff --git a/src/Widgets/ChooseProjectButton.vala b/src/Widgets/ChooseProjectButton.vala index 132e2c74d4..ff6fb175ab 100644 --- a/src/Widgets/ChooseProjectButton.vala +++ b/src/Widgets/ChooseProjectButton.vala @@ -124,13 +124,13 @@ public class Code.ChooseProjectButton : Gtk.Bin { } }); - menu_button.activate.connect (() => { + menu_button.toggled.connect (() => { if (menu_button.active) { unowned var active_path = Scratch.Services.GitManager.get_instance ().active_project_path; foreach (var child in project_listbox.get_children ()) { var project_row = ((ProjectRow) child); // All paths must not end in directory separator so can be compared directly - project_row.active = active_path == project_row.project_path; + project_row.is_active_project = active_path == project_row.project_path; } } }); @@ -161,7 +161,7 @@ public class Code.ChooseProjectButton : Gtk.Bin { public class ProjectRow : Gtk.ListBoxRow { private Gtk.CheckButton check_button; - public bool active { + public bool is_active_project { get { return check_button.active; }