formatting

lot of mixed spaces/tabs here made the code unreadable
This commit is contained in:
Mike Blumenkrantz 2017-08-29 15:20:05 -04:00
parent f5e19a7721
commit b5e75eb264
36 changed files with 1270 additions and 1152 deletions

View File

@ -25,7 +25,8 @@ _backlight_gadget_update(Instance *inst)
else
msg.val = inst->val;
if (msg.val < 0.0) msg.val = 0.0;
else if (msg.val > 1.0) msg.val = 1.0;
else if (msg.val > 1.0)
msg.val = 1.0;
edje_object_message_send(elm_layout_edje_get(inst->o_backlight), EDJE_MESSAGE_FLOAT, 0, &msg);
}
@ -312,3 +313,4 @@ backlight_shutdown(void)
}
E_FREE_LIST(handlers, ecore_event_handler_del);
}

View File

@ -26,7 +26,8 @@ struct _Context
E_Menu *menu;
unsigned int notification_id;
struct {
struct
{
E_Action *incr;
E_Action *decr;
E_Action *mute;
@ -897,6 +898,7 @@ _sink_input_event(int type, Emix_Sink_Input *input)
pid = _get_ppid(pid);
}
break;
case EMIX_SINK_INPUT_REMOVED_EVENT:
EINA_LIST_FOREACH(_client_sinks, l, sink)
{
@ -908,6 +910,7 @@ _sink_input_event(int type, Emix_Sink_Input *input)
}
}
break;
case EMIX_SINK_INPUT_CHANGED_EVENT:
EINA_LIST_FOREACH(_client_sinks, l, sink)
{
@ -930,12 +933,15 @@ _events_cb(void *data EINA_UNUSED, enum Emix_Event type, void *event_info)
case EMIX_SINK_REMOVED_EVENT:
_sink_event(type, event_info);
break;
case EMIX_DISCONNECTED_EVENT:
_disconnected();
break;
case EMIX_READY_EVENT:
_ready();
break;
case EMIX_SINK_INPUT_ADDED_EVENT:
case EMIX_SINK_INPUT_REMOVED_EVENT:
case EMIX_SINK_INPUT_CHANGED_EVENT:
@ -1083,7 +1089,6 @@ _bd_hook_sink_volume_drag_stop(void *data, Evas_Object *obj, void *event_info EI
elm_check_state_set(check, mute);
}
static void
_bd_hook_sink_mute_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{

View File

@ -141,6 +141,7 @@ _config_update_btn(Evas_Object *button, const int mouse_button)
case 0:
snprintf(lbl, sizeof(lbl), _("Click to set"));
break;
case 1:
if (e_config->mouse_hand == E_MOUSE_HAND_RIGHT)
{
@ -158,10 +159,12 @@ _config_update_btn(Evas_Object *button, const int mouse_button)
icon = "preferences-desktop-mouse-extra";
}
break;
case 2:
snprintf(lbl, sizeof(lbl), _("Middle button"));
icon = "preferences-desktop-mouse-middle";
break;
case 3:
if (e_config->mouse_hand == E_MOUSE_HAND_RIGHT)
{
@ -179,6 +182,7 @@ _config_update_btn(Evas_Object *button, const int mouse_button)
icon = "preferences-desktop-mouse-extra";
}
break;
default:
snprintf(lbl, sizeof(lbl), _("Button %i"), mouse_button);
icon = "preferences-desktop-mouse-extra";

View File

@ -105,3 +105,4 @@ e_modapi_gadget_save(E_Module *m EINA_UNUSED)
e_config_domain_save("module.pager", conf_edd, pager_config);
return 1;
}

View File

@ -178,9 +178,11 @@ _pager_location_get(Instance *inst)
case E_GADGET_SITE_ORIENT_HORIZONTAL:
s = "top";
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
s = "left";
break;
case E_GADGET_SITE_ORIENT_NONE:
s = "left";
break;
@ -193,9 +195,11 @@ _pager_location_get(Instance *inst)
case E_GADGET_SITE_ORIENT_HORIZONTAL:
s = "bottom";
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
s = "left";
break;
case E_GADGET_SITE_ORIENT_NONE:
s = "left";
break;
@ -213,9 +217,11 @@ _pager_location_get(Instance *inst)
case E_GADGET_SITE_ORIENT_HORIZONTAL:
s = "top";
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
s = "right";
break;
case E_GADGET_SITE_ORIENT_NONE:
s = "right";
break;
@ -228,9 +234,11 @@ _pager_location_get(Instance *inst)
case E_GADGET_SITE_ORIENT_HORIZONTAL:
s = "bottom";
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
s = "right";
break;
case E_GADGET_SITE_ORIENT_NONE:
s = "right";
break;
@ -250,9 +258,11 @@ _pager_location_get(Instance *inst)
case E_GADGET_SITE_ORIENT_HORIZONTAL:
s = "bottom";
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
s = "left";
break;
default:
s = "bottom";
break;
@ -316,7 +326,6 @@ _pager_gadget_anchor_change_cb(void *data, Evas_Object *obj, void *event_info EI
}
}
static void
_pager_gadget_created_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
@ -361,13 +370,14 @@ _pager_orient(Instance *inst, E_Gadget_Site_Orient orient)
{
switch (orient)
{
case E_GADGET_SITE_ORIENT_HORIZONTAL:
inst->pager->invert = EINA_FALSE;
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
inst->pager->invert = EINA_TRUE;
break;
default:
inst->pager->invert = EINA_FALSE;
}
@ -445,12 +455,15 @@ _pager_new(Evas *evas, Eina_Bool popup)
case E_POWERSAVE_MODE_HIGH:
p->plain = EINA_TRUE;
break;
case E_POWERSAVE_MODE_EXTREME:
p->plain = EINA_TRUE;
break;
case E_POWERSAVE_MODE_FREEZE:
p->plain = EINA_TRUE;
break;
default:
p->plain = EINA_FALSE;
}
@ -488,13 +501,14 @@ _pager_fill(Pager *p)
orient = e_gadget_site_orient_get(e_gadget_site_get(p->inst->o_pager));
switch (orient)
{
case E_GADGET_SITE_ORIENT_HORIZONTAL:
p->invert = EINA_FALSE;
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
p->invert = EINA_TRUE;
break;
default:
p->invert = EINA_FALSE;
}
@ -1090,12 +1104,15 @@ _pager_cb_config_gadget_updated(Eina_Bool style_changed)
case E_POWERSAVE_MODE_HIGH:
p->plain = EINA_TRUE;
break;
case E_POWERSAVE_MODE_EXTREME:
p->plain = EINA_TRUE;
break;
case E_POWERSAVE_MODE_FREEZE:
p->plain = EINA_TRUE;
break;
default:
p->plain = EINA_FALSE;
}
@ -1382,8 +1399,8 @@ _pager_window_desk_change(Pager *pager, E_Client *ec)
/* and this pager zone is for this client */
/* see if the window is in this pager at all */
pw = _pager_window_find(pager, ec);
if (pw)
{ /* is it sticky */
if (pw) /* is it sticky */
{
if (ec->sticky)
{
/* if its sticky and in this pager - its already everywhere, so abort
@ -1734,7 +1751,6 @@ _pager_cb_event_client_property(void *data EINA_UNUSED, int type EINA_UNUSED, vo
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_pager_cb_event_zone_desk_count_set(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Zone_Desk_Count_Set *ev)
{
@ -2129,7 +2145,6 @@ _pager_window_cb_drag_finished(E_Drag *drag, int dropped)
else y = 0;
evas_object_move(pw->client->frame, x, y);
if (!(pw->client->lock_user_stacking))
evas_object_raise(pw->client->frame);
evas_object_focus_set(pw->client->frame, 1);

View File

@ -417,7 +417,8 @@ _batman_config_updated(Instance *inst)
}
}
static void _warning_popup_dismissed(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
static void
_warning_popup_dismissed(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Instance *inst = data;
@ -425,7 +426,6 @@ static void _warning_popup_dismissed(void *data, Evas_Object *obj EINA_UNUSED, v
E_FREE_FUNC(inst->warning, evas_object_del);
}
static Eina_Bool
_batman_cb_warning_popup_timeout(void *data)
{
@ -755,3 +755,4 @@ batman_create(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient EINA_UNU
return inst->o_main;
}

View File

@ -140,12 +140,15 @@ _suspend_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
case 0:
inst->cfg->batman.suspend_method = SUSPEND;
break;
case 1:
inst->cfg->batman.suspend_method = HIBERNATE;
break;
case 2:
inst->cfg->batman.suspend_method = SHUTDOWN;
break;
default:
inst->cfg->batman.suspend_method = SUSPEND;
}
@ -166,18 +169,23 @@ _poll_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
case 0:
inst->cfg->batman.poll_interval = 4;
break;
case 1:
inst->cfg->batman.poll_interval = 8;
break;
case 2:
inst->cfg->batman.poll_interval = 32;
break;
case 3:
inst->cfg->batman.poll_interval = 64;
break;
case 4:
inst->cfg->batman.poll_interval = 256;
break;
default:
inst->cfg->batman.poll_interval = 32;
}
@ -372,18 +380,23 @@ batman_configure(Instance *inst)
case 4:
elm_radio_value_set(group, 0);
break;
case 8:
elm_radio_value_set(group, 1);
break;
case 32:
elm_radio_value_set(group, 2);
break;
case 64:
elm_radio_value_set(group, 3);
break;
case 256:
elm_radio_value_set(group, 4);
break;
default:
elm_radio_value_set(group, 2);
}
@ -539,12 +552,15 @@ batman_configure(Instance *inst)
case SUSPEND:
elm_radio_value_set(groupy, 0);
break;
case HIBERNATE:
elm_radio_value_set(groupy, 1);
break;
case SHUTDOWN:
elm_radio_value_set(groupy, 2);
break;
default:
elm_radio_value_set(groupy, 0);
}

View File

@ -727,7 +727,6 @@ linux_acpi_cb_acpid_add(void *data EINA_UNUSED,
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
linux_acpi_cb_acpid_del(void *data EINA_UNUSED,
int type EINA_UNUSED,

View File

@ -175,6 +175,7 @@ _batman_sysctl_battery_update_poll(void *data)
return EINA_TRUE;
}
#endif
static int
@ -324,7 +325,6 @@ _batman_sysctl_battery_update(Instance *inst)
#endif
}
EINA_LIST_FOREACH(batman_device_ac_adapters, l, ac)
{
#if defined(__OpenBSD__) || defined(__NetBSD__)
@ -350,5 +350,3 @@ _batman_sysctl_battery_update(Instance *inst)
return EINA_TRUE;
}

View File

@ -395,3 +395,4 @@ _batman_upower_stop(void)
E_FREE_FUNC(obj, eldbus_object_unref);
E_FREE_FUNC(conn, eldbus_connection_unref);
}

View File

@ -83,6 +83,7 @@ _cpuclock_set_thread_done(void *data EINA_UNUSED, Ecore_Thread *th EINA_UNUSED)
{
return;
}
#endif
void
@ -230,6 +231,7 @@ _cpuclock_event_cb_powersave(void *data, int type, void *event)
eina_stringshare_del(inst->cfg->cpuclock.status->orig_governor);
inst->cfg->cpuclock.status->orig_governor = NULL;
break;
case E_POWERSAVE_MODE_MEDIUM:
case E_POWERSAVE_MODE_HIGH:
if ((inst->cfg->cpuclock.powersave_governor) || (has_conservative))
@ -1002,7 +1004,6 @@ sysinfo_cpuclock_remove(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
if (inst->cfg->cpuclock.governor)
eina_stringshare_del(inst->cfg->cpuclock.governor);
E_FREE_FUNC(inst->cfg->cpuclock.status, _cpuclock_status_free);
}
static void
@ -1166,3 +1167,4 @@ cpuclock_create(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient EINA_U
return inst->o_main;
}

View File

@ -191,18 +191,23 @@ _poll_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
case 0:
inst->cfg->cpuclock.poll_interval = 4;
break;
case 1:
inst->cfg->cpuclock.poll_interval = 8;
break;
case 2:
inst->cfg->cpuclock.poll_interval = 32;
break;
case 3:
inst->cfg->cpuclock.poll_interval = 64;
break;
case 4:
inst->cfg->cpuclock.poll_interval = 256;
break;
default:
inst->cfg->cpuclock.poll_interval = 32;
}
@ -353,18 +358,23 @@ cpuclock_configure(Instance *inst)
case 4:
elm_radio_value_set(group, 0);
break;
case 8:
elm_radio_value_set(group, 1);
break;
case 32:
elm_radio_value_set(group, 2);
break;
case 64:
elm_radio_value_set(group, 3);
break;
case 256:
elm_radio_value_set(group, 4);
break;
default:
elm_radio_value_set(group, 2);
}

View File

@ -9,7 +9,6 @@
# include <sys/sysctl.h>
#endif
#if defined(__OpenBSD__)
int
_cpuclock_sysctl_frequency(int new_perf)
@ -22,6 +21,7 @@ _cpuclock_sysctl_frequency(int new_perf)
return 0;
}
#elif defined(__FreeBSD__) || defined(__DragonFly__)
int
_cpuclock_sysctl_frequency(int new_perf)
@ -31,4 +31,5 @@ _cpuclock_sysctl_frequency(int new_perf)
return 0;
}
#endif

View File

@ -147,3 +147,4 @@ sys_cpu_pstate(int min, int max, int turbo)
return 1;
}

View File

@ -20,18 +20,23 @@ _config_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
case 0:
inst->cfg->cpumonitor.poll_interval = 4;
break;
case 1:
inst->cfg->cpumonitor.poll_interval = 8;
break;
case 2:
inst->cfg->cpumonitor.poll_interval = 32;
break;
case 3:
inst->cfg->cpumonitor.poll_interval = 64;
break;
case 4:
inst->cfg->cpumonitor.poll_interval = 256;
break;
default:
inst->cfg->cpumonitor.poll_interval = 32;
}
@ -131,18 +136,23 @@ cpumonitor_configure(Instance *inst)
case 4:
elm_radio_value_set(group, 0);
break;
case 8:
elm_radio_value_set(group, 1);
break;
case 32:
elm_radio_value_set(group, 2);
break;
case 64:
elm_radio_value_set(group, 3);
break;
case 256:
elm_radio_value_set(group, 4);
break;
default:
elm_radio_value_set(group, 2);
}

View File

@ -66,7 +66,8 @@ _cpumonitor_proc_getusage(unsigned long *prev_total,
if (total_change != 0)
percent = 100 * (1 - ((float)idle_change / (float)total_change));
if (percent > 100) percent = 100;
else if (percent < 0) percent = 0;
else if (percent < 0)
percent = 0;
*prev_total = total;
*prev_idle = idle;
*prev_percent = percent;
@ -98,7 +99,8 @@ _cpumonitor_proc_getusage(unsigned long *prev_total,
if (total_change != 0)
percent = 100 * (1 - ((float)idle_change / (float)total_change));
if (percent > 100) percent = 100;
else if (percent < 0) percent = 0;
else if (percent < 0)
percent = 0;
core->percent = percent;
core->total = total;
core->idle = idle;

View File

@ -25,7 +25,6 @@ _cpumonitor_sysctl_getcores(void)
return cores;
}
void
_cpumonitor_sysctl_getusage(unsigned long *prev_total, unsigned long *prev_idle, int *prev_percent, Eina_List *cores)
{

View File

@ -395,7 +395,6 @@ _memusage_removed_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_data)
if (inst->o_main != event_data) return;
if (inst->cfg->memusage.popup)
E_FREE_FUNC(inst->cfg->memusage.popup, evas_object_del);
if (inst->cfg->memusage.configure)
@ -502,7 +501,6 @@ sysinfo_memusage_create(Evas_Object *parent, Instance *inst)
_memusage_resize_cb, inst);
evas_object_show(inst->cfg->memusage.o_gadget);
E_LIST_HANDLER_APPEND(inst->cfg->memusage.handlers, E_EVENT_SCREENSAVER_ON, _screensaver_on, inst);
E_LIST_HANDLER_APPEND(inst->cfg->memusage.handlers, E_EVENT_SCREENSAVER_OFF, _screensaver_off, inst);

View File

@ -20,18 +20,23 @@ _config_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
case 0:
inst->cfg->memusage.poll_interval = 4;
break;
case 1:
inst->cfg->memusage.poll_interval = 8;
break;
case 2:
inst->cfg->memusage.poll_interval = 32;
break;
case 3:
inst->cfg->memusage.poll_interval = 64;
break;
case 4:
inst->cfg->memusage.poll_interval = 256;
break;
default:
inst->cfg->memusage.poll_interval = 32;
}
@ -131,18 +136,23 @@ memusage_configure(Instance *inst)
case 4:
elm_radio_value_set(group, 0);
break;
case 8:
elm_radio_value_set(group, 1);
break;
case 32:
elm_radio_value_set(group, 2);
break;
case 64:
elm_radio_value_set(group, 3);
break;
case 256:
elm_radio_value_set(group, 4);
break;
default:
elm_radio_value_set(group, 2);
}

View File

@ -1,17 +1,19 @@
#include "memusage.h"
unsigned long _line_parse(const char *line)
unsigned long
_line_parse(const char *line)
{
char *p, *tok;
p = strchr(line, ':') + 1;
while(isspace(*p)) p++;
while (isspace(*p))
p++;
tok = strtok(p, " ");
return atol(tok);
}
void _memusage_proc_getusage(unsigned long *mem_total,
void
_memusage_proc_getusage(unsigned long *mem_total,
unsigned long *mem_used,
unsigned long *mem_cached,
unsigned long *mem_buffers,
@ -93,3 +95,4 @@ void _memusage_proc_getusage(unsigned long *mem_total,
*swp_total = tmp_swp_total;
*swp_used = tmp_swp_total - tmp_swp_free;
}

View File

@ -26,14 +26,17 @@ _sysctlfromname(const char *name, void *mib, int depth, size_t *len)
return result;
}
#endif
void _memsize_bytes_to_kb(unsigned long *bytes)
void
_memsize_bytes_to_kb(unsigned long *bytes)
{
*bytes = (unsigned int)*bytes >> 10;
}
void _memusage_sysctl_getusage(unsigned long *mem_total,
void
_memusage_sysctl_getusage(unsigned long *mem_total,
unsigned long *mem_used,
unsigned long *mem_cached,
unsigned long *mem_buffers,
@ -162,3 +165,4 @@ swap_out:
_memsize_bytes_to_kb(mem_shared);
#endif
}

View File

@ -23,18 +23,23 @@ _poll_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
case 0:
inst->cfg->netstatus.poll_interval = 4;
break;
case 1:
inst->cfg->netstatus.poll_interval = 8;
break;
case 2:
inst->cfg->netstatus.poll_interval = 32;
break;
case 3:
inst->cfg->netstatus.poll_interval = 64;
break;
case 4:
inst->cfg->netstatus.poll_interval = 256;
break;
default:
inst->cfg->netstatus.poll_interval = 32;
}
@ -249,18 +254,23 @@ netstatus_configure(Instance *inst)
case 4:
elm_radio_value_set(group, 0);
break;
case 8:
elm_radio_value_set(group, 1);
break;
case 32:
elm_radio_value_set(group, 2);
break;
case 64:
elm_radio_value_set(group, 3);
break;
case 256:
elm_radio_value_set(group, 4);
break;
default:
elm_radio_value_set(group, 2);
}

View File

@ -42,7 +42,8 @@ _netstatus_proc_getrstatus(Eina_Bool automax,
if (*prev_inmax > 0)
percent = 100 * ((float)*prev_incurrent / (float)*prev_inmax);
if (percent > 100) percent = 100;
else if (percent < 0) percent = 0;
else if (percent < 0)
percent = 0;
*prev_inpercent = percent;
}
}
@ -89,7 +90,8 @@ _netstatus_proc_gettstatus(Eina_Bool automax,
if (*prev_outcurrent > 0)
percent = 100 * ((float)*prev_outcurrent / (float)*prev_outmax);
if (percent > 100) percent = 100;
else if (percent < 0) percent = 0;
else if (percent < 0)
percent = 0;
*prev_outpercent = percent;
}
}

View File

@ -103,6 +103,7 @@ _openbsd_generic_network_status(unsigned long int *in, unsigned long int *out)
}
close(sock);
}
#endif
void
@ -137,7 +138,8 @@ _netstatus_sysctl_getrstatus(Eina_Bool automax,
if (*prev_inmax > 0)
percent = 100 * ((float)*prev_incurrent / (float)*prev_inmax);
if (percent > 100) percent = 100;
else if (percent < 0) percent = 0;
else if (percent < 0)
percent = 0;
*prev_inpercent = percent;
}
}
@ -174,7 +176,8 @@ _netstatus_sysctl_gettstatus(Eina_Bool automax,
if (*prev_outcurrent > 0)
percent = 100 * ((float)*prev_outcurrent / (float)*prev_outmax);
if (percent > 100) percent = 100;
else if (percent < 0) percent = 0;
else if (percent < 0)
percent = 0;
*prev_outpercent = percent;
}
}

View File

@ -11,7 +11,8 @@ _thermal_thread_free(Tempthread *tth)
eina_stringshare_del(tth->sensor_name);
eina_stringshare_del(tth->sensor_path);
#if defined(HAVE_EEZE)
EINA_LIST_FREE(tth->tempdevs, s) eina_stringshare_del(s);
EINA_LIST_FREE(tth->tempdevs, s)
eina_stringshare_del(s);
#endif
e_powersave_sleeper_free(tth->sleeper);
E_FREE(tth->extn);
@ -24,7 +25,8 @@ _thermal_face_level_set(Instance *inst, double level)
Edje_Message_Float msg;
if (level < 0.0) level = 0.0;
else if (level > 1.0) level = 1.0;
else if (level > 1.0)
level = 1.0;
msg.val = level;
edje_object_message_send(elm_layout_edje_get(inst->cfg->thermal.o_gadget), EDJE_MESSAGE_FLOAT, 1, &msg);
}
@ -32,7 +34,6 @@ _thermal_face_level_set(Instance *inst, double level)
static void
_thermal_apply(Instance *inst, int temp)
{
if (inst->cfg->thermal.temp == temp) return;
inst->cfg->thermal.temp = temp;
if (temp != -999)
@ -82,6 +83,7 @@ _thermal_udev_poll(void *data)
_thermal_apply(tth->inst, temp);
return EINA_TRUE;
}
#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
@ -101,6 +103,7 @@ _thermal_check_sysctl(void *data, Ecore_Thread *th)
if (ecore_thread_check(th)) break;
}
}
#endif
#if !defined(HAVE_EEZE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
@ -119,6 +122,7 @@ _thermal_check_fallback(void *data, Ecore_Thread *th)
if (ecore_thread_check(th)) break;
}
}
#endif
#if !defined(HAVE_EEZE)
@ -136,8 +140,8 @@ _thermal_check_done(void *data, Ecore_Thread *th EINA_UNUSED)
{
Tempthread *tth = data;
_thermal_thread_free(tth);
}
#endif
static Evas_Object *
@ -230,6 +234,7 @@ _thermal_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
e_gadget_configure(inst->o_main);
}
}
static Eina_Bool
_screensaver_on(void *data)
{
@ -253,7 +258,6 @@ _screensaver_off(void *data)
return ECORE_CALLBACK_RENEW;
}
void
_thermal_config_updated(Instance *inst)
{

View File

@ -36,7 +36,6 @@ _update_low_temperature(void *data, Evas_Object *obj EINA_UNUSED, void *event_in
inst->cfg->thermal.low = value;
e_config_save_queue();
_thermal_config_updated(inst);
}
static void
@ -51,9 +50,11 @@ _units_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
case 0:
inst->cfg->thermal.units = CELSIUS;
break;
case 1:
inst->cfg->thermal.units = FAHRENHEIT;
break;
default:
inst->cfg->thermal.units = CELSIUS;
}
@ -103,18 +104,23 @@ _poll_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
case 0:
inst->cfg->thermal.poll_interval = 4;
break;
case 1:
inst->cfg->thermal.poll_interval = 8;
break;
case 2:
inst->cfg->thermal.poll_interval = 32;
break;
case 3:
inst->cfg->thermal.poll_interval = 64;
break;
case 4:
inst->cfg->thermal.poll_interval = 256;
break;
default:
inst->cfg->thermal.poll_interval = 32;
}
@ -187,9 +193,11 @@ thermal_configure(Instance *inst)
case CELSIUS:
elm_radio_value_set(groupu, 0);
break;
case FAHRENHEIT:
elm_radio_value_set(groupu, 1);
break;
default:
elm_radio_value_set(groupu, 0);
}
@ -263,18 +271,23 @@ thermal_configure(Instance *inst)
case 4:
elm_radio_value_set(group, 0);
break;
case 8:
elm_radio_value_set(group, 1);
break;
case 32:
elm_radio_value_set(group, 2);
break;
case 64:
elm_radio_value_set(group, 3);
break;
case 256:
elm_radio_value_set(group, 4);
break;
default:
elm_radio_value_set(group, 2);
}

View File

@ -193,6 +193,7 @@ init(Tempthread *tth)
{
case SENSOR_TYPE_NONE:
break;
case SENSOR_TYPE_OMNIBOOK:
tth->sensor_path = eina_stringshare_add("/proc/omnibook/temperature");
break;

View File

@ -208,4 +208,5 @@ thermal_sysctl_get(Tempthread *tth)
temp = check(tth);
return temp;
}
#endif

View File

@ -48,3 +48,4 @@ thermal_udev_get(Tempthread *tth)
}
return -999;
}

View File

@ -26,3 +26,4 @@ e_modapi_gadget_save(E_Module *m EINA_UNUSED)
{
return 1;
}