forked from enlightenment/enlightenment
Use proper config dialog window class. Fixes issue where E crashes if the
wallpaper dialog is open and then the module gets unloaded. SVN revision: 44154
This commit is contained in:
parent
4042dda53a
commit
61d7e4d883
|
@ -83,7 +83,7 @@ _e_int_config_wallpaper_desk(E_Container *con, int con_num, int zone_num, int de
|
|||
E_Config_Dialog_View *v;
|
||||
E_Config_Wallpaper *cw;
|
||||
|
||||
if (e_config_dialog_find("E", "appearance/wallpaper")) return NULL;
|
||||
if (e_config_dialog_find("E", "_config_wallpaper_dialog")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
cw = E_NEW(E_Config_Wallpaper, 1);
|
||||
|
||||
|
@ -108,7 +108,7 @@ _e_int_config_wallpaper_desk(E_Container *con, int con_num, int zone_num, int de
|
|||
cw->desk_y = desk_y;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Wallpaper Settings"), "E",
|
||||
"appearance/wallpaper",
|
||||
"_config_wallpaper_dialog",
|
||||
"preferences-desktop-wallpaper", 0, v, cw);
|
||||
return cfd;
|
||||
}
|
||||
|
@ -554,6 +554,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
ow = e_widget_button_add(evas, _("Gradient..."), "preferences-gradient",
|
||||
_cb_gradient, cfdata, NULL);
|
||||
e_widget_table_object_append(ot, ow, 1, 1, 1, 1, 1, 0, 0, 0);
|
||||
|
||||
#ifdef HAVE_EXCHANGE
|
||||
if (online)
|
||||
{
|
||||
|
@ -684,6 +685,7 @@ _adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
ow = e_widget_button_add(evas, _("Gradient..."), "preferences-gradient",
|
||||
_cb_gradient, cfdata, NULL);
|
||||
e_widget_table_object_append(ot, ow, 1, 1, 1, 1, 1, 0, 0, 0);
|
||||
|
||||
#ifdef HAVE_EXCHANGE
|
||||
if (online)
|
||||
{
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
#include "e.h"
|
||||
#include "e_mod_main.h"
|
||||
|
||||
/***************************************************************************/
|
||||
/**/
|
||||
/* actual module specifics */
|
||||
|
||||
static void _e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_mod_menu_add(void *data, E_Menu *m);
|
||||
static void _e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_mod_menu_add(void *data, E_Menu *m);
|
||||
|
||||
static E_Module *conf_module = NULL;
|
||||
static E_Int_Menu_Augmentation *maug = NULL;
|
||||
|
@ -25,15 +22,23 @@ EAPI E_Module_Api e_modapi =
|
|||
EAPI void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
e_configure_registry_category_add("appearance", 10, _("Look"), NULL, "preferences-appearance");
|
||||
e_configure_registry_item_add("appearance/wallpaper", 10, _("Wallpaper"), NULL, "preferences-desktop-wallpaper", e_int_config_wallpaper);
|
||||
e_configure_registry_category_add("internal", -1, _("Internal"), NULL, "enlightenment/internal");
|
||||
e_configure_registry_item_add("internal/wallpaper_desk", -1, _("Wallpaper"), NULL, "preferences-system-windows", e_int_config_wallpaper_desk);
|
||||
maug = e_int_menus_menu_augmentation_add_sorted("config/1", _("Wallpaper"), _e_mod_menu_add, NULL, NULL, NULL);
|
||||
e_configure_registry_category_add("appearance", 10, _("Look"), NULL,
|
||||
"preferences-appearance");
|
||||
e_configure_registry_item_add("appearance/wallpaper", 10, _("Wallpaper"), NULL,
|
||||
"preferences-desktop-wallpaper", e_int_config_wallpaper);
|
||||
e_configure_registry_category_add("internal", -1, _("Internal"),
|
||||
NULL, "enlightenment/internal");
|
||||
e_configure_registry_item_add("internal/wallpaper_desk", -1, _("Wallpaper"),
|
||||
NULL, "preferences-system-windows", e_int_config_wallpaper_desk);
|
||||
maug =
|
||||
e_int_menus_menu_augmentation_add_sorted("config/1", _("Wallpaper"),
|
||||
_e_mod_menu_add, NULL, NULL, NULL);
|
||||
|
||||
import_hdl = e_fm2_mime_handler_new(_("Set As Background"), "preferences-desktop-wallpaper",
|
||||
e_int_config_wallpaper_handler_set, NULL,
|
||||
e_int_config_wallpaper_handler_test, NULL);
|
||||
import_hdl =
|
||||
e_fm2_mime_handler_new(_("Set As Background"),
|
||||
"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");
|
||||
|
@ -49,6 +54,7 @@ EAPI int
|
|||
e_modapi_shutdown(E_Module *m)
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
|
||||
/* remove module-supplied menu additions */
|
||||
if (maug)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue