diff options
author | George Lebl <jirka@5z.com> | 2001-12-08 18:52:34 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2001-12-08 18:52:34 +0000 |
commit | 230754f549fcf6cf36e99af903ad950b8036c57e (patch) | |
tree | 53bb63cb7cfca066542b162388d1474a8559e96f /libgnome-desktop/gnome-desktop-item.h | |
parent | 8acfaced530807d4fd6289c2a000e3e11ce3c264 (diff) | |
download | gnome-desktop-230754f549fcf6cf36e99af903ad950b8036c57e.tar.gz |
Make launching standards compliant and realize that the standard sucks
Sat Dec 08 11:27:35 2001 George Lebl <jirka@5z.com>
* gnome-desktop-item.[ch]: Make launching standards compliant and
realize that the standard sucks donkeyballs. It's utterly
ambiguous. I try to handle the corner cases but I dunno if I'm
right. Needs more clarification.
Diffstat (limited to 'libgnome-desktop/gnome-desktop-item.h')
-rw-r--r-- | libgnome-desktop/gnome-desktop-item.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/libgnome-desktop/gnome-desktop-item.h b/libgnome-desktop/gnome-desktop-item.h index 9eeba891..eb229350 100644 --- a/libgnome-desktop/gnome-desktop-item.h +++ b/libgnome-desktop/gnome-desktop-item.h @@ -97,9 +97,19 @@ typedef enum { } GnomeDesktopItemLoadFlags; typedef enum { + /* Never launch more instances even if the app can only + * handle one file and we have passed many */ + GNOME_DESKTOP_ITEM_LAUNCH_ONLY_ONE = 1<<0 +} GnomeDesktopItemLaunchFlags; + +typedef enum { GNOME_DESKTOP_ITEM_ERROR_NO_FILENAME /* No filename set or given on save */, GNOME_DESKTOP_ITEM_ERROR_UNKNOWN_ENCODING /* Unknown encoding of the file */, - GNOME_DESKTOP_ITEM_ERROR_CANNOT_OPEN /* Cannot open file */ + GNOME_DESKTOP_ITEM_ERROR_CANNOT_OPEN /* Cannot open file */, + GNOME_DESKTOP_ITEM_ERROR_NO_EXEC_STRING /* Cannot launch due to no execute string */, + GNOME_DESKTOP_ITEM_ERROR_BAD_EXEC_STRING /* Cannot launch due to bad execute string */, + GNOME_DESKTOP_ITEM_ERROR_NO_URL /* No URL on a url entry*/, + GNOME_DESKTOP_ITEM_ERROR_NOT_LAUNCHABLE /* Not a launchable type of item */ } GnomeDesktopItemError; /* Note that functions can also return the G_FILE_ERROR_* errors */ @@ -124,15 +134,16 @@ gboolean gnome_desktop_item_save (GnomeDesktopItem GError **error); GnomeDesktopItem * gnome_desktop_item_ref (GnomeDesktopItem *item); void gnome_desktop_item_unref (GnomeDesktopItem *item); -int gnome_desktop_item_launch (const GnomeDesktopItem *item, - int argc, - char **argv, +int gnome_desktop_item_launch (const GnomeDesktopItem *item, + GList *file_list, + GnomeDesktopItemLaunchFlags flags, GError **error); /* A list of files or urls dropped onto an icon This is the output * of gnome_vfs_uri_list_parse */ int gnome_desktop_item_drop_uri_list (const GnomeDesktopItem *item, - GList *uri_list, + const char *uri_list, + GnomeDesktopItemLaunchFlags flags, GError **error); gboolean gnome_desktop_item_exists (const GnomeDesktopItem *item); |