problems compiling gnucash (gnucash-gnome2-dev branch)

Tony Watts tjawatts at totalise.co.uk
Sun Aug 17 22:23:39 CDT 2003


Hi folks

How about this one? Give it a go Thomas and let me know if it works. 
(dont know if I am supposed/allowed to post patches to this list?)

Derek, regarding whether it is essential it is the printer interface, 
which changed from 2.0. I am not certain but I think RH 9 comes with 2.0.

Anyway, glad if it is 2.2 that we are aiming at. The only compatability 
problem I have had so far is this printer problem. Which hopefully will 
now be fixed. Any ideas on how to do it without breaking it for users of 
2.0?

Tony

-------------- next part --------------
Index: gnucash/src/gnome-utils/print-session.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/print-session.c,v
retrieving revision 1.2.4.5
diff -u -r1.2.4.5 print-session.c
--- gnucash/src/gnome-utils/print-session.c	9 Aug 2003 02:04:26 -0000	1.2.4.5
+++ gnucash/src/gnome-utils/print-session.c	17 Aug 2003 17:08:02 -0000
@@ -26,7 +26,7 @@
 
 #include <gnome.h>
 #include <libgnomeprint/gnome-font.h>
-#include <libgnomeprintui/gnome-print-master-preview.h>
+#include <libgnomeprintui/gnome-print-job-preview.h>
 #include <stdio.h>
 
 #include "gnc-ui.h"
@@ -40,9 +40,9 @@
   PrintSession * ps = g_new0(PrintSession, 1);
   GnomePrintConfig *config;
 
-  /* this is about the most basic we can get */
-  ps->master       = gnome_print_master_new();
-  config = gnome_print_master_get_config(ps->master);
+  /* this is about the most basic we can get */  
+  ps->master       = gnome_print_job_new(config);
+  config = gnome_print_job_get_config(ps->master);  
   ps->meta         = gnome_print_context_new(config);
   ps->default_font = gnome_font_find("Courier", 12);
 
@@ -113,7 +113,7 @@
 void
 gnc_print_session_print(PrintSession * ps) {
   GtkWidget * dialog    =
-    gnome_print_dialog_new(_("Print GnuCash Document"), 0);
+    gnome_print_dialog_new(ps->master,_("Print GnuCash Document"), 0);
   int button            = gnome_dialog_run(GNOME_DIALOG(dialog));
   GnomePrintConfig *config;
 
@@ -125,7 +125,7 @@
       ps->master = NULL;
     }
     config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (dialog));
-    ps->master = gnome_print_master_new_from_config (config);
+    ps->master = gnome_print_job_new(config);
     gnome_dialog_close(GNOME_DIALOG(dialog));
     gnc_print_session_render(ps);
     break;
@@ -136,7 +136,7 @@
       ps->master = NULL;
     }
     config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (dialog));
-    ps->master = gnome_print_master_new_from_config (config);
+    ps->master = gnome_print_job_new(config);
     gnome_dialog_close(GNOME_DIALOG(dialog));
     gnc_print_session_preview(ps);    
     break;
@@ -150,17 +150,17 @@
 
 void 
 gnc_print_session_render(PrintSession * ps) {
-  gnome_print_master_render (ps->master, ps->meta);
-  gnome_print_master_close (ps->master);
-  gnome_print_master_print(ps->master);
+  gnome_print_job_render (ps->master, ps->meta);
+  gnome_print_job_close (ps->master);
+  gnome_print_job_print(ps->master);
 }
 
 void 
 gnc_print_session_preview(PrintSession * ps) {
   GtkWidget * preview;
 
-  gnome_print_master_render (ps->master, ps->meta);
-  gnome_print_master_close (ps->master);
-  preview = gnome_print_master_preview_new(ps->master, _("Print Preview"));
+  gnome_print_job_render (ps->master, ps->meta);
+  gnome_print_job_close (ps->master);
+  preview = gnome_print_job_preview_new(ps->master, _("Print Preview"));
   gtk_widget_show_all(preview);
 }
Index: gnucash/src/gnome-utils/print-session.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/print-session.h,v
retrieving revision 1.3.4.3
diff -u -r1.3.4.3 print-session.h
--- gnucash/src/gnome-utils/print-session.h	17 Jul 2003 07:58:40 -0000	1.3.4.3
+++ gnucash/src/gnome-utils/print-session.h	17 Aug 2003 17:08:02 -0000
@@ -28,13 +28,13 @@
 
 #include <gnome.h>
 #include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-master.h>
+#include <libgnomeprint/gnome-print-job.h>
 
 #include <libgnomeprintui/gnome-print-dialog.h>
 #include <libgnomeprintui/gnome-print-preview.h>
 
 typedef struct {
-  GnomePrintMaster   * master;
+  GnomePrintJob      * master;
   GnomePrintContext  * meta;
   GnomeFont          * default_font;
   GnomePrintPaper    * paper;


More information about the gnucash-devel mailing list