Revert "Add call back to track page size changes"

This reverts commit 12994ca6e7.

Webkit takes care of this properly for newly opened reports. It
somehow fails for reports that are automatically loaded when
reopening gnucash. This needs additional investigation, but
reloading the report when exposing the page has undesired
side-effects which should be avoided.
This commit is contained in:
Geert Janssens
2017-02-01 21:29:36 +01:00
parent d9d5f07451
commit 996b6047fc

View File

@@ -130,9 +130,6 @@ typedef struct GncPluginPageReportPrivate
// gnc_html *html;
GncHtml *html;
// keep the view size
gint view_width, view_height;
/// the container the above HTML widget is in.
GtkContainer *container;
} GncPluginPageReportPrivate;
@@ -327,20 +324,6 @@ gnc_plugin_page_report_finalize (GObject *object)
LEAVE(" ");
}
static void
gnc_plugin_page_report_view_size (GtkWidget *widget, GtkAllocation *allocation, gpointer user_data)
{
GncPluginPageReportPrivate *priv = user_data;
if ((allocation->width != priv->view_width)||(allocation->height != priv->view_height))
{
gnc_html_reload (priv->html, FALSE); //reload by view
priv->view_width = allocation->width;
priv->view_height = allocation->height;
}
}
static void
gnc_plugin_page_report_set_progressbar (GncPluginPage *page, gboolean set)
{
@@ -372,14 +355,6 @@ gnc_plugin_page_report_load_uri (GncPluginPage *page)
report = GNC_PLUGIN_PAGE_REPORT(page);
priv = GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE(report);
gtk_widget_get_allocation (GTK_WIDGET(gnc_html_get_widget(priv->html)), &allocation);
priv->view_width = allocation.width;
priv->view_height = allocation.height;
g_signal_connect(GTK_WIDGET(gnc_html_get_widget(priv->html)), "size-allocate",
G_CALLBACK(gnc_plugin_page_report_view_size), priv);
id_name = g_strdup_printf("id=%d", priv->reportId );
child_name = gnc_build_url( URL_TYPE_REPORT, id_name, NULL );
type = gnc_html_parse_url( priv->html, child_name, &url_location, &url_label);
@@ -426,9 +401,6 @@ gnc_plugin_page_report_create_widget( GncPluginPage *page )
priv->html = gnc_html_factory_create_html();
gnc_html_set_parent( priv->html, topLvl );
priv->view_width = 0; // default
priv->view_height = 0; // default
gnc_html_history_set_node_destroy_cb(gnc_html_get_history(priv->html),
gnc_plugin_page_report_history_destroy_cb,
(gpointer)priv);