Browse Source

Compiling again

python
Jørgen Lien Sellæg 5 years ago
parent
commit
c72aa8cdc4
  1. 2
      lib/tiny-process-library
  2. 6
      src/config_module.cc
  3. 11
      src/git.cpp
  4. 2
      src/juci.hpp
  5. 4
      src/plugins.cc
  6. 16
      src/python_module.cc
  7. 5
      src/window.cpp
  8. 2
      tests/CMakeLists.txt
  9. 1
      tests/python_bindings/CMakeLists.txt
  10. 2
      tests/python_bindings/CompileCommands_tests/compile_commands_test.cc
  11. 6
      tests/python_bindings/Config_tests/config_test.cc
  12. 2
      tests/python_bindings/Terminal_tests/terminal_test.cc
  13. 2
      tests/python_bindings/test_suite.h
  14. 2
      tests/stubs/dialogs.cpp

2
lib/tiny-process-library

@ -1 +1 @@
Subproject commit 6e52608b15d12a13e68269b111afda3013e7cf3a Subproject commit c5b0028fde831c1f5155aa2fe06a87e7c60ca124

6
src/config_module.cc

@ -1,4 +1,4 @@
#include "config.h" #include "config.hpp"
#include "python_type_casters.h" #include "python_type_casters.h"
#include <pybind11/stl.h> #include <pybind11/stl.h>
@ -43,7 +43,7 @@ void Config::init_module(py::module &api) {
.def_readwrite("cmake", &Config::Project::cmake) .def_readwrite("cmake", &Config::Project::cmake)
.def_readwrite("meson", &Config::Project::meson) .def_readwrite("meson", &Config::Project::meson)
.def_readwrite("save_on_compile_or_run", &Config::Project::save_on_compile_or_run) .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("ctags_command", &Config::Project::ctags_command)
.def_readwrite("python_command", &Config::Project::python_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_char", &Config::Source::default_tab_char)
.def_readwrite("default_tab_size", &Config::Source::default_tab_size) .def_readwrite("default_tab_size", &Config::Source::default_tab_size)
.def_readwrite("tab_indents_line", &Config::Source::tab_indents_line) .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("highlight_current_line", &Config::Source::highlight_current_line)
.def_readwrite("show_line_numbers", &Config::Source::show_line_numbers) .def_readwrite("show_line_numbers", &Config::Source::show_line_numbers)
.def_readwrite("enable_multiple_cursors", &Config::Source::enable_multiple_cursors) .def_readwrite("enable_multiple_cursors", &Config::Source::enable_multiple_cursors)

11
src/git.cpp

@ -299,17 +299,6 @@ void Git::init_module(py::module &api) {
py::arg("line_nr")) py::arg("line_nr"))
; ;
py::enum_<Git::Repository::STATUS>(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_<Git::Repository::Status>(repository, "Status") py::class_<Git::Repository::Status>(repository, "Status")
.def_readwrite("added", &Git::Repository::Status::added) .def_readwrite("added", &Git::Repository::Status::added)

2
src/juci.hpp

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "window.hpp"
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <gtkmm.h> #include <gtkmm.h>
#include "window.h"
#ifdef JUCI_ENABLE_PLUGINS #ifdef JUCI_ENABLE_PLUGINS
#include "plugins.h" #include "plugins.h"
#endif #endif

4
src/plugins.cc

@ -1,7 +1,7 @@
#include "plugins.h" #include "plugins.h"
#include "config.h" #include "config.hpp"
#include "python_module.h" #include "python_module.h"
#include "terminal.h" #include "terminal.hpp"
Plugins::Plugins() : jucipp_module("Jucipp", Module::init_jucipp_module) { Plugins::Plugins() : jucipp_module("Jucipp", Module::init_jucipp_module) {
auto &config = Config::get(); auto &config = Config::get();

16
src/python_module.cc

@ -1,14 +1,14 @@
#include "python_module.h" #include "python_module.h"
#include "cmake.h" #include "cmake.hpp"
#include "compile_commands.h" #include "compile_commands.hpp"
#include "config.h" #include "config.hpp"
#include "ctags.h" #include "ctags.hpp"
#ifdef JUCI_ENABLE_DEBUG #ifdef JUCI_ENABLE_DEBUG
#include "debug_lldb.h" #include "debug_lldb.hpp"
#endif #endif
#include "dialogs.h" #include "dialogs.hpp"
#include "terminal.h" #include "git.hpp"
#include "git.h" #include "terminal.hpp"
PyObject *Module::init_jucipp_module() { PyObject *Module::init_jucipp_module() {
auto api = py::module("Jucipp", "API"); auto api = py::module("Jucipp", "API");

5
src/window.cpp

@ -33,7 +33,7 @@ void Window::init() {
if(screen->get_rgba_visual()) if(screen->get_rgba_visual())
border_radius_style = "border-radius: 5px; "; border_radius_style = "border-radius: 5px; ";
#if GTK_VERSION_GE(3, 20) #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 #else
std::string notebook_style(".juci_notebook {-GtkNotebook-tab-overlap: 0px;} .juci_notebook tab {border-radius: 5px 5px 0 0; padding: 4px 4px;}"); std::string notebook_style(".juci_notebook {-GtkNotebook-tab-overlap: 0px;} .juci_notebook tab {border-radius: 5px 5px 0 0; padding: 4px 4px;}");
#endif #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_terminal_scrolledwindow {padding-left: 3px;}
.juci_info {border-radius: 5px;} .juci_info {border-radius: 5px;}
.juci_tooltip_window {background-color: transparent;} .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); get_style_context()->add_provider_for_screen(screen, provider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);

2
tests/CMakeLists.txt

@ -24,7 +24,7 @@ add_library(test_stubs OBJECT
if(BUILD_TESTING) if(BUILD_TESTING)
add_executable(process_test process_test.cpp $<TARGET_OBJECTS:test_stubs>) add_executable(process_test process_test.cpp $<TARGET_OBJECTS:test_stubs>)
target_link_libraries(process_test juci_shared) target_link_libraries(process_test juci_shared ${PYTHON_LIBRARIES})
add_test(process_test process_test) add_test(process_test process_test)
add_executable(compile_commands_test compile_commands_test.cpp $<TARGET_OBJECTS:test_stubs>) add_executable(compile_commands_test compile_commands_test.cpp $<TARGET_OBJECTS:test_stubs>)

1
tests/python_bindings/CMakeLists.txt

@ -1,4 +1,3 @@
add_library(test_suite test_suite.cc) add_library(test_suite test_suite.cc)
target_link_libraries(test_suite juci_shared ${PYTHON_LIBRARIES}) target_link_libraries(test_suite juci_shared ${PYTHON_LIBRARIES})

2
tests/python_bindings/CompileCommands_tests/compile_commands_test.cc

@ -1,4 +1,4 @@
#include "cmake.h" #include "cmake.hpp"
#include "test_suite.h" #include "test_suite.h"
#include <iostream> #include <iostream>

6
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.command.c_str(), ==, "cmake");
g_assert_cmpstr(config.project.cmake.compile_command.c_str(), ==, "cmake --build"); g_assert_cmpstr(config.project.cmake.compile_command.c_str(), ==, "cmake --build");
g_assert_true(config.project.save_on_compile_or_run); 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.ctags_command.c_str(), ==, "ctags");
g_assert_cmpstr(config.project.python_command.c_str(), ==, "python"); 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.format_style_on_save_if_style_file_found);
g_assert_false(config.source.smart_inserts); g_assert_false(config.source.smart_inserts);
g_assert_false(config.source.show_map); 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_git_diff);
g_assert_false(config.source.show_background_pattern); g_assert_false(config.source.show_background_pattern);
g_assert_false(config.source.show_right_margin); 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_cmpint(config.source.default_tab_char, ==, 'c');
g_assert_cmpuint(config.source.default_tab_size, ==, 1); g_assert_cmpuint(config.source.default_tab_size, ==, 1);
g_assert_false(config.source.tab_indents_line); 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.highlight_current_line);
g_assert_false(config.source.show_line_numbers); g_assert_false(config.source.show_line_numbers);
g_assert_false(config.source.enable_multiple_cursors); g_assert_false(config.source.enable_multiple_cursors);

2
tests/python_bindings/Terminal_tests/terminal_test.cc

@ -1,5 +1,5 @@
#include "terminal.hpp"
#include "test_suite.h" #include "test_suite.h"
#include "terminal.h"
int main() { int main() {
const auto test_directory = "Terminal_tests"; const auto test_directory = "Terminal_tests";

2
tests/python_bindings/test_suite.h

@ -1,5 +1,5 @@
#pragma once #pragma once
#include "config.h" #include "config.hpp"
#include "plugins.h" #include "plugins.h"
#include <gtkmm.h> #include <gtkmm.h>

2
tests/stubs/dialogs.cpp

@ -7,3 +7,5 @@ void Dialog::Message::set_fraction(double fraction) {}
bool Dialog::Message::on_delete_event(GdkEventAny *event) { bool Dialog::Message::on_delete_event(GdkEventAny *event) {
return true; return true;
} }
void Dialog::init_module(py::module &) {}
Loading…
Cancel
Save