forked from enlightenment/enlightenment
TODO items. bugs. start module - its a START. it doesnt work that well. needs
work in the menu code to handle fixing menus to a launch rect. SVN revision: 14831
This commit is contained in:
parent
40f6e18207
commit
ea2fa22046
6
TODO
6
TODO
|
@ -55,6 +55,12 @@ Also look at all the .c files - they have their own localized TODO lists
|
|||
|
||||
These are in no particular order:
|
||||
|
||||
* ctrl-d in xterms (or clising of windows) doesnt always close the window.
|
||||
sometimes it loses its dropshadow, but the window border is still there.
|
||||
* fix action delete (can segv if action is stored for "long runing actions"
|
||||
like move/resize)
|
||||
* multiple zones and a pager per zone doesnt flip desktops in that zone alone
|
||||
- they affect both zones only the first time u run e...
|
||||
* drop on ibar for re-ordering, removal seems broken (drop location is the
|
||||
wrong spot)
|
||||
* break out desks x/y size config so you can have a different desktop size
|
||||
|
|
|
@ -215,6 +215,7 @@ src/modules/battery/Makefile
|
|||
src/modules/temperature/Makefile
|
||||
src/modules/cpufreq/Makefile
|
||||
src/modules/ibox/Makefile
|
||||
src/modules/start/Makefile
|
||||
data/Makefile
|
||||
data/fonts/Makefile
|
||||
data/images/Makefile
|
||||
|
|
|
@ -27,7 +27,8 @@ default_move.edc \
|
|||
default_temperature.edc \
|
||||
default_error.edc \
|
||||
default_cpufreq.edc \
|
||||
default_ibox.edc
|
||||
default_ibox.edc \
|
||||
default_start.edc
|
||||
|
||||
default.edj: Makefile $(EXTRA_DIST)
|
||||
$(EDJE_CC) $(EDJE_FLAGS) \
|
||||
|
|
|
@ -37,5 +37,6 @@ collections {
|
|||
#include "default_error.edc"
|
||||
#include "default_cpufreq.edc"
|
||||
#include "default_ibox.edc"
|
||||
#include "default_start.edc"
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
group {
|
||||
name: "modules/start/main";
|
||||
max: 128 128;
|
||||
parts {
|
||||
part {
|
||||
name: "base";
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
aspect: 1.0 1.0;
|
||||
rel1 {
|
||||
relative: 0.1 0.1;
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.9 0.9;
|
||||
}
|
||||
image {
|
||||
normal: "e17_logo.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -19,6 +19,7 @@ typedef enum _E_Binding_Context
|
|||
*/
|
||||
typedef enum _E_Binding_Modifier
|
||||
{
|
||||
E_BINDING_MODIFIER_NONE = 0,
|
||||
E_BINDING_MODIFIER_SHIFT = (1 << 0),
|
||||
E_BINDING_MODIFIER_CTRL = (1 << 1),
|
||||
E_BINDING_MODIFIER_ALT = (1 << 2),
|
||||
|
|
|
@ -187,6 +187,10 @@ e_config_init(void)
|
|||
{
|
||||
E_Config_Module *em;
|
||||
|
||||
em = E_NEW(E_Config_Module, 1);
|
||||
em->name = strdup("start");
|
||||
em->enabled = 1;
|
||||
e_config->modules = evas_list_append(e_config->modules, em);
|
||||
em = E_NEW(E_Config_Module, 1);
|
||||
em->name = strdup("ibar");
|
||||
em->enabled = 1;
|
||||
|
|
|
@ -82,8 +82,8 @@ _e_opt_binding_mouse_parse(E_Config_Binding_Mouse *eb, char **params)
|
|||
else if (!strncmp(pp, "WIN|", 4)) eb->modifiers |= E_BINDING_MODIFIER_WIN;
|
||||
else if (strlen(pp) > 0)
|
||||
{
|
||||
printf("OPT3 moidifier unknonw. Must be or mask of:\n"
|
||||
" SHIFT CTRL ALT WIN\n");
|
||||
printf("OPT3 moidifier unknown. Must be or mask of:\n"
|
||||
" SHIFT CTRL ALT WIN (eg SHIFT|CTRL or ALT|SHIFT|CTRL or ALT or just NONE)\n");
|
||||
exit(-1);
|
||||
}
|
||||
pp = p + 1;
|
||||
|
@ -94,10 +94,11 @@ _e_opt_binding_mouse_parse(E_Config_Binding_Mouse *eb, char **params)
|
|||
else if (!strcmp(pp, "CTRL")) eb->modifiers |= E_BINDING_MODIFIER_CTRL;
|
||||
else if (!strcmp(pp, "ALT")) eb->modifiers |= E_BINDING_MODIFIER_ALT;
|
||||
else if (!strcmp(pp, "WIN")) eb->modifiers |= E_BINDING_MODIFIER_WIN;
|
||||
else if (!strcmp(pp, "NONE")) eb->modifiers = E_BINDING_MODIFIER_NONE;
|
||||
else if (strlen(pp) > 0)
|
||||
{
|
||||
printf("OPT3 moidifier unknonw. Must be or mask of:\n"
|
||||
" SHIFT CTRL ALT WIN\n");
|
||||
printf("OPT3 moidifier unknown. Must be or mask of:\n"
|
||||
" SHIFT CTRL ALT WIN (eg SHIFT|CTRL or ALT|SHIFT|CTRL or ALT or just NONE)\n");
|
||||
exit(-1);
|
||||
}
|
||||
break;
|
||||
|
@ -176,8 +177,8 @@ _e_opt_binding_key_parse(E_Config_Binding_Key *eb, char **params)
|
|||
else if (!strncmp(pp, "WIN|", 4)) eb->modifiers |= E_BINDING_MODIFIER_WIN;
|
||||
else if (strlen(pp) > 0)
|
||||
{
|
||||
printf("OPT3 moidifier unknonw. Must be or mask of:\n"
|
||||
" SHIFT CTRL ALT WIN\n");
|
||||
printf("OPT3 moidifier unknown. Must be or mask of:\n"
|
||||
" SHIFT CTRL ALT WIN (eg SHIFT|CTRL or ALT|SHIFT|CTRL or ALT or just NONE)\n");
|
||||
exit(-1);
|
||||
}
|
||||
pp = p + 1;
|
||||
|
@ -188,10 +189,11 @@ _e_opt_binding_key_parse(E_Config_Binding_Key *eb, char **params)
|
|||
else if (!strcmp(pp, "CTRL")) eb->modifiers |= E_BINDING_MODIFIER_CTRL;
|
||||
else if (!strcmp(pp, "ALT")) eb->modifiers |= E_BINDING_MODIFIER_ALT;
|
||||
else if (!strcmp(pp, "WIN")) eb->modifiers |= E_BINDING_MODIFIER_WIN;
|
||||
else if (!strcmp(pp, "NONE")) eb->modifiers = E_BINDING_MODIFIER_NONE;
|
||||
else if (strlen(pp) > 0)
|
||||
{
|
||||
printf("OPT3 moidifier unknonw. Must be or mask of:\n"
|
||||
" SHIFT CTRL ALT WIN\n");
|
||||
printf("OPT3 moidifier unknown. Must be or mask of:\n"
|
||||
" SHIFT CTRL ALT WIN (eg SHIFT|CTRL or ALT|SHIFT|CTRL or ALT or just NONE)\n");
|
||||
exit(-1);
|
||||
}
|
||||
break;
|
||||
|
@ -987,6 +989,8 @@ _e_ipc_modifier_str(int mod)
|
|||
if (_mod_buf[0] != 0) strcat(_mod_buf, "|");
|
||||
strcat(_mod_buf, "WIN");
|
||||
}
|
||||
if (mod == E_BINDING_MODIFIER_NONE)
|
||||
strcpy(_mod_buf, "NONE");
|
||||
return _mod_buf;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,4 +8,5 @@ pager \
|
|||
battery \
|
||||
temperature \
|
||||
cpufreq \
|
||||
ibox
|
||||
ibox \
|
||||
start
|
||||
|
|
|
@ -548,6 +548,8 @@ _ibox_icon_new(IBox_Box *ibb, E_Border *bd)
|
|||
static void
|
||||
_ibox_icon_free(IBox_Icon *ic)
|
||||
{
|
||||
if( ic == NULL )
|
||||
return;
|
||||
ic->ibb->icons = evas_list_remove(ic->ibb->icons, ic);
|
||||
if (ic->bg_object) evas_object_del(ic->bg_object);
|
||||
if (ic->overlay_object) evas_object_del(ic->overlay_object);
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
MODULE = start
|
||||
|
||||
# data files for the module
|
||||
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
|
||||
files_DATA = \
|
||||
module_icon.png
|
||||
|
||||
EXTRA_DIST = $(files_DATA)
|
||||
|
||||
# the module .so file
|
||||
INCLUDES = -I. \
|
||||
-I$(top_srcdir) \
|
||||
-I$(includedir) \
|
||||
-I$(top_srcdir)$(MODULE) \
|
||||
-I$(top_srcdir)/src/bin \
|
||||
-I$(top_srcdir)/src/lib \
|
||||
-I$(top_srcdir)/src/modules \
|
||||
@e_cflags@
|
||||
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
|
||||
pkg_LTLIBRARIES = module.la
|
||||
module_la_SOURCES = e_mod_main.c \
|
||||
e_mod_main.h
|
||||
module_la_LIBADD = @e_libs@ @dlopen_libs@
|
||||
module_la_LDFLAGS = -module -avoid-version
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
|
@ -0,0 +1,353 @@
|
|||
#include "e.h"
|
||||
#include "e_mod_main.h"
|
||||
#include "e_int_menus.h"
|
||||
|
||||
static Start *_start_new(void);
|
||||
static Start_Face *_start_face_new(E_Container *con);
|
||||
static void _start_free(Start *e);
|
||||
static void _start_face_free(Start_Face *face);
|
||||
static void _start_face_enable(Start_Face *e);
|
||||
static void _start_face_disable(Start_Face *e);
|
||||
static void _start_config_menu_new(Start *e);
|
||||
static void _start_face_menu_new(Start_Face *face);
|
||||
static void _start_face_cb_menu_edit(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _start_face_cb_gmc_change(void *data, E_Gadman_Client *gmc, E_Gadman_Change change);
|
||||
static void _start_face_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
|
||||
static int button_count;
|
||||
static E_Config_DD *conf_edd;
|
||||
static E_Config_DD *conf_face_edd;
|
||||
|
||||
void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
Start *e;
|
||||
|
||||
if (m->api->version < E_MODULE_API_VERSION) {
|
||||
e_error_dialog_show(_("Module API Error"),
|
||||
_("Error initializing Module: start\n"
|
||||
"It requires a minimum module API version of: %i.\n"
|
||||
"The module API advertized by Enlightenment is: %i.\n"
|
||||
"Aborting module."),
|
||||
E_MODULE_API_VERSION,
|
||||
m->api->version);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Create the button */
|
||||
e = _start_new();
|
||||
m->config_menu = e->config_menu;
|
||||
//m->main_menu = e_int_menus_main_new();
|
||||
return e;
|
||||
}
|
||||
|
||||
int
|
||||
e_modapi_shutdown(E_Module *m)
|
||||
{
|
||||
Start *e;
|
||||
|
||||
if (m->config_menu) m->config_menu = NULL;
|
||||
|
||||
e = m->data;
|
||||
if (e) _start_free(e);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
e_modapi_save(E_Module *m)
|
||||
{
|
||||
Start *e;
|
||||
|
||||
e = m->data;
|
||||
e_config_domain_save("module.start", conf_edd, e->conf);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
e_modapi_info(E_Module *m)
|
||||
{
|
||||
char buf[4096];
|
||||
|
||||
m->label = strdup(_("Start"));
|
||||
snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(m));
|
||||
m->icon_file = strdup(buf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
e_modapi_about(E_Module *m)
|
||||
{
|
||||
e_error_dialog_show(_("Enlightenment Start Module"),
|
||||
_("Experimental Button module for E17"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static Start *
|
||||
_start_new(void)
|
||||
{
|
||||
Start *e;
|
||||
Evas_List *managers, *l, *l2, *cl;
|
||||
E_Menu *mn;
|
||||
E_Menu_Item *mi;
|
||||
Evas_Object *o;
|
||||
|
||||
button_count = 0;
|
||||
e = E_NEW(Start, 1);
|
||||
if (!e) return NULL;
|
||||
|
||||
conf_face_edd = E_CONFIG_DD_NEW("Start_Config_Face", Config_Face);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T Config_Face
|
||||
#define D conf_face_edd
|
||||
E_CONFIG_VAL(D, T, enabled, UCHAR);
|
||||
|
||||
conf_edd = E_CONFIG_DD_NEW("Start_Config", Config);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T Config
|
||||
#define D conf_edd
|
||||
E_CONFIG_LIST(D, T, faces, conf_face_edd);
|
||||
|
||||
e->conf = e_config_domain_load("module.start", conf_edd);
|
||||
if (!e->conf) e->conf = E_NEW(Config, 1);
|
||||
|
||||
_start_config_menu_new(e);
|
||||
|
||||
managers = e_manager_list();
|
||||
cl = e->conf->faces;
|
||||
for (l = managers; l; l = l->next)
|
||||
{
|
||||
E_Manager *man;
|
||||
|
||||
man = l->data;
|
||||
for (l2 = man->containers; l2; l2 = l2->next)
|
||||
{
|
||||
E_Container *con;
|
||||
Start_Face *face;
|
||||
|
||||
con = l2->data;
|
||||
face = _start_face_new(con);
|
||||
if (face)
|
||||
{
|
||||
e->faces = evas_list_append(e->faces, face);
|
||||
/* Config */
|
||||
if (!cl)
|
||||
{
|
||||
face->conf = E_NEW(Config_Face, 1);
|
||||
face->conf->enabled = 1;
|
||||
e->conf->faces = evas_list_append(e->conf->faces, face->conf);
|
||||
}
|
||||
else
|
||||
{
|
||||
face->conf = cl->data;
|
||||
cl = cl->next;
|
||||
}
|
||||
|
||||
/* Menu */
|
||||
/* This menu must be initialized after conf */
|
||||
_start_face_menu_new(face);
|
||||
|
||||
mi = e_menu_item_new(e->config_menu);
|
||||
e_menu_item_label_set(mi, con->name);
|
||||
|
||||
e_menu_item_submenu_set(mi, face->menu);
|
||||
|
||||
/* Setup */
|
||||
if (!face->conf->enabled) _start_face_disable(face);
|
||||
}
|
||||
}
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
static Start_Face *
|
||||
_start_face_new(E_Container *con)
|
||||
{
|
||||
Start_Face *face;
|
||||
Evas_Object *o;
|
||||
|
||||
face = E_NEW(Start_Face, 1);
|
||||
if (!face) return NULL;
|
||||
|
||||
face->con = con;
|
||||
e_object_ref(E_OBJECT(con));
|
||||
|
||||
evas_event_freeze(con->bg_evas);
|
||||
o = edje_object_add(con->bg_evas);
|
||||
face->button_object = o;
|
||||
|
||||
e_theme_edje_object_set(o, "base/theme/modules/start", "modules/start/main");
|
||||
evas_object_show(o);
|
||||
|
||||
o = evas_object_rectangle_add(con->bg_evas);
|
||||
face->event_object = o;
|
||||
evas_object_layer_set(o, 2);
|
||||
evas_object_repeat_events_set(o, 1);
|
||||
evas_object_color_set(o, 0, 0, 0, 0);
|
||||
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _start_face_cb_mouse_down, face);
|
||||
evas_object_show(o);
|
||||
|
||||
face->gmc = e_gadman_client_new(con->gadman);
|
||||
e_gadman_client_domain_set(face->gmc, "module.start", button_count++);
|
||||
e_gadman_client_policy_set(face->gmc,
|
||||
E_GADMAN_POLICY_ANYWHERE |
|
||||
E_GADMAN_POLICY_HMOVE |
|
||||
E_GADMAN_POLICY_VMOVE |
|
||||
E_GADMAN_POLICY_HSIZE |
|
||||
E_GADMAN_POLICY_VSIZE);
|
||||
e_gadman_client_min_size_set(face->gmc, 4, 4);
|
||||
e_gadman_client_max_size_set(face->gmc, 512, 512);
|
||||
e_gadman_client_auto_size_set(face->gmc, 40, 40);
|
||||
e_gadman_client_align_set(face->gmc, 0.0, 1.0);
|
||||
e_gadman_client_aspect_set(face->gmc, 1.0, 1.0);
|
||||
e_gadman_client_resize(face->gmc, 40, 40);
|
||||
e_gadman_client_change_func_set(face->gmc, _start_face_cb_gmc_change, face);
|
||||
e_gadman_client_load(face->gmc);
|
||||
|
||||
evas_event_thaw(con->bg_evas);
|
||||
|
||||
return face;
|
||||
}
|
||||
|
||||
static void
|
||||
_start_face_menu_new(Start_Face *face)
|
||||
{
|
||||
E_Menu *mn;
|
||||
E_Menu_Item *mi;
|
||||
|
||||
mn = e_menu_new();
|
||||
face->menu = mn;
|
||||
|
||||
/* Enabled */
|
||||
/*
|
||||
mi = e_menu_item_new(mn);
|
||||
e_menu_item_label_set(mi, _("Enabled"));
|
||||
e_menu_item_check_set(mi, 1);
|
||||
if (face->conf->enabled) e_menu_item_toggle_set(mi, 1);
|
||||
e_menu_item_callback_set(mi, _clock_face_cb_menu_enabled, face);
|
||||
*/
|
||||
|
||||
/* Edit */
|
||||
mi = e_menu_item_new(mn);
|
||||
e_menu_item_label_set(mi, _("Edit Mode"));
|
||||
e_menu_item_callback_set(mi, _start_face_cb_menu_edit, face);
|
||||
|
||||
face->main_menu = e_int_menus_main_new();
|
||||
}
|
||||
|
||||
static void
|
||||
_start_free(Start *e)
|
||||
{
|
||||
Evas_List *list;
|
||||
|
||||
E_CONFIG_DD_FREE(conf_edd);
|
||||
E_CONFIG_DD_FREE(conf_face_edd);
|
||||
|
||||
for (list = e->faces; list; list = list->next)
|
||||
_start_face_free(list->data);
|
||||
evas_list_free(e->faces);
|
||||
|
||||
e_object_del(E_OBJECT(e->config_menu));
|
||||
|
||||
evas_list_free(e->conf->faces);
|
||||
free(e->conf);
|
||||
free(e);
|
||||
}
|
||||
|
||||
static void
|
||||
_start_face_free(Start_Face *face)
|
||||
{
|
||||
e_object_unref(E_OBJECT(face->con));
|
||||
e_object_del(E_OBJECT(face->gmc));
|
||||
evas_object_del(face->button_object);
|
||||
evas_object_del(face->event_object);
|
||||
e_object_del(E_OBJECT(face->menu));
|
||||
e_object_del(E_OBJECT(face->main_menu));
|
||||
|
||||
free(face->conf);
|
||||
free(face);
|
||||
button_count--;
|
||||
}
|
||||
|
||||
static void
|
||||
_start_config_menu_new(Start *e)
|
||||
{
|
||||
e->config_menu = e_menu_new();
|
||||
}
|
||||
|
||||
static void
|
||||
_start_face_disable(Start_Face *e)
|
||||
{
|
||||
e->conf->enabled = 0;
|
||||
evas_object_hide(e->button_object);
|
||||
evas_object_hide(e->event_object);
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
static void
|
||||
_start_face_enable(Start_Face *e)
|
||||
{
|
||||
e->conf->enabled = 1;
|
||||
evas_object_show(e->button_object);
|
||||
evas_object_show(e->event_object);
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
static void
|
||||
_start_face_cb_gmc_change(void *data, E_Gadman_Client *gmc, E_Gadman_Change change)
|
||||
{
|
||||
Start_Face *e;
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
e = data;
|
||||
switch (change)
|
||||
{
|
||||
case E_GADMAN_CHANGE_MOVE_RESIZE:
|
||||
e_gadman_client_geometry_get(e->gmc, &x, &y, &w, &h);
|
||||
evas_object_move(e->button_object, x, y);
|
||||
evas_object_move(e->event_object, x, y);
|
||||
evas_object_resize(e->button_object, w, h);
|
||||
evas_object_resize(e->event_object, w, h);
|
||||
break;
|
||||
case E_GADMAN_CHANGE_RAISE:
|
||||
evas_object_raise(e->button_object);
|
||||
evas_object_raise(e->event_object);
|
||||
break;
|
||||
case E_GADMAN_CHANGE_EDGE:
|
||||
case E_GADMAN_CHANGE_ZONE:
|
||||
/* FIXME: Must we do something here? */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_start_face_cb_menu_edit(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||
{
|
||||
Start_Face *face;
|
||||
|
||||
face = data;
|
||||
e_gadman_mode_set(face->gmc->gadman, E_GADMAN_MODE_EDIT);
|
||||
}
|
||||
|
||||
static void
|
||||
_start_face_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Start_Face *face;
|
||||
Evas_Event_Mouse_Down *ev;
|
||||
|
||||
face = data;
|
||||
ev = event_info;
|
||||
if (ev->button == 3)
|
||||
{
|
||||
e_menu_activate_mouse(face->menu, e_zone_current_get(face->con), ev->output.x, ev->output.y, 1, 1, E_MENU_POP_DIRECTION_DOWN);
|
||||
e_util_container_fake_mouse_up_all_later(face->con);
|
||||
}
|
||||
else if (ev->button == 1)
|
||||
{
|
||||
/* Pop up main menu */
|
||||
e_menu_activate_mouse(face->main_menu, e_zone_current_get(face->con), ev->output.x, ev->output.y, 1, 1, E_MENU_POP_DIRECTION_DOWN);
|
||||
e_util_container_fake_mouse_up_all_later(face->con);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
#ifndef E_MOD_MAIN_H
|
||||
#define E_MOD_MAIN_H
|
||||
|
||||
typedef struct _Config Config;
|
||||
typedef struct _Config_Face Config_Face;
|
||||
typedef struct _Start Start;
|
||||
typedef struct _Start_Face Start_Face;
|
||||
|
||||
struct _Config
|
||||
{
|
||||
Evas_List *faces;
|
||||
};
|
||||
|
||||
struct _Config_Face
|
||||
{
|
||||
unsigned char enabled;
|
||||
};
|
||||
|
||||
struct _Start
|
||||
{
|
||||
Evas_List *faces;
|
||||
E_Menu *config_menu;
|
||||
|
||||
Config *conf;
|
||||
};
|
||||
|
||||
struct _Start_Face
|
||||
{
|
||||
E_Container *con;
|
||||
E_Menu *menu;
|
||||
E_Menu *main_menu;
|
||||
|
||||
Config_Face *conf;
|
||||
|
||||
Evas_Object *button_object;
|
||||
Evas_Object *event_object;
|
||||
|
||||
E_Gadman_Client *gmc;
|
||||
};
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI int e_modapi_info (E_Module *m);
|
||||
EAPI int e_modapi_about (E_Module *m);
|
||||
|
||||
#endif
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -793,6 +793,40 @@ _temperature_cb_check(void *data)
|
|||
ret = 1;
|
||||
fclose(f);
|
||||
}
|
||||
else
|
||||
{
|
||||
therms = ecore_file_ls("/sys/bus/i2c/devices");
|
||||
if ((therms) && (!ecore_list_is_empty(therms)))
|
||||
{
|
||||
char *name;
|
||||
|
||||
while ((name = ecore_list_next(therms)))
|
||||
{
|
||||
char fname[1024];
|
||||
|
||||
sprintf(fname, "/sys/bus/i2c/devices/%s/temp1_input",
|
||||
name);
|
||||
if (ecore_file_exists(fname))
|
||||
{
|
||||
FILE *f;
|
||||
|
||||
f = fopen(fname,"r");
|
||||
if (f)
|
||||
{
|
||||
fgets(buf, sizeof(buf), f);
|
||||
buf[sizeof(buf) - 1] = 0;
|
||||
|
||||
/* actuallty read the temp */
|
||||
if (sscanf(buf, "%i", &temp) == 1)
|
||||
ret = 1;
|
||||
/* Hack for temp */
|
||||
temp = temp / 1000;
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue