Syllable Forum Index Syllable
Syllable Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FileBrowser Bug.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Syllable Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
jaspras



Joined: 13 Sep 2007
Posts: 96
Location: Greece

PostPosted: Fri Sep 25, 2009 1:57 pm    Post subject: FileBrowser Bug. Reply with quote

Well. since we started talking about bugs... a small and insignificant one..

Open a subdirectory with FileBrowser that has some folders or some files.

if you press the Arrow keys to move from one item to another vertically or horizontally you will see that it keeps no real order of the way the blue Selector "jumps" from one item to the other. Some items are skipped.
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Fri Sep 25, 2009 7:40 pm    Post subject: Reply with quote

If it's not too much trouble, could you post a screenshot of the offending filebrowser window? Thanks!

BTW, if you have trouble navigating the filebrowser in 'Icons' mode, try changing to 'List' or 'Details' mode - keyboard navigation works differently in those modes.
Back to top
View user's profile Send private message Visit poster's website
jaspras



Joined: 13 Sep 2007
Posts: 96
Location: Greece

PostPosted: Sat Sep 26, 2009 3:00 am    Post subject: Reply with quote

its not particularly one window it happens in any window that has some files or directories inside it.. i think its a sorting problem inside IconView class
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Sat Sep 26, 2009 7:00 pm    Post subject: Reply with quote

I can't find any problems with navigation in 0.6.6 [except for a couple of obscure quirks that I already knew about]. It seems to work as expected for me. Can anyone else reproduce these navigation issues? Jaspras, do you have problems in 'list' or 'details' mode too, or only in 'icons' mode? You are running 0.6.6, from a fresh install, aren't you?
Back to top
View user's profile Send private message Visit poster's website
jaspras



Joined: 13 Sep 2007
Posts: 96
Location: Greece

PostPosted: Sun Sep 27, 2009 1:47 am    Post subject: Reply with quote

[quote]
I can't find any problems with navigation in 0.6.6 [except for a couple of obscure quirks that I already knew about]. It seems to work as expected for me. Can anyone else reproduce these navigation issues? Jaspras, do you have problems in 'list' or 'details' mode too, or only in 'icons' mode? You are running 0.6.6, from a fresh install, aren't you?
[/quote]

I Am using the VMWare image of 0.6.6 fresh install.

No List and Details mode dont seem to have a problem. Only in icon view.

Open a directory in icon view mode and use an arrow key lets say "down".
Keep hitting "down" until all items have been picked or "blued" once.
the first complete "loop" will go fine,everything will get "Blue" once. After
that the "selector" or "blue" must start from the beggining and pick them one by one, but it doesnt it might start from the middle and not select the first ones.
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Sun Sep 27, 2009 5:15 am    Post subject: Reply with quote

Oh, ok. That's quite a specific case then. It's actually a side-effect of the spatial navigation algorithm: since icons in icon mode can be manually moved anywhere in the view, when you press the right key (say), it searches for the nearest icon to the right of the current position (rather than the next icon in the sort order). If there's no icon to the right, it wraps to the left edge of the window and keep searching from there. This works as expected in pretty much all cases except for the bottom-right-most icon, when as you noticed it doesn't go to the top-left icon like you might expect. If you're interested, check out the code in [url=http://syllable.cvs.sourceforge.net/viewvc/syllable/syllable/system/sys/appserver/libsyllable/gui/iconview.cpp?revision=1.25&view=markup&sortby=date#l_500]SelectAdjacent() in iconview.cpp[/url]. If you can suggest a specific way to improve the algorithm, but so that it still works for randomly arranged icons, please do!
Back to top
View user's profile Send private message Visit poster's website
chamel



Joined: 01 May 2010
Posts: 18

PostPosted: Sat May 01, 2010 11:57 am    Post subject: Reply with quote

I have written code for this bug, it is for part where icon is selected. It needs testing, renaming of variables to comply with your coding style and restructuring. Hope I haven't created a bug Laughing .[url]http://pastebin.com/iaKviZK8[/url] I have updated the code as I did some errors and removed them.

Last edited by chamel on Sun May 02, 2010 7:38 am; edited 1 time in total
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Sat May 01, 2010 5:58 pm    Post subject: Reply with quote

Thanks a lot for the contribution!! I'll look at the patch and try it out later in the week when I get a chance.
Back to top
View user's profile Send private message Visit poster's website
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Wed May 05, 2010 3:03 am    Post subject: Reply with quote

I looked at the patch... let me see if I understand it correctly Smile

When you navigate left or right, it searches for the nearest icon that is in the same row as the current icon (ie, icon's top-left corner is between the top and bottom of the current icon). If there is no such icon to the left/right, it wraps to the furthest icon in the same row on the other side.

When you navigate up (down is similar), it searches for the nearest icon above in the same column. If it does not find an icon above in the column, it wraps to the bottom of the column. But if it does find an icon in the column above, it then searches for the icon that is the shortest distance above the current icon (not necessarily in the same column), and activates that one instead. (The comment explains that this is to allow navigation in, eg, a chessboard configuration).

Do I understand right?
Back to top
View user's profile Send private message Visit poster's website
chamel



Joined: 01 May 2010
Posts: 18

PostPosted: Wed May 05, 2010 5:19 am    Post subject: Reply with quote

100% correct.
About chessboard effect that virtually will look as folowing picture
[-]|space|{}|space|[]
-------------------------
space
-------------------------
{}|space|[2]|space|{}
-------------------------
space
-------------------------
[1]|space|{}space||[]
{}-no icon space
when navigating from current selection [-] only by virtual columns whithout that trick, next icon will be [1], but logically it must be [2].
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Thu May 06, 2010 1:45 am    Post subject: Reply with quote

Ok. In that case, the first loop through the icons when we are searching for an icon in the same column is unnecessary, since we loop through the icons a second time looking for icons to the right or left. Could we combine the two loops, and just search for the vertically nearest icon right from the start, regardless of whether it is in the column or not?
Back to top
View user's profile Send private message Visit poster's website
chamel



Joined: 01 May 2010
Posts: 18

PostPosted: Thu May 06, 2010 4:31 am    Post subject: Reply with quote

I have updated code, removed second loop, modified 1st loop - removed check for virtual column, added check for closest icon by X when icons have same y. http://pastebin.com/AnKwusY0
It is also necessary to add #include <math.h> to header list, as I'm using "fabs" to calculate closest X.
Back to top
View user's profile Send private message
chamel



Joined: 01 May 2010
Posts: 18

PostPosted: Fri May 14, 2010 4:42 pm    Post subject: Reply with quote

I have uploaded two versions of iconview.cpp( iconview.1.cpp, iconview.2.cpp - newer), http://www.mediafire.com/file/3zzkuzgtmum/iconview.2-files.zip . I was testing them under Syllable 0.6.7(qemu), first file is removing that skipping bug, second makes navigation more correct.
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Mon May 17, 2010 6:15 pm    Post subject: Reply with quote

Those files look good. I'll test them out a bit later this week, and if all is well, get them checked in to cvs.
Back to top
View user's profile Send private message Visit poster's website
chamel



Joined: 01 May 2010
Posts: 18

PostPosted: Tue May 18, 2010 2:29 am    Post subject: Reply with quote

Those file cannot be applicated all at once, only one must be chosen, as I written before, first removes skipping bug. As it appears due to mis calculation when browsing up, next icon to select was icon with lowest Y of ALL icons, not of ALL icons in the column as it supposed to be and if next column after column that we needed to select and use had icon, that icon was selected because it was closest. The second file is rewritten first, because calculation of browsing used formula y=2*x for left/right and y=(1/2)*x up left and those formulas don't create regions with fixed coordinates for column/row browsing, for row fixed are y1,y2, for column x1,x2, the effect of this is incorrect browsing. To reproduce: in new icon view with alot of icons, move icon in center to right by distance of icon's size, now select icon to the left of this icon and try to move right, the selection will not be the icon we have moved which should be the selection, but icon above/below and to the right.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Syllable Forum Index -> Bugs All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group