Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv17822/src
Modified Files:
ipod_init.c
Log Message:
* src/ipod_init.c: gp_ipod_init() would 'forget' what model
the user selected earlier when setting up the iPod repository.
Index: ipod_init.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/ipod_init.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ipod_init.c 17 Sep 2006 07:14:07 -0000 1.7
+++ ipod_init.c 24 Nov 2006 11:31:52 -0000 1.8
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-09-17 16:11:25 jcs>
+/* Time-stamp: <2006-11-24 20:29:50 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -246,7 +246,6 @@
GtkEntry *entry;
gchar buf[PATH_MAX];
GtkComboBox *cb;
- const IpodInfo *info;
g_return_val_if_fail (itdb, FALSE);
@@ -277,10 +276,11 @@
/* If available set current model number, otherwise indicate that
none is available */
- info = itdb_device_get_ipod_info (ii->itdb->device);
- if (info && (info->ipod_generation != ITDB_IPOD_GENERATION_UNKNOWN))
+ model = get_itdb_prefs_string (itdb, KEY_IPOD_MODEL);
+ if (model)
{
- g_snprintf (buf, PATH_MAX, "x%s", info->model_number);
+ g_snprintf (buf, PATH_MAX, "%s", model);
+ g_free (model);
}
else
{
@@ -330,7 +330,8 @@
}
model = gtk_combo_box_get_active_text (
GTK_COMBO_BOX (GET_WIDGET (MODEL_COMBO)));
- if (strcmp (model, gettext(SELECT_OR_ENTER_YOUR_MODEL)) == 0)
+ if ((strcmp (model, gettext(SELECT_OR_ENTER_YOUR_MODEL)) == 0) ||
+ (strlen (model) == 0))
{ /* User didn't choose a model */
g_free (model);
model = NULL;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2