[maemo-commits] [maemo-commits] r13009 - in projects/haf/trunk/hildon-fm: . debian hildon-fm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Aug 2 22:28:43 EEST 2007
Author: marivoll
Date: 2007-08-02 22:28:40 +0300 (Thu, 02 Aug 2007)
New Revision: 13009

Modified:
   projects/haf/trunk/hildon-fm/ChangeLog
   projects/haf/trunk/hildon-fm/debian/changelog
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-chooser-dialog.c
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-common-private.h
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-details-dialog.c
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-selection.c
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-remote-device.c
Log:
	* hildon-fm/hildon-file-chooser-dialog.c
	(hildon_file_chooser_dialog_set_property): Update CSM menu items
	when selection mode changes (N58786).
	(check_for_location_update): New.
	(hildon_file_chooser_dialog_constructor): Connect it (N59520).

	* hildon-fm/hildon-file-common-private.h
	(SORT_WEIGHT_REMOTE_DEVICE): New.
        * hildon-fm/hildon-file-system-remote-device.c: Use it to show
	remote devices together and below MMC cards (N61730).

	* hildon-fm/hildon-file-details-dialog.c
	(hildon_file_details_dialog_init): Set width of dialog to 400
	pixels, enable horizontal scrolling and disable ellipsization
	(N53155).
	
	* hildon-fm/hildon-file-selection.c
	(hildon_file_selection_close_load_banner): Set cursor to first row
	also when user hasn't touched the list yet (N52827).


Modified: projects/haf/trunk/hildon-fm/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-fm/ChangeLog	2007-08-02 17:11:49 UTC (rev 13008)
+++ projects/haf/trunk/hildon-fm/ChangeLog	2007-08-02 19:28:40 UTC (rev 13009)
@@ -1,3 +1,41 @@
+2007-08-02  Marius Vollmer  <marius.vollmer at nokia.com>
+
+	* hildon-fm/hildon-file-chooser-dialog.c
+	(hildon_file_chooser_dialog_set_property): Update CSM menu items
+	when selection mode changes (N58786).
+	(check_for_location_update): New.
+	(hildon_file_chooser_dialog_constructor): Connect it (N59520).
+
+	* hildon-fm/hildon-file-common-private.h
+	(SORT_WEIGHT_REMOTE_DEVICE): New.
+        * hildon-fm/hildon-file-system-remote-device.c: Use it to show
+	remote devices together and below MMC cards (N61730).
+
+	* hildon-fm/hildon-file-details-dialog.c
+	(hildon_file_details_dialog_init): Set width of dialog to 400
+	pixels, enable horizontal scrolling and disable ellipsization
+	(N53155).
+	
+	* hildon-fm/hildon-file-selection.c
+	(hildon_file_selection_close_load_banner): Set cursor to first row
+	also when user hasn't touched the list yet (N52827).
+
+	* hildon-fm/hildon-file-system-model.c: Removed machinery for
+	delaying node adding and reloads.  The GtkFilesystem API is now
+	sufficiently asynchronous to make our own trick unnecessary.
+	(hildon_file_system_model_load_uri): Wait for scan of root folder
+	to be complete (N62546, N62972).
+	(hildon_file_system_model_load_path): Wait for the parent to be
+	fully loaded and then expect to find the path instead of just
+	adding a 'ghost' node.
+
+	* hildon-fm/hildon-file-system-smb.c (struct _MyFileFolder): Added
+	n_children_waiting.
+	(my_file_folder_child_files_added,
+	my_file_folder_root_files_added): Maintain it.
+	(my_file_folder_is_finished_loading): Return FALSE as long as
+	there are still child folders outstanding.
+	
 2007-07-31  Marius Vollmer  <marius.vollmer at nokia.com>
 
 	* hildon-fm/hildon-file-details-dialog.c

Modified: projects/haf/trunk/hildon-fm/debian/changelog
===================================================================
--- projects/haf/trunk/hildon-fm/debian/changelog	2007-08-02 17:11:49 UTC (rev 13008)
+++ projects/haf/trunk/hildon-fm/debian/changelog	2007-08-02 19:28:40 UTC (rev 13009)
@@ -1,6 +1,10 @@
 libhildonfm (1:1.9.37~unreleased) unstable; urgency=low
 
-  * Fixes: NB#62101, NB#52599.
+  * Removed most of the video game character of folder listing by relying
+    on the asynchronous GtkFilesystem API instead of doing our own magic.
+  * Fixes: NB#62101, NB#52599, NB#62546, NB#62972, NB#55972, NB#60272.
+    Fixes: NB#64004, NB#64453, NB#52827, NB#53155, NB61730, NB#58786.
+    Fixes: NB#59520.
 
  -- Marius Vollmer <marius.vollmer at nokia.com>  Mon, 30 Jul 2007 20:09:58 +0300
 

Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-chooser-dialog.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-chooser-dialog.c	2007-08-02 17:11:49 UTC (rev 13008)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-chooser-dialog.c	2007-08-02 19:28:40 UTC (rev 13009)
@@ -647,6 +647,40 @@
     hildon_file_chooser_dialog_do_autonaming(priv);
 }
 
+/* If a row changes in the model, we check if the location label
+   should be updated */
+
+static void
+check_for_location_update (GtkTreeModel *model,
+			   GtkTreePath *path,
+			   GtkTreeIter *iter,
+			   gpointer data)
+{
+  HildonFileChooserDialogPrivate *priv = data;
+  GtkTreeIter current_iter;
+  GtkTreePath *current_path = NULL;	
+  
+  if (!priv)
+    return;
+  
+  if (!path)
+    return;
+  
+  if (!model)
+    return;
+  
+  if (priv->filetree && HILDON_IS_FILE_SELECTION (priv->filetree)) 
+    {
+      hildon_file_selection_get_current_folder_iter (priv->filetree,
+						     &current_iter);
+      current_path = gtk_tree_model_get_path (model, &current_iter);
+    }
+  
+  if (current_path
+      && gtk_tree_path_compare (path, current_path) == 0) 
+    hildon_file_chooser_dialog_update_location_info(priv);
+}
+
 static gboolean
 hildon_file_chooser_dialog_set_current_folder(GtkFileChooser * chooser,
                                               const GtkFilePath * path,
@@ -1491,6 +1525,12 @@
       g_assert(HILDON_IS_FILE_SELECTION(priv->filetree));
       hildon_file_selection_set_mode(priv->filetree,
                                      g_value_get_enum (value));
+      if (g_value_get_enum (value) == HILDON_FILE_SELECTION_MODE_LIST)
+    	gtk_check_menu_item_set_active
+	  (GTK_CHECK_MENU_ITEM(priv->mode_list), TRUE);
+      else
+    	gtk_check_menu_item_set_active
+	  (GTK_CHECK_MENU_ITEM(priv->mode_thumbnails), TRUE);
       break;
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
@@ -2036,6 +2076,8 @@
     g_signal_connect_object(priv->model, "finished-loading",
                      G_CALLBACK(hildon_file_chooser_dialog_finished_loading),
                      obj, 0);
+    g_signal_connect (G_OBJECT (priv->model), "row-changed", 
+		      G_CALLBACK (check_for_location_update), priv);
 
     gtk_dialog_set_has_separator(GTK_DIALOG(obj), FALSE);
     hildon_file_chooser_dialog_set_limit(HILDON_FILE_CHOOSER_DIALOG(obj));

Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-common-private.h
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-common-private.h	2007-08-02 17:11:49 UTC (rev 13008)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-common-private.h	2007-08-02 19:28:40 UTC (rev 13009)
@@ -54,6 +54,7 @@
 #define SORT_WEIGHT_DEVICE -5
 #define SORT_WEIGHT_INTERNAL_MMC -8
 #define SORT_WEIGHT_EXTERNAL_MMC -7
+#define SORT_WEIGHT_REMOTE_DEVICE -4
 
 /* An easy way to add tracing to functions, used while debugging */
 #if 0

Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-details-dialog.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-details-dialog.c	2007-08-02 17:11:49 UTC (rev 13008)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-details-dialog.c	2007-08-02 19:28:40 UTC (rev 13009)
@@ -358,9 +358,10 @@
 
     priv->file_device = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
     priv->file_location = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
-    gtk_label_set_ellipsize(GTK_LABEL(priv->file_location), PANGO_ELLIPSIZE_END);
+    gtk_label_set_ellipsize(GTK_LABEL(priv->file_location), 
+			    PANGO_ELLIPSIZE_NONE);
     priv->file_name = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
-    gtk_label_set_ellipsize(GTK_LABEL(priv->file_name), PANGO_ELLIPSIZE_END);
+    gtk_label_set_ellipsize(GTK_LABEL(priv->file_name), PANGO_ELLIPSIZE_NONE);
     priv->file_type = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
     priv->file_size = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
     priv->file_date = g_object_new(GTK_TYPE_LABEL,"xalign", 0.0f, NULL);
@@ -436,7 +437,7 @@
 
     gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scroll), vbox);
     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll),
-        GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+        GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
     gtk_container_set_border_width(GTK_CONTAINER(scroll),
         HILDON_MARGIN_DEFAULT);
     /* Both scrolled window and viewport have separate shadows... */
@@ -482,6 +483,8 @@
     priv->toggle_handler = g_signal_connect(priv->file_readonly, "toggled",
       G_CALLBACK(hildon_file_details_dialog_read_only_toggled),
       self);
+    
+    gtk_widget_set_usize (GTK_WIDGET (self), 400, -1);
 }
 
 static void

Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-selection.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-selection.c	2007-08-02 17:11:49 UTC (rev 13008)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-selection.c	2007-08-02 19:28:40 UTC (rev 13009)
@@ -1351,7 +1351,7 @@
         GtkTreePath *cursor_path;
 
         gtk_tree_view_get_cursor (GTK_TREE_VIEW (view), &cursor_path, NULL);
-        if (cursor_path == NULL)
+        if (cursor_path == NULL || priv->user_touched == FALSE)
           {
             GtkTreePath *path = gtk_tree_path_new_first ();
             gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path,

Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-remote-device.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-remote-device.c	2007-08-02 17:11:49 UTC (rev 13008)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-remote-device.c	2007-08-02 19:28:40 UTC (rev 13009)
@@ -73,9 +73,13 @@
 hildon_file_system_remote_device_init (HildonFileSystemRemoteDevice *device)
 {
     HildonFileSystemSettings *fs_settings;
+    HildonFileSystemSpecialLocation *location;
 
     fs_settings = _hildon_file_system_settings_get_instance ();
 
+    location = HILDON_FILE_SYSTEM_SPECIAL_LOCATION (device);
+    location->sort_weight = SORT_WEIGHT_REMOTE_DEVICE;
+
     g_object_get (fs_settings, "flight-mode", &device->accessible, NULL);
     device->accessible = !device->accessible;
 


More information about the maemo-commits mailing list