Stop the progress bar changing height

When the report is run and the progress bar is updated, the height
changes and then changes back forcing the webkit view to change height
and ultimately use the wrong value.
pull/111/head
Robert Fewell 10 years ago
parent 1b2f89e194
commit 62e449f37b

@ -88,7 +88,7 @@ gnc_window_get_statusbar (GncWindow *window)
return GNC_WINDOW_GET_IFACE (window)->get_statusbar (window);
}
static GtkWidget *
GtkWidget *
gnc_window_get_progressbar (GncWindow *window)
{
g_return_val_if_fail(GNC_WINDOW (window), NULL);

@ -76,6 +76,7 @@ void gnc_window_set_status (GncWindow *window, GncPluginPage *page, co
void gnc_window_set_progressbar_window (GncWindow *window);
GncWindow *gnc_window_get_progressbar_window (void);
GtkWidget *gnc_window_get_progressbar (GncWindow *window);
void gnc_window_show_progress (const char *message, double percentage);
G_END_DECLS

@ -329,6 +329,8 @@ gnc_plugin_page_report_load_uri (GncPluginPage *page)
{
GncPluginPageReport *report;
GncPluginPageReportPrivate *priv;
GtkWidget *progressbar;
GtkAllocation allocation;
URLType type;
char * id_name;
char * child_name;
@ -348,9 +350,19 @@ gnc_plugin_page_report_load_uri (GncPluginPage *page)
g_free(id_name);
g_free(child_name);
// this sets the window for the progressbar
gnc_window_set_progressbar_window( GNC_WINDOW(page->window) );
progressbar = gnc_window_get_progressbar (GNC_WINDOW(page->window));
gtk_widget_get_allocation (GTK_WIDGET(progressbar), &allocation);
// this sets the minimum size of the progressbar to that allocated
gtk_widget_set_size_request (GTK_WIDGET(progressbar), -1, allocation.height);
gnc_html_show_url(priv->html, type, url_location, url_label, 0);
g_free(url_location);
// this resets the window for the progressbar to NULL
gnc_window_set_progressbar_window( NULL );
return FALSE;

Loading…
Cancel
Save