[E-devel] [PATCH] desklock is not working on idle timer

2013-01-12 Thread Mariusz Bialonczyk
Hi guys,
I currently have set "Lock when idle timer exceeded" and "Lock even on 
fullscreen windows" settings enabled for a desklock.
It doesn't work, so i debugged it a little and with the above options set i've 
got:
e_config->screen_actions_fullscreen_windows_ignore = 1
e_util_fullscreen_any() = 0
this leads to return 0 from a e_desklock_show_autolocked()

I think it's wrong because the desklock doesn't show up after the idle time.
Attached patch fixes it.
Please review

regards!
-- 
Mariusz Białończyk
jabber/e-mail: ma...@skyboo.net
https://github.com/manio
diff --git a/src/bin/e_desklock.c b/src/bin/e_desklock.c
index c06796c..d50dfea 100644
--- a/src/bin/e_desklock.c
+++ b/src/bin/e_desklock.c
@@ -200,8 +200,8 @@ _user_wallpaper_get(E_Zone *zone)
 EAPI int
 e_desklock_show_autolocked(void)
 {
-   if ((e_config->screen_actions_fullscreen_windows_ignore) ||
-   ((!e_config->screen_actions_fullscreen_windows_ignore) && (!e_util_fullscreen_any(
+   if (!((e_config->screen_actions_fullscreen_windows_ignore) ||
+   ((!e_config->screen_actions_fullscreen_windows_ignore) && (!e_util_fullscreen_any()
   return 0;
if (_e_desklock_autolock_time < 1.0)
  _e_desklock_autolock_time = ecore_loop_time_get();
--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] desklock is not working on idle timer

2013-01-15 Thread Mariusz Bialonczyk
On 01/14/2013 07:18 PM, Brian 'morlenxus' Miculcy wrote:
> Hey,
> 
> please check if recent svn rev fixes your problems.
yes, it's fixed, thank you :)

regards
-- 
Mariusz Białończyk
jabber/e-mail: ma...@skyboo.net
http://manio.skyboo.net

--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [PATCH] test_calendar.c: fix a typo

2013-09-30 Thread Mariusz Bialonczyk
Previous seconds value for a day was 84600 (23:30) instead of 86400 (24:00).
The commit fixes it using constants.
---
 src/bin/test_calendar.c | 43 +--
 1 file changed, 17 insertions(+), 26 deletions(-)

diff --git a/src/bin/test_calendar.c b/src/bin/test_calendar.c
index f3b7ee3..3bd82cf 100644
--- a/src/bin/test_calendar.c
+++ b/src/bin/test_calendar.c
@@ -21,6 +21,9 @@ enum _api_state
 };
 typedef enum _api_state api_state;
 
+#define SEC_PER_DAY   24 * 60 * 60
+#define SEC_PER_YEAR  365 * SEC_PER_DAY
+
 static void
 set_api_state(api_data *api)
 {
@@ -34,9 +37,7 @@ set_api_state(api_data *api)
   case STATE_MARK_MONTHLY:
{
   Evas_Object *cal = eina_list_nth(items, 0);
-  time_t sec_per_day = (60*60*24);
-  time_t sec_per_year = sec_per_day * 365;
-  time_t the_time = (sec_per_year * 41) + (sec_per_day * 9); /* 
Set date to DEC 31, 2010 */
+  time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 9); /* 
Set date to DEC 31, 2010 */
   elm_calendar_min_max_year_set(cal, 2010, 2011);
   m = elm_calendar_mark_add(cal, "checked", gmtime(&the_time), 
ELM_CALENDAR_MONTHLY);
   elm_calendar_selected_time_set(cal, gmtime(&the_time));
@@ -45,9 +46,7 @@ set_api_state(api_data *api)
   case STATE_MARK_WEEKLY:
{
   Evas_Object *cal = eina_list_nth(items, 0);
-  time_t sec_per_day = (60*60*24);
-  time_t sec_per_year = sec_per_day * 365;
-  time_t the_time = (sec_per_year * 41) + (sec_per_day * 4); /* 
Set date to DEC 26, 2010 */
+  time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 4); /* 
Set date to DEC 26, 2010 */
   elm_calendar_mark_del(m);
   m = elm_calendar_mark_add(cal, "checked", gmtime(&the_time), 
ELM_CALENDAR_WEEKLY);
   elm_calendar_selected_time_set(cal, gmtime(&the_time));
@@ -56,9 +55,7 @@ set_api_state(api_data *api)
   case STATE_SUNDAY_HIGHLIGHT:
{
   Evas_Object *cal = eina_list_nth(items, 0);
-  time_t sec_per_day = (60*60*24);
-  time_t sec_per_year = sec_per_day * 365;
-  time_t the_time = (sec_per_year * 41) + (sec_per_day * 3); /* 
Set date to DEC 25, 2010 */
+  time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 3); /* 
Set date to DEC 25, 2010 */
   /* elm_calendar_mark_del(m); */
   m = elm_calendar_mark_add(cal, "holiday", gmtime(&the_time), 
ELM_CALENDAR_WEEKLY);
   elm_calendar_selected_time_set(cal, gmtime(&the_time));
@@ -67,9 +64,7 @@ set_api_state(api_data *api)
   case STATE_SELECT_DATE_DISABLED_WITH_MARKS:
{
   Evas_Object *cal = eina_list_nth(items, 0);
-  time_t sec_per_day = (60*60*24);
-  time_t sec_per_year = sec_per_day * 365;
-  time_t the_time = (sec_per_year * 41) + (sec_per_day * 10); /* 
Set date to JAN 01, 2011 */
+  time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 10); /* 
Set date to JAN 01, 2011 */
   elm_calendar_select_mode_set(cal, ELM_CALENDAR_SELECT_MODE_NONE);
   elm_calendar_selected_time_set(cal, gmtime(&the_time));
}
@@ -77,9 +72,7 @@ set_api_state(api_data *api)
   case STATE_SELECT_DATE_DISABLED_NO_MARKS:
{
   Evas_Object *cal = eina_list_nth(items, 0);
-  time_t sec_per_day = (60*60*24);
-  time_t sec_per_year = sec_per_day * 365;
-  time_t the_time = (sec_per_year * 41) + (sec_per_day * 40); /* 
Set date to FEB 01, 2011 */
+  time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 40); /* 
Set date to FEB 01, 2011 */
   elm_calendar_marks_clear(cal);
   elm_calendar_select_mode_set(cal, ELM_CALENDAR_SELECT_MODE_NONE);
   elm_calendar_selected_time_set(cal, gmtime(&the_time));
@@ -148,9 +141,7 @@ test_calendar(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_
evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(bx, cal);
 
-   time_t sec_per_day = (60*60*24);
-   time_t sec_per_year = sec_per_day * 365;
-   time_t the_time = (sec_per_year * 41) + (sec_per_day * 9); /* Set date to 
DEC 31, 2010 */
+   time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 9); /* Set date to 
DEC 31, 2010 */
elm_calendar_selected_time_set(cal, gmtime(&the_time));
elm_calendar_min_max_year_set(cal, 2010, 2012);
 
@@ -268,10 +259,10 @@ test_calendar2(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event
cal3 = elm_calendar_add(win);
evas_object_size_hint_weight_set(cal3, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(cal3, EVAS_HINT_FILL, EVAS_HINT_FILL);
-   current_time = time(NULL) + 34 * 84600;
+   current_time = time(NULL) + 34 * SEC_PER_DAY;
l

[EGIT] [core/elementary] master 01/02: test_calendar: Fix number of seconds per day.

2013-09-30 Thread Mariusz Bialonczyk
stefan pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=144734972ad848b3e3516ddf47233b741b42dc16

commit 144734972ad848b3e3516ddf47233b741b42dc16
Author: Mariusz Bialonczyk 
Date:   Mon Sep 30 11:39:34 2013 +0100

test_calendar: Fix number of seconds per day.

Previous seconds value for a day was 84600 (23:30) instead of 86400
(24:00).
The commit fixes it using constants.
---
 src/bin/test_calendar.c | 43 +--
 1 file changed, 17 insertions(+), 26 deletions(-)

diff --git a/src/bin/test_calendar.c b/src/bin/test_calendar.c
index f3b7ee3..3bd82cf 100644
--- a/src/bin/test_calendar.c
+++ b/src/bin/test_calendar.c
@@ -21,6 +21,9 @@ enum _api_state
 };
 typedef enum _api_state api_state;
 
+#define SEC_PER_DAY   24 * 60 * 60
+#define SEC_PER_YEAR  365 * SEC_PER_DAY
+
 static void
 set_api_state(api_data *api)
 {
@@ -34,9 +37,7 @@ set_api_state(api_data *api)
   case STATE_MARK_MONTHLY:
{
   Evas_Object *cal = eina_list_nth(items, 0);
-  time_t sec_per_day = (60*60*24);
-  time_t sec_per_year = sec_per_day * 365;
-  time_t the_time = (sec_per_year * 41) + (sec_per_day * 9); /* 
Set date to DEC 31, 2010 */
+  time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 9); /* 
Set date to DEC 31, 2010 */
   elm_calendar_min_max_year_set(cal, 2010, 2011);
   m = elm_calendar_mark_add(cal, "checked", gmtime(&the_time), 
ELM_CALENDAR_MONTHLY);
   elm_calendar_selected_time_set(cal, gmtime(&the_time));
@@ -45,9 +46,7 @@ set_api_state(api_data *api)
   case STATE_MARK_WEEKLY:
{
   Evas_Object *cal = eina_list_nth(items, 0);
-  time_t sec_per_day = (60*60*24);
-  time_t sec_per_year = sec_per_day * 365;
-  time_t the_time = (sec_per_year * 41) + (sec_per_day * 4); /* 
Set date to DEC 26, 2010 */
+  time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 4); /* 
Set date to DEC 26, 2010 */
   elm_calendar_mark_del(m);
   m = elm_calendar_mark_add(cal, "checked", gmtime(&the_time), 
ELM_CALENDAR_WEEKLY);
   elm_calendar_selected_time_set(cal, gmtime(&the_time));
@@ -56,9 +55,7 @@ set_api_state(api_data *api)
   case STATE_SUNDAY_HIGHLIGHT:
{
   Evas_Object *cal = eina_list_nth(items, 0);
-  time_t sec_per_day = (60*60*24);
-  time_t sec_per_year = sec_per_day * 365;
-  time_t the_time = (sec_per_year * 41) + (sec_per_day * 3); /* 
Set date to DEC 25, 2010 */
+  time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 3); /* 
Set date to DEC 25, 2010 */
   /* elm_calendar_mark_del(m); */
   m = elm_calendar_mark_add(cal, "holiday", gmtime(&the_time), 
ELM_CALENDAR_WEEKLY);
   elm_calendar_selected_time_set(cal, gmtime(&the_time));
@@ -67,9 +64,7 @@ set_api_state(api_data *api)
   case STATE_SELECT_DATE_DISABLED_WITH_MARKS:
{
   Evas_Object *cal = eina_list_nth(items, 0);
-  time_t sec_per_day = (60*60*24);
-  time_t sec_per_year = sec_per_day * 365;
-  time_t the_time = (sec_per_year * 41) + (sec_per_day * 10); /* 
Set date to JAN 01, 2011 */
+  time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 10); /* 
Set date to JAN 01, 2011 */
   elm_calendar_select_mode_set(cal, ELM_CALENDAR_SELECT_MODE_NONE);
   elm_calendar_selected_time_set(cal, gmtime(&the_time));
}
@@ -77,9 +72,7 @@ set_api_state(api_data *api)
   case STATE_SELECT_DATE_DISABLED_NO_MARKS:
{
   Evas_Object *cal = eina_list_nth(items, 0);
-  time_t sec_per_day = (60*60*24);
-  time_t sec_per_year = sec_per_day * 365;
-  time_t the_time = (sec_per_year * 41) + (sec_per_day * 40); /* 
Set date to FEB 01, 2011 */
+  time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 40); /* 
Set date to FEB 01, 2011 */
   elm_calendar_marks_clear(cal);
   elm_calendar_select_mode_set(cal, ELM_CALENDAR_SELECT_MODE_NONE);
   elm_calendar_selected_time_set(cal, gmtime(&the_time));
@@ -148,9 +141,7 @@ test_calendar(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_
evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(bx, cal);
 
-   time_t sec_per_day = (60*60*24);
-   time_t sec_per_year = sec_per_day * 365;
-   time_t the_time = (sec_per_year * 41) + (sec_per_day * 9); /* Set date to 
DEC 31, 2010 */
+   time_t the_time = (SEC_PER_YEAR * 41) + (SEC_PER_DAY * 9); /* Set date to 
DEC 31, 2010 */
elm_calendar_selected_time_set(cal, gmtime(&the_time));
elm_calendar_min_max_year_set(cal, 2010, 20

Re: [E-devel] [PATCH] test_calendar.c: fix a typo

2013-09-30 Thread Mariusz Bialonczyk
On 09/30/2013 02:30 PM, Stefan Schmidt wrote:
> Hello.
> 
> The change summary is a bit weak. Its not really a typo fix but a fix
> for the wrong numbers of seconds a day. I changed it to:
> 
> test_calendar: Fix number of seconds per day.
> 
> Hope you don't mind.
of course :)

thanks!

regards,
-- 
Mariusz Białończyk | xmpp/e-mail: ma...@skyboo.net
http://manio.skyboo.net | https://github.com/manio

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] test_calendar.c: fix a typo

2013-09-30 Thread Mariusz Bialonczyk
On 09/30/2013 04:33 PM, Daniel Juyung Seo wrote:
> I just like arcanist :)
> You can keep using ml. I don't care. I just wanted him to know what efl's
> contribution process is.

got it!
maybe i'll give it a try next time, thanks :)

regards,
-- 
Mariusz Białończyk | xmpp/e-mail: ma...@skyboo.net
http://manio.skyboo.net | https://github.com/manio

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] e19 and wayland

2014-07-17 Thread Mariusz Bialonczyk
Hello devs,
I hope it's ok to ask you directly here about some wayland issues.
Last time I decided to give my enlightenment a try and run it under wayland
on my laptop.
I have debian sid. Wayland/weston is from debian, and efl, enlightenment (and
also elementary) is from latest git.
I have intel i915 graphics and my weston-launch seems to working ok.

I've configured it as follows:
efl:
./configure --enable-drm --enable-wayland
enlightenment:
./configure --enable-wayland-clients --enable-wl-drm

I've got some small build problems - I had to manually enter the header file,
because complation fails with missing header file:

diff --git a/src/bin/e.h b/src/bin/e.h
index e430a5a..92a1666 100644
--- a/src/bin/e.h
+++ b/src/bin/e.h
@@ -124,7 +124,7 @@ void *alloca (size_t);
 # endif
 
 # ifdef HAVE_WAYLAND
-#  include 
+#  include "/usr/local/include/ecore-wayland-1/Ecore_Wayland.h"
 #  include 
 # endif
 
After this I was able to successfully build it.

Then i've invoked enlightenment_start and it is constantly crashing in a loop
(crash, start wayland, crash, wayland start and so on). So I did ctrl-c and
I can see that it is segfaulting:
[  271.405332] enlightenment[3640]: segfault at 8c ip b6c80451 sp bfaf01dc 
error 4 in libecore_x.so.1.10.99[b6c69000+49000]
[  276.880483] enlightenment[3654]: segfault at 8c ip b6ceb451 sp bfd7415c 
error 4 in libecore_x.so.1.10.99[b6cd4000+49000]
[  278.512060] enlightenment[3666]: segfault at 8c ip b6cea451 sp bfd1049c 
error 4 in libecore_x.so.1.10.99[b6cd3000+49000]

I am attaching a (somehow weird) .e-crashdump.txt from my home dir.

After some debugging I finally managed my e to start ...
It seems the problem is in the e_scale. I had to disable the following call:
diff --git a/src/bin/e_scale.c b/src/bin/e_scale.c
index 675200b..1b4e5f1 100644
--- a/src/bin/e_scale.c
+++ b/src/bin/e_scale.c
@@ -42,7 +42,7 @@ e_scale_update(void)
   e_scale = e_config->scale.min;
  }
elm_config_scale_set(e_scale);
-   elm_config_all_flush();
+// elm_config_all_flush();
edje_scale_set(e_scale);
snprintf(buf, sizeof(buf), "%1.3f", e_scale);
e_util_env_set("E_SCALE", buf);

And e is starting. The splash screen is not centered and I can see some window
placement problems, but at last it starts :)
Any movement to any desktop icon crashes it (maybe it's because the window
popup?):
[ 1280.152087] enlightenment[6004]: segfault at 4d0 ip b62e3104 sp bf8990c0 
error 4 in libX11.so.6.3.0[b62ac000+134000]
[ 1284.644389] enlightenment[6048]: segfault at 4d0 ip b6316104 sp bfbed740 
error 4 in libX11.so.6.3.0[b62df000+134000]
[ 1288.867726] enlightenment[6074]: segfault at 4d0 ip b6265104 sp bfd9cc00 
error 4 in libX11.so.6.3.0[b622e000+134000]
[ 1293.999692] enlightenment[6100]: segfault at 4d0 ip b630e104 sp bff4e800 
error 4 in libX11.so.6.3.0[b62d7000+134000]
[ 1368.316793] enlightenment[6126]: segfault at 4d0 ip b62e7104 sp bfa62e40 
error 4 in libX11.so.6.3.0[b62b+134000]
[ 1387.351535] enlightenment[6152]: segfault at 8c ip b6d37451 sp bfc9d5dc 
error 4 in libecore_x.so.1.10.99[b6d2+49000]
[ 1399.280932] enlightenment[6185]: segfault at 4d0 ip b62f2104 sp bfb4d540 
error 4 in libX11.so.6.3.0[b62bb000+134000]

Is it normal that it is such unstable currently under wayland?
Do you think I should have a wayland from git (not from debian)?
Or maybe I have to try the EGL instead of drm?

regards,
-- 
Mariusz Białończyk | xmpp/e-mail: ma...@skyboo.net
http://manio.skyboo.net | https://github.com/manio
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not being run.
The program is not bein

[EGIT] [core/enlightenment] master 01/01: modules/temperature: cosmetics: typo fix (celcius -> celsius)

2016-07-05 Thread Mariusz Bialonczyk
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=5dd4a7eddf8287f7ea9009dcefdc35270f3ea1fb

commit 5dd4a7eddf8287f7ea9009dcefdc35270f3ea1fb
Author: Mariusz Bialonczyk 
Date:   Tue Jul 5 11:45:00 2016 -0400

modules/temperature: cosmetics: typo fix (celcius -> celsius)

Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4129
---
 src/modules/temperature/e_mod_config.c | 2 +-
 src/modules/temperature/e_mod_main.c   | 6 +++---
 src/modules/temperature/e_mod_main.h   | 2 +-
 src/modules/temperature/e_mod_udev.c   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/modules/temperature/e_mod_config.c 
b/src/modules/temperature/e_mod_config.c
index 3e938c2..57f5212 100644
--- a/src/modules/temperature/e_mod_config.c
+++ b/src/modules/temperature/e_mod_config.c
@@ -220,7 +220,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, 
E_Config_Dialog_Data
 
ol = e_widget_list_add(evas, 0, 0);
rg = e_widget_radio_group_new(&(cfdata->unit_method));
-   ow = e_widget_radio_add(evas, _("Celsius"), CELCIUS, rg);
+   ow = e_widget_radio_add(evas, _("Celsius"), CELSIUS, rg);
e_widget_on_change_hook_set(ow, _cb_display_changed, cfdata);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
ow = e_widget_radio_add(evas, _("Fahrenheit"), FAHRENHEIT, rg);
diff --git a/src/modules/temperature/e_mod_main.c 
b/src/modules/temperature/e_mod_main.c
index 8a0906f..ab4ef76 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -64,7 +64,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, 
const char *style)
 inst->high = 80;
 inst->sensor_type = SENSOR_TYPE_NONE;
 inst->sensor_name = NULL;
-inst->units = CELCIUS;
+inst->units = CELSIUS;
 #ifdef HAVE_EEZE
 inst->backend = UDEV;
 #endif
@@ -76,7 +76,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, 
const char *style)
E_CONFIG_LIMIT(inst->poll_interval, 1, 1024);
E_CONFIG_LIMIT(inst->low, 0, 100);
E_CONFIG_LIMIT(inst->high, 0, 220);
-   E_CONFIG_LIMIT(inst->units, CELCIUS, FAHRENHEIT);
+   E_CONFIG_LIMIT(inst->units, CELSIUS, FAHRENHEIT);
 #ifdef HAVE_EEZE
E_CONFIG_LIMIT(inst->backend, TEMPGET, UDEV);
 #endif
@@ -201,7 +201,7 @@ _gc_id_new(const E_Gadcon_Client_Class *client_class 
EINA_UNUSED)
inst->high = 80;
inst->sensor_type = SENSOR_TYPE_NONE;
inst->sensor_name = NULL;
-   inst->units = CELCIUS;
+   inst->units = CELSIUS;
 #ifdef HAVE_EEZE
inst->backend = TEMPGET;
 #endif
diff --git a/src/modules/temperature/e_mod_main.h 
b/src/modules/temperature/e_mod_main.h
index 3d0157e..08a60b1 100644
--- a/src/modules/temperature/e_mod_main.h
+++ b/src/modules/temperature/e_mod_main.h
@@ -29,7 +29,7 @@ typedef struct _Config_Face Config_Face;
 
 typedef enum _Unit
 {
-   CELCIUS,
+   CELSIUS,
FAHRENHEIT
 } Unit;
 
diff --git a/src/modules/temperature/e_mod_udev.c 
b/src/modules/temperature/e_mod_udev.c
index 54fe27b..f0fafd0 100644
--- a/src/modules/temperature/e_mod_udev.c
+++ b/src/modules/temperature/e_mod_udev.c
@@ -39,7 +39,7 @@ temperature_udev_update(void *data)
cur = strtod(test, NULL);
if (cur > 0)
  {
-temp += (cur / 1000); /* udev reports temp in 
(celcius * 1000) for some reason */
+temp += (cur / 1000); /* udev reports temp in 
(celsius * 1000) for some reason */
 cpus++;
  }
 }

-- 




[EGIT] [enlightenment/modules/forecasts] master 01/01: forecast: adapt to new YQL Weather API

2016-07-06 Thread Mariusz Bialonczyk
cedric pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/modules/forecasts.git/commit/?id=949cc0f279eaad427c7732a2264308ec0d25d3e7

commit 949cc0f279eaad427c7732a2264308ec0d25d3e7
Author: Mariusz Bialonczyk 
Date:   Wed Jul 6 14:05:09 2016 -0700

forecast: adapt to new YQL Weather API

Reviewers: pawatzaza

Reviewed By: pawatzaza

Subscribers: pawatzaza

Differential Revision: https://phab.enlightenment.org/D4132

Signed-off-by: Cedric BAIL 
---
 src/e_mod_main.c | 95 +---
 1 file changed, 57 insertions(+), 38 deletions(-)

diff --git a/src/e_mod_main.c b/src/e_mod_main.c
index f2ddadb..4f4522d 100644
--- a/src/e_mod_main.c
+++ b/src/e_mod_main.c
@@ -56,7 +56,7 @@ struct _Instance
 
struct
{
-  char temp, distance[3], pressure[3], speed[4];
+  char temp, distance[3], pressure[3], speed[5];
} units;
 
struct
@@ -370,8 +370,8 @@ _forecasts_config_item_get(const char *id)
ci->id = eina_stringshare_add(id);
ci->poll_time = 60.0;
ci->degrees = DEGREES_C;
-   ci->host = eina_stringshare_add("xml.weather.yahoo.com");
-   ci->code = eina_stringshare_add("BUXX0005");
+   ci->host = eina_stringshare_add("query.yahooapis.com");
+   ci->code = eina_stringshare_add("839722");
ci->show_text = 1;
ci->popup_on_hover = 1;
 
@@ -424,8 +424,8 @@ e_modapi_init(E_Module *m)
 ci = E_NEW(Config_Item, 1);
 ci->poll_time = 60.0;
 ci->degrees = DEGREES_C;
-ci->host = eina_stringshare_add("xml.weather.yahoo.com");
-ci->code = eina_stringshare_add("BUXX0005");
+ci->host = eina_stringshare_add("query.yahooapis.com");
+ci->code = eina_stringshare_add("839722");
 ci->id = eina_stringshare_add("0");
 ci->show_text = 1;
 ci->popup_on_hover = 1;
@@ -608,7 +608,7 @@ _forecasts_server_add(void *data, int type, void *event)
else
  degrees = 'c';
 
-   snprintf(forecast, sizeof(forecast), "/forecastrss?p=%s&u=%c", 
inst->ci->code, degrees);
+   snprintf(forecast, sizeof(forecast), 
"/v1/public/yql?q=select+%%2A+from+weather.forecast+where+woeid%%3D%s+and+u%%3D%%27%c%%27",
 inst->ci->code, degrees);
snprintf(buf, sizeof(buf), "GET http://%s%s HTTP/1.1\r\n"
   "Host: %s\r\n"
   "Connection: close\r\n\r\n",
@@ -665,6 +665,7 @@ _forecasts_parse(void *data)
char *needle;
char city[256];
char region[256];
+   char *region_ptr;
char location[512];
float visibility;
int i;
@@ -676,29 +677,33 @@ _forecasts_parse(void *data)
  return 0;
 
/* Location */
-   needle = strstr(eina_strbuf_string_get(inst->buffer), "location, location);
 
/* Units */
-   needle = strstr(eina_strbuf_string_get(inst->buffer), "units.temp);
+   needle = strstr(eina_strbuf_string_get(inst->buffer), "units.speed);
+   sscanf(needle, "\"%4[^\"]\"", inst->units.speed);
+   needle = strstr(needle, "temperature=\"");
+   if (!needle) goto error;
+   needle = strstr(needle, "\"");
+   sscanf(needle, "\"%c\"", &inst->units.temp);
 
/* Current conditions */
-   needle = strstr(eina_strbuf_string_get(inst->buffer), "condition.desc);
needle = strstr(needle, "code=\"");
if (!needle) goto error;
needle = strstr(needle, "\"");
sscanf(needle, "\"%d\"", &inst->condition.code);
+   needle = strstr(needle, "date=\"");
+   if (!needle) goto error;
+   needle = strstr(needle, "\"");
+   sscanf(needle, "\"%51[^\"]\"", inst->condition.update);
needle = strstr(needle, "temp=\"");
if (!needle) goto error;
needle = strstr(needle, "\"");
sscanf(needle, "\"%d\"", &inst->condition.temp);
-   needle = strstr(needle, "date=\"");
+   needle = strstr(needle, "text=\"");
if (!needle) goto error;
needle = strstr(needle, "\"");
-   sscanf(needle, "\"%51[^\"]\"", inst->condition.update);
+   sscanf(needle, "\"%255[^\"]\"", inst->condition.desc);
 
/* Details */
/* Wind */
-   needle = strstr(eina_strbuf_string_get(inst->buffer), "details.wind.chill);
@@ -746,15 +759,12 @@ _forecasts_parse(void *data)
sscanf(needle, "\"%d\"", &inst->details.wind.speed);
 
/* Atmosphere */
-   needle = strstr(eina_strbuf_string_get(inst->buffer), "details.atmosphere.humidity);
- 

[EGIT] [core/enlightenment] enlightenment-0.20 21/27: modules/temperature: cosmetics: typo fix (celcius -> celsius)

2016-07-15 Thread Mariusz Bialonczyk
discomfitor pushed a commit to branch enlightenment-0.20.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=3771347cc341932a3c6527c33947fb2d85594745

commit 3771347cc341932a3c6527c33947fb2d85594745
Author: Mariusz Bialonczyk 
Date:   Tue Jul 5 11:45:00 2016 -0400

modules/temperature: cosmetics: typo fix (celcius -> celsius)

Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4129
---
 src/modules/temperature/e_mod_config.c | 2 +-
 src/modules/temperature/e_mod_main.c   | 6 +++---
 src/modules/temperature/e_mod_main.h   | 2 +-
 src/modules/temperature/e_mod_udev.c   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/modules/temperature/e_mod_config.c 
b/src/modules/temperature/e_mod_config.c
index 3e938c2..57f5212 100644
--- a/src/modules/temperature/e_mod_config.c
+++ b/src/modules/temperature/e_mod_config.c
@@ -220,7 +220,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, 
E_Config_Dialog_Data
 
ol = e_widget_list_add(evas, 0, 0);
rg = e_widget_radio_group_new(&(cfdata->unit_method));
-   ow = e_widget_radio_add(evas, _("Celsius"), CELCIUS, rg);
+   ow = e_widget_radio_add(evas, _("Celsius"), CELSIUS, rg);
e_widget_on_change_hook_set(ow, _cb_display_changed, cfdata);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
ow = e_widget_radio_add(evas, _("Fahrenheit"), FAHRENHEIT, rg);
diff --git a/src/modules/temperature/e_mod_main.c 
b/src/modules/temperature/e_mod_main.c
index 8a0906f..ab4ef76 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -64,7 +64,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, 
const char *style)
 inst->high = 80;
 inst->sensor_type = SENSOR_TYPE_NONE;
 inst->sensor_name = NULL;
-inst->units = CELCIUS;
+inst->units = CELSIUS;
 #ifdef HAVE_EEZE
 inst->backend = UDEV;
 #endif
@@ -76,7 +76,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, 
const char *style)
E_CONFIG_LIMIT(inst->poll_interval, 1, 1024);
E_CONFIG_LIMIT(inst->low, 0, 100);
E_CONFIG_LIMIT(inst->high, 0, 220);
-   E_CONFIG_LIMIT(inst->units, CELCIUS, FAHRENHEIT);
+   E_CONFIG_LIMIT(inst->units, CELSIUS, FAHRENHEIT);
 #ifdef HAVE_EEZE
E_CONFIG_LIMIT(inst->backend, TEMPGET, UDEV);
 #endif
@@ -201,7 +201,7 @@ _gc_id_new(const E_Gadcon_Client_Class *client_class 
EINA_UNUSED)
inst->high = 80;
inst->sensor_type = SENSOR_TYPE_NONE;
inst->sensor_name = NULL;
-   inst->units = CELCIUS;
+   inst->units = CELSIUS;
 #ifdef HAVE_EEZE
inst->backend = TEMPGET;
 #endif
diff --git a/src/modules/temperature/e_mod_main.h 
b/src/modules/temperature/e_mod_main.h
index 3d0157e..08a60b1 100644
--- a/src/modules/temperature/e_mod_main.h
+++ b/src/modules/temperature/e_mod_main.h
@@ -29,7 +29,7 @@ typedef struct _Config_Face Config_Face;
 
 typedef enum _Unit
 {
-   CELCIUS,
+   CELSIUS,
FAHRENHEIT
 } Unit;
 
diff --git a/src/modules/temperature/e_mod_udev.c 
b/src/modules/temperature/e_mod_udev.c
index 54fe27b..f0fafd0 100644
--- a/src/modules/temperature/e_mod_udev.c
+++ b/src/modules/temperature/e_mod_udev.c
@@ -39,7 +39,7 @@ temperature_udev_update(void *data)
cur = strtod(test, NULL);
if (cur > 0)
  {
-temp += (cur / 1000); /* udev reports temp in 
(celcius * 1000) for some reason */
+temp += (cur / 1000); /* udev reports temp in 
(celsius * 1000) for some reason */
 cpus++;
  }
 }

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 01/10: modules/temperature: cosmetics: typo fix (celcius -> celsius)

2016-07-15 Thread Mariusz Bialonczyk
discomfitor pushed a commit to branch enlightenment-0.21.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=71da3a78329de7484aed36eb233002e8f2d822e1

commit 71da3a78329de7484aed36eb233002e8f2d822e1
Author: Mariusz Bialonczyk 
Date:   Tue Jul 5 11:45:00 2016 -0400

modules/temperature: cosmetics: typo fix (celcius -> celsius)

Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4129
---
 src/modules/temperature/e_mod_config.c | 2 +-
 src/modules/temperature/e_mod_main.c   | 6 +++---
 src/modules/temperature/e_mod_main.h   | 2 +-
 src/modules/temperature/e_mod_udev.c   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/modules/temperature/e_mod_config.c 
b/src/modules/temperature/e_mod_config.c
index 3e938c2..57f5212 100644
--- a/src/modules/temperature/e_mod_config.c
+++ b/src/modules/temperature/e_mod_config.c
@@ -220,7 +220,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, 
E_Config_Dialog_Data
 
ol = e_widget_list_add(evas, 0, 0);
rg = e_widget_radio_group_new(&(cfdata->unit_method));
-   ow = e_widget_radio_add(evas, _("Celsius"), CELCIUS, rg);
+   ow = e_widget_radio_add(evas, _("Celsius"), CELSIUS, rg);
e_widget_on_change_hook_set(ow, _cb_display_changed, cfdata);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
ow = e_widget_radio_add(evas, _("Fahrenheit"), FAHRENHEIT, rg);
diff --git a/src/modules/temperature/e_mod_main.c 
b/src/modules/temperature/e_mod_main.c
index 8a0906f..ab4ef76 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -64,7 +64,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, 
const char *style)
 inst->high = 80;
 inst->sensor_type = SENSOR_TYPE_NONE;
 inst->sensor_name = NULL;
-inst->units = CELCIUS;
+inst->units = CELSIUS;
 #ifdef HAVE_EEZE
 inst->backend = UDEV;
 #endif
@@ -76,7 +76,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, 
const char *style)
E_CONFIG_LIMIT(inst->poll_interval, 1, 1024);
E_CONFIG_LIMIT(inst->low, 0, 100);
E_CONFIG_LIMIT(inst->high, 0, 220);
-   E_CONFIG_LIMIT(inst->units, CELCIUS, FAHRENHEIT);
+   E_CONFIG_LIMIT(inst->units, CELSIUS, FAHRENHEIT);
 #ifdef HAVE_EEZE
E_CONFIG_LIMIT(inst->backend, TEMPGET, UDEV);
 #endif
@@ -201,7 +201,7 @@ _gc_id_new(const E_Gadcon_Client_Class *client_class 
EINA_UNUSED)
inst->high = 80;
inst->sensor_type = SENSOR_TYPE_NONE;
inst->sensor_name = NULL;
-   inst->units = CELCIUS;
+   inst->units = CELSIUS;
 #ifdef HAVE_EEZE
inst->backend = TEMPGET;
 #endif
diff --git a/src/modules/temperature/e_mod_main.h 
b/src/modules/temperature/e_mod_main.h
index 3d0157e..08a60b1 100644
--- a/src/modules/temperature/e_mod_main.h
+++ b/src/modules/temperature/e_mod_main.h
@@ -29,7 +29,7 @@ typedef struct _Config_Face Config_Face;
 
 typedef enum _Unit
 {
-   CELCIUS,
+   CELSIUS,
FAHRENHEIT
 } Unit;
 
diff --git a/src/modules/temperature/e_mod_udev.c 
b/src/modules/temperature/e_mod_udev.c
index 54fe27b..f0fafd0 100644
--- a/src/modules/temperature/e_mod_udev.c
+++ b/src/modules/temperature/e_mod_udev.c
@@ -39,7 +39,7 @@ temperature_udev_update(void *data)
cur = strtod(test, NULL);
if (cur > 0)
  {
-temp += (cur / 1000); /* udev reports temp in 
(celcius * 1000) for some reason */
+temp += (cur / 1000); /* udev reports temp in 
(celsius * 1000) for some reason */
 cpus++;
  }
 }

-- 




[EGIT] [libs/libeweather] master 01/01: libeweather: Fix the yahoo plugin, change to new public weather API

2016-10-05 Thread Mariusz Bialonczyk
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/libs/libeweather.git/commit/?id=f88cb2c84deef63f84a12f7c0f6bb2e34fd4a22a

commit f88cb2c84deef63f84a12f7c0f6bb2e34fd4a22a
Author: Mariusz Bialonczyk 
Date:   Wed Oct 5 14:51:48 2016 -0400

libeweather: Fix the yahoo plugin, change to new public weather API

cosmetics: fix format in the debug printf's

Summary:
Even this code is commented out, when somebody use it for debug
purposes it will show zero values, as the format is wrong.

The commit fixes this.

yahoo: fix the plugin, use the new YQL weather API

Yahoo returns its Weather API to public access again.
This commit fixes the plugin to use this new API.
Some changes were needed, eg the field order in the
XML data changed slightly.

More details:

https://www.igorkromin.net/index.php/2016/04/14/yahoo-returns-its-weather-api-to-public-access-switches-to-yql-for-query/

Reviewers: devilhorns

Subscribers: cedric, bu5hm4n

Differential Revision: https://phab.enlightenment.org/D4128
---
 src/bin/eweather_test.c   |  9 +
 src/plugins/yahoo/yahoo.c | 51 +++
 2 files changed, 34 insertions(+), 26 deletions(-)

diff --git a/src/bin/eweather_test.c b/src/bin/eweather_test.c
index b3198a0..35ceb24 100644
--- a/src/bin/eweather_test.c
+++ b/src/bin/eweather_test.c
@@ -98,6 +98,15 @@ int main(int argc, char **argv)
 eweather_plugin_set(eweather, m);
 break;
 }
+
+// uncomment the following code to test the Yahoo plugin:
+/* if(!strcmp(eweather_plugin_name_get(eweather, i), "Yahoo"))
+{
+eweather_plugin_set(eweather, m);
+eweather_code_set(eweather, "791149");
+eweather_temp_type_set(eweather, EWEATHER_TEMP_CELCIUS);
+break;
+}*/
 }
 
 evas_object_focus_set(ow, EINA_TRUE);
diff --git a/src/plugins/yahoo/yahoo.c b/src/plugins/yahoo/yahoo.c
index 8d6e6d9..a833fd0 100644
--- a/src/plugins/yahoo/yahoo.c
+++ b/src/plugins/yahoo/yahoo.c
@@ -117,7 +117,7 @@ static void _init(EWeather *eweather)
Instance *inst = calloc(1, sizeof(Instance));
eweather->plugin.data = inst;
inst->weather = eweather;
-   inst->host = eina_stringshare_add("weather.yahooapis.com");
+   inst->host = eina_stringshare_add("query.yahooapis.com");
 
ecore_con_init();
 
@@ -220,7 +220,7 @@ _server_add(void *data, int type, void *event)
ev = event;
if ((!inst->server) || (inst->server != ev->server)) return EINA_TRUE;
 
-   snprintf(buf, sizeof(buf), "GET http://%s/forecastrss?w=%s 
HTTP/1.1\r\nHost: %s\r\n\r\n",
+   snprintf(buf, sizeof(buf), "GET 
http://%s/v1/public/yql?q=select+%%2A+from+weather.forecast+where+woeid%%3D%s 
HTTP/1.1\r\nHost: %s\r\n\r\n",
 inst->host, inst->weather->code, inst->host);
ecore_con_server_send(inst->server, buf, strlen (buf));
return EINA_FALSE;
@@ -313,16 +313,16 @@ _parse(Instance *inst)
needle+=6;
sscanf(needle, "%[^\"]\"", e_data->city);
 
-   needle = strstr(needle, "region=\"");
-   if (!needle) goto error;
-   needle+=8;
-   sscanf(needle, "%[^\"]\"", e_data->region);
-
needle = strstr(needle, "country=\"");
if (!needle) goto error;
needle+=9;
sscanf(needle, "%[^\"]\"", e_data->country);
 
+   needle = strstr(needle, "region=\"");
+   if (!needle) goto error;
+   needle+=8;
+   sscanf(needle, "%[^\"]\"", e_data->region);
+
needle = strstr(needle, "");
if (!needle) goto error;
needle += 9;
@@ -345,7 +345,7 @@ _parse(Instance *inst)
sscanf(needle, "%lf\"", &(e_data->temp));
 
 
-   needle = strstr(needle, "Forecast:");
+   needle = strstr(needle, "<b>Forecast:</b>");
if (!needle) goto error;
 
needle = strstr(needle, "High: ");
@@ -364,23 +364,28 @@ _parse(Instance *inst)
printf("REGION %s\n", e_data->region);
printf("COUNTRY %s\n", e_data->country);
printf("TYPE %d\n", e_data->type);
-   printf("TEMP %d\n", e_data->temp);
-   printf("TEMP MIN %d\n", e_data->temp_min);
-   printf("TEMP MAX %d\n", e_data->temp_max);
+   printf("TEMP %f\n", e_data->temp);
+   printf("TEMP MIN %f\n", e_data->temp_min);
+   printf("TEMP MAX %f\n", e_data->temp_max);
*/
 
//tomorrow
e_data = eweather_data_get(inst->weather, 1);
 
-   needle = strstr(needle, "buffer, "type = _weather_type_get(code);
+
needle = strstr(needle, "date=\"");
if (!needle) goto error;
needle+=6;
@

[EGIT] [enlightenment/modules/forecasts] master 02/02: Add json-c dependency

2019-06-03 Thread Mariusz Bialonczyk
raster pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/modules/forecasts.git/commit/?id=0589f319c8c35f35b0e6dd741804a032ffb4ecd3

commit 0589f319c8c35f35b0e6dd741804a032ffb4ecd3
Author: Mariusz Bialonczyk 
Date:   Mon Jun 3 16:47:57 2019 +0100

Add json-c dependency

Summary:
Old API retired => use yahoo weather JSON API

The new API is returning data in JSON format.
This commit is switching it over (currently SSL server) and parsing
to have the data in par with previous data.

Example data:
https://www.yahoo.com/news/_tdnews/api/resource/WeatherService;woeids=839722

Fix millibar to inches of mercury divider

Merge branch 'json-api'

Reviewers: vtorri, bu5hm4n, stephenmhouston, raster

Reviewed By: vtorri

Subscribers: raster, vtorri

Differential Revision: https://phab.enlightenment.org/D8095
---
 src/e_mod_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/e_mod_main.c b/src/e_mod_main.c
index 4335c2c..fbf0c10 100644
--- a/src/e_mod_main.c
+++ b/src/e_mod_main.c
@@ -933,7 +933,7 @@ _forecasts_popup_content_create(Instance *inst)
 
if (!inst->location) return;
 
-   inst->popup = e_gadcon_popup_new(inst->gcc, E_COMP_OBJECT_TYPE_POPUP);
+   inst->popup = e_gadcon_popup_new(inst->gcc, 0);
 
evas = e_comp->evas;
o = e_widget_list_add(evas, 0, 0);

-- 




[EGIT] [enlightenment/modules/forecasts] master 01/02: Add json-c dependency

2019-06-03 Thread Mariusz Bialonczyk
raster pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/modules/forecasts.git/commit/?id=375f6e2306e5079bdbdb4e0bf658ec0726ef123d

commit 375f6e2306e5079bdbdb4e0bf658ec0726ef123d
Author: Mariusz Bialonczyk 
Date:   Mon May 13 15:12:30 2019 +0100

Add json-c dependency

Summary:
Old API retired => use yahoo weather JSON API

The new API is returning data in JSON format.
This commit is switching it over (currently SSL server) and parsing
to have the data in par with previous data.

Example data:
https://www.yahoo.com/news/_tdnews/api/resource/WeatherService;woeids=839722

Fix millibar to inches of mercury divider

Merge branch 'json-api'

Reviewers: vtorri, bu5hm4n, stephenmhouston

Reviewed By: vtorri

Subscribers: raster, vtorri

Differential Revision: https://phab.enlightenment.org/D8095
---
 .gitignore  |   1 +
 INSTALL |  16 +--
 Makefile.am |  32 -
 autogen.sh  |  17 ---
 configure.ac|  72 ---
 e_modules-forecasts.spec.in |  48 
 m4/.svnignore   |   0
 meson.build |  75 
 module.desktop.in => module.desktop |   0
 po/LINGUAS  |   1 -
 po/Makevars |  41 ---
 po/POTFILES.in  |   4 -
 po/meson.build  |  11 ++
 src/Makefile.am |  20 
 src/e_mod_config.c  |  14 +--
 src/e_mod_main.c| 230 +++-
 src/meson.build |  10 ++
 17 files changed, 179 insertions(+), 413 deletions(-)

diff --git a/.gitignore b/.gitignore
index a91aea0..2f27f62 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+build
 *~
 ABOUT-NLS
 Makefile
diff --git a/INSTALL b/INSTALL
index 8919fc2..7b1a1a6 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,11 +1,5 @@
-COMPILING and INSTALLING:
-
-If you got a official release tar archive do:
-./autogen.sh
-  
-Then to compile:
-make
-
-To install:
-make install
-
+To build using meson:
+  meson build
+  cd build
+  ninja
+  ninja install
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 2e3ae8c..000
--- a/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-ACLOCAL_AMFLAGS = -I m4
-MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
-  config.sub configure depcomp install-sh ltmain.sh \
-  missing module.desktop config.rpath mkinstalldirs
-
-SUBDIRS = src
-
-if HAVE_PO
-
-SUBDIRS += po
-
-endif
-
-EDJE_FLAGS = -id $(top_srcdir)/images
-
-filesdir = $(datadir)
-files_DATA = module.desktop e-module-forecasts.edj forecasts.edj
-
-EXTRA_DIST = module.desktop.in \
-e_modules-forecasts.spec.in \
-e-module-forecasts.edc \
-forecasts.edc \
-$(wildcard images/*.png)
-
-%.edj:  %.edc
-   $(EDJE_CC) $(EDJE_FLAGS) $< $@
-
-clean-local:
-   rm -rf forecasts.edj e-module-forecasts.edj module.desktop 
e_modules-forecasts.spec *~
-
-uninstall:
-   rm -rf $(DESTDIR)$(datadir)
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index ae01364..000
--- a/autogen.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-rm -rf autom4te.cache
-rm -f aclocal.m4 ltmain.sh
-
-touch README
-
-echo "Running autopoint..." ; autopoint -f || :
-echo "Running aclocal..." ; aclocal -I m4 $ACLOCAL_FLAGS || exit 1
-echo "Running autoheader..." ; autoheader || exit 1
-echo "Running autoconf..." ; autoconf || exit 1
-echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize 
--automake) || exit 1
-echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
-
-if [ -z "$NOCONFIGURE" ]; then
-   ./configure "$@"
-fi
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 82b9744..000
--- a/configure.ac
+++ /dev/null
@@ -1,72 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-# get rid of that stupid cache mechanism
-rm -f config.cache
-
-AC_INIT(forecasts, 0.2.0, vik...@bloka.org)
-AC_PREREQ(2.52)
-AC_CONFIG_SRCDIR(configure.ac)
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-AC_ISC_POSIX
-
-AM_INIT_AUTOMAKE(1.6)
-AC_CONFIG_HEADERS(config.h)
-
-AC_PROG_CC
-AC_HEADER_STDC
-AC_C_CONST
-
-define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
-define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
-AC_PROG_LIBTOOL
-
-m4_ifdef([AM_GNU_GETTEXT_VERSION], [
-AM_GNU_GETTEXT_VERSION([0.14])
-])
-
-m4_ifdef([AM_GNU_GETTEXT], [
-AM_GNU_GETTEXT([external])
-po_makefile_in=po/Makefile.in
-AM_CONDITIONAL([HAVE_PO], [true])
-],[
-AM_CONDITIONAL([HAVE_PO], [false])
-])
-AC_SUBST(LTLIBINTL)
-
-PKG_CHECK_MODULES(E, [enlig