Bug#457944: Keep splash screen during file loading.

- do not destroy the splash screen during file loading
- display which reports are rendered in the progress field of the splash screen
Patch from Herbert Thoma <herbert.thoma iis fraunhofer de>


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16378 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Joshua Sled 2007-08-02 23:48:04 +00:00
parent 71e8d79a57
commit 5e7e7edf59
4 changed files with 17 additions and 10 deletions

View File

@ -470,7 +470,6 @@ inner_main (void *closure, int argc, char **argv)
if (!nofile && (fn = get_file_to_load())) {
gnc_update_splash_screen(_("Loading data..."));
gnc_destroy_splash_screen();
gnc_file_open_file(fn);
g_free(fn);
}

View File

@ -191,7 +191,6 @@ show_session_error (QofBackendError io_error,
const char *fmt, *label;
gint response;
gnc_destroy_splash_screen(); /* Just in case */
if (NULL == newfile) { newfile = _("(null)"); }
switch (io_error)
@ -668,8 +667,6 @@ gnc_post_file_open (const char * filename)
);
int rc;
gnc_destroy_splash_screen(); /* Just in case */
dialog = gtk_message_dialog_new(NULL,
0,
GTK_MESSAGE_WARNING,

View File

@ -108,6 +108,11 @@ gnc_show_splash_screen (void)
separator = gtk_hseparator_new();
progress = gtk_label_new(NULL);
/* the set_max_width avoids "bumping" of the splash screen
if a long string is given in gnc_update_splash_screen();
presumably it would be better to inhibit size change of the
top level container, but I don't know how to do this */
gtk_label_set_max_width_chars(GTK_LABEL(progress), 50);
markup = g_markup_printf_escaped(MARKUP_STRING, _("Loading..."));
gtk_label_set_markup(GTK_LABEL(progress), markup);
g_free(markup);
@ -150,12 +155,15 @@ gnc_update_splash_screen (const gchar *string)
if (progress)
{
markup = g_markup_printf_escaped(MARKUP_STRING, string);
gtk_label_set_markup (GTK_LABEL(progress), markup);
g_free (markup);
if(string && strcmp(string, ""))
{
markup = g_markup_printf_escaped(MARKUP_STRING, string);
gtk_label_set_markup (GTK_LABEL(progress), markup);
g_free (markup);
/* make sure new text is up */
while (gtk_events_pending ())
gtk_main_iteration ();
/* make sure new text is up */
while (gtk_events_pending ())
gtk_main_iteration ();
}
}
}

View File

@ -29,6 +29,7 @@
#include "gnc-engine.h"
#include "gnc-plugin-page.h"
#include "gnc-window.h"
#include "gnc-splash.h"
static QofLogModule log_module = GNC_MOD_GUI;
@ -174,6 +175,8 @@ gnc_window_show_progress (const char *message, double percentage)
return;
}
gnc_update_splash_screen(message);
if (percentage < 0) {
gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progressbar), " ");
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progressbar), 0.0);