[Gnucash-changes] Stephen Evanchik's fix to remove some deprecated functions.

Derek Atkins warlord at cvs.gnucash.org
Sat Dec 4 15:26:46 EST 2004


Log Message:
-----------
Stephen Evanchik's fix to remove some deprecated functions.

	* src/gnome-utils/gnc-gnome-utils.c:
	  gnome_pixmap_new_from_file -> gtk_image_new_from_file
	* src/business/business-gnome/dialog-date-close.c:
	  gnome_pixmap_new_from_file -> gtk_image_new_from_file
	  gnome_unconditional_pixmap_file -> gnome_program_locate_file
	* src/business/business-gnome/dialog-invoice.c:
	  gnome_unconditional_pixmap_file -> gnome_program_locate_file
	  gnome_pixmap_load_file -> gtk_image_new_from_file

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src/business/business-gnome:
        dialog-date-close.c
        dialog-invoice.c
    gnucash/src/gnome-utils:
        gnc-gnome-utils.c

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.140
retrieving revision 1.1487.2.141
diff -LChangeLog -LChangeLog -u -r1.1487.2.140 -r1.1487.2.141
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,15 @@
+2004-12-04  Derek Atkins  <derek at ihtfp.com>
+
+	Fix some deprecated functions:
+	* src/gnome-utils/gnc-gnome-utils.c:
+	  gnome_pixmap_new_from_file -> gtk_image_new_from_file
+	* src/business/business-gnome/dialog-date-close.c:
+	  gnome_pixmap_new_from_file -> gtk_image_new_from_file
+	  gnome_unconditional_pixmap_file -> gnome_program_locate_file
+	* src/business/business-gnome/dialog-invoice.c:
+	  gnome_unconditional_pixmap_file -> gnome_program_locate_file
+	  gnome_pixmap_load_file -> gtk_image_new_from_file
+
 2004-11-30  Derek Atkins  <derek at ihtfp.com>
 
 	* src/gnome-utils/Makefile.am:
Index: dialog-invoice.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-invoice.c,v
retrieving revision 1.81.4.11
retrieving revision 1.81.4.12
diff -Lsrc/business/business-gnome/dialog-invoice.c -Lsrc/business/business-gnome/dialog-invoice.c -u -r1.81.4.11 -r1.81.4.12
--- src/business/business-gnome/dialog-invoice.c
+++ src/business/business-gnome/dialog-invoice.c
@@ -255,9 +255,11 @@
 
   iw->reset_tax_tables = FALSE;
 
-  s = gnome_unconditional_pixmap_file("gnome-question.png");
+  s = gnome_program_locate_file (NULL,
+				 GNOME_FILE_DOMAIN_PIXMAP,
+				 "gnome-question.png", TRUE, NULL);
   if (s) {
-    gnome_pixmap_load_file(GNOME_PIXMAP(pixmap), s);
+    pixmap = gtk_image_new_from_file(s);
     g_free(s);
   }
 
Index: dialog-date-close.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-date-close.c,v
retrieving revision 1.15.4.4
retrieving revision 1.15.4.5
diff -Lsrc/business/business-gnome/dialog-date-close.c -Lsrc/business/business-gnome/dialog-date-close.c -u -r1.15.4.4 -r1.15.4.5
--- src/business/business-gnome/dialog-date-close.c
+++ src/business/business-gnome/dialog-date-close.c
@@ -115,9 +115,11 @@
   /* Make noises, basically */
   gnome_triggers_vdo(message, GNOME_MESSAGE_BOX_QUESTION, NULL);
 
-  s = gnome_unconditional_pixmap_file("gnome-question.png");
+  s = gnome_program_locate_file (NULL,
+				 GNOME_FILE_DOMAIN_PIXMAP,
+				 "gnome-question.png", TRUE, NULL);
   if (s) {
-    pixmap = gnome_pixmap_new_from_file(s);
+    pixmap = gtk_image_new_from_file(s);
     g_free(s);
   }
 
Index: gnc-gnome-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-gnome-utils.c,v
retrieving revision 1.2.4.5
retrieving revision 1.2.4.6
diff -Lsrc/gnome-utils/gnc-gnome-utils.c -Lsrc/gnome-utils/gnc-gnome-utils.c -u -r1.2.4.5 -r1.2.4.6
--- src/gnome-utils/gnc-gnome-utils.c
+++ src/gnome-utils/gnc-gnome-utils.c
@@ -202,10 +202,10 @@
 
 /********************************************************************\
  * gnc_gnome_get_pixmap                                             *
- *   returns a GnomePixmap widget given a pixmap filename           *
+ *   returns a GtkWidget given a pixmap filename                    *
  *                                                                  *
  * Args: none                                                       *
- * Returns: GnomePixmap widget or NULL if there was a problem       *
+ * Returns: GtkWidget or NULL if there was a problem                *
  \*******************************************************************/
 GtkWidget *
 gnc_gnome_get_pixmap (const char *name)
@@ -220,7 +220,8 @@
     return NULL;
 
   DEBUG ("Loading pixmap file %s", fullname);
-  pixmap = gnome_pixmap_new_from_file (fullname);
+
+  pixmap = gtk_image_new_from_file (fullname);
   if (pixmap == NULL) {
     PERR ("Could not load pixmap");
   }


More information about the gnucash-changes mailing list