diff --git a/gnucash/gnome/CMakeLists.txt b/gnucash/gnome/CMakeLists.txt index 37d13f8f6c..1e88ad68ab 100644 --- a/gnucash/gnome/CMakeLists.txt +++ b/gnucash/gnome/CMakeLists.txt @@ -133,6 +133,7 @@ target_link_libraries(gnc-gnome gnc-register-gnome gnc-register-core gnc-gnome-utils + gnc-app-utils gnc-engine gnc-expressions gnc-html @@ -148,6 +149,7 @@ target_compile_options(gnc-gnome PRIVATE -Wno-deprecated-declarations) target_include_directories(gnc-gnome PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} PRIVATE + ${CMAKE_SOURCE_DIR}/libgnucash/app-utils ${CMAKE_SOURCE_DIR}/libgnucash/app-utils/calculation ${CMAKE_SOURCE_DIR}/gnucash/html ${CMAKE_BINARY_DIR}/gnucash/gnome-utils # for gnc-warnings.h diff --git a/gnucash/gnome/dialog-price-edit-db.cpp b/gnucash/gnome/dialog-price-edit-db.cpp index d1e86d8b87..1dc04e73ea 100644 --- a/gnucash/gnome/dialog-price-edit-db.cpp +++ b/gnucash/gnome/dialog-price-edit-db.cpp @@ -27,8 +27,8 @@ #include #include -#include #include +#include extern "C" { #include "dialog-utils.h" @@ -47,9 +47,6 @@ extern "C" { #include "gnc-ui.h" #include "gnc-ui-util.h" #include "gnc-warnings.h" -#include "swig-runtime.h" -#include "guile-mappings.h" -#include "gnc-engine-guile.h" #include } @@ -560,30 +557,19 @@ void gnc_prices_dialog_get_quotes_clicked (GtkWidget *widget, gpointer data) { auto pdb_dialog = static_cast (data); - SCM quotes_func; - SCM book_scm; - SCM scm_window; ENTER(" "); - quotes_func = scm_c_eval_string ("gnc:book-add-quotes"); - if (!scm_is_procedure (quotes_func)) + GncQuotes quotes (pdb_dialog->book); + if (quotes.cmd_result() != 0) { - LEAVE(" no procedure"); + if (!quotes.error_msg().empty()) + PWARN ("%s", quotes.error_msg().c_str()); + LEAVE("quote retrieval failed"); return; } - book_scm = gnc_book_to_scm (pdb_dialog->book); - if (scm_is_true (scm_not (book_scm))) - { - LEAVE("no book"); - return; - } - - scm_window = SWIG_NewPointerObj(pdb_dialog->window, - SWIG_TypeQuery("_p_GtkWindow"), 0); - gnc_set_busy_cursor (NULL, TRUE); - scm_call_2 (quotes_func, scm_window, book_scm); + quotes.fetch_all(); gnc_unset_busy_cursor (NULL); /* Without this, the summary bar on the accounts tab