[grilo-plugins] dmap: Use #define for constants
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] dmap: Use #define for constants
- Date: Fri, 7 Feb 2014 08:17:44 +0000 (UTC)
commit 213731623d32abb7d94d7d15e4ccb0a7bf59ac63
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Thu Feb 6 19:36:09 2014 +0100
dmap: Use #define for constants
https://bugzilla.gnome.org/show_bug.cgi?id=723574
src/dmap/simple-dmap-db.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/dmap/simple-dmap-db.c b/src/dmap/simple-dmap-db.c
index 2be026f..64727fd 100644
--- a/src/dmap/simple-dmap-db.c
+++ b/src/dmap/simple-dmap-db.c
@@ -58,14 +58,14 @@
#include "simple-dmap-db.h"
+#define ALBUMS_ID "albums"
+#define ALBUMS_NAME _("Albums")
+#define ARTISTS_ID "artists"
+#define ARTISTS_NAME _("Artists")
+
/* Media ID's start at max and go down. Container ID's start at 1 and go up. */
static guint nextid = G_MAXINT; /* NOTE: this should be G_MAXUINT, but iPhoto can't handle it. */
-static const gchar *ALBUMS_ID = "albums";
-static const gchar *ALBUMS_NAME = "Albums";
-static const gchar *ARTISTS_ID = "artists";
-static const gchar *ARTISTS_NAME = "Artists";
-
struct SimpleDMAPDbPrivate {
GrlMediaBox *albums_box; // Contains each album box (tracked with albums hash table).
GrlMediaBox *artists_box; // Contains each artist box (tracked with artist hash table).
@@ -377,10 +377,10 @@ simple_dmap_db_init (SimpleDMAPDb *db)
db->priv->artists_box = g_object_new (GRL_TYPE_MEDIA_BOX, NULL);
grl_media_set_id (GRL_MEDIA (db->priv->albums_box), ALBUMS_ID);
- grl_media_set_title (GRL_MEDIA (db->priv->albums_box), _(ALBUMS_NAME));
+ grl_media_set_title (GRL_MEDIA (db->priv->albums_box), ALBUMS_NAME);
grl_media_set_id (GRL_MEDIA (db->priv->artists_box), ARTISTS_ID);
- grl_media_set_title (GRL_MEDIA (db->priv->artists_box), _(ARTISTS_NAME));
+ grl_media_set_title (GRL_MEDIA (db->priv->artists_box), ARTISTS_NAME);
db->priv->root = g_hash_table_new_full (box_hash, box_equal, g_object_unref, (GDestroyNotify)
g_hash_table_destroy);
db->priv->albums = g_hash_table_new_full (box_hash, box_equal, g_object_unref, (GDestroyNotify)
g_hash_table_destroy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]