Commit Graph

142 Commits

Author SHA1 Message Date
Sebastian Dransfeld 3bf3e34ff4 Revert local hash cache
SVN revision: 56623
2011-02-01 09:23:05 +00:00
Sebastian Dransfeld 90dcedff5e TODO--
SVN revision: 56604
2011-01-31 11:46:01 +00:00
Sebastian Dransfeld 62ca03731a Remove TODO
SVN revision: 56602
2011-01-31 11:45:40 +00:00
Sebastian Dransfeld e3e3b2a204 Always use icon cache, remove old code
SVN revision: 56590
2011-01-31 11:43:31 +00:00
Sebastian Dransfeld dd3a72dc33 Fix memleak
SVN revision: 56587
2011-01-31 11:27:46 +00:00
Sebastian Dransfeld 978741a789 doc
SVN revision: 56326
2011-01-27 17:49:45 +00:00
Sebastian Dransfeld c4fdbe3a66 fix parameter name
SVN revision: 56322
2011-01-27 17:43:15 +00:00
Sebastian Dransfeld 8babc062be delay closing of icon theme cache
SVN revision: 55502
2010-12-11 20:37:17 +00:00
Sebastian Dransfeld 18dea4b9f8 And recreate hash after deletion
SVN revision: 55400
2010-12-09 09:12:12 +00:00
Sebastian Dransfeld de36c69b16 flush icon theme cache before closing eet file
SVN revision: 55399
2010-12-09 08:57:06 +00:00
Sebastian Dransfeld 55404c7134 enable icon theme cache
SVN revision: 55398
2010-12-09 08:56:56 +00:00
Sebastian Dransfeld b525e964d0 free iterator after usage
SVN revision: 55396
2010-12-09 08:56:36 +00:00
Sebastian Dransfeld ac51f4ead3 Fix very weird double looping
Not need to extract keys from hash, then loop keys to find data.

SVN revision: 55395
2010-12-09 08:56:23 +00:00
Sebastian Dransfeld d104d2e745 Add icon theme cache
Not used yet.

SVN revision: 55384
2010-12-08 21:39:43 +00:00
Sebastian Dransfeld 649aa06958 simplify code
SVN revision: 55262
2010-12-04 15:13:47 +00:00
Sebastian Dransfeld 802339c2c0 Add cache usage for efreet_icon_list_find()
SVN revision: 55261
2010-12-04 13:59:48 +00:00
Sebastian Dransfeld 9e3be1a1a4 use eina_hash_direct_add
use eina_hash_direct_add where we use a struct member as key

SVN revision: 55193
2010-12-03 14:53:01 +00:00
Cedric BAIL 64a612ef38 * efreet: simplify code.
SVN revision: 55071
2010-11-29 18:42:48 +00:00
Sebastian Dransfeld caaf7ab25f formatting
SVN revision: 55037
2010-11-27 20:36:39 +00:00
Sebastian Dransfeld 66e52e2829 Rename efreet_icon_private.h to something better
efreet_icon_private.h should be private to external code interacting
with the icon cache, so name it efreet_cache_private.h and only include
Eet.h there.

SVN revision: 55035
2010-11-27 20:15:00 +00:00
Christopher Michael 8719a729ab Fix missing include <Ecore.h> for needed ecore functions
(ecore_time_get, ecore_exe_run, etc, etc).



SVN revision: 55027
2010-11-26 21:32:34 +00:00
Vincent Torri 126c3574c3 fix compilation on Windows
SVN revision: 55021
2010-11-26 17:05:16 +00:00
Cedric BAIL a90e2e4aff * efreet: improve icon cache, increase speed and consume a little
more memory than previous version.

	TODO: efreet_icon_cache_create could be speeded up if we did
	reuse already generated theme instead when doing inherit work.

	NOTE: Let me add a rant against Freedesktop standard. Walking
	around 22731 paths for 3051 icons is insane and that's just for
	one theme ! Maybe they could give me one SSD...


SVN revision: 55018
2010-11-26 14:56:23 +00:00
Vincent Torri d07b011ca8 move Ecore_File.h inclusion to the source file
SVN revision: 55002
2010-11-25 23:52:57 +00:00
Vincent Torri 42f57e9fc3 put alloca declaration after config.h
SVN revision: 55001
2010-11-25 23:48:59 +00:00
Sebastian Dransfeld 14f8c7b24f TODO++--
SVN revision: 54976
2010-11-25 09:41:08 +00:00
Sebastian Dransfeld ffee0081c7 Keep all queried themes in hash
The previous logic would create a fake theme object in
efreet_icon_find_theme_check() if we didn't find the theme. Later in
efreet_icon_theme_dir_scan_all() we would delete this theme, and then
segv. As the user hopefully wont query for a bunch of non existing
themes, and each theme object is fairly small, keep all in hash.

SVN revision: 54975
2010-11-25 09:04:49 +00:00
Sebastian Dransfeld 6be2628e97 revert, name.internal is always set
SVN revision: 54965
2010-11-24 21:34:21 +00:00
Sebastian Dransfeld 58f3f4f363 check if name.internal exists
SVN revision: 54964
2010-11-24 21:31:24 +00:00
Sebastian Dransfeld 748f2423b1 only listen if icon cache is enabled
SVN revision: 54963
2010-11-24 21:29:35 +00:00
Sebastian Dransfeld 04f61e115b we need to monitor each theme dir too
xdg-icon-resource creates and deletes a file called
.xdg-icon-resource-dummy in each dir.

SVN revision: 54962
2010-11-24 21:18:56 +00:00
Sebastian Dransfeld 54ec9cec67 listen to changes for icon dirs
SVN revision: 54957
2010-11-24 21:10:52 +00:00
Sebastian Dransfeld 7e584e6293 ecore is handled in main
SVN revision: 54887
2010-11-23 13:30:51 +00:00
Sebastian Dransfeld 7b68d53abc fix fallback icon searching
SVN revision: 54831
2010-11-22 20:51:34 +00:00
Sebastian Dransfeld bdb6cdffd0 read fallback icon from cache
SVN revision: 54828
2010-11-22 20:50:46 +00:00
Sebastian Dransfeld d2b2019675 We always need to to the tasks in init on init
SVN revision: 54820
2010-11-22 20:48:24 +00:00
Sebastian Dransfeld a16314cd88 init ecore in main init
SVN revision: 54781
2010-11-22 14:15:40 +00:00
Sebastian Dransfeld 93429120f9 If only one path, only check extension
SVN revision: 54780
2010-11-22 14:15:30 +00:00
Carsten Haitzler 1c34083001 lets... use our return value shall we? <- THATS the missing icons bug
i was telling you about!



SVN revision: 54776
2010-11-22 09:47:36 +00:00
Sebastian Dransfeld 027c174f9d Find icons in cache
SVN revision: 54616
2010-11-16 21:50:53 +00:00
Sebastian Dransfeld e4c39fa555 export depcreated user dir
SVN revision: 54581
2010-11-16 10:32:01 +00:00
Sebastian Dransfeld 2849f58ca9 Remove duplicate code, mark strict spec
SVN revision: 54579
2010-11-16 08:28:52 +00:00
Sebastian Dransfeld e8ce2014b0 TODO++
SVN revision: 54574
2010-11-15 21:07:05 +00:00
Sebastian Dransfeld bc9f811710 remove duplicate code, and mark strict spec
SVN revision: 54572
2010-11-15 21:04:42 +00:00
Sebastian Dransfeld 7545e54203 Let efreet icon return const
We return a pointer to an internal cache, so no need to do strdup. I we
implement a cache, the pointer will be a return from a mmap'ed file, so
no need to do strdup.

A bit late to do an API break, but must be done.

SVN revision: 54372
2010-11-09 20:15:55 +00:00
Cedric BAIL 5cec7beb53 * efreet: little speedup for icon lookup.
But really you should not call it as it will call stat for
	every path it guess an icon could be in. For example, elementary_test
	Toolbar 5 trigger 41132 call to stat on random place on your harddrive.


SVN revision: 54339
2010-11-08 18:09:25 +00:00
Sebastian Dransfeld 1a12537dfd delay deletion of non valid themes
We need to delay deletion of non valid themes until all possible search
dirs are scanned. In Ubuntu 10.10 XDG_DATA_DIRS lists /usr/local/share
before /usr/share, so when searching for hicolor /usr/local/share is
dropped as a valid dir although it exists as it does not contain an
index.theme file.

SVN revision: 53882
2010-10-25 20:20:41 +00:00
Lucas De Marchi 67771ee617 Fix common misspellings
Following misspellings were fixed:

acheive->achieve
appart->apart
isnt->isn't
succesfully->successfully
taht->that



SVN revision: 51987
2010-09-08 11:27:59 +00:00
Lucas De Marchi 5a8a8c9014 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
Cedric BAIL ba22eb6af8 * efreet: less warning by Albin Tonnerre.
SVN revision: 51247
2010-08-17 12:03:10 +00:00