diff --git a/TODO b/TODO
index 8ac66443c..fff672b67 100644
--- a/TODO
+++ b/TODO
@@ -71,8 +71,9 @@ Some of the things (in very short form) that need to be done to E17...
* gui config dialogs for all config
* make it possible to disable border buttons/actions (tell theme what is
disabled)
-* maximize doesnt account for shelves
* shelf gui config is ugly and badly arranged
+* shelf needs a way to register a menu item appender for right click menu for
+ gadcon items
* pager should be able to be configured to control more than the current zone
(select which zone they control)
* ibar maybe should move bar dirs to subdirectories in "bar" to limit scope
diff --git a/src/bin/e_gadcon.h b/src/bin/e_gadcon.h
index b1c598369..3a93293ea 100644
--- a/src/bin/e_gadcon.h
+++ b/src/bin/e_gadcon.h
@@ -79,11 +79,15 @@ struct _E_Gadcon
struct _E_Gadcon_Client_Class
{
int version;
+ /* All members below are part of version 1 */
char *name;
struct {
E_Gadcon_Client *(*init) (E_Gadcon *gc, char *name, char *id, char *style);
void (*shutdown) (E_Gadcon_Client *gcc);
void (*orient) (E_Gadcon_Client *gcc);
+ char *(*label) (void);
+ Evas_Object *(*icon) (Evas *evas);
+ /* All members below are part of version 2 */
} func;
};
diff --git a/src/bin/e_int_gadcon_config.c b/src/bin/e_int_gadcon_config.c
index 9f14bab32..9c985a8e2 100644
--- a/src/bin/e_int_gadcon_config.c
+++ b/src/bin/e_int_gadcon_config.c
@@ -187,10 +187,16 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
for (l = e_gadcon_provider_list(); l; l = l->next)
{
E_Gadcon_Client_Class *cc;
+ char *label;
+ Evas_Object *icon;
cc = l->data;
- /* FIXME: need icon */
- e_widget_ilist_append(oi, NULL, cc->name, _cb_select, cfdata, cc->name);
+ icon = NULL;
+ label = NULL;
+ if (cc->func.label) label = cc->func.label();
+ if (!label) label = cc->name;
+ if (cc->func.icon) icon = cc->func.icon(evas);
+ e_widget_ilist_append(oi, icon, label, _cb_select, cfdata, cc->name);
}
e_widget_ilist_go(oi);
diff --git a/src/modules/battery/Makefile.am b/src/modules/battery/Makefile.am
index 82dbe63b0..be83812ca 100644
--- a/src/modules/battery/Makefile.am
+++ b/src/modules/battery/Makefile.am
@@ -4,6 +4,7 @@ MODULE = battery
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
+module.eap \
module_icon.png
EXTRA_DIST = $(files_DATA)
@@ -11,7 +12,7 @@ EXTRA_DIST = $(files_DATA)
# the module .so file
INCLUDES = -I. \
-I$(top_srcdir) \
- -I$(top_srcdir)/$(MODULE) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/modules \
diff --git a/src/modules/battery/e_mod_main.c b/src/modules/battery/e_mod_main.c
index a3ec3b3af..c08724b30 100644
--- a/src/modules/battery/e_mod_main.c
+++ b/src/modules/battery/e_mod_main.c
@@ -29,13 +29,15 @@
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, char *name, char *id, char *style);
static void _gc_shutdown(E_Gadcon_Client *gcc);
static void _gc_orient(E_Gadcon_Client *gcc);
+static char *_gc_label(void);
+static Evas_Object *_gc_icon(Evas *evas);
/* and actually define the gadcon class that this module provides (just 1) */
static const E_Gadcon_Client_Class _gadcon_class =
{
GADCON_CLIENT_CLASS_VERSION,
"battery",
{
- _gc_init, _gc_shutdown, _gc_orient
+ _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon
}
};
/**/
@@ -125,6 +127,25 @@ _gc_orient(E_Gadcon_Client *gcc)
e_gadcon_client_aspect_set(gcc, 16, 16);
e_gadcon_client_min_size_set(gcc, 16, 16);
}
+
+static char *
+_gc_label(void)
+{
+ return _("Battery");
+}
+
+static Evas_Object *
+_gc_icon(Evas *evas)
+{
+ Evas_Object *o;
+ char buf[4096];
+
+ o = edje_object_add(evas);
+ snprintf(buf, sizeof(buf), "%s/module.eap",
+ e_module_dir_get(battery_config->module));
+ edje_object_file_set(o, buf, "icon");
+ return o;
+}
/**/
/***************************************************************************/
@@ -1369,6 +1390,8 @@ e_modapi_init(E_Module *m)
battery_config->battery_prev_battery = -1;
battery_config->battery_check_timer = ecore_timer_add(battery_config->poll_time,
_battery_cb_check, NULL);
+ battery_config->module = m;
+
e_gadcon_provider_register(&_gadcon_class);
return 1;
}
diff --git a/src/modules/battery/e_mod_main.h b/src/modules/battery/e_mod_main.h
index f16fde742..9da342e46 100644
--- a/src/modules/battery/e_mod_main.h
+++ b/src/modules/battery/e_mod_main.h
@@ -18,6 +18,7 @@ struct _Config
double poll_time;
int alarm;
/* just config state */
+ E_Module *module;
E_Config_Dialog *config_dialog;
Evas_List *instances;
E_Menu *menu;
diff --git a/src/modules/battery/module.eap b/src/modules/battery/module.eap
new file mode 100644
index 000000000..fe602abeb
Binary files /dev/null and b/src/modules/battery/module.eap differ
diff --git a/src/modules/battery/module_icon.png b/src/modules/battery/module_icon.png
index 5e0fce97e..4ae49b9a7 100644
Binary files a/src/modules/battery/module_icon.png and b/src/modules/battery/module_icon.png differ
diff --git a/src/modules/clock/Makefile.am b/src/modules/clock/Makefile.am
index 20a027de4..7c61731c6 100644
--- a/src/modules/clock/Makefile.am
+++ b/src/modules/clock/Makefile.am
@@ -4,6 +4,7 @@ MODULE = clock
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
+module.eap \
module_icon.png
EXTRA_DIST = $(files_DATA)
@@ -11,7 +12,7 @@ EXTRA_DIST = $(files_DATA)
# the module .so file
INCLUDES = -I. \
-I$(top_srcdir) \
- -I$(top_srcdir)/$(MODULE) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/modules \
diff --git a/src/modules/clock/e_mod_main.c b/src/modules/clock/e_mod_main.c
index b86b89b34..ea16223a5 100644
--- a/src/modules/clock/e_mod_main.c
+++ b/src/modules/clock/e_mod_main.c
@@ -10,13 +10,15 @@
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, char *name, char *id, char *style);
static void _gc_shutdown(E_Gadcon_Client *gcc);
static void _gc_orient(E_Gadcon_Client *gcc);
+static char *_gc_label(void);
+static Evas_Object *_gc_icon(Evas *evas);
/* and actually define the gadcon class that this module provides (just 1) */
static const E_Gadcon_Client_Class _gadcon_class =
{
GADCON_CLIENT_CLASS_VERSION,
"clock",
{
- _gc_init, _gc_shutdown, _gc_orient
+ _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon
}
};
/**/
@@ -34,6 +36,8 @@ struct _Instance
Evas_Object *o_clock;
};
+static E_Module *clock_module = NULL;
+
static E_Gadcon_Client *
_gc_init(E_Gadcon *gc, char *name, char *id, char *style)
{
@@ -78,6 +82,25 @@ _gc_orient(E_Gadcon_Client *gcc)
e_gadcon_client_aspect_set(gcc, 16, 16);
e_gadcon_client_min_size_set(gcc, 16, 16);
}
+
+static char *
+_gc_label(void)
+{
+ return _("Clock");
+}
+
+static Evas_Object *
+_gc_icon(Evas *evas)
+{
+ Evas_Object *o;
+ char buf[4096];
+
+ o = edje_object_add(evas);
+ snprintf(buf, sizeof(buf), "%s/module.eap",
+ e_module_dir_get(clock_module));
+ edje_object_file_set(o, buf, "icon");
+ return o;
+}
/**/
/***************************************************************************/
@@ -97,37 +120,41 @@ EAPI E_Module_Api e_modapi =
};
EAPI void *
-e_modapi_init(E_Module *module)
+e_modapi_init(E_Module *m)
{
+ clock_module = m;
+
e_gadcon_provider_register(&_gadcon_class);
return 1;
}
EAPI int
-e_modapi_shutdown(E_Module *module)
+e_modapi_shutdown(E_Module *m)
{
+ clock_module = NULL;
+
e_gadcon_provider_unregister(&_gadcon_class);
return 1;
}
EAPI int
-e_modapi_save(E_Module *module)
+e_modapi_save(E_Module *m)
{
return 1;
}
EAPI int
-e_modapi_info(E_Module *module)
+e_modapi_info(E_Module *m)
{
char buf[4096];
- snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(module));
- module->icon_file = strdup(buf);
+ snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(m));
+ m->icon_file = strdup(buf);
return 1;
}
EAPI int
-e_modapi_about(E_Module *module)
+e_modapi_about(E_Module *m)
{
e_module_dialog_show(_("Enlightenment Clock Module"),
_("A simple module to give E17 a clock."));
diff --git a/src/modules/clock/e_mod_main.h b/src/modules/clock/e_mod_main.h
index 29677a219..f00a37985 100644
--- a/src/modules/clock/e_mod_main.h
+++ b/src/modules/clock/e_mod_main.h
@@ -6,11 +6,11 @@
EAPI extern E_Module_Api e_modapi;
-EAPI void *e_modapi_init (E_Module *module);
-EAPI int e_modapi_shutdown (E_Module *module);
-EAPI int e_modapi_save (E_Module *module);
-EAPI int e_modapi_info (E_Module *module);
-EAPI int e_modapi_about (E_Module *module);
-EAPI int e_modapi_config (E_Module *module);
+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);
+EAPI int e_modapi_config (E_Module *m);
#endif
diff --git a/src/modules/clock/module.eap b/src/modules/clock/module.eap
new file mode 100644
index 000000000..955f0bc04
Binary files /dev/null and b/src/modules/clock/module.eap differ
diff --git a/src/modules/clock/module_icon.png b/src/modules/clock/module_icon.png
index 888c10b89..dde70fdbc 100644
Binary files a/src/modules/clock/module_icon.png and b/src/modules/clock/module_icon.png differ
diff --git a/src/modules/cpufreq/Makefile.am b/src/modules/cpufreq/Makefile.am
index 3714b1a14..2e034006f 100644
--- a/src/modules/cpufreq/Makefile.am
+++ b/src/modules/cpufreq/Makefile.am
@@ -4,6 +4,7 @@ MODULE = cpufreq
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
+module.eap \
module_icon.png
EXTRA_DIST = $(files_DATA)
@@ -11,7 +12,7 @@ EXTRA_DIST = $(files_DATA)
# the module .so file
INCLUDES = -I. \
-I$(top_srcdir) \
- -I$(top_srcdir)/$(MODULE) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/modules \
diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c
index 0e87dce76..0cca28143 100644
--- a/src/modules/cpufreq/e_mod_main.c
+++ b/src/modules/cpufreq/e_mod_main.c
@@ -15,13 +15,15 @@
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, char *name, char *id, char *style);
static void _gc_shutdown(E_Gadcon_Client *gcc);
static void _gc_orient(E_Gadcon_Client *gcc);
+static char *_gc_label(void);
+static Evas_Object *_gc_icon(Evas *evas);
/* and actually define the gadcon class that this module provides (just 1) */
static const E_Gadcon_Client_Class _gadcon_class =
{
GADCON_CLIENT_CLASS_VERSION,
"cpufreq",
{
- _gc_init, _gc_shutdown, _gc_orient
+ _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon
}
};
/**/
@@ -119,6 +121,25 @@ _gc_orient(E_Gadcon_Client *gcc)
e_gadcon_client_aspect_set(gcc, 16, 16);
e_gadcon_client_min_size_set(gcc, 16, 16);
}
+
+static char *
+_gc_label(void)
+{
+ return _("Cpufreq");
+}
+
+static Evas_Object *
+_gc_icon(Evas *evas)
+{
+ Evas_Object *o;
+ char buf[4096];
+
+ o = edje_object_add(evas);
+ snprintf(buf, sizeof(buf), "%s/module.eap",
+ e_module_dir_get(cpufreq_config->module));
+ edje_object_file_set(o, buf, "icon");
+ return o;
+}
/**/
/***************************************************************************/
@@ -815,7 +836,7 @@ EAPI E_Module_Api e_modapi =
};
EAPI void *
-e_modapi_init(E_Module *module)
+e_modapi_init(E_Module *m)
{
char buf[4096];
Evas_List *l;
@@ -840,7 +861,7 @@ e_modapi_init(E_Module *module)
E_CONFIG_LIMIT(cpufreq_config->poll_time, 0.5, 60.0);
snprintf(buf, sizeof(buf), "%s/%s/freqset",
- e_module_dir_get(module), MODULE_ARCH);
+ e_module_dir_get(m), MODULE_ARCH);
cpufreq_config->set_exe_path = strdup(buf);
cpufreq_config->frequency_check_timer = ecore_timer_add(cpufreq_config->poll_time,
_cpufreq_cb_check, NULL);
@@ -859,13 +880,15 @@ e_modapi_init(E_Module *module)
}
}
}
+
+ cpufreq_config->module = m;
e_gadcon_provider_register(&_gadcon_class);
return 1;
}
EAPI int
-e_modapi_shutdown(E_Module *module)
+e_modapi_shutdown(E_Module *m)
{
e_gadcon_provider_unregister(&_gadcon_class);
@@ -904,24 +927,24 @@ e_modapi_shutdown(E_Module *module)
}
EAPI int
-e_modapi_save(E_Module *module)
+e_modapi_save(E_Module *m)
{
e_config_domain_save("module.cpufreq", conf_edd, cpufreq_config);
return 1;
}
EAPI int
-e_modapi_info(E_Module *module)
+e_modapi_info(E_Module *m)
{
char buf[4096];
- snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(module));
- module->icon_file = strdup(buf);
+ snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(m));
+ m->icon_file = strdup(buf);
return 1;
}
EAPI int
-e_modapi_about(E_Module *module)
+e_modapi_about(E_Module *m)
{
e_module_dialog_show(_("CPU Frequency Controller Module"),
_("A simple module to control the frequency of the system CPU.
"
diff --git a/src/modules/cpufreq/e_mod_main.h b/src/modules/cpufreq/e_mod_main.h
index fb24d6966..973cdc039 100644
--- a/src/modules/cpufreq/e_mod_main.h
+++ b/src/modules/cpufreq/e_mod_main.h
@@ -21,6 +21,7 @@ struct _Config
int restore_governor;
char *governor;
/* just config state */
+ E_Module *module;
Evas_List *instances;
E_Menu *menu;
E_Menu *menu_poll;
@@ -33,11 +34,11 @@ struct _Config
EAPI extern E_Module_Api e_modapi;
-EAPI void *e_modapi_init (E_Module *module);
-EAPI int e_modapi_shutdown (E_Module *module);
-EAPI int e_modapi_save (E_Module *module);
-EAPI int e_modapi_info (E_Module *module);
-EAPI int e_modapi_about (E_Module *module);
-EAPI int e_modapi_config (E_Module *module);
+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);
+EAPI int e_modapi_config (E_Module *m);
#endif
diff --git a/src/modules/cpufreq/module.eap b/src/modules/cpufreq/module.eap
new file mode 100644
index 000000000..7c677b86b
Binary files /dev/null and b/src/modules/cpufreq/module.eap differ
diff --git a/src/modules/cpufreq/module_icon.png b/src/modules/cpufreq/module_icon.png
index 619b7d754..2b9bc6562 100644
Binary files a/src/modules/cpufreq/module_icon.png and b/src/modules/cpufreq/module_icon.png differ
diff --git a/src/modules/dropshadow/Makefile.am b/src/modules/dropshadow/Makefile.am
index 9ae4a8830..c5a07a315 100644
--- a/src/modules/dropshadow/Makefile.am
+++ b/src/modules/dropshadow/Makefile.am
@@ -23,7 +23,7 @@ EXTRA_DIST = $(files_DATA)
# the module .so file
INCLUDES = -I. \
-I$(top_srcdir) \
- -I$(top_srcdir)/$(MODULE) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/modules \
diff --git a/src/modules/dropshadow/e_mod_main.c b/src/modules/dropshadow/e_mod_main.c
index 3ad62583b..5b3516255 100644
--- a/src/modules/dropshadow/e_mod_main.c
+++ b/src/modules/dropshadow/e_mod_main.c
@@ -278,76 +278,6 @@ _ds_shutdown(Dropshadow *ds)
free(ds);
}
-/*
-static E_Menu *
-_ds_config_menu_new(Dropshadow *ds)
-{
- E_Menu *mn;
- E_Menu_Item *mi;
- char buf[4096];
-
- mn = e_menu_new();
-
- mi = e_menu_item_new(mn);
- e_menu_item_label_set(mi, _("High Quality"));
- snprintf(buf, sizeof(buf), "%s/menu_icon_hi_quality.png", e_module_dir_get(ds->module));
- e_menu_item_icon_file_set(mi, buf);
- e_menu_item_radio_set(mi, 1);
- e_menu_item_radio_group_set(mi, 4);
- if (ds->conf->quality == 1) e_menu_item_toggle_set(mi, 1);
- else e_menu_item_toggle_set(mi, 0);
- e_menu_item_callback_set(mi, _ds_menu_high_quality, ds);
-
- mi = e_menu_item_new(mn);
- e_menu_item_label_set(mi, _("Medium Quality"));
- snprintf(buf, sizeof(buf), "%s/menu_icon_med_quality.png", e_module_dir_get(ds->module));
- e_menu_item_icon_file_set(mi, buf);
- e_menu_item_radio_set(mi, 1);
- e_menu_item_radio_group_set(mi, 4);
- if (ds->conf->quality == 2) e_menu_item_toggle_set(mi, 1);
- else e_menu_item_toggle_set(mi, 0);
- e_menu_item_callback_set(mi, _ds_menu_medium_quality, ds);
-
- mi = e_menu_item_new(mn);
- e_menu_item_label_set(mi, _("Low Quality"));
- snprintf(buf, sizeof(buf), "%s/menu_icon_lo_quality.png", e_module_dir_get(ds->module));
- e_menu_item_icon_file_set(mi, buf);
- e_menu_item_radio_set(mi, 1);
- e_menu_item_radio_group_set(mi, 4);
- if (ds->conf->quality == 4) e_menu_item_toggle_set(mi, 1);
- else e_menu_item_toggle_set(mi, 0);
- e_menu_item_callback_set(mi, _ds_menu_low_quality, ds);
- return mn;
-}
-
-static void
-_ds_menu_high_quality(void *data, E_Menu *m, E_Menu_Item *mi)
-{
- Dropshadow *ds;
-
- ds = data;
- _ds_config_quality_set(ds, 1);
-}
-
-static void
-_ds_menu_medium_quality(void *data, E_Menu *m, E_Menu_Item *mi)
-{
- Dropshadow *ds;
-
- ds = data;
- _ds_config_quality_set(ds, 2);
-}
-
-static void
-_ds_menu_low_quality(void *data, E_Menu *m, E_Menu_Item *mi)
-{
- Dropshadow *ds;
-
- ds = data;
- _ds_config_quality_set(ds, 4);
-}
-*/
-
static void
_ds_container_shapes_add(Dropshadow *ds, E_Container *con)
{
diff --git a/src/modules/ibar/Makefile.am b/src/modules/ibar/Makefile.am
index 7aade0e37..560cc3d73 100644
--- a/src/modules/ibar/Makefile.am
+++ b/src/modules/ibar/Makefile.am
@@ -4,6 +4,7 @@ MODULE = ibar
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
+module.eap \
module_icon.png
EXTRA_DIST = $(files_DATA)
@@ -11,10 +12,9 @@ EXTRA_DIST = $(files_DATA)
# the module .so file
INCLUDES = -I. \
-I$(top_srcdir) \
- -I$(top_srcdir)$(MODULE) \
+ -I$(top_srcdir)/src/modules/$(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
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index d36e0fcf5..6c161bf18 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -10,13 +10,15 @@
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, char *name, char *id, char *style);
static void _gc_shutdown(E_Gadcon_Client *gcc);
static void _gc_orient(E_Gadcon_Client *gcc);
+static char *_gc_label(void);
+static Evas_Object *_gc_icon(Evas *evas);
/* and actually define the gadcon class that this module provides (just 1) */
static const E_Gadcon_Client_Class _gadcon_class =
{
GADCON_CLIENT_CLASS_VERSION,
"ibar",
{
- _gc_init, _gc_shutdown, _gc_orient
+ _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon
}
};
/**/
@@ -204,13 +206,31 @@ _gc_orient(E_Gadcon_Client *gcc)
e_gadcon_client_aspect_set(gcc, 16, 16);
e_gadcon_client_min_size_set(gcc, 16, 16);
}
+
+static char *
+_gc_label(void)
+{
+ return _("IBar");
+}
+
+static Evas_Object *
+_gc_icon(Evas *evas)
+{
+ Evas_Object *o;
+ char buf[4096];
+
+ o = edje_object_add(evas);
+ snprintf(buf, sizeof(buf), "%s/module.eap",
+ e_module_dir_get(ibar_config->module));
+ edje_object_file_set(o, buf, "icon");
+ return o;
+}
/**/
/***************************************************************************/
/***************************************************************************/
/**/
-// FIXME: ibar specific calls here
static IBar *
_ibar_new(Evas *evas, char *dir)
{
@@ -296,13 +316,11 @@ _ibar_resize_handle(IBar *b)
Evas_Coord w, h;
evas_object_geometry_get(b->o_box, NULL, NULL, &w, &h);
- printf("BOX %ix%i\n", w, h);
if (e_box_orientation_get(b->o_box))
w = h;
else
h = w;
e_box_freeze(b->o_box);
- printf("RESIZNE %i %i\n", w, h);
for (l = b->icons; l; l = l->next)
{
ic = l->data;
@@ -513,7 +531,6 @@ _ibar_cb_app_change(void *data, E_App *a, E_App_Change ch)
switch (ch)
{
case E_APP_ADD:
- printf("ADD! %3.4f\n", ecore_time_get());
if (e_app_is_parent(b->apps, a))
{
E_App *a2, *a_before = NULL;
@@ -554,7 +571,6 @@ _ibar_cb_app_change(void *data, E_App *a, E_App_Change ch)
}
break;
case E_APP_DEL:
- printf("DEL! %3.4f\n", ecore_time_get());
if (e_app_is_parent(b->apps, a))
{
IBar_Icon *ic;
@@ -570,7 +586,6 @@ _ibar_cb_app_change(void *data, E_App *a, E_App_Change ch)
}
break;
case E_APP_CHANGE:
- printf("CHANGE! %3.4f\n", ecore_time_get());
if (e_app_is_parent(b->apps, a))
{
IBar_Icon *ic;
@@ -586,7 +601,6 @@ _ibar_cb_app_change(void *data, E_App *a, E_App_Change ch)
}
break;
case E_APP_ORDER:
- printf("ORDER! %3.4f\n", ecore_time_get());
if (a == b->apps)
{
_ibar_empty(b);
@@ -1114,7 +1128,7 @@ EAPI E_Module_Api e_modapi =
};
EAPI void *
-e_modapi_init(E_Module *module)
+e_modapi_init(E_Module *m)
{
conf_item_edd = E_CONFIG_DD_NEW("IBar_Config_Item", Config_Item);
#undef T
@@ -1146,12 +1160,14 @@ e_modapi_init(E_Module *module)
ibar_config->items = evas_list_append(ibar_config->items, ci);
}
+ ibar_config->module = m;
+
e_gadcon_provider_register(&_gadcon_class);
return 1;
}
EAPI int
-e_modapi_shutdown(E_Module *module)
+e_modapi_shutdown(E_Module *m)
{
e_gadcon_provider_unregister(&_gadcon_class);
@@ -1186,7 +1202,7 @@ e_modapi_shutdown(E_Module *module)
}
EAPI int
-e_modapi_save(E_Module *module)
+e_modapi_save(E_Module *m)
{
Evas_List *l, *l2;
@@ -1208,17 +1224,17 @@ e_modapi_save(E_Module *module)
}
EAPI int
-e_modapi_info(E_Module *module)
+e_modapi_info(E_Module *m)
{
char buf[4096];
- snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(module));
- module->icon_file = strdup(buf);
+ snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(m));
+ m->icon_file = strdup(buf);
return 1;
}
EAPI int
-e_modapi_about(E_Module *module)
+e_modapi_about(E_Module *m)
{
e_module_dialog_show(_("Enlightenment IBar Module"),
_("This is the IBar Application Launcher bar module for Enlightenment.
"
diff --git a/src/modules/ibar/e_mod_main.h b/src/modules/ibar/e_mod_main.h
index 6837ea8f2..b9d30b9b9 100644
--- a/src/modules/ibar/e_mod_main.h
+++ b/src/modules/ibar/e_mod_main.h
@@ -10,12 +10,13 @@ typedef struct _Config_Item Config_Item;
struct _Config
{
/* saved * loaded config values */
- Evas_List *items;
+ Evas_List *items;
/* just config state */
+ E_Module *module;
E_Config_Dialog *config_dialog;
- Evas_List *instances;
- E_Menu *menu;
- Evas_List *handlers;
+ Evas_List *instances;
+ E_Menu *menu;
+ Evas_List *handlers;
};
struct _Config_Item
diff --git a/src/modules/ibar/module.eap b/src/modules/ibar/module.eap
new file mode 100644
index 000000000..75b958c49
Binary files /dev/null and b/src/modules/ibar/module.eap differ
diff --git a/src/modules/ibar/module_icon.png b/src/modules/ibar/module_icon.png
index 7365900fd..e2900e1ba 100644
Binary files a/src/modules/ibar/module_icon.png and b/src/modules/ibar/module_icon.png differ
diff --git a/src/modules/ibox/Makefile.am b/src/modules/ibox/Makefile.am
index f80f5e3f8..16f7aa25e 100644
--- a/src/modules/ibox/Makefile.am
+++ b/src/modules/ibox/Makefile.am
@@ -11,7 +11,7 @@ EXTRA_DIST = $(files_DATA)
# the module .so file
INCLUDES = -I. \
-I$(top_srcdir) \
- -I$(top_srcdir)/$(MODULE) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/modules \
diff --git a/src/modules/itray/Makefile.am b/src/modules/itray/Makefile.am
index 0482129e5..dd77d6519 100644
--- a/src/modules/itray/Makefile.am
+++ b/src/modules/itray/Makefile.am
@@ -11,7 +11,7 @@ EXTRA_DIST = $(files_DATA)
# the module .so file
INCLUDES = -I. \
-I$(top_srcdir) \
- -I$(top_srcdir)/$(MODULE) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/modules \
diff --git a/src/modules/pager/Makefile.am b/src/modules/pager/Makefile.am
index 369b2a075..7c5283e4f 100644
--- a/src/modules/pager/Makefile.am
+++ b/src/modules/pager/Makefile.am
@@ -4,6 +4,7 @@ MODULE = pager
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
+module.eap \
module_icon.png
EXTRA_DIST = $(files_DATA)
@@ -11,7 +12,7 @@ EXTRA_DIST = $(files_DATA)
# the module .so file
INCLUDES = -I. \
-I$(top_srcdir) \
- -I$(top_srcdir)/$(MODULE) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/modules \
diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c
index 37ef37a49..00cda8323 100644
--- a/src/modules/pager/e_mod_main.c
+++ b/src/modules/pager/e_mod_main.c
@@ -10,13 +10,15 @@
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, char *name, char *id, char *style);
static void _gc_shutdown(E_Gadcon_Client *gcc);
static void _gc_orient(E_Gadcon_Client *gcc);
+static char *_gc_label(void);
+static Evas_Object *_gc_icon(Evas *evas);
/* and actually define the gadcon class that this module provides (just 1) */
static const E_Gadcon_Client_Class _gadcon_class =
{
GADCON_CLIENT_CLASS_VERSION,
"pager",
{
- _gc_init, _gc_shutdown, _gc_orient
+ _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon
}
};
/**/
@@ -215,6 +217,25 @@ _gc_orient(E_Gadcon_Client *gcc)
inst->pager->ynum * inst->pager->zone->h);
e_gadcon_client_min_size_set(gcc, 16, 16);
}
+
+static char *
+_gc_label(void)
+{
+ return _("Pager");
+}
+
+static Evas_Object *
+_gc_icon(Evas *evas)
+{
+ Evas_Object *o;
+ char buf[4096];
+
+ o = edje_object_add(evas);
+ snprintf(buf, sizeof(buf), "%s/module.eap",
+ e_module_dir_get(pager_config->module));
+ edje_object_file_set(o, buf, "icon");
+ return o;
+}
/**/
/***************************************************************************/
@@ -1684,7 +1705,7 @@ EAPI E_Module_Api e_modapi =
};
EAPI void *
-e_modapi_init(E_Module *module)
+e_modapi_init(E_Module *m)
{
conf_edd = E_CONFIG_DD_NEW("Pager_Config", Config);
#undef T
@@ -1760,12 +1781,14 @@ e_modapi_init(E_Module *module)
(pager_config->handlers, ecore_event_handler_add
(E_EVENT_CONTAINER_RESIZE, _pager_cb_event_container_resize, NULL));
+ pager_config->module = m;
+
e_gadcon_provider_register(&_gadcon_class);
return 1;
}
EAPI int
-e_modapi_shutdown(E_Module *module)
+e_modapi_shutdown(E_Module *m)
{
e_gadcon_provider_unregister(&_gadcon_class);
@@ -1790,24 +1813,24 @@ e_modapi_shutdown(E_Module *module)
}
EAPI int
-e_modapi_save(E_Module *module)
+e_modapi_save(E_Module *m)
{
e_config_domain_save("module.pager", conf_edd, pager_config);
return 1;
}
EAPI int
-e_modapi_info(E_Module *module)
+e_modapi_info(E_Module *m)
{
char buf[4096];
- snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(module));
- module->icon_file = strdup(buf);
+ snprintf(buf, sizeof(buf), "%s/module_icon.png", e_module_dir_get(m));
+ m->icon_file = strdup(buf);
return 1;
}
EAPI int
-e_modapi_about(E_Module *module)
+e_modapi_about(E_Module *m)
{
e_module_dialog_show(_("Enlightenment Pager Module"),
_("A pager module to navigate virtual desktops."));
diff --git a/src/modules/pager/e_mod_main.h b/src/modules/pager/e_mod_main.h
index fa0584712..2d68b5714 100644
--- a/src/modules/pager/e_mod_main.h
+++ b/src/modules/pager/e_mod_main.h
@@ -28,6 +28,7 @@ struct _Config
unsigned char resize;
Evas_List *items; /* FIXME: save/load this */
/* just config state */
+ E_Module *module;
E_Config_Dialog *config_dialog;
Evas_List *instances;
E_Menu *menu;
@@ -42,11 +43,11 @@ struct _Config_Item
EAPI extern E_Module_Api e_modapi;
-EAPI void *e_modapi_init (E_Module *module);
-EAPI int e_modapi_shutdown (E_Module *module);
-EAPI int e_modapi_save (E_Module *module);
-EAPI int e_modapi_info (E_Module *module);
-EAPI int e_modapi_about (E_Module *module);
+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);
void _pager_cb_config_updated(void);
void _config_pager_module(Config_Item *ci);
diff --git a/src/modules/pager/module.eap b/src/modules/pager/module.eap
new file mode 100644
index 000000000..b36abc3cd
Binary files /dev/null and b/src/modules/pager/module.eap differ
diff --git a/src/modules/pager/module_icon.png b/src/modules/pager/module_icon.png
index fa06f69f4..244f8a482 100644
Binary files a/src/modules/pager/module_icon.png and b/src/modules/pager/module_icon.png differ
diff --git a/src/modules/start/Makefile.am b/src/modules/start/Makefile.am
index f81bfc63e..e2146f5b5 100644
--- a/src/modules/start/Makefile.am
+++ b/src/modules/start/Makefile.am
@@ -4,6 +4,7 @@ MODULE = start
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
+module.eap \
module_icon.png
EXTRA_DIST = $(files_DATA)
@@ -11,7 +12,7 @@ EXTRA_DIST = $(files_DATA)
# the module .so file
INCLUDES = -I. \
-I$(top_srcdir) \
- -I$(top_srcdir)$(MODULE) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/modules \
diff --git a/src/modules/start/e_mod_main.c b/src/modules/start/e_mod_main.c
index bc5529791..c4c563667 100644
--- a/src/modules/start/e_mod_main.c
+++ b/src/modules/start/e_mod_main.c
@@ -10,13 +10,15 @@
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, char *name, char *id, char *style);
static void _gc_shutdown(E_Gadcon_Client *gcc);
static void _gc_orient(E_Gadcon_Client *gcc);
+static char *_gc_label(void);
+static Evas_Object *_gc_icon(Evas *evas);
/* and actually define the gadcon class that this module provides (just 1) */
static const E_Gadcon_Client_Class _gadcon_class =
{
GADCON_CLIENT_CLASS_VERSION,
"start",
{
- _gc_init, _gc_shutdown, _gc_orient
+ _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon
}
};
/**/
@@ -38,6 +40,8 @@ struct _Instance
static void _button_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _menu_cb_post(void *data, E_Menu *m);
+static E_Module *start_module = NULL;
+
static E_Gadcon_Client *
_gc_init(E_Gadcon *gc, char *name, char *id, char *style)
{
@@ -90,6 +94,25 @@ _gc_orient(E_Gadcon_Client *gcc)
e_gadcon_client_aspect_set(gcc, 16, 16);
e_gadcon_client_min_size_set(gcc, 16, 16);
}
+
+static char *
+_gc_label(void)
+{
+ return _("Start");
+}
+
+static Evas_Object *
+_gc_icon(Evas *evas)
+{
+ Evas_Object *o;
+ char buf[4096];
+
+ o = edje_object_add(evas);
+ snprintf(buf, sizeof(buf), "%s/module.eap",
+ e_module_dir_get(start_module));
+ edje_object_file_set(o, buf, "icon");
+ return o;
+}
/**/
/***************************************************************************/
@@ -205,6 +228,8 @@ EAPI E_Module_Api e_modapi =
EAPI void *
e_modapi_init(E_Module *m)
{
+ start_module = m;
+
e_gadcon_provider_register(&_gadcon_class);
return 1;
}
@@ -212,6 +237,8 @@ e_modapi_init(E_Module *m)
EAPI int
e_modapi_shutdown(E_Module *m)
{
+ start_module = NULL;
+
e_gadcon_provider_unregister(&_gadcon_class);
return 1;
}
diff --git a/src/modules/start/e_mod_main.h b/src/modules/start/e_mod_main.h
index f00a37985..a0b7c22f3 100644
--- a/src/modules/start/e_mod_main.h
+++ b/src/modules/start/e_mod_main.h
@@ -11,6 +11,5 @@ 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);
-EAPI int e_modapi_config (E_Module *m);
#endif
diff --git a/src/modules/start/module.eap b/src/modules/start/module.eap
new file mode 100644
index 000000000..3baf672cd
Binary files /dev/null and b/src/modules/start/module.eap differ
diff --git a/src/modules/start/module_icon.png b/src/modules/start/module_icon.png
index 86744c83c..1fb7bff0b 100644
Binary files a/src/modules/start/module_icon.png and b/src/modules/start/module_icon.png differ
diff --git a/src/modules/temperature/Makefile.am b/src/modules/temperature/Makefile.am
index f0a8236d9..7abc3c00e 100644
--- a/src/modules/temperature/Makefile.am
+++ b/src/modules/temperature/Makefile.am
@@ -4,6 +4,7 @@ MODULE = temperature
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
+module.eap \
module_icon.png
EXTRA_DIST = $(files_DATA)
@@ -11,7 +12,7 @@ EXTRA_DIST = $(files_DATA)
# the module .so file
INCLUDES = -I. \
-I$(top_srcdir) \
- -I$(top_srcdir)/$(MODULE) \
+ -I$(top_srcdir)/src/modules/$(MODULE) \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/modules \
diff --git a/src/modules/temperature/e_mod_main.c b/src/modules/temperature/e_mod_main.c
index ab4f3e2cf..8ac83d4f7 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -15,13 +15,15 @@
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, char *name, char *id, char *style);
static void _gc_shutdown(E_Gadcon_Client *gcc);
static void _gc_orient(E_Gadcon_Client *gcc);
+static char *_gc_label(void);
+static Evas_Object *_gc_icon(Evas *evas);
/* and actually define the gadcon class that this module provides (just 1) */
static const E_Gadcon_Client_Class _gadcon_class =
{
GADCON_CLIENT_CLASS_VERSION,
"temperature",
{
- _gc_init, _gc_shutdown, _gc_orient
+ _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon
}
};
/**/
@@ -96,6 +98,25 @@ _gc_orient(E_Gadcon_Client *gcc)
e_gadcon_client_aspect_set(gcc, 16, 16);
e_gadcon_client_min_size_set(gcc, 16, 16);
}
+
+static char *
+_gc_label(void)
+{
+ return _("Temperature");
+}
+
+static Evas_Object *
+_gc_icon(Evas *evas)
+{
+ Evas_Object *o;
+ char buf[4096];
+
+ o = edje_object_add(evas);
+ snprintf(buf, sizeof(buf), "%s/module.eap",
+ e_module_dir_get(temperature_config->module));
+ edje_object_file_set(o, buf, "icon");
+ return o;
+}
/**/
/***************************************************************************/
@@ -385,6 +406,9 @@ e_modapi_init(E_Module *m)
temperature_config->temperature_check_timer =
ecore_timer_add(temperature_config->poll_time, _temperature_cb_check,
NULL);
+
+ temperature_config->module = m;
+
e_gadcon_provider_register(&_gadcon_class);
return 1;
}
diff --git a/src/modules/temperature/e_mod_main.h b/src/modules/temperature/e_mod_main.h
index 187125c9c..1f9c22022 100644
--- a/src/modules/temperature/e_mod_main.h
+++ b/src/modules/temperature/e_mod_main.h
@@ -20,6 +20,7 @@ struct _Config
char *sensor_name;
Unit units;
/* just config state */
+ E_Module *module;
E_Config_Dialog *config_dialog;
Evas_List *instances;
E_Menu *menu;
diff --git a/src/modules/temperature/module.eap b/src/modules/temperature/module.eap
new file mode 100644
index 000000000..818a9d4b1
Binary files /dev/null and b/src/modules/temperature/module.eap differ
diff --git a/src/modules/temperature/module_icon.png b/src/modules/temperature/module_icon.png
index 063caf2ab..9d1e14ab8 100644
Binary files a/src/modules/temperature/module_icon.png and b/src/modules/temperature/module_icon.png differ