gnome-commander r1715 - in branches/gcmd-1-3: . doc/C src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1715 - in branches/gcmd-1-3: . doc/C src
- Date: Wed, 23 Apr 2008 17:42:52 +0100 (BST)
Author: epiotr
Date: Wed Apr 23 16:42:52 2008
New Revision: 1715
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1715&view=rev
Log:
Fixed problem #499764 (multiple selection problem)
Modified:
branches/gcmd-1-3/ChangeLog
branches/gcmd-1-3/NEWS
branches/gcmd-1-3/doc/C/gnome-commander.xml
branches/gcmd-1-3/src/gnome-cmd-file-list.cc
Modified: branches/gcmd-1-3/NEWS
==============================================================================
--- branches/gcmd-1-3/NEWS (original)
+++ branches/gcmd-1-3/NEWS Wed Apr 23 16:42:52 2008
@@ -4,6 +4,7 @@
Bug fixes:
* Fixed problem with opening dirs by intviewer
+ * Fixed problem #499764 (multiple selection problem)
* Fixed problem with editing dirs by gcmd
* Fixed problem #351952 (crash while doing a content search)
* Fixed problem #352253 (scrolling behaviour of the viewer)
Modified: branches/gcmd-1-3/doc/C/gnome-commander.xml
==============================================================================
--- branches/gcmd-1-3/doc/C/gnome-commander.xml (original)
+++ branches/gcmd-1-3/doc/C/gnome-commander.xml Wed Apr 23 16:42:52 2008
@@ -5862,6 +5862,9 @@
</itemizedlist>
</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: 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 Wed Apr 23 16:42:52 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]