Author Topic: Port CHDK file browser (file_man.mo)  (Read 44903 times)

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #25 on: June 01, 2013, 08:23:47 PM »
made a repo
https://bitbucket.org/minimimi/magic-lantern-filer-alex-based

and Found reason for number issue . Solved it now.
Next, I will think about how to implement multiple-selection and "file operation status window".

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: [DONE] Port CHDK file browser
« Reply #26 on: June 01, 2013, 09:34:43 PM »
Ok, I'll keep updating.

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3155
Re: [DONE] Port CHDK file browser
« Reply #27 on: June 01, 2013, 09:57:57 PM »
ah sorry, i already checked in your new source code.
just wanted to write that here then i saw you forked on bitbucket :)

btw the numbers come from a missing
    e->menu_entry.priv = NULL;
after every menu entry.

i also added functions so that registering custom file types by other modules is possible.
so we can playback raw from within the filemanager.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12391
Re: [DONE] Port CHDK file browser
« Reply #28 on: June 01, 2013, 10:48:53 PM »
I wouldn't recommend deleting the priv entry, since it was designed to identify the item. Just make sure you call the default update_action if you use a custom update function.

For actions, please use TYPE_ACTION.

Progress updates can be displayed from update_status (displayed at the bottom).

ScanDir is not thread safe, it needs a semaphore.

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #29 on: June 02, 2013, 03:35:08 AM »
G3gg0:
Thanks , I already used alex method(Used TYPE_ACTION).But I'm override menu_entry->update myself.It was problem. Solved it now.
And , I'm also thinking RAW playback from filer.
See here.
Code: [Select]
enum _FILER_OP {
    FILE_OP_NONE,
    FILE_OP_COPY,
    FILE_OP_MOVE,
    FILE_OP_PREVIEW
};


So I want to know, how to know raw_rac.mo is already loaded, and how to call funcstion in anothers.
If you have a patch file, share it please,

Alex:
Thanks suggestions for making Progress. Will try it.

ScanDir things. need a "menu_sem" ? . So I added functions in menu.c in previous codes src/filer.c version.
Need to add, GetSemWrapper()/ReleaseSemWrapper() in menu.c?
Is this better way? How do you think?

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #30 on: June 02, 2013, 04:54:43 AM »
ah sorry, i already checked in your new source code.
just wanted to write that here then i saw you forked on bitbucket :)

You already have write permission on my repo. Because I'm used same permission with main repo.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12391
Re: [DONE] Port CHDK file browser
« Reply #31 on: June 02, 2013, 09:59:30 AM »
ScanDir things. need a "menu_sem" ?

menu_add already has semaphores, so I think it should be alright. ScanDir was manipulating a linked list, so I've added the scandir_sem just in case. The only situation when things could have gone wrong was if you pressed some key exactly when a copy/move operation finished.

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #32 on: June 02, 2013, 01:37:32 PM »
G3gg0 and Alex

Thank you for your merge/implove/brush up.
It's perfect for me. I'm using 64gig SD and 32gig CF. So I wanted to move RAW to SD.

Maybe here and
http://www.magiclantern.fm/forum/index.php?topic=5936.new#new
are close-able.

Multiple file selection is future TODO...I have no idea to make multiple file selection now...

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #33 on: June 02, 2013, 05:20:20 PM »
OK!!!!
I found answer for multiple file selection!!!!!
Soon will open new repo.
Already , almost codes are working. Yay, wait a moment

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: [DONE] Port CHDK file browser
« Reply #34 on: June 02, 2013, 05:32:35 PM »
EOSM now have to touch screen to go up :(

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #35 on: June 02, 2013, 05:36:49 PM »
https://bitbucket.org/minimimi/magic-lantern-filer-multiselect

basic functions are working. push file twice.

now debugging
 -already registerd check when we push copy menu.
 -cancel copy operation when we un-select all files

1% ,
we need "../" ?? or need ifdef for EOSM?

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: [DONE] Port CHDK file browser
« Reply #36 on: June 02, 2013, 05:50:29 PM »
Q on eos M is 1 finger tap. No q button, only set. I don't know if you "need" it. I can use it either way.

aaphotog

  • Senior
  • ****
  • Posts: 356
Re: [DONE] Port CHDK file browser
« Reply #37 on: June 02, 2013, 06:28:22 PM »
......

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #38 on: June 02, 2013, 06:31:20 PM »
1%
 I mean , use ifdef for :
 -disable Q
 -show "../"
Then you can use file manager with cursol keys. Is this a correct understanding?

I think almost fine on my multiple select codes. please check it except M(sorry.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12391
Re: [DONE] Port CHDK file browser
« Reply #39 on: June 02, 2013, 06:32:38 PM »
Modules were designed to be portable, so... better just add it back?

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #40 on: June 02, 2013, 06:52:56 PM »
I got it. Never use ifdefs in modules.
Then, how do you think about M 1%?

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: [DONE] Port CHDK file browser
« Reply #41 on: June 02, 2013, 07:48:20 PM »
Either leave as is or add ../ back. Its only an issue where it will be confusing to people.

* Although probably only 2 people with eos M care.

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #42 on: June 03, 2013, 04:34:32 PM »
Alex:
Oh! important point is conflicted.

Are you already disabled "Q" ??

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12391
Re: [DONE] Port CHDK file browser
« Reply #43 on: June 03, 2013, 04:47:28 PM »
?! Q works fine here, it goes back by default (unless you override it when creating menu entries).

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #44 on: June 03, 2013, 04:59:11 PM »
https://bitbucket.org/minimimi/magic-lantern-filer-multiselect/compare/hudson/magic-lantern:unified..unified#chg-modules/file_man/file_man.c

see here.
If you have no problem, enbale selectQ plz for multiple file selection.


Modified
Alex. sorry for confusing. I just understood you are not disable Q everyware. So I can solve myself.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12391
Re: [DONE] Port CHDK file browser
« Reply #45 on: June 05, 2013, 07:07:54 PM »
File selection works very well, you can even select files from multiple folders and copy them to the same destination dir, very nice!

I've changed the buttons as follows:
- PLAY selects individual files
- menu entry for selecting all files with the same extension (e.g. if you shoot raw+jpeg and you want to delete all jpegs)

We need to be very careful with background tasks and exclusive access to certain data structures; for example, it was trivial to break the copy operation just by navigating to some other directory while copying (!)

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #46 on: June 06, 2013, 10:20:22 AM »
Thanks your daily cooperation and polish it up. :D
I think we need to add some more miner chagens. When I make it, I will make a pull req.

 -we need skip , when src & dst files are idential
 -disable automatic power save (However we can't use half-push tric here. and we don't wanna change NVRAM value...)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12391
Re: [DONE] Port CHDK file browser
« Reply #47 on: June 06, 2013, 01:46:55 PM »
For powersave I would add only a warning in menu.

minimimi

  • Freshman
  • **
  • Posts: 68
Re: [DONE] Port CHDK file browser
« Reply #48 on: June 06, 2013, 04:45:48 PM »
I see. It's one of solution for current our knowlege.
And , pushed small pathces for "src&dst files are idential " and "cleanup memory when unloading".
Please review it.

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: [DONE] Port CHDK file browser
« Reply #49 on: June 06, 2013, 05:45:38 PM »
Um, on my 60d the file browser is extremely slow when I try to browse a directory with a lot of files (like 1000) - is that just me, is it being worked on, or is this just the way it is?