Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.sc and .scd links in Help should open in scide #402

Closed
lijon opened this issue Aug 20, 2012 · 7 comments
Closed

.sc and .scd links in Help should open in scide #402

lijon opened this issue Aug 20, 2012 · 7 comments

Comments

@lijon
Copy link
Member

lijon commented Aug 20, 2012

When clicking on a link to a .sc or .scd file in Help, it should open in the IDE.

Currently it boils down to String-openOS, which would work if we could assign SC-IDE as default program for .sc and .scd files. But at least on Ubuntu, SC-IDE does not show up in the list of applications for assigning to filetypes.
Seems to work on OSX, though!

@lijon
Copy link
Member Author

lijon commented Aug 20, 2012

Also, the .sc and .scd files are not recognized as text/x-sc, but text/plain or text/x-csrc.

@timblechmann
Copy link
Contributor

to register the mime-types, one has to run `update-mime-types' or he like. for the record:
http://www.cmake.org/pipermail/cmake/2010-September/039413.html

integrating it with scdoc is a bit tricky:i'm currently trying to implement the logic that xdg-open will open the files in the sc-ide instance with the lowest ID (using QLocalServer). it somehow seems to work, but if we want to open the file in the current ScIDE instance, then we should avoid xdg-open, but do it manually via a new ScDOC-*open method.

@lijon
Copy link
Member Author

lijon commented Aug 21, 2012

Why not just create a mime type for *.schelp files too? Then xdg-open will just work for these as well.

@timblechmann
Copy link
Contributor

that should be done in any case. however if you have two instances of scide running, there is no guarantee that it will be opened in the one that owns the sclang process which calls xdg-open

@timblechmann
Copy link
Contributor

lijon, i've implementen an ScIDE-*open method. how can this be integrated into SCDoc?

@lijon
Copy link
Member Author

lijon commented Aug 26, 2012

It's actually not about SCDoc, but the HelpBrowser IIRC. Somewhere these is a call to openOS (or to some method that trickles down to openOS), which could be replaced with ScIDE-open. But I think it calls something like openTextFile or similar which first tries Document.open. So best might be to implement that part of Document, and it might "just work".

@timblechmann
Copy link
Contributor

thanks. i've adapted String-openDocument to open sc and scd inside the ide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants