gnome-commander r1714 - in trunk: . doc/C src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1714 - in trunk: . doc/C src
- Date: Wed, 23 Apr 2008 17:42:35 +0100 (BST)
Author: epiotr
Date: Wed Apr 23 16:42:35 2008
New Revision: 1714
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1714&view=rev
Log:
Fixed problem #499764 (multiple selection problem)
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/doc/C/gnome-commander.xml
trunk/src/gnome-cmd-file-list.cc
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Apr 23 16:42:35 2008
@@ -4,6 +4,7 @@
Bug fixes:
* Fixed problem #392959 (dynamically changing user to root)
+ * Fixed problem #499764 (multiple selection problem)
* Fixed problem with sorting of UTF-8 encoded file names
* Fixed problem with copying files to symlinked directories
Modified: trunk/doc/C/gnome-commander.xml
==============================================================================
--- trunk/doc/C/gnome-commander.xml (original)
+++ trunk/doc/C/gnome-commander.xml Wed Apr 23 16:42:35 2008
@@ -5824,6 +5824,9 @@
<para>Fixed problem #392959 (dynamically changing user to root)</para>
</listitem>
<listitem>
+ <para>Fixed problem #499764 (multiple selection problem)</para>
+ </listitem>
+ <listitem>
<para>Fixed problem with sorting of UTF-8 encoded file names</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 Wed Apr 23 16:42:35 2008
@@ -234,6 +234,9 @@
if (row == -1)
return;
+ if (g_list_index (fl->priv->selected_files, finfo) != -1)
+ return;
+
if (!gnome_cmd_data_get_use_ls_colors ())
gtk_clist_set_row_style (GTK_CLIST (fl), row, sel_list_style);
else
@@ -246,9 +249,6 @@
}
}
- if (g_list_index (fl->priv->selected_files, finfo) != -1)
- return;
-
gnome_cmd_file_ref (finfo);
fl->priv->selected_files = g_list_append (fl->priv->selected_files, finfo);
@@ -1032,50 +1032,61 @@
g_return_if_fail (finfo != NULL);
g_return_if_fail (event != NULL);
- gint row = get_row_from_file (fl, finfo);
-
if (event->type == GDK_2BUTTON_PRESS && event->button == 1)
{
mime_exec_file (finfo);
}
- else if (event->type == GDK_BUTTON_PRESS && (event->button == 1 || event->button == 3))
- {
- gnome_cmd_file_list_select_row (fl, row);
- gtk_widget_grab_focus (GTK_WIDGET (fl));
-
- if (event->button == 1)
- {
- if (event->state & GDK_SHIFT_MASK)
- select_file_range (fl, fl->priv->shift_down_row, row);
- else if (event->state & GDK_CONTROL_MASK)
- toggle_file_at_row (fl, row);
- }
- else if (event->button == 3)
+ else
+ if (event->type == GDK_BUTTON_PRESS && (event->button == 1 || event->button == 3))
{
- if (strcmp (finfo->info->name, "..") != 0)
+ gint prev_row = fl->priv->cur_file;
+ gint row = get_row_from_file (fl, finfo);
+
+ gnome_cmd_file_list_select_row (fl, row);
+ gtk_widget_grab_focus (GTK_WIDGET (fl));
+
+ if (event->button == 1)
{
- if (gnome_cmd_data_get_right_mouse_button_mode() == RIGHT_BUTTON_SELECTS)
- {
- if (g_list_index (fl->priv->selected_files, finfo) == -1)
+ if (event->state & GDK_SHIFT_MASK)
+ select_file_range (fl, fl->priv->shift_down_row, row);
+ else
+ if (event->state & GDK_CONTROL_MASK)
{
- select_file (fl, finfo);
- fl->priv->right_mouse_sel_state = 1;
+ if (!fl->priv->selected_files)
+ {
+ if (prev_row!=row)
+ select_file (fl, get_file_at_row (fl, prev_row));
+ select_file_at_row (fl, row);
+ }
+ else
+ toggle_file_at_row (fl, row);
}
- else
+ }
+ else
+ if (event->button == 3)
+ if (strcmp (finfo->info->name, "..") != 0)
{
- unselect_file (fl, finfo);
- fl->priv->right_mouse_sel_state = 0;
+ if (gnome_cmd_data_get_right_mouse_button_mode() == RIGHT_BUTTON_SELECTS)
+ {
+ if (g_list_index (fl->priv->selected_files, finfo) == -1)
+ {
+ select_file (fl, finfo);
+ fl->priv->right_mouse_sel_state = 1;
+ }
+ else
+ {
+ unselect_file (fl, finfo);
+ fl->priv->right_mouse_sel_state = 0;
+ }
+
+ fl->priv->right_mb_down_file = finfo;
+ fl->priv->right_mb_timeout_id =
+ gtk_timeout_add (POPUP_TIMEOUT, (GtkFunction) on_right_mb_timeout, fl);
+ }
+ else
+ show_file_popup (fl, event);
}
-
- fl->priv->right_mb_down_file = finfo;
- fl->priv->right_mb_timeout_id =
- gtk_timeout_add (POPUP_TIMEOUT, (GtkFunction) on_right_mb_timeout, fl);
- }
- else
- show_file_popup (fl, event);
- }
}
- }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]