Sysinfo Gadgets: Allow for vertical themes for all sysinfo gadgets

This is in preparation for themers in the future.
devs/bu5hm4n/luncher_verbose
Stephen 'Okra' Houston 7 years ago
parent 327f9bc68f
commit 73495d6347
  1. 10
      src/modules/sysinfo/batman/batman.c
  2. 10
      src/modules/sysinfo/cpuclock/cpuclock.c
  3. 10
      src/modules/sysinfo/netstatus/netstatus.c
  4. 10
      src/modules/sysinfo/thermal/thermal.c

@ -578,6 +578,7 @@ static void
_batman_created_cb(void *data, Evas_Object *obj, void *event_data EINA_UNUSED)
{
Instance *inst = data;
E_Gadget_Site_Orient orient = e_gadget_site_orient_get(e_gadget_site_get(inst->o_main));
e_gadget_configure_cb_set(inst->o_main, _batman_configure_cb);
@ -587,8 +588,13 @@ _batman_created_cb(void *data, Evas_Object *obj, void *event_data EINA_UNUSED)
inst->cfg->batman.have_power = -2;
inst->cfg->batman.o_gadget = elm_layout_add(inst->o_main);
e_theme_edje_object_set(inst->cfg->batman.o_gadget, "base/theme/modules/batman",
"e/modules/batman/main");
if (orient == E_GADGET_SITE_ORIENT_VERTICAL)
e_theme_edje_object_set(inst->cfg->batman.o_gadget,
"base/theme/modules/batman",
"e/modules/batman/main_vert");
else
e_theme_edje_object_set(inst->cfg->batman.o_gadget, "base/theme/modules/batman",
"e/modules/batman/main");
E_EXPAND(inst->cfg->batman.o_gadget);
E_FILL(inst->cfg->batman.o_gadget);
elm_box_pack_end(inst->o_main, inst->cfg->batman.o_gadget);

@ -832,13 +832,19 @@ static void
_cpuclock_created_cb(void *data, Evas_Object *obj, void *event_data EINA_UNUSED)
{
Instance *inst = data;
E_Gadget_Site_Orient orient = e_gadget_site_orient_get(e_gadget_site_get(inst->o_main));
if (inst->cfg->cpuclock.pstate_min == 0) inst->cfg->cpuclock.pstate_min = 1;
if (inst->cfg->cpuclock.pstate_max == 0) inst->cfg->cpuclock.pstate_max = 101;
inst->cfg->cpuclock.o_gadget = elm_layout_add(inst->o_main);
e_theme_edje_object_set(inst->cfg->cpuclock.o_gadget, "base/theme/modules/cpufreq",
"e/modules/cpufreq/main");
if (orient == E_GADGET_SITE_ORIENT_VERTICAL)
e_theme_edje_object_set(inst->cfg->cpuclock.o_gadget,
"base/theme/modules/cpuclock",
"e/modules/cpuclock/main_vert");
else
e_theme_edje_object_set(inst->cfg->cpuclock.o_gadget, "base/theme/modules/cpuclock",
"e/modules/cpuclock/main");
E_EXPAND(inst->cfg->cpuclock.o_gadget);
E_FILL(inst->cfg->cpuclock.o_gadget);
edje_object_signal_callback_add(elm_layout_edje_get(inst->cfg->cpuclock.o_gadget), "e,action,governor,next", "*",

@ -227,12 +227,18 @@ static void
_netstatus_created_cb(void *data, Evas_Object *obj, void *event_data EINA_UNUSED)
{
Instance *inst = data;
E_Gadget_Site_Orient orient = e_gadget_site_orient_get(e_gadget_site_get(inst->o_main));
e_gadget_configure_cb_set(inst->o_main, _netstatus_configure_cb);
inst->cfg->netstatus.o_gadget = elm_layout_add(inst->o_main);
e_theme_edje_object_set(inst->cfg->netstatus.o_gadget, "base/theme/modules/netstatus",
"e/modules/netstatus/main");
if (orient == E_GADGET_SITE_ORIENT_VERTICAL)
e_theme_edje_object_set(inst->cfg->netstatus.o_gadget,
"base/theme/modules/netstatus",
"e/modules/netstatus/main_vert");
else
e_theme_edje_object_set(inst->cfg->netstatus.o_gadget, "base/theme/modules/netstatus",
"e/modules/netstatus/main");
E_EXPAND(inst->cfg->netstatus.o_gadget);
E_FILL(inst->cfg->netstatus.o_gadget);
elm_box_pack_end(inst->o_main, inst->cfg->netstatus.o_gadget);

@ -231,13 +231,19 @@ static void
_thermal_created_cb(void *data, Evas_Object *obj, void *event_data EINA_UNUSED)
{
Instance *inst = data;
E_Gadget_Site_Orient orient = e_gadget_site_orient_get(e_gadget_site_get(inst->o_main));
inst->cfg->thermal.temp = 900;
inst->cfg->thermal.have_temp = EINA_FALSE;
inst->cfg->thermal.o_gadget = elm_layout_add(inst->o_main);
e_theme_edje_object_set(inst->cfg->thermal.o_gadget, "base/theme/modules/temperature",
"e/modules/temperature/main");
if (orient == E_GADGET_SITE_ORIENT_VERTICAL)
e_theme_edje_object_set(inst->cfg->thermal.o_gadget,
"base/theme/modules/thermal",
"e/modules/thermal/main_vert");
else
e_theme_edje_object_set(inst->cfg->thermal.o_gadget, "base/theme/modules/thermal",
"e/modules/thermal/main");
E_EXPAND(inst->cfg->thermal.o_gadget);
E_FILL(inst->cfg->thermal.o_gadget);
elm_box_pack_end(inst->o_main, inst->cfg->thermal.o_gadget);

Loading…
Cancel
Save