summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdarsh Shree Ram <adarsh.ram@samsung.com>2016-06-23 18:12:49 +0530
committerAdarsh Shree Ram <adarsh.ram@samsung.com>2016-06-23 18:12:49 +0530
commite5a46eb1ec906fff4121702615a21b1a849893c2 (patch)
tree6248209f94e9f826136e852711a4702b7b47c19f
parent298b2bf9a798a12bf2becbac20a8e27b807f4a8b (diff)
downloadindicator-win-e5a46eb1ec906fff4121702615a21b1a849893c2.tar.gz
indicator-win-e5a46eb1ec906fff4121702615a21b1a849893c2.tar.bz2
indicator-win-e5a46eb1ec906fff4121702615a21b1a849893c2.zip
Fixed Battery vconf issue and svace build warnings.
Change-Id: I8e86f8a6ccf630ce9279af088ed2341ec7851e88
-rw-r--r--include/windicator.h2
-rw-r--r--include/windicator_battery.h2
-rw-r--r--include/windicator_dynamic.h1
-rw-r--r--src/windicator.c38
-rw-r--r--src/windicator_battery.c13
-rwxr-xr-xsrc/windicator_brightness.c4
-rw-r--r--src/windicator_dnd_btn.c1
-rw-r--r--src/windicator_moment_bar.c2
-rw-r--r--src/windicator_music_btn.c2
-rw-r--r--src/windicator_scs.c1
-rw-r--r--src/windicator_util.c3
11 files changed, 42 insertions, 27 deletions
diff --git a/include/windicator.h b/include/windicator.h
index f5224dd..cadb16e 100644
--- a/include/windicator.h
+++ b/include/windicator.h
@@ -204,6 +204,6 @@ struct appdata
int momentbar_showing;
void* msg_handle;
};
-
+struct appdata *windicator_appdata_get(void);
void windicator_lo_update(void* data);
void windicator_util_display_lock(void);
diff --git a/include/windicator_battery.h b/include/windicator_battery.h
index 0bdd8e1..1089a5b 100644
--- a/include/windicator_battery.h
+++ b/include/windicator_battery.h
@@ -27,4 +27,6 @@ void windicator_battery_icon_destroy(void *data);
windicator_error_e windicator_battery_icon_update(Evas_Object *layout, void *data);
extern void _battery_update(void* data);
extern char *windicator_util_str_from_icu_get(int level);
+extern windicator_error_e windicator_battery_init(void *data);
+extern void windicator_battery_fini(void);
#endif /* __WINDICATOR_BATTERY_H__ */
diff --git a/include/windicator_dynamic.h b/include/windicator_dynamic.h
index 7a933a1..944d044 100644
--- a/include/windicator_dynamic.h
+++ b/include/windicator_dynamic.h
@@ -32,5 +32,6 @@ void windicator_set_dynamic_icon_layout(void* data, int isBTConnected);
void dynamic_event_icon_refresh_position_for_3g(Evas_Object *layout, int isForMomentView);
windicator_error_e windicator_dynamic_vconfkey_register(void *data);
+extern void windicator_dynamic_vconfkey_unregister(void);
#endif /* __WINDICATOR_DYNAMIC_H__ */
diff --git a/src/windicator.c b/src/windicator.c
index d754a9d..3262d45 100644
--- a/src/windicator.c
+++ b/src/windicator.c
@@ -28,6 +28,7 @@
#include "windicator_dynamic.h"
#include "windicator_scs.h"
#include "windicator_battery.h"
+#include "windicator_brightness.h"
#include "windicator_call_fwd_btn.h"
#define MOMENT_VIEW_HEIGHT 105;
@@ -153,6 +154,25 @@ void windicator_lo_update(void* data)
elm_object_signal_emit(ad->moment_bar_first_page_layout, "set_default_layout", "sw.all");
}
+void create_moments_bar_win(void *user_data)
+{
+ struct appdata *ad = (struct appdata *)user_data;
+ elm_config_preferred_engine_set("opengl_x11");
+ _init_variables(ad);
+
+ /* initialize Moment Bar */
+ if(WINDICATOR_ERROR_OK != windicator_moment_bar_init(ad)) {
+ _E("Failed to initialize moment bar");
+ }
+
+ /* initialize Moment View */
+ if(WINDICATOR_ERROR_OK != windicator_moment_view_init(ad)) {
+ _E("Failed to intialize moment view");
+ }
+ //evas_object_show(ad->moment_view_win);
+ //evas_object_show(ad->moment_bar_win);
+}
+
static bool app_create(void *data)
{
_D("app_create");
@@ -184,24 +204,6 @@ static bool app_create(void *data)
* sends the launch request to the application
*/
-void create_moments_bar_win(void *user_data)
-{
- struct appdata *ad = (struct appdata *)user_data;
- elm_config_preferred_engine_set("opengl_x11");
- _init_variables(ad);
-
- /* initialize Moment Bar */
- if(WINDICATOR_ERROR_OK != windicator_moment_bar_init(ad)) {
- _E("Failed to initialize moment bar");
- }
-
- /* initialize Moment View */
- if(WINDICATOR_ERROR_OK != windicator_moment_view_init(ad)) {
- _E("Failed to intialize moment view");
- }
- //evas_object_show(ad->moment_view_win);
- //evas_object_show(ad->moment_bar_win);
-}
static void app_control(app_control_h app_control, void *user_data)
{
diff --git a/src/windicator_battery.c b/src/windicator_battery.c
index 643a027..23726dd 100644
--- a/src/windicator_battery.c
+++ b/src/windicator_battery.c
@@ -106,7 +106,8 @@ static void _battery_status_changed_cb(keynode_t *node, void *data)
void _battery_update(void* data)
{
-
+ //by default getting the battery at the start
+ vconf_set_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, EINA_TRUE);
_W("");
struct appdata *ad = data;
@@ -379,3 +380,13 @@ windicator_error_e windicator_battery_init(void *data)
return WINDICATOR_ERROR_OK;
}
+void windicator_battery_fini(void)
+{
+ /* battery charge connected/disconnected */
+ vconf_ignore_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS, _battery_charging_changed_cb);
+ vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, _battery_charging_changed_cb);
+
+ /* battery fully charged */
+ vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, _battery_status_changed_cb);
+
+}
diff --git a/src/windicator_brightness.c b/src/windicator_brightness.c
index 104c4fc..daeef7b 100755
--- a/src/windicator_brightness.c
+++ b/src/windicator_brightness.c
@@ -84,7 +84,7 @@ Evas_Object *windicator_brightness_small_layout_create(Evas_Object *parent, void
evas_object_show(layout);
return layout;
}
-
+/*
static int _brightness_level_to_index(int level, int max)
{
int index = 1;
@@ -118,7 +118,7 @@ static int _brightness_level_to_index(int level, int max)
return index;
}
-
+*/
char *windicator_util_str_from_icu_get(int level)
{
char *ret_str = NULL;
diff --git a/src/windicator_dnd_btn.c b/src/windicator_dnd_btn.c
index 7976b62..d94945f 100644
--- a/src/windicator_dnd_btn.c
+++ b/src/windicator_dnd_btn.c
@@ -227,7 +227,6 @@ void on_released_dnd_icon(void *data, Evas_Object *obj, const char *emission, co
Evas_Object *windicator_dnd_btn_layout_create(Evas_Object *parent, void *data)
{
retv_if(parent== NULL, NULL);
- bool exist = false;
struct appdata *ad = (struct appdata *)data;
retv_if(ad == NULL, NULL);
diff --git a/src/windicator_moment_bar.c b/src/windicator_moment_bar.c
index fb16167..a2b37f4 100644
--- a/src/windicator_moment_bar.c
+++ b/src/windicator_moment_bar.c
@@ -276,7 +276,7 @@ windicator_error_e windicator_moment_bar_init(void *data)
ad->moment_bar_conformant = windicator_util_conformant_create(ad->moment_bar_win);
retv_if(ad->moment_bar_conformant == NULL, WINDICATOR_ERROR_FAIL);
- evas_object_resize(ad->moment_bar_win, &ad->win_w, &ad->win_h);
+ evas_object_resize(ad->moment_bar_win, ad->win_w, ad->win_h);
// Eext Circle Surface Creation
ad->moment_bar_circle_surface = eext_circle_surface_conformant_add(ad->moment_bar_conformant);
diff --git a/src/windicator_music_btn.c b/src/windicator_music_btn.c
index f7ed2cb..1db79ae 100644
--- a/src/windicator_music_btn.c
+++ b/src/windicator_music_btn.c
@@ -39,7 +39,7 @@ void _music_btn_clicked_cb(void *data, Evas_Object *obj, const char *emission, c
else
{
ad->launch_music_trigger = 0;
- ("Music app is NOT ongoing, so skip this click event");
+ _D("Music app is NOT ongoing, so skip this click event");
}
}
diff --git a/src/windicator_scs.c b/src/windicator_scs.c
index 89a8729..b7247a2 100644
--- a/src/windicator_scs.c
+++ b/src/windicator_scs.c
@@ -29,7 +29,6 @@ windicator_error_e windicator_scs_update(void *data)
retv_if(ad == NULL, WINDICATOR_ERROR_INVALID_PARAMETER);
int sap_connected = 0;
- int headset_connected = 0;
int isBTOn = 0;
if (vconf_get_int(VCONFKEY_BT_STATUS, &isBTOn) != 0) {
diff --git a/src/windicator_util.c b/src/windicator_util.c
index 8e046e4..3e7f4c4 100644
--- a/src/windicator_util.c
+++ b/src/windicator_util.c
@@ -159,7 +159,7 @@ void windicator_util_launch_app(void *data)
//launch setting
if(ad->launch_setting_trigger==1)//brightness
{
- app_control_set_package(ac, CLOCK_SETTING_BRIGHTNESS_PKG_NAME);
+ app_control_set_app_id(ac, CLOCK_SETTING_BRIGHTNESS_PKG_NAME);
app_control_add_extra_data(ac, "launch-type", "brightness");
}
@@ -192,6 +192,7 @@ void windicator_util_event_register(void *data)
void windicator_util_event_unregister()
{
windicator_dynamic_vconfkey_unregister();
+ windicator_battery_fini();
}
void windicator_util_display_lock(void)