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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Dec 18 16:28:02 EET 2008
Author: rabinovich
Date: 2008-12-18 16:27:53 +0200 (Thu, 18 Dec 2008)
New Revision: 17002

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-selection.c
Log:
unset current_row when sort_model is destroyed


Modified: projects/haf/branches/hildon-fm/fremantle/ChangeLog
===================================================================
--- projects/haf/branches/hildon-fm/fremantle/ChangeLog	2008-12-18 09:42:50 UTC (rev 17001)
+++ projects/haf/branches/hildon-fm/fremantle/ChangeLog	2008-12-18 14:27:53 UTC (rev 17002)
@@ -1,3 +1,8 @@
+2008-12-18  Valentin Rabinovich <valentin.rabinovich at d\igia.com>
+
+	* hildon-fm/hildon-file-selection.c: unset current row when the sort
+	model is destroyed
+
 2008-12-16  Valentin Rabinovich <valentin.rabinovich at d\igia.com>
 	
 	* hildon-fm/hildon-file-selection.c, hildon-file-system-model.c:

Modified: projects/haf/branches/hildon-fm/fremantle/debian/changelog
===================================================================
--- projects/haf/branches/hildon-fm/fremantle/debian/changelog	2008-12-18 09:42:50 UTC (rev 17001)
+++ projects/haf/branches/hildon-fm/fremantle/debian/changelog	2008-12-18 14:27:53 UTC (rev 17002)
@@ -1,3 +1,9 @@
+libhildonfm (1:2.1.3-unreleased) unstable; urgency=low
+  
+  * unset current_row when sort_model is destroyed
+
+ -- Valentin Rabinovich <valentin.rabinovich at d\igia.com>  Tue, 18 Dec 2008 18:02:50 +0300
+
 libhildonfm (1:2.1.2) unstable; urgency=low
   
   * new icons taken into use

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-12-18 09:42:50 UTC (rev 17001)
+++ projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c	2008-12-18 14:27:53 UTC (rev 17002)
@@ -1319,6 +1319,9 @@
 {
     HildonFileSelectionPrivate *priv = HILDON_FILE_SELECTION(data)->priv;
 
+    gtk_tree_row_reference_free(priv->current_row);
+    priv->current_row = NULL;
+
     if (priv->content_pane_changed_id == 0)
     {
       priv->content_pane_changed_id =
@@ -1703,6 +1706,8 @@
 		   &sort_order);
                 hildon_file_selection_disable_cursor_magic (self,
                                                             priv->sort_model);
+                gtk_tree_row_reference_free(priv->current_row);
+                priv->current_row = NULL;
                 g_object_unref(priv->sort_model);
               }
             if (priv->view_filter)
@@ -1725,7 +1730,7 @@
                                                    (priv->view_filter),
                                                    filter_func, priv,
                                                    NULL);
-
+            //gtk_tree_row_reference_new(priv->sort_model, gtk_tree_path_new_first()); //set the first item "selected"
             rebind_models(priv);
             hildon_file_selection_inspect_view(priv);
 	    g_signal_emit(self, signal_folder_activated, 0);
@@ -4353,15 +4358,16 @@
     if (GTK_IS_TREE_VIEW(view) && self->priv->content_pane_last_used) {
         model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
         if (gtk_tree_row_reference_valid(self->priv->current_row)) {
-            gtk_tree_model_get_iter(model, &iter, gtk_tree_row_reference_get_path(self->priv->current_row));
-            gtk_tree_model_get(model, &iter,
-                               HILDON_FILE_SYSTEM_MODEL_COLUMN_IS_FOLDER,
-                               &folder, -1);
-            if (!folder) {
+            if (gtk_tree_model_get_iter(model, &iter, gtk_tree_row_reference_get_path(self->priv->current_row))) {
                 gtk_tree_model_get(model, &iter,
-                                   HILDON_FILE_SYSTEM_MODEL_COLUMN_GTK_PATH_INTERNAL,
-                                   &file_path, -1);
-                return g_slist_append(NULL, file_path);
+                                   HILDON_FILE_SYSTEM_MODEL_COLUMN_IS_FOLDER,
+                                   &folder, -1);
+                if (!folder) {
+                    gtk_tree_model_get(model, &iter,
+                                       HILDON_FILE_SYSTEM_MODEL_COLUMN_GTK_PATH_INTERNAL,
+                                       &file_path, -1);
+                    return g_slist_append(NULL, file_path);
+                }
             }
         }
     }


More information about the maemo-commits mailing list