Commit Graph

115 Commits

Author SHA1 Message Date
Mike Blumenkrantz affc6d8d25 another efm_op patch from Maxime Villard, I don't even know what it does
SVN revision: 76686
2012-09-14 17:00:41 +00:00
Mike Blumenkrantz 80c6165036 with the work of Maxime Villard <rustyBSD@gmx.fr>, efm_op can now move files directly when they're on the same device instead of copying then deleting the original
SVN revision: 76674
2012-09-14 15:09:05 +00:00
Maxime Villard 0d45c19468 From: Maxime Villard <rustyBSD@gmx.fr>
$ mkdir /home/test/EMPTY
 $ mkdir /home/test/FULL
 $ cd /home/test
 $ ln -s EMPTY link

 Now move (with EFM) the 'FULL' folder to the 'link' (without
 opening it), and 'FULL' diseappear.

 As the symlink points directly to 'EMPTY', we have not the
 full path. So the 'FULL' directory is moved to ~/, instead
 of the desired dest.

 Here is a quickly-made a patch.


SVN revision: 76591
2012-09-13 08:34:24 +00:00
Mike Blumenkrantz 3e1bb5843c send initial progress from efm slave to set src and dest paths in efm
SVN revision: 76416
2012-09-10 15:46:38 +00:00
Mike Blumenkrantz f59fa03035 send progress of 0% when overwrite warning is sent to ensure that we have the src and dest accessible in efm
SVN revision: 76412
2012-09-10 14:39:07 +00:00
Mike Blumenkrantz 5e7a8a0892 SVN revision: 75698
SPANK SPANK SPANK, DO NOT COMMIT PATCHES YOU DO NOT UNDERSTAND OR HAVE NOT TESTED.


SVN revision: 75988
2012-09-03 09:39:30 +00:00
Vincent Torri f84af67928 E17: remove useless symlink (as we don't rename anymore) and remove useless function _e_fm_op_update_progress_report_simple()
Patch by Maxime Villard

SVN revision: 75698
2012-08-25 09:22:09 +00:00
Vincent Torri 4812a5f372 E: minor changes
* useless define
 * formatting and useless comment
 * fread() returns a number >= 0
 * symlink returns -1 on error

SVN revision: 75687
2012-08-24 22:18:43 +00:00
Vincent Torri 053476d676 E: managing overwrite when moving files
The rename() function deletes dest file if it exists,
so there is no overwrite handling. Instead of
testing a rename() and if it fails creating a task
to copy-delete the file, we directly create this
task, which handles overwrite.

Patch by Maxime Villard (rustyBSD)


SVN revision: 75489
2012-08-21 07:40:31 +00:00
Vincent Torri 25aa4e5a89 E: add overwrite handling.
Patch by Maxime Villard (rustyBSD)

SVN revision: 75436
2012-08-19 18:35:10 +00:00
Vincent Torri d9f3d89a07 E: remove useless op
we chmod the created symlink. It's useless, because
we use stat() which gives st_mode of pointed file/folder,
and then we use chmod(), which follows symlink; so we
are chmoding a file to the same permissions it had
before.

Patch by Maxile Villard

SVN revision: 75435
2012-08-19 18:27:18 +00:00
Mike Blumenkrantz e7c7be6b1a replace FREE with E_FREE for consistency, use E_FREE instead of free
SVN revision: 74626
2012-07-31 09:06:26 +00:00
Vincent Torri 72c6b4e4a3 E17: fix race condition when copying a file
during the copy, the file can be accessed by users.
See http://cwe.mitre.org/data/definitions/689.html
So we apply the access rights after the creation of
the dest file.

Patch by Maxime Villard


SVN revision: 74284
2012-07-21 18:20:19 +00:00
Vincent Torri 6b430e4489 E17: fix typo
Patch by Maxime Villard


SVN revision: 74281
2012-07-21 18:02:07 +00:00
Vincent Torri 435a620992 check if the name has a 'file' part
SVN revision: 74266
2012-07-21 13:53:54 +00:00
Vincent Torri 4d0cfed7b9 whitespaces--
SVN revision: 74265
2012-07-21 13:51:04 +00:00
Vincent Torri 7e40b5f15a E17: symlink fixes
when copying symlinks, it creates a symlink to the
destination but with the name of the pointed file/folder.

It causes problems, ex: we can't copy two symlinks
pointing to the same file, because they will have the
same name.

Also when copying, if it's a link, we fill the destination
in the struct task, then, after we check overwrite with
_e_fm_op_handle_overwrite()

Here is a patch which corrects this.

Patch by Maxime Villard (rustyBSD), modified a bit by me (add 2 free() + formatting)


SVN revision: 74264
2012-07-21 13:48:35 +00:00
Carsten Haitzler 7ac8b4fd31 that is bad code as rusty says - though fix it a different way.
SVN revision: 74252
2012-07-20 14:40:19 +00:00
Vincent Torri c3b0637802 e17: whitespaces--
SVN revision: 72561
2012-06-21 06:19:43 +00:00
Mike Blumenkrantz 1807ea8dae on second thought, don't remove the delete task if we're still waiting for an overwrite confirmation
SVN revision: 72396
2012-06-18 13:21:52 +00:00
Mike Blumenkrantz 251a9b479a delete the rm task from the efm slave if there is a failure during the copy task
this should fix the problem described by the very angry message in ticket #729


SVN revision: 72395
2012-06-18 13:17:48 +00:00
Mike Blumenkrantz bd73abaffa formatting
SVN revision: 72392
2012-06-18 12:49:07 +00:00
Cedric BAIL 70d21a1f44 e: move everyone to use eina_file_direct_ls and friend.
NOTE: I think, but I am not sure yet, that only EFM should
do this kind of operation or it could hard lock E17.


SVN revision: 70546
2012-04-30 07:07:33 +00:00
Vincent Torri c30aaf8dde e17: remove some shadow variables
SVN revision: 70190
2012-04-15 08:09:56 +00:00
Carsten Haitzler 66decc410d fix del of directories and copy too.
SVN revision: 66010
2011-12-08 03:34:44 +00:00
Carsten Haitzler 7e0ff05ad1 lets' delete files again shall we efm?
SVN revision: 65591
2011-11-25 07:13:41 +00:00
Carsten Haitzler de643868c5 all in comments.
SVN revision: 63805
2011-10-04 11:38:52 +00:00
Rafael Antognolli 65d7934e30 e_fm: move should compare both paths totally.
Comparing just until the strlen(p2) won't allow to move an inner directory to
a parent directory.



SVN revision: 59948
2011-06-04 05:19:01 +00:00
Christopher Michael 3239c1875c E: e_fm_op: Cleanup lots of compiler warnings.
SVN revision: 59599
2011-05-22 17:06:25 +00:00
Lucas De Marchi 25113159a5 Fix common misspellings
Some misspellings were manually reverted since in E there are tons of .po with
phrases in other languages. Other than that all the changes in the following
files were reverted:

 * src/modules/illume/dicts/English_(US).dic
 * src/modules/illume-keyboard/dicts/English_(US).dic


Following misspellings were fixed:

acquited->acquitted
adres->address
adress->address
alreayd->already
aquire->acquire
arbitarily->arbitrarily
cant->can't
Capetown->Cape
carefull->careful
causalities->casualties
Celcius->Celsius
certian->certain
commandoes->commandos
considerd->considered
conveyer->conveyor
dependant->dependent
didnt->didn't
discontentment->discontent
doesnt->doesn't
everytime->every
exemple->example
existance->existence
existant->existent
existince->existence
Farenheit->Fahrenheit
forbad->forbade
funguses->fungi
guage->gauge
guerilla->guerrilla
guerillas->guerrillas
happend->happened
hasnt->hasn't
heros->heroes
inbetween->between
independant->independent
inital->initial
intrusted->entrusted
irregardless->regardless
isnt->isn't
knifes->knives
layed->laid
loosing->losing
marrage->marriage
midwifes->midwives
miniscule->minuscule
monickers->monikers
mroe->more
noone->no one
occured->occurred
omre->more
paralell->parallel
payed->paid
planed->planned
quitted->quit
quizes->quizzes
seperated->separated
seperate->separate
shoudl->should
similiar->similar
simplier->simpler
specifiying->specifying
teh->the
toke->took
torpedos->torpedoes
Tuscon->Tucson
unecessary->unnecessary
useage->usage
usefull->useful
useing->using
waht->what
wanna->want
whith->with
wich->which
withing->within




SVN revision: 52006
2010-09-08 23:59:07 +00:00
Lucas De Marchi 63f07459a0 Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Christopher Michael f5282a1018 Add unused.
SVN revision: 51370
2010-08-18 22:20:52 +00:00
Lucas De Marchi 6638a10e20 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +00:00
Cedric BAIL c6a118d738 * e: remove warning due to Ecore API change.
SVN revision: 49833
2010-06-24 16:19:12 +00:00
Vincent Torri 7e7e0a8a55 fix last void * arith
SVN revision: 44562
2009-12-19 08:39:11 +00:00
Carsten Haitzler 672d1de1e3 fix more void * arith!
SVN revision: 44560
2009-12-19 00:15:16 +00:00
Vincent Torri 7c1f80aefe declare alloca where needed and make it portable
SVN revision: 44544
2009-12-18 13:52:23 +00:00
Gustavo Sverzut Barbieri 58925e0232 Update to match new EINA init/shutdown.
SVN revision: 42301
2009-09-06 22:23:04 +00:00
Cedric BAIL f8c05999e4 * e: Cleanup use of Eina data structure.
Patch from Peter van de Werken <pwerken-e@a-eskwadraat.nl>.


SVN revision: 41916
2009-08-21 15:08:49 +00:00
semernin 2f76dd5d99 List of changes:
1. Gadcon sities:
      -- 'E_Gadcon_Site' enum to list all available sities,
      -- added 'is_site' callback for distinguish gadcon sities,
      -- 'e_gadcon_site_is_*' helpers written to use in gadget modules,
      -- gadcon config dialogs modified to show only gadgets that appropriate
         to selected gadcon site,
      -- all gadget modules updated for using new callback.
      
      When callback is not provided in module, then gadget can be used in 
      any gadcon site.
      
   2. Filemanager:
      -- added error icon to unexisting path dialog,
      -- added callback 'func.abort' to 'E_Fm2_Op_Registry_Entry' to specify
         abort operation sequence (if not provided, then operation is not
         cancelable),
      -- added parameter to 'e_fm2_op_registry_entry_add' to specify abort
         method on construct 'E_Fm2_Op_Registry_Entry' or make non-cancelable
         operation if this function is not provided,
      -- added 'e_fm2_operation_abort' call to cancel efm2 operation,
      -- added method '_e_fm2_operation_abort_internal' that represent efm2
         default handler of operation cancelling,
      -- 'done' and 'total' fields of 'E_Fm2_Op_Registry_Entry' changed to
         off_t type, also all message handlers modified to work with it
         (to show progress for large files correctly),
      -- improved file operation progress processing,
      -- added cancel button to operation progress gadget in filemanager window,
      -- added delete file glyph to operation progress gadget,
      -- improved status message for efm2 operation progress.

   3. Filemanager slave:
      -- fixed critical bug in message handling via stdin/stdout,
      -- fixed critical bug in removing task from list,
      -- improved 'E_FM_OP_ABORT' handling,
      -- fix rollback counting on moving files.

   4. Fileman_opinfo module:
      -- a new theme writed: status string and gadget for view operation status
         in summary and detail modes,
      -- summary mode: operation glyph, state message, progressbar, abort button,
      -- detail mode: all for summary + from filename, to filename,
      -- summary/detailed button works as trigger,
      -- added source of module theme and used images.
      
   4. Pathbar module:
      -- non-critical fix, just for safety.

   Also patch contains several minor updates to serve main task.


SVN revision: 41224
2009-06-29 14:38:03 +00:00
Cedric BAIL c82f19e052 * e: Remove all reference to Evas_Data and move to Eina_Bool.
SVN revision: 41080
2009-06-17 13:46:54 +00:00
Davide Andreoli 1bfc6fd633 * Better dialogs (rename, overwrite etc) for efm
SVN revision: 39788
2009-03-29 01:24:11 +00:00
Davide Andreoli 44883d6cf0 * e_fm_op_registry : rename duration to eta
* e_fm_op : report sizes (done and total) now refer to the whole task, not the single file
 * e_fwin : better operation monitor label (and add a delay on delete)



SVN revision: 39787
2009-03-29 00:26:43 +00:00
Gustavo Sverzut Barbieri 15b8d85967 e_fm_op: fix simpe operations report.
SVN revision: 39549
2009-03-18 14:07:34 +00:00
Gustavo Sverzut Barbieri e636f913c5 e_fm_op: cleanup and fix memory leaks.
* reduce variable scope to avoid bugs.

 * add missing free(d)

 * move invariant snprintf() out of loop



SVN revision: 39548
2009-03-18 14:06:22 +00:00
Gustavo Sverzut Barbieri 92cab40cda add filemanager operation registry.
This huge commit will add e_fm2_op_registry, a central place that will
store all on-going operations. You will find that it will report when
operations are added, remove and when they change, for example when
they change progress.

Please notice that the recommended way to present information is to
add listener to specific entries, as opposed to use
E_EVENT_FM_OP_REGISTRY_CHANGED since it will be called immediately and
you do not have to filter which entry is being changed.

Entries will be associated with the e_fm object that originated
it. With that one can get the Ecore_X_Window and request the window to
be raised from somewhere else (ie: gadman/gadget). If object is
deleted (ie: window is closed), the pointer will be made NULL and it
will be a "windowless operation".

TO DO (I need someone to do those):

  - e_fwin: windows should present on-going operations as an overlay,
    Dave Andreolli already started such work, it's just a matter of
    using the new infrastructure.

  - create a new gadget that present all on-going operations and maybe
    a history. It would be nice to show the e_fwin of if the entry is
    clicked, as well as a cancel button and a progress bar. See
    "places" module, make them similar.




SVN revision: 39541
2009-03-18 01:33:06 +00:00
Gustavo Sverzut Barbieri b0c84e2215 Fix problems reported by clang.
By: Luis Felipe Strano Moraes



SVN revision: 39263
2009-02-26 22:47:20 +00:00
Gustavo Sverzut Barbieri 59cde6a762 fm: handle symbolic links.
Symbolic links are handled similar to "paste". If you "Copy" you'll
get the "Link" menu item that will create a symbolic link instead of
real copying the file.

Drag and Drop works similarly, use "Alt" in order to get a popup and
select "Link" there.

Toma: we do miss icons for it!

Mekius & Ptomaine: please review as I'm not that familiar with e_fm_op.c



SVN revision: 39170
2009-02-24 05:22:14 +00:00
Gustavo Sverzut Barbieri 78c70d7f94 fix sting bugs with e_fm and fileman.
* simplify eina_stringshare usage with _eina_stringshare_replace();
 * do not modify the string in stringshare as in e_fm2_parent_go();
 * use custom_theme_content instead of custom_theme in e_fm2_custom_theme_content_set().

Hopefully this will break nothing, but further analysis if it's
leaking strings in the stringshare should be done.



SVN revision: 38559
2009-01-12 19:52:35 +00:00
Christopher Michael 74841f4441 Formatting fixes. Still a lot more here to fix :(
SVN revision: 37753
2008-11-22 21:39:35 +00:00
Nicholas Hughart 5355946552 Fix a bug that was deleting a directory when you moved it into itself.
SVN revision: 37743
2008-11-22 08:48:36 +00:00
Christopher Michael 25102ccbcb Fix lots of nasty formatting problems & remove whitespace.
SVN revision: 37667
2008-11-15 19:44:31 +00:00
Sebastian Dransfeld ab62c5ccf1 Fix if formatting.
SVN revision: 37207
2008-10-27 07:34:22 +00:00
Sebastian Dransfeld caa810894e Fix print formatting
SVN revision: 37205
2008-10-27 07:33:59 +00:00
Cedric BAIL 1087de2397 Remove Evas list and replace them with Eina list.
No change for ->next and ->data access right now, as the patch is already
big enough.



SVN revision: 36962
2008-10-22 11:49:33 +00:00
ptomaine 32d4a6fcb5 EFM: fix slave process from segfaulting.
SVN revision: 36759
2008-10-17 15:30:32 +00:00
Cedric BAIL 3d6749983b Switch to eina_stringshare.
This could also change the usage of string share in E17.



SVN revision: 36679
2008-10-15 15:12:56 +00:00
ptomaine d76e4749de EFM: try to fix a problem with large files on 32-bit systems.
SVN revision: 36286
2008-09-28 10:25:14 +00:00
ptomaine 4a68e74291 Do not quit if we're waiting for an error response.
SVN revision: 36251
2008-09-25 12:52:25 +00:00
ptomaine 6a7be50f33 Make e_fm_op.h look like other headers.
SVN revision: 36180
2008-09-23 11:27:34 +00:00
Sebastian Dransfeld 8467896cf1 include limits.h for PATH_MAX
SVN revision: 35450
2008-08-12 19:04:01 +00:00
Nicholas Hughart e177bb663f Patches from ptomaine.
* Fix for URI escpaing.
 * Add the ability for EFM to recognize different drop actions from other FMs.  The reverse soon to come :)
 * Add option to disable HAL device icons on the desktop.
 * Performing an operation on multiple files will now be done in a single slave process instead of many.

 More to come before and after GSOC :)  If you see him in the channel, give him a high five because he's finally helped pull EFM out of the crapper :P


SVN revision: 35432
2008-08-11 02:13:22 +00:00
Carsten Haitzler 7a0153e3e6 gusev's mkdir/ls patches.
SVN revision: 35229
2008-07-26 13:15:57 +00:00
Sebastian Dransfeld b66b3d7d90 formatting
SVN revision: 35223
2008-07-25 21:32:28 +00:00
Nicholas Hughart 634f26b04f New efm_op stuff from ptomaine. Test it out, try many different cases of copying/moving/removing etc. Right now progress for operations is just printed on STDOUT, but this will hopefully change soon (Something I've started already). If you find any bugs, send them to the list and/or notify ptomaine and/or myself. If someone wants to be a formatting nazi go ahead and check the formatting, I gave it a quick scan and it seemed close. More to come :)
SVN revision: 35178
2008-07-21 04:12:39 +00:00