gnome-games r8259 - in trunk: iagno libgames-support



Author: thomashpa
Date: Wed Nov  5 00:36:19 2008
New Revision: 8259
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8259&view=rev

Log:
Change games-files api to take const char as dirname

Modified:
   trunk/iagno/properties.c
   trunk/libgames-support/games-files.c
   trunk/libgames-support/games-files.h

Modified: trunk/iagno/properties.c
==============================================================================
--- trunk/iagno/properties.c	(original)
+++ trunk/iagno/properties.c	Wed Nov  5 00:36:19 2008
@@ -366,13 +366,12 @@
 static GtkWidget *
 fill_menu (void)
 {
-  char *dir;
+  const char *dir;
 
   /* FIXME: we need to check that both dname is valid and that
    * games_file_list_new_images returns something. */
 
-  dir = g_strdup (games_runtime_get_directory (
-                    GAMES_RUNTIME_GAME_PIXMAP_DIRECTORY));
+  dir = games_runtime_get_directory (GAMES_RUNTIME_GAME_PIXMAP_DIRECTORY);
 
   if (theme_file_list)
     g_object_unref (theme_file_list);
@@ -381,8 +380,6 @@
 
   games_file_list_transform_basename (theme_file_list);
  
-  g_free (dir);
-
   return games_file_list_create_widget (theme_file_list, tile_set,
 					GAMES_FILE_LIST_REMOVE_EXTENSION |
 					GAMES_FILE_LIST_REPLACE_UNDERSCORES);

Modified: trunk/libgames-support/games-files.c
==============================================================================
--- trunk/libgames-support/games-files.c	(original)
+++ trunk/libgames-support/games-files.c	Wed Nov  5 00:36:19 2008
@@ -206,7 +206,7 @@
 }
 
 static GList *
-games_file_list_new_images_single (gchar * directory)
+games_file_list_new_images_single (const gchar * directory)
 {
   GDir *dir;
   GList *list = NULL;
@@ -254,7 +254,7 @@
  * Return value: A new GamesFileList containing the list of image files.
  **/
 GamesFileList *
-games_file_list_new_images (gchar * path1, ...)
+games_file_list_new_images (const gchar * path1, ...)
 {
   GamesFileList *filelist;
   GList *list;

Modified: trunk/libgames-support/games-files.h
==============================================================================
--- trunk/libgames-support/games-files.h	(original)
+++ trunk/libgames-support/games-files.h	Wed Nov  5 00:36:19 2008
@@ -45,7 +45,7 @@
 GamesFileList *
 games_file_list_new (const gchar * glob, ...)
   G_GNUC_NULL_TERMINATED;
-     GamesFileList *games_file_list_new_images (gchar * path1,
+     GamesFileList *games_file_list_new_images (const gchar * path1,
 						...) G_GNUC_NULL_TERMINATED;
 
      void games_file_list_transform_basename (GamesFileList * list);



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