Commit graph

299 commits

Author SHA1 Message Date
Carlos Soriano 9e9ca30c13 dbus: Implement move operation
Analog to the copy operation.
2018-08-08 14:07:48 +02:00
Carlos Soriano 60c3f2ea83 dbus-manager: Drop copy file operation
It was truly unreliable and not working clearly. We have a more powerful
and simpler API with CopyURIs, so there is no point to have this one.

This commits drops the DBus API. Note that the DBus version is not
bumped, I believe this DBus API is not used by any external service
given how broken was it.
2018-08-07 21:27:50 +02:00
Carlos Soriano 36b011a9e0 dbus-manager: Implement undo/redo
For the integration with the desktop icons extension.
2018-08-07 19:14:09 +00:00
Carlos Soriano 2543432aa1 dbus-manager: Implement creation of new folders
For the integration with the desktop icons extension.
2018-08-07 19:14:08 +00:00
Carlos Soriano 6b5be51c04 dbus-manager: Implement trashing files
So desktop icons extension can use it.
2018-08-07 19:14:08 +00:00
Carlos Soriano a4fa624abc general: Remove trash shortcut changed handling
It was introduced in 3.14, most probably everyone is in a newer version
already...

Time to clean up!
2018-07-26 19:25:15 +02:00
Carlos Soriano ac886102c2 general: Revert to allow running binaries and scripts
Recently we removed the ability to launch binaries and scripts in
commit 3a22ed5b8e.

A few cases appeared that we need to support, specially for enterprise
and content creators. Specifically, cases similar to https://gitlab.gnome.org/GNOME/nautilus/issues/434

This also shows that is hard to predict cases like these, as some
complex setups might be needed for specific workflows.

This commits allow to run binaries and scripts as before, and further
investigation in these cases need to be done if we ever want to tweak
the workflow of running binaries.

More discussion about improving binaries/script handling is being
proposed and discussed in https://gitlab.gnome.org/GNOME/nautilus/issues/443
2018-05-21 06:29:14 +00:00
Philip Langdale a1751d3d87 nautilus-application: Publish window->location mappings
This is a reworking of a long standing Ubuntu patch that publishes
the set of locations open in each Nautilus window. The motivation
for this change is that a desktop environment providing special
icons for things like removable devices and the trash can match
windows to those icons for highlighting purposes.

In the original incarnation, Unity provided these icons. In today's
world, I'm maintaining a set of patches for dash-to-dock/ubunut-dock
that provide these icons too.

The original implementation uses Xids to identify windows, but Xids
aren't a thing in Wayland so this mechanism is a dead end. Instead,
we can use the 'gtk application window object paths' which are
published over dbus by GtkApplications, including Nautilus.

Mutter already detects these, and makes them available on MetaWindows.

The original patch added the mapping property to the fileManager1
interface, and I have left that part as-is, but it's likely not to
be the right place to put it. fileManager1 is a generic interface
and a property that assumes a GTK behaviour doesn't seem right.

We could obviously add it to a new interface under org.gnome.Nautilus,
but this would be Nautilus specific - although there isn't a huge
scope for other file managers to implement this property, so perhaps
that's just fine.

dash-to-dock discussion is readable here:

https://github.com/micheleg/dash-to-dock/pull/677
2018-05-19 07:26:20 -07:00
Carlos Soriano 3a22ed5b8e general: Don't allow launching binaries or programs in general
For long we used to support that since the desktop was part of Nautilus.
Also, back then we didn't have a Software app where you are expected to
installs apps. Back then it was common for apps to be delivered in
a tarball, nowadays that's out of question.

Now that the desktop is long gone, launching binaries and desktop files
from within Nautilus is not as useful. Not only that, but we are moving
towards a more sandboxed system, and we should use the standard and
system wide support for launching apps based on users choices.

We also are not able to be secure enough to handle this, as we saw in
the past we allowed untrusted binaries to be launched, and therefore
we had a CVE (CVE-2017-14604) for Nautilus. We are not being audited
(afaik) and we are not in a position that we can let this issues slip.

With that altogether, this prevents launching binaries or programs from
Nautilus.

Closes: https://gitlab.gnome.org/GNOME/nautilus/issues/184
2018-05-09 14:24:17 +00:00
Ernestas Kulik feb69b4979 build: Use install_data() to rename icons
Since 0.46.0, Meson allows renaming files when installing them. This is
useful to replace any workarounds to achieve the same (namely, the
icons).
2018-04-28 20:22:11 +03:00
Carlos Soriano 1ed0610075 meson.build: Use proper FIXME notation 2018-04-27 14:30:57 +00:00
Ernestas Kulik 5633b13f92 build: Fix icon renaming
Currently, when looping over icon sizes, each icon is copied to
$MESON_BUILD_ROOT/@appid@.png, meaning that the file is overwritten on
every iteration. This commit fixes that by copying to a subdirectory
under the build root and installing from there.

Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/364
2018-04-14 12:34:38 +03:00
Christophe Fergeau 85715707b1 preferences: Fix MB/MiB confusion
NAUTILUS_PREFERENCES_FILE_THUMBNAIL_LIMIT really uses MiB as its unit,
not MB as we multiply its value by 1024*1024 (MEGA_TO_BASE_RATE) in
thumbnail_limit_changed_callback(). This commit changes
MEGA_TO_BASE_RATE and its maximum value so that it shows a number using
MB unit as advertised.
2018-03-30 12:51:46 +02:00
Ernestas Kulik 17ebc7e403 data/meson.build: Compile gschemas during the build
In particular this can be useful when running tests from the build
directory in Builder.
2018-03-24 18:22:14 +02:00
Ernestas Kulik df583c2e4a general: Allow running in separate instance
When hacking on Nautilus, it is very inconvenient to have to close any
running instance before running the built version. This commit enables
running three different instances by changing the application ID.
Beside the default “profile” is one crafted for stable flatpak
releases and one for development. The stable flatpak profile adds an
identifying mark to the about dialog to aid collecting information in
bug reports. The development profile is that plus additional styling to
help visually identify the development instance. It also will be used
when generating Flatpak bundles with the help of CI.

Generally, the implementation is slightly hacky to allow all the
different workflows, spanning from regular installations to GNOME
Builder flatpak builds, as each comes with its own quirks.
2018-03-18 22:28:08 +02:00
Ernestas Kulik 30a76b3033 Rename search provider file
flatpak-builder only exports data files that are prefixed with the
application ID. Without this, the Flatpak version does not enable shell
search functionality.
2018-03-18 22:28:08 +02:00
Ernestas Kulik e8d66ca9ac gschema: fix key description
Since 611f381d56, the limit is no longer
expressed in bytes.
2018-03-12 14:00:50 +00:00
Ernestas Kulik d7e30914b9 run-uncrustify.sh: invert lineup-parameters check
Inverting the checks and exiting instead will help keep indentation
levels in check.
2018-02-14 11:23:48 +02:00
Ernestas Kulik c647567569 run-uncrustify.sh: detect if uncrustify is not installed
Otherwise it will keep spamming stderr about the command not being
found.
2018-02-14 11:13:04 +02:00
Ernestas Kulik 096f8e2d4f run-uncrustify.sh: adapt to changed directory hierarchy
Extensions were moved under extensions/.
2018-02-14 11:12:33 +02:00
Ernestas Kulik 0f411dc451 uncrustify.cfg: remove superfluous semicolons
In cases where statements accidentally end with tho semicolons or where
semicolons are added needlessly (empty loop bodies), those semicolons
should be removed.
2018-02-14 11:11:17 +02:00
Carlos Soriano 27b039b37c general: Rename from 'favorite' to 'starred'
It was a mix of both terms, given that tracker uses 'favorite' but we
use 'starred' in the UI. Since the part that interact with tracker is
minimal, is better to be consistent with the UI.

This renames 'favorite' to 'starred' except the tracker queries.
2018-02-13 20:11:55 +01:00
Carlos Soriano ca8e5e1f3f general: Remove external bulk rename
In these years, I never heard any tool actually using it. Moreover, now
we offer batch rename ourselves, so let's focus our efforts on that.
2018-02-13 11:13:51 +01:00
Jeremy Bicha dbb8bd607d build: Install appstream metadata to non-deprecated location
This was already done in 5d75a4a5
but accidentally reverted in 983892a6
2018-01-30 12:33:46 -05:00
Ernestas Kulik f0df1fc510 general: only remember window size
Currently, Nautilus is able to save the last window position when it’s
closed. That is broken in certain cases (#197 and multi-monitor setups
in general) and therefore window placement is best left to the window
manager.
2018-01-16 13:23:54 +02:00
Ernestas Kulik 74b0a69b6e global-preferences: remove thumbnail-size setting
As the setting can only be changed manually (and the assumption is that
no one does that), it makes sense to not expose it and always use the
default.
2018-01-05 15:08:06 +02:00
Ernestas Kulik 983892a656 build: general cleanups
This commit does the following:
  * Canonicalize the style:
    * Use two-space indentations.
    * Un-Autotools-ify option names.
    * Don’t align arguments, simply increase indentation.
    * Don’t add a space before opening parenthesis in calls.
  * Remove unused variables.
  * Remove unused dependencies.
  * Remove config.h.meson.
  * Optimize dependencies.
  * Use disabler functionality for libselinux dependency, to save lines.
2018-01-02 12:51:32 +02:00
Ernestas Kulik 74dd9c9f72 general: remove desktop support 2018-01-02 12:51:32 +02:00
Alexandru Pandelea a9c446afe2 Add favorite files
Add option to make files Favorite, by either toggling a star in the
list view, or from the context menu.

https://bugzilla.gnome.org/show_bug.cgi?id=786039
2017-11-05 20:09:00 +01:00
Carlos Soriano 9ad049def7 Merge branch 'alexpandelea/issue65' into 'master'
remove setting fts from preference dialog

See merge request GNOME/nautilus!14
2017-11-03 16:55:54 +00:00
António Fernandes 046e9e8529 gschema: clarify/simplify some strings in the gconf schemas
Based on old pending patch by Christian Neumair on the following bug:

https://bugzilla.gnome.org/show_bug.cgi?id=309879
2017-11-02 15:57:49 +00:00
Alexandru Pandelea d33960cd1c remove setting fts from preference dialog
Instead of setting whether the search should be full text search or
not from the preference dialog, make the permanent setting from the
search popover.

https://gitlab.gnome.org/GNOME/nautilus/issues/65
2017-10-21 19:19:38 +03:00
Anders Jonsson ff5a93f608 Fix typo
(overriden -> overridden)

https://bugzilla.gnome.org/show_bug.cgi?id=786965
2017-10-14 15:13:10 +02:00
Ernestas Kulik a762659d6c build: add tests for data files
This will help avoid potentially breaking pre-release changes in the
future.

https://bugzilla.gnome.org/show_bug.cgi?id=786104
2017-08-11 14:13:07 +03:00
Jeremy Bicha 501ece61be general: Remove spaces from .desktop MimeType list
https://bugzilla.gnome.org/show_bug.cgi?id=786079
2017-08-09 20:56:49 -04:00
Carlos Soriano 1bdc404245 general: Add mime type support for archives
Until now archives were managed only if activated from Nautilus itself
and if a setting was set.

There are two main problems with this.
1- Archives opened in other apps cannot be handled by Nautilus
2- Users cannot use the regular mime type handling for setting Nautilus
as the app handling archives, or unsetting it.

This patch add support for archives mime types handled by gnome-autoar
and removes the UI and setting used in the previous version.

https://bugzilla.gnome.org/show_bug.cgi?id=771424
2017-08-09 22:07:59 +02:00
Carlos Soriano 8005c8abe1 nautilus.desktop: Remove saved-search leftovers
It was removed long ago

https://bugzilla.gnome.org/show_bug.cgi?id=771424
2017-08-09 20:27:07 +02:00
Alexandru Pandelea 11cbe223a5 implement fts
The search text can now also match the contents of a file, besides
the file name.

This is done with the help of a Tracker query, using fts:match, which
matces both the contents of a file and the filename.

The user also has the option to choose whether to use or not the
Full Text Search. This can be done with a preference, which represents
the default option when opening a new tab/window or from the search
popover.

https://bugzilla.gnome.org/show_bug.cgi?id=775961
2017-06-22 16:49:41 +03:00
Jeremy Bicha 9a0c5cdf12 autostart: Set NoDisplay=true
This hides the autostart from Ubuntu's Startup Applications
app since we don't want users to easily disable this without
understanding why it's there.

https://bugzilla.gnome.org/show_bug.cgi?id=781874
2017-04-28 08:16:08 -04:00
Ernestas Kulik 857a90c29b autotools: kill it
We’re moving to Meson this cycle, so this is losing some deadweight.

https://bugzilla.gnome.org/show_bug.cgi?id=780366
2017-03-22 17:18:29 +02:00
Jan Tojnar a67d17b142 general: Allow running uncrustify from elsewhere
run-uncrustify.sh script uses cwd relative file names, which fails
if it is ran from the repository root or other directory.

This commit fixes the paths relative to the script.

https://bugzilla.gnome.org/show_bug.cgi?id=779408
2017-03-03 17:06:18 +01:00
Ernestas Kulik ed5652c89a general: add support for Meson
Since it’s 2017 already, Nautilus should use a build system that doesn’t
take longer to set up the build than it takes to actually build. An
observed build time using Ninja of roughly one-fifth of what it took
Autotools is more than reason enough to add support for Meson. Along
with that, this commit adds a convenience script to generate a tarball
for releases, since we use libgd as a submodule and Meson does not
handle source distributions.

https://bugzilla.gnome.org/show_bug.cgi?id=778167
2017-02-24 00:24:27 +02:00
Ernestas Kulik 728300331d general: drop git.mk
This commit removes git.mk and adds hand-written gitignore files. That
is needed to ignore build/, which is the directory of choice for Meson
builds.

https://bugzilla.gnome.org/show_bug.cgi?id=778167
2017-02-24 00:24:27 +02:00
Piotr Drąg 30d6f75def gschema: fixes to new translatable strings 2017-02-15 01:54:55 +01:00
Carlos Soriano 1e5eba1d7c view-icon: add new zoom level
With the flow box we can finally add more zoom levels. Add a new larger
one so the user can view larger content.
2017-02-15 01:27:41 +01:00
Carlos Soriano 0a65897c43 gschema: make list view default when searching
Not sure when this changed, but it's a mistake since we always wanted
list view when searching as default.

Let's fix it.
2017-02-15 01:27:41 +01:00
Carlos Soriano 1d166b5e3b views: add flow box based view
After all the rework on the window slots, views, and splitting
the desktop, we are finally able to add a flow box based view for
Nautilus.

The GtkFlowBox is still not performance enough to be added as the
default view, not even as an alternative in the user preferences.
However, since the work on this is one of the biggest for Nautilus and
gtk+, the decision was to merge a prototype in order to open the
development, testing and iteration of the code in order to make it
good enough for, in a not so far away future, have it as the main view.

The work merged is not finished, and is an experiment and prototype in
more things than just the GtkFlowBox, we want to create a single shared
model with a complete MVC pattern between all the views. This will need
quite a few iterations to get it right, but once is done right, I hope
it's going to be good enough as an example to any application that wants
multiple types of views with the new widgets of gtk+.

This patch adds the GtkFlowBox view to be optionally used under a
gsetting called use-experimental-views, turned off by default.
2017-02-15 01:27:41 +01:00
Ernestas Kulik ecb7f992f5 Revert "general: use Autoconf to perform substitution"
This reverts commit 48cd7072a1.
2017-01-05 00:04:43 +02:00
Ernestas Kulik db8e84d7e3 data/Makefile.am: fix up indentation
https://bugzilla.gnome.org/show_bug.cgi?id=776796
2017-01-04 17:37:02 +02:00
Ernestas Kulik 48cd7072a1 general: use Autoconf to perform substitution
Variables in service files are substituted using sed, which takes more
space than a couple of lines in configure.ac.

https://bugzilla.gnome.org/show_bug.cgi?id=776796
2017-01-04 17:37:02 +02:00