| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This reverts commit dd021bedc6a3dae42e2881a5077720a8fff764b9.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Historically, Epiphany did not permit declarations after the first
statement in a block due to its use of AX_COMPILER_FLAGS, which adds
-Werror=declaration-after-statement when compiling C files. But I
dropped this in switching to meson, thinking we would adopt a more
modern code style.
There are two schools of thought here:
(1) It's safest and cleanest to limit variable declarations to the
smallest-possible scope. I'm a firm believer in this rule and I
almost always follow it when writing C++.
(2) It just doesn't look very good in C, especially with GNOME code
style.
I'm starting to become sympathetic to (2). Especially now that we are
starting to use autofrees and autoptrs all over the place, I find that
declaring these at point of first use causes the code to become rather
cluttered.
There is not much code in Epiphany that violates the rule because we
only recently began to allow it, so not much to clean up.
The only code that really does not benefit from this is the profile
migrator code, which probably overuses local variables. I'd call that an
exception rather than the rule.
Let's sneak in -Werror=implicit-function-declaration at the same time,
since this is always a serious bug.
|
|
|
|
| |
This reverts commit 2f51e6b45d17a87dc6293bd1d859505d9bb1411f.
|
|
|
|
|
| |
Anything that doesn't exist at process launch time will not be mounted
in the sandbox.
|
| |
|
| |
|
|
|
|
| |
This just more accurately reflects what it actually is.
|
|
|
|
| |
Fixes #182
|
|
|
|
|
|
|
|
| |
This does reduce file sharing but that is required anyway
for the sandbox since web apps don't have read access to the
same directories.
Fixes #477
|
|
|
|
|
| |
This layout better reflects how the sandbox expects with the top
level XDG directories containing prgname matching directories.
|
|
|
|
|
|
| |
This broke in f601feb4c0b0e8aabf5885e56fe6423b73f21fff. We have to pass
--new-window now to get a new window; otherwise, it creates a new tab.
Fixes #657
|
|
|
|
|
|
|
|
|
|
|
| |
In cd0e4ef1 I "cleverly" reimplemented ephy_file_browse_to() to remove
the need for the MIME type parameter, but it was too clever. The new
implementation only opened the parent directory of the file without
actually browsing to the file within that directory.
I don't want to revert, because I don't want ephy_file_launch_handler()
to know about MIME types anymore. Instead, we can share code with
ephy_file_open_uri_in_default_browser().
|
|
|
|
|
| |
Remove some unused parameters, make sure we warn on failure, convert to
autoptrs, etc.
|
|
|
|
|
|
|
|
|
| |
Since calling these functions now results in a crash, let's make it
harder to use them by adding EphyFileHelpersNotFlatpakTag, which just
forces the caller to pass an ugly enum value
EPHY_FILE_HELPERS_I_UNDERSTAND_I_MUST_NOT_USE_THIS_FUNCTION_UNDER_FLATPAK
in order to use any of the functions. Ugliness is a feature here, not a
bug, to draw scrutiny to any code that might be using these functions.
|
|
|
|
| |
A lot of unused stuff in here!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Opening files regressed in 7c8f19af448d42cb498bd729f498f49ebcd554c6.
EphyDownload always passes NULL for MIME type, so we skip all the code
for launching applications. Oops.
Instead of reverting this commit, let's delete all the code! We can
simplify file launching in several ways:
(1) ephy_embed_shell_launch_handler() is no longer needed at all. It's a
a wrapper around ephy_file_launch_handler() that just checks to ensure
Epiphany is not launching itself, to avoid recursive launching. This is
no longer needed because we no longer open files automatically under any
circumstances, so recursive launching is no longer possible (unless the
user manually opens the same file again and again for fun or something).
Remove this function altogether. EphyDownload can use
ephy_file_launch_handler() directly instead.
(2) Delete the test for ephy_embed_shell_launch_handler(), since it only
tests to ensure we avoid recursive launching, which is, again, no longer
a problem.
(3) ephy_file_launch_handler() doesn't actually need the MIME type for
anything, except for use by ephy_file_browse_to(). So get rid of it from
all associated functions. Reimplement ephy_file_browse_to() without it.
(The MIME type used to be important for making sure it's safe to
automatically open a file, but we never do that anymore.) A mistake
regarding the MIME types is what introduced the bug that triggered this
investigation, so eliminating it altogether seems worth it, especially
when it's only used in the corner case of ephy_file_browse_to().
(4) Make ephy_file_launch_handler() automatically launch via URI handler
when running in flatpak. This way, higher-level code no longer needs to
decide between using ephy_file_launch_handler() and
ephy_file_launch_file_via_uri_handler() based on whether flatpak is in
use.
(5) ephy_file_launch_file_via_uri_handler() and
ephy_file_launch_via_uri_handler() no longer need to be public, and can
be compressed into one function. ephy_file_launch_application also no
longer needs to be public.
(6) Add assertions to ephy_file_browse_to(),
ephy_file_launch_desktop_file(), and
ephy_file_open_uri_in_default_browser() to ensure they are never called
when running in flatpak, since it's impossible to make them work
(because the only way to open files in flatpak is via the OpenURI
portal, which gives the user, not the application, the choice of which
application to open). It's already impossible for any of these functions
to be called inside flatpak. (Hopefully! :)
I tried to split this up into separate commits, but it got rather
complicated, so here it is as an all-in-one.
Note this consequently fixes opening downloaded files in flatpak, albeit
not in the simplest-possible way.
|
|
|
|
|
|
|
|
| |
This was a mistake in 9d54c689. It doesn't make sense for the downloads
directory to ever be ~/Desktop under flatpak, because it won't ever be
writable. (I'm not sure why it passes on our CI; maybe the tests don't
actually run inside the flatpak sandbox?) Better to just skip this test
under flatpak.
|
|
|
|
|
|
| |
Fix ephy_file_get_downloads_dir () returning the wrong value for Desktop keys and reenable test for ephy-file-helpers.
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/419
|
|
|
|
| |
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/310
|
|
|
|
|
|
|
|
| |
Add a new file helpers flag to indicate it's a private profile for
testing. In testing mode, we should never use the user dot dir, so this
private profile dir should be considered the default one.
https://bugzilla.gnome.org/show_bug.cgi?id=759256
|
|
|
|
|
| |
As usual, there are multiple ways to fix this, but here is what I think
looks best....
|
| |
|
|
|
|
| |
We always need to download into ~/Downloads
|
|
|
|
| |
This function is intended for use in hash tables.
|
| |
|
| |
|
|
|
|
|
|
| |
There is already a different menu item to get an incognito window.
https://bugzilla.gnome.org/show_bug.cgi?id=723185
|
|
|
|
| |
Fixes segfault when trying to open a download file.
|
|
|
|
| |
And get rid of ephy_file()
|
|
|
|
|
|
|
|
| |
To use GMP.
Because a few GPLv3+ files had already snuck in by mistake.
And because http://www.gnu.org/licenses/rms-why-gplv3.html
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a better future. Apologies when your 'git blame' resolves to this.
I'm actually really impressed how well uncrustify works. This required
only a little one-time manual work to avoid extra space in 'else {'.
This breaks function prototype alignment, but we should get rid of most
of those anyway.
We decided to start aligning function parameters, like other GNOME
applications. It looks nicer this way, and I couldn't teach uncrustify
the previous Epiphany style.
|
|
|
|
|
|
|
| |
* Let's not rename downloaded files
* g_application_get_application_id is a thing
https://bugzilla.gnome.org/show_bug.cgi?id=610586
|
|
|
|
|
|
|
|
|
| |
When Epiphany is run with --profile and a relative path to the profile
dir, it mostly works fine, with the exception of a bunch of criticals
coming from EphyUriTester. Fix it here so the rest of the code doesn't
have to worry about relative paths.
https://bugzilla.gnome.org/show_bug.cgi?id=762762
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=760667
|
| |
|
| |
|
|
|
|
|
|
| |
String literals are 'const char[]' when -Wwrite-strings is used.
https://bugzilla.gnome.org/show_bug.cgi?id=759200
|
| |
|
|
|
|
|
|
| |
ephy_ensure_dir_exists() is supposed to be generic function, not only to
ensure dot dir exists. We don't want to create the migration version
file every time a new directory is created.
|
|
|
|
|
|
| |
It always returns the main default dot dir, no matter what the current
profile is. This is needed because some private profiles could need to
use the default dot dir, for example, web applications.
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=750275
|
|
|
|
|
|
|
|
| |
Behavior change: debug mode is now enabled by default for builds from
git (but not for tarball builds). Now I don't need to pass --enable-debug
in my module_autogenargs in jhbuildrc anymore, yay!
https://wiki.gnome.org/Projects/GnomeCommon/Migration
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=749454
|
|
|
|
| |
The directory iterator is not advanced.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation is checking the given error pointer to check if an
error ocurred, instead of checking the pointer pointed by the passed in
error. This means that it is always failing when an error is passed, but
it works in most of the cases when NULL is passed because the return value
of functions is checked too. There's still a problem when
g_file_enumerator_next_file() returns NULL, because in case of error we
are considering it as end of enumeration. We can simplify the
implementation and the caller code, by using the stdio API instead of
GIO, since we know we are dealing with local files anyway and we are
using the synchronous API.
|
|
|
|
| |
Helper function to open the given uri in the default browser
|