diff options
author | Alexander Larsson <alexl@redhat.com> | 2003-03-27 12:53:14 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2003-03-27 12:53:14 +0000 |
commit | ae8091cb0f5deb6fda916afc37119f071552fdd6 (patch) | |
tree | 16d5c239a736feb9411be0c3e694f85462ddecb4 | |
parent | 2c93c36247e8d63a2df177193184d40804ec5171 (diff) | |
download | nautilus-ae8091cb0f5deb6fda916afc37119f071552fdd6.tar.gz |
Update keynav docs.
2003-03-27 Alexander Larsson <alexl@redhat.com>
* docs/key_mouse_navigation.txt:
Update keynav docs.
* libnautilus-private/nautilus-icon-private.h:
* libnautilus-private/nautilus-icon-container.c:
(button_release_event), (motion_notify_event), (key_press_event),
(handle_icon_button_press), (has_multiple_selection),
(has_selection):
Don't do context menu on middle button.
Shift-F10 gives directory context menu if no selection
Change Ctrl-F10 to Shift-F9 to pop up directory context menu. Ctrl-F10 was
conflicting with Toolbar keynav.
* src/nautilus-shell-ui.xml:
Remove Escape accelerator for escape. It was colliding with various
other uses of escape all over. Need to rethink this.
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | docs/key_mouse_navigation.txt | 62 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-container.c | 42 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-private.h | 1 | ||||
-rw-r--r-- | src/nautilus-shell-ui.xml | 1 |
5 files changed, 75 insertions, 50 deletions
@@ -1,3 +1,22 @@ +2003-03-27 Alexander Larsson <alexl@redhat.com> + + * docs/key_mouse_navigation.txt: + Update keynav docs. + + * libnautilus-private/nautilus-icon-private.h: + * libnautilus-private/nautilus-icon-container.c: + (button_release_event), (motion_notify_event), (key_press_event), + (handle_icon_button_press), (has_multiple_selection), + (has_selection): + Don't do context menu on middle button. + Shift-F10 gives directory context menu if no selection + Change Ctrl-F10 to Shift-F9 to pop up directory context menu. Ctrl-F10 was + conflicting with Toolbar keynav. + + * src/nautilus-shell-ui.xml: + Remove Escape accelerator for escape. It was colliding with various + other uses of escape all over. Need to rethink this. + 2003-03-26 Christian Rose <menthos@menthos.com> * configure.in: Added "yi" to ALL_LINGUAS. diff --git a/docs/key_mouse_navigation.txt b/docs/key_mouse_navigation.txt index 0153be6b9..431dde477 100644 --- a/docs/key_mouse_navigation.txt +++ b/docs/key_mouse_navigation.txt @@ -3,56 +3,64 @@ in the default Nautilus views in detail. This is useful as a a guide for people implementing a Nautilus view or something else that wants to have a feel that is compatible with Nautilus. -Icon view: ----------- +*********** Icon view ******************** Keyboard: ========= +Navigation and selection: + When the focus is on the icon view you can move the currently selected icon by using: -arrow keys - moves one step in the direction -tab - moves to the "next" icon in order (i.e. at the end of one row, - go to the first icon the next row) -shift-tab - moves to the "previous" icon in order -home - moves to the first icon -end - moves to the last icon +Arrow Keys - moves one step in the direction +Tab - moves to the "next" icon in order (i.e. at the end of one row, + go to the first icon the next row) +Shift Tab - moves to the "previous" icon in order +Home - moves to the first icon +End - moves to the last icon In order to allow multiple selection the above navigation keys can be combined with the Control key to move the keyboard focus without -affecting the current selection. +affecting the current selection. If you use normal movement (not using +control) all the previously selected icons will be deselected. + +If several icons are selected and there is no keyboard focus you press +up or left will start navigating from the topmost leftmost icon, while +pressing down or right will start from the bottommost rightmost +icon. This works the same way if you hold down Control. -To select an icon position the keyboard focus on it and press -ctlr-space. ctrl-space with no keyboard focus produces a keyboard -focus at the first selected icon, or the first one if none are selected. +To select or deselect an icon position the keyboard focus on it and +press ctlr-space. ctrl-space with no keyboard focus produces a +keyboard focus at the first selected icon, or the first one if none +are selected. -In addition the following keyboard shortcuts are availible: +In manual layout (and especially, on the desktop) the keyboard arrow +keys work in a slightly different way. To allow all icons to be +reached the closest icon in the quadrant of the direction selected +will be used as the "next" icon when navigating. + +Other keyboard shortcuts: Return, Keypad Return - Activate the selected objects Space (without control) - Activate the selected objects -Escape - Undo icon stretching +Escape - Undo icon stretching if in progress + +Alt Left - go back +Alt Right - go forward +Alt Up - go up a directory +Alt Down - enter directory / activate selection -alt left - go back -alt right - go forward -alt up - go up a directory -alt down - enter directory / activate selection +Shift-F10 bring up context menu for selection, or the directory context menu if nothing is selected +Shift-F9 bring up context menu for directory Other key presses are used for typeahead search In rename mode: + Escape - Cancel rename Return, Keypad Return - Finish rename -TODO: -Add text about which icon is used for selection/keyboard focus when -there is none and e.g. arrow keys are pressed. - -BUGS: -I can't seem to get the context menu using the keyboard -escape cancel rename doesn't seem to work -escape to undo stretch doesn't seem to work - Mouse: ====== diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c index bda5f862d..acd34686e 100644 --- a/libnautilus-private/nautilus-icon-container.c +++ b/libnautilus-private/nautilus-icon-container.c @@ -144,6 +144,7 @@ static NautilusIcon *get_first_selected_icon (NautilusIco static NautilusIcon *get_nth_selected_icon (NautilusIconContainer *container, int index); static gboolean has_multiple_selection (NautilusIconContainer *container); +static gboolean has_selection (NautilusIconContainer *container); static void icon_destroy (NautilusIconContainer *container, NautilusIcon *icon); static void end_renaming_mode (NautilusIconContainer *container, @@ -3092,19 +3093,6 @@ button_release_event (GtkWidget *widget, details->drag_button = 0; switch (details->drag_state) { - case DRAG_STATE_MOVE_COPY_OR_MENU: - if (!details->drag_started) { - /* Right click, drag did not start, - * show context menu. - */ - clear_drag_state (container); - g_signal_emit (container, - signals[CONTEXT_CLICK_SELECTION], 0, - event); - break; - } - /* fall through */ - case DRAG_STATE_MOVE_OR_COPY: if (!details->drag_started) { nautilus_icon_container_did_not_drag (container, event); @@ -3143,7 +3131,6 @@ motion_notify_event (GtkWidget *widget, if (details->drag_button != 0) { switch (details->drag_state) { - case DRAG_STATE_MOVE_COPY_OR_MENU: case DRAG_STATE_MOVE_OR_COPY: if (details->drag_started) { break; @@ -3341,13 +3328,21 @@ key_press_event (GtkWidget *widget, undo_stretching (container); handled = TRUE; break; - case GDK_F10: - if (event->state & GDK_CONTROL_MASK) { + case GDK_F9: + if (event->state & GDK_SHIFT_MASK) { handled = handle_popups (container, event, "context_click_background"); - } else if (event->state & GDK_SHIFT_MASK) { - handled = handle_popups (container, event, - "context_click_selection"); + } + break; + case GDK_F10: + if (event->state & GDK_SHIFT_MASK) { + if (has_selection (container)) { + handled = handle_popups (container, event, + "context_click_selection"); + } else { + handled = handle_popups (container, event, + "context_click_background"); + } } break; default: @@ -3882,8 +3877,7 @@ handle_icon_button_press (NautilusIconContainer *container, details->drag_icon = icon; details->drag_x = event->x; details->drag_y = event->y; - details->drag_state = event->button == DRAG_BUTTON - ? DRAG_STATE_MOVE_OR_COPY : DRAG_STATE_MOVE_COPY_OR_MENU; + details->drag_state = DRAG_STATE_MOVE_OR_COPY; details->drag_started = FALSE; /* Check to see if this is a click on the stretch handles. @@ -5006,6 +5000,12 @@ has_multiple_selection (NautilusIconContainer *container) return get_nth_selected_icon (container, 2) != NULL; } +static gboolean +has_selection (NautilusIconContainer *container) +{ + return get_nth_selected_icon (container, 1) != NULL; +} + /** * nautilus_icon_container_show_stretch_handles: * @container: An icon container widget. diff --git a/libnautilus-private/nautilus-icon-private.h b/libnautilus-private/nautilus-icon-private.h index 5dadfbd46..54c92d09c 100644 --- a/libnautilus-private/nautilus-icon-private.h +++ b/libnautilus-private/nautilus-icon-private.h @@ -78,7 +78,6 @@ typedef struct { typedef enum { DRAG_STATE_INITIAL, DRAG_STATE_MOVE_OR_COPY, - DRAG_STATE_MOVE_COPY_OR_MENU, DRAG_STATE_STRETCH } DragState; diff --git a/src/nautilus-shell-ui.xml b/src/nautilus-shell-ui.xml index 33cf8d33a..020b0c95e 100644 --- a/src/nautilus-shell-ui.xml +++ b/src/nautilus-shell-ui.xml @@ -145,7 +145,6 @@ <submenu name="View" _label="_View"> <menuitem name="Stop" _label="_Stop" - accel="Escape" pixtype="stock" pixname="gtk-stop" verb="Stop"/> <menuitem name="Reload" |