[maemo-commits] [maemo-commits] r15877 - in projects/haf/branches/hildon-fm/fremantle: . debian hildon-fm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Aug 14 16:37:15 EEST 2008
Author: rabinovich
Date: 2008-08-14 16:37:13 +0300 (Thu, 14 Aug 2008)
New Revision: 15877

Modified:
   projects/haf/branches/hildon-fm/fremantle/ChangeLog
   projects/haf/branches/hildon-fm/fremantle/debian/changelog
   projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-details-dialog.c
   projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c
Log:
bug fixes for #85998 #84860 #84851

Modified: projects/haf/branches/hildon-fm/fremantle/ChangeLog
===================================================================
--- projects/haf/branches/hildon-fm/fremantle/ChangeLog	2008-08-14 12:07:51 UTC (rev 15876)
+++ projects/haf/branches/hildon-fm/fremantle/ChangeLog	2008-08-14 13:37:13 UTC (rev 15877)
@@ -1,3 +1,14 @@
+2008-08-14 Valentin Rabinovich <valentin.rabinovich at digia.com>
+	* hildon-fm/hildon-file-details-dialog.c 
+	(hildon_file_details_dialog_set_file_iter): check if the function is 
+	called again for the same file and return. (N85998)
+
+	* hildon-fm/hildon-file-details-dialog.c (change_state): when permission 
+	change fails show an infonote instead of an infobanner. (N84860)
+
+	* hildon-fm/hildon-file-selection.c(hildon_file_selection_selection_changed):
+	Unset cursor_goal_uri when selection is changed. (N84851)
+
 2008-08-14  Valentin Rabinovich <valentin.rabinovich at digia.com>
 	
 	Started a new branch for Fremantle development

Modified: projects/haf/branches/hildon-fm/fremantle/debian/changelog
===================================================================
--- projects/haf/branches/hildon-fm/fremantle/debian/changelog	2008-08-14 12:07:51 UTC (rev 15876)
+++ projects/haf/branches/hildon-fm/fremantle/debian/changelog	2008-08-14 13:37:13 UTC (rev 15877)
@@ -1,3 +1,14 @@
+libhildonfm (1:2.0.7) unreleased
+
+  * File details dialog - don't set iter twice for the same file. Fixes NB#85998.
+
+  * File details dialog - show infonote instead of infobanner when read-only flag 
+    couldn't be changed. Fixes NB#N84860.
+
+  * File selection - unset cursor_goal_uri when selection is changed. Fixes NB#84851.
+
+ -- Valentin Rabinovich <valentin.rabinovich at digia.com>  Mon, 16 Jun 2008 13:27:28 +0300
+
 libhildonfm (1:2.0.6) unstable; urgency=low
 
   [ Kimmo Hämäläinen ]

Modified: projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-details-dialog.c
===================================================================
--- projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-details-dialog.c	2008-08-14 12:07:51 UTC (rev 15876)
+++ projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-details-dialog.c	2008-08-14 13:37:13 UTC (rev 15877)
@@ -219,9 +219,15 @@
           GNOME_VFS_SET_FILE_INFO_PERMISSIONS);
     }
 
-    if (result != GNOME_VFS_OK)
-      hildon_banner_show_information (NULL, NULL,
-				      gnome_vfs_result_to_string (result));
+    if (result != GNOME_VFS_OK) {
+            GtkWidget *infnote;
+            infnote = hildon_note_new_information(GTK_WINDOW(self), gnome_vfs_result_to_string (result));
+            if (infnote) {
+                    gtk_widget_show(infnote);
+                    gtk_dialog_run((GtkDialog *) infnote);
+                    gtk_widget_destroy(infnote);
+            }
+    }
     
     gnome_vfs_file_info_unref(info);
     g_free(uri);
@@ -734,7 +740,7 @@
 void hildon_file_details_dialog_set_file_iter(HildonFileDetailsDialog *self, GtkTreeIter *iter)
 {
   GtkTreeModel *model;
-  GtkTreePath *path;
+  GtkTreePath *path, *path_old;
   GtkTreeIter temp_iter, parent_iter;
   gchar *name, *mime, *uri;
   const gchar *fmt;
@@ -750,12 +756,23 @@
   model = GTK_TREE_MODEL(self->priv->model);
 
   /* Save iterator to priv struct as row reference */
-  gtk_tree_row_reference_free(self->priv->active_file);
+  if (self->priv->active_file)
+          path_old = gtk_tree_row_reference_get_path(self->priv->active_file);
+  else
+          path_old = NULL;
   path = gtk_tree_model_get_path(model, iter);
   g_return_if_fail(path); // add some safety with logging here to clear up bug NB#51729, NB#52272, NB#52271
 
+  /* check if we are called for the same file again */
+  if (path_old && gtk_tree_path_compare(path, path_old) == 0) {
+          gtk_tree_path_free(path);
+          gtk_tree_path_free(path_old);
+          return;
+  }
+  gtk_tree_row_reference_free(self->priv->active_file);
   self->priv->active_file = gtk_tree_row_reference_new(model, path);
   gtk_tree_path_free(path);
+  gtk_tree_path_free(path_old);
 
   /* Setup the view */
   gtk_tree_model_get(model, iter,

Modified: projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c
===================================================================
--- projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c	2008-08-14 12:07:51 UTC (rev 15876)
+++ projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c	2008-08-14 13:37:13 UTC (rev 15877)
@@ -1569,6 +1569,9 @@
         g_assert(model == priv->dir_filter
           && GTK_IS_TREE_MODEL_FILTER(model));
 
+        g_free (priv->cursor_goal_uri);
+        priv->cursor_goal_uri = NULL;
+
         gtk_tree_model_filter_convert_iter_to_child_iter
             (GTK_TREE_MODEL_FILTER(priv->dir_filter), &sort_iter, &iter);
         gtk_tree_model_sort_convert_iter_to_child_iter(GTK_TREE_MODEL_SORT


More information about the maemo-commits mailing list