From bb912def1a5a38b4822d91dd7a033532dc3a1255 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 6 Apr 2001 21:48:11 +0000 Subject: [PATCH] * gtkedit/editcmd.c: Remove support for XView layout attributes. * gtkedit/editoptions.c: Likewise. * pc/chmod.c: Likewise. * pc/drive.c: Likewise. * src/boxes.c: Likewise. * src/chmod.c: Likewise. * src/dlg.c: Likewise. * src/dlg.h: Likewise. * src/filegui.c: Likewise. * src/find.c: Likewise. * src/hotlist.c: Likewise. * src/layout.c: Likewise. * src/listmode.c: Likewise. * src/main.c: Likewise. * src/option.c: Likewise. * src/panelize.c: Likewise. * src/wtools.c: Likewise. * src/wtools.h: Likewise. * vfs/smbfs.c: Likewise. --- ChangeLog | 20 ++++++++ gtkedit/editcmd.c | 88 +++++++++++++++++----------------- gtkedit/editoptions.c | 32 ++++++------- pc/chmod.c | 2 +- pc/drive.c | 10 ++-- src/boxes.c | 102 +++++++++++++++++++-------------------- src/chmod.c | 2 +- src/dlg.c | 8 +--- src/dlg.h | 36 -------------- src/filegui.c | 109 ++++++++++++++++++------------------------ src/find.c | 56 +++++++++++----------- src/hotlist.c | 34 +++++++------ src/layout.c | 25 +++++----- src/listmode.c | 5 +- src/main.c | 4 +- src/option.c | 26 +++++----- src/panelize.c | 9 ++-- src/wtools.c | 14 +++--- src/wtools.h | 1 - vfs/smbfs.c | 20 ++++---- 20 files changed, 276 insertions(+), 327 deletions(-) diff --git a/ChangeLog b/ChangeLog index 486eb8535..34451f63d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,25 @@ 2001-04-06 Pavel Roskin + * gtkedit/editcmd.c: Remove support for XView layout attributes. + * gtkedit/editoptions.c: Likewise. + * pc/chmod.c: Likewise. + * pc/drive.c: Likewise. + * src/boxes.c: Likewise. + * src/chmod.c: Likewise. + * src/dlg.c: Likewise. + * src/dlg.h: Likewise. + * src/filegui.c: Likewise. + * src/find.c: Likewise. + * src/hotlist.c: Likewise. + * src/layout.c: Likewise. + * src/listmode.c: Likewise. + * src/main.c: Likewise. + * src/option.c: Likewise. + * src/panelize.c: Likewise. + * src/wtools.c: Likewise. + * src/wtools.h: Likewise. + * vfs/smbfs.c: Likewise. + * autogen.sh: Check out "intl" and "macros" directories if they are missing. Simply "cvs up -d" won't restore them. diff --git a/gtkedit/editcmd.c b/gtkedit/editcmd.c index 38575b352..4869a4b16 100644 --- a/gtkedit/editcmd.c +++ b/gtkedit/editcmd.c @@ -389,15 +389,15 @@ void menu_save_mode_cmd (void) static QuickWidget widgets[] = { {quick_button, 18, DLG_X, 7, DLG_Y, N_("&Cancel"), 0, - B_CANCEL, 0, 0, XV_WLAY_DONTCARE, "c"}, + B_CANCEL, 0, 0, "c"}, {quick_button, 6, DLG_X, 7, DLG_Y, N_("&Ok"), 0, - B_ENTER, 0, 0, XV_WLAY_DONTCARE, "o"}, + B_ENTER, 0, 0, "o"}, {quick_input, 23, DLG_X, 5, DLG_Y, 0, 9, - 0, 0, &str_result, XV_WLAY_DONTCARE, "i"}, + 0, 0, &str_result, "i"}, {quick_label, 22, DLG_X, 4, DLG_Y, N_("Extension:"), 0, - 0, 0, 0, XV_WLAY_DONTCARE, "savemext"}, + 0, 0, 0, "savemext"}, {quick_radio, 4, DLG_X, 3, DLG_Y, "", 3, - 0, &save_mode_new, str, XV_WLAY_DONTCARE, "t"}, + 0, &save_mode_new, str, "t"}, {0}}; static QuickDialog dialog = {DLG_X, DLG_Y, -1, -1, N_(" Edit Save Mode "), "[Edit Save Mode]", @@ -1189,17 +1189,17 @@ int edit_replace_prompt (WEdit * edit, char *replace_text, int xpos, int ypos) QuickWidget quick_widgets[] = { {quick_button, 63, CONFIRM_DLG_WIDTH, 3, CONFIRM_DLG_HEIGTH, N_ ("&Cancel"), - 0, B_CANCEL, 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, B_CANCEL, 0, 0, NULL}, {quick_button, 50, CONFIRM_DLG_WIDTH, 3, CONFIRM_DLG_HEIGTH, N_ ("o&Ne"), - 0, B_REPLACE_ONE, 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, B_REPLACE_ONE, 0, 0, NULL}, {quick_button, 37, CONFIRM_DLG_WIDTH, 3, CONFIRM_DLG_HEIGTH, N_ ("al&L"), - 0, B_REPLACE_ALL, 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, B_REPLACE_ALL, 0, 0, NULL}, {quick_button, 21, CONFIRM_DLG_WIDTH, 3, CONFIRM_DLG_HEIGTH, N_ ("&Skip"), - 0, B_SKIP_REPLACE, 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, B_SKIP_REPLACE, 0, 0, NULL}, {quick_button, 4, CONFIRM_DLG_WIDTH, 3, CONFIRM_DLG_HEIGTH, N_ ("&Replace"), - 0, B_ENTER, 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, B_ENTER, 0, 0, NULL}, {quick_label, 2, CONFIRM_DLG_WIDTH, 2, CONFIRM_DLG_HEIGTH, 0, - 0, 0, 0, 0, XV_WLAY_DONTCARE, 0}, + 0, 0, 0, 0, 0}, {0}}; quick_widgets[5].text = catstrs (_ (" Replace with: "), replace_text, 0); @@ -1239,35 +1239,35 @@ void edit_replace_dialog (WEdit * edit, char **search_text, char **replace_text, QuickWidget quick_widgets[] = { {quick_button, 6, 10, 12, REPLACE_DLG_HEIGHT, N_("&Cancel"), 0, B_CANCEL, 0, - 0, XV_WLAY_DONTCARE, NULL}, + 0, NULL}, {quick_button, 2, 10, 12, REPLACE_DLG_HEIGHT, N_("&Ok"), 0, B_ENTER, 0, - 0, XV_WLAY_DONTCARE, NULL}, + 0, NULL}, {quick_checkbox, 33, REPLACE_DLG_WIDTH, 11, REPLACE_DLG_HEIGHT, N_("scanf &Expression"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {quick_checkbox, 33, REPLACE_DLG_WIDTH, 10, REPLACE_DLG_HEIGHT, N_("replace &All"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {quick_checkbox, 33, REPLACE_DLG_WIDTH, 9, REPLACE_DLG_HEIGHT, N_("pr&Ompt on replace"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {quick_checkbox, 4, REPLACE_DLG_WIDTH, 11, REPLACE_DLG_HEIGHT, N_("&Backwards"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {quick_checkbox, 4, REPLACE_DLG_WIDTH, 10, REPLACE_DLG_HEIGHT, N_("&Regular expression"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {quick_checkbox, 4, REPLACE_DLG_WIDTH, 9, REPLACE_DLG_HEIGHT, N_("&Whole words only"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {quick_checkbox, 4, REPLACE_DLG_WIDTH, 8, REPLACE_DLG_HEIGHT, N_("case &Sensitive"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {quick_input, 3, REPLACE_DLG_WIDTH, 7, REPLACE_DLG_HEIGHT, "", 52, 0, 0, - 0, XV_WLAY_BELOWCLOSE, "edit-argord"}, + 0, "edit-argord"}, {quick_label, 2, REPLACE_DLG_WIDTH, 6, REPLACE_DLG_HEIGHT, N_(" Enter replacement argument order eg. 3,2,1,4 "), 0, 0, - 0, 0, XV_WLAY_DONTCARE, 0}, + 0, 0, 0}, {quick_input, 3, REPLACE_DLG_WIDTH, 5, REPLACE_DLG_HEIGHT, "", 52, 0, 0, - 0, XV_WLAY_BELOWCLOSE, "edit-replace"}, + 0, "edit-replace"}, {quick_label, 2, REPLACE_DLG_WIDTH, 4, REPLACE_DLG_HEIGHT, N_(" Enter replacement string:"), 0, 0, 0, - 0, XV_WLAY_DONTCARE, 0}, + 0, 0}, {quick_input, 3, REPLACE_DLG_WIDTH, 3, REPLACE_DLG_HEIGHT, "", 52, 0, 0, - 0, XV_WLAY_BELOWCLOSE, "edit-search"}, + 0, "edit-search"}, {quick_label, 2, REPLACE_DLG_WIDTH, 2, REPLACE_DLG_HEIGHT, N_(" Enter search string:"), 0, 0, 0, - 0, XV_WLAY_DONTCARE, 0}, + 0, 0}, {0}}; quick_widgets[2].result = &treplace_scanf; @@ -1324,23 +1324,23 @@ void edit_search_dialog (WEdit * edit, char **search_text) QuickWidget quick_widgets[] = { {quick_button, 6, 10, 7, SEARCH_DLG_HEIGHT, N_("&Cancel"), 0, B_CANCEL, 0, - 0, XV_WLAY_DONTCARE, NULL}, + 0, NULL}, {quick_button, 2, 10, 7, SEARCH_DLG_HEIGHT, N_("&Ok"), 0, B_ENTER, 0, - 0, XV_WLAY_DONTCARE, NULL}, + 0, NULL}, {quick_checkbox, 33, SEARCH_DLG_WIDTH, 6, SEARCH_DLG_HEIGHT, N_("scanf &Expression"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL }, + 0, 0, NULL }, {quick_checkbox, 33, SEARCH_DLG_WIDTH, 5, SEARCH_DLG_HEIGHT, N_("&Backwards"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {quick_checkbox, 4, SEARCH_DLG_WIDTH, 6, SEARCH_DLG_HEIGHT, N_("&Regular expression"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {quick_checkbox, 4, SEARCH_DLG_WIDTH, 5, SEARCH_DLG_HEIGHT, N_("&Whole words only"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {quick_checkbox, 4, SEARCH_DLG_WIDTH, 4, SEARCH_DLG_HEIGHT, N_("case &Sensitive"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {quick_input, 3, SEARCH_DLG_WIDTH, 3, SEARCH_DLG_HEIGHT, "", 52, 0, 0, - 0, XV_WLAY_BELOWCLOSE, "edit-search"}, + 0, "edit-search"}, {quick_label, 2, SEARCH_DLG_WIDTH, 2, SEARCH_DLG_HEIGHT, N_(" Enter search string:"), 0, 0, 0, - 0, XV_WLAY_DONTCARE, 0}, + 0, 0}, {0}}; quick_widgets[2].result = &treplace_scanf; @@ -3019,23 +3019,23 @@ void edit_mail_dialog (WEdit * edit) QuickWidget quick_widgets[] = { {quick_button, 6, 10, 9, MAIL_DLG_HEIGHT, N_("&Cancel"), 0, B_CANCEL, 0, - 0, XV_WLAY_DONTCARE, NULL}, + 0, NULL}, {quick_button, 2, 10, 9, MAIL_DLG_HEIGHT, N_("&Ok"), 0, B_ENTER, 0, - 0, XV_WLAY_DONTCARE, NULL}, + 0, NULL}, {quick_input, 3, 50, 8, MAIL_DLG_HEIGHT, "", 44, 0, 0, - 0, XV_WLAY_BELOWCLOSE, "mail-dlg-input"}, + 0, "mail-dlg-input"}, {quick_label, 2, 50, 7, MAIL_DLG_HEIGHT, N_(" Copies to"), 0, 0, 0, - 0, XV_WLAY_DONTCARE, 0}, + 0, 0}, {quick_input, 3, 50, 6, MAIL_DLG_HEIGHT, "", 44, 0, 0, - 0, XV_WLAY_BELOWCLOSE, "mail-dlg-input-2"}, + 0, "mail-dlg-input-2"}, {quick_label, 2, 50, 5, MAIL_DLG_HEIGHT, N_(" Subject"), 0, 0, 0, - 0, XV_WLAY_DONTCARE, 0}, + 0, 0}, {quick_input, 3, 50, 4, MAIL_DLG_HEIGHT, "", 44, 0, 0, - 0, XV_WLAY_BELOWCLOSE, "mail-dlg-input-3"}, + 0, "mail-dlg-input-3"}, {quick_label, 2, 50, 3, MAIL_DLG_HEIGHT, N_(" To"), 0, 0, 0, - 0, XV_WLAY_DONTCARE, 0}, + 0, 0}, {quick_label, 2, 50, 2, MAIL_DLG_HEIGHT, N_(" mail -s -c "), 0, 0, 0, - 0, XV_WLAY_DONTCARE, 0}, + 0, 0}, {0}}; quick_widgets[2].str_result = &tmail_cc; diff --git a/gtkedit/editoptions.c b/gtkedit/editoptions.c index dfc2ffc74..6fbe01208 100644 --- a/gtkedit/editoptions.c +++ b/gtkedit/editoptions.c @@ -64,57 +64,57 @@ void edit_options_dialog (void) { /*0 */ {quick_button, 6, 10, OPT_DLG_H - 3, OPT_DLG_H, N_("&Cancel"), 0, B_CANCEL, 0, - 0, XV_WLAY_DONTCARE, NULL}, + 0, NULL}, /*1 */ {quick_button, 2, 10, OPT_DLG_H - 3, OPT_DLG_H, N_("&Ok"), 0, B_ENTER, 0, - 0, XV_WLAY_DONTCARE, NULL}, + 0, NULL}, /*2 */ {quick_label, OPT_DLG_W / 2, OPT_DLG_W, OPT_DLG_H - 4, OPT_DLG_H, N_("Word wrap line length : "), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, /*3 */ {quick_input, OPT_DLG_W / 2 + 24, OPT_DLG_W, OPT_DLG_H - 4, OPT_DLG_H, "", OPT_DLG_W / 2 - 4 - 24, 0, - 0, 0, XV_WLAY_DONTCARE, "i"}, + 0, 0, "i"}, /*4 */ {quick_label, OPT_DLG_W / 2, OPT_DLG_W, OPT_DLG_H - 5, OPT_DLG_H, N_("Tab spacing : "), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, /*5 */ {quick_input, OPT_DLG_W / 2 + 24, OPT_DLG_W, OPT_DLG_H - 5, OPT_DLG_H, "", OPT_DLG_W / 2 - 4 - 24, 0, - 0, 0, XV_WLAY_DONTCARE, "i"}, + 0, 0, "i"}, /*6 */ #if !defined(MIDNIGHT) || defined(HAVE_SYNTAXH) #define OA 1 {quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 7, OPT_DLG_H, N_("synta&X highlighting"), 8, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, #else #define OA 0 #endif /*7 */ {quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 8, OPT_DLG_H, N_("confir&M before saving"), 6, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, /*8 */ {quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 9, OPT_DLG_H, N_("fill tabs with &Spaces"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, /*9 */ {quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 10, OPT_DLG_H, N_("&Return does autoindent"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, /*10 */ {quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 11, OPT_DLG_H, N_("&Backspace through tabs"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, /*11 */ {quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 12, OPT_DLG_H, N_("&Fake half tabs"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, /*12 */ {quick_radio, 5, OPT_DLG_W, OPT_DLG_H - 6, OPT_DLG_H, "", 3, 0, - 0, wrap_str, XV_WLAY_DONTCARE, "wrapm"}, + 0, wrap_str, "wrapm"}, /*13 */ {quick_label, 4, OPT_DLG_W, OPT_DLG_H - 7, OPT_DLG_H, N_("Wrap mode"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, /*14 */ {quick_radio, 5, OPT_DLG_W, OPT_DLG_H - 11, OPT_DLG_H, "", 2, 0, - 0, key_emu_str, XV_WLAY_DONTCARE, "keyemu"}, + 0, key_emu_str, "keyemu"}, /*15 */ {quick_label, 4, OPT_DLG_W, OPT_DLG_H - 12, OPT_DLG_H, N_("Key emulation"), 0, 0, - 0, 0, XV_WLAY_DONTCARE, NULL}, + 0, 0, NULL}, {0}}; static int i18n_flag = 0; diff --git a/pc/chmod.c b/pc/chmod.c index a4bf6ff75..746864818 100644 --- a/pc/chmod.c +++ b/pc/chmod.c @@ -254,7 +254,7 @@ static void init_chmod (void) if (i == 2 && single_set) break; else - add_widgetl (ch_dlg, button_new (XTRACT (i)), XV_WLAY_RIGHTOF); + add_widget (ch_dlg, button_new (XTRACT (i))); } diff --git a/pc/drive.c b/pc/drive.c index e7da9a546..95c5988cb 100644 --- a/pc/drive.c +++ b/pc/drive.c @@ -108,13 +108,12 @@ static void drive_cmd() for (i = 0; i < nDrivesAvail - MAX_LGH; i++) { p -= 4; sprintf(szTempBuf, "&%c", *p); - add_widgetl(drive_dlg, + add_widget (drive_dlg, button_new (5, (m_drv-i-1)*2+4 - (MAX_LGH*2 - nDrivesAvail) * 2, B_DRIVE_BASE + nDrivesAvail - i - 1, HIDDEN_BUTTON, - szTempBuf, 0, NULL, NULL), - XV_WLAY_RIGHTOF); + szTempBuf, 0, NULL, NULL)); } } @@ -122,10 +121,9 @@ static void drive_cmd() for (i = 0; i < m_drv; i++) { p -= 4; sprintf (szTempBuf, "&%c", *p); - add_widgetl(drive_dlg, + add_widget (drive_dlg, button_new (3, (m_drv-i-1)*2+4, B_DRIVE_BASE+m_drv-i-1, - HIDDEN_BUTTON, szTempBuf, 0, NULL, NULL), - XV_WLAY_RIGHTOF); + HIDDEN_BUTTON, szTempBuf, 0, NULL, NULL)); } run_dlg(drive_dlg); diff --git a/src/boxes.c b/src/boxes.c index 5ec1831c9..857ef897c 100644 --- a/src/boxes.c +++ b/src/boxes.c @@ -184,25 +184,23 @@ display_init (int radio_sel, char *init_text, DLG_CENTER | DLG_GRID); x_set_dialog_title (dd, _("Listing mode")); - add_widgetl (dd, + add_widget (dd, button_new (4, button_start, B_CANCEL, - NORMAL_BUTTON, cancel_button, 0, 0, "cancel-button"), - XV_WLAY_RIGHTOF); + NORMAL_BUTTON, cancel_button, 0, 0, "cancel-button")); - add_widgetl (dd, + add_widget (dd, button_new (3, button_start, B_ENTER, - DEFPUSH_BUTTON, ok_button, 0, 0, "ok-button"), - XV_WLAY_CENTERROW); + DEFPUSH_BUTTON, ok_button, 0, 0, "ok-button")); status = input_new (10, 9, INPUT_COLOR, DISPLAY_X-14, _status [radio_sel], "mini-input"); - add_widgetl (dd, status, XV_WLAY_RIGHTDOWN); + add_widget (dd, status); input_set_point (status, 0); check_status = check_new (9, 5, _check_status, user_mini_status, "mini-status"); - add_widgetl (dd, check_status, XV_WLAY_NEXTROW); + add_widget (dd, check_status); user = input_new (7, 9, INPUT_COLOR, DISPLAY_X-14, init_text, "user-fmt-input"); - add_widgetl (dd, user, XV_WLAY_RIGHTDOWN); + add_widget (dd, user); input_set_point (user, 0); #ifdef PORT_HAS_ICON_VIEW @@ -211,7 +209,7 @@ display_init (int radio_sel, char *init_text, my_radio = radio_new (3, 5, LIST_TYPES-1, displays, 1, "radio"); #endif my_radio->sel = my_radio->pos = current_mode; - add_widgetl (dd, my_radio, XV_WLAY_BELOWCLOSE); + add_widget (dd, my_radio); } int @@ -333,18 +331,18 @@ sort_box (sortfn *sort_fn, int *reverse, int *case_sensitive) x_set_dialog_title (dd, sort_title); - add_widgetl (dd, + add_widget (dd, button_new (10, button_pos, B_CANCEL, NORMAL_BUTTON, cancel_button, - 0, 0, "cancel-button"), XV_WLAY_CENTERROW); + 0, 0, "cancel-button")); - add_widgetl (dd, + add_widget (dd, button_new (9, button_pos, B_ENTER, DEFPUSH_BUTTON, ok_button, - 0, 0, "ok-button"), XV_WLAY_RIGHTDOWN); + 0, 0, "ok-button")); case_sense = check_new (4, check_pos, *case_sensitive, case_label, "case-check"); - add_widgetl (dd, case_sense, XV_WLAY_RIGHTDOWN); + add_widget (dd, case_sense); c = check_new (3, check_pos, *reverse, reverse_label, "reverse-check"); - add_widgetl (dd, c, XV_WLAY_RIGHTDOWN); + add_widget (dd, c); my_radio = radio_new (3, 3, SORT_TYPES, sort_orders_names, 1, "radio-1"); my_radio->sel = my_radio->pos = current_mode; @@ -374,19 +372,19 @@ static int my_exit; static QuickWidget conf_widgets [] = { { quick_button, 4, 6, 4, CONFY, N_("&Cancel"), - 0, B_CANCEL, 0, 0, XV_WLAY_RIGHTOF, "c" }, + 0, B_CANCEL, 0, 0, "c" }, { quick_button, 4, 6, 3, CONFY, N_("&Ok"), - 0, B_ENTER, 0, 0, XV_WLAY_CENTERROW, "o" }, + 0, B_ENTER, 0, 0, "o" }, { quick_checkbox, 1, 13, 6, CONFY, N_(" confirm &Exit "), - 9, 0, &my_exit, 0, XV_WLAY_BELOWCLOSE, "e" }, + 9, 0, &my_exit, 0, "e" }, { quick_checkbox, 1, 13, 5, CONFY, N_(" confirm e&Xecute "), - 10, 0, &my_execute, 0, XV_WLAY_BELOWCLOSE, "x" }, + 10, 0, &my_execute, 0, "x" }, { quick_checkbox, 1, 13, 4, CONFY, N_(" confirm o&Verwrite "), - 10, 0, &my_overwrite, 0, XV_WLAY_BELOWCLOSE, "ov" }, + 10, 0, &my_overwrite, 0, "ov" }, { quick_checkbox, 1, 13, 3, CONFY, N_(" confirm &Delete "), - 9, 0, &my_delete, 0, XV_WLAY_BELOWCLOSE, "de" }, -{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, 0 } + 9, 0, &my_delete, 0, "de" }, +{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; static QuickDialog confirmation = @@ -462,14 +460,14 @@ char *display_bits_str [] = static QuickWidget display_widgets [] = { { quick_button, 4, 6, 4, DISPY, N_("&Cancel"), - 0, B_CANCEL, 0, 0, XV_WLAY_CENTERROW, "c" }, + 0, B_CANCEL, 0, 0, "c" }, { quick_button, 4, 6, 3, DISPY, N_("&Ok"), - 0, B_ENTER, 0, 0, XV_WLAY_CENTERROW, "o" }, + 0, B_ENTER, 0, 0, "o" }, { quick_checkbox, 4, DISPX, 7, DISPY, N_("F&ull 8 bits input"), - 0, 0, &new_meta, 0, XV_WLAY_BELOWCLOSE, "u" }, + 0, 0, &new_meta, 0, "u" }, { quick_radio, 4, DISPX, 3, DISPY, "", 3, 0, - &new_mode, display_bits_str, XV_WLAY_BELOWCLOSE, "r" }, -{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE } + &new_mode, display_bits_str, "r" }, +{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; static QuickDialog display_bits = @@ -637,37 +635,37 @@ static int ret_use_netrc; #if 0 /* Not used currently */ { quick_checkbox, 4, VFSX, 10, VFSY, "Use ~/.netrc", - 'U', 0, 0, &ret_use_netrc, 0, XV_WLAY_BELOWCLOSE, "" }, + 'U', 0, 0, &ret_use_netrc, 0, "" }, #endif static QuickWidget confvfs_widgets [] = { { quick_button, 30, VFSX, VFSY - 3, VFSY, N_("&Cancel"), - 0, B_CANCEL, 0, 0, XV_WLAY_RIGHTOF, "button-cancel" }, + 0, B_CANCEL, 0, 0, "button-cancel" }, { quick_button, 12, VFSX, VFSY - 3, VFSY, N_("&Ok"), - 0, B_ENTER, 0, 0, XV_WLAY_CENTERROW, "button-ok" }, + 0, B_ENTER, 0, 0, "button-ok" }, #if defined(USE_NETCODE) { quick_input, 4, VFSX, 9, VFSY, "", 48, 0, 0, &ret_ftp_proxy, - XV_WLAY_RIGHTDOWN, "input-ftp-proxy" }, + "input-ftp-proxy" }, { quick_checkbox, 4, VFSX, 8, VFSY, N_("&Always use ftp proxy"), 0, 0, - &ftpfs_always_use_proxy, 0, XV_WLAY_RIGHTDOWN, "check-ftp-proxy" }, + &ftpfs_always_use_proxy, 0, "check-ftp-proxy" }, { quick_label, 49, VFSX, 7, VFSY, N_("sec"), - 0, 0, 0, 0, XV_WLAY_RIGHTOF, "label-sec" }, + 0, 0, 0, 0, "label-sec" }, { quick_input, 38, VFSX, 7, VFSY, "", 10, 0, 0, &ret_directory_timeout, - XV_WLAY_RIGHTDOWN, "input-timeout" }, + "input-timeout" }, { quick_label, 4, VFSX, 7, VFSY, N_("ftpfs directory cache timeout:"), - 0, 0, 0, 0, XV_WLAY_NEXTROW, "label-cache"}, + 0, 0, 0, 0, "label-cache"}, { quick_input, 4, VFSX, 6, VFSY, "", 48, 0, 0, &ret_passwd, - XV_WLAY_RIGHTDOWN, "input-passwd" }, + "input-passwd" }, { quick_label, 4, VFSX, 5, VFSY, N_("ftp anonymous password:"), - 0, 0, 0, 0, XV_WLAY_NEXTROW, "label-pass"}, + 0, 0, 0, 0, "label-pass"}, #endif { quick_label, 49, VFSX, 3, VFSY, "sec", - 0, 0, 0, 0, XV_WLAY_RIGHTOF, "label-sec2" }, + 0, 0, 0, 0, "label-sec2" }, { quick_input, 38, VFSX, 3, VFSY, "", 10, 0, 0, &ret_timeout, - XV_WLAY_RIGHTOF, "input-timo-vfs" }, + "input-timo-vfs" }, { quick_label, 4, VFSX, 3, VFSY, N_("Timeout for freeing VFSs:"), - 0, 0, 0, 0, XV_WLAY_BELOWCLOSE, "label-vfs" }, -{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, 0 } + 0, 0, 0, 0, "label-vfs" }, +{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; static QuickDialog confvfs_dlg = @@ -724,13 +722,13 @@ cd_dialog (void) QuickWidget quick_widgets [] = { #ifdef HAVE_TK #define INPUT_INDEX 2 - { quick_button, 0, 1, 0, 1, N_("&Cancel"), 0, B_CANCEL, 0, 0, XV_WLAY_DONTCARE, "cancel" }, - { quick_button, 0, 1, 0, 1, N_("&Ok"), 0, B_ENTER, 0, 0, XV_WLAY_DONTCARE, "ok" }, + { quick_button, 0, 1, 0, 1, N_("&Cancel"), 0, B_CANCEL, 0, 0, "cancel" }, + { quick_button, 0, 1, 0, 1, N_("&Ok"), 0, B_ENTER, 0, 0, "ok" }, #else #define INPUT_INDEX 0 #endif - { quick_input, 6, 57, 5, 0, "", 50, 0, 0, 0, XV_WLAY_RIGHTOF, "input" }, - { quick_label, 3, 57, 2, 0, "", 0, 0, 0, 0, XV_WLAY_DONTCARE, "label" }, + { quick_input, 6, 57, 5, 0, "", 50, 0, 0, 0, "input" }, + { quick_label, 3, 57, 2, 0, "", 0, 0, 0, 0, "label" }, { 0 } }; char *my_str; @@ -779,16 +777,16 @@ symlink_dialog (char *existing, char *new, char **ret_existing, char **ret_new) #if defined(HAVE_TK) #define INPUT_INDEX 2 { quick_button, 0, 1, 0, 1, _("&Cancel"), 0, B_CANCEL, 0, 0, - XV_WLAY_DONTCARE, "cancel" }, + "cancel" }, { quick_button, 0, 1, 0, 1, _("&Ok"), 0, B_ENTER, 0, 0, - XV_WLAY_DONTCARE, "ok" }, + "ok" }, #else #define INPUT_INDEX 0 #endif - { quick_input, 4, 80, 5, 8, "", 58, 0, 0, 0, XV_WLAY_BELOWCLOSE, "input-1" }, - { quick_label, 4, 80, 4, 8, "", 0, 0, 0, 0, XV_WLAY_BELOWOF, "label-1" }, - { quick_input, 4, 80, 3, 8, "", 58, 0, 0, 0, XV_WLAY_BELOWCLOSE, "input-2" }, - { quick_label, 4, 80, 2, 8, "", 0, 0, 0, 0, XV_WLAY_DONTCARE, "label-2" }, + { quick_input, 4, 80, 5, 8, "", 58, 0, 0, 0, "input-1" }, + { quick_label, 4, 80, 4, 8, "", 0, 0, 0, 0, "label-1" }, + { quick_input, 4, 80, 3, 8, "", 58, 0, 0, 0, "input-2" }, + { quick_label, 4, 80, 2, 8, "", 0, 0, 0, 0, "label-2" }, { 0 } }; Quick_input.xlen = 64; diff --git a/src/chmod.c b/src/chmod.c index 29c4fe9cc..05ee6c2e4 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -239,7 +239,7 @@ static void init_chmod (void) if (i == 2 && single_set) break; else - add_widgetl (ch_dlg, button_new (XTRACT (i)), XV_WLAY_RIGHTOF); + add_widget (ch_dlg, button_new (XTRACT (i))); } diff --git a/src/dlg.c b/src/dlg.c index 0adae9b6c..cda76504f 100644 --- a/src/dlg.c +++ b/src/dlg.c @@ -269,7 +269,7 @@ void set_idle_proc (Dlg_head *d, int state) } /* add component to dialog buffer */ -int add_widgetl (Dlg_head *where, void *what, WLay layout) +int add_widget (Dlg_head *where, void *what) { Widget_Item *back; Widget *widget = (Widget *) what; @@ -277,7 +277,6 @@ int add_widgetl (Dlg_head *where, void *what, WLay layout) /* Only used by Tk */ widget->frame = the_frame; - widget->layout = layout; /* Don't accept 0 widgets, this could be from widgets that could not */ /* initialize properly */ if (!what) @@ -375,11 +374,6 @@ int destroy_widget (Widget *w) return 1; } -int add_widget (Dlg_head *where, void *what) -{ - return add_widgetl (where, what, XV_WLAY_DONTCARE); -} - int send_message (Dlg_head *h, Widget *w, int msg, int par) { return (*(w->callback))(h, w, msg, par); diff --git a/src/dlg.h b/src/dlg.h index a55b11f23..f22a09ce8 100644 --- a/src/dlg.h +++ b/src/dlg.h @@ -111,40 +111,6 @@ typedef struct Dlg_head { #endif } Dlg_head; -/* XView widget layout */ - -typedef enum { - XV_WLAY_DONTCARE, /* Place the widget wherever it is reasonable */ - - XV_WLAY_RIGHTOF, /* Place the widget to the right of the last widget - * created - note: add_widget creates widgets from - * the last to the first one. - */ - - XV_WLAY_BELOWOF, /* Place it in a column like style */ - - XV_WLAY_BELOWCLOSE,/* The same, but without any gap between them */ - - XV_WLAY_NEXTROW, /* Place it on the left margin with Y bellow all the - * previous widgets - */ - - XV_WLAY_CENTERROW,/* The same as previous, but when the dialog is - * ready to show, tries to center that row of widgets - */ - - XV_WLAY_NEXTCOLUMN, /* Place it on the top margin with X behind all the - * previous widgets - */ - - XV_WLAY_RIGHTDOWN, /* Place the widget to the right of the last one with - * y set so that both y + h and yold + hold are equal. - This is usefull if the previous widget was a radio, - which has multiple lines */ - XV_WLAY_EXTENDWIDTH /* Like nextrow, but later on tries to extend the widget - * to fit in the frame (only for PANEL_LIST) */ -} WLay; - /* Every Widget must have this as it's first element */ typedef struct Widget { int x, y; @@ -169,7 +135,6 @@ typedef struct Widget { AREA_BOTTOM } area; /* Used by X platforms, should stay here always because the size of this structure has to be same everywhere :) */ - WLay layout; } Widget; /* The options for the widgets */ @@ -208,7 +173,6 @@ Dlg_head *create_dlg (int y1, int x1, int lines, int cols, #define DLG_CENTER 1 /* Center the dialog */ #define DLG_NONE 0 /* No options */ int add_widget (Dlg_head *dest, void *Widget); -int add_widgetl (Dlg_head *dest, void *Widget, WLay layout); int remove_widget (Dlg_head *dest, void *Widget); int destroy_widget (Widget *w); diff --git a/src/filegui.c b/src/filegui.c index 9a5f9920e..04e09da0e 100644 --- a/src/filegui.c +++ b/src/filegui.c @@ -260,39 +260,27 @@ file_op_context_create_ui (FileOpContext *ctx, FileOperation op, int with_eta) x_set_dialog_title (ui->op_dlg, ""); - add_widgetl (ui->op_dlg, button_new (BY-minus, WX - 19 + eta_offset, FILE_ABORT, - NORMAL_BUTTON, _("&Abort"), 0, 0, "abort"), - XV_WLAY_RIGHTOF); - add_widgetl (ui->op_dlg, button_new (BY-minus, 14 + eta_offset, FILE_SKIP, - NORMAL_BUTTON, _("&Skip"), 0, 0, "skip"), - XV_WLAY_CENTERROW); + add_widget (ui->op_dlg, button_new (BY-minus, WX - 19 + eta_offset, FILE_ABORT, + NORMAL_BUTTON, _("&Abort"), 0, 0, "abort")); + add_widget (ui->op_dlg, button_new (BY-minus, 14 + eta_offset, FILE_SKIP, + NORMAL_BUTTON, _("&Skip"), 0, 0, "skip")); - add_widgetl (ui->op_dlg, ui->progress_gauge[2] = gauge_new (7, FCOPY_GAUGE_X, 0, 100, 0, "g-1"), - XV_WLAY_RIGHTOF); - add_widgetl (ui->op_dlg, ui->progress_label[2] = label_new (7, FCOPY_LABEL_X, fifteen, "l-1"), - XV_WLAY_NEXTROW); - add_widgetl (ui->op_dlg, ui->bps_label = label_new (7, WX, "", "bps-label"), XV_WLAY_NEXTROW); + add_widget (ui->op_dlg, ui->progress_gauge[2] = gauge_new (7, FCOPY_GAUGE_X, 0, 100, 0, "g-1")); + add_widget (ui->op_dlg, ui->progress_label[2] = label_new (7, FCOPY_LABEL_X, fifteen, "l-1")); + add_widget (ui->op_dlg, ui->bps_label = label_new (7, WX, "", "bps-label")); - add_widgetl (ui->op_dlg, ui->progress_gauge[1] = gauge_new (8, FCOPY_GAUGE_X, 0, 100, 0, "g-2"), - XV_WLAY_RIGHTOF); - add_widgetl (ui->op_dlg, ui->progress_label[1] = label_new (8, FCOPY_LABEL_X, fifteen, "l-2"), - XV_WLAY_RIGHTOF); - add_widgetl (ui->op_dlg, ui->stalled_label = label_new (8, WX, "", "stalled"), XV_WLAY_NEXTROW); + add_widget (ui->op_dlg, ui->progress_gauge[1] = gauge_new (8, FCOPY_GAUGE_X, 0, 100, 0, "g-2")); + add_widget (ui->op_dlg, ui->progress_label[1] = label_new (8, FCOPY_LABEL_X, fifteen, "l-2")); + add_widget (ui->op_dlg, ui->stalled_label = label_new (8, WX, "", "stalled")); - add_widgetl (ui->op_dlg, ui->progress_gauge[0] = gauge_new (6, FCOPY_GAUGE_X, 0, 100, 0, "g-3"), - XV_WLAY_RIGHTOF); - add_widgetl (ui->op_dlg, ui->progress_label[0] = label_new (6, FCOPY_LABEL_X, fifteen, "l-3"), - XV_WLAY_RIGHTOF); - add_widgetl (ui->op_dlg, ui->eta_label = label_new (6, WX, "", "eta_label"), XV_WLAY_NEXTROW); + add_widget (ui->op_dlg, ui->progress_gauge[0] = gauge_new (6, FCOPY_GAUGE_X, 0, 100, 0, "g-3")); + add_widget (ui->op_dlg, ui->progress_label[0] = label_new (6, FCOPY_LABEL_X, fifteen, "l-3")); + add_widget (ui->op_dlg, ui->eta_label = label_new (6, WX, "", "eta_label")); - add_widgetl (ui->op_dlg, ui->file_string[1] = label_new (4, FCOPY_GAUGE_X, sixty, "fs-l-1"), - XV_WLAY_RIGHTOF); - add_widgetl (ui->op_dlg, ui->file_label[1] = label_new (4, FCOPY_LABEL_X, fifteen, "fs-l-2"), - XV_WLAY_NEXTROW); - add_widgetl (ui->op_dlg, ui->file_string[0] = label_new (3, FCOPY_GAUGE_X, sixty, "fs-x-1"), - XV_WLAY_RIGHTOF); - add_widgetl (ui->op_dlg, ui->file_label[0] = label_new (3, FCOPY_LABEL_X, fifteen, "fs-x-2"), - XV_WLAY_NEXTROW); + add_widget (ui->op_dlg, ui->file_string[1] = label_new (4, FCOPY_GAUGE_X, sixty, "fs-l-1")); + add_widget (ui->op_dlg, ui->file_label[1] = label_new (4, FCOPY_LABEL_X, fifteen, "fs-l-2")); + add_widget (ui->op_dlg, ui->file_string[0] = label_new (3, FCOPY_GAUGE_X, sixty, "fs-x-1")); + add_widget (ui->op_dlg, ui->file_label[0] = label_new (3, FCOPY_LABEL_X, fifteen, "fs-x-2")); /* We will manage the dialog without any help, that's why we have to call init_dlg */ @@ -583,43 +571,40 @@ static struct int ypos, xpos; int value; /* 0 for labels */ char* tkname; - WLay layout; } rd_widgets [] = { {N_("Target file \"%s\" already exists!"), - 3, 4, 0, "target-e", XV_WLAY_CENTERROW}, - {N_("&Abort"), BY + 3, 25, REPLACE_ABORT, "abort", XV_WLAY_CENTERROW}, + 3, 4, 0, "target-e" }, + {N_("&Abort"), BY + 3, 25, REPLACE_ABORT, "abort" }, {N_("if &Size differs"), - BY + 1, 28, REPLACE_SIZE, "if-size", XV_WLAY_RIGHTOF}, - {N_("non&E"), BY, 47, REPLACE_NEVER, "none", XV_WLAY_RIGHTOF}, - {N_("&Update"), BY, 36, REPLACE_UPDATE, "update", XV_WLAY_RIGHTOF}, - {N_("al&L"), BY, 28, REPLACE_ALWAYS, "all", XV_WLAY_RIGHTOF}, + BY + 1, 28, REPLACE_SIZE, "if-size" }, + {N_("non&E"), BY, 47, REPLACE_NEVER, "none" }, + {N_("&Update"), BY, 36, REPLACE_UPDATE, "update" }, + {N_("al&L"), BY, 28, REPLACE_ALWAYS, "all" }, {N_("Overwrite all targets?"), - BY, 4, 0, "over-label", XV_WLAY_CENTERROW}, - {N_("&Reget"), BY - 1, 28, REPLACE_REGET, "reget", XV_WLAY_RIGHTOF}, - {N_("ap&Pend"), BY - 2, 45, REPLACE_APPEND, "append", XV_WLAY_RIGHTOF}, - {N_("&No"), BY - 2, 37, REPLACE_NO, "no", XV_WLAY_RIGHTOF}, - {N_("&Yes"), BY - 2, 28, REPLACE_YES, "yes", XV_WLAY_RIGHTOF}, + BY, 4, 0, "over-label" }, + {N_("&Reget"), BY - 1, 28, REPLACE_REGET, "reget" }, + {N_("ap&Pend"), BY - 2, 45, REPLACE_APPEND, "append" }, + {N_("&No"), BY - 2, 37, REPLACE_NO, "no" }, + {N_("&Yes"), BY - 2, 28, REPLACE_YES, "yes" }, {N_("Overwrite this target?"), - BY - 2, 4, 0, "overlab", XV_WLAY_CENTERROW}, + BY - 2, 4, 0, "overlab" }, {N_("Target date: %s, size %d"), - 6, 4, 0, "target-date",XV_WLAY_CENTERROW}, + 6, 4, 0, "target-date" }, {N_("Source date: %s, size %d"), - 5, 4, 0, "source-date",XV_WLAY_CENTERROW} + 5, 4, 0, "source-date" } }; #define ADD_RD_BUTTON(i)\ - add_widgetl (ui->replace_dlg,\ + add_widget (ui->replace_dlg,\ button_new (rd_widgets [i].ypos, rd_widgets [i].xpos, rd_widgets [i].value,\ - NORMAL_BUTTON, rd_widgets [i].text, 0, 0, rd_widgets [i].tkname), \ - rd_widgets [i].layout) + NORMAL_BUTTON, rd_widgets [i].text, 0, 0, rd_widgets [i].tkname)) #define ADD_RD_LABEL(ui,i,p1,p2)\ g_snprintf (buffer, sizeof (buffer), rd_widgets [i].text, p1, p2);\ - add_widgetl (ui->replace_dlg,\ - label_new (rd_widgets [i].ypos, rd_widgets [i].xpos, buffer, rd_widgets [i].tkname),\ - rd_widgets [i].layout) + add_widget (ui->replace_dlg,\ + label_new (rd_widgets [i].ypos, rd_widgets [i].xpos, buffer, rd_widgets [i].tkname)) static void init_replace (FileOpContext *ctx, enum OperationMode mode) @@ -803,23 +788,23 @@ static QuickWidget fmd_widgets [] = { #define FMCB11 1 /* follow symlinks and preserve Attributes must be the first */ { quick_checkbox, 3, 64, 8, FMDY, N_("preserve &Attributes"), 9, 0, - 0 /* &op_preserve */, 0, XV_WLAY_BELOWCLOSE, "preserve" }, + 0 /* &op_preserve */, 0, "preserve" }, { quick_checkbox, 3, 64, 7, FMDY, N_("follow &Links"), 7, 0, - 0 /* &file_mask_op_follow_links */, 0, XV_WLAY_BELOWCLOSE, "follow" }, - { quick_label, 3, 64, 5, FMDY, N_("to:"), 0, 0, 0, 0, XV_WLAY_BELOWOF,"to"}, + 0 /* &file_mask_op_follow_links */, 0, "follow" }, + { quick_label, 3, 64, 5, FMDY, N_("to:"), 0, 0, 0, 0,"to"}, { quick_checkbox, 37, 64, 4, FMDY, N_("&Using shell patterns"), 0, 0, - 0 /* &source_easy_patterns */, 0, XV_WLAY_BELOWCLOSE, "using-shell" }, + 0 /* &source_easy_patterns */, 0, "using-shell" }, { quick_input, 3, 64, 3, FMDY, "", 58, - 0, 0, 0, XV_WLAY_BELOWCLOSE, "input-def" }, + 0, 0, 0, "input-def" }, #define FMDI1 4 #define FMDI2 5 #define FMDC 3 { quick_input, 3, 64, 6, FMDY, "", 58, 0, - 0, 0, XV_WLAY_BELOWCLOSE, "input2" }, + 0, 0, "input2" }, #define FMDI0 6 - { quick_label, 3, 64, 2, FMDY, "", 0, 0, 0, 0, XV_WLAY_DONTCARE, "ql" }, + { quick_label, 3, 64, 2, FMDY, "", 0, 0, 0, 0, "ql" }, #define FMBRGT 7 - { quick_button, 42, 64, 9, FMDY, N_("&Cancel"), 0, B_CANCEL, 0, 0, XV_WLAY_DONTCARE, + { quick_button, 42, 64, 9, FMDY, N_("&Cancel"), 0, B_CANCEL, 0, 0, "cancel" }, #undef SKIP #ifdef WITH_BACKGROUND @@ -828,7 +813,7 @@ static QuickWidget fmd_widgets [] = { # define FMCB22 10 # define FMBLFT 9 # define FMBMID 8 - { quick_button, 25, 64, 9, FMDY, N_("&Background"), 0, B_USER, 0, 0, XV_WLAY_DONTCARE, "back" }, + { quick_button, 25, 64, 9, FMDY, N_("&Background"), 0, B_USER, 0, 0, "back" }, #else /* WITH_BACKGROUND */ # define SKIP 4 # define FMCB21 10 @@ -836,11 +821,11 @@ static QuickWidget fmd_widgets [] = { # define FMBLFT 8 # undef FMBMID #endif - { quick_button, 14, 64, 9, FMDY, N_("&Ok"), 0, B_ENTER, 0, 0, XV_WLAY_NEXTROW, "ok" }, + { quick_button, 14, 64, 9, FMDY, N_("&Ok"), 0, B_ENTER, 0, 0, "ok" }, { quick_checkbox, 42, 64, 8, FMDY, N_("&Stable Symlinks"), 0, 0, - 0 /* &file_mask_stable_symlinks */, 0, XV_WLAY_BELOWCLOSE, "stab-sym" }, + 0 /* &file_mask_stable_symlinks */, 0, "stab-sym" }, { quick_checkbox, 31, 64, 7, FMDY, N_("&Dive into subdir if exists"), 0, 0, - 0 /* &dive_into_subdirs */, 0, XV_WLAY_BELOWOF, "dive" }, + 0 /* &dive_into_subdirs */, 0, "dive" }, { 0 } }; void diff --git a/src/find.c b/src/find.c index 2831a55cb..112cdb61d 100644 --- a/src/find.c +++ b/src/find.c @@ -229,30 +229,30 @@ find_par_start: x_set_dialog_title (find_dlg, _("Find File")); - add_widgetl (find_dlg, button_new (11, b2, B_CANCEL, NORMAL_BUTTON, - buts[2], 0 ,0, "cancel"), XV_WLAY_RIGHTOF); + add_widget (find_dlg, button_new (11, b2, B_CANCEL, NORMAL_BUTTON, + buts[2], 0 ,0, "cancel")); #ifndef HAVE_GNOME - add_widgetl (find_dlg, button_new (11, b1, B_TREE, NORMAL_BUTTON, - buts[1], 0, 0, "tree"), XV_WLAY_RIGHTOF); + add_widget (find_dlg, button_new (11, b1, B_TREE, NORMAL_BUTTON, + buts[1], 0, 0, "tree")); #endif - add_widgetl (find_dlg, button_new (11, b0, B_ENTER, DEFPUSH_BUTTON, - buts[0], 0, 0, "ok"), XV_WLAY_CENTERROW); + add_widget (find_dlg, button_new (11, b0, B_ENTER, DEFPUSH_BUTTON, + buts[0], 0, 0, "ok")); case_sense = check_new (9, 3, case_sensitive, case_label, "find-case-check"); - add_widgetl (find_dlg, case_sense, XV_WLAY_RIGHTDOWN); + add_widget (find_dlg, case_sense); in_with = input_new (7, istart, INPUT_COLOR, ilen, in_contents, "content"); - add_widgetl (find_dlg, in_with, XV_WLAY_BELOWOF); + add_widget (find_dlg, in_with); in_name = input_new (5, istart, INPUT_COLOR, ilen, in_start_name, "name"); - add_widgetl (find_dlg, in_name, XV_WLAY_BELOWOF); + add_widget (find_dlg, in_name); in_start = input_new (3, istart, INPUT_COLOR, ilen, in_start_dir, "start"); - add_widgetl (find_dlg, in_start, XV_WLAY_NEXTCOLUMN); + add_widget (find_dlg, in_start); - add_widgetl (find_dlg, label_new (7, 3, labs[2], "label-cont"), XV_WLAY_BELOWOF); - add_widgetl (find_dlg, label_new (5, 3, labs[1], "label-file"), XV_WLAY_BELOWOF); - add_widgetl (find_dlg, label_new (3, 3, labs[0], "label-start"), XV_WLAY_NEXTCOLUMN); + add_widget (find_dlg, label_new (7, 3, labs[2], "label-cont")); + add_widget (find_dlg, label_new (5, 3, labs[1], "label-file")); + add_widget (find_dlg, label_new (3, 3, labs[0], "label-start")); run_dlg (find_dlg); @@ -1043,34 +1043,34 @@ setup_gui (void) x_set_dialog_title (find_dlg, _("Find file")); - add_widgetl (find_dlg, + add_widget (find_dlg, button_new (FIND2_Y-3, fbuts[7].x, B_VIEW, NORMAL_BUTTON, - fbuts[7].text, find_do_edit_file, find_dlg, "button-edit"), 0); - add_widgetl (find_dlg, + fbuts[7].text, find_do_edit_file, find_dlg, "button-edit")); + add_widget (find_dlg, button_new (FIND2_Y-3, fbuts[6].x, B_VIEW, NORMAL_BUTTON, - fbuts[6].text, find_do_view_file, find_dlg, "button-view"), 0); - add_widgetl (find_dlg, + fbuts[6].text, find_do_view_file, find_dlg, "button-view")); + add_widget (find_dlg, button_new (FIND2_Y-3, fbuts[5].x, B_PANELIZE, NORMAL_BUTTON, - fbuts[5].text, 0, 0, "button-panelize"), XV_WLAY_CENTERROW); + fbuts[5].text, 0, 0, "button-panelize")); - add_widgetl (find_dlg, + add_widget (find_dlg, button_new (FIND2_Y-4, fbuts[4].x, B_CANCEL, NORMAL_BUTTON, - fbuts[4].text, 0, 0, "button-quit"), XV_WLAY_RIGHTOF); + fbuts[4].text, 0, 0, "button-quit")); stop_button = button_new (FIND2_Y-4, fbuts[0].x, B_STOP, NORMAL_BUTTON, fbuts[0].text, start_stop, find_dlg, "start-stop"); - add_widgetl (find_dlg, stop_button, XV_WLAY_RIGHTOF); - add_widgetl (find_dlg, + add_widget (find_dlg, stop_button); + add_widget (find_dlg, button_new (FIND2_Y-4, fbuts[3].x, B_AGAIN, NORMAL_BUTTON, - fbuts[3].text, 0, 0, "button-again"), XV_WLAY_RIGHTOF); - add_widgetl (find_dlg, + fbuts[3].text, 0, 0, "button-again")); + add_widget (find_dlg, button_new (FIND2_Y-4, fbuts[2].x, B_ENTER, DEFPUSH_BUTTON, - fbuts[2].text, 0, 0, "button-chdir"), XV_WLAY_CENTERROW); + fbuts[2].text, 0, 0, "button-chdir")); status_label = label_new (FIND2_Y-6, 4, _("Searching"), "label-search"); - add_widgetl (find_dlg, status_label, XV_WLAY_BELOWOF); + add_widget (find_dlg, status_label); find_list = listbox_new (2, 2, FIND2_X-4, FIND2_Y-9, listbox_finish, 0, "listbox"); - add_widgetl (find_dlg, find_list, XV_WLAY_EXTENDWIDTH); + add_widget (find_dlg, find_list); } static int diff --git a/src/hotlist.c b/src/hotlist.c index 0a7045317..d8d4d45d4 100644 --- a/src/hotlist.c +++ b/src/hotlist.c @@ -610,8 +610,7 @@ static void init_hotlist (int list_type) for (i = 0; i < BUTTONS; i++){ if (hotlist_but[i].type & list_type) - add_widgetl (hotlist_dlg, button_new (XTRACT (i)), (i == BUTTONS - 1) ? - XV_WLAY_CENTERROW : XV_WLAY_RIGHTOF); + add_widget (hotlist_dlg, button_new (XTRACT (i))); } #undef XTRACT @@ -640,7 +639,7 @@ static void init_hotlist (int list_type) } else fill_listbox (); - add_widgetl (hotlist_dlg, l_hotlist, XV_WLAY_EXTENDWIDTH); + add_widget (hotlist_dlg, l_hotlist); /* add listbox to the dialogs */ } @@ -663,8 +662,7 @@ static void init_movelist (int list_type, struct hotlist *item) for (i = 0; i < BUTTONS; i++){ if (hotlist_but[i].type & list_type) - add_widgetl (movelist_dlg, button_new (XTRACT (i)), (i == BUTTONS - 1) ? - XV_WLAY_CENTERROW : XV_WLAY_RIGHTOF); + add_widget (movelist_dlg, button_new (XTRACT (i))); } #undef XTRACT @@ -683,7 +681,7 @@ static void init_movelist (int list_type, struct hotlist *item) fill_listbox (); - add_widgetl (movelist_dlg, l_movelist, XV_WLAY_EXTENDWIDTH); + add_widget (movelist_dlg, l_movelist); /* add listbox to the dialogs */ } @@ -799,19 +797,19 @@ static int add_new_entry_input (char *header, char *text1, char *text2, char *he QuickDialog Quick_input; static QuickWidget quick_widgets [] = { { quick_button, 55, 80, RELATIVE_Y_BUTTONS, 0, N_("&Cancel"), 0, B_CANCEL, - 0, 0, XV_WLAY_DONTCARE, "button-cancel" }, + 0, 0, "button-cancel" }, { quick_button, 30, 80, RELATIVE_Y_BUTTONS, 0, N_("&Insert"), 0, B_INSERT, - 0, 0, XV_WLAY_DONTCARE, "button-insert" }, + 0, 0, "button-insert" }, { quick_button, 10, 80, RELATIVE_Y_BUTTONS, 0, N_("&Append"), 0, B_APPEND, - 0, 0, XV_WLAY_DONTCARE, "button-append" }, + 0, 0, "button-append" }, { quick_input, 4, 80, RELATIVE_Y_INPUT_PTH, 0, "",58, 0, - 0, 0, XV_WLAY_BELOWCLOSE, "input-pth" }, + 0, 0, "input-pth" }, { quick_label, RELATIVE_Y_LABEL_PTH, 80, 3, 0, 0, 0, 0, - 0, 0, XV_WLAY_DONTCARE, "label-pth" }, + 0, 0, "label-pth" }, { quick_input, 4, 80, 3, 0, "", 58, 0, - 0, 0, XV_WLAY_BELOWCLOSE, "input-lbl" }, + 0, 0, "input-lbl" }, { quick_label, 3, 80, 2, 0, 0, 0, 0, - 0, 0, XV_WLAY_DONTCARE, "label-lbl" }, + 0, 0, "label-lbl" }, { 0 } }; int len; @@ -896,13 +894,13 @@ static int add_new_group_input (char *header, char *label, char **result) QuickDialog Quick_input; static QuickWidget quick_widgets [] = { { quick_button, 55, 80, 1, 0, N_("&Cancel"), 0, B_CANCEL, 0, 0, - XV_WLAY_DONTCARE, "button-cancel" }, + "button-cancel" }, { quick_button, 30, 80, 1, 0, N_("&Insert"), 0, B_INSERT, 0, 0, - XV_WLAY_DONTCARE, "button-insert" }, + "button-insert" }, { quick_button, 10, 80, 1, 0, N_("&Append"), 0, B_APPEND, 0, 0, - XV_WLAY_DONTCARE, "button-append" }, - { quick_input, 4, 80, 0, 0, "", 58, 0, 0, 0, XV_WLAY_BELOWCLOSE, "input" }, - { quick_label, 3, 80, 2, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, "label" }, + "button-append" }, + { quick_input, 4, 80, 0, 0, "", 58, 0, 0, 0, "input" }, + { quick_label, 3, 80, 2, 0, 0, 0, 0, 0, 0, "label" }, { 0 } }; int relative_y[] = {1, 1, 1, 0, 2}; /* the relative_x component from the quick_widgets variable above */ diff --git a/src/layout.c b/src/layout.c index 0de895b87..c8b9f5c5c 100644 --- a/src/layout.c +++ b/src/layout.c @@ -455,15 +455,12 @@ static void init_layout (void) x_set_dialog_title (layout_dlg, _("Layout")); - add_widgetl (layout_dlg, - button_new (BY, b3, B_CANCEL, NORMAL_BUTTON, cancel_button, 0, 0, "c"), - XV_WLAY_RIGHTOF); - add_widgetl (layout_dlg, - button_new (BY, b2, B_EXIT, NORMAL_BUTTON, save_button, 0, 0, "s"), - XV_WLAY_RIGHTOF); - add_widgetl (layout_dlg, - button_new (BY, b1, B_ENTER, DEFPUSH_BUTTON, ok_button, 0, 0, "o"), - XV_WLAY_CENTERROW); + add_widget (layout_dlg, + button_new (BY, b3, B_CANCEL, NORMAL_BUTTON, cancel_button, 0, 0, "c")); + add_widget (layout_dlg, + button_new (BY, b2, B_EXIT, NORMAL_BUTTON, save_button, 0, 0, "s")); + add_widget (layout_dlg, + button_new (BY, b1, B_ENTER, DEFPUSH_BUTTON, ok_button, 0, 0, "o")); #ifndef HAVE_X if (console_flag){ add_widget (layout_dlg, @@ -479,12 +476,12 @@ static void init_layout (void) for (i = 0; i < 6; i++){ check_options [i].widget = check_new (8 - i, 7 + first_width, XTRACT(i)); - add_widgetl (layout_dlg, check_options [i].widget, XV_WLAY_BELOWCLOSE); + add_widget (layout_dlg, check_options [i].widget); } check_options [8].widget = check_new (10, 6, XTRACT(8)); - add_widgetl (layout_dlg, check_options [8].widget, XV_WLAY_BELOWCLOSE); + add_widget (layout_dlg, check_options [8].widget); check_options [7].widget = check_new (9, 6, XTRACT(7)); - add_widgetl (layout_dlg, check_options [7].widget, XV_WLAY_BELOWCLOSE); + add_widget (layout_dlg, check_options [7].widget); _filetype_mode = filetype_mode; _permission_mode = permission_mode; @@ -496,9 +493,9 @@ static void init_layout (void) _xterm_hintbar = xterm_hintbar; #ifndef HAVE_X bright_widget = button_new(6, 15, B_2RIGHT, NARROW_BUTTON, "&>", b2right_cback, 0, ">"); - add_widgetl (layout_dlg, bright_widget, XV_WLAY_RIGHTOF); + add_widget (layout_dlg, bright_widget); bleft_widget = button_new (6, 9, B_2LEFT, NARROW_BUTTON, "&<", b2left_cback, 0, "<"); - add_widgetl (layout_dlg, bleft_widget, XV_WLAY_RIGHTOF); + add_widget (layout_dlg, bleft_widget); check_options [6].widget = check_new (5, 6, XTRACT(6)); #endif old_first_panel_size = -1; diff --git a/src/listmode.c b/src/listmode.c index c30804ba7..872e607fb 100644 --- a/src/listmode.c +++ b/src/listmode.c @@ -170,8 +170,7 @@ static void init_listmode (char *oldlistformat) #define XTRACT(i) BY+listmode_but[i].y, BX+listmode_but[i].x, listmode_but[i].ret_cmd, listmode_but[i].flags, listmode_but[i].text, 0, 0, NULL for (i = 0; i < BUTTONS; i++) - add_widgetl (listmode_dlg, button_new (XTRACT (i)), (i == BUTTONS - 1) ? - XV_WLAY_CENTERROW : XV_WLAY_RIGHTOF); + add_widget (listmode_dlg, button_new (XTRACT (i))); /* We add the labels. */ for (i = 0; i < LABELS; i++){ @@ -216,7 +215,7 @@ static void init_listmode (char *oldlistformat) } /* add listbox to the dialogs */ - add_widgetl (listmode_dlg, l_listmode, XV_WLAY_EXTENDWIDTH); + add_widget (listmode_dlg, l_listmode); radio_columns = radio_new (UY+1, UX+32, 2, s_columns, 1, NULL); add_widget (listmode_dlg, radio_columns); diff --git a/src/main.c b/src/main.c index 0edf73593..d2e6e4a7b 100644 --- a/src/main.c +++ b/src/main.c @@ -2169,8 +2169,8 @@ setup_panels_and_run_mc () add_widget (midnight_dlg, the_hint); #endif /* HAVE_X */ load_hint (); - add_widgetl (midnight_dlg, cmdline, XV_WLAY_RIGHTOF); - add_widgetl (midnight_dlg, the_prompt, XV_WLAY_DONTCARE); + add_widget (midnight_dlg, cmdline); + add_widget (midnight_dlg, the_prompt); add_widget (midnight_dlg, the_bar); if (boot_current_is_left){ diff --git a/src/option.c b/src/option.c index f956e99c2..d674ba9ba 100644 --- a/src/option.c +++ b/src/option.c @@ -206,37 +206,35 @@ static void init_configure (void) x_set_dialog_title (conf_dlg, _("Configure options")); - add_widgetl (conf_dlg, - button_new (BY, b3, B_CANCEL, NORMAL_BUTTON, cancel_button, 0, 0, "button-cancel"), - XV_WLAY_RIGHTOF); + add_widget (conf_dlg, + button_new (BY, b3, B_CANCEL, NORMAL_BUTTON, + cancel_button, 0, 0, "button-cancel")); - add_widgetl (conf_dlg, - button_new (BY, b2, B_EXIT, NORMAL_BUTTON, save_button, 0, 0, "button-save"), - XV_WLAY_RIGHTOF); + add_widget (conf_dlg, + button_new (BY, b2, B_EXIT, NORMAL_BUTTON, + save_button, 0, 0, "button-save")); - add_widgetl (conf_dlg, - button_new (BY, b1, B_ENTER, DEFPUSH_BUTTON, ok_button, 0, 0, "button-ok"), - XV_WLAY_CENTERROW); + add_widget (conf_dlg, + button_new (BY, b1, B_ENTER, DEFPUSH_BUTTON, + ok_button, 0, 0, "button-ok")); #define XTRACT(i) *check_options[i].variable, check_options[i].text, check_options [i].tk /* Add all the checkboxes */ for (i = 0; i < 13; i++){ check_options [i].widget = check_new (OY + (13-i), OX+2, XTRACT(i)); - add_widgetl (conf_dlg, check_options [i].widget, - XV_WLAY_BELOWCLOSE); + add_widget (conf_dlg, check_options [i].widget); } pause_radio = radio_new (RY+1, RX+2, 3, pause_options, 1, "pause-radio"); pause_radio->sel = pause_after_run; #ifndef HAVE_GNOME - add_widgetl (conf_dlg, pause_radio, XV_WLAY_BELOWCLOSE); + add_widget (conf_dlg, pause_radio); #endif for (i = 0; i < 6; i++){ check_options [i+13].widget = check_new (PY + (6-i), PX+2, XTRACT(i+13)); - add_widgetl (conf_dlg, check_options [i+13].widget, - XV_WLAY_BELOWCLOSE); + add_widget (conf_dlg, check_options [i+13].widget); } } diff --git a/src/panelize.c b/src/panelize.c index 138ab2cbc..5e9788204 100644 --- a/src/panelize.c +++ b/src/panelize.c @@ -196,13 +196,12 @@ static void init_panelize (void) #define XTRACT(i) BY+panelize_but[i].y, BX+panelize_but[i].x, panelize_but[i].ret_cmd, panelize_but[i].flags, panelize_but[i].text, 0, 0, panelize_but[i].tkname for (i = 0; i < BUTTONS; i++) - add_widgetl (panelize_dlg, button_new (XTRACT (i)), (i == BUTTONS - 1) ? - XV_WLAY_CENTERROW : XV_WLAY_RIGHTOF); + add_widget(panelize_dlg, button_new (XTRACT (i))); pname = input_new (UY+14, UX, INPUT_COLOR, panelize_dlg->cols-10, "", "in"); - add_widgetl (panelize_dlg, pname, XV_WLAY_RIGHTOF); + add_widget (panelize_dlg, pname); - add_widgetl (panelize_dlg, label_new (UY+13, UX, _("Command"), "label-command"), XV_WLAY_NEXTROW); + add_widget (panelize_dlg, label_new (UY+13, UX, _("Command"), "label-command")); /* get new listbox */ l_panelize = listbox_new (UY + 1, UX + 1, panelize_dlg->cols-12, 10, 0, l_call, "li"); @@ -213,7 +212,7 @@ static void init_panelize (void) } /* add listbox to the dialogs */ - add_widgetl (panelize_dlg, l_panelize, XV_WLAY_EXTENDWIDTH); + add_widget (panelize_dlg, l_panelize); listbox_select_entry (l_panelize, listbox_search_text (l_panelize, _("Other command"))); diff --git a/src/wtools.c b/src/wtools.c index c217ebb5c..c86296760 100644 --- a/src/wtools.c +++ b/src/wtools.c @@ -286,8 +286,8 @@ int query_dialog (char *header, char *text, int flags, int count, ...) destroy_dlg (query_dlg); } else { #ifdef HAVE_X - add_widgetl (query_dlg, button_new(0, 0, B_EXIT, NORMAL_BUTTON, _("&Ok"), 0, 0, NULL), - XV_WLAY_CENTERROW); + add_widget (query_dlg, button_new(0, 0, B_EXIT, NORMAL_BUTTON, + _("&Ok"), 0, 0, NULL)); add_widget (query_dlg, label_new (2, 3, text, NULL)); #ifdef HAVE_TK @@ -511,7 +511,7 @@ int quick_dialog_skip (QuickDialog *qd, int nskip) break; } qw->the_widget = widget; - add_widgetl (dd, widget, qw->layout); + add_widget (dd, widget); } while (nskip--) @@ -559,11 +559,11 @@ char *real_input_dialog_help (char *header, char *text, char *help, char *def_te QuickDialog Quick_input; QuickWidget quick_widgets [] = { { quick_button, 6, 10, 1, 0, N_("&Cancel"), 0, B_CANCEL, 0, 0, - XV_WLAY_RIGHTOF, "button-cancel" }, + "button-cancel" }, { quick_button, 3, 10, 1, 0, N_("&Ok"), 0, B_ENTER, 0, 0, - XV_WLAY_CENTERROW, "button-ok" }, - { quick_input, 4, 80, 0, 0, "", 58, 0, 0, 0, XV_WLAY_NEXTROW, 0 }, - { quick_label, 3, 80, 2, 0, "", 0, 0, 0, 0, XV_WLAY_NEXTROW, "label" }, + "button-ok" }, + { quick_input, 4, 80, 0, 0, "", 58, 0, 0, 0, 0 }, + { quick_label, 3, 80, 2, 0, "", 0, 0, 0, 0, "label" }, { 0 } }; int len; diff --git a/src/wtools.h b/src/wtools.h index 797baaaa1..8c4c73cca 100644 --- a/src/wtools.h +++ b/src/wtools.h @@ -44,7 +44,6 @@ typedef struct { int value; /* Buttons only: value of button */ int *result; /* Checkbutton: where to store result */ char **str_result; /* Input lines: destination */ - WLay layout; /* XView Layouting stuff */ char *tkname; /* Name of the widget used for Tk only */ void *the_widget; /* For the quick quick dialog manager */ } QuickWidget; diff --git a/vfs/smbfs.c b/vfs/smbfs.c index 7263ba722..34d57d63a 100644 --- a/vfs/smbfs.c +++ b/vfs/smbfs.c @@ -173,23 +173,23 @@ authinfo_get_authinfo_from_user (const char *host, g_free (title); in_user = input_new (5, istart, INPUT_COLOR, ilen, user, "auth_name"); - add_widgetl (auth_dlg, in_user, XV_WLAY_BELOWOF); + add_widget (auth_dlg, in_user); in_domain = input_new (3, istart, INPUT_COLOR, ilen, domain, "auth_domain"); - add_widgetl (auth_dlg, in_domain, XV_WLAY_NEXTCOLUMN); - add_widgetl (auth_dlg, button_new (9, b2, B_CANCEL, NORMAL_BUTTON, - buts[1], 0 ,0, "cancel"), XV_WLAY_RIGHTOF); - add_widgetl (auth_dlg, button_new (9, b0, B_ENTER, DEFPUSH_BUTTON, - buts[0], 0, 0, "ok"), XV_WLAY_CENTERROW); + add_widget (auth_dlg, in_domain); + add_widget (auth_dlg, button_new (9, b2, B_CANCEL, NORMAL_BUTTON, + buts[1], 0 ,0, "cancel")); + add_widget (auth_dlg, button_new (9, b0, B_ENTER, DEFPUSH_BUTTON, + buts[0], 0, 0, "ok")); in_password = input_new (7, istart, INPUT_COLOR, ilen, "", "auth_password"); in_password->completion_flags = 0; in_password->is_password = 1; - add_widgetl (auth_dlg, in_password, XV_WLAY_BELOWOF); + add_widget (auth_dlg, in_password); - add_widgetl (auth_dlg, label_new (7, 3, labs[2], "label-passwd"), XV_WLAY_BELOWOF); - add_widgetl (auth_dlg, label_new (5, 3, labs[1], "label-user"), XV_WLAY_BELOWOF); - add_widgetl (auth_dlg, label_new (3, 3, labs[0], "label-domain"), XV_WLAY_NEXTCOLUMN); + add_widget (auth_dlg, label_new (7, 3, labs[2], "label-passwd")); + add_widget (auth_dlg, label_new (5, 3, labs[1], "label-user")); + add_widget (auth_dlg, label_new (3, 3, labs[0], "label-domain")); run_dlg (auth_dlg);