[maemo-commits] [maemo-commits] r13904 - in projects/haf/trunk/hildon-fm: . debian hildon-fm
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Sep 18 19:23:05 EEST 2007
- Previous message: [maemo-commits] r13903 - in projects/haf/trunk/gtk+: . gtk
- Next message: [maemo-commits] r13905 - projects/haf/trunk/hildon-fm/hildon-fm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: marivoll Date: 2007-09-18 19:23:03 +0300 (Tue, 18 Sep 2007) New Revision: 13904 Modified: projects/haf/trunk/hildon-fm/ChangeLog projects/haf/trunk/hildon-fm/debian/changelog projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c Log: * hildon-fm/hildon-file-system-model.c (hildon_file_system_model_load_path): Do not rewrite "upnpav:///" into "upnpav://". (The model node uses "upnpav:///", but the special location uses "upnpav://" but since the upnp node is permanent we can always find it via the model node.) (N63339). Modified: projects/haf/trunk/hildon-fm/ChangeLog =================================================================== --- projects/haf/trunk/hildon-fm/ChangeLog 2007-09-18 15:33:50 UTC (rev 13903) +++ projects/haf/trunk/hildon-fm/ChangeLog 2007-09-18 16:23:03 UTC (rev 13904) @@ -1,3 +1,11 @@ +2007-09-18 Marius Vollmer <marius.vollmer at nokia.com> + + * hildon-fm/hildon-file-system-model.c + (hildon_file_system_model_load_path): Do not rewrite "upnpav:///" + into "upnpav://". (The model node uses "upnpav:///", but the + special location uses "upnpav://" but since the upnp node is + permanent we can always find it via the model node.) (N63339). + 2007-09-17 Marius Vollmer <marius.vollmer at nokia.com> Released 1.9.39 Modified: projects/haf/trunk/hildon-fm/debian/changelog =================================================================== --- projects/haf/trunk/hildon-fm/debian/changelog 2007-09-18 15:33:50 UTC (rev 13903) +++ projects/haf/trunk/hildon-fm/debian/changelog 2007-09-18 16:23:03 UTC (rev 13904) @@ -1,6 +1,6 @@ libhildonfm (1:1.9.40~unreleased) unstable; urgency=low - * + * Fixes: NB#63339. -- Marius Vollmer <marius.vollmer at nokia.com> Mon, 17 Sep 2007 23:13:51 +0300 Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c =================================================================== --- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c 2007-09-18 15:33:50 UTC (rev 13903) +++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c 2007-09-18 16:23:03 UTC (rev 13904) @@ -2405,6 +2405,8 @@ if (path) { ULOG_INFO("BASE LOCATION: %s", location->basepath); + + DBG ("BASE %s PATH %s\n", location->basepath, (char *)path); model_node = g_new0(HildonFileSystemModelNode, 1); model_node->model = self; @@ -2759,7 +2761,6 @@ const GtkFilePath * path, GtkTreeIter * iter) { - const GtkFilePath *real_path; GtkFilePath *parent_path; GtkTreeIter parent_iter; @@ -2769,16 +2770,8 @@ DBG ("LOAD %s\n", (char *)path); - /* XXX - if we are trying to load "upnpav:///", we change it to - "upnpav://", since upnpav:/// will not be found. Urks. - */ - if (strcmp (gtk_file_path_get_string (path), "upnpav:///") == 0) - real_path = gtk_file_path_new_steal ("upnpav://"); - else - real_path = (GtkFilePath *)path; - /* Let's see if given path is already in the tree */ - if (hildon_file_system_model_search_path(model, real_path, iter, + if (hildon_file_system_model_search_path(model, path, iter, NULL, TRUE)) { /* In case of gateway, we may need this to allow accessing contents */ @@ -2787,10 +2780,12 @@ return TRUE; } + DBG ("NOT FOUND %s\n", (char *)path); + /* No, path was not found. Let's try go one level up and loading more contents */ if (!gtk_file_system_get_parent (model->priv->filesystem, - real_path, &parent_path, NULL) + path, &parent_path, NULL) || parent_path == NULL) { /* Let's check a special case: We want remote servers to report @@ -2800,14 +2795,18 @@ const gchar *s; gint i; - s = gtk_file_path_get_string(real_path); + s = gtk_file_path_get_string(path); i = strlen(s) - 1; + DBG ("SPECIAL CASE %s\n", s); + /* Skip tailing slashes */ while (i >= 0 && s[i] == G_DIR_SEPARATOR) i--; /* Skip characters backwards until we encounter next slash */ while (i >= 0 && s[i] != G_DIR_SEPARATOR) i--; + DBG ("SPECIAL CASE I %d\n", i); + if (i >= 0) parent_path = gtk_file_path_new_steal(g_strndup(s, i + 1)); else { @@ -2836,7 +2835,7 @@ can now expect it to be there. */ - if (hildon_file_system_model_search_path (model, real_path, iter, + if (hildon_file_system_model_search_path (model, path, iter, NULL, TRUE)) { DBG ("FOUND %s\n", (char *)path);
- Previous message: [maemo-commits] r13903 - in projects/haf/trunk/gtk+: . gtk
- Next message: [maemo-commits] r13905 - projects/haf/trunk/hildon-fm/hildon-fm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]