graveman-cvs
[Top][All Lists]
Advanced

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

[Graveman-cvs] Changes to graveman/current/src/support.c


From: sylvain cresto
Subject: [Graveman-cvs] Changes to graveman/current/src/support.c
Date: Tue, 19 Apr 2005 21:00:44 -0400

Index: graveman/current/src/support.c
diff -u graveman/current/src/support.c:1.9 graveman/current/src/support.c:1.10
--- graveman/current/src/support.c:1.9  Mon Apr  4 01:37:42 2005
+++ graveman/current/src/support.c      Wed Apr 20 01:00:31 2005
@@ -22,78 +22,10 @@
  *
  */
 
-/* ce code a été a la base generé par glade-2 ! */
-
 #include "graveman.h"
 
 static GdkCursor *_cursor = NULL;
 
-static GList *pixmaps_directories = NULL;
-
-/* Use this function to set the directory containing installed pixmaps. */
-void add_pixmap_directory (const gchar *Adirectory)
-{
-  pixmaps_directories = g_list_prepend (pixmaps_directories, g_strdup 
(Adirectory));
-}
-
-/* This is an internally used function to find pixmap files. */
-static gchar* find_pixmap_file (const gchar *Afilename)
-{
-  GList *Lelem;
-
-  /* We step through each of the pixmaps directory to find it. */
-  Lelem = pixmaps_directories;
-  while (Lelem)
-    {
-      gchar *Lpathname = g_strdup_printf ("%s%s%s", (gchar*)Lelem->data,
-                                         G_DIR_SEPARATOR_S, Afilename);
-      if (g_file_test (Lpathname, G_FILE_TEST_EXISTS))
-        return Lpathname;
-      g_free (Lpathname);
-      Lelem = Lelem->next;
-    }
-  return NULL;
-}
-
-/* This is an internally used function to create pixmaps. */
-GtkWidget* create_pixmap (const gchar *Afilename)
-{
-  gchar *Lpathname = NULL;
-  GtkWidget *Lpixmap;
-
-  if (!Afilename || !*Afilename) return gtk_image_new ();
-
-  if (!(Lpathname = find_pixmap_file (Afilename))) {
-    _WARN(_("Image not found: %s"), Afilename);
-    return gtk_image_new ();
-  }
-  Lpixmap = gtk_image_new_from_file (Lpathname);
-  g_free (Lpathname);
-  return Lpixmap;
-}
-
-/* This is an internally used function to create pixmaps. */
-GdkPixbuf* create_pixbuf (const gchar *Afilename)
-{
-  gchar *Lpathname = NULL;
-  GdkPixbuf *Lpixbuf;
-  GError *Lerror = NULL;
-  if (!Afilename || !*Afilename) return NULL;
-
-  if (!(Lpathname = find_pixmap_file (Afilename)))
-  {
-    _WARN(_("Image not found: %s"), Afilename);
-    return NULL;
-  }
-
-  if (!(Lpixbuf = gdk_pixbuf_new_from_file (Lpathname, &Lerror))) {
-    _WARN(_("Cannot load image: %s: %s"), Lpathname, Lerror->message);
-    g_error_free (Lerror);
-  }
-  g_free (Lpathname);
-  return Lpixbuf;
-}
-
 GtkWidget *glade_to_hash(GladeXML *Axml, GHashTable *Ahash, gchar *Akey)
 {
   GtkWidget *Lobj = glade_xml_get_widget(Axml, Akey);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]