Maximus5 / conemu-inside

An example, how to embed http://conemu.github.io/ into another graphical application
57 stars 42 forks source link

Unable to use settings in embedded conemu #22

Closed Therena closed 8 years ago

Therena commented 8 years ago

The settings can only be set as "XMLDocument" and are dumped to a temp folder. Therefor all the settings are dropped which are changed within the embedded control, bacuse they are written into the temp XML file.

I would be nice to have the possibility to set the path to a file as well as setting the configuration as "XMLDocument".

Maximus5 commented 8 years ago

Perhaps, the control should store modified xml after terminating ConEmu.exe? Unless developer says the settings are ReadOnly?

@hypersw BTW, if control sets "Read only" for temporary xml file, the button "Save settings" is disabled.

hypersw commented 8 years ago

Working with paths isn't quite feasible in case of the control. The control modifies some of the values to apply environmental settings for its own needs. Thus the temp file and XmlDocument. Having the customizations as an XmlDocument also ensures they at least represent valid XML, completely removing syntax error issues. For RO settings, there's no problem in loading a file and feeding it as a document.

Setting the RO flag on the file by default is a nice idea. @Maximus5

RW scenario for a long-lived control is a good point.

@Maximus5: what would one running ConEmu do if it sees its settings file modified on disk from another ConEmu instance? And if settings are also modified within it? Would it reload automatically, merge, or override fully?

Maximus5 commented 8 years ago

ConEmu does not reload modified settings (perhaps with exception of history) unless user press "Reload" button in Settings dialog.

Therena commented 8 years ago

Yes, would be also a solution which works for my if the "Save" button get disabled. Thanks.

What should I call to set the "ReadOnly"? Or should I wait until you changed it to default read only?

hypersw commented 8 years ago

Try the fresh nuget package for the control.

Therena commented 8 years ago

I will try it out this evening and inform you about the result. Thanks a lot for the help.

Therena commented 8 years ago

I have updated the nuget packages and it works as expected. Thanks a lot.