Re: [E-devel] Notification escape text patch
Hi, Thanks, that fixed it Amey On Sun, Apr 19, 2009 at 2:15 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Sun, Apr 19, 2009 at 3:32 AM, Amey Parulekar amey@gmail.com wrote: Hi, This patch uses the new edje_object_part_text_unescaped_set function to escape special characters from notification popup body. Also fixes ticket #277. no pathc, make sure your firefox recognizes .diff and .patch as text/something, otherwise mail list will strip attachments. add to /etc/mime.types: text/x-diff diff patch -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 Index: trunk/E-MODULES-EXTRA/notification/src/e_mod_popup.c === --- trunk/E-MODULES-EXTRA/notification/src/e_mod_popup.c (revision 40129) +++ trunk/E-MODULES-EXTRA/notification/src/e_mod_popup.c (working copy) @@ -382,19 +382,20 @@ char *dest; int len = 6; int size = 512; - edje_object_part_text_set(popup-theme, notification.text.title, e_notification_summary_get(n)); msg = calloc(1, 512); + orig = e_notification_body_get(n); + edje_object_part_text_unescaped_set(popup-theme, notification.textblock.message, orig); snprintf(msg, 511, body); - for (orig = e_notification_body_get(n), dest = msg + strlen(msg); orig *orig; orig++) + for (dest = msg + strlen(msg); orig *orig; orig++) { if (len = size - 4) { size = len + 512; msg = realloc(msg, size); - msg = memset(msg + len, 0, size - len); + //msg = memset(msg + len, 0, size - len); dest = msg + len; } -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Notification escape text patch
Ok, I don't see what's your point with that, you set the escaped version than reset with your own escaping! Attached is a patch I hacked quickly to add rich text as http://galago-project.org/specs/notification/0.9/x161.html and also added a lame copy of gnome-osd, with semi-transparent bg that fades on mouse-in. Please build on this and send a nice good looking version later :-) Regards, On Sun, Apr 19, 2009 at 5:50 AM, Amey Parulekar amey@gmail.com wrote: Hi, Thanks, that fixed it Amey On Sun, Apr 19, 2009 at 2:15 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: On Sun, Apr 19, 2009 at 3:32 AM, Amey Parulekar amey@gmail.com wrote: Hi, This patch uses the new edje_object_part_text_unescaped_set function to escape special characters from notification popup body. Also fixes ticket #277. no pathc, make sure your firefox recognizes .diff and .patch as text/something, otherwise mail list will strip attachments. add to /etc/mime.types: text/x-diff diff patch -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 Index: e-module-notification.edc === --- e-module-notification.edc (revision 40179) +++ e-module-notification.edc (working copy) @@ -30,13 +30,29 @@ styles { style { name: notification_style; - base: font=Edje-Vera font_size=11 align=left color=#3c3c3c wrap=word text_class=module_normal; - tag: subject + text_class=module_large font_size=16; - tag: /subject - text_class=module_large font_size=16; - tag: body + text_class=module_normal font_size=13; - tag: /body - text_class=module_normal; + base: font=Sans font_size=11 align=left color=#3c3c3c wrap=word text_class=module_normal; + tag: subject + text_class=module_large font_size=16; + tag: body + text_class=module_normal font_size=13; tag: br \n; + tag: b + font=Sans:style=Bold text_class=module_bold; + tag: i + font=Sans:style=Oblique text_class=module_bold; + tag: u + underline=on; + tag: img ; /* images not supported */ + tag: a ; /* links not supported */ } + + style { + name: notification_style_alpha; + base: font=Sans font_size=11 align=left color=#fcfcfc outline_color=#000 shadow_color=#333 style=outline_soft_shadow wrap=word text_class=module_normal; + tag: subject + text_class=module_large font_size=16; + tag: body + text_class=module_normal font_size=13; + tag: br \n; + tag: b + font=Sans:style=Bold text_class=module_bold; + tag: i + font=Sans:style=Oblique text_class=module_bold; + tag: u + underline=on; + tag: img ; /* images not supported */ + tag: a ; /* links not supported */ + } } collections { @@ -79,7 +95,7 @@ group { name: modules/notification/main; data { -item: app_icon_max 80 80; +item: app_icon_max 48 48; } parts { part { name: base; @@ -219,41 +235,62 @@ description { state: default 0.0; align: 0.0 0.5; - fixed: 1 1; aspect: 1 1; aspect_preference: BOTH; color: 255 0 150 255; rel1 { - relative: 0.0 0.0; - offset: 5 -127; + relative: 0.0 1.0; + offset: 5 5; + to_y: title_back; } - rel2 { relative: 0.0 1.0; - offset: 85 -127; + offset: 52 52; + to_y: title_back; } } description { state: high 0.0; inherit: default 0.0; - rel1.offset: 5 -63; - rel2.offset: 85 -63; + rel1 { + relative: 0.0 0.0; + offset: 5 -48; + to_y: title_back; + } + rel2 { + relative: 0.0 0.0; + offset: 52 -1; + to_y: title_back; + } } description { state: medium 0.0; inherit: default 0.0; - rel1.offset: 5 -23; - rel2.offset: 85 -23; + rel1 { + relative: 0.0 0.0; + offset: 5 -28; + to_y: title_back; + } + rel2 { + relative: 0.0 0.0; + offset: 52 -21; + to_y: title_back; + }