Commit graph

20427 commits

Author SHA1 Message Date
Carlos Soriano 690d79247f Flatpak: Remove disabling Selinux
Since now we have it off by default.
2018-01-30 14:39:31 +01:00
Carlos Soriano 1f8f83137f build: Turn Selinux support off by default
We were enabling Selinux support by default, which is just to show the
Selinux labels in the properties dialog.

However, this gives problem when trying to create a release since
Flatpak Sdk doesn't have Selinux I guess to be able to work in most
distros.

So with the purpose of having a proper default that works in different
distributions, let set it off by default.
2018-01-30 14:27:03 +01:00
António Fernandes 42e8658375 canvas-container: Drop get_selected_icons_bounding_box API
This is not used anymore.

We only need one bounding box, which is provided by the new
nautilus_canvas_container_get_icon_bounding_box().

So remove unused API. We can always revert this if we need it.
2018-01-30 09:13:08 +00:00
António Fernandes f164cb6d4e files-view: Avoid futile casting
We are casting (cost GdkEvent *) to (GdkEvent *)
back and forth, all because some files-view functions
don't take a pointer to const GdkEvent as argument.

But those functions don't actually change the event,
so, make them take a pointer to const GdkEvent instead
and drop unnecessary casting.
2018-01-30 09:13:08 +00:00
Jan-Michael Brummer 5d89ec5814 files-view: Open context menu on longpress
An important portion of file management functionality
is exclusively available through context menus.

Currently, when using a touchscreen, there is no way
to open a context menu.

Fix this adding a longpress gesture to popup context
menus on canvas view and list view.

Closes: https://gitlab.gnome.org/GNOME/nautilus/issues/178
2018-01-30 09:13:08 +00:00
António Fernandes e20a05ba34 view-icon-controller: Share common code for revealing and rectangle computation
Make internal function for both _reveal_rectangle_for_context_menu()
and _compute_rename_popover_pointing_to() to deduplicate the code for
rectangle computation.

Also, make internal function for both _reveal_selection() and
_reveal_rectangle_context_menu() to deduplicate the code for revealing.

Also, make internal function for both _reveal_selection() and
 _compute_rename_popover_pointing_to() to deduplicate the code for
getting the first selected item_ui.
2018-01-30 09:13:08 +00:00
António Fernandes 08732adef3 canvas-view: Share common code for rectangle computation
Make internal function for both _reveal_rectangle_for_context_menu()
and _compute_rename_popover_pointing_to() to avoid code duplication.
2018-01-30 09:13:08 +00:00
António Fernandes dd672624e7 list-view: Share common code for rectangle computation
Make internal function for both _reveal_rectangle_for_context_menu()
and _compute_rename_popover_pointing_to() to avoid code duplication.
2018-01-30 09:13:08 +00:00
António Fernandes 29cf64bd76 files-view: Pop up context menu near selection
Context menus pop up where the pointer is, which is at the
selection if the pointing device is used to open the menu.

However, if the <Menu> key or <Shift>+<F10> keyboard shortcut
are used, context menus still shows up wherever the pointer is,
which may not be near the selected item at all.

Instead, when the context menu is activated from the keyboard,
show it next to the selected item. If multiple items are selected,
show it next to the focused item. If the focus is not on a selected
item, show it next to the selected item which is sorted the lowest.
In all cases, scroll as necessary to make sure the whole item is
visible.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=102666
2018-01-30 09:13:02 +00:00
António Fernandes 489d4d091e files-view: Always pop up background menu in view
Background context menu pops up from the pointer's position, which
is good when using a poiting device to open it.

When using keyboard shortcuts to open the background context menu,
the pointer may be outside the view, so the background context menu
will pop up out of context.

Instead, when triggered from the keyboard, pop up from the center
of the view.
2018-01-29 22:28:28 +00:00
António Fernandes 72fc5a45af files-view: Unify keyboard context menu logic
When the user presses the <Menu> key or the <Shift>+<F10> combo, we
need to pop up a selection context menu or background context menu,
respectively if something is selected or not.

Currently, this logic is duplicated in list and canvas views, in
different ways, and not implemented in the new icon view at all.

Instead, handle the "popup-menu" signal in files-view. This way,
the new views get the feature for free.
2018-01-29 22:28:28 +00:00
António Fernandes 44e005079b ui-utilities: Rename and simplify pop_up_context_menu()
nautilus_pop_up_context_menu() was implemented in bb884cb6 when it was
a wrapper for gtk_menu_popup(). But gtk_menu_popup() has since
deprecated, so it was ported to gtk_menu_popup_at_pointer() in 1f57c5b1.

However, _popup_at_pointer() is not enough for our context menu needs.
We will use _popup_at_rect() and _popup_at_widget in future commits.

Rename to nautilus_pop_up_context_menu_at_pointer() to reflect this
specific use. Also, simplify the code, as GtkMenu's API already
interprets event=NULL as the current event.
2018-01-29 22:28:28 +00:00
António Fernandes 53f552e3d5 files-vies: Drop context_menu_position cache
This was used when creating new folders with manual layout,
to position them where the user had clicked.

Manual layout was removed along with nautilus-desktop, so
this cache has no use anymore. Remove it.
2018-01-29 22:28:28 +00:00
António Fernandes e26de89713 view-icon-controller: Scroll only as necessary to reveal
Currently we always scroll the item to reveal to the top.

This will scroll the item even if it is already visible
but not in the first row.

Instead, scroll as little as necessary to reveal the whole
item, matching the behavior of list view and canvas view.
2018-01-29 22:28:25 +00:00
António Fernandes f48fe9702a files-view: Reveal file to be renamed
When renaming, if the item is out of view, the popover may pop up
outside of the window or even outside of the screen.

It is conveninent to see the whole item to be renamed and provide
a visible target for the popover.

So, reveal selection before popping up a rename popover.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/5
2018-01-29 22:26:43 +00:00
António Fernandes 27593c5a1b list-view: Simplify rectangle for rename popovers
We force a rectangle with width=40 to avoid pointy popover
arrows, then we center it to the file name column.

This will not work well when reusing this for context menus.

Instead, use the file name cell's area as rectangle. It should
have enough width anyway.
2018-01-29 22:23:59 +00:00
António Fernandes 0f5fd2b3d6 Revert "nautilus-canvas-view, nautilus-view-icon-controller: Add longpress gesture to open context popup menu"
This reverts commit e874ae7060.

That commit has an incomplete commit message and didn't actually
add the gesture to view-icon-controller.

A reworked version of that commit will be reaplied at the end of
this patch set.
2018-01-28 21:28:29 +00:00
António Fernandes 6b5c1cca1f application: Remove leftover variable
This is not used since commit eed53461de

The compiler complains with [-Wunused-but-set-variable].

Remove it.
2018-01-27 14:44:23 +00:00
Daniel Mustieles 98543a3a04 Update Spanish translation 2018-01-25 12:04:37 +00:00
Balázs Meskó a95fb69d70 Update Hungarian translation 2018-01-24 19:15:58 +00:00
Carlos Soriano 68ff94bb4a Merge branch 'master' into 'master'
Add longpress gesture to open context menu

See merge request GNOME/nautilus!40
2018-01-24 17:33:31 +00:00
Carlos Soriano 82beadcce3 Merge branch 'my_work' into 'master'
general: Provide translator context for "Sort"

Closes #151

See merge request GNOME/nautilus!63
2018-01-24 15:41:12 +00:00
Timm Bäder eed53461de toolbar: Show longpress menu using gesture
The current way poses problems when dragging the window on one of the
navigation buttons, i.e. the long-press menu gets shown while dragging
the window around. Also, those signals are gone in gtk4.
2018-01-24 08:40:10 +01:00
Rahul Verma 382d8e19b0 general: Provide translator context for "Sort"
We are having an issue where "sort" was used in more than one context, so we require different translations.

The solution is to split the strings and provide context to the translators

Closes #151
2018-01-23 19:25:53 +05:30
Jan-Michael Brummer e874ae7060 nautilus-canvas-view, nautilus-view-icon-controller: Add longpress gesture to open context popup menu 2018-01-23 14:43:51 +01:00
Carlos Soriano f7d55896d5 Merge branch 'internal-thumbnailing' into 'master'
file: don’t thumbnail internally when scaling up

See merge request GNOME/nautilus!66
2018-01-22 15:48:54 +00:00
Carlos Soriano 31cc5d0653 Merge branch 'fix-216' into 'master'
rename-file-popover-controller: Don't destroy the popover in 'unmap'

Closes #216

See merge request GNOME/nautilus!65
2018-01-22 15:04:45 +00:00
Balázs Úr 83f2682c8a Update Hungarian translation 2018-01-21 21:32:03 +00:00
Ernestas Kulik 971b90d646 eel: gtk-extensions: readd removed function prototype
f0df1fc510 removed the prototype of a
function that is still being used.
2018-01-20 23:35:18 +02:00
Ernestas Kulik 7aa66bb544 file: don’t thumbnail internally when scaling up
When requesting the thumbnail icon of a file, if the requested size is
more than 25% larger than what the gnome-desktop thumbnail factory gives
us, the code tries to thumbnail the file using GdkPixbuf to avoid
possible quality degradation.

After 860f748ab2, that code path should
never be executed (but is, because of a missing change to the logic) and
is safe to remove.
2018-01-20 23:12:37 +02:00
Jordi Mas 767c1e21b6 Update Catalan translation 2018-01-20 21:36:40 +01:00
Jan Alexander Steffens (heftig) bf86a803ab
rename-file-popover-controller: Don't destroy the popover in 'unmap'
Doing that when transitions are deactivated destroys the popover in the
middle of gtk_popover_popdown, causing gtk_popover_hide_internal to
operate on a finalized popover.

Fixes #216.
2018-01-19 21:28:52 +01:00
Tim Sabsch 6528fbe3e4 Update German translation 2018-01-18 17:43:13 +00:00
Carlos Soriano 730083c5c8 Merge branch 'file-attributes' into 'master'
general: remove unused file attributes

See merge request GNOME/nautilus!62
2018-01-16 12:18:26 +00:00
Ernestas Kulik 81c4249bd5 Merge branch 'window-position-recollection' into 'master'
general: only remember window size

See merge request GNOME/nautilus!61
2018-01-16 11:57:52 +00: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 98e8242897 general: remove unused file attributes
This removes things missed in 67fdde6a9f.
2018-01-16 13:16:21 +02:00
Carlos Soriano 00aeafd304 Merge branch 'flatpak-fixes' into 'master'
Flatpak fixes

Closes #201

See merge request GNOME/nautilus!60
2018-01-15 10:42:24 +00:00
Carlos Soriano 3f6cd2feb2 Flatpak: Allow access to the whole filesystem
Nautilus as a file manager needs access to the whole file system, for
that there is a value called "host" which allows direct access to it.

Use it instead of just access to home.

Closes #201
2018-01-15 11:32:16 +01:00
Carlos Soriano 1cd19241d1 Flatpak: Remove version 3.24
Every branch has its corresponding version, no need to have older
versions in each.
2018-01-15 11:31:29 +01:00
António Fernandes 204844a4fd Merge branch 'my_work' into 'master'
Issue- -Wincompatible-pointer-types warning

Closes #192

See merge request GNOME/nautilus!59
2018-01-13 21:58:59 +00:00
Rahul Verma e01a8497e2 general: Fix-Wincompatible-pointer-types warnings
We were having an issue where we were not casting objects properly.
https://blogs.gnome.org/chergert/2018/01/05/g_object_ref-and-wincompatible-pointer-types/

The solution is to type cast explicitly to the correct type.

close #192
2018-01-14 03:09:17 +05:30
Balázs Meskó c6b4859a69 Update Hungarian translation 2018-01-12 22:33:19 +00:00
Jiri Grönroos f4d493060c Update Finnish translation 2018-01-12 15:49:31 +00:00
Carlos Soriano 074cecf409 Merge branch 'wip/antares/issue63' into 'master'
nautilus-toolbar : Add close button to close location entry

See merge request GNOME/nautilus!45
2018-01-12 08:34:02 +00:00
Karuna Grewal 09f6b6611b toolbar : Add close button to location entry
Due to the absence of an obvious way to close location entry
a close button is added to the location entry container which
can be used to close it.

Fixes : https://gitlab.gnome.org/GNOME/nautilus/issues/63
2018-01-12 13:44:03 +05:30
Carlos Soriano c66bbbdd5a Merge branch 'trash-rate-limit' into 'master'
trash-monitor: Rate limit updates

See merge request GNOME/nautilus!57
2018-01-08 17:34:16 +00:00
Ondrej Holy 3ccd29e13c trash-monitor: Rate limit updates
Trash monitor queries info from gvfsd-trash after each file monitor
change which can be problematic when too many changes happen in
a short time. Let's rate limit the number of queries...
2018-01-08 18:24:42 +01:00
Carlos Soriano 5fe3422fef Merge branch 'coverage' into 'master'
CI: report code coverage

See merge request GNOME/nautilus!55
2018-01-08 14:45:04 +00:00
Ernestas Kulik d552cd7ff7 README.md: change badge href
Currently, clicking on either badge opens the image; the typical setup
is to redirect to the commits page.
2018-01-08 16:09:41 +02:00