Hi,
> I think it's a wrong place. Whether you want to select symlinks to
> directories depends on the data you are working with, not on what kind
> of user you are.
Yes, I agree.
> This should be in the select dialog.
Done.
Select/Unselect input dialog now shows the option.
I added new functions to handle the extended input dialog and let
(only) the select/unselect dialog to use it. Other input dialogs are left
unchanged (layout, contents and calling functions).
See changelog for details.
David
diff -S ChangeLog -X .diffignore -urNp mc/src/ChangeLog mc-sel/src/ChangeLog
--- mc/src/ChangeLog Sun Jun 15 21:15:13 2003
+++ mc-sel/src/ChangeLog Wed Jun 18 12:19:37 2003
@@ -0,0 +1,18 @@
+2003-06-18 David Sterba <[EMAIL PROTECTED]>
+
+ * background.c: Set number of supported arguments for background
+ jobs to 6 due to extensions of quick dialog.
+ (background_attention): Handle the count.
+ (message_3s): Fix the incorrect number of params passed.
+ (input_dialog_help): Adjust call to real_input_dialog_help.
+ (input_dialog_help_ext): New function.
+ * cmd.c (select_cmd, unselect_cmd, reverse_selection_cmd):
+ Handle symlinked directories as directories in file selections
+ if wanted. Add a variable for it.
+ (unselect_cmd, select_cmd): Add extended option to selection dialog.
+ * main.h: Extern the variable.
+ * wtools.c (real_input_dialog_help): New param for dlg extension.
+ Split widget sets into basic and extended. Update layout of dialog.
+ (input_dialog_ext): New function. Extends the basic input dialog.
+ * wtools.h: Add new functions and extension enum.
+
diff -S ChangeLog -X .diffignore -urNp mc/src/background.c mc-sel/src/background.c
--- mc/src/background.c Mon Jun 2 20:13:43 2003
+++ mc-sel/src/background.c Wed Jun 18 12:09:20 2003
@@ -66,7 +66,7 @@ int socketpair(int, int, int, int fd[2])
/* File descriptor for talking to our parent */
static int parent_fd;
-#define MAXCALLARGS 4 /* Number of arguments supported */
+#define MAXCALLARGS 6 /* Number of arguments supported */
#define mymsg "Desde el hijo\n\r"
struct TaskList *task_list = NULL;
@@ -330,6 +330,14 @@ background_attention (int fd, void *clos
result = (*(int (*)(int, char *, char *, char *, char *))routine)
(Background, data [0], data [1], data [2], data [3]);
break;
+ case 5:
+ result = (*(int (*)(int, char *, char *, char *, char *, char *))routine)
+ (Background, data [0], data [1], data [2], data [3], data [4]);
+ break;
+ case 6:
+ result = (*(int (*)(int, char *, char *, char *, char *, char *, char *))routine)
+ (Background, data [0], data [1], data [2], data [3], data [4], data [5]);
+ break;
}
else
switch (argc){
@@ -349,6 +357,14 @@ background_attention (int fd, void *clos
result = (*(int (*)(FileOpContext *, int, char *, char *, char *, char *))routine)
(ctx, Background, data [0], data [1], data [2], data [3]);
break;
+ case 5:
+ result = (*(int (*)(FileOpContext *, int, char *, char *, char *, char *, char *))routine)
+ (ctx, Background, data [0], data [1], data [2], data [3], data [4]);
+ break;
+ case 6:
+ result = (*(int (*)(FileOpContext *, int, char *, char *, char *, char *, char *, char *))routine)
+ (ctx, Background, data [0], data [1], data [2], data [3], data [4], data [5]);
+ break;
}
/* Send the result code and the value for shared variables */
@@ -378,6 +394,14 @@ background_attention (int fd, void *clos
resstr = (*(char * (*)(char *, char *, char *, char *))routine)
(data [0], data [1], data [2], data [3]);
break;
+ case 5:
+ resstr = (*(char * (*)(char *, char *, char *, char *, char *))routine)
+ (data [0], data [1], data [2], data [3], data [4]);
+ break;
+ case 6:
+ resstr = (*(char * (*)(char *, char *, char *, char *, char *, char*))routine)
+ (data [0], data [1], data [2], data [3], data [4], data [5]);
+ break;
default: g_assert_not_reached();
}
if (resstr){
@@ -509,7 +533,7 @@ message_3s (int flags, char *title, cons
const char *str2, const char *str3)
{
if (we_are_background)
- parent_call ((void *)real_message_3s, NULL, 3, sizeof (flags), &flags,
+ parent_call ((void *)real_message_3s, NULL, 5, sizeof (flags), &flags,
strlen (title), title, strlen (str1), str1,
strlen (str2), str2, strlen (str3), str3);
else
@@ -526,7 +550,21 @@ input_dialog_help (char *header, char *t
strlen (help), help,
strlen (def_text), def_text);
else
- return real_input_dialog_help (header, text, help, def_text);
+ return real_input_dialog_help (0, header, text, help, def_text);
+}
+
+char *
+input_dialog_help_ext (DlgExtensions ext, char *header, char *text, char *help, char *def_text)
+{
+if (we_are_background)
+ return parent_call_string ((void *)real_input_dialog_help, 5,
+ sizeof (ext), &ext,
+ strlen (header), header,
+ strlen (text), text,
+ strlen (help), help,
+