mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Show dive import text updates in the progress bar
Instead of using printf() to print the string updates ("Parsing sample
data" etc), introduce a function to show those strings in the graphical
progress bar itself.
Subsurface hasn't been a text-mode application in a long time ;)
This partially fixes the second todo entry from commit b0ba22a068
("Show dive import error messages in the import dialog") and generally
makes for a more helpful import - at least for the largely error-free
cases.
Sadly, the messages that really come from within libdivecomputer itself
(like "suunto_vyper2.c:193: Failed to receive the answer.") when things
go really wrong are not caught. libdivecomputer does have a notion of a
logfile (set with "message_set_logfile()"), but that ends up being
really inconvenient.
Maybe we could use some pipe setup or something. Oh well.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
26b90cbfa8
commit
e7a70b6ae8
3 changed files with 36 additions and 19 deletions
|
|
@ -1113,6 +1113,10 @@ void update_progressbar(progressbar_t *progress, double value)
|
|||
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress->bar), value);
|
||||
}
|
||||
|
||||
void update_progressbar_text(progressbar_t *progress, const char *text)
|
||||
{
|
||||
gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress->bar), text);
|
||||
}
|
||||
|
||||
void set_filename(const char *filename)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue