forked from enlightenment/enlightenment
e17/evry: link plugins by default statically into evry.
SVN revision: 58498
This commit is contained in:
parent
1a9dccff8e
commit
1311c0f8a5
|
@ -697,12 +697,7 @@ AC_E_OPTIONAL_MODULE([illume], true)
|
|||
AC_E_OPTIONAL_MODULE([illume2], true)
|
||||
AC_E_OPTIONAL_MODULE([syscon], true)
|
||||
AC_E_OPTIONAL_MODULE([everything], true)
|
||||
AC_E_OPTIONAL_MODULE([everything-files], true)
|
||||
AC_E_OPTIONAL_MODULE([everything-apps], true)
|
||||
AC_E_OPTIONAL_MODULE([everything-calc], true)
|
||||
AC_E_OPTIONAL_MODULE([everything-aspell], true)
|
||||
AC_E_OPTIONAL_MODULE([everything-settings], true)
|
||||
AC_E_OPTIONAL_MODULE([everything-windows], true)
|
||||
AC_E_OPTIONAL_MODULE([everything-as-modules], false)
|
||||
AC_E_OPTIONAL_MODULE([systray], true)
|
||||
AC_E_OPTIONAL_MODULE([comp], true)
|
||||
|
||||
|
|
|
@ -243,32 +243,13 @@ if USE_MODULE_EVERYTHING
|
|||
SUBDIRS += everything
|
||||
endif
|
||||
|
||||
if USE_MODULE_EVERYTHING_FILES
|
||||
SUBDIRS += everything-files
|
||||
endif
|
||||
|
||||
if USE_MODULE_EVERYTHING_APPS
|
||||
SUBDIRS += everything-apps
|
||||
endif
|
||||
|
||||
if USE_MODULE_EVERYTHING_FILES
|
||||
SUBDIRS += everything-files
|
||||
endif
|
||||
|
||||
if USE_MODULE_EVERYTHING_ASPELL
|
||||
SUBDIRS += everything-aspell
|
||||
endif
|
||||
|
||||
if USE_MODULE_EVERYTHING_SETTINGS
|
||||
SUBDIRS += everything-settings
|
||||
endif
|
||||
|
||||
if USE_MODULE_EVERYTHING_CALC
|
||||
SUBDIRS += everything-calc
|
||||
endif
|
||||
|
||||
if USE_MODULE_EVERYTHING_WINDOWS
|
||||
SUBDIRS += everything-windows
|
||||
if USE_MODULE_EVERYTHING_AS_MODULES
|
||||
SUBDIRS += \
|
||||
everything-files \
|
||||
everything-apps \
|
||||
everything-settings \
|
||||
everything-calc \
|
||||
everything-windows
|
||||
endif
|
||||
|
||||
if USE_MODULE_SYSTRAY
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
#ifndef E_MOD_MAIN_H
|
||||
#define E_MOD_MAIN_H
|
||||
|
||||
#define MOD_CONFIG_FILE_EPOCH 0x0001
|
||||
#define MOD_CONFIG_FILE_GENERATION 0x009d
|
||||
#define MOD_CONFIG_FILE_VERSION \
|
||||
((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
|
||||
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
#include "evry_api.h"
|
||||
#include "e_mod_main.h"
|
||||
|
||||
#define MOD_CONFIG_FILE_EPOCH 0x0001
|
||||
#define MOD_CONFIG_FILE_GENERATION 0x009d
|
||||
#define MOD_CONFIG_FILE_VERSION \
|
||||
((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
|
||||
|
||||
// FIXME clear cache on .desktop chage event
|
||||
|
||||
/* #undef DBG
|
||||
|
@ -1305,15 +1310,17 @@ static void
|
|||
_conf_init(E_Module *m)
|
||||
{
|
||||
char buf[4096];
|
||||
char title[4096];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/e-module.edj", m->dir);
|
||||
|
||||
e_configure_registry_category_add
|
||||
("extensions", 80, _("Extensions"), NULL,
|
||||
"preferences-extensions");
|
||||
|
||||
e_configure_registry_item_add
|
||||
("extensions/everything-apps", 110,
|
||||
_("Everything Applications"),
|
||||
snprintf(title, sizeof(title), "%s: %s", _("Everything Plugin"), _("Applications"));
|
||||
|
||||
e_configure_registry_item_add("extensions/everything-apps", 110, title,
|
||||
NULL, buf, _conf_dialog);
|
||||
|
||||
conf_edd = E_CONFIG_DD_NEW("Module_Config", Module_Config);
|
||||
|
@ -1350,14 +1357,8 @@ _conf_shutdown(void)
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
EAPI E_Module_Api e_modapi =
|
||||
{
|
||||
E_MODULE_API_VERSION,
|
||||
"everything-apps"
|
||||
};
|
||||
|
||||
EAPI void *
|
||||
e_modapi_init(E_Module *m)
|
||||
Eina_Bool
|
||||
evry_plug_apps_init(E_Module *m)
|
||||
{
|
||||
_conf_init(m);
|
||||
|
||||
|
@ -1378,6 +1379,39 @@ e_modapi_init(E_Module *m)
|
|||
#define D exelist_edd
|
||||
E_CONFIG_LIST(D, T, list, exelist_exe_edd);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
evry_plug_apps_shutdown(void)
|
||||
{
|
||||
EVRY_MODULE_FREE(evry_module);
|
||||
|
||||
_conf_shutdown();
|
||||
|
||||
E_CONFIG_DD_FREE(exelist_edd);
|
||||
E_CONFIG_DD_FREE(exelist_exe_edd);
|
||||
}
|
||||
|
||||
void
|
||||
evry_plug_apps_save(void)
|
||||
{
|
||||
e_config_domain_save("module.everything-apps", conf_edd, _conf);
|
||||
}
|
||||
|
||||
#ifdef USE_MODULE_EVERYTHING_AS_MODULES
|
||||
|
||||
EAPI E_Module_Api e_modapi =
|
||||
{
|
||||
E_MODULE_API_VERSION,
|
||||
"everything-apps"
|
||||
};
|
||||
|
||||
EAPI void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
evry_plug_apps_init(m);
|
||||
|
||||
e_module_delayed_set(m, 1);
|
||||
|
||||
return m;
|
||||
|
@ -1386,12 +1420,7 @@ e_modapi_init(E_Module *m)
|
|||
EAPI int
|
||||
e_modapi_shutdown(E_Module *m __UNUSED__)
|
||||
{
|
||||
EVRY_MODULE_FREE(evry_module);
|
||||
|
||||
_conf_shutdown();
|
||||
|
||||
E_CONFIG_DD_FREE(exelist_edd);
|
||||
E_CONFIG_DD_FREE(exelist_exe_edd);
|
||||
evry_plug_apps_shutdown();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -1399,9 +1428,11 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
|||
EAPI int
|
||||
e_modapi_save(E_Module *m __UNUSED__)
|
||||
{
|
||||
e_config_domain_save("module.everything-apps", conf_edd, _conf);
|
||||
evry_plug_apps_save();
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
@ -588,7 +588,10 @@ _conf_free(void)
|
|||
static void
|
||||
_conf_init(E_Module *m)
|
||||
{
|
||||
e_configure_registry_item_add(_config_path, 110, _("Everything Aspell"),
|
||||
char title[4096];
|
||||
|
||||
snprintf(title, sizeof(title), "%s: %s", _("Everything Plugin"), _("Aspell"));
|
||||
e_configure_registry_item_add(_config_path, 110, title,
|
||||
NULL, _module_icon, _conf_dialog);
|
||||
|
||||
_conf_edd = E_CONFIG_DD_NEW("Module_Config", Module_Config);
|
||||
|
|
|
@ -19,7 +19,7 @@ INCLUDES = -I. \
|
|||
@e_cflags@
|
||||
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
|
||||
pkg_LTLIBRARIES = module.la
|
||||
module_la_SOURCES = e_mod_main.c \
|
||||
module_la_SOURCES = evry_plug_calc.c \
|
||||
e_mod_main.h
|
||||
|
||||
module_la_LIBADD = @e_libs@ @dlopen_libs@
|
||||
|
|
|
@ -289,6 +289,8 @@ _plugins_shutdown(void)
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
#ifdef USE_MODULE_EVERYTHING_AS_MODULES
|
||||
|
||||
EAPI E_Module_Api e_modapi =
|
||||
{
|
||||
E_MODULE_API_VERSION,
|
||||
|
@ -319,4 +321,22 @@ e_modapi_save(E_Module *m __UNUSED__)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
#else
|
||||
|
||||
Eina_Bool
|
||||
evry_plug_calc_init(E_Module *m)
|
||||
{
|
||||
EVRY_MODULE_NEW(evry_module, evry, _plugins_init, _plugins_shutdown);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
evry_plug_calc_shutdown(void)
|
||||
{
|
||||
EVRY_MODULE_FREE(evry_module);
|
||||
}
|
||||
|
||||
void
|
||||
evry_plug_calc_save(void){}
|
||||
#endif
|
|
@ -19,7 +19,7 @@ INCLUDES = -I. \
|
|||
@e_cflags@
|
||||
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
|
||||
pkg_LTLIBRARIES = module.la
|
||||
module_la_SOURCES = e_mod_main.c \
|
||||
module_la_SOURCES = evry_plug_files.c \
|
||||
e_mod_main.h
|
||||
|
||||
module_la_LIBADD = @e_libs@ @dlopen_libs@
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
#ifndef E_MOD_MAIN_H
|
||||
#define E_MOD_MAIN_H
|
||||
|
||||
#define MOD_CONFIG_FILE_EPOCH 0x0001
|
||||
#define MOD_CONFIG_FILE_GENERATION 0x008d
|
||||
#define MOD_CONFIG_FILE_VERSION \
|
||||
((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
|
||||
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
|
|
|
@ -9,6 +9,11 @@ FIXME
|
|||
#include "evry_api.h"
|
||||
#include <Efreet_Trash.h>
|
||||
|
||||
#define MOD_CONFIG_FILE_EPOCH 0x0001
|
||||
#define MOD_CONFIG_FILE_GENERATION 0x008d
|
||||
#define MOD_CONFIG_FILE_VERSION \
|
||||
((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
|
||||
|
||||
#define MAX_ITEMS 10
|
||||
#define MAX_SHOWN 300
|
||||
#define TERM_ACTION_DIR "%s"
|
||||
|
@ -1593,10 +1598,14 @@ _conf_free(void)
|
|||
static void
|
||||
_conf_init(E_Module *m)
|
||||
{
|
||||
char title[4096];
|
||||
|
||||
e_configure_registry_category_add("extensions", 80, _("Extensions"),
|
||||
NULL, "preferences-extensions");
|
||||
|
||||
e_configure_registry_item_add("extensions/everything-files", 110, _("Everything Files"),
|
||||
snprintf(title, sizeof(title), "%s: %s", _("Everything Plugin"), _("Files"));
|
||||
|
||||
e_configure_registry_item_add("extensions/everything-files", 110, title,
|
||||
NULL, _module_icon, _conf_dialog);
|
||||
|
||||
conf_edd = E_CONFIG_DD_NEW("Module_Config", Module_Config);
|
||||
|
@ -1635,6 +1644,8 @@ _conf_shutdown(void)
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
#ifdef USE_MODULE_EVERYTHING_AS_MODULES
|
||||
|
||||
EAPI E_Module_Api e_modapi =
|
||||
{
|
||||
E_MODULE_API_VERSION,
|
||||
|
@ -1670,3 +1681,30 @@ e_modapi_save(E_Module *m __UNUSED__)
|
|||
e_config_domain_save("module.everything-files", conf_edd, _conf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
Eina_Bool
|
||||
evry_plug_files_init(E_Module *m)
|
||||
{
|
||||
_conf_init(m);
|
||||
|
||||
EVRY_MODULE_NEW(evry_module, evry, _plugins_init, _plugins_shutdown);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
evry_plug_files_shutdown(void)
|
||||
{
|
||||
EVRY_MODULE_FREE(evry_module);
|
||||
|
||||
_conf_shutdown();
|
||||
}
|
||||
|
||||
void
|
||||
evry_plug_files_save(void)
|
||||
{
|
||||
e_config_domain_save("module.everything-files", conf_edd, _conf);
|
||||
}
|
||||
#endif
|
|
@ -19,7 +19,7 @@ INCLUDES = -I. \
|
|||
@e_cflags@
|
||||
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
|
||||
pkg_LTLIBRARIES = module.la
|
||||
module_la_SOURCES = e_mod_main.c \
|
||||
module_la_SOURCES = evry_plug_settings.c \
|
||||
e_mod_main.h
|
||||
|
||||
module_la_LIBADD = @e_libs@ @dlopen_libs@
|
||||
|
|
|
@ -218,6 +218,8 @@ _plugins_shutdown(void)
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
#ifdef USE_MODULE_EVERYTHING_AS_MODULES
|
||||
|
||||
EAPI E_Module_Api e_modapi =
|
||||
{
|
||||
E_MODULE_API_VERSION,
|
||||
|
@ -248,4 +250,24 @@ e_modapi_save(E_Module *m __UNUSED__)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
#else
|
||||
|
||||
Eina_Bool
|
||||
evry_plug_settings_init(E_Module *m)
|
||||
{
|
||||
EVRY_MODULE_NEW(evry_module, evry, _plugins_init, _plugins_shutdown);
|
||||
|
||||
e_module_delayed_set(m, 1);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
evry_plug_settings_shutdown(void)
|
||||
{
|
||||
EVRY_MODULE_FREE(evry_module);
|
||||
}
|
||||
|
||||
void
|
||||
evry_plug_settings_save(void){}
|
||||
#endif
|
|
@ -19,7 +19,7 @@ INCLUDES = -I. \
|
|||
@e_cflags@
|
||||
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
|
||||
pkg_LTLIBRARIES = module.la
|
||||
module_la_SOURCES = e_mod_main.c \
|
||||
module_la_SOURCES = evry_plug_windows.c \
|
||||
e_mod_main.h
|
||||
|
||||
module_la_LIBADD = @e_libs@ @dlopen_libs@
|
||||
|
|
|
@ -478,6 +478,7 @@ _plugins_shutdown(void)
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
#ifdef USE_MODULE_EVERYTHING_AS_MODULES
|
||||
|
||||
EAPI E_Module_Api e_modapi =
|
||||
{
|
||||
|
@ -509,4 +510,22 @@ e_modapi_save(E_Module *m __UNUSED__)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
#else
|
||||
|
||||
Eina_Bool
|
||||
evry_plug_windows_init(E_Module *m)
|
||||
{
|
||||
EVRY_MODULE_NEW(evry_module, evry, _plugins_init, _plugins_shutdown);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
evry_plug_windows_shutdown(void)
|
||||
{
|
||||
EVRY_MODULE_FREE(evry_module);
|
||||
}
|
||||
|
||||
void
|
||||
evry_plug_windows_save(void){}
|
||||
#endif
|
|
@ -39,9 +39,17 @@ module_la_SOURCES = $(EVRYHEADERS) \
|
|||
evry_plug_text.c \
|
||||
evry_plug_collection.c \
|
||||
evry_gadget.c \
|
||||
md5.h \
|
||||
md5.c
|
||||
|
||||
if !USE_MODULE_EVERYTHING_AS_MODULES
|
||||
module_la_SOURCES += \
|
||||
../everything-apps/evry_plug_apps.c \
|
||||
../everything-files/evry_plug_files.c \
|
||||
../everything-windows/evry_plug_windows.c \
|
||||
../everything-settings/evry_plug_settings.c \
|
||||
../everything-calc/evry_plug_calc.c
|
||||
endif
|
||||
|
||||
module_la_LIBADD = @e_libs@ @dlopen_libs@
|
||||
module_la_LDFLAGS = -module -avoid-version
|
||||
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "e_mod_main.h"
|
||||
#include "../everything-apps/e_mod_main.h"
|
||||
|
||||
|
||||
static void _e_mod_action_cb(E_Object *obj, const char *params);
|
||||
|
@ -131,7 +132,13 @@ e_modapi_init(E_Module *m)
|
|||
|
||||
evry_history_init();
|
||||
evry_plug_actions_init();
|
||||
|
||||
#ifndef USE_MODULE_EVERYTHING_AS_MODULES
|
||||
evry_plug_apps_init(m);
|
||||
evry_plug_files_init(m);
|
||||
evry_plug_windows_init(m);
|
||||
evry_plug_settings_init(m);
|
||||
evry_plug_calc_init(m);
|
||||
#endif
|
||||
e_datastore_set("evry_api", _api);
|
||||
|
||||
EINA_LIST_FOREACH(e_datastore_get("evry_modules"), l, em)
|
||||
|
@ -167,6 +174,13 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
|||
e_datastore_del("evry_api");
|
||||
E_FREE(_api);
|
||||
|
||||
#ifndef USE_MODULE_EVERYTHING_AS_MODULES
|
||||
evry_plug_apps_shutdown();
|
||||
evry_plug_files_shutdown();
|
||||
evry_plug_settings_shutdown();
|
||||
evry_plug_windows_shutdown();
|
||||
evry_plug_calc_shutdown();
|
||||
#endif
|
||||
evry_gadget_shutdown();
|
||||
evry_shutdown();
|
||||
evry_view_shutdown();
|
||||
|
@ -221,6 +235,15 @@ EAPI int
|
|||
e_modapi_save(E_Module *m __UNUSED__)
|
||||
{
|
||||
e_config_domain_save("module.everything", conf_edd, evry_conf);
|
||||
|
||||
#ifndef USE_MODULE_EVERYTHING_AS_MODULES
|
||||
evry_plug_apps_save();
|
||||
evry_plug_files_save();
|
||||
evry_plug_settings_save();
|
||||
evry_plug_windows_save();
|
||||
evry_plug_calc_save();
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ struct _Tab_View
|
|||
double align;
|
||||
double align_to;
|
||||
Ecore_Animator *animator;
|
||||
Ecore_Idle_Exiter *timer;
|
||||
Ecore_Timer *timer;
|
||||
};
|
||||
|
||||
struct _Config
|
||||
|
@ -325,6 +325,28 @@ int evry_view_toggle(Evry_State *s, const char *trigger);
|
|||
int evry_gadget_init(void);
|
||||
void evry_gadget_shutdown(void);
|
||||
|
||||
#ifndef USE_MODULE_EVERYTHING_AS_MODULES
|
||||
Eina_Bool evry_plug_apps_init(E_Module *m);
|
||||
void evry_plug_apps_shutdown(void);
|
||||
void evry_plug_apps_save(void);
|
||||
|
||||
Eina_Bool evry_plug_files_init(E_Module *m);
|
||||
void evry_plug_files_shutdown(void);
|
||||
void evry_plug_files_save(void);
|
||||
|
||||
Eina_Bool evry_plug_windows_init(E_Module *m);
|
||||
void evry_plug_windows_shutdown(void);
|
||||
void evry_plug_windows_save(void);
|
||||
|
||||
Eina_Bool evry_plug_settings_init(E_Module *m);
|
||||
void evry_plug_settings_shutdown(void);
|
||||
void evry_plug_settings_save(void);
|
||||
|
||||
Eina_Bool evry_plug_calc_init(E_Module *m);
|
||||
void evry_plug_calc_shutdown(void);
|
||||
void evry_plug_calc_save(void);
|
||||
#endif
|
||||
|
||||
Ecore_Event_Handler *evry_event_handler_add(int type, Eina_Bool (*func) (void *data, int type, void *event), const void *data);
|
||||
|
||||
extern Evry_History *evry_hist;
|
||||
|
|
|
@ -1,25 +1,6 @@
|
|||
#include "e.h"
|
||||
#include "e_mod_main.h"
|
||||
|
||||
/* gadcon requirements */
|
||||
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style);
|
||||
static void _gc_shutdown(E_Gadcon_Client *gcc);
|
||||
static void _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient);
|
||||
static char *_gc_label(E_Gadcon_Client_Class *client_class);
|
||||
static Evas_Object *_gc_icon(E_Gadcon_Client_Class *client_class, Evas *evas);
|
||||
static const char *_gc_id_new(E_Gadcon_Client_Class *client_class);
|
||||
/* and actually define the gadcon class that this module provides (just 1) */
|
||||
static const E_Gadcon_Client_Class _gadcon_class =
|
||||
{
|
||||
GADCON_CLIENT_CLASS_VERSION,
|
||||
"evry-starter",
|
||||
{
|
||||
_gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon, _gc_id_new, NULL,
|
||||
e_gadcon_site_is_not_toolbar
|
||||
},
|
||||
E_GADCON_CLIENT_STYLE_PLAIN
|
||||
};
|
||||
|
||||
typedef struct _Instance Instance;
|
||||
|
||||
struct _Instance
|
||||
|
@ -33,6 +14,28 @@ struct _Instance
|
|||
|
||||
static void _button_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
|
||||
/* gadcon requirements */
|
||||
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style);
|
||||
static void _gc_shutdown(E_Gadcon_Client *gcc);
|
||||
static void _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient);
|
||||
static char *_gc_label(E_Gadcon_Client_Class *client_class);
|
||||
static Evas_Object *_gc_icon(E_Gadcon_Client_Class *client_class, Evas *evas);
|
||||
static const char *_gc_id_new(E_Gadcon_Client_Class *client_class);
|
||||
|
||||
static const E_Gadcon_Client_Class _gadcon_class =
|
||||
{
|
||||
GADCON_CLIENT_CLASS_VERSION,
|
||||
"evry-starter",
|
||||
{
|
||||
_gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon, _gc_id_new, NULL,
|
||||
e_gadcon_site_is_not_toolbar
|
||||
},
|
||||
E_GADCON_CLIENT_STYLE_PLAIN
|
||||
};
|
||||
|
||||
static E_Menu *_menu = NULL;
|
||||
|
||||
|
||||
static E_Gadcon_Client *
|
||||
_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
||||
{
|
||||
|
@ -52,8 +55,6 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
|||
inst->gcc = gcc;
|
||||
inst->o_button = o;
|
||||
|
||||
e_gadcon_client_util_menu_attach(gcc);
|
||||
|
||||
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_button_cb_mouse_down, inst);
|
||||
return gcc;
|
||||
|
@ -128,6 +129,20 @@ static void _del_func(void *data, void *obj __UNUSED__)
|
|||
edje_object_signal_emit(inst->o_button, "e,state,unfocused", "e");
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_menu_post(void *data __UNUSED__, E_Menu *m __UNUSED__)
|
||||
{
|
||||
if (!_menu) return;
|
||||
e_object_del(E_OBJECT(_menu));
|
||||
_menu = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_menu_configure(void *data __UNUSED__, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
|
||||
{
|
||||
evry_collection_conf_dialog(e_container_current_get(e_manager_current_get()), "Start");
|
||||
}
|
||||
|
||||
static void
|
||||
_button_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
|
@ -206,6 +221,29 @@ _button_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_
|
|||
|
||||
edje_object_signal_emit(inst->o_button, "e,state,focused", "e");
|
||||
}
|
||||
else if ((ev->button == 3) && (!_menu))
|
||||
{
|
||||
E_Menu *m;
|
||||
E_Menu_Item *mi;
|
||||
int cx, cy;
|
||||
|
||||
m = e_menu_new();
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Settings"));
|
||||
e_util_menu_item_theme_icon_set(mi, "configure");
|
||||
e_menu_item_callback_set(mi, _cb_menu_configure, NULL);
|
||||
|
||||
m = e_gadcon_client_util_menu_items_append(inst->gcc, m, 0);
|
||||
e_menu_post_deactivate_callback_set(m, _cb_menu_post, inst);
|
||||
_menu = m;
|
||||
|
||||
e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &cx, &cy,
|
||||
NULL, NULL);
|
||||
e_menu_activate_mouse(m,
|
||||
e_util_zone_current_get(e_manager_current_get()),
|
||||
cx + ev->output.x, cy + ev->output.y, 1, 1,
|
||||
E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ _add_plugin(const char *name)
|
|||
|
||||
snprintf(path, sizeof(path), "extensions/everything-%s", p->name);
|
||||
|
||||
snprintf(title, sizeof(title), "Everything %s", p->name);
|
||||
snprintf(title, sizeof(title), "%s: %s", _("Everything Plugin"), p->base.label);
|
||||
|
||||
e_configure_registry_item_params_add
|
||||
(path, 110, title, NULL, p->base.icon, evry_collection_conf_dialog, p->name);
|
||||
|
|
|
@ -116,7 +116,6 @@ _evry_plugin_action_browse(Evry_Action *act)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* FIXME check for name already used */
|
||||
int
|
||||
evry_plugin_register(Evry_Plugin *p, int type, int priority)
|
||||
{
|
||||
|
@ -125,33 +124,9 @@ evry_plugin_register(Evry_Plugin *p, int type, int priority)
|
|||
Eina_List *conf[3];
|
||||
int new_conf = 0;
|
||||
|
||||
if (type < 0 || type > 2)
|
||||
if ((type < 0) || (type > 2))
|
||||
return 0;
|
||||
|
||||
if ((type == EVRY_PLUGIN_SUBJECT) &&
|
||||
(strcmp(p->name, "All")))
|
||||
{
|
||||
char buf[256];
|
||||
snprintf(buf, sizeof(buf), _("Show %s Plugin"), p->name);
|
||||
|
||||
e_action_predef_name_set(_("Everything Launcher"), buf,
|
||||
"everything", p->name, NULL, 1);
|
||||
}
|
||||
|
||||
if (p->input_type)
|
||||
{
|
||||
Evry_Action *act;
|
||||
char buf[256];
|
||||
snprintf(buf, sizeof(buf), _("Browse %s"), EVRY_ITEM(p)->label);
|
||||
|
||||
act = EVRY_ACTION_NEW(buf, p->input_type, 0, EVRY_ITEM(p)->icon,
|
||||
_evry_plugin_action_browse, NULL);
|
||||
EVRY_ITEM(act)->icon_get = EVRY_ITEM(p)->icon_get;
|
||||
EVRY_ITEM(act)->data = p;
|
||||
evry_action_register(act, 1);
|
||||
actions = eina_list_append(actions, act);
|
||||
}
|
||||
|
||||
conf[0] = evry_conf->conf_subjects;
|
||||
conf[1] = evry_conf->conf_actions;
|
||||
conf[2] = evry_conf->conf_objects;
|
||||
|
@ -160,6 +135,10 @@ evry_plugin_register(Evry_Plugin *p, int type, int priority)
|
|||
if (pc->name && p->name && !strcmp(pc->name, p->name))
|
||||
break;
|
||||
|
||||
/* check if module of same name is already loaded */
|
||||
if ((pc) && (pc->plugin))
|
||||
return 0;
|
||||
|
||||
/* collection plugin sets its own config */
|
||||
if (!pc && p->config)
|
||||
{
|
||||
|
@ -190,13 +169,34 @@ evry_plugin_register(Evry_Plugin *p, int type, int priority)
|
|||
|
||||
conf[type] = eina_list_sort(conf[type], -1, _evry_cb_plugin_sort);
|
||||
|
||||
/* EINA_LIST_FOREACH(conf[type], l, pc)
|
||||
* pc->priority = i++; */
|
||||
|
||||
evry_conf->conf_subjects = conf[0];
|
||||
evry_conf->conf_actions = conf[1];
|
||||
evry_conf->conf_objects = conf[2];
|
||||
|
||||
if ((type == EVRY_PLUGIN_SUBJECT) &&
|
||||
(strcmp(p->name, "All")))
|
||||
{
|
||||
char buf[256];
|
||||
snprintf(buf, sizeof(buf), _("Show %s Plugin"), p->name);
|
||||
|
||||
e_action_predef_name_set(_("Everything Launcher"), buf,
|
||||
"everything", p->name, NULL, 1);
|
||||
}
|
||||
|
||||
if (p->input_type)
|
||||
{
|
||||
Evry_Action *act;
|
||||
char buf[256];
|
||||
snprintf(buf, sizeof(buf), _("Browse %s"), EVRY_ITEM(p)->label);
|
||||
|
||||
act = EVRY_ACTION_NEW(buf, p->input_type, 0, EVRY_ITEM(p)->icon,
|
||||
_evry_plugin_action_browse, NULL);
|
||||
EVRY_ITEM(act)->icon_get = EVRY_ITEM(p)->icon_get;
|
||||
EVRY_ITEM(act)->data = p;
|
||||
evry_action_register(act, 1);
|
||||
actions = eina_list_append(actions, act);
|
||||
}
|
||||
|
||||
return new_conf;
|
||||
}
|
||||
|
||||
|
|
|
@ -125,8 +125,7 @@ _tabs_update(Tab_View *v)
|
|||
|
||||
if (!w && !v->timer)
|
||||
{
|
||||
v->timer = ecore_idle_exiter_add(_timer_cb, v);
|
||||
e_util_wakeup();
|
||||
v->timer = ecore_timer_add(0.001, _timer_cb, v);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -393,7 +392,7 @@ evry_tab_view_free(Tab_View *v)
|
|||
ecore_animator_del(v->animator);
|
||||
|
||||
if (v->timer)
|
||||
ecore_idle_exiter_del(v->timer);
|
||||
ecore_timer_del(v->timer);
|
||||
|
||||
E_FREE(v);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue