gnome-commander r1904 - in trunk: . doc/C src



Author: epiotr
Date: Thu Jul 24 22:05:27 2008
New Revision: 1904
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1904&view=rev

Log:
Fixed problem #532615 (file operations on wrong file)

Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/doc/C/gnome-commander.xml
   trunk/src/gnome-cmd-file-list.cc
   trunk/src/gnome-cmd-file-list.h
   trunk/src/gnome-cmd-search-dialog.cc

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Thu Jul 24 22:05:27 2008
@@ -3,6 +3,7 @@
 ---------------
 
 Bug fixes:
+ * Fixed problem #532615 (file operations on wrong file)
  * Fixed problem #538806 (quick search in root dir)
  * Fixed problem #539753 (build error on Solaris)
  * Fixed problem #541404 (update of host names)

Modified: trunk/doc/C/gnome-commander.xml
==============================================================================
--- trunk/doc/C/gnome-commander.xml	(original)
+++ trunk/doc/C/gnome-commander.xml	Thu Jul 24 22:05:27 2008
@@ -5918,6 +5918,9 @@
                 <para>
                     <itemizedlist>
                         <listitem>
+                            <para>Fixed problem #532615 (file operations on wrong file)</para>
+                        </listitem>
+                        <listitem>
                             <para>Fixed problem #538806 (quick search in root dir)</para>
                         </listitem>
                         <listitem>

Modified: trunk/src/gnome-cmd-file-list.cc
==============================================================================
--- trunk/src/gnome-cmd-file-list.cc	(original)
+++ trunk/src/gnome-cmd-file-list.cc	Thu Jul 24 22:05:27 2008
@@ -1441,27 +1441,23 @@
 
 /******************************************************************************
 *
-*   Function: gnome_cmd_file_list_add_file
+*   Function: gnome_cmd_file_list_append_file
 *
 *   Purpose:  Add a file to the list
 *
 *   Params:   @fl: The FileList to add the file to
 *             @finfo: The file to add
-*             @in_row: The row to add the file at. Set to -1 to append the file at the end.
 *
 *   Returns:
 *
 *   Statuses:
 *
 ******************************************************************************/
-void gnome_cmd_file_list_add_file (GnomeCmdFileList *fl, GnomeCmdFile *finfo, gint row)
+void gnome_cmd_file_list_append_file (GnomeCmdFileList *fl, GnomeCmdFile *finfo)
 {
-    /* Add the file to the list
-     *
-     */
     gnome_cmd_file_collection_add (fl->priv->shown_files, finfo);
 
-    add_file_to_clist (fl, finfo, row);
+    add_file_to_clist (fl, finfo, -1);
 }
 
 
@@ -1499,7 +1495,7 @@
 
     gtk_clist_freeze (GTK_CLIST (fl));
     for (; tmp; tmp = tmp->next)
-        gnome_cmd_file_list_add_file (fl, GNOME_CMD_FILE (tmp->data), -1);
+        gnome_cmd_file_list_append_file (fl, GNOME_CMD_FILE (tmp->data));
     gtk_clist_thaw (GTK_CLIST (fl));
 
     if (list)
@@ -1516,13 +1512,18 @@
         GnomeCmdFile *finfo2 = get_file_at_row (fl, i);
         if (fl->priv->sort_func (finfo2, finfo, fl) == 1)
         {
-            gnome_cmd_file_list_add_file (fl, finfo, i);
+            gnome_cmd_file_collection_add (fl->priv->shown_files, finfo);
+            add_file_to_clist (fl, finfo, i);
+
+            if (i<=fl->priv->cur_file)
+                fl->priv->cur_file++;
+
             return;
         }
     }
 
     // Insert the file at the end of the list
-    gnome_cmd_file_list_add_file (fl, finfo, -1);
+    gnome_cmd_file_list_append_file (fl, finfo);
 }
 
 

Modified: trunk/src/gnome-cmd-file-list.h
==============================================================================
--- trunk/src/gnome-cmd-file-list.h	(original)
+++ trunk/src/gnome-cmd-file-list.h	Thu Jul 24 22:05:27 2008
@@ -109,7 +109,7 @@
 
 void gnome_cmd_file_list_update_style (GnomeCmdFileList *fl);
 
-void gnome_cmd_file_list_add_file (GnomeCmdFileList *fl, GnomeCmdFile *finfo, gint in_row);
+void gnome_cmd_file_list_append_file (GnomeCmdFileList *fl, GnomeCmdFile *finfo);
 void gnome_cmd_file_list_show_files (GnomeCmdFileList *fl, GList *files, gboolean sort);
 void gnome_cmd_file_list_insert_file (GnomeCmdFileList *fl, GnomeCmdFile *finfo);
 void gnome_cmd_file_list_update_file (GnomeCmdFileList *fl, GnomeCmdFile *finfo);

Modified: trunk/src/gnome-cmd-search-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-search-dialog.cc	(original)
+++ trunk/src/gnome-cmd-search-dialog.cc	Thu Jul 24 22:05:27 2008
@@ -387,8 +387,8 @@
 
     // Add all files found since last update to the list
     for (GList *files = data->pdata.files; files; files = files->next)
-        gnome_cmd_file_list_add_file (GNOME_CMD_FILE_LIST (data->dialog->priv->result_list),
-                                      GNOME_CMD_FILE (files->data), -1);
+        gnome_cmd_file_list_append_file (GNOME_CMD_FILE_LIST (data->dialog->priv->result_list),
+                                      GNOME_CMD_FILE (files->data));
     if (data->pdata.files)
     {
         g_list_free (data->pdata.files);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]