From c72aa8cdc4dd4901840dfc9b6f9513dbc975c9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Sverre=20Lien=20Sell=C3=A6g?= Date: Mon, 7 Sep 2020 21:10:32 +0200 Subject: [PATCH] Compiling again --- lib/tiny-process-library | 2 +- src/config_module.cc | 6 +++--- src/git.cpp | 11 ----------- src/juci.hpp | 2 +- src/plugins.cc | 6 +++--- src/python_module.cc | 16 ++++++++-------- src/window.cpp | 5 +++-- tests/CMakeLists.txt | 2 +- tests/python_bindings/CMakeLists.txt | 1 - .../compile_commands_test.cc | 2 +- .../python_bindings/Config_tests/config_test.cc | 6 +++--- .../Terminal_tests/terminal_test.cc | 2 +- tests/python_bindings/test_suite.h | 2 +- tests/stubs/dialogs.cpp | 2 ++ 14 files changed, 28 insertions(+), 37 deletions(-) diff --git a/lib/tiny-process-library b/lib/tiny-process-library index 6e52608..c5b0028 160000 --- a/lib/tiny-process-library +++ b/lib/tiny-process-library @@ -1 +1 @@ -Subproject commit 6e52608b15d12a13e68269b111afda3013e7cf3a +Subproject commit c5b0028fde831c1f5155aa2fe06a87e7c60ca124 diff --git a/src/config_module.cc b/src/config_module.cc index 119a5f0..82d7b99 100644 --- a/src/config_module.cc +++ b/src/config_module.cc @@ -1,4 +1,4 @@ -#include "config.h" +#include "config.hpp" #include "python_type_casters.h" #include @@ -43,7 +43,7 @@ void Config::init_module(py::module &api) { .def_readwrite("cmake", &Config::Project::cmake) .def_readwrite("meson", &Config::Project::meson) .def_readwrite("save_on_compile_or_run", &Config::Project::save_on_compile_or_run) - .def_readwrite("clear_terminal_on_compile", &Config::Project::clear_terminal_on_compile) + // .def_readwrite("clear_terminal_on_compile", &Config::Project::clear_terminal_on_compile) .def_readwrite("ctags_command", &Config::Project::ctags_command) .def_readwrite("python_command", &Config::Project::python_command) @@ -75,7 +75,7 @@ void Config::init_module(py::module &api) { .def_readwrite("default_tab_char", &Config::Source::default_tab_char) .def_readwrite("default_tab_size", &Config::Source::default_tab_size) .def_readwrite("tab_indents_line", &Config::Source::tab_indents_line) - .def_readwrite("wrap_lines", &Config::Source::wrap_lines) + // .def_readwrite("wrap_lines", &Config::Source::wrap_lines) .def_readwrite("highlight_current_line", &Config::Source::highlight_current_line) .def_readwrite("show_line_numbers", &Config::Source::show_line_numbers) .def_readwrite("enable_multiple_cursors", &Config::Source::enable_multiple_cursors) diff --git a/src/git.cpp b/src/git.cpp index 631d875..af2b246 100644 --- a/src/git.cpp +++ b/src/git.cpp @@ -299,17 +299,6 @@ void Git::init_module(py::module &api) { py::arg("line_nr")) ; - py::enum_(repository, "STATUS") - .value("CURRENT", Git::Repository::STATUS::CURRENT) - .value("NEW", Git::Repository::STATUS::NEW) - .value("MODIFIED", Git::Repository::STATUS::MODIFIED) - .value("DELETED", Git::Repository::STATUS::DELETED) - .value("RENAMED", Git::Repository::STATUS::RENAMED) - .value("TYPECHANGE", Git::Repository::STATUS::TYPECHANGE) - .value("UNREADABLE", Git::Repository::STATUS::UNREADABLE) - .value("IGNORED", Git::Repository::STATUS::IGNORED) - .value("CONFLICTED", Git::Repository::STATUS::CONFLICTED) - .export_values(); py::class_(repository, "Status") .def_readwrite("added", &Git::Repository::Status::added) diff --git a/src/juci.hpp b/src/juci.hpp index 279ca8a..2920b27 100644 --- a/src/juci.hpp +++ b/src/juci.hpp @@ -1,7 +1,7 @@ #pragma once +#include "window.hpp" #include #include -#include "window.h" #ifdef JUCI_ENABLE_PLUGINS #include "plugins.h" #endif diff --git a/src/plugins.cc b/src/plugins.cc index e572cd6..d14de2c 100644 --- a/src/plugins.cc +++ b/src/plugins.cc @@ -1,7 +1,7 @@ #include "plugins.h" -#include "config.h" +#include "config.hpp" #include "python_module.h" -#include "terminal.h" +#include "terminal.hpp" Plugins::Plugins() : jucipp_module("Jucipp", Module::init_jucipp_module) { auto &config = Config::get(); @@ -9,7 +9,7 @@ Plugins::Plugins() : jucipp_module("Jucipp", Module::init_jucipp_module) { #ifdef PYTHON_HOME_DIR #ifdef _WIN32 const std::wstring python_home(PYTHON_HOME_DIR); - const std::wstring python_path(python_home + L";" + python_home + L"\\lib-dynload;" + python_home + L"\\site-packages" ); + const std::wstring python_path(python_home + L";" + python_home + L"\\lib-dynload;" + python_home + L"\\site-packages"); Py_SetPythonHome(python_home.c_str()); Py_SetPath(python_path.c_str()); #endif diff --git a/src/python_module.cc b/src/python_module.cc index 69eedca..ad34880 100644 --- a/src/python_module.cc +++ b/src/python_module.cc @@ -1,14 +1,14 @@ #include "python_module.h" -#include "cmake.h" -#include "compile_commands.h" -#include "config.h" -#include "ctags.h" +#include "cmake.hpp" +#include "compile_commands.hpp" +#include "config.hpp" +#include "ctags.hpp" #ifdef JUCI_ENABLE_DEBUG -#include "debug_lldb.h" +#include "debug_lldb.hpp" #endif -#include "dialogs.h" -#include "terminal.h" -#include "git.h" +#include "dialogs.hpp" +#include "git.hpp" +#include "terminal.hpp" PyObject *Module::init_jucipp_module() { auto api = py::module("Jucipp", "API"); diff --git a/src/window.cpp b/src/window.cpp index f4a1057..d8342b2 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -33,7 +33,7 @@ void Window::init() { if(screen->get_rgba_visual()) border_radius_style = "border-radius: 5px; "; #if GTK_VERSION_GE(3, 20) -n std::string notebook_style(".juci_notebook tab {border-radius: 5px 5px 0 0; padding: 0 4px; margin: 0;}"); + std::string notebook_style(".juci_notebook tab {border-radius: 5px 5px 0 0; padding: 0 4px; margin: 0;}"); #else std::string notebook_style(".juci_notebook {-GtkNotebook-tab-overlap: 0px;} .juci_notebook tab {border-radius: 5px 5px 0 0; padding: 4px 4px;}"); #endif @@ -45,7 +45,8 @@ n std::string notebook_style(".juci_notebook tab {border-radius: 5px 5px 0 0; p .juci_terminal_scrolledwindow {padding-left: 3px;} .juci_info {border-radius: 5px;} .juci_tooltip_window {background-color: transparent;} - .juci_tooltip_box {)" + border_radius_style + R"(padding: 3px;} + .juci_tooltip_box {)" + border_radius_style + + R"(padding: 3px;} )"); get_style_context()->add_provider_for_screen(screen, provider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 662eded..e47464e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -24,7 +24,7 @@ add_library(test_stubs OBJECT if(BUILD_TESTING) add_executable(process_test process_test.cpp $) - target_link_libraries(process_test juci_shared) + target_link_libraries(process_test juci_shared ${PYTHON_LIBRARIES}) add_test(process_test process_test) add_executable(compile_commands_test compile_commands_test.cpp $) diff --git a/tests/python_bindings/CMakeLists.txt b/tests/python_bindings/CMakeLists.txt index 1c09093..aeb8ad8 100644 --- a/tests/python_bindings/CMakeLists.txt +++ b/tests/python_bindings/CMakeLists.txt @@ -1,4 +1,3 @@ - add_library(test_suite test_suite.cc) target_link_libraries(test_suite juci_shared ${PYTHON_LIBRARIES}) diff --git a/tests/python_bindings/CompileCommands_tests/compile_commands_test.cc b/tests/python_bindings/CompileCommands_tests/compile_commands_test.cc index 1e5ff6d..36624a3 100644 --- a/tests/python_bindings/CompileCommands_tests/compile_commands_test.cc +++ b/tests/python_bindings/CompileCommands_tests/compile_commands_test.cc @@ -1,4 +1,4 @@ -#include "cmake.h" +#include "cmake.hpp" #include "test_suite.h" #include diff --git a/tests/python_bindings/Config_tests/config_test.cc b/tests/python_bindings/Config_tests/config_test.cc index b594670..982fb55 100644 --- a/tests/python_bindings/Config_tests/config_test.cc +++ b/tests/python_bindings/Config_tests/config_test.cc @@ -40,7 +40,7 @@ int main() { g_assert_cmpstr(config.project.cmake.command.c_str(), ==, "cmake"); g_assert_cmpstr(config.project.cmake.compile_command.c_str(), ==, "cmake --build"); g_assert_true(config.project.save_on_compile_or_run); - g_assert_false(config.project.clear_terminal_on_compile); + // g_assert_false(config.project.clear_terminal_on_compile); g_assert_cmpstr(config.project.ctags_command.c_str(), ==, "ctags"); g_assert_cmpstr(config.project.python_command.c_str(), ==, "python"); }); @@ -55,7 +55,7 @@ int main() { g_assert_false(config.source.format_style_on_save_if_style_file_found); g_assert_false(config.source.smart_inserts); g_assert_false(config.source.show_map); - g_assert_cmpstr(config.source.map_font_size.c_str(), ==, "10px"); + // g_assert_cmpstr(config.source.map_font_size.c_str(), ==, "10px"); g_assert_false(config.source.show_git_diff); g_assert_false(config.source.show_background_pattern); g_assert_false(config.source.show_right_margin); @@ -64,7 +64,7 @@ int main() { g_assert_cmpint(config.source.default_tab_char, ==, 'c'); g_assert_cmpuint(config.source.default_tab_size, ==, 1); g_assert_false(config.source.tab_indents_line); - g_assert_false(config.source.wrap_lines); + // g_assert_false(config.source.wrap_lines); g_assert_false(config.source.highlight_current_line); g_assert_false(config.source.show_line_numbers); g_assert_false(config.source.enable_multiple_cursors); diff --git a/tests/python_bindings/Terminal_tests/terminal_test.cc b/tests/python_bindings/Terminal_tests/terminal_test.cc index 89972b2..48821a6 100644 --- a/tests/python_bindings/Terminal_tests/terminal_test.cc +++ b/tests/python_bindings/Terminal_tests/terminal_test.cc @@ -1,5 +1,5 @@ +#include "terminal.hpp" #include "test_suite.h" -#include "terminal.h" int main() { const auto test_directory = "Terminal_tests"; diff --git a/tests/python_bindings/test_suite.h b/tests/python_bindings/test_suite.h index 0b13f8c..87c6f92 100644 --- a/tests/python_bindings/test_suite.h +++ b/tests/python_bindings/test_suite.h @@ -1,5 +1,5 @@ #pragma once -#include "config.h" +#include "config.hpp" #include "plugins.h" #include diff --git a/tests/stubs/dialogs.cpp b/tests/stubs/dialogs.cpp index 50255e4..b4ea172 100644 --- a/tests/stubs/dialogs.cpp +++ b/tests/stubs/dialogs.cpp @@ -7,3 +7,5 @@ void Dialog::Message::set_fraction(double fraction) {} bool Dialog::Message::on_delete_event(GdkEventAny *event) { return true; } + +void Dialog::init_module(py::module &) {} \ No newline at end of file