mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Make the progress bar argument a double instead of an int. This gets
around an issue with guile 1.6. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7832 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
119bbe3fa4
commit
8e00dd0826
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
||||
2003-01-13 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/engine/engine-helpers.c: Make the gnc_scm_to_gint64()
|
||||
function work with either guile 1.4 or guile 1.6.
|
||||
|
||||
* src/app-file/gnc-file.h:
|
||||
* src/engine/Backend.h:
|
||||
* src/engine/gnc-session-scm.c:
|
||||
* src/engine/gnc-session.h:
|
||||
* src/gnome-utils/gnc-mdi-utils.c:
|
||||
* src/gnome-utils/gnc-mdi-utils.h:
|
||||
* src/gnome-utils/gw-gnome-utils-spec.scm:
|
||||
* src/report/report-system/report-utilities.scm: Make the progress
|
||||
bar argument a double instead of an int. This gets around an
|
||||
issue with guile 1.6.
|
||||
|
||||
2003-01-13 Derek Atkins <derek@ihtfp.com>
|
||||
|
||||
* src/app-utils/option-util.c: gh_str2scm() takes a char*, not a
|
||||
|
@ -134,7 +134,7 @@ void gnc_file_quit (void);
|
||||
typedef gboolean (*GNCCanCancelSaveCB) (void);
|
||||
void gnc_file_set_can_cancel_callback (GNCCanCancelSaveCB cb);
|
||||
|
||||
typedef void (*GNCFilePercentageFunc) (const char *message, int percent);
|
||||
typedef void (*GNCFilePercentageFunc) (const char *message, double percent);
|
||||
void gnc_file_set_pct_handler (GNCFilePercentageFunc file_percentage_func);
|
||||
|
||||
typedef void (*GNCShutdownCB) (int);
|
||||
|
@ -95,6 +95,6 @@ typedef enum {
|
||||
|
||||
typedef struct backend_s Backend;
|
||||
|
||||
typedef void (*GNCBePercentageFunc) (const char *message, int percent);
|
||||
typedef void (*GNCBePercentageFunc) (const char *message, double percent);
|
||||
|
||||
#endif /* XACC_BACKEND_H */
|
||||
|
@ -59,11 +59,11 @@
|
||||
static SCM gnc_session_scm_gui_cb = SCM_BOOL_F;
|
||||
|
||||
static void
|
||||
gnc_session_scm_gui_cb_helper (const char *message, int percent)
|
||||
gnc_session_scm_gui_cb_helper (const char *message, double percent)
|
||||
{
|
||||
if (gnc_session_scm_gui_cb != SCM_BOOL_F) {
|
||||
SCM string = gh_str02scm((char*)message);
|
||||
SCM scm_percent = gh_long2scm(percent);
|
||||
SCM scm_percent = gh_double2scm(percent);
|
||||
gh_call2 (gnc_session_scm_gui_cb, string, scm_percent);
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ void gnc_session_begin (GNCSession *session, const char * book_id,
|
||||
* to make the book actually usable; it would not cause *all* of the
|
||||
* data to be loaded.
|
||||
*/
|
||||
typedef void (*GNCPercentageFunc) (const char *message, int percent);
|
||||
typedef void (*GNCPercentageFunc) (const char *message, double percent);
|
||||
void gnc_session_load (GNCSession *session,
|
||||
GNCPercentageFunc percentage_func);
|
||||
gboolean gnc_session_export (GNCSession *tmp_session,
|
||||
|
@ -97,7 +97,7 @@ gnc_mdi_set_toolbar_visibility (gboolean visible)
|
||||
}
|
||||
|
||||
void
|
||||
gnc_mdi_show_progress (const char *message, int percentage)
|
||||
gnc_mdi_show_progress (const char *message, double percentage)
|
||||
{
|
||||
GtkWidget *app;
|
||||
GnomeAppBar *appbar;
|
||||
@ -116,7 +116,7 @@ gnc_mdi_show_progress (const char *message, int percentage)
|
||||
} else {
|
||||
if (message)
|
||||
gnome_appbar_set_status(appbar, message);
|
||||
gnome_appbar_set_progress(appbar, ((gfloat)percentage)/100);
|
||||
gnome_appbar_set_progress(appbar, percentage/100);
|
||||
}
|
||||
|
||||
/* make sure new text is up */
|
||||
|
@ -119,7 +119,7 @@ void gnc_mdi_child_refresh (GNCMDIChildInfo *child);
|
||||
GNCMDIInfo * gnc_mdi_get_current (void);
|
||||
gboolean gnc_mdi_has_apps (void);
|
||||
|
||||
void gnc_mdi_show_progress (const char *message, int percentage);
|
||||
void gnc_mdi_show_progress (const char *message, double percentage);
|
||||
|
||||
void gnc_app_set_title (GnomeApp *app);
|
||||
|
||||
|
@ -466,7 +466,7 @@ be left empty")
|
||||
'<gw:void>
|
||||
"gnc_mdi_show_progress"
|
||||
'(((<gw:mchars> caller-owned const) message)
|
||||
(<gw:int> percentage))
|
||||
(<gw:double> percentage))
|
||||
"Autosize the columns of a clist including the titles.")
|
||||
|
||||
(gw:wrap-function
|
||||
|
@ -683,7 +683,7 @@
|
||||
0))
|
||||
|
||||
(define (gnc:report-percent-done percent)
|
||||
(gnc:mdi-show-progress #f (truncate percent)))
|
||||
(gnc:mdi-show-progress #f percent))
|
||||
|
||||
(define (gnc:report-finished)
|
||||
(gnc:mdi-show-progress #f -1))
|
||||
|
Loading…
Reference in New Issue
Block a user