summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* preferences: Drop executable-text-activation settingwip/antoniof/run-program-context-menuAntónio Fernandes2021-02-025-125/+2
| | | | | | | | | | | | | | | | Whe the ASK option gone, the only alternative to the default is RUN. This option is not safe: it's too easy to accidentally run programs. Now we have a "Run as a Program" action in the context menu, which is available by default (no configuration required) and safe (clearly labeled, intentionally chosen). So, remove the RUN option is no longer necessary, and with it we can remove the preference from both the UI and GSettings schemas. Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1700 Discussed in https://gitlab.gnome.org/GNOME/nautilus/-/issues/443
* mime-actions: Drop ACTIVATION_ACTION_ASKAntónio Fernandes2021-01-065-126/+4
| | | | | | | | | | | | | | | | | | There is an option in Preferences which enables a dialog asking users what they intend to do when they double-click an executable text file: open as a text file or run as a program? The dialog asking that question has known design problems, but they remain unaddressed, which is not surprising because it's non-default. Now, with the new menu item added in the last commit, the two options ("Open" and "Run as a Program") are both available by default in the context menu, so there is no need to ask the question in a dialog. Remove the option, the dialog, and the related code. Closes https://bugzilla.gnome.org/show_bug.cgi?id=598671 Part of https://gitlab.gnome.org/GNOME/nautilus/-/issues/1700
* files-view: Add action to run files as programsAntónio Fernandes2021-01-062-0/+76
| | | | | | | | | | | | | | | By default, when as executable text file is activated (by double-click, pressing <Return>, etc.), it opens as a regular text file (usually with a text editor). This is a safe and consistent behavior, but it makes runing scripts harder than it needs to be, requiring configuration by the user. Address this by introducing a new context menu action to run files as programs. (The code for this action was adapted from mime-actions.c.) Required for https://gitlab.gnome.org/GNOME/nautilus/-/issues/1700 Discussed in https://gitlab.gnome.org/GNOME/nautilus/-/issues/443
* properties-window: Add created row to the basic pageApoorv Sachan2021-01-052-10/+60
| | | | | | | | The NautilusFile backend now supports birth-time parameter. It is now leveraged to display the date-created for a file in properties dialogue. Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1566
* column-utilities: Add Created date columnAntónio Fernandes2021-01-052-1/+11
| | | | | | | Now that we have backend support for showing and sorting by btime, add an optional "Created" column to the list view. This enables using the attribute as caption for icon view too.
* general: Support sorting by creation dateAntónio Fernandes2021-01-056-2/+48
| | | | No user visible changes yet.
* file: Add "date_created" attributeAntónio Fernandes2021-01-054-3/+59
| | | | | | | | | GIO 2.66 introduces support for Linux statx stx_btime.[0] First, let's add support for this attribute in our file models. No user-visible changes yet. [0] https://gitlab.gnome.org/GNOME/glib/-/commit/a396fa9027bf9aaab0697789fe38efec53b09431
* list-view: Don't leak container arraywip/antoniof/meets-valgrindAntónio Fernandes2021-01-051-2/+7
| | | | | | | | When converting the array into a list, the list takes the data. But the original container is leaked. Get the array inside the helper function and free it after its data is taken. Also rename the helper funcion appropriately.
* application: Don't leak container arrayAntónio Fernandes2021-01-051-1/+1
| | | | | | | | | | | | | | We extract an array constant strings from a GVariant dict using the "^a&s" format string, which is equivalent to g_variant_get_strv() [0] g_variant_get_srtv() is "(transfer container)", meaning the caller owns the array. However, we don't free the array, resulting in a memory leak. [2] Use autocleanup to fix the leak. [0] https://developer.gnome.org/glib/stable/gvariant-format-strings.html#gvariant-format-strings-convenience [1] https://developer.gnome.org/glib/stable/glib-GVariant.html#g-variant-get-strv
* tag-manager: Release home GFile in ::finalizeAntónio Fernandes2021-01-051-0/+1
|
* tag-manager: Don't leak stamp path stringAntónio Fernandes2021-01-051-3/+6
| | | | Also respect code style (return type in different line).
* tag-manager: Don't leak singleton referencesAntónio Fernandes2021-01-056-17/+18
| | | | | | | | | | | | We are leaking references to the singleton object in multiple places. It's not a problem during runtime, but this means it's not properly finalized when the application quits, leaking the tracker connection, which is detected by valgrind. Add g_autoptr() and g_clear_object() where missing. Also, to prevent future leaks, document nautilus_tag_manager_get() and uniformize its use as either an autovariable initializer or a field initializer.
* bookmark-list: Unref obj on each loop iterationAntónio Fernandes2021-01-051-1/+2
| | | | | | Autocleanup works only at the end of the scope it's declared. So, it must be declared inside the loop to work as intended here.
* window: Don't leak bookmark location GFileAntónio Fernandes2021-01-051-1/+1
|
* toolbar: Don't leak builder objectAntónio Fernandes2021-01-051-1/+1
|
* toolbar: Don't leak menu modelsAntónio Fernandes2021-01-051-2/+8
| | | | g_object_get() returns a ref to the property object. We must unref it.
* window-slot: Don't leak menus on destructionAntónio Fernandes2021-01-051-0/+3
| | | | | | | | We hold a ref since commit 6b16de613dc87b9f84d87a46ac5987b6d7087a5c But we never release it on slot destruction, so it leaks. Release it on destruction.
* window-slot: Don't leak icon referenceAntónio Fernandes2021-01-051-1/+1
| | | | | | | | g_value_set_object() increases the reference count of the passed object But we already own a reference, so we end up leaking it. Use g_value_take_object() to reuse the owned reference instead.
* meson.build: Don't suffix VERSION with '-stable'940-maybe-don-t-show-stable-in-about-dialogAntónio Fernandes2021-01-051-2/+10
| | | | | | It is visible in the about dialog and may be wrong. Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/940
* progress-info-widget: Make button circular, not ellipticalStephen Ransom2020-12-312-6/+1
| | | | | | | | | | When copying file(s), the Operations 'stop' button is elliptical, but it should be circular. So, replace our custom .nautilus-cirular-button class with .circular, for which GTK employs the necessary stylesheet magic. Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1483
* preferences-window: Change label idsJeff Miller2020-12-311-41/+41
| | | | | | | | | | | | Label ids are employed to describe relations between widgets for accessibility support. However, we are using numbers for ids, which is harder for human readers. To make it easier, change the ids to meaningful names. Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1420
* Update Catalan translationJordi Mas2020-12-291-107/+98
|
* window: Don't change default tab closing behaviourignapk2020-12-291-32/+1
| | | | | | | | | | | | | | Currently when closing the currently focused slot, the next slot to gain focus is the earliest created. This is because the default behaviour, which is to open the next tab at the same position or the new last tab if the previous tab was closed, used in other gnome apps like epiphany and terminal is overriden by manually setting active slot to earliest inactive one. To provide consistent behaviour, remove code that overwrites the default gtk notebook tab closing behaviour. Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1567
* properties-window: Use g_clear_*()António Fernandes2020-12-221-43/+13
| | | | They cut on boilerplate and improve readability.
* properties-window: Use modern GList code patternsAntónio Fernandes2020-12-221-102/+47
| | | | | | | | | - Use GList API instead of reimplementing it: - g_list_copy_deep() - g_list_foreach() - g_list_delete_link() - NULL-initialize fully-owned lists. - Don't reimplement nautilus_mime_get_default_application_for_file()
* properties-window: Stop multi-file GAppInfo leakAntónio Fernandes2020-12-221-2/+4
| | | | | | | | | | | | When showing the properties for multiple files with the same MIME type, The app_info variable is reassigned multiple times in a for loop to the return value of nautilus_mime_get_default_application_for_file(), which returns a caller-owned refference. So, we leak a reference on each reassignment. To fix this, declare the variable inside the loop block, to ensure autocleanup after each loop iteration.
* properties-window: Use autocleanup variables moreAntónio Fernandes2020-12-221-123/+68
| | | | | | | Also fixes a few leaks: *uri in setup_volume_usage_widget() *error in set_as_default_clicked_cb() *message in set_as_default_clicked_cb()
* properties-window: Use autocleanup variablesApoorv Sachan2020-12-221-139/+62
| | | | Use modern GLib utilities for memory management.
* properties-window: Set boolean object data correctlyAntónio Fernandes2020-12-221-2/+2
| | | | | | | | | | It's wrong to set a pointer to an object as data without incrementing its refcount. But there is actually no need to pass a real pointer as data here, as we actually want a boolean. Use a pointer conversion macros instead.
* properties-window: Instance symbol renamingApoorv Sachan2020-12-221-716/+716
| | | | | Use "self" as symbol name for the NautilusPropertiesWindow* instance in methods and signal handlers.
* properties-window: Removed unused macrosApoorv Sachan2020-12-221-2/+0
| | | | | | ROW_PAD was a macro used by code the UI creation code which has been removed in previous commits. Now It's not useful.
* global-preferences: Drop unused tracker settingsAntónio Fernandes2020-12-223-7/+0
| | | | Unused since commit bd30a21a0ce1b40ca59814f731bd761670601aaa
* Revert "search: Remove special characters from FTS searches"António Fernandes2020-12-221-29/+1
| | | | | | | This reverts commit e3031953e40b4fe067d566ac6c403127d7b6c266 It worked around an issue in tracker, which is fixed now: https://gitlab.gnome.org/GNOME/tracker/-/issues/252
* tag-manager: Inline previously shared codeAntónio Fernandes2020-12-221-44/+9
| | | | | | get_query_status() is a wrapper for tracker_sparql_cursor_next_finish() and it's weird for _finish() not to be called directly by the GAsyncReadyCallback function.
* tracker-utilities: Update copyrightsam/copyrightSam Thursfield2020-12-211-0/+1
| | | | See https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/553#note_989920
* gtkplacesview: Update to latest codewip/oholy/pathbar-default-locatonOndrej Holy2020-12-191-1/+15
| | | | Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/1319
* file-utilities: Do not use default location instead of rootOndrej Holy2020-12-191-10/+0
| | | | | | | | | | | The default location (i.e. g_mount_get_default_location) should be used when opening mounted, but we should not use it instead of the root button in the path bar. Because it is currently impossible to navigate to parent folders if default location is set. Let's change nautilus_get_mounted_mount_for_root logic and return mount only for root path so we can see the real root in the path bar. https://gitlab.gnome.org/GNOME/nautilus/issues/1319
* Update Bengali (India) translationAkarshan Biswas2020-12-181-4039/+5914
| | | | (cherry picked from commit 8e67058fb368146183f0159292fa5ab483d9c4e9)
* window: Refactor nautilus_window_save_geometryElias Projahn2020-12-171-25/+32
| | | | | Replace a guard check if/else statement with an early return and minimize unnecessary function calls.
* window: Don't save state when tiledElias Projahn2020-12-171-2/+13
| | | | | | | | | | The saved window state (whether the window is maximized and its initial size) should be the state, that the user would most likely want the next opened window to start with. As the tiled state doesn't make sense without other windows and because it's not really possible to properly restore it, it will not be saved anymore. Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1685
* files-view: Use fallback in case of xdp_portal_set_wallpaper failurewip/oholy/libportal-warningOndrej Holy2020-12-171-1/+20
| | | | | | | | | Since commit ece6b825, xdg-desktop-portal is used to set wallpapers. This introduced the following build warning: "‘set_wallpaper_fallback’ defined but not used", because the fallback is used only if it is built without libportal support and it is not guraded by #ifdef. Let's use the fallback also in the case of xdp_portal_set_wallpaper portal failure, which fixes the warning as well.
* Revert "ci: Use Fedora latest instead of rawhide temporarily"Bastien Nocera2020-12-112-2/+2
| | | | | | | GNOME CI runners have been updated to the latest libseccomp so the problem should no longer happen. This reverts commit ab55380f200e5ea03116c5871607d125deff844c.
* Update Norwegian Bokmål translationKjartan Maraas2020-11-301-988/+1032
| | | | (cherry picked from commit b62f9a7422edd181c92ef0d0ccce7b8d91860497)
* ci: Use Fedora latest instead of rawhide temporarilywip/oholy/ci-buildahOndrej Holy2020-11-202-2/+2
| | | | | | | | The pipeline currently fails with Fedora rawhide, because g-ir-scanner fails with failures like: "ldd: error: you do not have read permission for `/builds/GNOME/nautilus/_build/tmp-introspectgwhh729q/Nautilus-3.0'". This obviously affects more projects:, e.g. GNOME/grilo!62. Let's use Fedora latest for now as a workaround.
* ci: Remove broken triage jobOndrej Holy2020-11-202-163/+0
| | | | | | | | | The triage job is broken, which regularly causes CI failures. I've made some attemts to fix it but I failed. I don't have capacity to spent more time on it. Let's remove the job completely for now to prevent the confusing CI failures. Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1625
* ci: Use Tracker 3 dependencies from Fedora repositoryOndrej Holy2020-11-201-4/+1
| | | | | The Tracker 3 dependencies are installed currently from unofficial COPR repository. Let's use the official Fedora packages instead.
* ci: Use Buildah instead of Docker to generate imagesOndrej Holy2020-11-201-11/+14
| | | | | | The GNOME runners are no more privileged and thus it is not possible to use Docker from the pipeline. Let's use Buildah instead Docker to fix the image generation.
* tag-manager: Search for tracker3 in PATHAntoine Jacoutot2020-11-191-1/+1
| | | | | | | | | | Tracker 3 migration code tries to spawn tracker3 binary using G_SPAWN_SEARCH_PATH_FROM_ENVP flag. However, tracker3 is installed under /usr/local/bin/ on OpenBSD which isn't searched by envp. So the migration fails with the following warnings: "Tracker 2 migration: Couldn't run `tracker3`: Failed to execute child process "tracker3" (No such file or directory)." Let's use G_SPAWN_SEARCH_PATH instead of G_SPAWN_SEARCH_PATH_FROM_ENVP to fix this issue.
* ci: Add libportal-devel to DockerfileFelipe Borges2020-11-181-1/+1
| | | | https://src.fedoraproject.org/rpms/libportal
* files-view: Use xdg-desktop-portal for setting WallpaperFelipe Borges2020-11-181-24/+80
| | | | | | | | If libportal was found during build, we can use libportal to set the Wallpaper. Otherwise, we fallback to the old Nautilus behavior of directly copying the image and updating the gsetting. Fixes #795