From: Christophe F. <te...@us...> - 2010-12-28 12:29:30
|
commit a39dd89d4b9190db05b6fa230159ce71b5f62f0f Author: Christophe Fergeau <te...@gn...> Date: Thu Sep 30 19:26:09 2010 +0200 attempt to bring sanity in shuffle generations libgpod has been naming the 2.5g iPod Shuffle (which is physically identical to the 2g iPod Shuffle) a 3rd generation iPod Shuffle while for the rest of the world, the 3rd generation iPod Shuffle is the button-less bar with voice-over. Change libgpod to use the same convention as the rest of the world, it's a little bit less accurate since now the 2g and 2.5g models can't be differentiated, but the less confusing naming should be better in the long run. It's also technically an ABI breakage, but I don't think anyone relies at all on the generation for an iPod model not changing. src/itdb_device.c | 80 +++++++++++++++++++++++----------------------- tools/generic-callout.c | 6 +-- 2 files changed, 42 insertions(+), 44 deletions(-) --- diff --git a/src/itdb_device.c b/src/itdb_device.c index fd256b4..a6626b5 100644 --- a/src/itdb_device.c +++ b/src/itdb_device.c @@ -111,10 +111,10 @@ static const Itdb_IpodInfo ipod_info_table [] = { {"9830", 60, ITDB_IPOD_MODEL_COLOR, ITDB_IPOD_GENERATION_PHOTO, 50}, {"9586", 60, ITDB_IPOD_MODEL_COLOR, ITDB_IPOD_GENERATION_PHOTO, 50}, - /* Shuffle / Fourth Generation */ + /* Shuffle / First Generation */ {"9724", 0.5,ITDB_IPOD_MODEL_SHUFFLE, ITDB_IPOD_GENERATION_SHUFFLE_1, 3}, {"9725", 1, ITDB_IPOD_MODEL_SHUFFLE, ITDB_IPOD_GENERATION_SHUFFLE_1, 3}, - /* Shuffle / Sixth Generation */ + /* Shuffle / Second Generation */ /* Square, connected to computer via cable */ {"A546", 1, ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, {"A947", 1, ITDB_IPOD_MODEL_SHUFFLE_PINK, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, @@ -122,34 +122,34 @@ static const Itdb_IpodInfo ipod_info_table [] = { {"A951", 1, ITDB_IPOD_MODEL_SHUFFLE_GREEN, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, {"A953", 1, ITDB_IPOD_MODEL_SHUFFLE_ORANGE, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, {"C167", 1, ITDB_IPOD_MODEL_SHUFFLE_GOLD, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, - /* Shuffle / Seventh Generation */ - /* Square, connected to computer via cable -- look identicaly to - * Sixth Generation*/ - {"B225", 1, ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, - {"B233", 1, ITDB_IPOD_MODEL_SHUFFLE_PURPLE, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, - {"B231", 1, ITDB_IPOD_MODEL_SHUFFLE_RED, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, - {"B227", 1, ITDB_IPOD_MODEL_SHUFFLE_BLUE, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, - {"B228", 1, ITDB_IPOD_MODEL_SHUFFLE_BLUE, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, - {"B229", 1, ITDB_IPOD_MODEL_SHUFFLE_GREEN, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, - {"B518", 2, ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, - {"B520", 2, ITDB_IPOD_MODEL_SHUFFLE_BLUE, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, - {"B522", 2, ITDB_IPOD_MODEL_SHUFFLE_GREEN, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, - {"B524", 2, ITDB_IPOD_MODEL_SHUFFLE_RED, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, - {"B526", 2, ITDB_IPOD_MODEL_SHUFFLE_PURPLE, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, - - /* Shuffle / Eigth Generation */ + /* Shuffle / Second Generation, reloaded, some kind of 2.5 generation */ + /* Square, connected to computer via cable -- look identical to + * Second Generation*/ + {"B225", 1, ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, + {"B233", 1, ITDB_IPOD_MODEL_SHUFFLE_PURPLE, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, + {"B231", 1, ITDB_IPOD_MODEL_SHUFFLE_RED, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, + {"B227", 1, ITDB_IPOD_MODEL_SHUFFLE_BLUE, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, + {"B228", 1, ITDB_IPOD_MODEL_SHUFFLE_BLUE, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, + {"B229", 1, ITDB_IPOD_MODEL_SHUFFLE_GREEN, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, + {"B518", 2, ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, + {"B520", 2, ITDB_IPOD_MODEL_SHUFFLE_BLUE, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, + {"B522", 2, ITDB_IPOD_MODEL_SHUFFLE_GREEN, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, + {"B524", 2, ITDB_IPOD_MODEL_SHUFFLE_RED, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, + {"B526", 2, ITDB_IPOD_MODEL_SHUFFLE_PURPLE, ITDB_IPOD_GENERATION_SHUFFLE_2, 3}, + + /* Shuffle / Third Generation */ /* Bar, button-less, speaking */ - {"C306", 2, ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_4, 3}, - {"C323", 2, ITDB_IPOD_MODEL_SHUFFLE_BLACK, ITDB_IPOD_GENERATION_SHUFFLE_4, 3}, - {"C381", 2, ITDB_IPOD_MODEL_SHUFFLE_GREEN, ITDB_IPOD_GENERATION_SHUFFLE_4, 3}, - {"C384", 2, ITDB_IPOD_MODEL_SHUFFLE_BLUE, ITDB_IPOD_GENERATION_SHUFFLE_4, 3}, - {"C387", 2, ITDB_IPOD_MODEL_SHUFFLE_PINK, ITDB_IPOD_GENERATION_SHUFFLE_4, 3}, - {"B867", 4, ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_4, 3}, - {"C164", 4, ITDB_IPOD_MODEL_SHUFFLE_BLACK, ITDB_IPOD_GENERATION_SHUFFLE_4, 3}, - {"C303", 4, ITDB_IPOD_MODEL_SHUFFLE_STAINLESS, ITDB_IPOD_GENERATION_SHUFFLE_4, 3}, - {"C307", 4, ITDB_IPOD_MODEL_SHUFFLE_GREEN, ITDB_IPOD_GENERATION_SHUFFLE_4, 3}, - {"C328", 4, ITDB_IPOD_MODEL_SHUFFLE_BLUE, ITDB_IPOD_GENERATION_SHUFFLE_4, 3}, - {"C331", 4, ITDB_IPOD_MODEL_SHUFFLE_PINK, ITDB_IPOD_GENERATION_SHUFFLE_4, 3}, + {"C306", 2, ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, + {"C323", 2, ITDB_IPOD_MODEL_SHUFFLE_BLACK, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, + {"C381", 2, ITDB_IPOD_MODEL_SHUFFLE_GREEN, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, + {"C384", 2, ITDB_IPOD_MODEL_SHUFFLE_BLUE, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, + {"C387", 2, ITDB_IPOD_MODEL_SHUFFLE_PINK, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, + {"B867", 4, ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, + {"C164", 4, ITDB_IPOD_MODEL_SHUFFLE_BLACK, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, + {"C303", 4, ITDB_IPOD_MODEL_SHUFFLE_STAINLESS, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, + {"C307", 4, ITDB_IPOD_MODEL_SHUFFLE_GREEN, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, + {"C328", 4, ITDB_IPOD_MODEL_SHUFFLE_BLUE, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, + {"C331", 4, ITDB_IPOD_MODEL_SHUFFLE_PINK, ITDB_IPOD_GENERATION_SHUFFLE_3, 3}, /* Nano / Fifth Generation (first nano generation) */ /* Buttons are integrated into the "touch wheel". */ @@ -823,17 +823,17 @@ static const ItdbSerialToModel serial_to_model_mapping[] = { { "CMP", "C526" }, /* 16GB Silver Nano 6g */ { "DW9", "C699" }, /* 16GB Red Nano 6g */ - { "A1S", "C306" }, /* 2GB Silver Shuffle 4g */ - { "A78", "C323" }, /* 2GB Black Shuffle 4g */ - { "ALB", "C381" }, /* 2GB Green Shuffle 4g */ - { "ALD", "C384" }, /* 2GB Blue Shuffle 4g */ - { "ALG", "C387" }, /* 2GB Pink Shuffle 4g */ - { "4NZ", "B867" }, /* 4GB Silver Shuffle 4g */ - { "891", "C164" }, /* 4GB Black Shuffle 4g */ - { "A1L", "C303" }, /* 4GB Stainless Shuffle 4g */ - { "A1U", "C307" }, /* 4GB Green Shuffle 4g */ - { "A7B", "C328" }, /* 4GB Blue Shuffle 4g */ - { "A7D", "C331" }, /* 4GB Pink Shuffle 4g */ + { "A1S", "C306" }, /* 2GB Silver Shuffle 3g */ + { "A78", "C323" }, /* 2GB Black Shuffle 3g */ + { "ALB", "C381" }, /* 2GB Green Shuffle 3g */ + { "ALD", "C384" }, /* 2GB Blue Shuffle 3g */ + { "ALG", "C387" }, /* 2GB Pink Shuffle 3g */ + { "4NZ", "B867" }, /* 4GB Silver Shuffle 3g */ + { "891", "C164" }, /* 4GB Black Shuffle 3g */ + { "A1L", "C303" }, /* 4GB Stainless Shuffle 3g */ + { "A1U", "C307" }, /* 4GB Green Shuffle 3g */ + { "A7B", "C328" }, /* 4GB Blue Shuffle 3g */ + { "A7D", "C331" }, /* 4GB Pink Shuffle 3g */ { "W4N", "A623" }, /* 8GB Silver iPod Touch (1st gen) */ { "W4T", "A627" }, /* 16GB Silver iPod Touch (1st gen) */ diff --git a/tools/generic-callout.c b/tools/generic-callout.c index d49d01f..1408132 100644 --- a/tools/generic-callout.c +++ b/tools/generic-callout.c @@ -338,10 +338,11 @@ get_icon_name (const Itdb_IpodInfo *info) } case ITDB_IPOD_GENERATION_SHUFFLE_1: + case ITDB_IPOD_GENERATION_SHUFFLE_3: return g_strconcat (prefix, "ipod-shuffle", NULL); case ITDB_IPOD_GENERATION_SHUFFLE_2: - case ITDB_IPOD_GENERATION_SHUFFLE_3: + case ITDB_IPOD_GENERATION_SHUFFLE_4: switch (info->ipod_model) { case ITDB_IPOD_MODEL_SHUFFLE_SILVER: return g_strconcat (prefix, "ipod-shuffle-clip-silver", NULL); @@ -361,9 +362,6 @@ get_icon_name (const Itdb_IpodInfo *info) g_assert_not_reached (); } - case ITDB_IPOD_GENERATION_SHUFFLE_4: - return g_strconcat (prefix, "ipod-shuffle", NULL); - case ITDB_IPOD_GENERATION_NANO_1: if (info->ipod_model == ITDB_IPOD_MODEL_NANO_BLACK) { return g_strconcat (prefix, "ipod-nano-black", NULL); |