Browse Source

Ticket #2268 (FISH: hide panels before connecting)

FISH: now hide the panel before connecting.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Ilia Maslakov 14 years ago
parent
commit
3ba4abac41
3 changed files with 24 additions and 4 deletions
  1. 10 1
      lib/vfs/mc-vfs/fish.c
  2. 10 2
      src/execute.c
  3. 4 1
      src/execute.h

+ 10 - 1
lib/vfs/mc-vfs/fish.c

@@ -6,7 +6,8 @@
 
    Written by: 1998 Pavel Machek
    Spaces fix: 2000 Michal Svec
-               2010 Andrew Borobin
+               2010 Andrew Borodin
+               2010 Slava Zanko
                2010 Ilia Maslakov
 
    Derived from ftpfs.c.
@@ -73,6 +74,7 @@
 
 #include "fish.h"
 #include "fishdef.h"
+#include "src/execute.h"        /* pre_exec, post_exec */
 
 int fish_directory_timeout = 900;
 
@@ -355,6 +357,9 @@ fish_getcwd (struct vfs_class *me, struct vfs_s_super *super)
 static int
 fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super)
 {
+
+    /* hide panels */
+    pre_exec ();
     {
         char gbuf[10];
         const char *argv[10];   /* All of 10 is used now */
@@ -440,6 +445,10 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super)
      * Run `start_fish_server'. If it doesn't exist - no problem,
      * we'll talk directly to the shell.
      */
+
+    /* show panels */
+    post_exec ();
+
     if (fish_command
         (me, super, WAIT_REPLY,
          "#FISH\necho; start_fish_server 2>&1; echo '### 200'\n") != COMPLETE)

+ 10 - 2
src/execute.c

@@ -91,13 +91,21 @@ edition_pre_exec (void)
 
 
 /* Set up the terminal before executing a program */
-static void
+void
 pre_exec (void)
 {
-    use_dash (0);
+    use_dash (FALSE);
     edition_pre_exec ();
 }
 
+/* Hide the terminal after executing a program */
+void
+post_exec (void)
+{
+    edition_post_exec ();
+    use_dash (TRUE);
+}
+
 
 #ifdef HAVE_SUBSHELL_SUPPORT
 static void

+ 4 - 1
src/execute.h

@@ -26,4 +26,7 @@ void suspend_cmd (void);
 /* Execute command on a filename that can be on VFS */
 void execute_with_vfs_arg (const char *command, const char *filename);
 
-#endif /* !MC_EXECUTE_H */
+void post_exec (void);
+void pre_exec (void);
+
+#endif /* MC_EXECUTE_H */