Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: actions.c backgrounds.c desktops.c dialog.c dialog.h focus.c fx.c groups.c iconify.c menus.c mod-trans.c pager.c session.c settings.c snaps.c sound.c tooltips.c Log Message: Some more dialog creation refactoring bits. =================================================================== RCS file: /cvs/e/e16/e/src/actions.c,v retrieving revision 1.203 retrieving revision 1.204 diff -u -3 -r1.203 -r1.204 --- actions.c 27 Jul 2006 00:23:13 -0000 1.203 +++ actions.c 27 Jul 2006 04:52:49 -0000 1.204 @@ -317,11 +317,13 @@ } static const DialogDef DlgAbout = { + _DlgFillAbout, "ABOUT_ENLIGHTENMENT", NULL, NULL, NULL, - _DlgFillAbout + NULL, + NULL, }; void =================================================================== RCS file: /cvs/e/e16/e/src/backgrounds.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -3 -r1.80 -r1.81 --- backgrounds.c 25 Jul 2006 01:29:26 -0000 1.80 +++ backgrounds.c 27 Jul 2006 04:52:49 -0000 1.81 @@ -2025,11 +2025,6 @@ DialogItemTableSetOptions(table, 3, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/bg.png", - _("Enlightenment Desktop\n" - "Background Settings Dialog\n")); - di = DialogAddItem(table, DITEM_TEXT); DialogItemSetText(di, _("BG Colour\n")); @@ -2274,11 +2269,13 @@ } const DialogDef DlgBackground = { + _DlgFillBackground, "CONFIGURE_BG", N_("Background"), N_("Desktop Background Settings"), "SOUND_SETTINGS_BG", - _DlgFillBackground + "pix/bg.png", + N_("Enlightenment Desktop\n" "Background Settings Dialog\n"), }; /* =================================================================== RCS file: /cvs/e/e16/e/src/desktops.c,v retrieving revision 1.246 retrieving revision 1.247 diff -u -3 -r1.246 -r1.247 --- desktops.c 21 Jul 2006 03:17:17 -0000 1.246 +++ desktops.c 27 Jul 2006 04:52:50 -0000 1.247 @@ -2370,11 +2370,6 @@ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/desktops.png", - _("Enlightenment Multiple Desktop\n" - "Settings Dialog\n")); - di = DialogAddItem(table, DITEM_TEXT); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Number of virtual desktops:\n")); @@ -2471,11 +2466,13 @@ } const DialogDef DlgDesks = { + _DlgFillDesks, "CONFIGURE_DESKTOPS", N_("Desks"), N_("Multiple Desktop Settings"), "SOUND_SETTINGS_DESKTOPS", - _DlgFillDesks + "pix/desktops.png", + N_("Enlightenment Multiple Desktop\n" "Settings Dialog\n"), }; static int tmp_area_x; @@ -2587,10 +2584,6 @@ DialogItemTableSetOptions(table, 1, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/areas.png", - _("Enlightenment Virtual Desktop\n" "Settings Dialog\n")); - di = DialogAddItem(table, DITEM_TEXT); DialogItemSetText(di, _("Virtual Desktop size:\n")); @@ -2654,11 +2647,13 @@ } const DialogDef DlgAreas = { + _DlgFillAreas, "CONFIGURE_AREA", N_("Areas"), N_("Virtual Desktop Settings"), "SOUND_SETTINGS_AREA", - _DlgFillAreas + "pix/areas.png", + N_("Enlightenment Virtual Desktop\n" "Settings Dialog\n"), }; /* =================================================================== RCS file: /cvs/e/e16/e/src/dialog.c,v retrieving revision 1.162 retrieving revision 1.163 diff -u -3 -r1.162 -r1.163 --- dialog.c 24 Jul 2006 20:53:49 -0000 1.162 +++ dialog.c 27 Jul 2006 04:52:50 -0000 1.163 @@ -702,10 +702,16 @@ void DialogShowSimple(const DialogDef * dd, void *data) { + DialogShowSimpleWithName(dd, dd->name, data); +} + +void +DialogShowSimpleWithName(const DialogDef * dd, const char *name, void *data) +{ Dialog *d; DItem *table; - d = DialogFind(dd->name); + d = DialogFind(name); if (d) { SoundPlay("SOUND_SETTINGS_ACTIVE"); @@ -714,7 +720,7 @@ } SoundPlay(dd->sound); - d = DialogCreate(dd->name); + d = DialogCreate(name); if (!d) return; @@ -724,6 +730,13 @@ if (!table) return; + if (Conf.dialogs.headers && (dd->header_image || dd->header_text)) + DialogAddHeader(table, dd->header_image, _(dd->header_text)); + + table = DialogAddItem(d->item, DITEM_TABLE); + if (!table) + return; + dd->fill(d, table, data); DialogShow(d); @@ -880,14 +893,15 @@ } void -DialogAddHeader(Dialog * d, const char *img, const char *txt) +DialogAddHeader(DItem * parent, const char *img, const char *txt) { DItem *table, *di; /* FIXME - Center table horizontally */ - table = DialogAddItem(d->item, DITEM_TABLE); - DialogItemSetColSpan(table, d->item->item.table.num_columns); + table = DialogAddItem(parent, DITEM_TABLE); + DialogItemSetColSpan(table, 1); DialogItemTableSetOptions(table, 2, 0, 0, 0); + DialogItemSetAlign(table, 512, 0); di = DialogAddItem(table, DITEM_IMAGE); DialogItemImageSetFile(di, img); @@ -895,8 +909,7 @@ di = DialogAddItem(table, DITEM_TEXT); DialogItemSetText(di, txt); - di = DialogAddItem(d->item, DITEM_SEPARATOR); - DialogItemSetColSpan(di, d->item->item.table.num_columns); + di = DialogAddItem(parent, DITEM_SEPARATOR); } void =================================================================== RCS file: /cvs/e/e16/e/src/dialog.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- dialog.h 24 Jul 2006 20:53:49 -0000 1.11 +++ dialog.h 27 Jul 2006 04:52:50 -0000 1.12 @@ -55,11 +55,13 @@ typedef struct { + void (*fill) (Dialog * d, DItem * table, void *data); const char *name; const char *label; const char *title; const char *sound; - void (*fill) (Dialog * d, DItem * table, void *data); + const char *header_image; + const char *header_text; } DialogDef; /* dialog.c */ @@ -76,14 +78,17 @@ void DialogShow(Dialog * d); void DialogShowCentered(Dialog * d); -void DialogShowSimple(const DialogDef * dd, void *data); void DialogRedraw(Dialog * d); void DialogClose(Dialog * d); +void DialogShowSimple(const DialogDef * dd, void *data); +void DialogShowSimpleWithName(const DialogDef * dd, + const char *name, void *data); + void DialogAddButton(Dialog * d, const char *text, DialogCallbackFunc * func, char doclose, int image); -void DialogAddHeader(Dialog * d, const char *img, +void DialogAddHeader(DItem * parent, const char *img, const char *txt); void DialogAddFooter(Dialog * d, int flags, DialogCallbackFunc * cb); =================================================================== RCS file: /cvs/e/e16/e/src/focus.c,v retrieving revision 1.152 retrieving revision 1.153 diff -u -3 -r1.152 -r1.153 --- focus.c 21 Jul 2006 03:17:17 -0000 1.152 +++ focus.c 27 Jul 2006 04:52:50 -0000 1.153 @@ -703,10 +703,6 @@ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/focus.png", - _("Enlightenment Focus\n" "Settings Dialog\n")); - radio = di = DialogAddItem(table, DITEM_RADIOBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Focus follows pointer")); @@ -841,11 +837,13 @@ } const DialogDef DlgFocus = { + _DlgFillFocus, "CONFIGURE_FOCUS", N_("Focus"), N_("Focus Settings"), "SOUND_SETTINGS_FOCUS", - _DlgFillFocus + "pix/focus.png", + N_("Enlightenment Focus\n" "Settings Dialog\n"), }; /* =================================================================== RCS file: /cvs/e/e16/e/src/fx.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -3 -r1.71 -r1.72 --- fx.c 24 Jul 2006 21:10:58 -0000 1.71 +++ fx.c 27 Jul 2006 04:52:50 -0000 1.72 @@ -982,10 +982,6 @@ DialogItemTableSetOptions(table, 1, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/fx.png", - _("Enlightenment Special Effects\n" "Settings Dialog\n")); - /* Effects */ di = DialogAddItem(table, DITEM_TEXT); DialogItemSetText(di, _("Effects")); @@ -1006,11 +1002,13 @@ } const DialogDef DlgFx = { + _DlgFillFx, "CONFIGURE_FX", N_("FX"), N_("Special FX Settings"), "SOUND_SETTINGS_FX", - _DlgFillFx + "pix/fx.png", + N_("Enlightenment Special Effects\n" "Settings Dialog\n"), }; static void =================================================================== RCS file: /cvs/e/e16/e/src/groups.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -3 -r1.83 -r1.84 --- groups.c 24 Jul 2006 21:10:58 -0000 1.83 +++ groups.c 27 Jul 2006 04:52:50 -0000 1.84 @@ -594,6 +594,7 @@ static int tmp_index; static EWin *tmp_ewin; static Group **tmp_groups; +static int tmp_group_num; static int tmp_action; static void @@ -639,14 +640,61 @@ } static void -ChooseGroupDialog(EWin * ewin, const char *message, char group_select, - int action) +_DlgFillGroupChoose(Dialog * d, DItem * table, void *data) { - - Dialog *d; - DItem *table, *di, *radio; + DItem *di, *radio; int i, num_groups; char **group_member_strings; + const char *message = data; + + DialogItemTableSetOptions(table, 2, 0, 0, 0); + + di = DialogAddItem(table, DITEM_TEXT); + DialogItemSetColSpan(di, 2); + DialogItemSetAlign(di, 0, 512); + DialogItemSetText(di, message); + + num_groups = tmp_group_num; + group_member_strings = GetWinGroupMemberNames(tmp_groups, num_groups); + + radio = di = DialogAddItem(table, DITEM_RADIOBUTTON); + DialogItemSetColSpan(di, 2); + DialogItemSetCallback(di, GroupCallback, 0, (void *)d); + DialogItemSetText(di, group_member_strings[0]); + DialogItemRadioButtonSetFirst(di, radio); + DialogItemRadioButtonGroupSetVal(di, 0); + + for (i = 1; i < num_groups; i++) + { + di = DialogAddItem(table, DITEM_RADIOBUTTON); + DialogItemSetColSpan(di, 2); + DialogItemSetCallback(di, GroupCallback, i, NULL); + DialogItemSetText(di, group_member_strings[i]); + DialogItemRadioButtonSetFirst(di, radio); + DialogItemRadioButtonGroupSetVal(di, i); + } + DialogItemRadioButtonGroupSetValPtr(radio, &tmp_group_index); + + StrlistFree(group_member_strings, num_groups); + + DialogAddFooter(d, DLG_OC, ChooseGroup); +} + +static const DialogDef DlgGroupChoose = { + _DlgFillGroupChoose, + "GROUP_SELECTION", + NULL, + N_("Window Group Selection"), + "SOUND_SETTINGS_GROUP", + "pix/group.png", + N_("Enlightenment Window Group\n" "Selection Dialog\n"), +}; + +static void +ChooseGroupDialog(EWin * ewin, const char *message, char group_select, + int action) +{ + int num_groups; if (!ewin) return; @@ -655,6 +703,7 @@ tmp_group_index = tmp_index = 0; tmp_action = action; tmp_groups = ListWinGroups(ewin, group_select, &num_groups); + tmp_group_num = num_groups; if ((num_groups == 0) && (action == GROUP_OP_BREAK || action == GROUP_OP_DEL)) @@ -684,54 +733,7 @@ ShowHideWinGroups(ewin, 0, SET_ON); - d = DialogFind("GROUP_SELECTION"); - if (d) - { - SoundPlay("GROUP_SETTINGS_ACTIVE"); - DialogShow(d); - } - SoundPlay("SOUND_SETTINGS_GROUP"); - - d = DialogCreate("GROUP_SELECTION"); - DialogSetTitle(d, _("Window Group Selection")); - - table = DialogInitItem(d); - DialogItemTableSetOptions(table, 2, 0, 0, 0); - - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/group.png", - _("Enlightenment Window Group\n" "Selection Dialog\n")); - - di = DialogAddItem(table, DITEM_TEXT); - DialogItemSetColSpan(di, 2); - DialogItemSetAlign(di, 0, 512); - DialogItemSetText(di, message); - - group_member_strings = GetWinGroupMemberNames(tmp_groups, num_groups); - - radio = di = DialogAddItem(table, DITEM_RADIOBUTTON); - DialogItemSetColSpan(di, 2); - DialogItemSetCallback(di, GroupCallback, 0, (void *)d); - DialogItemSetText(di, group_member_strings[0]); - DialogItemRadioButtonSetFirst(di, radio); - DialogItemRadioButtonGroupSetVal(di, 0); - - for (i = 1; i < num_groups; i++) - { - di = DialogAddItem(table, DITEM_RADIOBUTTON); - DialogItemSetColSpan(di, 2); - DialogItemSetCallback(di, GroupCallback, i, NULL); - DialogItemSetText(di, group_member_strings[i]); - DialogItemRadioButtonSetFirst(di, radio); - DialogItemRadioButtonGroupSetVal(di, i); - } - DialogItemRadioButtonGroupSetValPtr(radio, &tmp_group_index); - - StrlistFree(group_member_strings, num_groups); - - DialogAddFooter(d, DLG_OC, ChooseGroup); - - DialogShow(d); + DialogShowSimple(&DlgGroupChoose, (void *)message); } typedef struct @@ -813,10 +815,6 @@ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/group.png", - _("Enlightenment Window Group\n" "Settings Dialog\n")); - di = DialogAddItem(table, DITEM_TEXT); DialogItemSetColSpan(di, 2); DialogItemSetAlign(di, 0, 512); @@ -898,11 +896,13 @@ } static const DialogDef DlgGroups = { + _DlgFillGroups, "CONFIGURE_GROUP", NULL, N_("Window Group Settings"), "SOUND_SETTINGS_GROUP", - _DlgFillGroups + "pix/group.png", + N_("Enlightenment Window Group\n" "Settings Dialog\n"), }; static void @@ -946,11 +946,6 @@ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/group.png", - _("Enlightenment Default\n" - "Group Control Settings Dialog\n")); - di = DialogAddItem(table, DITEM_TEXT); DialogItemSetColSpan(di, 2); DialogItemSetAlign(di, 0, 512); @@ -1016,11 +1011,13 @@ } const DialogDef DlgGroupDefaults = { + _DlgFillGroupDefaults, "CONFIGURE_DEFAULT_GROUP_CONTROL", N_("Groups"), N_("Default Group Control Settings"), "SOUND_SETTINGS_GROUP", - _DlgFillGroupDefaults + "pix/group.png", + N_("Enlightenment Default\n" "Group Control Settings Dialog\n"), }; /* =================================================================== RCS file: /cvs/e/e16/e/src/iconify.c,v retrieving revision 1.214 retrieving revision 1.215 diff -u -3 -r1.214 -r1.215 --- iconify.c 25 Jul 2006 01:27:24 -0000 1.214 +++ iconify.c 27 Jul 2006 04:52:50 -0000 1.215 @@ -2169,10 +2169,6 @@ DialogItemTableSetOptions(table, 1, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/iconbox.png", - _("Enlightenment Iconbox\n" "Settings Dialog\n")); - di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetText(di, _("Transparent background")); DialogItemCheckButtonSetPtr(di, &tmp_ib_nobg); @@ -2339,11 +2335,13 @@ } static const DialogDef DlgIconbox = { + _DlgFillIconbox, "CONFIGURE_ICONBOX", NULL, NULL, "SOUND_SETTINGS_ICONBOX", - _DlgFillIconbox + "pix/iconbox.png", + N_("Enlightenment Iconbox\n" "Settings Dialog\n"), }; /* =================================================================== RCS file: /cvs/e/e16/e/src/menus.c,v retrieving revision 1.252 retrieving revision 1.253 diff -u -3 -r1.252 -r1.253 --- menus.c 24 Jul 2006 21:10:58 -0000 1.252 +++ menus.c 27 Jul 2006 04:52:50 -0000 1.253 @@ -2043,10 +2043,6 @@ DialogItemTableSetOptions(table, 3, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/place.png", - _("Enlightenment Menu\n" "Settings Dialog\n")); - di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetColSpan(di, 3); DialogItemSetText(di, _("Animated display of menus")); @@ -2066,11 +2062,13 @@ } const DialogDef DlgMenus = { + _DlgFillMenus, "CONFIGURE_MENUS", N_("Menus"), N_("Menu Settings"), "SOUND_SETTINGS_MENUS", - _DlgFillMenus + "pix/place.png", + N_("Enlightenment Menu\n" "Settings Dialog\n"), }; static void =================================================================== RCS file: /cvs/e/e16/e/src/mod-trans.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- mod-trans.c 21 Jul 2006 03:17:18 -0000 1.20 +++ mod-trans.c 27 Jul 2006 04:52:50 -0000 1.21 @@ -125,11 +125,6 @@ DialogItemTableSetOptions(table, 7, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/tips.png", - _("Enlightenment Selective Transparency\n" - "Settings Dialog\n")); - di = DialogAddItem(table, DITEM_TEXT); DialogItemSetColSpan(di, 7); DialogItemSetAlign(di, 0, 512); @@ -271,11 +266,13 @@ } const DialogDef DlgThemeTrans = { + _DlgFillThemeTrans, "CONFIGURE_TRANS", N_("Transparency"), N_("Selective Transparency Settings"), "SOUND_SETTINGS_TRANS", - _DlgFillThemeTrans + "pix/tips.png", + N_("Enlightenment Selective Transparency\n" "Settings Dialog\n"), }; static void =================================================================== RCS file: /cvs/e/e16/e/src/pager.c,v retrieving revision 1.219 retrieving revision 1.220 diff -u -3 -r1.219 -r1.220 --- pager.c 21 Jul 2006 03:17:18 -0000 1.219 +++ pager.c 27 Jul 2006 04:52:50 -0000 1.220 @@ -1747,11 +1747,6 @@ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/pager.png", - _("Enlightenment Desktop & Area\n" - "Pager Settings Dialog\n")); - di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Enable pager display")); @@ -1878,11 +1873,13 @@ } const DialogDef DlgPagers = { + _DlgFillPagers, "CONFIGURE_PAGER", N_("Pagers"), N_("Pager Settings"), "SOUND_SETTINGS_PAGER", - _DlgFillPagers + "pix/pager.png", + N_("Enlightenment Desktop & Area\n" "Pager Settings Dialog\n"), }; /* =================================================================== RCS file: /cvs/e/e16/e/src/session.c,v retrieving revision 1.131 retrieving revision 1.132 diff -u -3 -r1.131 -r1.132 --- session.c 24 Jul 2006 21:10:59 -0000 1.131 +++ session.c 27 Jul 2006 04:52:50 -0000 1.132 @@ -783,10 +783,6 @@ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/miscellaneous.png", - _("Enlightenment Session\n" "Settings Dialog\n")); - di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Enable Session Script")); @@ -806,9 +802,11 @@ } const DialogDef DlgSession = { + _DlgFillSession, "CONFIGURE_SESSION", N_("Session"), N_("Session Settings"), "SOUND_SETTINGS_SESSION", - _DlgFillSession + "pix/miscellaneous.png", + N_("Enlightenment Session\n" "Settings Dialog\n"), }; =================================================================== RCS file: /cvs/e/e16/e/src/settings.c,v retrieving revision 1.153 retrieving revision 1.154 diff -u -3 -r1.153 -r1.154 --- settings.c 21 Jul 2006 03:17:18 -0000 1.153 +++ settings.c 27 Jul 2006 04:52:50 -0000 1.154 @@ -55,11 +55,6 @@ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/moveres.png", - _("Enlightenment Move & Resize\n" - "Method Settings Dialog\n")); - di = DialogAddItem(table, DITEM_TEXT); DialogItemSetFill(di, 0, 0); DialogItemSetAlign(di, 0, 512); @@ -169,11 +164,13 @@ } const DialogDef DlgMoveResize = { + _DlgFillMoveResize, "CONFIGURE_MOVERESIZE", N_("Move/Resize"), N_("Move & Resize Settings"), "SOUND_SETTINGS_MOVERESIZE", - _DlgFillMoveResize + "pix/moveres.png", + N_("Enlightenment Move & Resize\n" "Method Settings Dialog\n"), }; static char tmp_with_leader; @@ -253,11 +250,6 @@ DialogItemTableSetOptions(table, 2, 0, 1, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/place.png", - _("Enlightenment Window Placement\n" - "Settings Dialog\n")); - di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Dialog windows appear together with their owner")); @@ -391,11 +383,13 @@ } const DialogDef DlgPlacement = { + _DlgFillPlacement, "CONFIGURE_PLACEMENT", N_("Placement"), N_("Window Placement Settings"), "SOUND_SETTINGS_PLACEMENT", - _DlgFillPlacement + "pix/place.png", + N_("Enlightenment Window Placement\n" "Settings Dialog\n"), }; static char tmp_autoraise; @@ -422,11 +416,6 @@ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/raise.png", - _("Enlightenment Automatic Raising\n" - "of Windows Settings Dialog\n")); - di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Raise Windows Automatically")); @@ -447,11 +436,13 @@ } const DialogDef DlgAutoraise = { + _DlgFillAutoraise, "CONFIGURE_AUTORAISE", N_("Autoraise"), N_("Autoraise Settings"), "SOUND_SETTINGS_AUTORAISE", - _DlgFillAutoraise + "pix/raise.png", + N_("Enlightenment Automatic Raising\n" "of Windows Settings Dialog\n"), }; static char tmp_dialog_headers; @@ -484,10 +475,6 @@ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/miscellaneous.png", - _("Enlightenment Miscellaneous\n" "Settings Dialog\n")); - di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Enable Dialog Headers")); @@ -518,11 +505,13 @@ } const DialogDef DlgMisc = { + _DlgFillMisc, "CONFIGURE_MISCELLANEOUS", N_("Miscellaneous"), N_("Miscellaneous Settings"), "SOUND_SETTINGS_MISCELLANEOUS", - _DlgFillMisc + "pix/miscellaneous.png", + N_("Enlightenment Miscellaneous\n" "Settings Dialog\n"), }; #if USE_COMPOSITE @@ -561,10 +550,6 @@ /* Layout */ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/pager.png", - _("Enlightenment Composite\n" "Settings Dialog\n")); - di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Enable Composite")); @@ -621,11 +606,13 @@ } const DialogDef DlgComposite = { + _DlgFillComposite, "CONFIGURE_COMPOSITE", N_("Composite"), N_("Composite Settings"), "SOUND_SETTINGS_COMPOSITE", - _DlgFillComposite + "pix/pager.png", + N_("Enlightenment Composite\n" "Settings Dialog\n"), }; void =================================================================== RCS file: /cvs/e/e16/e/src/snaps.c,v retrieving revision 1.120 retrieving revision 1.121 diff -u -3 -r1.120 -r1.121 --- snaps.c 24 Jul 2006 21:10:59 -0000 1.120 +++ snaps.c 27 Jul 2006 04:52:50 -0000 1.121 @@ -669,32 +669,13 @@ } static void -SnapshotEwinDialog(const EWin * ewin) +_DlgFillSnap(Dialog * d, DItem * table, void *data) { - Dialog *d; - DItem *table, *di; + DItem *di; Snapshot *sn; SnapDlgData *sd; char s[1024]; - - Esnprintf(s, sizeof(s), "SNAPSHOT_WINDOW-%#lx", _EwinGetClientXwin(ewin)); - - d = DialogFind(s); - if (d) - { - DialogShow(d); - return; - } - d = DialogCreate(s); - DialogSetTitle(d, _("Remembered Application Attributes")); - - table = DialogInitItem(d); - DialogItemTableSetOptions(table, 4, 0, 0, 0); - - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/snapshots.png", - _("Select the attributes of this\n" - "window you wish to Remember\n" "from now on\n")); + const EWin *ewin = data; sd = Ecalloc(1, sizeof(SnapDlgData)); DialogSetData(d, sd); @@ -753,6 +734,9 @@ } } + table = DialogAddItem(table, DITEM_TABLE); + DialogItemTableSetOptions(table, 4, 0, 0, 0); + di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetAlign(di, 0, 512); DialogItemSetText(di, _("Title:")); @@ -946,8 +930,27 @@ } DialogAddFooter(d, DLG_OAC, CB_ApplySnap); +} - DialogShow(d); +const DialogDef DlgSnap = { + _DlgFillSnap, + NULL, + NULL, + N_("Remembered Application Attributes"), + NULL, + "pix/snapshots.png", + N_("Select the attributes of this\n" + "window you wish to Remember\n" "from now on\n"), +}; + +static void +SnapshotEwinDialog(const EWin * ewin) +{ + char s[1024]; + + Esnprintf(s, sizeof(s), "SNAPSHOT_WINDOW-%#lx", _EwinGetClientXwin(ewin)); + + DialogShowSimpleWithName(&DlgSnap, s, (void *)ewin); } /* list of remembered items for the remember dialog -- it's either @@ -1016,11 +1019,6 @@ DialogItemTableSetOptions(table, 3, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/snapshots.png", - _("Enlightenment Remembered\n" - "Windows Settings Dialog\n")); - num = ecore_list_nodes(ss_list); rd_ewin_list = Emalloc(sizeof(RememberWinList) * (num + 1)); @@ -1085,11 +1083,13 @@ } const DialogDef DlgRemember = { + _DlgFillRemember, "CONFIGURE_PAGER", NULL, N_("Remembered Windows Settings"), "SOUND_SETTINGS_PAGER", - _DlgFillRemember + "pix/snapshots.png", + N_("Enlightenment Remembered\n" "Windows Settings Dialog\n"), }; /* ... combine writes, only save after a timeout */ =================================================================== RCS file: /cvs/e/e16/e/src/sound.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -3 -r1.45 -r1.46 --- sound.c 21 Jul 2006 03:17:18 -0000 1.45 +++ sound.c 27 Jul 2006 04:52:50 -0000 1.46 @@ -447,10 +447,6 @@ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/sound.png", - _("Enlightenment Audio\n" "Settings Dialog\n")); - #ifdef HAVE_LIBESD di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetColSpan(di, 2); @@ -468,11 +464,13 @@ } const DialogDef DlgSound = { + _DlgFillSound, "CONFIGURE_AUDIO", N_("Sound"), N_("Audio Settings"), "SOUND_SETTINGS_AUDIO", - _DlgFillSound + "pix/sound.png", + N_("Enlightenment Audio\n" "Settings Dialog\n"), }; /* =================================================================== RCS file: /cvs/e/e16/e/src/tooltips.c,v retrieving revision 1.105 retrieving revision 1.106 diff -u -3 -r1.105 -r1.106 --- tooltips.c 21 Jul 2006 03:17:18 -0000 1.105 +++ tooltips.c 27 Jul 2006 04:52:50 -0000 1.106 @@ -849,10 +849,6 @@ DialogItemTableSetOptions(table, 2, 0, 0, 0); - if (Conf.dialogs.headers) - DialogAddHeader(d, "pix/tips.png", - _("Enlightenment Tooltip\n" "Settings Dialog\n")); - di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Display Tooltips")); @@ -877,11 +873,13 @@ } const DialogDef DlgTooltips = { + _DlgFillTooltips, "CONFIGURE_TOOLTIPS", N_("Tooltips"), N_("Tooltip Settings"), "SOUND_SETTINGS_TOOLTIPS", - _DlgFillTooltips + "pix/tips.png", + N_("Enlightenment Tooltip\n" "Settings Dialog\n"), }; static void ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs