Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: maglevrabbit on May 26, 2016, 01:48:25 am

Title: unable to load more than one source file under ubuntu but ok under mint
Post by: maglevrabbit on May 26, 2016, 01:48:25 am
 Normal behaviour using Linux Mint is that Codeblocks will automatically start and load a source file (e.g. xxx.cpp) when i click on the file within the file manager and i have set up an association between the file type and Codeblocks. Clicking on a second or subsequent file will then load that into the running instance of Codeblocks (assuming the Environment options of Codeblocks have been set appropriately).
However, under every flavour of Ubuntu I have tried so far, only the first source file will load. Clicking on any subsequent source file will not work.

Running from a console, the console produces the error message "Warning: DDE topic ? ? ? ? ? ? ? ? ? ? ? ?@ not handled." (NOTE: question marks were contiguous with no spaces in the actual error message, but produce emoticons in the forum so i added the spaces) when trying to load a second or subsequent file into Codeblocks.

Note that I am using the version of Codeblocks that is in the Ubuntu / Mint repositories (13.12). I have also experienced this behaviour with several versions of both Mint and Ubuntu. I am currently running the latest 16.04 LTS version of Ubuntu Mate.  Note also that the same thing happens with Ubuntu standard and Ubuntu Gnome.

Odd that Linux Mint always seems to work despite Mint being based on Ubuntu!

This does not seem to me like a bug, otherwise i would have reported the problem on sourceforge as you advised, but looks more like some sort of configuration issue.

Thanks.  8)
Title: Re: unable to load more than one source file under ubuntu but ok under mint
Post by: BlueHazzard on May 27, 2016, 02:16:20 am
Quote
Odd that Linux Mint always seems to work despite Mint being based on Ubuntu!
the problem comes with the window manager. Ubuntu uses its home made unity and mint uses a gnome fork. So your problem lays in the window manager. Unity is sometimes strange...

[EDIT:] Have you the possibility to debug codeblocks?

[EDIT2:] If you turn off the setting "only one instance" does the file multiple file opening work?

greetings

Title: Re: unable to load more than one source file under ubuntu but ok under mint
Post by: oBFusCATed on May 27, 2016, 07:02:54 am
It is not a Ubuntu issue, something is broken in C::B, but I've not finished debugging it.
Title: Re: unable to load more than one source file under ubuntu but ok under mint
Post by: maglevrabbit on June 11, 2016, 01:44:07 am
FYI the new version of Mint (18 BETA) no longer works either. This is the first version of Mint that has not worked, going back about 4 or 5 versions.  :-\
Title: Re: unable to load more than one source file under ubuntu but ok under mint
Post by: maglevrabbit on June 11, 2016, 01:46:15 am
Quote
Odd that Linux Mint always seems to work despite Mint being based on Ubuntu!
the problem comes with the window manager. Ubuntu uses its home made unity and mint uses a gnome fork. So your problem lays in the window manager. Unity is sometimes strange...

[EDIT:] Have you the possibility to debug codeblocks?  ------- NO    :)

[EDIT2:] If you turn off the setting "only one instance" does the file multiple file opening work? ------------ NO  :)

greetings
Title: Re: unable to load more than one source file under ubuntu but ok under mint
Post by: oBFusCATed on June 11, 2016, 11:08:16 am
As a workaround you can always use File -> Open instead of double clicking in the File manager of your choice.
Does this work?
Title: Re: unable to load more than one source file under ubuntu but ok under mint
Post by: maglevrabbit on June 12, 2016, 01:21:40 am
As a workaround you can always use File -> Open instead of double clicking in the File manager of your choice.
Does this work?

Yes that works fine. Its just not my usual way of working. I like to have the folder with my source files open and then click on whichever i need to edit. Its quicker and more direct than going through the open file dialogs. I could of course create a project and add the files to it, but i compile and build my software from the command line, and i prefer to try and be as editor agnostic as possible - i like to be able to switch to a new editor/ide without having to relearn a new work flow.

When i got this problem i did at first try switching to Codelite. Codelite works fine when loading multiple files via the file manager, but I the code folding which i always use is rather dumb in that there seems to be no easy way to open a file in folded mode for some strange reason. Also it is not very easy to fold an opened file - you have to select the entire file and then perform a "fold selected text" function from the menu for every file you open. Life is too short.

Phil.  :)
Title: Re: unable to load more than one source file under ubuntu but ok under mint
Post by: Jenna on June 12, 2016, 09:57:45 am
Did you doublecheck your codeblocks settings ?

"Settings -> Environment... -> General settings -> Allow only one running instance" unchecked
"Settings -> Environment... -> General settings -> Use an already running instance" checked

Both for the default profile/personality (if you use more than one).

Is C::B compiled/linked against wx2.8 or wx3 ?
Does it work from console (you probably need to use full paths for the files) ?
Title: Re: unable to load more than one source file under ubuntu but ok under mint
Post by: maglevrabbit on June 14, 2016, 06:28:52 am
Did you doublecheck your codeblocks settings ?

"Settings -> Environment... -> General settings -> Allow only one running instance" unchecked
"Settings -> Environment... -> General settings -> Use an already running instance" checked

Both for the default profile/personality (if you use more than one).

Is C::B compiled/linked against wx2.8 or wx3 ?
Does it work from console (you probably need to use full paths for the files) ?

Those settings don't work, neither does having them both on.

Sorry but i have no idea how C::B was compiled - i just used the version in the distro suppository.

I tried from the console and it does not work - that was how i was able to see the error message mentioned in the original post.

Thanks.