as far as I can tell, it's perfect for non-headers
header example following as soon as I finish making it space EINA_XYZ() args properly
SVN revision: 53774
using str1 == str2 instead of strcmp assuming all strings are
stringshared. dont ASSUME this unless you 100% KNOW for sure they are.
bad disco stu!
SVN revision: 53128
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
* 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
That is why stringshare returns "const char*".
ZMike, pay attention to these cases. I know this one was particularly
nasty to spot since you receive the "const char *path", but later on
you request strrchr(path..) and receive "char *p", the cast is done
implicitly by libC to make all the case works (C++ version fixed this
recently, but in C there is no way).
The crash that lead me to investigate it was spot by Lucas De Marchi
at advanced wallpaper dialog, but actually other places that uses efm
should be equaly broken.
SVN revision: 48508
Only emit "selected" on mouse up if we are in single click mode and no
modifiers is set.
Need to check for single_click first, so that inplace_open isn't called
on doubleclick.
Fixes ticket 375
SVN revision: 45130
to error, abort or overwrite dialogs.
2. Glyph in fileman_opinfo theme that show have or not operation linked
filemanager window.
3. When click on operation on fileman_opinfo, then linked efm window
raised or attention dialog if error exist.
SVN revision: 41229
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
Here's another patch I've made for efm2 to fix an issue that I've
often experienced using it (in Illume) with a touch-screen
device (Freerunner). It often happens a very strange thing: I
try to finger-scroll a bottom icon (it must be on the latest row)
moving my thumb up, well... The the scroller doesn't scroll, but
wherever and whenever I release my finger, the selected icon is
executed!
I don't really know to what is this due (the touchscreen seems to
perform correctly by the way), but I've never been able to
replicate it using a mouse in my PC.
Anyway to fix this issue, that could be specific, I've used a
workaround that I think that could be applied for all: it
basically checks if the mouse has been released in the area where
the clicked icon is, before sending a "selected" callback.
It needs the previously attached
e_fm2-single-click-delay-support.patch to be applied correctly.
Going deeply into the real issue I've made some tests, and I got
that this seems mostly due to an evas issue (I figure), since the
e_fm2's scrollframe never sets the evas event flag to:
EVAS_EVENT_FLAG_ON_HOLD
(that would avoid the un-wanted click).
After some debugging there, I've also seen that in this very
particular buggy case the _e_smart_event_mouse_up() and
_e_smart_event_mouse_move() callback functions are never
called (so I figure that evas doesn't add the callbacks at all
for the scrollframe, while they are added in the e_fm2).
Let me know what you think about this... I thing that the Om
users would need a fix like this.
By: Marco Trevisan (Treviño)
SVN revision: 41129
avoiding the un-wanted clicks with touch-screen devices (especially if
they aren't so precise); it basically allows to set a time delay to be
awaited (pressing over an icon) before sending a "selected" callback.
Thanks to this, it could be needed a longer pressure to select an item
in the file-manager; useful for embedded/touch-based systems.
By: Marco Trevisan (Treviño)
SVN revision: 41127
1. Added E_FM_OP_EJECT command to e_fm_main. It unmounts volume
before eject, if it necessary.
2. Added timeouts of mounting/unmounting/ejecting media, and
it's moved to slave e_fm_main.c. Each timeout will generate
*_MOUNT_ERROR, *_UNMOUNT_ERROR and *_EJECT_ERROR message.
3. Added auto mount on insert media and auto showing efm2 window
on mount volume options to filemanager config.
4. Added mounted/unmounted glyphs to efm2 icons and track state
code. Now each removable device have "M" glyph on icon if mounted
and "U" when unmounted.
5. Added mount/unmount/eject commands to icon dropdown menu.
6. Russian translation of mew messages.
7. Other bugfixes and improvements for co-operation.
Now, efm2 contains all code to mount/umnount/eject removable media and
all code to provide corresponding user interface.
It can working independently from 'places' or co-operate with it.
By: Sergey Semernin
SVN revision: 40928
Now, when "open dirs in place" is active and user haven't permission to
open dir, efm2 fallback to parent directory. Also other events (for ex.
delete)
on dirs opened in efm will cause go to it's parents in efm windows.
Patch to ticket #273.
By Sergey Semernin.
SVN revision: 40711
This was spotted by a segmentation faults on systems where sprintf()
don't handle NULL as "%s" (Solaris, BSDs), but it makes no sense to
lookup "*(null)" as extension on Linux either.
Reported by: mcalamell
SVN revision: 40120
This cleanup replaces snprintf() usage with specific calls, they have
the benefit of being cleaner (so easier to grep), typing less and also
marginal speed up compared to the other (specially concat_static),
although those are rarely used in critical paths.
I'm testing it for some time and seems to not break anything, but let
me know of any problem. If you can review the patch and try to spot
incorrect names, please do.
SVN revision: 40014
I was replicating this code in many places, it should go into eina itself.
It's the right way to change strings that you don't know are
stringshared before, since it will first add a reference and then
remove, making it impossible to have references to go 0 and string
being released before adding new references, fixing the following
possible problem:
x = eina_stringshare_add("x");
replace(x, x);
then:
incorrect_replace(const char **b, const char *a) {
eina_stringshare_del(*b); /* reference gets to 0 */
eina_stringshare_add(a); /* BUG!!! */
*b = a;
}
SVN revision: 39903
* 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
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
- _e_fm2_typebuf_match has the new argument 'next'; one can now go to the prev/next match with up/down keys while typebuffer is active
SVN revision: 39534
between all ecore graphic engine to ease porting of application and reduce the amount of
specific code per engine. This patch does just that.
All your application should continu to work has previously, if it's not the case
please report any new behaviour regarding mouse and keyboard.
SVN revision: 39505
You will probably loose desktop icons until you get a fresh profile. Or you can edit the
.desktop files in .e/e/fileman/favorites (new icons name are: user-desktop, user-home, computer and user-temp)
Sorry for bothering... the next commit should be the last ;)
SVN revision: 39419
e_util_menu_item_fdo_icon_set to e_util_menu_item_theme_icon_set
As it looks for icons in e theme AND in fdo icon themes.
* Use the new function everywere instead of e_util_menu_item_edje_icon_set,
that is now marked as DEPRECATED
You should not see any difference with this commit. With the next few commit I'm
going to rename all the icons in the theme following fdo standard. I will not change
any icons, just rename them to match fdo ones.
SVN revision: 39370
Please add the following to your /etc/mime.types:
application/x-edje edj
And the following to your ~/.e/e/config/$PROFILE/e.cfg (see hint below):
group "mime_icons" list {
group "E_Config_Mime_Icon" struct {
value "mime" string: "application/x-edje";
value "icon" string: "THUMB";
}
}
or just remove your settings and choose a newly installed profile.
How to edit your ~/.e/e/config/$PROFILE/e.cfg:
PROFILE=`eet -x ~/.e/e/config/profile.cfg config /dev/stdout`
eet -d ~/.e/e/config/$PROFILE/e.cfg config ~/.e/e/config/$PROFILE/e.src
$EDITOR ~/.e/e/config/$PROFILE/e.src
eet -e ~/.e/e/config/$PROFILE/e.cfg config ~/.e/e/config/$PROFILE/e.src 1
SVN revision: 39348
This cache is very simple and should work fine when system does not
change, it keeps a direct association of mime-types and found icons,
remembering theme and icon size. Search is very fast since it uses
stringshared strings and thus direct pointer comparison in hash
search. We could optimize it even more if we assumed stringshared
strings to come in, so no need to eina_stringshare_add() (which is a
hash per se), using just eina_stringshare_ref().
Cache population is limited to compile-time value and just values
older than a given threshold are deleted. I do not keep a LRU explicit
list, so you might have some old but unused items always alive. I
don't find this too bad, sure it will consume more memory, but will
not hurt performance. We can change this to purge all expired items by
not checking for number of items to remove, removing all that match.
Next I plan to find out a good way to cache and speed up file->mime
discovery. I plan to do auto-generated state-machine to match
extensions, so you don't need to check the same extension character
more than once. Example:
Input: bla.edc
Extensions: edc edj eps png bmp
It would first try to match against 'e', 'p' and 'b'. It will match
'e' and then check for 'd' (edc or edj) or 'p' (eps). It will match
'd' and then check for 'c' or 'j'. This will reduce number of
comparisons considerably.
As I'm running out of time (4am, not much time left on this month), I
could use some help here.
SVN revision: 39343
Now flags do not negate, rather specify if things should be used. This
will help us be compatible with original behavior and actually just
e_fwin is using that.
SVN revision: 39340
* Make the fileman menu as it is in Places module (still need to fix icons)
Just a doubt:
why efm was called using ecore_idle_enterer_add ? it is necessary ? I need to reenable it?
SVN revision: 39335
oops, were using realpath and not path!
PS: still segfaults on some cases, related to mouse up callback being
called on already deleted icons, that should not happen as objects are
unrealized before being deleted. Need to investigate.
SVN revision: 39329
with these you can opt to ignore things like custom directory options,
very useful for widgets to choose files (e_widget_fsel) since you
don't want them to show your items as 128x128 :-)
SVN revision: 39322
This almost remove need of e_fm_mime.c since it will use efreet, but
may bring some slowdowns due efreet. In this case let's try to
optimize efreet and improve everything.
SVN revision: 39315
* split e_fm2_icon_get() to make it reuse more code paths.
* lots of new internal functions with _e_fm2_icon_ prefix are born,
try to reuse them as much as possible so we have less places to
change if we move to something else (hint: using FreeDesktop.Org
icons)
* optimize e_fm2_icons_update() and few others to do not copy
sd->realpath all the time, it is loop invariant there.
* comparison of mime icon "DESKTOP" and "THUMB" are now fast pointer
comparison since they're all eina_stringshare'd.
* themes can now differentiate between file types, like 'fifo',
'socket' or even 'executable'.
* common extension comparisons are bit faster, not using glob pattern
matching but rather reusing code to find out last '.' and then
comparing them in optimal way. I added E_FM2_SIMPLE_STRCASE_FILES
to make it even faster if one wants, left disabled by now.
SVN revision: 39313
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
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
e_fm2_custom_file now remembers directory settings, it will save
position on screen (horizontal and vertical pan percentage), view mode,
icon size, if to remember ordering and if it should show hidden files.
There is a menu option to remove these settings and inherit settings
from parent.
SVN revision: 39031
* 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
But is so big i fear i could have broken some piece of code. So report any wrong
behaviour to me (cedric on #edevelop).
So moving e17 and efreet to eina_hash. With a little efreet API break so they
must come together.
SVN revision: 38185