typedef struct _Evry_Action Evry_Action;
typedef struct _Evry_State Evry_State;
typedef struct _Evry_View Evry_View;
-typedef struct _Plugin_Config Plugin_Config;
typedef struct _History Evry_History;
typedef struct _History_Entry History_Entry;
typedef struct _History_Item History_Item;
typedef struct _Config Evry_Config;
+typedef struct _Plugin_Config Plugin_Config;
+typedef struct _Plugin_Setting Plugin_Setting;
#define EVRY_ITEM(_item) ((Evry_Item *)_item)
evry_plugin_free(EVRY_PLUGIN(_p), 0); \
E_FREE(_p);
-
-struct _Plugin_Config
-{
- const char *name;
-
- int loaded;
- int enabled;
-
- /* minimum input chars to query this source */
- int min_query;
-
- int priority;
-
- const char *trigger;
-
- Evry_Plugin *plugin;
-};
-
-
struct _Evry_Item
{
/* label to show for this item */
int min_w, min_h;
};
+struct _Plugin_Config
+{
+ const char *name;
+
+ int loaded;
+ int enabled;
+
+ /* minimum input chars to query this source */
+ int min_query;
+
+ int priority;
+
+ const char *trigger;
+
+ Evry_Plugin *plugin;
+
+ Eina_Hash *settings;
+};
+
+struct _Plugin_Setting
+{
+ int type;
+ char *description;
+
+ char *val;
+};
+
struct _History_Entry
{
Eina_List *items;
/* static Eina_Array *plugins = NULL; */
static E_Config_DD *conf_edd = NULL;
-static E_Config_DD *conf_item_edd = NULL;
+static E_Config_DD *plugin_conf_edd = NULL;
+static E_Config_DD *plugin_setting_edd = NULL;
EAPI int _e_module_evry_log_dom = -1;
evry_history_free();
/* Clean EET */
- E_CONFIG_DD_FREE(conf_item_edd);
E_CONFIG_DD_FREE(conf_edd);
-
+ E_CONFIG_DD_FREE(plugin_conf_edd);
+ E_CONFIG_DD_FREE(plugin_setting_edd);
e_datastore_del("everything_loaded");
return 1;
{
#undef T
#undef D
+#define T Plugin_Setting
+#define D plugin_setting_edd
+ plugin_setting_edd = E_CONFIG_DD_NEW("Plugin_Setting", Plugin_Setting);
+ E_CONFIG_VAL(D, T, type, INT);
+ E_CONFIG_VAL(D, T, description, STR);
+ E_CONFIG_VAL(D, T, val, STR);
+#undef T
+#undef D
+
#define T Plugin_Config
-#define D conf_item_edd
- conf_item_edd = E_CONFIG_DD_NEW("Plugin_Config", Plugin_Config);
+#define D plugin_conf_edd
+ plugin_conf_edd = E_CONFIG_DD_NEW("Plugin_Config", Plugin_Config);
E_CONFIG_VAL(D, T, name, STR);
E_CONFIG_VAL(D, T, trigger, STR);
E_CONFIG_VAL(D, T, min_query, INT);
E_CONFIG_VAL(D, T, loaded, INT);
E_CONFIG_VAL(D, T, enabled, INT);
E_CONFIG_VAL(D, T, priority, INT);
+ E_CONFIG_HASH(D, T, settings, plugin_setting_edd);
#undef T
#undef D
-
+
#define T Evry_Config
#define D conf_edd
conf_edd = E_CONFIG_DD_NEW("Config", Evry_Config);
E_CONFIG_VAL(D, T, view_zoom, INT);
E_CONFIG_VAL(D, T, cycle_mode, INT);
E_CONFIG_VAL(D, T, history_sort_mode, INT);
- E_CONFIG_LIST(D, T, conf_subjects, conf_item_edd);
- E_CONFIG_LIST(D, T, conf_actions, conf_item_edd);
- E_CONFIG_LIST(D, T, conf_objects, conf_item_edd);
- E_CONFIG_LIST(D, T, conf_views, conf_item_edd);
+ E_CONFIG_LIST(D, T, conf_subjects, plugin_conf_edd);
+ E_CONFIG_LIST(D, T, conf_actions, plugin_conf_edd);
+ E_CONFIG_LIST(D, T, conf_objects, plugin_conf_edd);
+ E_CONFIG_LIST(D, T, conf_views, plugin_conf_edd);
#undef T
#undef D
evry_conf = e_config_domain_load("module.everything", conf_edd);
static int
_evry_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
{
- Ecore_Event_Key *ev;
- Evry_State *s = selector->state;
+ Ecore_Event_Key *ev = event;
+ Evry_State *s;
const char *key = NULL, *old;
- if (!s) return 1;
+ if (ev->event_window != input_window)
+ return 1;
+
+ if (!strcmp(ev->key, "Escape"))
+ {
+ evry_hide();
+ return 1;
+ }
- win->request_selection = EINA_FALSE;
+ if (!selector || !selector->state)
+ return 1;
+ s = selector->state;
- ev = event;
- if (ev->event_window != input_window) return 1;
+ win->request_selection = EINA_FALSE;
old = ev->key;
else /*if (!_evry_browse_item(selector))*/
_evry_plugin_action(selector, 1);
}
- else if (!strcmp(key, "Escape"))
- evry_hide();
else if (!strcmp(key, "Tab"))
_evry_selectors_switch();
else if (!strcmp(key, "BackSpace"))