[Gnucash-changes] Remove old checks for libgnomeprint2.0.

David Hampton hampton at cvs.gnucash.org
Sat Jul 2 19:06:44 EDT 2005


Log Message:
-----------
Remove old checks for libgnomeprint2.0.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        configure.in
    gnucash/src/gnome-utils:
        print-session.c
        print-session.h

Revision Data
-------------
Index: configure.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/configure.in,v
retrieving revision 1.359.2.52
retrieving revision 1.359.2.53
diff -Lconfigure.in -Lconfigure.in -u -r1.359.2.52 -r1.359.2.53
--- configure.in
+++ configure.in
@@ -918,18 +918,7 @@
     # Anyone know why gnome has versions in the package config? 
     # Why cant I just ask for the version of 'libgnomeprint'
 
-    # If 2.2 doesnt exist set gpv to 0
-    PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.2 libgnomeprintui-2.2,,gpv=0)
-    if test $gpv
-     then 
-	#If no 2.2 check for 2.0
-      	PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.0 libgnomeprintui-2.0)
-      	AC_DEFINE_UNQUOTED(GNOME_PRINT_VER,0,[gnome print version])
-     else
-	#if 2.2 set header variable
-	AC_DEFINE_UNQUOTED(GNOME_PRINT_VER,2,[gnome print version])
-    fi
-  
+    PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.2 libgnomeprintui-2.2)
     AS_SCRUB_INCLUDE(GNOME_PRINT_CFLAGS)
     AC_SUBST(GNOME_PRINT_CFLAGS)
     AC_SUBST(GNOME_PRINT_LIBS)
Index: print-session.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/print-session.c,v
retrieving revision 1.2.4.7
retrieving revision 1.2.4.8
diff -Lsrc/gnome-utils/print-session.c -Lsrc/gnome-utils/print-session.c -u -r1.2.4.7 -r1.2.4.8
--- src/gnome-utils/print-session.c
+++ src/gnome-utils/print-session.c
@@ -26,11 +26,7 @@
 
 #include <gnome.h>
 #include <libgnomeprint/gnome-font.h>
-#if GNOME_PRINT_VER == 2
 #include <libgnomeprintui/gnome-print-job-preview.h>
-#else
-#include <libgnomeprintui/gnome-print-master-preview.h>
-#endif
 #include <stdio.h>
 
 #include "gnc-ui.h"
@@ -45,13 +41,8 @@
   GnomePrintConfig *config;
 
   /* this is about the most basic we can get */
-#if GNOME_PRINT_VER==2
   ps->master       = gnome_print_job_new(NULL);
   config = gnome_print_job_get_config(ps->master);
-#else
-  ps->master       = gnome_print_master_new();
-  config = gnome_print_master_get_config(ps->master);
-#endif
   ps->meta         = gnome_print_context_new(config);
   ps->default_font = gnome_font_find("Courier", 12);
 
@@ -126,13 +117,8 @@
 void
 gnc_print_session_print(PrintSession * ps)
 {
-#if GNOME_PRINT_VER==2
   GtkWidget * dialog    =
     gnome_print_dialog_new(ps->master,_("Print GnuCash Document"), 0);
-#else
-  GtkWidget * dialog    =
-    gnome_print_dialog_new(_("Print GnuCash Document"), 0);
-#endif
   int button            = gnome_dialog_run(GNOME_DIALOG(dialog));
   GnomePrintConfig *config;
 
@@ -144,11 +130,7 @@
       ps->master = NULL;
     }
     config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (dialog));
-#if GNOME_PRINT_VER==2
     ps->master = gnome_print_job_new(config);
-#else
-    ps->master = gnome_print_master_new_from_config(config);
-#endif
     gnome_dialog_close(GNOME_DIALOG(dialog));
     gnc_print_session_render(ps);
     break;
@@ -159,11 +141,7 @@
       ps->master = NULL;
     }
     config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (dialog));
-#if GNOME_PRINT_VER==2
     ps->master = gnome_print_job_new(config);
-#else
-    ps->master = gnome_print_master_new_from_config(config);
-#endif
     gnome_dialog_close(GNOME_DIALOG(dialog));
     gnc_print_session_preview(ps);    
     break;
@@ -178,29 +156,17 @@
 void 
 gnc_print_session_render(PrintSession * ps)
 {
-#if GNOME_PRINT_VER==2
   gnome_print_job_render (ps->master, ps->meta);
   gnome_print_job_close (ps->master);
   gnome_print_job_print(ps->master);
-#else
-  gnome_print_master_render (ps->master, ps->meta);
-  gnome_print_master_close (ps->master);
-  gnome_print_master_print(ps->master);
-#endif
 }
 
 void 
 gnc_print_session_preview(PrintSession * ps)
 {
   GtkWidget * preview;
-#if GNOME_PRINT_VER==2
   gnome_print_job_render (ps->master, ps->meta);
   gnome_print_job_close (ps->master);
   preview = gnome_print_job_preview_new(ps->master, _("Print Preview"));
-#else
-  gnome_print_master_render (ps->master, ps->meta);
-  gnome_print_master_close (ps->master);
-  preview = gnome_print_master_preview_new(ps->master, _("Print Preview"));
-#endif
   gtk_widget_show_all(preview);
 }
Index: print-session.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/print-session.h,v
retrieving revision 1.3.4.4
retrieving revision 1.3.4.5
diff -Lsrc/gnome-utils/print-session.h -Lsrc/gnome-utils/print-session.h -u -r1.3.4.4 -r1.3.4.5
--- src/gnome-utils/print-session.h
+++ src/gnome-utils/print-session.h
@@ -29,21 +29,13 @@
 #include <gnome.h>
 #include <libgnomeprint/gnome-print.h>
 
-#if GNOME_PRINT_VER==2
 #include <libgnomeprint/gnome-print-job.h>
-#else
-#include <libgnomeprint/gnome-print-master.h>
-#endif
 
 #include <libgnomeprintui/gnome-print-dialog.h>
 #include <libgnomeprintui/gnome-print-preview.h>
 
 typedef struct {
-#if GNOME_PRINT_VER==2
   GnomePrintJob      * master;
-#else
-  GnomePrintMaster   * master;
-#endif
   GnomePrintContext  * meta;
   GnomeFont          * default_font;
   GnomePrintPaper    * paper;


More information about the gnucash-changes mailing list