diff options
author | Xan Lopez <xan@igalia.com> | 2012-12-12 00:29:19 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-12-12 19:22:33 +0800 |
commit | 6ede0c3ebcbc129ea1112ee9f43427231ab50e07 (patch) | |
tree | a7914732e5ce2b86eeaf7d44956371c610d341e4 /lib/ephy-file-helpers.h | |
parent | 7f6211d2901f70d571f18106bf97ff636712a712 (diff) | |
download | gsoc2013-epiphany-6ede0c3ebcbc129ea1112ee9f43427231ab50e07.tar gsoc2013-epiphany-6ede0c3ebcbc129ea1112ee9f43427231ab50e07.tar.gz gsoc2013-epiphany-6ede0c3ebcbc129ea1112ee9f43427231ab50e07.tar.bz2 gsoc2013-epiphany-6ede0c3ebcbc129ea1112ee9f43427231ab50e07.tar.lz gsoc2013-epiphany-6ede0c3ebcbc129ea1112ee9f43427231ab50e07.tar.xz gsoc2013-epiphany-6ede0c3ebcbc129ea1112ee9f43427231ab50e07.tar.zst gsoc2013-epiphany-6ede0c3ebcbc129ea1112ee9f43427231ab50e07.zip |
Handle a bit more gracefully the self-launch detection
Check whether the app that will launch a given download is actually
the browser itself, and do nothing *before* going ahead. Seems better
than actually launching and then aborting on startup through UUID
hacks.
Diffstat (limited to 'lib/ephy-file-helpers.h')
-rw-r--r-- | lib/ephy-file-helpers.h | 82 |
1 files changed, 42 insertions, 40 deletions
diff --git a/lib/ephy-file-helpers.h b/lib/ephy-file-helpers.h index fc50c638d..a80f45084 100644 --- a/lib/ephy-file-helpers.h +++ b/lib/ephy-file-helpers.h @@ -52,46 +52,48 @@ typedef enum #define EPHY_UUID_ENVVAR "EPHY_UNIQUE" -gboolean ephy_file_helpers_init (const char *profile_dir, - EphyFileHelpersFlags flags, - GError **error); -const char * ephy_file (const char *filename); -const char * ephy_dot_dir (void); -gboolean ephy_dot_dir_is_default (void); -void ephy_file_helpers_shutdown (void); -char * ephy_file_get_downloads_dir (void); -char * ephy_file_desktop_dir (void); -const char * ephy_file_tmp_dir (void); -char * ephy_file_tmp_filename (const char *base, - const char *extension); -gboolean ephy_ensure_dir_exists (const char *dir, - GError **); -GSList * ephy_file_find (const char *path, - const char *fname, - gint maxdepth); -gboolean ephy_file_switch_temp_file (GFile *file_dest, - GFile *file_temp); -void ephy_file_delete_on_exit (GFile *file); -EphyMimePermission ephy_file_check_mime (const char *mime_type); -gboolean ephy_file_launch_desktop_file (const char *filename, - const char *parameter, - guint32 user_time, - GtkWidget *widget); -gboolean ephy_file_launch_application (GAppInfo *app, - GList *files, - guint32 user_time, - GtkWidget *widget); -gboolean ephy_file_launch_handler (const char *mime_type, - GFile *file, - guint32 user_time); -gboolean ephy_file_browse_to (GFile *file, - guint32 user_time); -gboolean ephy_file_delete_dir_recursively (GFile *file, - GError **error); -void ephy_file_delete_uri (const char *uri); -char * ephy_file_create_data_uri_for_filename (const char *filename, - const char *mime_type); -char * ephy_sanitize_filename (char *filename); +gboolean ephy_file_helpers_init (const char *profile_dir, + EphyFileHelpersFlags flags, + GError **error); +const char * ephy_file (const char *filename); +const char * ephy_dot_dir (void); +gboolean ephy_dot_dir_is_default (void); +void ephy_file_helpers_shutdown (void); +char * ephy_file_get_downloads_dir (void); +char * ephy_file_desktop_dir (void); +const char * ephy_file_tmp_dir (void); +char * ephy_file_tmp_filename (const char *base, + const char *extension); +gboolean ephy_ensure_dir_exists (const char *dir, + GError **); +GSList * ephy_file_find (const char *path, + const char *fname, + gint maxdepth); +gboolean ephy_file_switch_temp_file (GFile *file_dest, + GFile *file_temp); +void ephy_file_delete_on_exit (GFile *file); +EphyMimePermission ephy_file_check_mime (const char *mime_type); +gboolean ephy_file_launch_desktop_file (const char *filename, + const char *parameter, + guint32 user_time, + GtkWidget *widget); +gboolean ephy_file_launch_application (GAppInfo *app, + GList *files, + guint32 user_time, + GtkWidget *widget); +gboolean ephy_file_launch_handler (const char *mime_type, + GFile *file, + guint32 user_time); +gboolean ephy_file_browse_to (GFile *file, + guint32 user_time); +gboolean ephy_file_delete_dir_recursively (GFile *file, + GError **error); +void ephy_file_delete_uri (const char *uri); +char * ephy_file_create_data_uri_for_filename (const char *filename, + const char *mime_type); +char * ephy_sanitize_filename (char *filename); +GAppInfo * ephy_file_launcher_get_app_info_for_file (GFile *file, + const char *mime_type); G_END_DECLS |