Skip to content

Commit

Permalink
Associate popover with foldermanager (#1396)
Browse files Browse the repository at this point in the history
* Associate popover with foldermanager
* Remove deprecated PopoverConstraint
  • Loading branch information
jeremypw authored Jan 6, 2024
1 parent 0c1fba8 commit 8c550d6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/fuzzy-search/fuzzy-search-popover.vala
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,20 @@ public class Scratch.FuzzySearchPopover : Gtk.Popover {
private bool should_distinguish_projects;
private Gtk.EventControllerKey search_term_entry_key_controller;
private Gtk.Label title_label;
private Scratch.MainWindow current_window;
public Scratch.MainWindow current_window { get; construct; }
public bool sidebar_is_visible { get; set; }

public signal void open_file (string filepath);
public signal void close_search ();

public FuzzySearchPopover (Gee.HashMap<string, Services.SearchProject> pps, Scratch.MainWindow window) {
Object (
modal: true,
relative_to: window.toolbar,
constrain_to: Gtk.PopoverConstraint.WINDOW,
width_request: 500
relative_to: window.document_view,
width_request: 500,
current_window: window
);

current_window = window;

int height;
current_window.get_size (null, out height);
window_height = height;
Expand Down Expand Up @@ -85,6 +84,7 @@ public class Scratch.FuzzySearchPopover : Gtk.Popover {
}

construct {
pointing_to = { 0, 32, 1, 1 };
this.get_style_context ().add_class ("fuzzy-popover");

title_label = new Gtk.Label (_("Find project files"));
Expand Down

0 comments on commit 8c550d6

Please sign in to comment.