Fancy way to display errors from a user menu?

"JD" <[email protected]>
Newsgroups gmane.comp.gnome.apps.mc.general
Message-ID <[email protected]>
Hi!

When running commands from a user menu, we just print errors to stdout, right? This makes the screen flicker, and also in order to look at those errors, you have to hide panels with C-o.

Can we somehow call the error dialog may be? Or is there any other way or a hint/workaround?

I even tried to call `%view` like this:

    = t r
    + ! t t
    d       Diff against same named files
            if [ "%d" = "%D" ]; then
                %view MSG="The two directores must be different"; printf "\n%$((($(tput cols)-${#MSG})/2))s%%s\n" " " "$MSG"
                exit 1
            fi
            if [ -f %D/%f ]; then
                mcdiff %d/%f %D/%f
            fi

...but as soon as `%view` is declared in a menu item construct, it seems to affect literally everything, including `mcdiff` command in this example (we can't somehow "close" `%view`?), which results in "Cannot get terminal settings: Inappropriate ioctl for device (25)" error. 

So, using `%view` is probably not the best possible solution after all :)

But may be there are some other ways? Printing to stdout from a menu doesn't seem like the most user-friendly solution :)


-- 
JD
_______________________________________________
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.