Re: PATCH: use local path when dropping files onto icons



On Mon, 17 Jun 2002, Frank Worsley wrote:

> I've finally been able to finish of a patch that implements this.
> Nautilus now uses gnome_desktop_item_launch to launch desktop items.
> That avoids code duplication in nautilus/gnome-desktop.
> 
> Patch for gnome-desktop that adds a new launch option that nautilus
> requires is attached. That patch also fixes a problem in gnome-desktop
> that occurs when it gets the local path from uris incorrectly. (can
> somebody have a look at how I added that new option, is 2<<0 correct for
> that?)
> 
> Patch for nautilus makes it use the gnome-desktop stuff and cleans up
> code in the directory view. As a bonus it also includes a simple fix for
> 41773 and executable text files.
> 
> Ok to commit?

In the gnome-desktop parts:
+         GNOME_DESKTOP_ITEM_LAUNCH_APPEND_URIS = 2<<0

This should be 1<<2 (meaning the third bit set in the bitfield)

-                       path = gnome_vfs_uri_get_path (uri);
Why didn't this work?

Also the way you do it now, path should be renamed to e.g. text_uri, since 
it's not a path anymore.

In the nautilus parts:
+               if (count != total) {
+                       eel_show_error_dialog
+                               (_("This drop target only supports local files.\n\n"
+                                  "To open non-local files copy them to a local folder and then"
+                                  " drop them again."),
+                                _("Drop target only supports local files"),
+                                fm_directory_view_get_containing_window (view));
+               }

This should be a warning dialog. And it should probably mention that the 
local files were opened.


+               g_clear_error (&error);

Should be g_error_free(error)

the tree view component has some code for command: too. Does that work?

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a suicidal voodoo werewolf looking for 'the Big One.' She's a violent 
extravagent mermaid with a song in her heart and a spring in her step. They 
fight crime! 




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