[Gnucash-changes] Move the gnc_shutdown routine to a different file.
David Hampton
hampton at cvs.gnucash.org
Fri Jul 15 23:19:03 EDT 2005
Log Message:
-----------
Move the gnc_shutdown routine to a different file.
Tags:
----
gnucash-gnome2-dev
Modified Files:
--------------
gnucash/src/gnome-utils:
gnc-gnome-utils.c
gnc-gnome-utils.h
gnc-main-window.c
gnc-main-window.h
Revision Data
-------------
Index: gnc-main-window.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-main-window.h,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -Lsrc/gnome-utils/gnc-main-window.h -Lsrc/gnome-utils/gnc-main-window.h -u -r1.1.2.3 -r1.1.2.4
--- src/gnome-utils/gnc-main-window.h
+++ src/gnome-utils/gnc-main-window.h
@@ -255,15 +255,6 @@
*/
void gnc_main_window_set_progressbar_window( GncMainWindow *window );
-
-/** Shutdown gnucash. This function will call the Scheme side of
- * GnuCash to initiate an orderly shutdown, and when that has
- * finished it will exit the program.
- *
- * @param exit_status The exit status for the program.
- */
-void gnc_shutdown (int exit_status);
-
G_END_DECLS
#endif /* __GNC_MAIN_WINDOW_H */
Index: gnc-gnome-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-gnome-utils.c,v
retrieving revision 1.2.4.11
retrieving revision 1.2.4.12
diff -Lsrc/gnome-utils/gnc-gnome-utils.c -Lsrc/gnome-utils/gnc-gnome-utils.c -u -r1.2.4.11 -r1.2.4.12
--- src/gnome-utils/gnc-gnome-utils.c
+++ src/gnome-utils/gnc-gnome-utils.c
@@ -289,3 +289,28 @@
return pixbuf;
}
+
+
+/* shutdown gnucash. This function will call the Scheme side of
+ * GnuCash to initiate an orderly shutdown, and when that has
+ * finished it will exit the program.
+ */
+void
+gnc_shutdown (int exit_status)
+{
+ /*SCM scm_shutdown = gnc_scm_lookup("gnucash bootstrap", "gnc:shutdown");*/
+ SCM scm_shutdown = scm_c_eval_string("gnc:shutdown");
+
+ if(scm_procedure_p(scm_shutdown) != SCM_BOOL_F)
+ {
+ SCM scm_exit_code = scm_long2num(exit_status);
+ scm_call_1(scm_shutdown, scm_exit_code);
+ }
+ else
+ {
+ /* Either guile is not running, or for some reason we
+ can't find gnc:shutdown. Either way, just exit. */
+ g_warning("couldn't find gnc:shutdown -- exiting anyway.");
+ exit(exit_status);
+ }
+}
Index: gnc-main-window.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-main-window.c,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -Lsrc/gnome-utils/gnc-main-window.c -Lsrc/gnome-utils/gnc-main-window.c -u -r1.1.2.7 -r1.1.2.8
--- src/gnome-utils/gnc-main-window.c
+++ src/gnome-utils/gnc-main-window.c
@@ -1795,28 +1795,3 @@
gncwin = GNC_WINDOW(window);
gnc_window_set_progressbar_window(gncwin);
}
-
-
-/* Shutdown gnucash. This function will call the Scheme side of
- * GnuCash to initiate an orderly shutdown, and when that has
- * finished it will exit the program.
- */
-void
-gnc_shutdown (int exit_status)
-{
- /*SCM scm_shutdown = gnc_scm_lookup("gnucash bootstrap", "gnc:shutdown");*/
- SCM scm_shutdown = scm_c_eval_string("gnc:shutdown");
-
- if(scm_procedure_p(scm_shutdown) != SCM_BOOL_F)
- {
- SCM scm_exit_code = scm_long2num(exit_status);
- scm_call_1(scm_shutdown, scm_exit_code);
- }
- else
- {
- /* Either guile is not running, or for some reason we
- can't find gnc:shutdown. Either way, just exit. */
- g_warning("couldn't find gnc:shutdown -- exiting anyway.");
- exit(exit_status);
- }
-}
Index: gnc-gnome-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-gnome-utils.h,v
retrieving revision 1.1.4.8
retrieving revision 1.1.4.9
diff -Lsrc/gnome-utils/gnc-gnome-utils.h -Lsrc/gnome-utils/gnc-gnome-utils.h -u -r1.1.4.8 -r1.1.4.9
--- src/gnome-utils/gnc-gnome-utils.h
+++ src/gnome-utils/gnc-gnome-utils.h
@@ -141,5 +141,14 @@
GdkPixbuf * gnc_gnome_get_gdkpixbuf (const char *name);
+/** Shutdown gnucash. This function will call the Scheme side of
+ * GnuCash to initiate an orderly shutdown, and when that has
+ * finished it will exit the program.
+ *
+ * @param exit_status The exit status for the program.
+ */
+void gnc_shutdown (int exit_status);
+
+
#endif
/** @} */
More information about the gnucash-changes
mailing list