Nautilus enhancement: simplify navigation on desktop icon view



Dear list members,

This is small try using nautilus to simplify the navigation process on Desktop icon view.

Issue: Desktop is the very first screen after login to system. A visually impaired user may need to know what is available on the desktop by traversing it once. To visit all icons, generally the user starts with top icon of first column by pressing Home. Then he presses down arrow key to traverse all icons of current column. When he reaches the bottom, he either goes back to top icon, moves left to top icon in second column, then moves down to last icon in the column. Or he presses right arrow key to move to bottom icon of second column, then moves up to top icon of the column. Proceed to next column if any and stop when the last icon is reached. For a sighted user it is easy to select the correct arrow key to move on to next column/item. But in absence of visual feedback it is very confusing with item repetitions, and with different arrow key directions. There should be an easy way to navigate through icons on desktop for traversing or searching.

The solution patch (bug: 613111) helps user to traverse the desktop icon view completely using a single arrow key (Down arrow key). When focus comes on last item of a column, navigation automatically moves to the topmost item of next column. Thus user is able to traverse from first item to last item without missing any. And user need not use different arrow keys (left/right/up arrow key) to move on next column/item.

Important assumption: solutions works well with setting “Clean Up items by name” on desktop icon view.

Ref: https://bugzilla.gnome.org/show_bug.cgi?id=paper on desktop icon structure613111

Feedback and Comments are welcome


Attached: patch & install


With regards

Leena Chourey

For Accessibility Team

C-DAC Mumbai



Attachment: Install.odt
Description: application/vnd.oasis.opendocument.text

From 5904aaef6e2e2185cf62f38d95772f697af63fb7 Mon Sep 17 00:00:00 2001
From: leena chourey <leenac cdacmumbai in>
Date: Tue, 12 Jul 2011 12:47:57 +0530
Subject: [PATCH] To update Down_arrow movement for Desktop icon view

---
 libnautilus-private/nautilus-icon-container.c |   43 ++++++++++++++++++++-----
 1 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index daae378..75da73a 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -3484,15 +3484,36 @@ closest_in_90_degrees (NautilusIconContainer *container,
 	best_dist = data;
 	
 	if (best_so_far == NULL) {
-		*best_dist = dist;
-		return TRUE;
-	}
+            if(container->details->arrow_key_direction == GTK_DIR_DOWN){
+                if (dx==0 || ((-48) < dx && dx < 0) || (0 < dx && dx < 48)){
+                //Icon in the down direction  but not in the same column
+                    *best_dist = dist;
+                    return TRUE;
+                }
+            }
+            else
+            {
+                *best_dist = dist;
+                return TRUE;
+            }
+        }
 
 	if (dist < *best_dist) {
-		*best_dist = dist;
-		return TRUE;
+            if(container->details->arrow_key_direction == GTK_DIR_DOWN){
+                if (dx==0 || ((-48) < dx && dx < 0) || (0 < dx && dx < 48)){
+                    //Icon in the down direction  but not in the same column
+                    *best_dist = dist;
+                    return TRUE;
+                }
+            }
+            else
+            {
+                *best_dist = dist;
+                return TRUE;
+            }
 	}
 
+
 	return FALSE;
 }
 
@@ -3734,9 +3755,15 @@ keyboard_arrow_key (NautilusIconContainer *container,
 				 &data);
 		}
 
-		if (to == NULL) { 
-			to = from;
-		}
+		if (to == NULL) {
+                    if (direction== GTK_DIR_DOWN)
+               //on last item of one col control will shift to first item of next col (if any) with downarrow
+                        to=find_best_icon(container, from, next_column_highest, &data);
+                    //else if (direction == GTK_DIR_RIGHT)
+                        //to=find_best_icon(container, from, next_row_leftmost, &data);
+                    else
+                        to = from;  // original code
+}
 
 	}
 
-- 
1.7.4.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]