summaryrefslogtreecommitdiff
path: root/eel
Commit message (Collapse)AuthorAgeFilesLines
* general: Change libadwaita include pathBarnabás Pőcze2023-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The libadwaita pkg-config adds `-I/usr/include/libadwaita-1` (or similar) to the compiler flags, which means that #include <adwaita.h> is sufficient, and the currently used #include <libadwaita-1/adwaita.h> is not necessary. Not only is it not necessary, but it prevents nautilus from being built with an uninstalled libadwaita build (either meson subproject or otherwise). To fix that, remove the `libadwaita-1/` prefix. The libadwaita test programs also only `#include <adwaita.h>`, and according to Debian Code Search, that is the more popular version. https://codesearch.debian.net/search?q=%23include+%3Cadwaita.h%3E&literal=1 https://codesearch.debian.net/search?q=%23include+%3Clibadwaita-1%2Fadwaita.h%3E&literal=1
* eel: remove eel-glib-extensions.hPeter Eisenmann2022-12-236-36/+0
| | | | | Replace the eel_boolean_bit typedef with a plain guint and remove all includes.
* eel: remove more unused functionalityPeter Eisenmann2022-12-234-54/+0
|
* eel: Remove unused filesCorey Berla2022-12-238-517/+0
| | | | Usage was generally removed in 2d1deaac2dd12b0ba16446bfbf3498b266e60338
* eel-string: Support Unicode when capitalizing first characterAntónio Fernandes2022-08-081-3/+15
| | | | | | And use this instead of g_ascii_to_upper() in app-chooser.c This is more i18n-friendly.
* eel-stock-dialogs: Use AdwMessageDialog for timed waitChristopher Davis2022-08-062-39/+14
|
* eel-stock-dialogs: Remove message dialogsChristopher Davis2022-08-062-170/+0
| | | | | | | Now that we have AdwMessageDialog to provide a GNOME-compliant message dialog API, we don't need the functions from eel. This commit removes all of the functions for creating dialogs from eel-stock-dialogs.
* general: Delete no longer needed git ignoresPeter Eisenmann2022-07-171-1/+0
| | | | | | 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.
* eel-stock-dialogs: Remove unused functionalityOndrej Holy2022-02-072-74/+0
| | | | | | | Some functions are no more used. Let's remove them instead of fixing GTK 4 regressions in them. Related: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2117
* general: Make message dialogs modal againOndrej Holy2022-02-071-3/+3
| | | | | | | | After the GTK 4 port, some dialogs are no more modal. This is regression, which is probably caused by the fact, that this needs to be explicitly specified now. Let's make all the `GtkMessageDialog` dialogs modal again. Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2117
* general: Switch to GTK4António Fernandes2022-01-092-8/+7
| | | | | | | | | | | | | | | | The new major version of the toolkit is a requirement to fix old issues and enable future enhancements. Update symbols and adapt logic to API changes. Update and simplify UI definitions. Update local copy of places sidebar and places view. Replace dependencies with their GTK4-compatible successors. Make a minimum changes required to build and run, with known regressions to be fixed in future commits. For a detailed breakup of the changes, see the 36 commits-deep log leading to d5763facb1e5045251171ed1273dca0859f3542f. This is the main part of https://gitlab.gnome.org/GNOME/nautilus/-/issues/276
* eel: Drop gtk extensionsAntónio Fernandes2022-01-055-105/+1
| | | | No longer used.
* files-view: Drop NAUTILUS_SCRIPT_WINDOW_GEOMETRY envarAntónio Fernandes2022-01-052-31/+1
| | | | | | | | It relies on X11-only information, such as the window position on the screen, which is not known to the application under Wayland. So, this was already broken. Also, its implementation relies on GtkWindow API which is gone in GTK 4.
* general: Remove canvas viewAntónio Fernandes2021-12-293-4652/+0
| | | | | | | | | | | | | | | | | | | The new grid view has reached feature parity with the canvas, if we ignore drag-and-drop and clipboard support (which would need to be reimplemented in GTK 4 anyway) and performance scalability (which is a problem of GtkFlowBox and solvable by using GtkGridView in GTK 4). The canvas view relies on extensive custom implementation for layout, drawing, input handling, accessibility, etc., which would be too hard to port to in GT1K4. Furthermore, most of its features, such as support for manual sorting, haven't been used since the "icons on desktop" feature has been taken out from this app. We are actually using a swiss army knife for a job where we only need a single blade -- a simple pocketknife would do! Therefore, we say goodbye to this seasoned veteran widget, who has served us for 2 whole decades.
* eel-stock-dialogs: Start and end va_list António Fernandes2021-12-291-1/+2
| | | | This got lost in the refactoring and results in it not being initialized. Thanks to Abderrahim Kitouni for reporting.
* eel-stock-dialogs: Remove eel_run_simple_dialogMatthew Jakeman2021-12-282-57/+7
| | | | | | | This method is no longer used anywhere and can be safely removed. Part of #1992
* eel-stock-dialogs: Add eel_show_simple_dialogMatthew Jakeman2021-12-282-13/+51
| | | | | | | | Extracts the creation of simple dialogs to a new function that does not depend on gtk_dialog_run. It is the caller's responsibility to obtain a response from the dialog. Part of #1992
* general: Use envar to make warnings fatal in scriptsAntónio Fernandes2021-11-121-1/+1
| | | | Same rationale as last commit.
* general: Uniformize case code styleAntónio Fernandes2021-07-111-0/+4
| | | | | | | | There are a few non-braced single-statement in the final cases, which have gone unnoticed until detected by a recent uncrustify update. Let's add the missing braces around single-statements even if it's the last case.
* eel-vfs-extensions: Document get_extension_offset1841-crashing-when-copying-folder-with-same-name-and-click-to-renameAntónio Fernandes2021-04-301-0/+9
| | | | | Mostly to remember callers must be ready to handle a NULL return value, trying to prevent more bugs like the one fixed by the previous commit.
* general: Clean up signal handler disconnectionJoshua Lee2020-07-082-6/+2
| | | | | | | Make use of GLib's new g_clear_signal_handler() function to simplify nautilus' signal handler disconnection and reduce unneccessary code. Fixes: #1522
* meson: Remove libX11 dependencyMarvin Schmidt2020-05-011-2/+1
| | | | | As of commit 70393e321 (general: Allow to compile on Wayland-only system) libX11 is no longer a dependency
* general: Run uncrustify scriptOndrej Holy2020-04-052-28/+29
| | | | | There are some style issue since the last run. Let's run it again before enabling style-check CI job.
* eel: Add redundant parentheses to prevent changes by uncrustifyOndrej Holy2020-04-051-3/+3
| | | | | | Uncrustify changes "(*pixsrc++ * *pixdest)" to "(*pixsrc++ **pixdest)" which is unwanted. Let's add redundant parentheses around "*pixdest" to prevent these unwanted changes.
* eel-canvas: Remove redundant comparisonVilhelm Prytz2020-03-291-1/+1
| | | | | | Comparison is always false because positions >= 1 Makes comparison redundant
* files-view: Say "Trash is Empty" only in trash:///Abdul Rauf2020-02-152-0/+9
| | | | | | | | | | | | | Empty trash widget is displaying for empty folder inside trash instead of Empty folder widget. `eel_uri_is_trash` only checks whether the URI starts with "trash:", that's why it also returns true for empty folders inside trash. Create `eel_uri_is_trash_root` to distinguish trash root (trash:///) from empty folder inside trash (trash:///emptyfolder) Closes https://gitlab.gnome.org/GNOME/nautilus/issues/1367
* general: Allow to compile on Wayland-only systemJavier Jardón2019-12-011-3/+0
| | | | Remove unneeded includes and add some guards to X11-only code.
* eel: string: Add documentationflorin.diaconescu2019-05-271-0/+36
| | | | | | This commit adds comments describing the functionality, the parameters and the return values of the functions that were not documented.
* eel-graphic-effects: Make hover light less intenseCarlos Soriano2019-02-221-1/+3
| | | | | | With the new icons most of the area was white. Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/827
* file: replace eel_ref_str with GRefStringJordan Petridis2019-02-222-124/+0
| | | | | | | | | | | | | | | | | glib now offers a reference counted api. This allows us to replace a lot of legacy code and get rid of eel_ref_str. GRefString [1] is almost a drop-in replacement. nautilus-file-operations.c was indirectly depending upon eel/eel-string.h from nautilus-file-private.h and thus a new include was added. This bumps the minimum version of glib to 2.58 Close #781 https://gitlab.gnome.org/GNOME/nautilus/issues/781 [1] https://developer.gnome.org/glib/stable/glib-Reference-counted-strings.html
* eel-string: Add description to some eel-string functionsionbabalau2018-10-291-0/+20
| | | | | | | | | The eel_str_double_underscores and eel_str_capitalize functions didn't have documentation. Added importance of eel_str_double_underscores as well. It's good practice to have documentation for functions in the long term.
* canvas-item: Drop gtk_style_context_get_background_color()Ernestas Kulik2018-05-302-14/+17
| | | | | | | Even though more convoluted than the previous solution, this one should last longer. Canvas item icons are now colorized by first drawing the background to a Cairo surface and then multiplying the color values of the original icon pixbuf and the ones from the newly created one.
* eel: Remove superfluous includeErnestas Kulik2018-05-282-2/+0
| | | | | gdk/gdkprivate.h is no longer a thing in GTK+ 4 and doesn’t seem to be at all required.
* eel: Remove a11y utilitiesErnestas Kulik2018-05-223-262/+0
| | | | | | In theory, it would be possible to just drop the GAIL code and keep the header, but, given that NautilusCanvasItem is the only remaining consumer, the needed bits can be moved over.
* eel: accessibility: Use ATK to get accessible objectErnestas Kulik2018-05-221-30/+1
| | | | | atk_gobject_accessible_get_object() does the same thing and doesn’t require redefining quarks or using magic strings.
* eel: glib-extensions: Move functions to NautilusErnestas Kulik2018-05-183-114/+0
| | | | They’re only used once, so why not.
* eel: string: fix middle truncation test casesErnestas Kulik2018-03-211-22/+22
| | | | | | | | | | f42979f0b073d96a9157c05c0bff963820a630b4 changed the ellipsis to a unicode one, which is one character in length, in turn changing the expected output. For cases where the truncation length is zero, the expected output is changed to NULL, as 536505728e3963cfc6d2fa93ca2b188bfb5a144b added an assertion.
* eel: self-checks: Fix misaligned argumentsAlexandru Fazakas2018-03-191-11/+11
| | | | | A couple of arguments were misaligned, so we placed them properly.
* general: Remove include guards in favor of pragma onceAlexandru Fazakas2018-03-1913-81/+47
| | | | | | | | | | | | | | | | | | The traditional include guards are not as easy to handle and require extra thought into the names. Pragma once is an easier, more contributor friendly approach. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/294 general: Remove include guards in favor of pragma once The traditional include guards are not as easy to handle and require extra thought into the names. Pragma once is an easier, more contributor friendly approach. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/294
* general: Allow running in separate instanceErnestas Kulik2018-03-181-0/+1
| | | | | | | | | | | | | | | | 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.
* build: make all tests optionalErnestas Kulik2018-03-161-1/+1
| | | | This can help cut down on link times a bit when working on things.
* eel: string: remove custom strdup_printf functionsErnestas Kulik2018-03-052-527/+0
| | | | | These aren’t used anywhere and cause Clang to spit out errors about format strings not being literals.
* eel: string: remove tautological comparisonErnestas Kulik2018-03-051-1/+0
|
* general: don’t shadow variablesErnestas Kulik2018-03-011-1/+0
| | | | | | | Shadowing variables is error-prone, since one might mean to refer to a variable that was declared earlier, but has the same name. Additionally, being more strict about variable scoping can help make the code more readable.
* eel: string: refactor middle truncationErnestas Kulik2018-02-272-51/+42
| | | | | | | This commit tries to make the function more readable and fixes the allocation of the new string: the truncated string is of the same size as the source string. This can be fixed by adding a couple of different allocations. :) Some comments were trimmed down or removed.
* general: Run uncrustifyCarlos Soriano2018-02-131-1/+0
|
* general: Rename from 'favorite' to 'starred'Carlos Soriano2018-02-132-3/+3
| | | | | | | | 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.
* files-view: Show starring only for indexed (by default) filesCarlos Soriano2018-02-122-0/+33
| | | | | | | | | | | | | | | | | | Currently the star menu item is shown for every file in the system, however when a file is not indexed by tracker this operation fails. We cannot set Tracker to index the file and wait for Tracker to index it, since that happens in an idle and Tracker doesn't queue the operation of starring. There is no easy solution for this, so for now we will show the star menu item for indexed (by default) locations, which are the XDG folders, otherwise we will hide the item. A better solution needs to be researched for 3.30, but this will do for now. Related https://gitlab.gnome.org/GNOME/nautilus/issues/243
* eel-string: Fix API commentAntónio Fernandes2018-02-061-7/+14
| | | | | | | eel_string_ellispize_*() functions and eel-gdk-extension.h are no more. This comment was totally outdated. Replace it with actual API docs.
* eel-string: middle_truncate with ellipsis character.António Fernandes2018-02-061-19/+19
| | | | Instead of 3 periods ("...")