Re: [E-devel] E SVN: raster trunk/evas/src/lib/canvas
I would Agreetho are those in the past that say we have done just that. Isn't that what we do...duplicate code ? :P.well after a while doesn't that code become better?? Long Live E dh (cpm) Enlightenment SVN wrote: Log: dont repeat code Author: raster Date: 2008-10-26 20:12:59 -0700 (Sun, 26 Oct 2008) New Revision: 37191 Modified: trunk/evas/src/lib/canvas/evas_object_textblock.c Modified: trunk/evas/src/lib/canvas/evas_object_textblock.c === --- trunk/evas/src/lib/canvas/evas_object_textblock.c 2008-10-27 03:03:59 UTC (rev 37190) +++ trunk/evas/src/lib/canvas/evas_object_textblock.c 2008-10-27 03:12:59 UTC (rev 37191) @@ -2682,22 +2682,11 @@ _prepend_escaped_char(Evas_Textblock_Cursor *cur, const char *s, const char *s_end) { - const char *map_itr, *map_end; - - map_itr = escape_strings; - map_end = map_itr + sizeof(escape_strings); - - while (map_itr map_end) - { - if (_is_eq_and_advance(s, s_end, map_itr, map_end)) - { - evas_textblock_cursor_text_prepend(cur, map_itr); - return; - } - - if (map_itr map_end) - _advance_after_end_of_string(map_itr); - } + const char *escape; + + escape = _escaped_char_get(s, s_end); + if (escape) + evas_textblock_cursor_text_prepend(cur, escape); } /** - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-svn mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-svn - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: englebass trunk/e/src/bin
damn Seb...most all we do is format... dh Enlightenment SVN wrote: Log: Fix while formatting. Author: englebass Date: 2008-10-27 00:34:45 -0700 (Mon, 27 Oct 2008) New Revision: 37209 Modified: trunk/e/src/bin/e_fm_main.c Modified: trunk/e/src/bin/e_fm_main.c === --- trunk/e/src/bin/e_fm_main.c 2008-10-27 07:34:34 UTC (rev 37208) +++ trunk/e/src/bin/e_fm_main.c 2008-10-27 07:34:45 UTC (rev 37209) @@ -1206,7 +1206,7 @@ Eina_List *l = _e_fm_tasks; E_Fm_Task *task; - while(l) + while (l) { task = eina_list_data_get(l); if (task-id == id) - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-svn mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-svn - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] evil trouble
Vincent Torri wrote: Hey I had to compile the link code with g++, hence putting IID_PersistFile was not possible (at least, i didn't succeed). So I put the code in a separate file like Lars did. I've attached a patch. Please test it. It compiles correctly on my system. Vincent compiles fine here too. patch didnt apply cleanly from latest svn tho, configure.ac and makefile.am i manually resolved having it depend on c++ for such a small thing IMHO aint all that great.. (i was going to apply lars's patch to test, but since it worked i wasnt going to mess furthur) changing CHECK_HEADERS_ONCE wasnt necessary so i didnt put that part in you ppl are awesome thx ps.. looks like eina uses pkgconfig macro in its configure script to find evil and ememoa. so I suggest editing the wiki slightly :) - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] evil trouble
On Mon, 27 Oct 2008, Samuel Nicholas wrote: compiles fine here too. ok patch didnt apply cleanly from latest svn tho, configure.ac and makefile.am i manually resolved yes, I know, but didn't have time this morning to fix that. having it depend on c++ for such a small thing IMHO aint all that great.. (i was going to apply lars's patch to test, but since it worked i wasnt going to mess furthur) actually, it's better to have c++ here: the COM interface (used for generating .lnk files) is C++, it's simpler than using the C interface. In additin, i am not sure that the previous code were working correctly... changing CHECK_HEADERS_ONCE wasnt necessary so i didnt put that part in it was for me. Problem with autoconf... I'll check again. ps.. looks like eina uses pkgconfig macro in its configure script to find evil and ememoa. so I suggest editing the wiki slightly :) Indeed. I'll do that this evening. thank you Vincent - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] can't focus on swallowed part (Gustavo Sverzut Barbieri)
On Mon, Oct 27, 2008 at 12:55 AM, dongmei zhou [EMAIL PROTECTED] wrote: hi, the minimum working sample of the problem and the backtrace : self.meeting = edje.Edje(self.ee.evas, file=self.edje_file, group=sub_menu) self.meeting_icon=edje.Edje(self.ee.evas, file=self.edje_file, group=meeting_icon) self.meeting.part_swallow(contents,self.meeting_icon) self.main_group.part_swallow(sub_menu_contents,self.meeting) self.meeting.signal_emit(transition,in,source) self.main_group.focus =False self.main_group.part_object_get(sub_menu_contents).focus =True self.main_group.show() when I clicked the meeting_icon it still output : Mouse Clicked: sub_menu_contents not the corresponding icon clicked . I don't know what the proble is ? the problem is that focus has nothing to do with mouse, it's just to know to which object keyboard events will go, and be aware that these events will be dispatched to parent objects (those that you do member_add, like swallow does). Possible you have something with mouse_events:1 (the default) on top of your swallow, or your swallowed icon has mouse_events:0 and are not capturing the events. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: [EMAIL PROTECTED] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: barbieri IN trunk/evas/src/lib: . canvas
Gustavo wrote: On Mon, Oct 27, 2008 at 12:22 AM, Enlightenment SVN [EMAIL PROTECTED] wrote: Log: add evas_object_box. Box is a smart object to help with the common task of laying out lots of objects. It's very flexibile and one can customize the layout function on a per-object basis dynamically, just set a new layout function (the most common are provided). By default layouts use size hints from children to do their work, but one can also add new properties, just subclass with evas_object_smart_smart_set() and then define your own option_* callbacks. This code was ported from Guarana (widgets/sequence_box.c) with permission of ProFUSION embedded systems so it can be relicensed from LGPL to Evas license. Original author: Gustavo Lima Chaves [EMAIL PROTECTED] Port: Gustavo Sverzut Barbieri [EMAIL PROTECTED] This code is part of our effort to unify common code into base libs, where its worth to avoid duplicating code over and over again. With that in Evas, we can now expose it in Edje and use it in Guarana and Elementary and possible any other toolkit. It uses Evas_Object's size hints infrastructure, but can be extended to have its own properties if one wish. Attached is a test case and example. You can try to hack your own fancy layout function, it's it's generic and useful to others, add it to evas as well (Like layout using a Bezier or any other path). People implementing Ecore Evas can now use layout stack and ecore_evas_object_associate() to provide the main window concept, just add your background and then your object to the evas_object_box and associate this box to the window. If you want your background to scale in both directions, just set it's aligns to -1.0 and -1.0. This is the kind of thing that I hoped evas would avoid tending to, and yet both raster and gustavo seem prone to want to get into. :( I know it's tempting to add more and more specialized layout/widgetry 'objects' to the core evas lib/api, but I think it's a big mistake for evas in the long run. It's not hard to start extending evas *and* edje to allow for custom objects, even if at first all such object modules need to access evas internals. Adding these kinds of things, whether text-grid objs, or box objs, or table objs, etc.. directly into the evas lib api is likely to become 'not a good idea'. Get help now! Click to find the right drug rehab solution for you. http://thirdpartyoffers.juno.com/TGL2141/fc/Ioyw6i3nCeLigAmJXBfTuEsSFYmM6hirn9RsaONj83V0V7Xrmvw3qE/ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: barbieri IN trunk/evas/src/lib: . canvas
On Mon, Oct 27, 2008 at 8:29 AM, Jose Gonzalez [EMAIL PROTECTED] wrote: Gustavo wrote: On Mon, Oct 27, 2008 at 12:22 AM, Enlightenment SVN [EMAIL PROTECTED] wrote: Log: add evas_object_box. Box is a smart object to help with the common task of laying out lots of objects. It's very flexibile and one can customize the layout function on a per-object basis dynamically, just set a new layout function (the most common are provided). By default layouts use size hints from children to do their work, but one can also add new properties, just subclass with evas_object_smart_smart_set() and then define your own option_* callbacks. This code was ported from Guarana (widgets/sequence_box.c) with permission of ProFUSION embedded systems so it can be relicensed from LGPL to Evas license. Original author: Gustavo Lima Chaves [EMAIL PROTECTED] Port: Gustavo Sverzut Barbieri [EMAIL PROTECTED] This code is part of our effort to unify common code into base libs, where its worth to avoid duplicating code over and over again. With that in Evas, we can now expose it in Edje and use it in Guarana and Elementary and possible any other toolkit. It uses Evas_Object's size hints infrastructure, but can be extended to have its own properties if one wish. Attached is a test case and example. You can try to hack your own fancy layout function, it's it's generic and useful to others, add it to evas as well (Like layout using a Bezier or any other path). People implementing Ecore Evas can now use layout stack and ecore_evas_object_associate() to provide the main window concept, just add your background and then your object to the evas_object_box and associate this box to the window. If you want your background to scale in both directions, just set it's aligns to -1.0 and -1.0. This is the kind of thing that I hoped evas would avoid tending to, and yet both raster and gustavo seem prone to want to get into. :( I know it's tempting to add more and more specialized layout/widgetry 'objects' to the core evas lib/api, but I think it's a big mistake for evas in the long run. It's not hard to start extending evas *and* edje to allow for custom objects, even if at first all such object modules need to access evas internals. Adding these kinds of things, whether text-grid objs, or box objs, or table objs, etc.. directly into the evas lib api is likely to become 'not a good idea'. this requires no access to internals, it's just a helper to avoid spreading this code everywhere (e_box, guarana, elementary, etk...). the point is, raster always planned to have dynamic layout options in Edje, so it's possible to specify in Edje if you want a stack, vertical or horizontal layout and in code you add the objects. To add this we need this kind of code. We could create yet another library (like split esmart into edje independent and dependent code) and add this there, make edje dependent on it, but it will be lot of work to get a simple and useful code in. Since evas already have internal libs in it, at some point we can create a libevas_utils and users can optionally link to it. That way we keep things in a common place and avoid extra overhead. Our point is to do now what others should have done already: unify stuff. Size hints, box, editable text block and these stuff should go in Evas and make it easy to share stuff and easier to use EFL. I always hear, at least from ETK, that some things were re-done in ETK just to work around some problems in Evas or Edje, I consider that wrong, these stuff should be fixed there, and that's what we're doing. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: [EMAIL PROTECTED] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] tiny patch eina for FreeBSD
From: Ravenlock [EMAIL PROTECTED] Subject: Re: [E-devel] [PATCH] tiny patch eina for FreeBSD Date: Mon, 27 Oct 2008 08:56:55 -0500 On 10/26/2008 07:56, Joerg Sonnenberger wrote: On Sat, Oct 25, 2008 at 01:18:25PM -0500, Ravenlock wrote: eina build failed on FreeBSD, so I made FreeBSD patch. In SVN! :) Please invert that patch. CLOCK_PROF is mostly present, the alternative not. E.g. linux clock if present, otherwise CLOCK_PROF or CLOCK_REALTIME as last line of fallback. You prefer: #ifdef __linux__ CLOCK_PROCESS_CPUTIME_ID #else CLOCK_PROF -or- CLOCK_REALTIME #endif because CLOCK_PROCESS_CPUTIME_ID is not implemented on *many* platforms, but known to linux? I suggest: #if defined(CLOCK_PROCESS_CPUTIME_ID) defined(__linux__) # define CLOCK CLOCK_PROCESS_CPUTIME_ID #elif defined(CLOCK_PROF) defined(__FreeBSD__) # define CLOCK CLOCK_PROF #else # define CLOCK CLOCK_REALTIME #endif return clock_gettime(CLOCK, tp); #undef CLOCK Best regards. -=-=-=-=-=-=-=-=- Naruto TAKAHASHI [EMAIL PROTECTED] Joerg - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Regards, Ravenlock Index: src/lib/eina_counter.c === --- src/lib/eina_counter.c (revision 37247) +++ src/lib/eina_counter.c (working copy) @@ -76,11 +76,15 @@ static inline int _eina_counter_time_get(Eina_Nano_Time *tp) { -#ifdef __linux__ - return clock_gettime(CLOCK_PROCESS_CPUTIME_ID, tp); +#if defined(CLOCK_PROCESS_CPUTIME_ID) defined(__linux__) +# define CLOCK CLOCK_PROCESS_CPUTIME_ID +#elif defined(CLOCK_PROF) defined(__FreeBSD__) +# define CLOCK CLOCK_PROF #else - return clock_gettime(CLOCK_PROF, tp); +# define CLOCK CLOCK_REALTIME #endif + return clock_gettime(CLOCK, tp); +#undef CLOCK } #else static int EINA_COUNTER_ERROR_WINDOWS = 0; - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] tiny patch eina for FreeBSD
On Mon, Oct 27, 2008 at 08:56:55AM -0500, Ravenlock wrote: You prefer: #ifdef __linux__ CLOCK_PROCESS_CPUTIME_ID #else CLOCK_PROF -or- CLOCK_REALTIME #endif because CLOCK_PROCESS_CPUTIME_ID is not implemented on *many* platforms, but known to linux? Either that or even #ifdef CLOCK_PROCESS_CPUTIME_ID CLOCK_PROCESS_CPUTIME_ID #elif CLOCK_PROF CLOCK_PROF #else CLOCK_REALTIME #endif Joerg - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Clipping without color mul?
evas_object_clip_set(..): the resulting color for the clipped object is RESULT = (OBJ * CLIP) / (255 * 255) per color element First of all, I do not understand what this really means, if OBJ and CLIP are 8 bit values the RESULT would be between 0 and 1, so I assume that RESULT is some kind of factor of 255? My real problem is that I want to clip an Evas_Object without having its color multiplied, is this possible? I think it is a little bit strange that evas_object_clip_set would have anything to do with color manipulation in the first place. Are there any benefits of having the clipper affecting the color? /Mikael - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [PATCH] tiny patch eina for FreeBSD
Joerg Sonnenberger wrote: On Mon, Oct 27, 2008 at 11:31:19PM +0900, Naruto TAKAHASHI wrote: #if defined(CLOCK_PROCESS_CPUTIME_ID) defined(__linux__) # define CLOCK CLOCK_PROCESS_CPUTIME_ID #elif defined(CLOCK_PROF) defined(__FreeBSD__) # define CLOCK CLOCK_PROF #else # define CLOCK CLOCK_REALTIME #endif return clock_gettime(CLOCK, tp); E.g. CLOCK_PROF exists on the other BSDs as well. Please, try to keep OS specific ifdefs to the minimal amount. Current code is (without OS specific ifdefs): #if defined(CLOCK_PROCESS_CPUTIME_ID) return clock_gettime(CLOCK_PROCESS_CPUTIME_ID, tp); #elif defined(CLOCK_PROF) return clock_gettime(CLOCK_PROF, tp); #else return clock_gettime(CLOCK_REALTIME, tp); #endif Sebastian - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Clipping without color mul?
On Mon, Oct 27, 2008 at 2:02 PM, Mikael Liljeroth [EMAIL PROTECTED] wrote: evas_object_clip_set(..): the resulting color for the clipped object is RESULT = (OBJ * CLIP) / (255 * 255) per color element First of all, I do not understand what this really means, if OBJ and CLIP are 8 bit values the RESULT would be between 0 and 1, so I assume that RESULT is some kind of factor of 255? My real problem is that I want to clip an Evas_Object without having its color multiplied, is this possible? I think it is a little bit strange that evas_object_clip_set would have anything to do with color manipulation in the first place. Are there any benefits of having the clipper affecting the color? use white color. if you think in terms of relative color, white is 1.0, so color * 1.0 = color, of course this is optimized inside Evas and will have no extra overhead at all. clip + color modulation is used in many ways, the most common is to do fade-in/out effects, you just iterate the clipper's colors from 0 to 255 to fade in and 255 to 0 to fade out. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: [EMAIL PROTECTED] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Efreet mime default application patch
Hi all This is a relly small patch that add 2 functions to Efreet_Mime. EAPI const char* efreet_mime_default_application_get(const char *mime) EAPI void efreet_mime_default_application_set(const char *mime, const char *desktop) The _get function take a mime-type (as 'text/html') and return the name of the desktop file (as 'Firefox.desktop') that should be used to open the given mime-type. The information is readed from the $XDG_DATA_DIRS/applications/defaults.list file, first the user preference file is checked than the system wide. The second one set the preference in the user defaults.list file. With this functions all the applications that use efreet can know witch is the default program to use to open a given mime-type. Hope you like it Dave - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Efreet mime default application patch
...and the attachment ;) the patch is to be applied in the main efreet directory. Dave - Dave Andreoli [EMAIL PROTECTED] ha scritto: Hi all This is a relly small patch that add 2 functions to Efreet_Mime. EAPI const char* efreet_mime_default_application_get(const char *mime) EAPI void efreet_mime_default_application_set(const char *mime, const char *desktop) The _get function take a mime-type (as 'text/html') and return the name of the desktop file (as 'Firefox.desktop') that should be used to open the given mime-type. The information is readed from the $XDG_DATA_DIRS/applications/defaults.list file, first the user preference file is checked than the system wide. The second one set the preference in the user defaults.list file. With this functions all the applications that use efreet can know witch is the default program to use to open a given mime-type. Hope you like it Dave - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel Index: src/lib/efreet_mime.c === --- src/lib/efreet_mime.c (revisione 37249) +++ src/lib/efreet_mime.c (copia locale) @@ -86,6 +86,7 @@ static int efreet_mime_glob_match(const char *str, const char *glob); static int efreet_mime_glob_case_match(char *str, const char *glob); static int efreet_mime_endian_check(void); +static const char*efreet_mime_default_get(const char *file, const char *mime); static void efreet_mime_monitor_add(const char *file); static void efreet_mime_cb_update_file(void *data, @@ -317,6 +318,69 @@ } /** + * @param mime: The mime type to check (ex. 'text/html' or 'x-directory/normal') + * @return Returns The name of the .desktop file to use to open the given mime type. Remember to free the value with eina_strinshare_del() + * @brief Retreive the application to use to open a give mime type + */ +EAPI const char* +efreet_mime_default_application_get(const char *mime) +{ +Ecore_List *dirs; +char *dir; +char buf[PATH_MAX]; +const char *ret = NULL; + +if (!mime) return NULL; + +//Search user defaults.list file +snprintf(buf, sizeof(buf), %s/applications/defaults.list, efreet_data_home_get()); +if ((ret = efreet_mime_default_get(buf, mime))) +return ret; + +//Search system defaults.list file +dirs = efreet_data_dirs_get(); +if (dirs) +{ +ecore_list_first_goto(dirs); +while ((dir = ecore_list_next(dirs))) +{ +snprintf(buf, sizeof(buf), %sapplications/defaults.list, dir); +ret = efreet_mime_default_get(buf, mime); +if (ret) +break; +} +} + + return ret; +} + +/** + * @param mime: The mime type to set (ex. 'text/html' or 'x-directory/normal') + * @param desktop: The name of the desktop file to use as default (ex. 'Thunar.desktop') + * @brief Set the default application to use to open a give mime type + */ +EAPI void +efreet_mime_default_application_set(const char *mime, const char *desktop) +{ +Efreet_Ini *ini = NULL; +char buf[PATH_MAX]; + +if (!mime || !desktop) +return; + +//Always use the user defaults.list file +snprintf(buf, sizeof(buf), %s/applications/defaults.list, efreet_data_home_get()); +ini = efreet_ini_new(buf); +if (!ini) +return; + +efreet_ini_section_set(ini, Default Applications); +efreet_ini_string_set(ini, mime, desktop); +efreet_ini_save(ini, buf); +efreet_ini_free(ini); +} + +/** * @internal * @return Returns the endianess * @brief Retreive the endianess of the machine @@ -1227,3 +1291,29 @@ if (!fnmatch(str, tglob, 0)) return 1; return 0; } +/** + * @internal + * @param file: The full path to a defaults.list file + * @param mime: The mime type to search for + * @return Returns a newly allocated string with the name of the .desktop file + * @brief Search the given defaults.desktop file for mime + */ +static const char* +efreet_mime_default_get(const char *file, const char *mime) +{ +Efreet_Ini *ini = NULL; +const char *str, *ret = NULL; + +if (! file || !mime || !ecore_file_can_read(file)) +return NULL; + +ini = efreet_ini_new(file); +if (!ini) return NULL; + +efreet_ini_section_set(ini, Default Applications); +if ((str = efreet_ini_string_get(ini, mime))) +ret = eina_stringshare_add(str); + +efreet_ini_free(ini); +return ret; +} Index:
Re: [E-devel] Efreet mime default application patch
This is not yet an fdo specification so I'm not going to put it in just yet. It seems to have promise and is a fairly simple format, but for now we have our own methods of choosing default applications and it is similar to how they choose as well (given the user is not making this file on their own). When opening a file in EFM, if that mimetype has not been opened previously you will be given a list of apps that support that mimetype and a list of all apps as well just in case. Once you have chosen an app, EFM remembers this and will use that app until you pick a different app by using Open With. So for now we have our own methods of doing this, but if it does become a specification it may be good to adopt this as it would help with those doing packaging and distribution. Dave Andreoli wrote: ...and the attachment ;) the patch is to be applied in the main efreet directory. Dave - Dave Andreoli [EMAIL PROTECTED] ha scritto: Hi all This is a relly small patch that add 2 functions to Efreet_Mime. EAPI const char* efreet_mime_default_application_get(const char *mime) EAPI void efreet_mime_default_application_set(const char *mime, const char *desktop) The _get function take a mime-type (as 'text/html') and return the name of the desktop file (as 'Firefox.desktop') that should be used to open the given mime-type. The information is readed from the $XDG_DATA_DIRS/applications/defaults.list file, first the user preference file is checked than the system wide. The second one set the preference in the user defaults.list file. With this functions all the applications that use efreet can know witch is the default program to use to open a given mime-type. Hope you like it Dave - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: raster trunk/e/src/modules/ibar
We have ecore_strlcpy available for just this reason. On Mon, Oct 27, 2008 at 7:01 AM, Enlightenment SVN [EMAIL PROTECTED] wrote: Log: ok go nack to snprintf - strncpy isn't save for overruns of a buffer with 0 termination of string here (need to add ectra code to terminate). in this situation speed really isn't an issue :) Author: raster Date: 2008-10-27 05:01:33 -0700 (Mon, 27 Oct 2008) New Revision: 37235 Modified: trunk/e/src/modules/ibar/e_mod_main.c Modified: trunk/e/src/modules/ibar/e_mod_main.c === --- trunk/e/src/modules/ibar/e_mod_main.c 2008-10-27 11:36:54 UTC (rev 37234) +++ trunk/e/src/modules/ibar/e_mod_main.c 2008-10-27 12:01:33 UTC (rev 37235) @@ -278,7 +278,7 @@ snprintf(buf, sizeof(buf), %s/.e/e/applications/bar/%s/.order, homedir, inst-ci-dir); } else - strncpy(buf, inst-ci-dir, sizeof(buf)); + snprintf(buf, sizeof(buf), inst-ci-dir); b-apps = e_order_new(buf); e_order_update_callback_set(b-apps, _ibar_cb_app_change, b); _ibar_fill(b); @@ -506,7 +506,7 @@ snprintf(buf, sizeof(buf), %s/.e/e/applications/bar/%s/.order, homedir, inst-ci-dir); } else - strncpy(buf, inst-ci-dir, sizeof(buf)); + nprintf(buf, sizeof(buf), inst-ci-dir); inst-ibar-apps = e_order_new(buf); _ibar_fill(inst-ibar); _ibar_resize_handle(inst-ibar); - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-svn mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-svn - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Bind epdf
Hello all, I did a simple bind to the library epdf, written by Vicent Torri, using Cython. The bind initially have only two classes, Document and Page, is very basic, for now only renders pdf in the evas canvas, but finally decided post here and receive feedback. -- André Loureiro Graduando em Engenharia da Computação - EST-UEA Pesquisador Desenvolvedor da Plataforma MAEMO - INdT/Fucapi - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] [Bind para epdf] Proposta para o proximo hackfest
Bem pessoal, Eu recentemente, aqui no projeto (INdT/Fucapi), construi um bind para library epdf, porém as funcionalidades são básicas limita-se em apenas escrever(renderizar) o documento pdf no canvas do evas, mas, enfim resolvi postar aqui o já fiz, como estamos em tempos de hackfest, seria legal se nós, ou o(s) interessado(s), incluissemos em um dos projetos do próximo hackfest, enfim já postei a novidade para a e-devel (enlightenment-devel@lists.sourceforge.net), estou aguardando resposta dos caras. Para testar é preciso ter: * efl's (enlightenmnet fundation libraries) instaladas * libpoppler = 0.8.6 * epdf = 0.0.1 * python-evas = 0.3.0 *Obs: Leiam o README -- André Loureiro Graduando em Engenharia da Computação - EST-UEA Pesquisador Desenvolvedor da Plataforma MAEMO - INdT/Fucapi - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] can't focus on swallowed part (Gustavo Sverzut Barbieri) (Gustavo Sverzut Barbieri)
hi, I think that if I use SIGNAL_EMIT to emit the signal when the whole swallowed part received the mouse signal but please give a suggestion on how to differ special swallowed part thanks! hi, the minimum working sample of the problem and the backtrace : self.meeting = edje.Edje(self.ee.evas, file=self.edje_file, group=sub_menu) self.meeting_icon=edje.Edje(self.ee.evas, file=self.edje_file, group=meeting_icon) self.meeting.part_swallow(contents,self.meeting_icon) self.main_group.part_swallow(sub_menu_contents,self.meeting) self.meeting.signal_emit(transition,in,source) self.main_group.focus =False self.main_group.part_object_get(sub_menu_contents).focus =True self.main_group.show() when I clicked the meeting_icon it still output : Mouse Clicked: sub_menu_contents not the corresponding icon clicked . I don't know what the proble is ? 2008/10/27 [EMAIL PROTECTED] Send enlightenment-devel mailing list submissions to enlightenment-devel@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/enlightenment-devel or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than Re: Contents of enlightenment-devel digest... Today's Topics: 1. Re: E SVN: mekius trunk/eterm/libast/test (Christopher Michael) 2. Re: E SVN: raster trunk/evas/src/lib/canvas (Christopher Michael) 3. Re: E SVN: englebass trunk/e/src/bin (Christopher Michael) 4. Re: evil trouble (Samuel Nicholas) 5. Re: evil trouble (Vincent Torri) 6. Re: can't focus on swallowed part (Gustavo SverzutBarbieri) (Gustavo Sverzut Barbieri) 7. Re: can't focus on swallowed part (Gustavo SverzutBarbieri) (Gustavo Sverzut Barbieri) 8. Re: E SVN: barbieri IN trunk/evas/src/lib: . canvas (Jose Gonzalez) -- Message: 1 Date: Mon, 27 Oct 2008 01:51:03 -0400 From: Christopher Michael [EMAIL PROTECTED] Subject: Re: [E-devel] E SVN: mekius trunk/eterm/libast/test To: enlightenment-devel@lists.sourceforge.net Cc: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed Nice One NiCK dh Enlightenment SVN wrote: Log: Fix a bug in perf test. Don't delete strings in use :) Author: mekius Date: 2008-10-26 16:27:28 -0700 (Sun, 26 Oct 2008) New Revision: 37185 Modified: trunk/eterm/libast/test/perf.c Modified: trunk/eterm/libast/test/perf.c === --- trunk/eterm/libast/test/perf.c2008-10-26 23:19:28 UTC (rev 37184) +++ trunk/eterm/libast/test/perf.c2008-10-26 23:27:28 UTC (rev 37185) @@ -412,7 +412,7 @@ char *display = NULL, *name = NULL, *theme = NULL, **exec = NULL, **foo = NULL; long color = 0; spif_uint32_t options = 0; -static void handle_theme(char *val_ptr) {theme = STRDUP(val_ptr);} +void handle_theme(char *val_ptr) {theme = STRDUP(val_ptr);} char *argv2[] = { test, -rt, mytheme, --name, This is a name, --exec=ssh [EMAIL PROTECTED], --scrollbar, --buttonbar, no, --login=0, -mvd, foo:0, --color, 4, --foo, blah, -d, eatme, NULL }; int argc2 = 18; @@ -654,7 +654,6 @@ testtok = spif_tok_new_from_ptr(tmp2); teststr = spif_str_new_from_ptr(:); spif_tok_set_sep(testtok, teststr); -spif_str_del(teststr); PERF_TEST(spif_tok_eval(testtok);); spif_tok_del(testtok); - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-svn mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-svn -- Message: 2 Date: Mon, 27 Oct 2008 02:23:00 -0400 From: Christopher Michael [EMAIL PROTECTED] Subject: Re: [E-devel] E SVN: raster trunk/evas/src/lib/canvas To: enlightenment-devel@lists.sourceforge.net Cc: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1;
Re: [E-devel] Bind epdf
Hey, I did a simple bind to the library epdf, written by Vicent Torri, using Cython. The bind initially have only two classes, Document and Page, is very basic, for now only renders pdf in the evas canvas, but finally decided post here and receive feedback. It seems that the atachd file is removed by sourceforge can you upload it somewhere ? Vincent - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel