2012-12-17 01:19:05 -08:00
|
|
|
#include "e.h"
|
|
|
|
#include "e_mod_main.h"
|
|
|
|
#include "e_int_config_randr.h"
|
|
|
|
|
|
|
|
/* external variables */
|
|
|
|
const char *mod_dir = NULL;
|
|
|
|
|
|
|
|
EAPI E_Module_Api e_modapi =
|
|
|
|
{
|
|
|
|
E_MODULE_API_VERSION, "Settings - Screen Setup"
|
|
|
|
};
|
|
|
|
|
|
|
|
EAPI void *
|
|
|
|
e_modapi_init(E_Module *m)
|
|
|
|
{
|
|
|
|
e_configure_registry_category_add("screen", 30, _("Screen"),
|
|
|
|
NULL, "preferences-desktop-display");
|
2012-12-17 01:19:10 -08:00
|
|
|
e_configure_registry_item_add("screen/screen_setup", 20, _("Screen Setup"),
|
|
|
|
NULL,
|
2012-12-17 01:19:05 -08:00
|
|
|
"preferences-system-screen-resolution",
|
|
|
|
e_int_config_randr);
|
|
|
|
|
|
|
|
/* store the modules working directory for use later */
|
|
|
|
mod_dir = eina_stringshare_add(m->dir);
|
|
|
|
|
|
|
|
return m;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI int
|
|
|
|
e_modapi_shutdown(E_Module *m __UNUSED__)
|
|
|
|
{
|
|
|
|
E_Config_Dialog *cfd;
|
|
|
|
|
|
|
|
/* destroy existing dialogs */
|
2012-12-17 01:19:10 -08:00
|
|
|
while ((cfd = e_config_dialog_get("E", "screen/screen_setup")))
|
2012-12-17 01:19:05 -08:00
|
|
|
e_object_del(E_OBJECT(cfd));
|
|
|
|
|
|
|
|
/* free module working directory */
|
|
|
|
if (mod_dir) eina_stringshare_del(mod_dir);
|
|
|
|
mod_dir = NULL;
|
|
|
|
|
2012-12-17 01:19:10 -08:00
|
|
|
e_configure_registry_item_del("screen/screen_setup");
|
2012-12-17 01:19:05 -08:00
|
|
|
e_configure_registry_category_del("screen");
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI int
|
|
|
|
e_modapi_save(E_Module *m __UNUSED__)
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|