[maemo-commits] [maemo-commits] r8745 - projects/haf/branches/hildon-fm/1.x/hildon-fm
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Dec 13 16:25:33 EET 2006
- Previous message: [maemo-commits] r8744 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r8746 - projects/haf/branches/hildon-fm/1.x
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: marivoll
Date: 2006-12-13 16:25:32 +0200 (Wed, 13 Dec 2006)
New Revision: 8745
Modified:
projects/haf/branches/hildon-fm/1.x/hildon-fm/hildon-file-chooser-dialog.c
Log:
* hildon-fm/hildon-file-chooser-dialog.c (set_stub_and_ext): Use
gtk_file_system_make_path instead of rolling our own to get URI
escaping right. Call set_entry so that the name entry is updated
when the knowledge about whether it is a folder or not changes.
but retain the value of 'edited' so that autonaming still works.
Modified: projects/haf/branches/hildon-fm/1.x/hildon-fm/hildon-file-chooser-dialog.c
===================================================================
--- projects/haf/branches/hildon-fm/1.x/hildon-fm/hildon-file-chooser-dialog.c 2006-12-13 14:02:21 UTC (rev 8744)
+++ projects/haf/branches/hildon-fm/1.x/hildon-fm/hildon-file-chooser-dialog.c 2006-12-13 14:25:32 UTC (rev 8745)
@@ -444,18 +444,21 @@
0, NULL);
if (cur_folder)
{
- GtkFilePath *path = gtk_file_path_new_steal
- (g_strdup_printf ("%s/%s",
- gtk_file_path_get_string (cur_folder_path),
- name));
- GtkFileInfo *info =
- gtk_file_folder_get_info (cur_folder, path, NULL);
- if (info)
+ GtkFilePath *path =
+ gtk_file_system_make_path (filesystem,
+ cur_folder_path,
+ name, NULL);
+ if (path)
{
- is_folder = gtk_file_info_get_is_folder (info);
- gtk_file_info_free (info);
+ GtkFileInfo *info =
+ gtk_file_folder_get_info (cur_folder, path, NULL);
+ if (info)
+ {
+ is_folder = gtk_file_info_get_is_folder (info);
+ gtk_file_info_free (info);
+ }
+ gtk_file_path_free (path);
}
- gtk_file_path_free (path);
g_object_unref (cur_folder);
}
gtk_file_path_free (cur_folder_path);
@@ -475,6 +478,15 @@
priv->ext_name = g_strdup(dot);
*dot = '\0';
}
+
+ {
+ /* We need to make sure not to mess with the 'edited' flag here
+ so that autonaming will still work.
+ */
+ gboolean old_edited = priv->edited;
+ set_entry (priv->entry_name, priv->stub_name, priv->ext_name);
+ priv->edited = old_edited;
+ }
}
static void
- Previous message: [maemo-commits] r8744 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r8746 - projects/haf/branches/hildon-fm/1.x
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
