forked from enlightenment/enlightenment
text input plugin is back. trigger it with "." nice wih 'google for it' action from gsuggest..
SVN revision: 48229
This commit is contained in:
parent
0c5e455d4f
commit
9f21aa2316
|
@ -514,7 +514,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
}
|
||||
}
|
||||
|
||||
if (p->directory && input && !strncmp(input, ".", 1))
|
||||
if (p->directory && input && !strncmp(input, "#", 1))
|
||||
{
|
||||
if (!p->command)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,8 @@ module_la_SOURCES = $(EVRYHEADERS) \
|
|||
evry_view_plugin_tabs.c \
|
||||
evry_plug_view_thumb.c \
|
||||
evry_plug_view_help.c \
|
||||
evry_plug_clipboard.c
|
||||
evry_plug_clipboard.c \
|
||||
evry_plug_text.c
|
||||
|
||||
module_la_LIBADD = @e_libs@ @dlopen_libs@
|
||||
module_la_LDFLAGS = -module -avoid-version
|
||||
|
|
|
@ -65,6 +65,7 @@ e_modapi_init(E_Module *m)
|
|||
view_thumb_init();
|
||||
view_help_init();
|
||||
evry_plug_clipboard_init();
|
||||
evry_plug_text_init();
|
||||
|
||||
/* add module supplied action */
|
||||
act = e_action_add("everything");
|
||||
|
@ -131,7 +132,8 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
|||
view_thumb_shutdown();
|
||||
view_help_shutdown();
|
||||
evry_plug_clipboard_shutdown();
|
||||
|
||||
evry_plug_text_shutdown();
|
||||
|
||||
EINA_LIST_FREE(evry_conf->plugins, p)
|
||||
evry_plugin_free(p, 1);
|
||||
|
||||
|
|
|
@ -82,6 +82,9 @@ void view_preview_shutdown(void);
|
|||
Eina_Bool evry_plug_clipboard_init(void);
|
||||
void evry_plug_clipboard_shutdown(void);
|
||||
|
||||
Eina_Bool evry_plug_text_init(void);
|
||||
void evry_plug_text_shutdown(void);
|
||||
|
||||
int evry_init(void);
|
||||
int evry_shutdown(void);
|
||||
int evry_show(E_Zone *zone, const char *params);
|
||||
|
|
|
@ -255,7 +255,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
|
||||
ob = e_widget_label_add(evas, _("Quick Navigation"));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
||||
|
||||
rg = e_widget_radio_group_new(&cfdata->quick_nav);
|
||||
ob = e_widget_radio_add(evas, _("Off"), 0, rg);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
#include "e_mod_main.h"
|
||||
|
||||
static Evry_Plugin *p1;
|
||||
static Evry_Plugin *p2;
|
||||
|
||||
|
||||
static void
|
||||
_cleanup(Evry_Plugin *p)
|
||||
{
|
||||
EVRY_PLUGIN_ITEMS_FREE(p);
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_free_item_changed(void *data, void *event)
|
||||
{
|
||||
Evry_Event_Item_Changed *ev = event;
|
||||
|
||||
evry_item_free(ev->item);
|
||||
E_FREE(ev);
|
||||
}
|
||||
|
||||
static int
|
||||
_fetch(Evry_Plugin *p, const char *input)
|
||||
{
|
||||
Evry_Item *it;
|
||||
|
||||
EVRY_PLUGIN_ITEMS_FREE(p);
|
||||
|
||||
if (input)
|
||||
{
|
||||
it = evry_item_new(NULL, p, input, NULL);
|
||||
it->fuzzy_match = 999;
|
||||
EVRY_PLUGIN_ITEM_APPEND(p, it);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
evry_plug_text_init(void)
|
||||
{
|
||||
p1 = EVRY_PLUGIN_NEW(NULL, N_("Text"), type_subject, NULL, "TEXT",
|
||||
NULL, _cleanup, _fetch, NULL, NULL);
|
||||
|
||||
p2 = EVRY_PLUGIN_NEW(NULL, N_("Text"), type_object, NULL, "TEXT",
|
||||
NULL, _cleanup, _fetch, NULL, NULL);
|
||||
|
||||
p1->icon = "accessories-text-editor";
|
||||
p2->icon = "accessories-text-editor";
|
||||
p1->trigger = ".";
|
||||
p2->trigger = ".";
|
||||
|
||||
evry_plugin_register(p1, 999);
|
||||
evry_plugin_register(p2, 999);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
evry_plug_text_shutdown(void)
|
||||
{
|
||||
EVRY_PLUGIN_FREE(p1);
|
||||
EVRY_PLUGIN_FREE(p2);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue