Re: Link



On Fri, 15 Oct 2004 16:54:08 +0000, Luc Cessieux <cessieux hotmail com> wrote:
On Fri, 15 Oct 2004 08:44:19 +0000, Luc Cessieux <cessieux hotmail com>
wrote:
It could also be a object menu point that activates the something.
URL should still be in properties (possibly even an URL list, if so
desired), and then the object menu contains and "Open" entry that uses
the URL to do whatever.

This is exactly that I want to do

Ok, that's is feasible without any ugly hacks or kludges.  Setting up
the property and menu item is easy, the interesting thing is how do
you "open" a URL from C?  I imagine there's a standard call under
Windows, and if you're just creating a Windows-specific use of Dia,
that should be fine (but requires that you compile it).  Under
Linux... I'm not sure that there is a standard way to do that, but we
could at least try to run $BROWSER.

-Lars
We could imagine a same method for open a Dia file. How are FireFox and
Mozilla to read a link?

We have a bit of code for the help menu item that actually does call
$BROWSER.  We basically assume that calling $BROWSER $URL will open
the URL in the browser, and let the browser take care of figuring out
the type and stuff.

We'd have to be a little more security conscious that the help stuff
-- it simply uses system(), which causes shell interpretation.  We'd
want  to use exec() or a variant to make sure there's no evail shell
manipulation causing other things to be run.

-Lars



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]