Browse Source

Minor cleanup of source files

pipelines/143601543
eidheim 6 years ago
parent
commit
8366ec331f
  1. 1
      src/source_base.cc
  2. 5
      src/source_clang.cc
  3. 3
      src/source_language_protocol.cc

1
src/source_base.cc

@ -25,6 +25,7 @@ Source::BaseView::BaseView(const boost::filesystem::path &file_path, const Glib:
if(language) { if(language) {
get_source_buffer()->set_language(language); get_source_buffer()->set_language(language);
get_source_buffer()->set_highlight_syntax(true);
auto language_id = language->get_id(); auto language_id = language->get_id();
if(language_id == "chdr" || language_id == "cpphdr" || language_id == "c" || if(language_id == "chdr" || language_id == "cpphdr" || language_id == "c" ||
language_id == "cpp" || language_id == "objc" || language_id == "java" || language_id == "cpp" || language_id == "objc" || language_id == "java" ||

5
src/source_clang.cc

@ -1851,11 +1851,6 @@ void Source::ClangViewRefactor::apply_clickable_tag(const Gtk::TextIter &iter) {
Source::ClangView::ClangView(const boost::filesystem::path &file_path, const Glib::RefPtr<Gsv::Language> &language) Source::ClangView::ClangView(const boost::filesystem::path &file_path, const Glib::RefPtr<Gsv::Language> &language)
: BaseView(file_path, language), ClangViewParse(file_path, language), ClangViewAutocomplete(file_path, language), ClangViewRefactor(file_path, language) { : BaseView(file_path, language), ClangViewParse(file_path, language), ClangViewAutocomplete(file_path, language), ClangViewRefactor(file_path, language) {
if(language) {
get_source_buffer()->set_highlight_syntax(true);
get_source_buffer()->set_language(language);
}
do_delete_object.connect([this]() { do_delete_object.connect([this]() {
if(delete_thread.joinable()) if(delete_thread.joinable())
delete_thread.join(); delete_thread.join();

3
src/source_language_protocol.cc

@ -367,9 +367,6 @@ void LanguageProtocol::Client::handle_server_request(const std::string &method,
Source::LanguageProtocolView::LanguageProtocolView(const boost::filesystem::path &file_path, const Glib::RefPtr<Gsv::Language> &language, std::string language_id_) Source::LanguageProtocolView::LanguageProtocolView(const boost::filesystem::path &file_path, const Glib::RefPtr<Gsv::Language> &language, std::string language_id_)
: Source::BaseView(file_path, language), Source::View(file_path, language), uri(filesystem::get_uri_from_path(file_path)), language_id(std::move(language_id_)), client(LanguageProtocol::Client::get(file_path, language_id)) { : Source::BaseView(file_path, language), Source::View(file_path, language), uri(filesystem::get_uri_from_path(file_path)), language_id(std::move(language_id_)), client(LanguageProtocol::Client::get(file_path, language_id)) {
get_source_buffer()->set_language(language);
get_source_buffer()->set_highlight_syntax(true);
initialize(); initialize();
} }

Loading…
Cancel
Save