'everyhing' open module configs directly from plugin page
SVN revision: 48274
This commit is contained in:
parent
8c6f254e09
commit
f5b3c6757f
|
@ -970,6 +970,7 @@ module_init(void)
|
|||
EVRY_PLUGIN_NEW(EVRY_PLUGIN(p1), N_("Applications"), type_subject, "", "APPLICATION",
|
||||
_begin, _cleanup, _fetch, _icon_get, NULL);
|
||||
EVRY_PLUGIN(p1)->complete = &_complete;
|
||||
EVRY_PLUGIN(p1)->config_path = "extensions/everything-apps";
|
||||
|
||||
p2 = E_NEW(Plugin, 1);
|
||||
EVRY_PLUGIN_NEW(EVRY_PLUGIN(p2), N_("Open With..."), type_action, "FILE", "",
|
||||
|
@ -977,7 +978,8 @@ module_init(void)
|
|||
_icon_get, NULL);
|
||||
|
||||
EVRY_PLUGIN(p2)->action = &_open_with_action;
|
||||
|
||||
EVRY_PLUGIN(p2)->config_path = "extensions/everything-apps";
|
||||
|
||||
evry_plugin_register(EVRY_PLUGIN(p1), 1);
|
||||
evry_plugin_register(EVRY_PLUGIN(p2), 1);
|
||||
|
||||
|
|
|
@ -705,11 +705,12 @@ module_init(void)
|
|||
|
||||
p1 = EVRY_PLUGIN_NEW(NULL, N_("Files"), type_subject, "FILE", "FILE",
|
||||
_begin, _cleanup, _fetch, _icon_get, NULL);
|
||||
|
||||
EVRY_PLUGIN(p1)->config_path = "extensions/everything-files";
|
||||
evry_plugin_register(p1, 3);
|
||||
|
||||
p2 = EVRY_PLUGIN_NEW(NULL, N_("Files"), type_object, "FILE", "FILE",
|
||||
_begin, _cleanup, _fetch, _icon_get, NULL);
|
||||
|
||||
evry_plugin_register(p1, 3);
|
||||
EVRY_PLUGIN(p2)->config_path = "extensions/everything-files";
|
||||
evry_plugin_register(p2, 1);
|
||||
|
||||
act1 = EVRY_ACTION_NEW(N_("Open Folder (EFM)"), "FILE", NULL, "folder-open",
|
||||
|
|
|
@ -222,6 +222,9 @@ struct _Evry_Plugin
|
|||
Plugin_Config *config;
|
||||
|
||||
Eina_Bool changed;
|
||||
|
||||
/* config path registered for the module */
|
||||
const char *config_path;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -550,8 +550,6 @@ evry_plugin_unregister(Evry_Plugin *p)
|
|||
{
|
||||
DBG("%s", p->name);
|
||||
|
||||
/* evry_conf->plugins = eina_list_remove(evry_conf->plugins, p); */
|
||||
|
||||
if (p->type == type_subject)
|
||||
{
|
||||
char buf[256];
|
||||
|
@ -559,7 +557,6 @@ evry_plugin_unregister(Evry_Plugin *p)
|
|||
|
||||
e_action_predef_name_del(_("Everything"), buf);
|
||||
}
|
||||
/* cleanup */
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -18,6 +18,7 @@ struct _Plugin_Page
|
|||
Evas_Object *o_view_detail;
|
||||
Evas_Object *o_view_thumb;
|
||||
Evas_Object *o_enabled;
|
||||
Evas_Object *o_cfg_btn;
|
||||
|
||||
Eina_List *configs;
|
||||
|
||||
|
@ -289,6 +290,15 @@ _list_select_cb (void *data, Evas_Object *obj)
|
|||
|
||||
e_widget_check_checked_set(page->o_enabled, pc->enabled);
|
||||
e_widget_disabled_set(page->o_enabled, 0);
|
||||
|
||||
if (pc->plugin && pc->plugin->config_path)
|
||||
{
|
||||
e_widget_disabled_set(page->o_cfg_btn, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
e_widget_disabled_set(page->o_cfg_btn, 1);
|
||||
}
|
||||
|
||||
page->cur = pc;
|
||||
}
|
||||
|
@ -302,6 +312,7 @@ _list_select_cb (void *data, Evas_Object *obj)
|
|||
e_widget_disabled_set(page->o_view_list, 1);
|
||||
e_widget_disabled_set(page->o_view_thumb, 1);
|
||||
e_widget_disabled_set(page->o_enabled, 1);
|
||||
e_widget_disabled_set(page->o_cfg_btn, 1);
|
||||
|
||||
page->cur = NULL;
|
||||
}
|
||||
|
@ -310,6 +321,13 @@ _list_select_cb (void *data, Evas_Object *obj)
|
|||
static void
|
||||
_plugin_config_cb(void *data, void *data2)
|
||||
{
|
||||
Plugin_Page *page = data;
|
||||
if (!page->cur->plugin)
|
||||
return;
|
||||
|
||||
e_configure_registry_call(page->cur->plugin->config_path,
|
||||
e_container_current_get(e_manager_current_get()),
|
||||
NULL);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
|
@ -338,11 +356,13 @@ _create_plugin_page(E_Config_Dialog_Data *cfdata, Evas *e, Plugin_Page *page)
|
|||
|
||||
ob = e_widget_table_add(e, 1);
|
||||
e_widget_table_object_append(ob, of, 0, 0, 1, 3, 1, 1, 1, 1);
|
||||
|
||||
e_widget_disabled_set(o, 1);
|
||||
of = e_widget_framelist_add(e, _("General"), 0);
|
||||
o = e_widget_button_add(e, _("Configure"), NULL,
|
||||
_plugin_config_cb,
|
||||
page->list, page->configs);
|
||||
page, NULL);
|
||||
e_widget_disabled_set(o, 1);
|
||||
page->o_cfg_btn = o;
|
||||
e_widget_framelist_object_append(of, o);
|
||||
o = e_widget_check_add(e, _("Enabled"),
|
||||
&(page->enabled));
|
||||
|
|
Loading…
Reference in New Issue