gnome-games r8463 - trunk/libgames-support
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8463 - trunk/libgames-support
- Date: Tue, 6 Jan 2009 18:19:25 +0000 (UTC)
Author: chpe
Date: Tue Jan 6 18:19:25 2009
New Revision: 8463
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8463&view=rev
Log:
Code cleanup.
Modified:
trunk/libgames-support/games-card-theme-fixed.c
trunk/libgames-support/games-card-theme-private.h
trunk/libgames-support/games-card-theme.c
Modified: trunk/libgames-support/games-card-theme-fixed.c
==============================================================================
--- trunk/libgames-support/games-card-theme-fixed.c (original)
+++ trunk/libgames-support/games-card-theme-fixed.c Tue Jan 6 18:19:25 2009
@@ -207,6 +207,7 @@
size = fit_size;
if (size.width > 0 && size.height > 0) {
+ char *theme_basename;
char sizestr[16];
if (size.width == theme->card_size.width &&
@@ -215,9 +216,13 @@
g_free (theme->themesizepath);
+ theme_basename = g_strdup (theme_info->filename);
+ *(strchr (theme_basename, '.')) = '\0';
g_snprintf (sizestr, sizeof (sizestr), "%d", size.width);
- theme->themesizepath =
- g_build_filename (theme_info->path, theme_info->theme_name, sizestr, NULL);
+ theme->themesizepath = g_build_filename (theme_info->path,
+ theme_basename,
+ sizestr, NULL);
+ g_free (theme_basename);
theme->size_available = TRUE;
theme->card_size = size;
Modified: trunk/libgames-support/games-card-theme-private.h
==============================================================================
--- trunk/libgames-support/games-card-theme-private.h (original)
+++ trunk/libgames-support/games-card-theme-private.h Tue Jan 6 18:19:25 2009
@@ -26,7 +26,6 @@
GType type;
char *path;
char *filename;
- char *theme_name; /* filename without extension, FIXMEchpe */
char *display_name;
gpointer data;
Modified: trunk/libgames-support/games-card-theme.c
==============================================================================
--- trunk/libgames-support/games-card-theme.c (original)
+++ trunk/libgames-support/games-card-theme.c Tue Jan 6 18:19:25 2009
@@ -659,7 +659,6 @@
info->type = type;
info->path = g_strdup (path);
info->filename = g_strdup (filename);
- { char *p; info->theme_name = g_strdup (filename); p = strrchr (info->theme_name, '.'); if (p) *p = '\0'; }
info->display_name = g_strdup (display_name);
info->data = data;
info->destroy_notify = destroy_notify;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]