e: remove dropshadow module

dropshadow module conflicts with composite, which will be always enabled
by future commits. Remove the module to allow turning composite as
always-enabled.



SVN revision: 82224
devs/asdfuser/comp-sounds
Lucas De Marchi 10 years ago
parent c55c354bbd
commit 5efeaedf21
  1. 1
      .gitignore
  2. 2
      config/standard/Makefile.am
  3. 2
      configure.ac
  4. 2
      po/POTFILES.in
  5. 1
      po/POTFILES.skip
  6. 1
      src/bin/e_module.c
  7. 4
      src/modules/Makefile.am
  8. 16
      src/modules/Makefile_dropshadow.am
  9. 15
      src/modules/comp/e_mod_main.c
  10. BIN
      src/modules/dropshadow/e-module-dropshadow.edj
  11. 201
      src/modules/dropshadow/e_mod_config.c
  12. 2152
      src/modules/dropshadow/e_mod_main.c
  13. 124
      src/modules/dropshadow/e_mod_main.h
  14. 29
      src/modules/dropshadow/module.desktop.in
  15. 16
      src/modules/wizard/page_150.c

1
.gitignore vendored

@ -137,7 +137,6 @@ src/modules/conf_window_manipulation/module.desktop
src/modules/conf_window_remembers/module.desktop
src/modules/connman/module.desktop
src/modules/cpufreq/module.desktop
src/modules/dropshadow/module.desktop
src/modules/everything/module.desktop
src/modules/fileman/module.desktop
src/modules/fileman_opinfo/module.desktop

@ -8,7 +8,6 @@ EXTRA_DIST = \
e.src \
module.battery.src \
module.cpufreq.src \
module.dropshadow.src \
module.fileman.src \
module.ibar.src \
module.ibox.src \
@ -23,7 +22,6 @@ files_DATA = \
e.cfg \
module.battery.cfg \
module.cpufreq.cfg \
module.dropshadow.cfg \
module.fileman.cfg \
module.ibar.cfg \
module.ibox.cfg \

@ -832,7 +832,6 @@ AM_CONDITIONAL([HAVE_WAYLAND_CLIENTS], [test "x${have_wayland_clients}" = "xyes"
AC_E_OPTIONAL_MODULE([ibar], true)
AC_E_OPTIONAL_MODULE([dropshadow], true)
AC_E_OPTIONAL_MODULE([clock], true)
AC_E_OPTIONAL_MODULE([pager], true)
AC_E_OPTIONAL_MODULE([battery], true, [CHECK_MODULE_BATTERY])
@ -933,7 +932,6 @@ src/bin/e_fm_shared_types.h
src/bin/e_fm/Makefile
src/modules/Makefile
src/modules/ibar/module.desktop
src/modules/dropshadow/module.desktop
src/modules/clock/module.desktop
src/modules/pager/module.desktop
src/modules/battery/module.desktop

@ -206,8 +206,6 @@ src/modules/conf_window_remembers/e_int_config_remembers.c
src/modules/conf_window_remembers/e_mod_main.c
src/modules/cpufreq/e_mod_main.c
src/modules/cpufreq/freqset.c
src/modules/dropshadow/e_mod_config.c
src/modules/dropshadow/e_mod_main.c
src/modules/everything/e_mod_main.c
src/modules/everything/evry.c
src/modules/everything/evry_config.c

@ -39,7 +39,6 @@ src/modules/conf_window_focus/module.desktop.in
src/modules/conf_window_manipulation/module.desktop.in
src/modules/conf_winlist/module.desktop.in
src/modules/cpufreq/module.desktop.in
src/modules/dropshadow/module.desktop.in
src/modules/everything/module.desktop.in
src/modules/everything-apps/module.desktop.in
src/modules/everything-aspell/module.desktop.in

@ -667,7 +667,6 @@ _e_module_whitelist_check(void)
"conf_window_remembers",
"connman",
"cpufreq",
"dropshadow",
"everything",
"fileman",
"fileman_opinfo",

@ -38,10 +38,6 @@ if USE_MODULE_IBAR
include Makefile_ibar.am
endif
if USE_MODULE_DROPSHADOW
include Makefile_dropshadow.am
endif
if USE_MODULE_CLOCK
include Makefile_clock.am
endif

@ -1,16 +0,0 @@
dropshadowdir = $(MDIR)/dropshadow
dropshadow_DATA = dropshadow/e-module-dropshadow.edj \
dropshadow/module.desktop
EXTRA_DIST += $(dropshadow_DATA)
dropshadowpkgdir = $(MDIR)/dropshadow/$(MODULE_ARCH)
dropshadowpkg_LTLIBRARIES = dropshadow/module.la
dropshadow_module_la_SOURCES = dropshadow/e_mod_main.h \
dropshadow/e_mod_main.c \
dropshadow/e_mod_config.c
.PHONY: dropshadow install-dropshadow
dropshadow: $(dropshadowpkg_LTLIBRARIES) $(dropshadow_DATA)
install-dropshadow: install-dropshadowDATA install-dropshadowpkgLTLIBRARIES

@ -95,21 +95,6 @@ e_modapi_init(E_Module *m)
e_config_save_queue();
}
/* XXX: disabled dropshadow module when comp is running */
{
E_Module *m2;
m2 = e_module_find("dropshadow");
if (m2 && m2->enabled)
{
e_util_dialog_internal(_("Composite"),
_("Dropshadow module is incompatible<br>"
"with compositing. Disabling the<br>"
"Dropshadow module."));
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;

@ -1,201 +0,0 @@
#include "e.h"
#include "e_mod_main.h"
struct _E_Config_Dialog_Data
{
int quality;
int blur_size;
int shadow_x;
int darkness;
double shadow_darkness;
};
/* Protos */
static void *_create_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
E_Config_Dialog *
e_int_config_dropshadow_module(E_Container *con, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
char buf[4096];
Dropshadow *ds;
ds = dropshadow_mod->data;
if (e_config_dialog_find("E", "appearance/dropshadow")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
snprintf(buf, sizeof(buf), "%s/e-module-dropshadow.edj", e_module_dir_get(ds->module));
cfd = e_config_dialog_new(con,
_("Dropshadow Settings"),
"E", "appearance/dropshadow",
buf, 0, v, ds);
ds->config_dialog = cfd;
return cfd;
}
static void
_fill_data(Dropshadow *ds, E_Config_Dialog_Data *cfdata)
{
cfdata->quality = ds->conf->quality;
cfdata->blur_size = ds->conf->blur_size;
cfdata->shadow_x = ds->conf->shadow_x;
if (cfdata->shadow_x >= 32)
cfdata->shadow_x = 32;
else if ((cfdata->shadow_x < 32) && (cfdata->shadow_x >= 16))
cfdata->shadow_x = 16;
else if ((cfdata->shadow_x < 16) && (cfdata->shadow_x >= 8))
cfdata->shadow_x = 8;
else if ((cfdata->shadow_x < 8) && (cfdata->shadow_x >= 4))
cfdata->shadow_x = 4;
else if ((cfdata->shadow_x < 4) && (cfdata->shadow_x >= 2))
cfdata->shadow_x = 2;
else if ((cfdata->shadow_x < 2) && (cfdata->shadow_x >= 0))
cfdata->shadow_x = 0;
cfdata->shadow_darkness = ds->conf->shadow_darkness;
if (cfdata->shadow_darkness == 1.0)
cfdata->darkness = 0;
else if (cfdata->shadow_darkness == 0.75)
cfdata->darkness = 1;
else if (cfdata->shadow_darkness == 0.5)
cfdata->darkness = 2;
else if (cfdata->shadow_darkness == 0.25)
cfdata->darkness = 3;
}
static void *
_create_data(E_Config_Dialog *cfd)
{
E_Config_Dialog_Data *cfdata;
Dropshadow *ds;
ds = cfd->data;
cfdata = E_NEW(E_Config_Dialog_Data, 1);
_fill_data(ds, cfdata);
return cfdata;
}
static void
_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
Dropshadow *ds;
ds = cfd->data;
ds->config_dialog = NULL;
free(cfdata);
}
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *o, *ob, *of, *ot;
E_Radio_Group *rg;
o = e_widget_list_add(evas, 0, 0);
ot = e_widget_table_add(evas, 1);
of = e_widget_framelist_add(evas, _("Quality"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->quality));
ob = e_widget_radio_add(evas, _("High Quality"), 1, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Medium Quality"), 2, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Low Quality"), 4, rg);
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 0, 0, 1, 1, 1, 1, 1, 1);
of = e_widget_framelist_add(evas, _("Blur Type"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->blur_size));
ob = e_widget_radio_add(evas, _("Very Fuzzy"), 80, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Fuzzy"), 40, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Medium"), 20, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Sharp"), 10, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Very Sharp"), 5, rg);
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 0, 1, 1, 1, 1, 1, 1, 1);
of = e_widget_framelist_add(evas, _("Shadow Distance"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->shadow_x));
ob = e_widget_radio_add(evas, _("Very Far"), 32, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Far"), 16, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Near"), 8, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Very Near"), 4, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Extremely Near"), 2, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Underneath"), 0, rg);
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 1, 0, 1, 1, 1, 1, 1, 1);
of = e_widget_framelist_add(evas, _("Shadow Darkness"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->darkness));
ob = e_widget_radio_add(evas, _("Very Dark"), 0, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Dark"), 1, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Light"), 2, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Very Light"), 3, rg);
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 1, 1, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(o, ot, 1, 1, 0.5);
return o;
}
static int
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
Dropshadow *ds;
ds = cfd->data;
e_border_button_bindings_ungrab_all();
ds->conf->quality = cfdata->quality;
ds->conf->blur_size = cfdata->blur_size;
ds->conf->shadow_x = cfdata->shadow_x;
ds->conf->shadow_y = cfdata->shadow_x;
switch (cfdata->darkness)
{
case 0:
ds->conf->shadow_darkness = 1.0;
break;
case 1:
ds->conf->shadow_darkness = 0.75;
break;
case 2:
ds->conf->shadow_darkness = 0.5;
break;
case 3:
ds->conf->shadow_darkness = 0.25;
break;
}
e_config_save_queue();
e_border_button_bindings_grab_all();
/* Update Config */
_dropshadow_cb_config_updated(ds);
return 1;
}

File diff suppressed because it is too large Load Diff

@ -1,124 +0,0 @@
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
typedef struct _Shpix Shpix;
typedef struct _Shstore Shstore;
typedef struct _Config Config;
typedef struct _Dropshadow Dropshadow;
typedef struct _Shadow Shadow;
typedef struct _Shadow_Object Shadow_Object;
typedef struct _Tilebuf Tilebuf;
typedef struct _Tilebuf_Tile Tilebuf_Tile;
struct _Shpix
{
int w, h;
unsigned char *pix;
};
struct _Shstore
{
int w, h;
unsigned int *pix;
};
struct _Config
{
int shadow_x, shadow_y;
int blur_size;
int quality;
double shadow_darkness;
};
struct _Dropshadow
{
E_Module *module;
Eina_List *shadows;
Eina_List *cons;
E_Before_Idler *idler_before;
E_Config_DD *conf_edd;
Config *conf;
E_Config_Dialog *config_dialog;
struct {
unsigned char *gauss;
int gauss_size;
unsigned char *gauss2;
int gauss2_size;
} table;
struct {
Shstore *shadow[4];
int ref;
} shared;
};
struct _Shadow
{
Dropshadow *ds;
int x, y, w, h;
E_Container_Shape *shape;
Evas_Object *object[4];
Eina_List *object_list;
unsigned char initted : 1;
unsigned char reshape : 1;
unsigned char square : 1;
unsigned char toosmall : 1;
unsigned char use_shared : 1;
unsigned char visible : 1;
};
struct _Shadow_Object
{
int x, y, w, h;
Evas_Object *obj;
};
struct _Tilebuf
{
int outbuf_w;
int outbuf_h;
struct {
int w, h;
} tile_size;
struct {
int w, h;
Tilebuf_Tile *tiles;
} tiles;
};
struct _Tilebuf_Tile
{
int redraw : 1;
};
extern E_Module *dropshadow_mod;
EAPI extern E_Module_Api e_modapi;
EAPI void *e_modapi_init (E_Module *m);
EAPI int e_modapi_shutdown (E_Module *m);
EAPI int e_modapi_save (E_Module *m);
EAPI int e_modapi_info (E_Module *m);
void _dropshadow_cb_config_updated(void *data);
E_Config_Dialog *e_int_config_dropshadow_module(E_Container *con, const char *params __UNUSED__);
/**
* @addtogroup Optional_Look
* @{
*
* @defgroup Module_Dropshadow Drop Shadow
*
* Drops shadow on desktop for visible windows. This is a poor's man
* solution for people that do not have @ref Module_Comp.
*
* @}
*/
#endif

@ -1,29 +0,0 @@
[Desktop Entry]
Type=Link
Name=Dropshadow
Name[ru]=Отброс тени
Name[cs]=Stín okna
Name[eo]=Ĵetita ombro
Name[gl]=Sombra
Name[hu]=Árnyékvető
Name[fr]=Ombre portée
Name[tr]=Pencere gölgesi
Name[pt]=Sombra
Icon=e-module-dropshadow
Comment=Module to add a dropshadow to windows.
Comment[ru]=Модуль включает отброс теней окнами.
Comment[cs]=Modul k přidání stínu oknům.
Comment[de]=
Comment[eo]=Aldoni ĵetitan ombron al la fenestroj.
Comment[es]=Módulo para añadir una sombra a las ventanas.
Comment[fr]=Ajoute une ombre aux fenêtres.
Comment[gl]=Módulo para engadir sombras ás xanelas.
Comment[hu]=A modul segítségével árnyékot vethetünk az ablakainkra.
Comment[it]=Modulo per aggiungere un'ombreggiatura alle finestre.
Comment[ja]=
Comment[pt]=Permite-lhe adicionar sombras às janelas
Comment[pt_BR]=
Comment[tr]=Pencerelere gölge ekleyen modül.
Comment[zh_CN]=
Comment[zh_TW]=
X-Enlightenment-ModuleType=look

@ -159,27 +159,11 @@ wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
}
else
{
E_Config_Module *em;
Eina_List *l;
E_Config_DD *conf_edd = NULL;
E_Config_DD *conf_match_edd = NULL;
Config *cfg = NULL;
EINA_LIST_FOREACH(e_config->modules, l, em)
{
if (!em->name) continue;
if (!strcmp(em->name, "dropshadow"))
{
e_config->modules = eina_list_remove_list
(e_config->modules, l);
if (em->name) eina_stringshare_del(em->name);
free(em);
break;
}
}
e_config->use_composite = 1;
e_mod_comp_cfdata_edd_init(&(conf_edd), &(conf_match_edd));
cfg = e_mod_comp_cfdata_config_new();

Loading…
Cancel
Save