Commit graph

23134 commits

Author SHA1 Message Date
Hugo Carvalho b0b528e19d Update Portuguese translation 2022-07-21 12:39:07 +00:00
Danial Behzadi 756220b197 Update Persian translation 2022-07-21 11:40:21 +00:00
Aleksandr Melman 6b14c28391 Update Russian translation 2022-07-21 10:08:50 +00:00
Yuri Chornoivan e1dc872ced Update Ukrainian translation 2022-07-21 06:20:23 +00:00
Corey Berla c87fb2a99c preferences: Change grid view zoom level from large to medium
To match change in 2577d98eae
2022-07-20 15:52:12 -07:00
Corey Berla 515ed15405 preferences: Update nicks to match new zoom levels
758562cd4e removed the largest sizes
from grid view and list view.  Remove those nicks and rename the
remaining nicks to match the enums.
2022-07-20 15:52:12 -07:00
Corey Berla 7c30c311e6 nautilus-window-slot: Open with correct view after navigating to other-locations
When navigating to Other Locations with "Open in New Tab" or
"Open in New Window",  you are always presented with the icon view
because view_mode_before_places was never initialized.  An uninitialized
gint == 0 (and NAUTILUS_VIEW_GRID_ID == 0).

Initialize view_mode_before_places in init to NAUTILUS_VIEW_INVALID_ID
so that it will follow the default behavior.  For best practices,
change NAUTILUS_VIEW_INVALID_ID to 0 (which would have also prevented
this issue) and NAUTILUS_VIEW_GRID_ID to 2 (matching the keyboard
shortcut).

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2281
2022-07-20 21:35:30 +00:00
António Fernandes 003d8e1cd4 location-entry: Remove rogue statement
I've failed to remove this this in 3d1c13915e

My bad!
2022-07-20 17:52:58 +02:00
Corey Berla e987a7d35f window: Add debug-info property to AdwAboutPage
Put a list of currently installed extensions in debug-info.
This shows up under Troubleshooting in the about page.
2022-07-20 15:43:48 +00:00
Corey Berla 5d5b67319a module: Keep a list of currently installed modules 2022-07-20 15:43:48 +00:00
Corey Berla 9b0fd698ea module: Add environment variable NAUTILUS_DISABLE_PLUGINS
When NAUTILUS_DISABLE_PLUGINS == TRUE, do not load plugins.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1779
2022-07-20 15:43:48 +00:00
António Fernandes 3d1c13915e location-entry: Simplify contrived special text code
It's overly complicated for no reason. Also add a comment to explain
what's the point of it all.
2022-07-20 16:03:18 +02:00
Corey Berla 1d431d1865 location-entry: Drop DnD code
There's a complex set of code to handle DnD on the location entry.
This may have been very useful in the past, but it now a very corner
case situation.  Furthermore, the Editable has a DropTarget on it
already within Gtk.  The comments themself, indicate that likely
when a user is dropping multiple URI's it's a mistake.
2022-07-20 13:52:55 +00:00
Corey Berla 295825bb7d location-entry: Add helper for inserting prefix into completion
Inserting a prefix calls insert-text which we have a signal
attached to.  Add helper nautilus_location_entry_insert_prefix()
to temporarily block the insert-text handler while we insert
the prefix.
2022-07-20 13:52:55 +00:00
Corey Berla 1c0d2d188a location-entry: Add helper for setting editable text
We are setting the editable text on the entry, which in turn
calls the insert / delete text functions on the GtkText which
is invoking the signals we attached.  We only want the insert-text
and delete-text signals to be called when the user is actually
inputting data.  Add helper nautilus_location_entry_set_text()
which temporarily blocks the signals while setting text.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2253
2022-07-20 13:52:55 +00:00
Corey Berla 60b0a8ae87 location-entry: Fix insert-text and delete-text signals
The signals are connected to the NatuilusLocationEntry, which does
not emit these signals.  Instead set it to the delegate of the
GTK_EDITABLE for the entry.
2022-07-20 13:52:55 +00:00
Yosef Or Boczko 4d5401bfcd Update Hebrew translation 2022-07-19 17:35:21 +00:00
Hugo Carvalho a71e29590f Update Portuguese translation 2022-07-19 13:18:36 +00:00
Yuri Chornoivan 3f79d04be0 Update Ukrainian translation 2022-07-19 10:24:08 +00:00
Piotr Drąg c5116637a3 Update POTFILES.in 2022-07-19 11:47:35 +02:00
Corey Berla c8afc94755 gtkplacesview: Fix property for AdwStatusPage from label to description
a336c68b08 broke the ability to load Places.
There's an incorrect property on the AdwStatusPage "label" which
presumably should be "description".  Likely this label property
persisted from when it previously was a GtkLabel. Change "label"
to "description".
2022-07-18 13:07:16 -07:00
Peter Eisenmann 856803f9d6 general: Delete no longer needed git ignores
Meson builds out-of-tree, these ignored files will never get created in
these directories. If they do, it indicates a build configuration error
and should not be hidden.
2022-07-17 23:51:03 +00:00
codeboybebop 76c59b8ecb toolbar: Fix wrong cast of GtkMenuButton
In some parts of the code, operations_button was considered as a member
of the child class of class GtkToggleButton. Which is incorrect in gtk4.
Using visibility of popover gives the intended functionality.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2313
2022-07-17 22:06:30 +00:00
António Fernandes a6c9418ed5 files-view: Add empty state for Recent 2022-07-17 18:25:21 +00:00
António Fernandes b1a30dcd7a files-view: Build from UI template
We have multiple empty state .ui files, which make little sense now
that they are so simple, thanks to AdwStatusPage.

So, instead, add a single UI file for the whole view.
2022-07-17 18:25:21 +00:00
Christopher Davis f76684fe6c general: Refine status page writing style
Updates the writing style of the status pages to follow
https://developer.gnome.org/hig/guidelines/writing-style.html.
This means making sure titles use header grammar and capitalization,
and that sentences have punctuation.
2022-07-17 18:25:21 +00:00
Christopher Davis a336c68b08 gtkplacesview: Use AdwStatusPage
The places view had placeholders in a popover and for search. These
are both use cases where we can and should use AdwStatusPage, now that
we no longer keep this code in sync with GTK.
2022-07-17 18:25:21 +00:00
Christopher Davis c158f08e5b resources: Use AdwStatusPage for empty views
libadwaita provides a widget for status/empty pages. Instead
of rolling our own lookalike, we can now use the original
since we have a GtkStack instead of a GtkOverlay managing
views.
2022-07-17 18:25:21 +00:00
Christopher Davis 7c7f7096bb files-view: Use GtkStack to manage views
The port to GTK4 allows us to rework how we structure the view
to use a more modern view management widget: GtkStack. Now instead
of managing visibility with `show()`/`hide()`, we use
`GtkStack:visible-child`.
2022-07-17 18:25:21 +00:00
António Fernandes 96493e87cc list-base: Move bg click gestures to view
We've been setting background click gestures on the view_ui widget,
which is either GtkGridView or GtkColumnView.

But this means the empty state widgets don't get to handle these
clicks. And the situation would get worse with AdwStatusPage, which
fills the whole area.

So, follow the lead of the background drop target and set the gestures
on the NautilusFilesView container itself. This has the side effect
of clicks on the floating status bar working like clicks on the empty
space. But it's not a big problem.
2022-07-17 18:25:21 +00:00
Quentin PAGÈS a9857bf4de Update Occitan translation 2022-07-17 15:33:32 +00:00
Yuri Chornoivan 53459f8fc4 Update Ukrainian translation 2022-07-16 19:44:07 +00:00
Codeboybebop 4677dbe104 nautilus-files-view.c: separated actions for creating a link
Single action for creating a link can be either enabled and visible or disabled and invisible. Creating separate action allows hiding entry in context menu without disabling a shortcut.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2315
2022-07-16 19:27:19 +00:00
Christopher Davis 2f1e0d25f6 general: Use GtkButton:icon-name more
Instead of packing a GtkImage, we can now set the icon
name on buttons directly.

GtkButton's API sets the right style classes automatically.
2022-07-16 20:02:21 +01:00
Christopher Davis f88c4a2b39 batch-rename-dialog: Use always-show-arrow for numbering order
GtkMenuButton now has the `always-show-arrow` property. This
means we don't need to pack a label and icon ourselves anymore.
2022-07-16 20:02:21 +01:00
Christopher Davis c4b9e130db Batch-rename-dialog: Use AdwButtonContent for add tag button
AdwButtonContent is a pre-made widget for this use case
that provides everything you need.
2022-07-16 20:02:21 +01:00
Christopher Davis 7c2e0c3693 general: Remove unnecessary use of receives-default
Same rationale as previous commit for `focusable`.
2022-07-16 20:02:21 +01:00
Christopher Davis 8837c869dd general: Remove unnecessary use of focusable
gtk4-builder-tool tries to port uses of `can_focus` to `focusable`,
but in real code you generally don't need to set `focusable` - the
defaults are always sensible, and removing the explicit property
means less code without any behavior change.
2022-07-16 20:02:21 +01:00
Christopher Davis 5fe9df1a39 grid-view: Don't set focusable
The view can receive focus, which causes it to draw an unnecessary
ring when focused and requires an extra focus step to get into the
items.

The view itself should not be focusable. This was set as a translation
of `can-focus`, but the semantics are different, and you generally
don't want to manually set `focusable` as the widgets set proper
defaults.
2022-07-16 20:02:20 +01:00
Corey Berla 6f81f1b46f list-base: Clear scroll_to idle handler before clearing list-base
When you the navigation buttons to go back and forth very quickly
you can reliably get Nautilus to crash.  This happens because there
is an idle timer set to scroll to the item to be selected.  If you
change the view before the scroll has happened, the handler will
attempt to scroll to a non-existent item.

Clear scroll_to_file_handle_id before clearing all view items
in real_clear().
2022-07-16 08:13:19 -07:00
Corey Berla 4a7d4c2965 pathbar: Don't make new tab active
Opening a new tab from the main view and side bar is set with
NAUTILUS_OPEN_FLAG_DONT_MAKE_ACTIVE.  Prior to
022867e3d3 this was the same for tabs opened
from the pathbar.  It appears that the change was unintentional
(GTK Open Flags don't have a "don't make active" flag).

Set new tabs as not active from the path bar.
2022-07-16 08:13:19 -07:00
Corey Berla aa1f6d50c4 toolbar: Open new tab on back/forward middle click
Middle click should open a new tab.  This is consistent with
the main view, sidebar, and pathbar.  When opening the new tab
set the location preemptively to either one location forward or
back.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1490
2022-07-16 08:13:19 -07:00
Corey Berla 802a33b3e7 window: Add helper to open new tab from a back / forward selection
Add function like nautilus_window_back_or_foward(), but instead
of acting on the current slot, open a new tab.  This will be used
when middle clicking the navigation buttons in the toolbar.
2022-07-16 08:13:10 -07:00
Corey Berla 55c6e19682 window: Move NautilusNavigationDirection from toolbar.c to window.h
We need to reuse the same enum when navigating to new tabs.
2022-07-16 08:00:50 -07:00
Codeboybebop 22ecf3809c grid-view: Make GridView fill the whole height
valign property of the widget responsible for the folder content was
set to GTK_ALIGN_START. This widget was moved to the top part of
the parent if this widget receives enough space. However, this
is not needed in this situation, since GridView already placing
folders and files from top to bottom. Also, the height of
the GridView was bounded by parent height and by some linear
function of the number of elements in a folder.
Changing valign will force the GridView to fill all allowed vertical space.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2301
2022-07-16 14:27:11 +00:00
Danial Behzadi 07fdcbe3f1 Update Persian translation 2022-07-16 13:30:44 +00:00
Piotr Drąg 6f8316b39a Update POTFILES.in 2022-07-16 13:50:57 +02:00
Yuri Chornoivan e6a4c96b87 Update Ukrainian translation 2022-07-16 05:45:41 +00:00
Hugo Carvalho d2803bb7c3 Update Portuguese translation 2022-07-15 11:18:07 +00:00
Corey Berla f5465fdf7e clipboard: Check for empty string when deserializing
It's possible that nautilus_clipbaord_from_string() receives an
empty string.  When an empty string is received nautilus crashes
because g_str_equal() cannot handle the null value returned from
g_strsplit().  We could simply change g_str_equal() to g_strcmp0()
but that opens up the possibility for the for loop to give
unexpected results (it only checks for NULL starting at index=1).

Check if the results from g_strsplit()[0] == NULL and return early.
2022-07-15 07:00:12 +00:00