Re: Netscape URL drag and drop on applets.




Bruno Abrunhosa Pires Marinho <bapm@camoes.rnl.ist.utl.pt> writes:

> Hi!
> 
> On Sat, 3 Apr 1999, Miguel de Icaza wrote:
> 
> > 
> > > I want to know if it is possible to drag a Netscape URL and drop it on a
> > > applet. I have tested and I can drop gmc files from the desktop to
> > > the applets, I can drop netscape URLs on the panel but I can't drop
> > > netscape URLs on the applets.
> > 
> > The applets must support DnD for this to work.
> 
> I have implemented the support like I did on a gnome application. But on
> the application it works. I'm sending the code of the applet in
> attachment. Please note that I have the same solution on the application

I made the following change to printer.c in the gen_util applet:

diff -u -r1.16 printer.c
--- printer.c   1999/01/19 02:22:21     1.16
+++ printer.c   1999/04/06 02:40:14
@@ -112,6 +112,7 @@
        int height;
        static GtkTargetEntry drop_types [] = { 
                { "text/uri-list", 0, TARGET_URI_LIST },
+               { "_NETSCAPE_URL", 0, TARGET_URI_LIST }
        };
        static gint n_drop_types = sizeof (drop_types) / sizeof(drop_types[0]);

And I can succesfully drop onto the print applet from Netscape. 
Rejected drops don't seem to work quite right, so there
seems to be something not quite in the proxying code, but
otherwise it seems fine.

Regards,
                                        Owen



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