From 83e72ced0e3703e4967274cd784519f5e59230f0 Mon Sep 17 00:00:00 2001 From: eidheim Date: Fri, 24 Jul 2015 19:30:27 +0200 Subject: [PATCH] Removed old TODOs. --- juci/notebook.cc | 7 +------ juci/source.cc | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/juci/notebook.cc b/juci/notebook.cc index 08c8f3b..f68085d 100644 --- a/juci/notebook.cc +++ b/juci/notebook.cc @@ -47,11 +47,6 @@ void Notebook::Controller::CreateKeybindings() { menu->action_group->add(Gtk::Action::create("WindowCloseTab", "Close tab"), Gtk::AccelKey(menu->key_map["close_tab"]), [this]() { OnCloseCurrentPage(); }); - //TODO: Wrap search in a class (together with replace) and make Source::View::search method (now it will probably crash if searching without tabs) - //TODO: Do not update search/highlighting if searching for same string - //TODO: Add custom style to search matches (gtk_source_search_context_set_match_style) and read this from config.json - //TODO: Also update matches while writing in the search field - //TODO: Also update cursor position menu->action_group->add(Gtk::Action::create("EditFind", "Find"), Gtk::AccelKey(menu->key_map["edit_find"]), [this]() { entry_box.clear(); entry_box.entries.emplace_back(last_search, [this](const std::string& content){ @@ -62,7 +57,7 @@ void Notebook::Controller::CreateKeybindings() { search_entry_it->set_placeholder_text("Find"); if(CurrentPage()!=-1) CurrentSourceView()->search_highlight(search_entry_it->get_text()); - search_entry_it->signal_key_press_event().connect([this, search_entry_it](GdkEventKey* event){ + search_entry_it->signal_key_press_event().connect([this](GdkEventKey* event){ if(event->keyval==GDK_KEY_Return && event->state==GDK_SHIFT_MASK) { if(CurrentPage()!=-1) CurrentSourceView()->search_backward(); diff --git a/juci/source.cc b/juci/source.cc index 239dc97..4ef9d24 100644 --- a/juci/source.cc +++ b/juci/source.cc @@ -64,6 +64,7 @@ file_path(file_path), project_path(project_path) { search_context = gtk_source_search_context_new(get_source_buffer()->gobj(), search_settings); //TODO: why does this not work?: Might be best to use the styles from sourceview. These has to be read from file, search-matches got style "search-match" //TODO: in header if trying again: GtkSourceStyle* search_match_style; + //TODO: We can drop this, only work on newer versions of gtksourceview. //search_match_style=(GtkSourceStyle*)g_object_new(GTK_SOURCE_TYPE_STYLE, "background-set", 1, "background", "#00FF00", NULL); //gtk_source_search_context_set_match_style(search_context, search_match_style); }