Simplify dialog data handling.

This commit is contained in:
Kim Woelders 2014-04-25 23:07:58 +02:00
parent 5fc86cc6ad
commit 23872b2cac
18 changed files with 77 additions and 149 deletions

View File

@ -58,8 +58,8 @@ _DlgFillAbout(Dialog * d, DItem * table, void *data __UNUSED__)
static const DialogDef DlgAbout = { static const DialogDef DlgAbout = {
"ABOUT_ENLIGHTENMENT", "ABOUT_ENLIGHTENMENT",
NULL, NULL, NULL,
NULL, 0,
SOUND_NONE, SOUND_NONE,
NULL, NULL,
NULL, NULL,

View File

@ -1946,17 +1946,13 @@ CB_InitView(DItem * di, int val __UNUSED__, void *data __UNUSED__)
static void static void
_DlgFillBackground(Dialog * d, DItem * table, void *data) _DlgFillBackground(Dialog * d, DItem * table, void *data)
{ {
BgDlgData *dd = DLG_DATA_GET(d, BgDlgData);
Background *bg = (Background *) data; Background *bg = (Background *) data;
DItem *di, *table2, *table3, *label; DItem *di, *table2, *table3, *label;
int i, num; int i, num;
char s[1024]; char s[1024];
int mini_w = Mode.backgrounds.mini_w; int mini_w = Mode.backgrounds.mini_w;
int mini_h = Mode.backgrounds.mini_h; int mini_h = Mode.backgrounds.mini_h;
BgDlgData *dd;
dd = DLG_DATA_SET(d, BgDlgData);
if (!dd)
return;
if (!Conf.backgrounds.no_scan) if (!Conf.backgrounds.no_scan)
ScanBackgroundMenu(); ScanBackgroundMenu();
@ -2222,8 +2218,8 @@ _DlgFillBackground(Dialog * d, DItem * table, void *data)
const DialogDef DlgBackground = { const DialogDef DlgBackground = {
"CONFIGURE_BG", "CONFIGURE_BG",
N_("Background"), N_("Background"), N_("Desktop Background Settings"),
N_("Desktop Background Settings"), sizeof(BgDlgData),
SOUND_SETTINGS_BG, SOUND_SETTINGS_BG,
"pix/bg.png", "pix/bg.png",
N_("Enlightenment Desktop\n" "Background Settings Dialog"), N_("Enlightenment Desktop\n" "Background Settings Dialog"),

View File

@ -1505,15 +1505,11 @@ CB_IconSizeSlider(Dialog * d, int val __UNUSED__, void *data)
static void static void
_DlgFillContainer(Dialog * d, DItem * table, void *data) _DlgFillContainer(Dialog * d, DItem * table, void *data)
{ {
ContainerDlgData *dd; ContainerDlgData *dd = DLG_DATA_GET(d, ContainerDlgData);
Container *ct = (Container *) data; Container *ct = (Container *) data;
DItem *di, *table2, *radio, *label; DItem *di, *table2, *radio, *label;
char s[256]; char s[256];
dd = DLG_DATA_SET(d, ContainerDlgData);
if (!dd)
return;
if (!ct) if (!ct)
return; return;
@ -1729,8 +1725,8 @@ _DlgFillContainer(Dialog * d, DItem * table, void *data)
static const DialogDef DlgContainer = { static const DialogDef DlgContainer = {
"CONFIGURE_ICONBOX", "CONFIGURE_ICONBOX",
NULL, NULL, NULL,
NULL, sizeof(ContainerDlgData),
SOUND_SETTINGS_ICONBOX, SOUND_SETTINGS_ICONBOX,
"pix/iconbox.png", "pix/iconbox.png",
N_("Enlightenment Iconbox\n" "Settings Dialog"), N_("Enlightenment Iconbox\n" "Settings Dialog"),

View File

@ -2462,12 +2462,8 @@ CB_DesktopDisplayAreaRedraw(DItem * di, int val __UNUSED__,
static void static void
_DlgFillDesks(Dialog * d, DItem * table, void *data __UNUSED__) _DlgFillDesks(Dialog * d, DItem * table, void *data __UNUSED__)
{ {
DeskDlgData *dd = DLG_DATA_GET(d, DeskDlgData);
DItem *di, *slider, *radio; DItem *di, *slider, *radio;
DeskDlgData *dd;
dd = DLG_DATA_SET(d, DeskDlgData);
if (!dd)
return;
dd->desktops = Conf.desks.num; dd->desktops = Conf.desks.num;
dd->prev_desktops = -1; dd->prev_desktops = -1;
@ -2574,8 +2570,8 @@ _DlgFillDesks(Dialog * d, DItem * table, void *data __UNUSED__)
const DialogDef DlgDesks = { const DialogDef DlgDesks = {
"CONFIGURE_DESKTOPS", "CONFIGURE_DESKTOPS",
N_("Desks"), N_("Desks"), N_("Multiple Desktop Settings"),
N_("Multiple Desktop Settings"), sizeof(DeskDlgData),
SOUND_SETTINGS_DESKTOPS, SOUND_SETTINGS_DESKTOPS,
"pix/desktops.png", "pix/desktops.png",
N_("Enlightenment Multiple Desktop\n" "Settings Dialog"), N_("Enlightenment Multiple Desktop\n" "Settings Dialog"),
@ -2659,12 +2655,8 @@ CB_AreaDisplayAreaRedraw(DItem * di, int val __UNUSED__, void *data __UNUSED__)
static void static void
_DlgFillAreas(Dialog * d, DItem * table, void *data __UNUSED__) _DlgFillAreas(Dialog * d, DItem * table, void *data __UNUSED__)
{ {
AreaDlgData *dd = DLG_DATA_GET(d, AreaDlgData);
DItem *di, *slider, *slider2, *table2, *radio; DItem *di, *slider, *slider2, *table2, *radio;
AreaDlgData *dd;
dd = DLG_DATA_SET(d, AreaDlgData);
if (!dd)
return;
dd->area_wraparound = Conf.desks.areas_wraparound; dd->area_wraparound = Conf.desks.areas_wraparound;
@ -2750,8 +2742,8 @@ _DlgFillAreas(Dialog * d, DItem * table, void *data __UNUSED__)
const DialogDef DlgAreas = { const DialogDef DlgAreas = {
"CONFIGURE_AREA", "CONFIGURE_AREA",
N_("Areas"), N_("Areas"), N_("Virtual Desktop Settings"),
N_("Virtual Desktop Settings"), sizeof(AreaDlgData),
SOUND_SETTINGS_AREA, SOUND_SETTINGS_AREA,
"pix/areas.png", "pix/areas.png",
N_("Enlightenment Virtual Desktop\n" "Settings Dialog"), N_("Enlightenment Virtual Desktop\n" "Settings Dialog"),

View File

@ -150,6 +150,8 @@ typedef struct {
void *data; void *data;
} DKeyBind; } DKeyBind;
#define DD_SIZE 800 /* Extra dialog data size */
struct _dialog { struct _dialog {
dlist_t list; dlist_t list;
EWin *ewin; EWin *ewin;
@ -164,7 +166,6 @@ struct _dialog {
DialogExitFunc *exit_func; DialogExitFunc *exit_func;
int num_bindings; int num_bindings;
DKeyBind *keybindings; DKeyBind *keybindings;
void *data;
char redraw; char redraw;
char update; char update;
@ -172,6 +173,7 @@ struct _dialog {
char close; char close;
char set_title; char set_title;
int xu1, yu1, xu2, yu2; int xu1, yu1, xu2, yu2;
int dd[DD_SIZE / sizeof(int)];
}; };
static EWin *FindEwinByDialog(Dialog * d); static EWin *FindEwinByDialog(Dialog * d);
@ -249,7 +251,6 @@ DialogDestroy(Dialog * d)
Efree(d->name); Efree(d->name);
Efree(d->title); Efree(d->title);
Efree(d->data);
DialogKeybindingsDestroy(d); DialogKeybindingsDestroy(d);
if (d->item) if (d->item)
DialogItemDestroy(d->item, 0); DialogItemDestroy(d->item, 0);
@ -294,17 +295,10 @@ DialogCallExitFunction(Dialog * d)
d->exit_func(d); d->exit_func(d);
} }
void *
DialogDataSet(Dialog * d, unsigned int size)
{
d->data = Ecalloc(size, 1);
return d->data;
}
void * void *
DialogDataGet(Dialog * d) DialogDataGet(Dialog * d)
{ {
return d->data; return d->dd;
} }
DItem * DItem *
@ -507,10 +501,9 @@ DialogFill(Dialog * d, DItem * parent, const DialogDef * dd, void *data)
if (!content) if (!content)
return; return;
Efree(d->data); memset(d->dd, 0, dd->dd_size);
d->data = NULL; if (dd->dd_size <= DD_SIZE)
dd->fill(d, content, data);
dd->fill(d, content, data);
if (dd->func_apply) if (dd->func_apply)
DialogAddFooter(d, parent, dd->flags, dd->func_apply); DialogAddFooter(d, parent, dd->flags, dd->func_apply);

View File

@ -66,7 +66,8 @@ typedef struct {
const char *name; const char *name;
const char *label; const char *label;
const char *title; const char *title;
int sound; unsigned short dd_size;
short sound;
const char *header_image; const char *header_image;
const char *header_text; const char *header_text;
void (*fill) (Dialog * d, DItem * table, void *data); void (*fill) (Dialog * d, DItem * table, void *data);
@ -85,10 +86,8 @@ void DialogSetTitle(Dialog * d, const char *title);
void DialogSetExitFunction(Dialog * d, DialogExitFunc * func); void DialogSetExitFunction(Dialog * d, DialogExitFunc * func);
void DialogCallExitFunction(Dialog * d); void DialogCallExitFunction(Dialog * d);
void *DialogDataSet(Dialog * d, unsigned int size);
void *DialogDataGet(Dialog * d); void *DialogDataGet(Dialog * d);
#define DLG_DATA_SET(dlg, type) (type*)DialogDataSet(dlg, sizeof(type))
#define DLG_DATA_GET(dlg, type) (type*)DialogDataGet(dlg) #define DLG_DATA_GET(dlg, type) (type*)DialogDataGet(dlg)
void DialogShow(Dialog * d); void DialogShow(Dialog * d);

View File

@ -787,12 +787,8 @@ _DlgApplyFocus(Dialog * d, int val __UNUSED__, void *data __UNUSED__)
static void static void
_DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__) _DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__)
{ {
FocusDlgData *dd = DLG_DATA_GET(d, FocusDlgData);
DItem *di, *radio, *radio2; DItem *di, *radio, *radio2;
FocusDlgData *dd;
dd = DLG_DATA_SET(d, FocusDlgData);
if (!dd)
return;
dd->focus.mode = Conf.focus.mode; dd->focus.mode = Conf.focus.mode;
dd->focus.clickalways = Conf.focus.clickraises; dd->focus.clickalways = Conf.focus.clickraises;
@ -991,8 +987,8 @@ _DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__)
const DialogDef DlgFocus = { const DialogDef DlgFocus = {
"CONFIGURE_FOCUS", "CONFIGURE_FOCUS",
N_("Focus"), N_("Focus"), N_("Focus Settings"),
N_("Focus Settings"), sizeof(FocusDlgData),
SOUND_SETTINGS_FOCUS, SOUND_SETTINGS_FOCUS,
"pix/focus.png", "pix/focus.png",
N_("Enlightenment Focus\n" "Settings Dialog"), N_("Enlightenment Focus\n" "Settings Dialog"),

View File

@ -465,8 +465,8 @@ _DlgFillFx(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
const DialogDef DlgFx = { const DialogDef DlgFx = {
"CONFIGURE_FX", "CONFIGURE_FX",
N_("FX"), N_("FX"), N_("Special FX Settings"),
N_("Special FX Settings"), 0,
SOUND_SETTINGS_FX, SOUND_SETTINGS_FX,
"pix/fx.png", "pix/fx.png",
N_("Enlightenment Special Effects\n" "Settings Dialog"), N_("Enlightenment Special Effects\n" "Settings Dialog"),

View File

@ -660,14 +660,10 @@ GroupCallback(Dialog * d, int val, void *data __UNUSED__)
static void static void
_DlgFillGroupChoose(Dialog * d, DItem * table, void *data) _DlgFillGroupChoose(Dialog * d, DItem * table, void *data)
{ {
GroupSelDlgData *dd = DLG_DATA_GET(d, GroupSelDlgData);
DItem *di, *radio; DItem *di, *radio;
int i, num_groups; int i, num_groups;
char **group_member_strings; char **group_member_strings;
GroupSelDlgData *dd;
dd = DLG_DATA_SET(d, GroupSelDlgData);
if (!dd)
return;
*dd = *(GroupSelDlgData *) data; *dd = *(GroupSelDlgData *) data;
@ -702,8 +698,8 @@ _DlgFillGroupChoose(Dialog * d, DItem * table, void *data)
static const DialogDef DlgGroupChoose = { static const DialogDef DlgGroupChoose = {
"GROUP_SELECTION", "GROUP_SELECTION",
NULL, NULL, N_("Window Group Selection"),
N_("Window Group Selection"), sizeof(GroupSelDlgData),
SOUND_SETTINGS_GROUP, SOUND_SETTINGS_GROUP,
"pix/group.png", "pix/group.png",
N_("Enlightenment Window Group\n" "Selection Dialog"), N_("Enlightenment Window Group\n" "Selection Dialog"),
@ -836,15 +832,11 @@ GroupSelectCallback(Dialog * d, int val, void *data __UNUSED__)
static void static void
_DlgFillGroups(Dialog * d, DItem * table, void *data) _DlgFillGroups(Dialog * d, DItem * table, void *data)
{ {
EwinGroupDlgData *dd = DLG_DATA_GET(d, EwinGroupDlgData);
EWin *ewin = (EWin *) data; EWin *ewin = (EWin *) data;
DItem *radio, *di; DItem *radio, *di;
int i; int i;
char **group_member_strings; char **group_member_strings;
EwinGroupDlgData *dd;
dd = DLG_DATA_SET(d, EwinGroupDlgData);
if (!dd)
return;
dd->ewin = ewin; dd->ewin = ewin;
dd->cfgs = EMALLOC(GroupConfig, ewin->num_groups); dd->cfgs = EMALLOC(GroupConfig, ewin->num_groups);
@ -931,8 +923,8 @@ _DlgFillGroups(Dialog * d, DItem * table, void *data)
static const DialogDef DlgGroups = { static const DialogDef DlgGroups = {
"CONFIGURE_GROUP", "CONFIGURE_GROUP",
NULL, NULL, N_("Window Group Settings"),
N_("Window Group Settings"), sizeof(EwinGroupDlgData),
SOUND_SETTINGS_GROUP, SOUND_SETTINGS_GROUP,
"pix/group.png", "pix/group.png",
N_("Enlightenment Window Group\n" "Settings Dialog"), N_("Enlightenment Window Group\n" "Settings Dialog"),
@ -978,12 +970,8 @@ _DlgApplyGroupDefaults(Dialog * d, int val __UNUSED__, void *data __UNUSED__)
static void static void
_DlgFillGroupDefaults(Dialog * d, DItem * table, void *data __UNUSED__) _DlgFillGroupDefaults(Dialog * d, DItem * table, void *data __UNUSED__)
{ {
GroupCfgDlgData *dd = DLG_DATA_GET(d, GroupCfgDlgData);
DItem *di; DItem *di;
GroupCfgDlgData *dd;
dd = DLG_DATA_SET(d, GroupCfgDlgData);
if (!dd)
return;
dd->group_cfg = Conf_groups.dflt; dd->group_cfg = Conf_groups.dflt;
dd->group_swap = Conf_groups.swapmove; dd->group_swap = Conf_groups.swapmove;
@ -1049,8 +1037,8 @@ _DlgFillGroupDefaults(Dialog * d, DItem * table, void *data __UNUSED__)
const DialogDef DlgGroupDefaults = { const DialogDef DlgGroupDefaults = {
"CONFIGURE_DEFAULT_GROUP_CONTROL", "CONFIGURE_DEFAULT_GROUP_CONTROL",
N_("Groups"), N_("Groups"), N_("Default Group Control Settings"),
N_("Default Group Control Settings"), sizeof(GroupCfgDlgData),
SOUND_SETTINGS_GROUP, SOUND_SETTINGS_GROUP,
"pix/group.png", "pix/group.png",
N_("Enlightenment Default\n" "Group Control Settings Dialog"), N_("Enlightenment Default\n" "Group Control Settings Dialog"),

View File

@ -1969,12 +1969,8 @@ _DlgCbIconSize(Dialog * d, int val __UNUSED__, void *data)
static void static void
_DlgFillMenus(Dialog * d, DItem * table, void *data __UNUSED__) _DlgFillMenus(Dialog * d, DItem * table, void *data __UNUSED__)
{ {
MenudDlgData *dd = DLG_DATA_GET(d, MenudDlgData);
DItem *di, *label; DItem *di, *label;
MenudDlgData *dd;
dd = DLG_DATA_SET(d, MenudDlgData);
if (!dd)
return;
dd->warp = Conf.menus.warp; dd->warp = Conf.menus.warp;
dd->animate = Conf.menus.animate; dd->animate = Conf.menus.animate;
@ -2012,8 +2008,8 @@ _DlgFillMenus(Dialog * d, DItem * table, void *data __UNUSED__)
const DialogDef DlgMenus = { const DialogDef DlgMenus = {
"CONFIGURE_MENUS", "CONFIGURE_MENUS",
N_("Menus"), N_("Menus"), N_("Menu Settings"),
N_("Menu Settings"), sizeof(MenudDlgData),
SOUND_SETTINGS_MENUS, SOUND_SETTINGS_MENUS,
"pix/place.png", "pix/place.png",
N_("Enlightenment Menu\n" "Settings Dialog"), N_("Enlightenment Menu\n" "Settings Dialog"),

View File

@ -110,14 +110,10 @@ CB_ThemeTransparency(Dialog * d, int val __UNUSED__, void *data)
static void static void
_DlgFillThemeTrans(Dialog * d, DItem * table, void *data __UNUSED__) _DlgFillThemeTrans(Dialog * d, DItem * table, void *data __UNUSED__)
{ {
TransDlgData *dd = DLG_DATA_GET(d, TransDlgData);
DItem *di, *label; DItem *di, *label;
DItem *radio_border, *radio_widget, *radio_menu, DItem *radio_border, *radio_widget, *radio_menu,
*radio_dialog, *radio_tooltip, *radio_hilight; *radio_dialog, *radio_tooltip, *radio_hilight;
TransDlgData *dd;
dd = DLG_DATA_SET(d, TransDlgData);
if (!dd)
return;
dd->st_border = Conf.trans.border; dd->st_border = Conf.trans.border;
dd->st_widget = Conf.trans.widget; dd->st_widget = Conf.trans.widget;
@ -257,8 +253,8 @@ _DlgFillThemeTrans(Dialog * d, DItem * table, void *data __UNUSED__)
const DialogDef DlgThemeTrans = { const DialogDef DlgThemeTrans = {
"CONFIGURE_TRANS", "CONFIGURE_TRANS",
N_("Transparency"), N_("Transparency"), N_("Selective Transparency Settings"),
N_("Selective Transparency Settings"), sizeof(TransDlgData),
SOUND_SETTINGS_TRANS, SOUND_SETTINGS_TRANS,
"pix/tips.png", "pix/tips.png",
N_("Enlightenment Selective Transparency\n" "Settings Dialog"), N_("Enlightenment Selective Transparency\n" "Settings Dialog"),

View File

@ -1774,7 +1774,7 @@ _DlgApplyPagers(Dialog * d, int val __UNUSED__, void *data __UNUSED__)
} }
static void static void
CB_PagerScanSlide(Dialog * d __UNUSED__, int val __UNUSED__, void *data) CB_PagerScanSlide(Dialog * d, int val __UNUSED__, void *data)
{ {
PagerDlgData *dd = DLG_DATA_GET(d, PagerDlgData); PagerDlgData *dd = DLG_DATA_GET(d, PagerDlgData);
DItem *di = (DItem *) data; DItem *di = (DItem *) data;
@ -1788,13 +1788,9 @@ CB_PagerScanSlide(Dialog * d __UNUSED__, int val __UNUSED__, void *data)
static void static void
_DlgFillPagers(Dialog * d, DItem * table, void *data __UNUSED__) _DlgFillPagers(Dialog * d, DItem * table, void *data __UNUSED__)
{ {
PagerDlgData *dd = DLG_DATA_GET(d, PagerDlgData);
DItem *di, *radio, *label; DItem *di, *radio, *label;
char s[256]; char s[256];
PagerDlgData *dd;
dd = DLG_DATA_SET(d, PagerDlgData);
if (!dd)
return;
dd->show_pagers = Conf_pagers.enable; dd->show_pagers = Conf_pagers.enable;
dd->pager_hiq = Conf_pagers.hiq; dd->pager_hiq = Conf_pagers.hiq;
@ -1965,8 +1961,8 @@ _DlgFillPagers(Dialog * d, DItem * table, void *data __UNUSED__)
const DialogDef DlgPagers = { const DialogDef DlgPagers = {
"CONFIGURE_PAGER", "CONFIGURE_PAGER",
N_("Pagers"), N_("Pagers"), N_("Pager Settings"),
N_("Pager Settings"), sizeof(PagerDlgData),
SOUND_SETTINGS_PAGER, SOUND_SETTINGS_PAGER,
"pix/pager.png", "pix/pager.png",
N_("Enlightenment Desktop & Area\n" "Pager Settings Dialog"), N_("Enlightenment Desktop & Area\n" "Pager Settings Dialog"),

View File

@ -795,8 +795,8 @@ _DlgFillSession(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
const DialogDef DlgSession = { const DialogDef DlgSession = {
"CONFIGURE_SESSION", "CONFIGURE_SESSION",
N_("Session"), N_("Session"), N_("Session Settings"),
N_("Session Settings"), 0,
SOUND_SETTINGS_SESSION, SOUND_SETTINGS_SESSION,
"pix/miscellaneous.png", "pix/miscellaneous.png",
N_("Enlightenment Session\n" "Settings Dialog"), N_("Enlightenment Session\n" "Settings Dialog"),

View File

@ -61,14 +61,10 @@ _DlgApplyMoveResize(Dialog * d, int val __UNUSED__, void *data __UNUSED__)
} }
static void static void
_DlgFillMoveResize(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__) _DlgFillMoveResize(Dialog * d, DItem * table, void *data __UNUSED__)
{ {
MovResDlgData *dd = DLG_DATA_GET(d, MovResDlgData);
DItem *di, *radio1, *radio2, *radio3, *radio4; DItem *di, *radio1, *radio2, *radio3, *radio4;
MovResDlgData *dd;
dd = DLG_DATA_SET(d, MovResDlgData);
if (!dd)
return;
dd->move = Conf.movres.mode_move; dd->move = Conf.movres.mode_move;
dd->resize = Conf.movres.mode_resize; dd->resize = Conf.movres.mode_resize;
@ -240,8 +236,8 @@ _DlgFillMoveResize(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
const DialogDef DlgMoveResize = { const DialogDef DlgMoveResize = {
"CONFIGURE_MOVERESIZE", "CONFIGURE_MOVERESIZE",
N_("Move/Resize"), N_("Move/Resize"), N_("Move & Resize Settings"),
N_("Move & Resize Settings"), sizeof(MovResDlgData),
SOUND_SETTINGS_MOVERESIZE, SOUND_SETTINGS_MOVERESIZE,
"pix/moveres.png", "pix/moveres.png",
N_("Enlightenment Move & Resize\n" "Method Settings Dialog"), N_("Enlightenment Move & Resize\n" "Method Settings Dialog"),
@ -305,14 +301,10 @@ _DlgApplyPlacement(Dialog * d, int val __UNUSED__, void *data __UNUSED__)
} }
static void static void
_DlgFillPlacement(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__) _DlgFillPlacement(Dialog * d, DItem * table, void *data __UNUSED__)
{ {
PlaceDlgData *dd = DLG_DATA_GET(d, PlaceDlgData);
DItem *di, *radio; DItem *di, *radio;
PlaceDlgData *dd;
dd = DLG_DATA_SET(d, PlaceDlgData);
if (!dd)
return;
dd->with_leader = Conf.focus.transientsfollowleader; dd->with_leader = Conf.focus.transientsfollowleader;
dd->switch_popup = Conf.focus.switchfortransientmap; dd->switch_popup = Conf.focus.switchfortransientmap;
@ -482,8 +474,8 @@ _DlgFillPlacement(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
const DialogDef DlgPlacement = { const DialogDef DlgPlacement = {
"CONFIGURE_PLACEMENT", "CONFIGURE_PLACEMENT",
N_("Placement"), N_("Placement"), N_("Window Placement Settings"),
N_("Window Placement Settings"), sizeof(PlaceDlgData),
SOUND_SETTINGS_PLACEMENT, SOUND_SETTINGS_PLACEMENT,
"pix/place.png", "pix/place.png",
N_("Enlightenment Window Placement\n" "Settings Dialog"), N_("Enlightenment Window Placement\n" "Settings Dialog"),
@ -514,14 +506,10 @@ _DlgApplyMisc(Dialog * d, int val __UNUSED__, void *data __UNUSED__)
} }
static void static void
_DlgFillMisc(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__) _DlgFillMisc(Dialog * d, DItem * table, void *data __UNUSED__)
{ {
MiscDlgData *dd = DLG_DATA_GET(d, MiscDlgData);
DItem *di; DItem *di;
MiscDlgData *dd;
dd = DLG_DATA_SET(d, MiscDlgData);
if (!dd)
return;
dd->dialog_headers = Conf.dialogs.headers; dd->dialog_headers = Conf.dialogs.headers;
dd->button_image = Conf.dialogs.button_image; dd->button_image = Conf.dialogs.button_image;
@ -577,8 +565,8 @@ _DlgFillMisc(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
const DialogDef DlgMisc = { const DialogDef DlgMisc = {
"CONFIGURE_MISCELLANEOUS", "CONFIGURE_MISCELLANEOUS",
N_("Miscellaneous"), N_("Miscellaneous"), N_("Miscellaneous Settings"),
N_("Miscellaneous Settings"), sizeof(MiscDlgData),
SOUND_SETTINGS_MISCELLANEOUS, SOUND_SETTINGS_MISCELLANEOUS,
"pix/miscellaneous.png", "pix/miscellaneous.png",
N_("Enlightenment Miscellaneous\n" "Settings Dialog"), N_("Enlightenment Miscellaneous\n" "Settings Dialog"),
@ -606,12 +594,8 @@ _DlgApplyComposite(Dialog * d, int val __UNUSED__, void *data __UNUSED__)
static void static void
_DlgFillComposite(Dialog * d, DItem * table, void *data __UNUSED__) _DlgFillComposite(Dialog * d, DItem * table, void *data __UNUSED__)
{ {
cfg_composite *dd = DLG_DATA_GET(d, cfg_composite);
DItem *di, *radio; DItem *di, *radio;
cfg_composite *dd;
dd = DLG_DATA_SET(d, cfg_composite);
if (!dd)
return;
/* Get current settings */ /* Get current settings */
ECompMgrConfigGet(dd); ECompMgrConfigGet(dd);
@ -710,8 +694,8 @@ _DlgFillComposite(Dialog * d, DItem * table, void *data __UNUSED__)
const DialogDef DlgComposite = { const DialogDef DlgComposite = {
"CONFIGURE_COMPOSITE", "CONFIGURE_COMPOSITE",
N_("Composite"), N_("Composite"), N_("Composite Settings"),
N_("Composite Settings"), sizeof(cfg_composite),
SOUND_SETTINGS_COMPOSITE, SOUND_SETTINGS_COMPOSITE,
"pix/pager.png", "pix/pager.png",
N_("Enlightenment Composite\n" "Settings Dialog"), N_("Enlightenment Composite\n" "Settings Dialog"),
@ -798,8 +782,8 @@ _DlgFillConfiguration(Dialog * d, DItem * table, void *data __UNUSED__)
static const DialogDef DlgConfiguration = { static const DialogDef DlgConfiguration = {
"CONFIGURE_ALL", "CONFIGURE_ALL",
NULL, NULL, N_("Enlightenment Settings"),
N_("Enlightenment Settings"), 0,
SOUND_SETTINGS_ALL, SOUND_SETTINGS_ALL,
NULL, NULL,
NULL, NULL,

View File

@ -648,16 +648,12 @@ _DlgApplySnap(Dialog * d, int val __UNUSED__, void *data __UNUSED__)
static void static void
_DlgFillSnap(Dialog * d, DItem * table, void *data) _DlgFillSnap(Dialog * d, DItem * table, void *data)
{ {
SnapDlgData *sd = DLG_DATA_GET(d, SnapDlgData);
DItem *di; DItem *di;
Snapshot *sn; Snapshot *sn;
SnapDlgData *sd;
char s[1024]; char s[1024];
const EWin *ewin = (EWin *) data; const EWin *ewin = (EWin *) data;
sd = DLG_DATA_SET(d, SnapDlgData);
if (!sd)
return;
sd->client = EwinGetClientXwin(ewin); sd->client = EwinGetClientXwin(ewin);
sn = ewin->snap; sn = ewin->snap;
@ -910,8 +906,8 @@ _DlgFillSnap(Dialog * d, DItem * table, void *data)
static const DialogDef DlgSnap = { static const DialogDef DlgSnap = {
NULL, NULL,
NULL, NULL, N_("Remembered Application Attributes"),
N_("Remembered Application Attributes"), sizeof(SnapDlgData),
SOUND_NONE, SOUND_NONE,
"pix/snapshots.png", "pix/snapshots.png",
N_("Select the attributes of this\n" N_("Select the attributes of this\n"
@ -1059,8 +1055,8 @@ _DlgFillRemember(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
const DialogDef DlgRemember = { const DialogDef DlgRemember = {
"CONFIGURE_PAGER", "CONFIGURE_PAGER",
N_("Remember"), N_("Remember"), N_("Remembered Windows Settings"),
N_("Remembered Windows Settings"), 0,
SOUND_SETTINGS_PAGER, SOUND_SETTINGS_PAGER,
"pix/snapshots.png", "pix/snapshots.png",
N_("Enlightenment Remembered\n" "Windows Settings Dialog"), N_("Enlightenment Remembered\n" "Windows Settings Dialog"),

View File

@ -466,8 +466,8 @@ _DlgFillSound(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
const DialogDef DlgSound = { const DialogDef DlgSound = {
"CONFIGURE_AUDIO", "CONFIGURE_AUDIO",
N_("Sound"), N_("Sound"), N_("Audio Settings"),
N_("Audio Settings"), 0,
SOUND_SETTINGS_AUDIO, SOUND_SETTINGS_AUDIO,
"pix/sound.png", "pix/sound.png",
N_("Enlightenment Audio\n" "Settings Dialog"), N_("Enlightenment Audio\n" "Settings Dialog"),

View File

@ -407,8 +407,8 @@ _DlgThemeFill(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
const DialogDef DlgTheme = { const DialogDef DlgTheme = {
"CONFIGURE_AUDIO", "CONFIGURE_AUDIO",
N_("Theme"), N_("Theme"), N_("Theme Settings"),
N_("Theme Settings"), 0,
SOUND_SETTINGS_MISCELLANEOUS, SOUND_SETTINGS_MISCELLANEOUS,
"pix/miscellaneous.png", "pix/miscellaneous.png",
N_("Enlightenment Theme\n" "Settings Dialog"), N_("Enlightenment Theme\n" "Settings Dialog"),

View File

@ -866,8 +866,8 @@ _DlgFillTooltips(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
const DialogDef DlgTooltips = { const DialogDef DlgTooltips = {
"CONFIGURE_TOOLTIPS", "CONFIGURE_TOOLTIPS",
N_("Tooltips"), N_("Tooltips"), N_("Tooltip Settings"),
N_("Tooltip Settings"), 0,
SOUND_SETTINGS_TOOLTIPS, SOUND_SETTINGS_TOOLTIPS,
"pix/tips.png", "pix/tips.png",
N_("Enlightenment Tooltip\n" "Settings Dialog"), N_("Enlightenment Tooltip\n" "Settings Dialog"),