Author Topic: Message window about mixed EOL file: How to switch off?  (Read 138 times)

Offline J.

  • Multiple posting newcomer
  • *
  • Posts: 25
Message window about mixed EOL file: How to switch off?
« on: May 14, 2018, 09:11:44 pm »
The IDE fires up annoying error prompt (disappearing after 1 or 2 seconds) when it encounters a mixed EOL file. How can this be switched off, as, e.g., pre-compilers might produce such files on a regular basis?

I spent some time to look around in the editor settings, but could not find anything to switch it off.

Many thanks.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10796
    • Travis build status
Re: Message window about mixed EOL file: How to switch off?
« Reply #1 on: May 14, 2018, 09:31:17 pm »
If you can to paste the exact text of the message we could find it in the code and tell if there is an option for it or there isn't.
The latter is more probable.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6188
    • My Best Post
Re: Message window about mixed EOL file: How to switch off?
« Reply #2 on: May 14, 2018, 09:32:31 pm »
Settings -> Editor
Tab: Editor Settings
Section: end-of-line options
Uncheck: Ensure Consistent EOLs

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline J.

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: Message window about mixed EOL file: How to switch off?
« Reply #3 on: May 14, 2018, 11:43:50 pm »
@oBFusCATed: Your are right, there is no option, see https://sourceforge.net/p/codeblocks/code/HEAD/tree/trunk/src/sdk/cbeditor.cpp#l674. I could post ticket for a feature request - or is it OK like that that an option could be implemented? I would appreciate that.

Code: [Select]
unsigned int delay = 2000;
    if (  ( (linesCR>0) && (linesCRLF>0) )
       || ( (linesLF>0) && (linesCRLF>0) )
       || ( (linesCR>0) && (linesLF>0) ) )
    {
        //In mixed EOL file, give the user a beep and InfoWindow notification.
        wxBell();
        InfoWindow::Display(_("Mixed Line Endings"), _("Mixed line endings found, setting mode ") + eolModeStr, delay);
    }

@Tim - unchecking "ensure consistent EOLs" prevents CB only from changing the file to consistent EOLs, but does not suppress the annoying window.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10796
    • Travis build status
Re: Message window about mixed EOL file: How to switch off?
« Reply #4 on: May 14, 2018, 11:48:21 pm »
Not sure. There are too many options already.
Also, I'm not really sure how useful this info message is.
I guess we could make a generic way to disable info messages, but it is a lot of work, so I'm not sure anyone would spend the time to do it. :(
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline J.

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: Message window about mixed EOL file: How to switch off?
« Reply #5 on: May 14, 2018, 11:53:42 pm »
Agree - One of the option with least work load would be to simply switch the message window off,  since it is not of real value to the user. Compilers usually digest mixed EOL files. At least I would be very happy to not see this message window any more.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10796
    • Travis build status
Re: Message window about mixed EOL file: How to switch off?
« Reply #6 on: May 15, 2018, 12:57:41 am »
I need more opinions, before doing anything...  8)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1824
Re: Message window about mixed EOL file: How to switch off?
« Reply #7 on: May 15, 2018, 01:09:46 am »
Not sure. There are too many options already.

i am strongly counter this opinion... Options are beautiful.. This whole bullshit lately with all programs removing options is a bad move... In the 90 every program had a terrible config file and tons of options to set and everyone was confused, but every one could make the program how he wanted, because there are 1000s usecases out there, and one solution for one will not fit for someone else. Nowadays nothing is configurable anymore. This is so annoying, i have to stick with the opinion of the developer. This are huge steps back in times where the resources where restricted... options are not that bad. The bad thing is the UI and with this the UX. A nice solution about this has eclipse. Simply let the user search for the option. Or don't add a ui and use only a config file is even a better option. Firefox UI is also nice with the about:config... On the other way the codeblocks UI for settings is awful, i agree with that. It is impossible to find a setting and the view wastes tons of space with the symbols on the side, that are completely useless...