EAPI void *
e_modapi_init(E_Module *m)
{
   e_configure_registry_category_add("keyboard_and_mouse", 40, _("Input"),
                                     NULL, "preferences-behavior");

   e_configure_registry_item_add("keyboard_and_mouse/key_bindings", 10,
                                 _("Key Bindings"), NULL,
                                 "preferences-desktop-keyboard-shortcuts",
                                 e_int_config_keybindings);
   e_configure_registry_item_add("keyboard_and_mouse/mouse_bindings", 20,
                                 _("Mouse Bindings"), NULL,
                                 "preferences-desktop-mouse",
                                 e_int_config_mousebindings);
   e_configure_registry_item_add("keyboard_and_mouse/acpi_bindings", 30,
                                 _("ACPI Bindings"), NULL,
                                 "preferences-system-power-management",
                                 e_int_config_acpibindings);
   e_configure_registry_item_add("keyboard_and_mouse/edge_bindings", 10,
                                 _("Edge Bindings"), NULL,
                                 "preferences-desktop-edge-bindings",
                                 e_int_config_edgebindings);

   e_configure_registry_category_add("advanced", 80, _("Advanced"), NULL, "preferences-advanced");
   e_configure_registry_item_add("advanced/signal_bindings", 10,
                                 _("Signal Bindings"), NULL,
                                 "preferences-desktop-signal-bindings",
                                 e_int_config_signalbindings);
   conf_module = m;
   e_module_delayed_set(m, 1);

   return m;
}
EAPI void *
e_modapi_init(E_Module *m)
{
    e_configure_registry_category_add("screen", 30, _("Screen"), NULL, "preferences-desktop-display");
    e_configure_registry_item_add("screen/randr", 20, _("Screen Setup"), NULL, "preferences-system-screen-resolution", e_int_config_randr);
    conf_randr_module = m;
    e_module_delayed_set(m, 1);

    conf_edd = E_CONFIG_DD_NEW("RandRR_Dialog_Config", Config);
#undef T
#undef D
#define T Config
#define D conf_edd
    E_CONFIG_VAL(D, T, display_disconnected_outputs, UCHAR);
#undef T
#undef D

    randr_dialog_config = e_config_domain_load("module.conf_randr", conf_edd);
    if (!randr_dialog_config)
    {
        randr_dialog_config = E_NEW(Config, 1);
        randr_dialog_config->display_disconnected_outputs = EINA_FALSE;
    }

    return m;
}
Beispiel #3
0
EAPI void *
e_modapi_init(E_Module *m)
{
   e_configure_registry_category_add("language", 70, _("Language"), NULL,
                                     "preferences-desktop-locale");
   e_configure_registry_item_add("language/language_settings", 10,
                                 _("Language Settings"), NULL,
                                 "preferences-desktop-locale",
                                 e_int_config_intl);
   e_configure_registry_item_add("language/input_method_settings", 20,
                                 _("Input Method Settings"), NULL,
                                 "preferences-imc", e_int_config_imc);
   conf_module = m;
   e_module_delayed_set(m, 1);
   return m;
}
Beispiel #4
0
EAPI void *
e_modapi_init(E_Module *m)
{
   e_configure_registry_category_add("keyboard_and_mouse", 40, _("Input"),
                                     NULL, "preferences-behavior");
   e_configure_registry_category_add("advanced", 80, _("Advanced"), NULL, "preferences-advanced");
   e_configure_registry_item_add("keyboard_and_mouse/edge_bindings", 10,
                                 _("Edge Bindings"), NULL,
                                 "preferences-desktop-edge-bindings",
                                 e_int_config_edgebindings);
   e_configure_registry_item_add("advanced/signal_bindings", 10,
                                 _("Signal Bindings"), NULL,
                                 "preferences-desktop-signal-bindings",
                                 e_int_config_signalbindings);
   conf_module = m;
   e_module_delayed_set(m, 1);
   return m;
}
EAPI void *
e_modapi_init(E_Module *m)
{
   Mod *mod;
   char buf[4096];

   mod = calloc(1, sizeof(Mod));
   m->data = mod;

   mod->module = m;
   snprintf(buf, sizeof(buf), "%s/e-module-comp.edj", e_module_dir_get(m));
   e_configure_registry_category_add("appearance", 10, _("Look"), NULL,
                                     "preferences-look");
   e_configure_registry_item_add("appearance/comp", 120, _("Composite"), NULL,
                                 buf, e_int_config_comp_module);

   e_mod_comp_cfdata_edd_init(&(mod->conf_edd),
                              &(mod->conf_match_edd));
                              

   mod->conf = e_config_domain_load("module.comp", mod->conf_edd);
   if (!mod->conf) _e_mod_config_new(m);

   if (!e_config->use_composite)
     {
        e_config->use_composite = 1;
        e_config_save_queue();
     }

   /* XXX: disabled dropshadow module when comp is running */
   {
      Eina_List *l;
      E_Module *m2;
      EINA_LIST_FOREACH(e_module_list(), l, m2)
	{
	   if (m2->enabled && (!strcmp(m2->name, "dropshadow")))
	     e_module_disable(m2);
	}
   }

   /* XXX: update old configs. add config versioning */
   if (mod->conf->first_draw_delay == 0)
     mod->conf->first_draw_delay = 0.20;

   _comp_mod = mod;

   if (!e_mod_comp_init())
     {
        // FIXME: handle if comp init fails
     }

   e_module_delayed_set(m, 0);
   e_module_priority_set(m, -1000);
   return mod;
}
Beispiel #6
0
EAPI void *
e_modapi_init(E_Module *m) 
{
   e_configure_registry_category_add("windows", 50, _("Windows"), NULL, 
                                     "preferences-system-windows");
   e_configure_registry_item_add("windows/window_remembers", 40, 
                                 _("Window Remembers"), NULL, 
                                 "preferences-desktop-window-remember", 
                                 e_int_config_remembers);
   conf_module = m;
   e_module_delayed_set(m, 1);
   return m;
}
EAPI void *
e_modapi_init(E_Module *m)
{
   e_configure_registry_category_add("keyboard_and_mouse", 40, _("Input"), 
                                     NULL, "preferences-behavior");
   
   e_configure_registry_item_add("keyboard_and_mouse/key_bindings", 10, 
                                 _("Keys"), NULL, 
                                 "preferences-desktop-keyboard-shortcuts", 
                                 e_int_config_keybindings);
   e_configure_registry_item_add("keyboard_and_mouse/mouse_bindings", 20,
                                 _("Mouse Buttons"), NULL,
                                 "preferences-desktop-mouse",
                                 e_int_config_mousebindings);
   e_configure_registry_item_add("keyboard_and_mouse/acpi_bindings", 30,
                                 _("Hardware Switches"), NULL,
                                 "preferences-system-power-management",
                                 e_int_config_acpibindings);
   conf_module = m;
   e_module_delayed_set(m, 1);
   return m;
}
Beispiel #8
0
EAPI void *
e_modapi_init(E_Module *m)
{
   e_configure_registry_category_add("screen", 30, _("Screen"), NULL, 
                                     "preferences-desktop-display");
   
   e_configure_registry_item_add("screen/virtual_desktops", 10,
                                 _("Virtual Desktops"), NULL,
                                 "preferences-desktop", e_int_config_desks);
//   e_configure_registry_item_add("screen/screen_resolution", 20, 
//                                 _("Screen Resolution"), NULL, 
//                                 "preferences-system-screen-resolution", 
//                                 e_int_config_display);
   e_configure_registry_item_add("screen/screen_lock", 30,
                                 _("Screen Lock"), NULL,
                                 "preferences-system-lock-screen",
                                 e_int_config_desklock);
   e_configure_registry_item_add("screen/screen_saver", 40, 
                                 _("Blanking"), NULL, 
                                 "preferences-desktop-screensaver", 
                                 e_int_config_screensaver);
   e_configure_registry_item_add("screen/power_management", 50, 
                                 _("Backlight"), NULL, 
                                 "preferences-system-power-management",
                                 e_int_config_dpms);
   
   e_configure_registry_category_add("internal", -1, _("Internal"), NULL,
                                     "enform/internal");
   
   e_configure_registry_item_add("internal/desk", -1,
                                 _("Desk"), NULL,
                                 "preferences-system-windows",
                                 e_int_config_desk);
   
   conf_module = m;
   e_module_delayed_set(m, 1);
   return m;
}
Beispiel #9
0
/* Module initializer
 * Initializes the configuration file, checks its versions, populates
 * menus, finds the rules file, initializes gadget icon.
 */
EAPI void *
e_modapi_init(E_Module *m)
{
   /* Menus and dialogs */
   e_configure_registry_category_add("keyboard_and_mouse", 80, _("Input"),
                                     NULL, "preferences-behavior");
   e_configure_registry_item_add("keyboard_and_mouse/xkbswitch", 110,
                                 _("Keyboard"), NULL,
                                 "preferences-desktop-keyboard",
                                 _xkb_cfg_dialog);
   _xkb.module = m;
   ecore_event_handler_add(ECORE_X_EVENT_XKB_STATE_NOTIFY, _xkb_changed_state, NULL);
   /* Gadcon */
   e_gadcon_provider_register(&_gc_class);
   return m;
}
Beispiel #10
0
E_API void *
e_modapi_init(E_Module *m)
{
   conf_module = m;
   e_configure_registry_category_add("windows", 50, _("Windows"), NULL, "preferences-system-windows");
   e_configure_registry_item_add("windows/window_list", 70, _("Window Switcher"), NULL, "preferences-winlist", e_int_config_winlist);
   e_winlist_init();
   _winlist_act = eina_stringshare_add("winlist");
   /* add module supplied action */
   _act_winlist = e_action_add(_winlist_act);
   if (_act_winlist)
     {
        _act_winlist->func.go = _e_mod_action_winlist_cb;
        _act_winlist->func.go_mouse = _e_mod_action_winlist_mouse_cb;
        _act_winlist->func.go_wheel = _e_mod_action_winlist_wheel_cb;
        _act_winlist->func.go_key = _e_mod_action_winlist_key_cb;
        _act_winlist->func.go_edge = _e_mod_action_winlist_edge_cb;
        _act_winlist->func.go_signal = _e_mod_action_winlist_signal_cb;
        _act_winlist->func.go_acpi = _e_mod_action_winlist_acpi_cb;
        e_action_predef_name_set(N_("Window : List"), N_("Next Window"),
                                 "winlist", "next", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Previous Window"),
                                 "winlist", "prev", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Next window of same class"), "winlist",
                                 "class-next", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Previous window of same class"),
                                 "winlist", "class-prev", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Next window class"), "winlist",
                                 "classes-next", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Previous window class"),
                                 "winlist", "classes-prev", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window on the Left"),
                                 "winlist", "left", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window Down"),
                                 "winlist", "down", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window Up"),
                                 "winlist", "up", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window on the Right"),
                                 "winlist", "right", NULL, 0);
     }
   e_module_delayed_set(m, 1);
   return m;
}
Beispiel #11
0
EAPI void *
e_modapi_init(E_Module *m)
{
   e_configure_registry_category_add("windows", 50, _("Windows"), NULL, "preferences-system-windows");
   e_configure_registry_item_add("windows/window_display", 10, _("Window Display"), NULL, "preferences-system-windows", e_int_config_window_display);
   e_configure_registry_item_add("windows/window_focus", 20, _("Window Focus"), NULL, "preferences-focus", e_int_config_focus);
   e_configure_registry_item_add("windows/window_geometry", 30, _("Window Geometry"), NULL, "preferences-window-geometry", e_int_config_window_geometry);
   e_configure_registry_item_add("windows/window_stacking", 40, _("Window Stacking"), NULL, "preferences-window-stacking", e_int_config_window_stacking);
   e_configure_registry_item_add("windows/window_maxpolicy", 50, _("Window Maximize Policy"), NULL, "preferences-window-maximize", e_int_config_window_maxpolicy);
   e_configure_registry_item_add("windows/client_list_menu", 60, _("Client List Menu"), NULL, "preferences-winlist", e_int_config_clientlist);
   conf_module = m;
   e_module_delayed_set(m, 1);
   return m;
}
Beispiel #12
0
E_API void *
e_modapi_init(E_Module *m)
{
   conf_module = m;
   e_syscon_init();
   /* add module supplied action */
   act = e_action_add("syscon");
   if (act)
     {
        act->func.go = _e_mod_action_syscon_cb;
        e_action_predef_name_set(N_("System"), N_("System Controls"), "syscon",
                                 NULL, NULL, 0);
     }
   maug = e_int_menus_menu_augmentation_add_sorted
       ("main/8", _("System"), _e_mod_menu_add, NULL, NULL, NULL);
   e_configure_registry_category_add("advanced", 80, _("Advanced"), NULL, "preferences-advanced");
   e_configure_registry_item_add("advanced/syscon", 10, _("System Controls"), NULL, "system-shutdown", e_int_config_syscon);
   e_syscon_gadget_init(m);
   e_module_delayed_set(m, 1);
   return m;
}
E_API void *
e_modapi_init(E_Module *m)
{
   char buf[PATH_MAX];

   snprintf(buf, sizeof(buf), "%s/e-module-quickaccess.edj", e_module_dir_get(m));
   e_configure_registry_category_add("launcher", 80, _("Launcher"), NULL,
                                     "modules-launcher");
   e_configure_registry_item_add("launcher/quickaccess", 1, _("Quickaccess"), NULL,
                                 buf, e_int_config_qa_module);

   qa_mod = E_NEW(Mod, 1);
   qa_mod->module = m;
   m->data = qa_mod;
   e_module_delayed_set(m, 0);
   conf_edd = e_qa_config_dd_new();
   qa_config = e_config_domain_load("module.quickaccess", conf_edd);
   if (qa_config)
     {
        if (!e_util_module_config_check(_("Quickaccess"), qa_config->config_version, MOD_CONFIG_FILE_VERSION))
          {
             e_qa_config_free(qa_config);
             qa_config = NULL;
          }
     }

   if (!qa_config) qa_config = e_qa_config_new();
   qa_config->config_version = MOD_CONFIG_FILE_VERSION;

   _e_quick_access_log_dom = eina_log_domain_register("quickaccess", EINA_COLOR_ORANGE);
   eina_log_domain_level_set("quickaccess", EINA_LOG_LEVEL_ERR);

   if (!e_qa_init())
     {
        _e_modapi_shutdown();
        return NULL;
     }

   return m;
}
Beispiel #14
0
/*
 * This is the first function called by e17 when you click the enable button
 */
EAPI void *
e_modapi_init(E_Module *m)
{
    /* Note-to-self, if you add a catagory, and you did not add any item
     * to it , IT WILL NOT BE DISPLAYED!!! */
    //e_configure_registry_category_add("elive", 32, "Elive", NULL,
    //        NULL);

    e_configure_registry_item_add("preferences/skeletor", 10,
            "Skeletor Configuration", NULL,
            "preferences-system-screen-resolution",e_int_config_skeletor_module);


    conf_item_edd = E_CONFIG_DD_NEW("Config_Item", Config_Item);
#undef T
#undef D
#define T Config_Item
#define D conf_item_edd
    E_CONFIG_VAL(D, T, id, STR);

    conf_edd = E_CONFIG_DD_NEW("Config", Config);
#undef T
#undef D
#define T Config
#define D conf_edd
    E_CONFIG_LIST(D, T, items, conf_item_edd);
    E_CONFIG_VAL(D, T, set, INT);

    skeletor_config = e_config_domain_load("module.skeletor", conf_edd);


    if(!skeletor_config)
        skeletor_config = E_NEW(Config, 1);
    
    skeletor_config->module = m;
    e_module_delayed_set(m, 1);

    return m;
}
Beispiel #15
0
EAPI void *
e_modapi_init(E_Module *m)
{
   /* create Screen configuration category
    * 
    * NB: If the category already exists, this function just returns */
   e_configure_registry_category_add("screen", 30, _("Screen"), 
                                     NULL, "preferences-desktop-display");

   /* add the randr dialog to the screen category and provide 
    * the configure category with the function to call */
   e_configure_registry_item_add("screen/screen_setup", 20, _("Screen Setup"), 
                                 NULL, 
                                 "preferences-system-screen-resolution", 
                                 e_int_config_randr);

   /* store the modules working directory for use later */
   mod_dir = eina_stringshare_add(m->dir);

   /* return the module */
   return m;
}
EAPI void *
e_modapi_init(E_Module *m)
{
   char buf[PATH_MAX];

   // Set up module's message catalogue
   snprintf(buf, sizeof(buf), "%s/locale", e_module_dir_get(m));
   bindtextdomain(PACKAGE, buf);
   bind_textdomain_codeset(PACKAGE, "UTF-8");

   // Add an item in the config panel
   snprintf(buf, sizeof(buf), "%s/e-module-penguins.edj", e_module_dir_get(m));
   e_configure_registry_category_add("appearance", 10, D_("Look"),
                                     NULL, "preferences-look");
   e_configure_registry_item_add("appearance/penguins", 150, D_("Penguins"),
                                 NULL, buf, e_int_config_penguins_module);

   penguins_mod = m;
   e_module_delayed_set(m, 1);

   return penguins_init(m);
}
Beispiel #17
0
EAPI void *
e_modapi_init(E_Module *m)
{
   e_configure_registry_category_add("appearance", 10, _("Look"), NULL, "preferences-look");
   e_configure_registry_item_add("appearance/wallpaper2", 10, _("Wallpaper 2"), NULL, "preferences-desktop-wallpaper", wp_conf_show);
   e_configure_registry_category_add("internal", -1, _("Internal"), NULL, "enlightenment/internal");
//   e_configure_registry_item_add("internal/wallpaper_desk", -1, _("Wallpaper 2"), NULL, "preferences-system-windows", e_int_config_wallpaper_desk);
   maug = e_int_menus_menu_augmentation_add_sorted
     ("config/1", _("Wallpaper 2"), _e_mod_menu_add, NULL, NULL, NULL);

//   import_hdl = e_fm2_mime_handler_new(_("Set As Background 2"), "preferences-desktop-wallpaper",
//				       e_int_config_wallpaper_handler_set, NULL,
//				       e_int_config_wallpaper_handler_test, NULL);
//   if (import_hdl)
//     {
//	e_fm2_mime_handler_mime_add(import_hdl, "image/png");
//	e_fm2_mime_handler_mime_add(import_hdl, "image/jpeg");
//     }

   conf_module = m;
   e_module_delayed_set(m, 1);
   return m;
}
EAPI void *
e_modapi_init(E_Module *m)
{
   Eina_List *l;
   Evry_Module *em;
   char buf[4096];

   _e_module_evry_log_dom = eina_log_domain_register
       ("e_module_everything", EINA_LOG_DEFAULT_COLOR);

   if (_e_module_evry_log_dom < 0)
     {
        EINA_LOG_ERR
          ("impossible to create a log domain for everything module");
        return NULL;
     }

   _mod_evry = m;

   /* add module supplied action */
   act = e_action_add("everything");
   if (act)
     {
        act->func.go = _e_mod_action_cb;
        act->func.go_edge = _e_mod_action_cb_edge;
        e_action_predef_name_set
          (_("Everything Launcher"),
          _("Show Everything Launcher"),
          "everything", "", NULL, 0);
     }

   maug = e_int_menus_menu_augmentation_add
       ("main/1", _e_mod_menu_add, NULL, NULL, NULL);

   e_configure_registry_category_add
     ("launcher", 80, _("Launcher"), NULL, "modules-launcher");

   snprintf(buf, sizeof(buf), "%s/e-module-everything.edj", e_module_dir_get(m));
   module_icon = eina_stringshare_add(buf);

   e_configure_registry_item_add
     ("launcher/run_everything", 40, _("Everything Configuration"),
     NULL, module_icon, evry_config_dialog);
   evry_init();

   _evry_type_init("NONE");
   _evry_type_init("FILE");
   _evry_type_init("DIRECTORY");
   _evry_type_init("APPLICATION");
   _evry_type_init("ACTION");
   _evry_type_init("PLUGIN");
   _evry_type_init("BORDER");
   _evry_type_init("TEXT");

   _config_init();

   _evry_events[EVRY_EVENT_ITEMS_UPDATE] = ecore_event_type_new();
   _evry_events[EVRY_EVENT_ITEM_SELECTED] = ecore_event_type_new();
   _evry_events[EVRY_EVENT_ITEM_CHANGED] = ecore_event_type_new();
   _evry_events[EVRY_EVENT_ACTION_PERFORMED] = ecore_event_type_new();
   _evry_events[EVRY_EVENT_PLUGIN_SELECTED] = ecore_event_type_new();

   evry = E_NEW(Evry_API, 1);
   evry->log_dom = _e_module_evry_log_dom;
#define SET(func) (evry->func = &evry_##func);
   SET(api_version_check);
   SET(item_new);
   SET(item_free);
   SET(item_ref);
   SET(plugin_new);
   SET(plugin_free);
   SET(plugin_register);
   SET(plugin_unregister);
   SET(plugin_update);
   SET(plugin_find);
   SET(action_new);
   SET(action_free);
   SET(action_register);
   SET(action_unregister);
   SET(action_find);
   SET(api_version_check);
   SET(type_register);
   SET(icon_theme_get);
   SET(fuzzy_match);
   SET(util_exec_app);
   SET(util_url_escape);
   SET(util_url_unescape);
   SET(util_file_detail_set);
   SET(util_plugin_items_add);
   SET(util_md5_sum);
   SET(util_icon_get);
   SET(item_changed);
   SET(file_path_get);
   SET(file_url_get);
   SET(history_item_add);
   SET(history_types_get);
   SET(history_item_usage_set);
   SET(event_handler_add);
#undef SET

   evry_history_init();
   evry_plug_actions_init();
   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);
   e_datastore_set("evry_api", evry);

   EINA_LIST_FOREACH (e_datastore_get("evry_modules"), l, em)
     em->active = em->init(evry);

   evry_plug_collection_init();
   evry_plug_clipboard_init();
   evry_plug_text_init();
   evry_view_init();
   evry_view_help_init();
   evry_gadget_init();

   e_module_priority_set(m, -1000);
   e_module_delayed_set(m, 1);

   /* cleanup every hour :) */
   cleanup_timer = ecore_timer_add(3600, _cleanup_history, NULL);

   return m;
}
Beispiel #19
0
EAPI void *
e_modapi_init(E_Module *m)
{
   Mod *mod;
   char buf[4096];

   {
      Eina_List *l;
      E_Module *m2;
      EINA_LIST_FOREACH(e_module_list(), l, m2)
        {
           if (m2->enabled && (!strcmp(m2->name, "tiling")))
             {
                e_util_dialog_internal(_("Physics"),
                                       _("Cowardly refusing to battle<br>"
                                         "with the Tiling module for control<br>"
                                         "of your windows. There can be only one!"));
                return NULL;
             }
        }
   }

   if (!ephysics_init()) return NULL;
   mod = calloc(1, sizeof(Mod));
   m->data = mod;

   mod->module = m;

   snprintf(buf, sizeof(buf), "%s/e-module-physics.edj", e_module_dir_get(m));
   e_configure_registry_category_add("appearance", 10, _("Look"), NULL,
                                     "preferences-look");
   e_configure_registry_item_add("appearance/physics", 120, _("Physics"), NULL,
                                 buf, e_int_config_physics_module);
   mod->conf_edd = e_mod_physics_cfdata_edd_init();

   mod->conf = e_config_domain_load("module.physics", mod->conf_edd);
   if (mod->conf)
     {
        if (!e_util_module_config_check(_("Physics"), mod->conf->config_version, MOD_CONFIG_FILE_VERSION))
          {
             e_mod_cfdata_config_free(mod->conf);
             mod->conf = NULL;
          }
     }
   if (mod->conf)
     mod->conf->config_version = MOD_CONFIG_FILE_VERSION;
   else
     _e_mod_config_new(m);
   _physics_mod = mod;

   if (!e_mod_physics_init())
     {
        e_util_dialog_internal(_("Physics Error"), _("The physics module could not be started"));
        e_modapi_shutdown(mod->module);
        return NULL;
     }

   e_module_delayed_set(m, 0);
   e_module_priority_set(m, -1000);
   return mod;
}
Beispiel #20
0
EAPI void *
e_modapi_init(E_Module *m)
{
   char buf[4096];

   /* Set up a new configuration panel */
   snprintf(buf, sizeof(buf), "%s/e-module-gadman.edj", m->dir);
   e_configure_registry_category_add("extensions", 90, _("Extensions"), NULL, 
                                     "preferences-extensions");
   e_configure_registry_item_add("extensions/gadman", 150, _("Gadgets"), NULL, 
                                 buf, _config_gadman_module);

   /* Set this module to be loaded after all other modules, or we don't see
    modules loaded after this */
   e_module_priority_set(m, 100);

   gadman_init(m);

   //Settings values
   Man->conf_edd = E_CONFIG_DD_NEW("Gadman_Config", Config);
#undef T
#undef D
#define T Config
#define D Man->conf_edd
   E_CONFIG_VAL(D, T, bg_type, INT);
   E_CONFIG_VAL(D, T, color_r, INT);
   E_CONFIG_VAL(D, T, color_g, INT);
   E_CONFIG_VAL(D, T, color_b, INT);
   E_CONFIG_VAL(D, T, color_a, INT);
   E_CONFIG_VAL(D, T, anim_bg, INT);
   E_CONFIG_VAL(D, T, anim_gad, INT);
   E_CONFIG_VAL(D, T, custom_bg, STR);
   
   Man->conf = e_config_domain_load("module.gadman", Man->conf_edd);
   if (!Man->conf)
     {
	Man->conf = E_NEW(Config, 1);
	Man->conf->bg_type = 0;
	Man->conf->color_r = 255;
	Man->conf->color_g = 255;
	Man->conf->color_b = 255;
	Man->conf->color_a = 255;
	Man->conf->anim_bg = 1;
	Man->conf->anim_gad = 1;
	Man->conf->custom_bg = NULL;
     }
   E_CONFIG_LIMIT(Man->conf->bg_type, 0, 5);
   E_CONFIG_LIMIT(Man->conf->color_r, 0, 255);
   E_CONFIG_LIMIT(Man->conf->color_g, 0, 255);
   E_CONFIG_LIMIT(Man->conf->color_b, 0, 255);
   E_CONFIG_LIMIT(Man->conf->color_a, 0, 255);
   E_CONFIG_LIMIT(Man->conf->anim_bg, 0, 1);
   E_CONFIG_LIMIT(Man->conf->anim_gad, 0, 1);

   /* Menu augmentation */
   Man->icon_name = eina_stringshare_add(buf);
   Man->maug = NULL;
   Man->maug = 
     e_int_menus_menu_augmentation_add_sorted
     ("config/1", _("Gadgets"), _gadman_maug_add, (void *)Man->icon_name,
      NULL, NULL);
   /* Create toggle action */
   Man->action = e_action_add("gadman_toggle");
   if (Man->action)
     {
	Man->action->func.go = _gadman_action_cb;
	e_action_predef_name_set(_("Gadgets"), _("Show/hide gadgets"),
				 "gadman_toggle", NULL, NULL, 0);
     }

   gadman_update_bg();

   return Man;
}
Beispiel #21
0
EAPI void *
e_modapi_init(E_Module *m)
{
   Eina_List *l, *ll, *lll;
   E_Manager *man;
   E_Container *con;
   E_Zone *zone;

   conf_module = m;

   /* Setup Entry in Config Panel */
   e_configure_registry_category_add("fileman", 100, _("Files"),
                                     NULL, "system-file-manager");
   e_configure_registry_item_add("fileman/fileman", 10, _("File Manager"),
                                 NULL, "system-file-manager",
                                 e_int_config_fileman);
   e_configure_registry_item_add("fileman/file_icons", 20, _("File Icons"),
                                 NULL, "preferences-file-icons",
                                 e_int_config_mime);
   /* Setup Config edd */
   _e_mod_fileman_config_load();

   /* add module supplied action */
   act = e_action_add("fileman");
   if (act)
     {
        act->func.go = _e_mod_action_fileman_cb;
        e_action_predef_name_set(N_("Launch"), N_("File Manager"),
                                 "fileman", NULL, "syntax: /path/to/dir or ~/path/to/dir or favorites or desktop, examples: /boot/grub, ~/downloads", 1);
     }
   maug = e_int_menus_menu_augmentation_add_sorted("main/1", _("Navigate"), _e_mod_menu_add, NULL, NULL, NULL);
   e_module_delayed_set(m, 1);

   e_fwin_init();

   /* Hook into zones */
   for (l = e_manager_list(); l; l = l->next)
     {
        man = l->data;
        for (ll = man->containers; ll; ll = ll->next)
          {
             con = ll->data;
             for (lll = con->zones; lll; lll = lll->next)
               {
                  zone = lll->data;
                  if (e_fwin_zone_find(zone)) continue;
                  if (fileman_config->view.show_desktop_icons)
                    e_fwin_zone_new(zone, e_mod_fileman_path_find(zone));
               }
          }
     }
   zone_add_handler = ecore_event_handler_add(E_EVENT_ZONE_ADD,
                                              _e_mod_zone_add, NULL);

   /* FIXME: add system event for new zone creation, and on creation, add an fwin to the zone */

   e_fileman_dbus_init();

   e_fwin_nav_init();
   
   return m;
}
Beispiel #22
0
EAPI void *
e_modapi_init(E_Module *m)
{
   e_configure_registry_category_add("applications", 20, _("Apps"), NULL,
                                     "preferences-applications");
   e_configure_registry_item_add("applications/new_application", -1,
                                 _("Create Application Launcher"), NULL,
                                 "preferences-applications-add",
                                 e_int_config_apps_add);
   e_configure_registry_item_add("applications/personal_applications", 20,
                                 _("Personal Application Launchers"), NULL,
                                 "preferences-applications-personal",
                                 e_int_config_apps_personal);
   e_configure_registry_item_add("applications/favorite_applications", 30,
                                 _("Favorite Applications"), NULL,
                                 "user-bookmarks",
                                 e_int_config_apps_favs);
   e_configure_registry_item_add("applications/ibar_applications", 40,
                                 _("IBar Applications"), NULL,
                                 "preferences-applications-ibar",
                                 e_int_config_apps_ibar);
   e_configure_registry_item_add("applications/screen_lock_applications", 45,
                                 _("Screen Lock Applications"), NULL,
                                 "preferences-applications-screen-lock",
                                 e_int_config_apps_desk_lock);
   e_configure_registry_item_add("applications/screen_unlock_applications", 46,
                                 _("Screen Unlock Applications"), NULL,
                                 "preferences-applications-screen-unlock",
                                 e_int_config_apps_desk_unlock);
   e_configure_registry_item_add("applications/restart_applications", 50,
                                 _("Restart Applications"), NULL,
                                 "preferences-applications-restart",
                                 e_int_config_apps_restart);
   e_configure_registry_item_add("applications/startup_applications", 60,
                                 _("Startup Applications"), NULL,
                                 "preferences-applications-startup",
                                 e_int_config_apps_startup);
   e_configure_registry_item_add("applications/default_applications", 70,
                                 _("Default Applications"), NULL,
                                 "preferences-desktop-default-applications",
                                 e_int_config_defapps);
   e_configure_registry_item_add("applications/desktop_environments", 80,
                                 _("Desktop Environments"), NULL,
                                 "preferences-desktop-environments",
                                 e_int_config_deskenv);
   e_configure_registry_category_add("internal", -1, _("Internal"), NULL,
                                     "enform/internal");
   e_configure_registry_item_add("internal/ibar_other", -1, _("IBar Other"),
                                 NULL, "preferences-system-windows",
                                 e_int_config_apps_ibar_other);

   conf_module = m;
   e_module_delayed_set(m, 1);
   return m;
}