A patch to let libgnomeui compile with the new gtkrc changes



AS I have read, I think that the gtk_rc_set_image_loader function has
been removed because gtk now includes gdk-pixbuf, then we could remove
it from libgnomeui without any changes. It's only a supposition, please,
could you confirm me it?


Thanks.

We need other change to let libgnomeui compile, the gtk_rc_init function
has been changed to be private so we can use it, I don't know how to
solve it correctly, the fastest solution is /s/gtk_rc_init/_gtk_rc_init
at gnome-init.c file. Ideas?


Bye

-- 
Carlos Perelló Marín
mailto:carlos gnome-db org
mailto:carlos hispalinux es
http://www.gnome-db.org
http://www.Hispalinux.es
Valencia - Spain
? testgnome
Index: libgnomeui/ChangeLog
===================================================================
RCS file: /cvs/gnome/libgnomeui/libgnomeui/ChangeLog,v
retrieving revision 1.1597
diff -u -w -r1.1597 ChangeLog
--- libgnomeui/ChangeLog	2001/06/21 20:19:56	1.1597
+++ libgnomeui/ChangeLog	2001/06/24 21:07:58
@@ -1,3 +1,8 @@
+2001-06-24  Carlos Perelló Marín <carlos gnome-db org>
+
+	* gnome-init.c (libgnomeui_pixbuf_image_loader): Removed, it isn't
+	necessary now, It's at gtk+-2.0.
+
 2001-06-21  Jens Finke  <jens gnome org>
 
 	* libgnomeui.h: Don't include gnome-animator.h.
Index: libgnomeui/gnome-init.c
===================================================================
RCS file: /cvs/gnome/libgnomeui/libgnomeui/gnome-init.c,v
retrieving revision 1.142
diff -u -w -r1.142 gnome-init.c
--- libgnomeui/gnome-init.c	2001/06/13 18:51:36	1.142
+++ libgnomeui/gnome-init.c	2001/06/24 21:07:58
@@ -108,11 +108,6 @@
 static void libgnomeui_pre_args_parse(GnomeProgram *app, GnomeModuleInfo *mod_info);
 static void libgnomeui_post_args_parse(GnomeProgram *app, GnomeModuleInfo *mod_info);
 static void libgnomeui_rc_parse (gchar *command);
-static GdkPixmap *libgnomeui_pixbuf_image_loader(GdkWindow   *window,
-                                                 GdkColormap *colormap,
-                                                 GdkBitmap  **mask,
-                                                 GdkColor    *transparent_color,
-                                                 const char *filename);
 static void libgnomeui_segv_setup(gboolean post_arg_parse);
 
 static GnomeModuleRequirement libgnomeui_requirements[] = {
@@ -315,7 +310,6 @@
         GnomeProgramPrivate_libgnomeui *priv = g_new0(GnomeProgramPrivate_libgnomeui, 1);
 
         gnome_type_init();
-        gtk_rc_set_image_loader(libgnomeui_pixbuf_image_loader);
         libgnomeui_rc_parse(program_invocation_name);
 
         libgnomeui_segv_setup(TRUE);
@@ -425,43 +419,6 @@
 	}
 
 	gtk_rc_init ();
-}
-
-static GdkPixmap *
-libgnomeui_pixbuf_image_loader(GdkWindow   *window,
-                               GdkColormap *colormap,
-                               GdkBitmap  **maskp,
-                               GdkColor    *transparent_color,
-                               const char *filename)
-{
-	GdkPixmap *retval = NULL;
-        GdkBitmap *mask = NULL;
-        GdkPixbuf *pixbuf;
-        GError *error;
-
-        /* FIXME we are ignoring colormap and transparent color */
-        
-        error = NULL;
-        pixbuf = gdk_pixbuf_new_from_file(filename, &error);
-        if (error != NULL) {
-                g_warning (G_STRLOC ": cannot load %s: %s", filename,
-                           error->message);
-                g_error_free (error);
-        }
-
-        if (pixbuf == NULL)
-                return NULL;
-
-        gdk_pixbuf_render_pixmap_and_mask(pixbuf, &retval, &mask, 128);
-
-        gdk_pixbuf_unref(pixbuf);
-        
-        if (maskp)
-                *maskp = mask;
-        else
-                gdk_bitmap_unref(mask);
-
-        return retval;
 }
 
 /* crash handler */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]