In single click mode, don't activate if shift or control is held down.

2003-01-12  Dave Camp  <dave@ximian.com>

	* src/file-manager/fm-list-view.c (button_press_callback): In
	single click mode, don't activate if shift or control is held
	down.  This matches the icon view behavior.

	Fixes #81896.
This commit is contained in:
Dave Camp 2003-01-13 04:27:50 +00:00 committed by Dave Camp
parent 28ecd710f6
commit f956758133
2 changed files with 24 additions and 13 deletions

View file

@ -1,3 +1,11 @@
2003-01-12 Dave Camp <dave@ximian.com>
* src/file-manager/fm-list-view.c (button_press_callback): In
single click mode, don't activate if shift or control is held
down. This matches the icon view behavior.
Fixes #81896.
2003-01-12 Dave Camp <dave@ximian.com>
* src/file-manager/fm-list-view.c: (button_press_callback): Handle
@ -14,7 +22,7 @@
* libnautilus-private/nautilus-icon-container.c:
Remove unneccessary include of libnautilus/nautilus-clipboard.h
* src/file-manager/fm-directory-view.c:
Remove unnecessary include of fm-desktop-icon-view.h
Patch from David Bordoley <bordoley@msu.edu>

View file

@ -153,13 +153,14 @@ button_press_callback (GtkWidget *widget, GdkEventButton *event, gpointer callba
call_parent = TRUE;
if (gtk_tree_view_get_path_at_pos (tree_view, event->x, event->y,
&path, NULL, NULL, NULL)) {
if (event->button == 3
if ((event->button == 3 ||
(event->button == 1 && click_policy_auto_value == NAUTILUS_CLICK_POLICY_SINGLE))
&& gtk_tree_selection_path_is_selected (gtk_tree_view_get_selection (tree_view), path)) {
/* Don't let the default code run because if
multiple rows are selected it will unselect
all but one row; but we- want the right
click menu to apply to everything that's
currently selected. */
click menu or single click to apply to
everything that's currently selected. */
call_parent = FALSE;
}
@ -186,15 +187,17 @@ button_press_callback (GtkWidget *widget, GdkEventButton *event, gpointer callba
} else {
fm_directory_view_pop_up_background_context_menu (FM_DIRECTORY_VIEW (view), (GdkEventButton *) event);
}
} else if (event->button == 1
&& ((event->type == GDK_BUTTON_PRESS
&& click_policy_auto_value == NAUTILUS_CLICK_POLICY_SINGLE)
|| (event->type == GDK_2BUTTON_PRESS
&& click_policy_auto_value == NAUTILUS_CLICK_POLICY_DOUBLE))) {
file_list = fm_list_view_get_selection (FM_DIRECTORY_VIEW (view));
fm_directory_view_activate_files (FM_DIRECTORY_VIEW (view),
file_list);
nautilus_file_list_free (file_list);
} else if (event->button == 1) {
if ((event->type == GDK_BUTTON_PRESS
&& click_policy_auto_value == NAUTILUS_CLICK_POLICY_SINGLE
&& !(event->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)))
|| (event->type == GDK_2BUTTON_PRESS
&& click_policy_auto_value == NAUTILUS_CLICK_POLICY_DOUBLE)) {
file_list = fm_list_view_get_selection (FM_DIRECTORY_VIEW (view));
fm_directory_view_activate_files (FM_DIRECTORY_VIEW (view),
file_list);
nautilus_file_list_free (file_list);
}
}
/* We chained to the default handler in this method, so never