mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Remove some references to webkit
This commit is contained in:
parent
7a17b24e34
commit
1d94ec316f
@ -127,7 +127,6 @@ typedef struct GncPluginPageReportPrivate
|
||||
/// the gnc_html abstraction this PluginPage contains
|
||||
// gnc_html *html;
|
||||
GncHtml *html;
|
||||
gboolean webkit2;
|
||||
|
||||
/// the container the above HTML widget is in.
|
||||
GtkContainer *container;
|
||||
@ -519,11 +518,6 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
|
||||
report = GNC_PLUGIN_PAGE_REPORT(page);
|
||||
priv = GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE(report);
|
||||
|
||||
#ifndef WEBKIT1
|
||||
/* Hide the ExportPdf action for Webkit2 */
|
||||
priv->webkit2 = TRUE;
|
||||
#endif
|
||||
|
||||
topLvl = gnc_ui_get_main_window (nullptr);
|
||||
// priv->html = gnc_html_new( topLvl );
|
||||
priv->html = gnc_html_factory_create_html();
|
||||
@ -1249,8 +1243,6 @@ gnc_plugin_page_report_menu_update (GncPluginPage *plugin_page,
|
||||
static void
|
||||
gnc_plugin_page_report_menu_updates (GncPluginPage *plugin_page)
|
||||
{
|
||||
GncPluginPageReportPrivate *priv;
|
||||
GncPluginPageReport *report;
|
||||
GncMainWindow *window;
|
||||
action_toolbar_labels tooltip_list[3];
|
||||
GAction *action;
|
||||
@ -1263,9 +1255,6 @@ gnc_plugin_page_report_menu_updates (GncPluginPage *plugin_page)
|
||||
_("Add the current report's configuration to the 'Reports->Saved Report Configurations' menu. "
|
||||
"The report configuration will be saved in the file %s."), saved_reports_path);
|
||||
|
||||
report = GNC_PLUGIN_PAGE_REPORT(plugin_page);
|
||||
priv = GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE(report);
|
||||
|
||||
window = (GncMainWindow*)gnc_plugin_page_get_window (GNC_PLUGIN_PAGE(plugin_page));
|
||||
|
||||
tooltip_list[0] = { "ReportSaveAction", N_("Save _Report Configuration"), report_save_str };
|
||||
@ -1278,11 +1267,6 @@ gnc_plugin_page_report_menu_updates (GncPluginPage *plugin_page)
|
||||
action = gnc_main_window_find_action (window, "FilePrintAction");
|
||||
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), true);
|
||||
|
||||
if (priv->webkit2)
|
||||
{
|
||||
GtkWidget *pdf_item = gnc_main_window_menu_find_menu_item (window, "FilePrintPDFAction");
|
||||
gtk_widget_hide (pdf_item);
|
||||
}
|
||||
g_free (saved_reports_path);
|
||||
g_free (report_save_str);
|
||||
g_free (report_saveas_str);
|
||||
@ -1299,7 +1283,6 @@ gnc_plugin_page_report_constr_init (GncPluginPageReport *plugin_page, gint repor
|
||||
DEBUG("property reportId=%d", reportId);
|
||||
priv = GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE(plugin_page);
|
||||
priv->reportId = reportId;
|
||||
priv->webkit2 = FALSE;
|
||||
|
||||
gnc_plugin_page_report_setup( GNC_PLUGIN_PAGE(plugin_page));
|
||||
|
||||
@ -1991,11 +1974,7 @@ gnc_plugin_page_report_print_cb (GSimpleAction *simple,
|
||||
|
||||
//g_warning("Setting job name=%s", job_name);
|
||||
|
||||
#ifdef WEBKIT1
|
||||
gnc_html_print (priv->html, job_name, FALSE);
|
||||
#else
|
||||
gnc_html_print (priv->html, job_name);
|
||||
#endif
|
||||
|
||||
g_free (job_name);
|
||||
}
|
||||
@ -2037,11 +2016,7 @@ gnc_plugin_page_report_exportpdf_cb (GSimpleAction *simple,
|
||||
|
||||
//g_warning("Setting job name=%s", job_name);
|
||||
|
||||
#ifdef WEBKIT1
|
||||
gnc_html_print (priv->html, job_name, TRUE);
|
||||
#else
|
||||
gnc_html_print (priv->html, job_name);
|
||||
#endif
|
||||
|
||||
if (owner)
|
||||
{
|
||||
|
@ -5,8 +5,6 @@ set (html_HEADERS
|
||||
gnc-html-p.h
|
||||
gnc-html-factory.h
|
||||
gnc-html-extras.h
|
||||
gnc-html-webkit-p.h
|
||||
gnc-html-webkit.h
|
||||
)
|
||||
|
||||
# Command to generate the swig-gnc-html.c wrapper file
|
||||
@ -21,18 +19,6 @@ set (html_SOURCES
|
||||
gnc-html-factory.c
|
||||
)
|
||||
|
||||
if (WEBKIT1)
|
||||
list(APPEND html_HEADERS gnc-html-webkit1.h)
|
||||
list(APPEND html_SOURCES gnc-html-webkit1.c)
|
||||
set(html_EXTRA_DIST gnc-html-webkit2.h gnc-html-webkit2.c)
|
||||
else ()
|
||||
list(APPEND html_HEADERS gnc-html-webkit2.h)
|
||||
list(APPEND html_SOURCES gnc-html-webkit2.c)
|
||||
set(html_EXTRA_DIST gnc-html-webkit1.h gnc-html-webkit1.c)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
set (gnc_html_SCHEME html.scm)
|
||||
|
||||
set(GUILE_OUTPUT_DIR gnucash)
|
||||
@ -57,7 +43,6 @@ target_link_libraries(gnc-html
|
||||
gnc-engine
|
||||
gnc-gnome-utils
|
||||
PkgConfig::GTK3
|
||||
PkgConfig::WEBKIT
|
||||
${GUILE_LDFLAGS})
|
||||
|
||||
target_compile_definitions(gnc-html PRIVATE -DG_LOG_DOMAIN=\"gnc.html\")
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "gnc-html.h"
|
||||
#include "gnc-html-webkit.h"
|
||||
#include "qoflog.h"
|
||||
#include "gnc-engine.h"
|
||||
|
||||
|
@ -528,13 +528,9 @@ gnc_html_export_to_file( GncHtml* self, const gchar* filepath )
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#ifdef WEBKIT1
|
||||
void
|
||||
gnc_html_print (GncHtml* self, const char *jobname, gboolean export_pdf)
|
||||
#else
|
||||
|
||||
void
|
||||
gnc_html_print (GncHtml* self, const char *jobname)
|
||||
#endif
|
||||
{
|
||||
g_return_if_fail( self != NULL );
|
||||
g_return_if_fail( jobname != NULL );
|
||||
@ -542,11 +538,7 @@ gnc_html_print (GncHtml* self, const char *jobname)
|
||||
|
||||
if ( GNC_HTML_GET_CLASS(self)->print != NULL )
|
||||
{
|
||||
#ifdef WEBKIT1
|
||||
GNC_HTML_GET_CLASS(self)->print (self, jobname, export_pdf);
|
||||
#else
|
||||
GNC_HTML_GET_CLASS(self)->print (self, jobname);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -589,17 +581,13 @@ gnc_html_get_webview( GncHtml* self )
|
||||
|
||||
if (sw_list) // the scroll window has only one child
|
||||
{
|
||||
#ifdef WEBKIT1
|
||||
webview = sw_list->data;
|
||||
#else
|
||||
GList *vp_list = gtk_container_get_children (GTK_CONTAINER(sw_list->data));
|
||||
|
||||
|
||||
if (vp_list) // the viewport has only one child
|
||||
{
|
||||
webview = vp_list->data;
|
||||
g_list_free (vp_list);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
g_list_free (sw_list);
|
||||
return webview;
|
||||
|
@ -138,11 +138,7 @@ struct _GncHtmlClass
|
||||
void (*reload)( GncHtml* html, gboolean force_rebuild );
|
||||
void (*copy_to_clipboard)( GncHtml* html );
|
||||
gboolean (*export_to_file)( GncHtml* html, const gchar* file );
|
||||
#ifdef WEBKIT1
|
||||
void (*print) (GncHtml* html, const gchar* jobname, gboolean export_pdf);
|
||||
#else
|
||||
void (*print) (GncHtml* html, const gchar* jobname);
|
||||
#endif
|
||||
void (*cancel)( GncHtml* html );
|
||||
URLType (*parse_url)( GncHtml* html, const gchar* url,
|
||||
gchar** url_location, gchar** url_label );
|
||||
@ -203,25 +199,13 @@ void gnc_html_copy_to_clipboard( GncHtml* html );
|
||||
*/
|
||||
gboolean gnc_html_export_to_file( GncHtml* html, const gchar* filename );
|
||||
|
||||
#ifdef WEBKIT1
|
||||
/**
|
||||
* Prints the report.
|
||||
*
|
||||
* @param html GncHtml object
|
||||
* @param jobname A jobname for identifying the print job or to provide
|
||||
* an output filename.
|
||||
* @param export_pdf If TRUE write a PDF file using the jobname for a
|
||||
* filename; otherwise put up a print dialog.
|
||||
*/
|
||||
void gnc_html_print (GncHtml* html, const char* jobname, gboolean export_pdf);
|
||||
#else
|
||||
/**
|
||||
* Prints the report.
|
||||
*
|
||||
* @param html GncHtml object
|
||||
*/
|
||||
void gnc_html_print (GncHtml* html, const char* jobname);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Cancels the current operation
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user