gnome-commander r1905 - in branches/gcmd-1-3: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1905 - in branches/gcmd-1-3: . src
- Date: Thu, 24 Jul 2008 22:05:45 +0000 (UTC)
Author: epiotr
Date: Thu Jul 24 22:05:45 2008
New Revision: 1905
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1905&view=rev
Log:
Fixed problem #532615 (file operations on wrong file)
Modified:
branches/gcmd-1-3/ChangeLog
branches/gcmd-1-3/src/gnome-cmd-file-list.cc
branches/gcmd-1-3/src/gnome-cmd-file-list.h
branches/gcmd-1-3/src/gnome-cmd-search-dialog.cc
Modified: branches/gcmd-1-3/src/gnome-cmd-file-list.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-file-list.cc (original)
+++ branches/gcmd-1-3/src/gnome-cmd-file-list.cc Thu Jul 24 22:05:45 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: branches/gcmd-1-3/src/gnome-cmd-file-list.h
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-file-list.h (original)
+++ branches/gcmd-1-3/src/gnome-cmd-file-list.h Thu Jul 24 22:05:45 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: branches/gcmd-1-3/src/gnome-cmd-search-dialog.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-search-dialog.cc (original)
+++ branches/gcmd-1-3/src/gnome-cmd-search-dialog.cc Thu Jul 24 22:05:45 2008
@@ -385,8 +385,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]