These patches add .gitignore to news and mpdule modules,
fix crash in the news module and simplify a code a bit in
the news module.
-- Igor
>From ada035899474107a6c83d78bcd412eba50ac5e5d Mon Sep 17 00:00:00 2001
From: Igor Murzov <e-m...@date.by>
Date: Sun, 28 Oct 2012 18:22:10 +0400
Subject: [PATCH 3/8] news: Check if the pointer is NULL.
This fixes a crash on opening Settings > Main dialog.
---
news/src/news_config_dialog.c | 34 ++++++++++++++++++++++++++--------
1 file changed, 26 insertions(+), 8 deletions(-)
diff --git a/news/src/news_config_dialog.c b/news/src/news_config_dialog.c
index decd636..60b5f35 100644
--- a/news/src/news_config_dialog.c
+++ b/news/src/news_config_dialog.c
@@ -157,18 +157,36 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->viewer.varticles.sort_date = c->viewer.varticles.sort_date;
cfdata->viewer.vcontent.font_size = c->viewer.vcontent.font_size;
cfdata->viewer.vcontent.font_color = E_NEW(E_Color, 1);
- sscanf(c->viewer.vcontent.font_color, "#%2x%2x%2x",
- &cfdata->viewer.vcontent.font_color->r,
- &cfdata->viewer.vcontent.font_color->g,
- &cfdata->viewer.vcontent.font_color->b);
+ if(c->viewer.vcontent.font_color)
+ {
+ sscanf(c->viewer.vcontent.font_color, "#%2x%2x%2x",
+ &cfdata->viewer.vcontent.font_color->r,
+ &cfdata->viewer.vcontent.font_color->g,
+ &cfdata->viewer.vcontent.font_color->b);
+ }
+ else
+ {
+ cfdata->viewer.vcontent.font_color->r = 0;
+ cfdata->viewer.vcontent.font_color->g = 0;
+ cfdata->viewer.vcontent.font_color->b = 0;
+ }
cfdata->viewer.vcontent.font_color->a = 255;
e_color_update_rgb(cfdata->viewer.vcontent.font_color);
cfdata->viewer.vcontent.font_shadow = c->viewer.vcontent.font_shadow;
cfdata->viewer.vcontent.font_shadow_color = E_NEW(E_Color, 1);
- sscanf(c->viewer.vcontent.font_shadow_color, "#%2x%2x%2x",
- &cfdata->viewer.vcontent.font_shadow_color->r,
- &cfdata->viewer.vcontent.font_shadow_color->g,
- &cfdata->viewer.vcontent.font_shadow_color->b);
+ if(c->viewer.vcontent.font_shadow_color)
+ {
+ sscanf(c->viewer.vcontent.font_shadow_color, "#%2x%2x%2x",
+ &cfdata->viewer.vcontent.font_shadow_color->r,
+ &cfdata->viewer.vcontent.font_shadow_color->g,
+ &cfdata->viewer.vcontent.font_shadow_color->b);
+ }
+ else
+ {
+ cfdata->viewer.vcontent.font_shadow_color->r = 240;
+ cfdata->viewer.vcontent.font_shadow_color->g = 240;
+ cfdata->viewer.vcontent.font_shadow_color->b = 240;
+ }
cfdata->viewer.vcontent.font_shadow_color->a = 255;
e_color_update_rgb(cfdata->viewer.vcontent.font_shadow_color);
cfdata->viewer.vcontent.color_changed = 0;
--
1.7.12.1
>From 8da930983d2a7cb41ca01ea856588144fef92071 Mon Sep 17 00:00:00 2001
From: Igor Murzov <e-m...@date.by>
Date: Sun, 28 Oct 2012 20:51:19 +0400
Subject: [PATCH 6/8] news, mpdule: Add .gitignore.
---
mpdule/.gitignore | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
news/.gitignore | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 175 insertions(+)
create mode 100644 mpdule/.gitignore
create mode 100644 news/.gitignore
diff --git a/mpdule/.gitignore b/mpdule/.gitignore
new file mode 100644
index 0000000..6aeae24
--- /dev/null
+++ b/mpdule/.gitignore
@@ -0,0 +1,91 @@
+*~
+*.o
+*.a
+*.lo
+*.la
+*.gmo
+*swo
+*swp
+ABOUT-NLS
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache/
+config.guess
+config.h
+config.h.in
+config.log
+config.rpath
+config.status
+config.sub
+configure
+depcomp
+mpdule.edj
+e-module-mpdule.edj
+e_modules-mpdule.spec
+install-sh
+libtool
+ltmain.sh
+m4/codeset.m4
+m4/fcntl-o.m4
+m4/gettext.m4
+m4/glibc2.m4
+m4/glibc21.m4
+m4/iconv.m4
+m4/intdiv0.m4
+m4/intl.m4
+m4/intldir.m4
+m4/intlmacosx.m4
+m4/intmax.m4
+m4/inttypes-pri.m4
+m4/inttypes.m4
+m4/inttypes_h.m4
+m4/lcmessage.m4
+m4/lib-ld.m4
+m4/lib-link.m4
+m4/lib-prefix.m4
+m4/libtool.m4
+m4/lock.m4
+m4/longdouble.m4
+m4/longlong.m4
+m4/ltoptions.m4
+m4/ltsugar.m4
+m4/ltversion.m4
+m4/lt~obsolete.m4
+m4/nls.m4
+m4/po.m4
+m4/printf-posix.m4
+m4/progtest.m4
+m4/signed.m4
+m4/size_max.m4
+m4/stdint_h.m4
+m4/threadlib.m4
+m4/uintmax_t.m4
+m4/ulonglong.m4
+m4/visibility.m4
+m4/wchar_t.m4
+m4/wint_t.m4
+m4/xsize.m4
+missing
+mkinstalldirs
+module.desktop
+po/Makefile
+po/Makefile.in
+po/Makefile.in.in
+po/Makevars.template
+po/POTFILES
+po/Rules-quot
+po/boldquot.sed
+po/en@boldquot.header
+po/en@quot.header
+po/insert-header.sin
+po/mpdule.pot
+po/quot.sed
+po/remove-potcdate.sed
+po/remove-potcdate.sin
+po/stamp-po
+src/.deps/
+src/.libs/
+src/Makefile
+src/Makefile.in
+stamp-h1
diff --git a/news/.gitignore b/news/.gitignore
new file mode 100644
index 0000000..a1ccf57
--- /dev/null
+++ b/news/.gitignore
@@ -0,0 +1,84 @@
+*~
+*.o
+*.a
+*.lo
+*.la
+*.gmo
+*swo
+*swp
+ABOUT-NLS
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache/
+config.guess
+config.h
+config.h.in
+config.log
+config.rpath
+config.status
+config.sub
+configure
+depcomp
+e-module-news.edj
+e_modules-news.spec
+install-sh
+libtool
+ltmain.sh
+m4/codeset.m4
+m4/gettext.m4
+m4/glibc21.m4
+m4/iconv.m4
+m4/intdiv0.m4
+m4/intmax.m4
+m4/inttypes-pri.m4
+m4/inttypes.m4
+m4/inttypes_h.m4
+m4/isc-posix.m4
+m4/lcmessage.m4
+m4/lib-ld.m4
+m4/lib-link.m4
+m4/lib-prefix.m4
+m4/libtool.m4
+m4/longdouble.m4
+m4/longlong.m4
+m4/ltoptions.m4
+m4/ltsugar.m4
+m4/ltversion.m4
+m4/lt~obsolete.m4
+m4/nls.m4
+m4/po.m4
+m4/printf-posix.m4
+m4/progtest.m4
+m4/signed.m4
+m4/size_max.m4
+m4/stdint_h.m4
+m4/uintmax_t.m4
+m4/ulonglong.m4
+m4/wchar_t.m4
+m4/wint_t.m4
+m4/xsize.m4
+missing
+mkinstalldirs
+module.desktop
+po/Makefile
+po/Makefile.in
+po/Makefile.in.in
+po/Makevars.template
+po/POTFILES
+po/Rules-quot
+po/boldquot.sed
+po/en@boldquot.header
+po/en@quot.header
+po/insert-header.sin
+po/news.pot
+po/quot.sed
+po/remove-potcdate.sed
+po/remove-potcdate.sin
+po/stamp-po
+src/.deps/
+src/.libs/
+src/Makefile
+src/Makefile.in
+stamp-h1
+
--
1.7.12.1
>From ce0ed11389315318f84305bd41faf7f63aea8c45 Mon Sep 17 00:00:00 2001
From: Igor Murzov <e-m...@date.by>
Date: Sun, 28 Oct 2012 18:26:56 +0400
Subject: [PATCH 4/8] news: No need to make a copy of static string for
eina_stringshare.
---
news/src/news_config.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/news/src/news_config.c b/news/src/news_config.c
index dace8a0..3cc4a18 100644
--- a/news/src/news_config.c
+++ b/news/src/news_config.c
@@ -123,7 +123,6 @@ news_config_init(void)
if (!news->config)
{
News_Config *c;
- char buf[4096];
c = E_NEW(News_Config, 1);
news->config = c;
@@ -148,11 +147,9 @@ news_config_init(void)
c->viewer.varticles.unread_first = NEWS_VIEWER_VARTICLES_UNREAD_FIRST_DEFAULT;
c->viewer.varticles.sort_date = NEWS_VIEWER_VARTICLES_SORT_DATE_DEFAULT;
c->viewer.vcontent.font_size = NEWS_VIEWER_VCONTENT_FONT_SIZE_DEFAULT;
- snprintf(buf, sizeof(buf), "%s", NEWS_VIEWER_VCONTENT_FONT_COLOR_DEFAULT);
- c->viewer.vcontent.font_color = eina_stringshare_add(buf);
+ c->viewer.vcontent.font_color = eina_stringshare_add(NEWS_VIEWER_VCONTENT_FONT_COLOR_DEFAULT);
c->viewer.vcontent.font_shadow = NEWS_VIEWER_VCONTENT_FONT_SHADOW_DEFAULT;
- snprintf(buf, sizeof(buf), "%s", NEWS_VIEWER_VCONTENT_FONT_SHADOW_COLOR_DEFAULT);
- c->viewer.vcontent.font_shadow_color = eina_stringshare_add(buf);
+ c->viewer.vcontent.font_shadow_color = eina_stringshare_add(NEWS_VIEWER_VCONTENT_FONT_SHADOW_COLOR_DEFAULT);
c->popup_news.active = NEWS_FEED_POPUP_NEWS_ACTIVE_DEFAULT;
c->popup_news.timer_s = NEWS_FEED_POPUP_NEWS_TIMER_S_DEFAULT;
c->popup_other.on_timeout = NEWS_FEED_POPUP_OTHER_ON_TIMEOUT_DEFAULT;
--
1.7.12.1
------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel