Commit graph

104 commits

Author SHA1 Message Date
Corey Berla f0b8a13716 column: Add visible property for column chooser
Add a private property that is meant to help that column chooser
know if the nautilus-column should be visible or not.
2023-05-04 21:32:59 +00:00
Ondrej Holy fbbfa749bd column: Remove extra newline from documentation comment
Currently, the `Nautilus: "@name" parameter unexpected at this location`
warning is shown during build. This is caused by the extra newline character
in the documentation comment for the `nautilus_column_new` function. Let's
remove this extra newline character to get rid of that warning.
2023-03-29 13:43:10 +00:00
Corey Berla 21c79c06d5 docs: Fix ColumnProvider type in nautilus-column 2023-01-16 12:11:25 +00:00
António Fernandes f5ad89e52c files-info: Add precondition-checking for emblem name
Don't allow empty or null names. While the previous commit probably
prevents the symptoms, adding empty or null names is useless and
potentially problematic.
2023-01-08 01:19:17 +00:00
Jan Tojnar 7c7c5fc426 extension/Column: Port docs to gi-docgen 2022-09-04 00:03:02 +01:00
Jan Tojnar 21ef3f628a extension: Fix GIR warnings
../libnautilus-extension/nautilus-properties-model-provider.h:61: Warning: Nautilus: nautilus_properties_model_provider_get_models: Unknown type: 'NautilusPropertyModel'
../libnautilus-extension/nautilus-properties-item.h:37: Warning: Nautilus: nautilus_properties_item_new: unknown parameter 'model' in documentation comment, should be 'value'
../libnautilus-extension/nautilus-properties-item.h:46: Warning: Nautilus: nautilus_properties_item_get_name: unknown parameter 'item' in documentation comment, should be 'self'
../libnautilus-extension/nautilus-properties-item.h:54: Warning: Nautilus: nautilus_properties_item_get_value: unknown parameter 'item' in documentation comment, should be 'self'
../libnautilus-extension/nautilus-properties-model-provider.h:45: Warning: Nautilus: NautilusPropertyModel: Unknown type: 'NautilusPropertyModel'
2022-09-04 00:03:02 +01:00
Jan Tojnar d47403bced docs: Switch to gi-docgen 2022-09-04 00:03:02 +01:00
Jeremy Bicha d97f112734 extension: Bump extensiondir to 4
Closes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2417
2022-08-08 09:34:18 +00:00
António Fernandes 2aa8f1717c column: Fix property setting/getting
Was spamming warnings on list view.

Left over from c60d3099ed
2022-08-07 04:16:14 +01:00
António Fernandes e9889275e1 libnautilus-extension: Bump pkgconfig version
Also drop GTK dependency, now that GTK is no longer used in our API.

Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2135
2022-08-07 01:14:22 +00:00
António Fernandes c60d3099ed column: Don't depend on GTK
We use GtkSortOrder internally only, it's not meant for extensions.
2022-08-07 01:14:22 +00:00
António Fernandes b625533fa4 libnautilus-extension: Drop widget provider
We don't want extensions to inject random inconsistent widgets
into our window.

If there are good reasons for this, in the future we can introduce a
new model-like API instead of a widget-based one.
2022-08-07 01:14:22 +00:00
António Fernandes bc55ff7599 menu-provider: Don't pass GtkWindow
We don't want menu items to create their own windows in our process.

This helps with the effort to de-GTK-ize libnautilus-extensions API.
2022-08-07 01:14:22 +00:00
António Fernandes e418cf4362 properties: Remove old extensions API
We want to control the layout of the window, not having extensions
injecting their own widgets.

This also avoids future breakage when porting to newer versions of GTK.
2022-08-07 01:14:22 +00:00
António Fernandes a3002b148c libnautilus-extension: Introduce model-based properties extensions
This is meant to replace the existing GtkWidget-based solution.

Part of https://gitlab.gnome.org/GNOME/nautilus/-/issues/2365
2022-08-07 01:14:22 +00:00
Aaron Jacobs 1bce7457c2 extension: Add docstrings for all remaining public functions
Most of these are pretty sparse but could be expanded on as needed.
2022-07-30 21:42:40 +00:00
Peter Eisenmann 1d3e7ec914 properties-window: Use GtkStack for navigation
Replace the tabbed GtkNotebook view with inlined navigation rows that
link to subpages and a back button that allows navigating back.

Add additional needed getters to NautilusPropertyPage.

Also, replace the now-inadequate .view style class with .background.

Part of #1326
2022-07-28 19:16:34 +01: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
António Fernandes 1b628f334a libnautilus-extension: Drop compatibility includes
They were introduced to ensure compatibility in 0e5815e95a

Now that we have broken the API, it's time to drop them.
2022-07-09 17:56:38 +00:00
António Fernandes 3b06c0f286 libnautilus-extension: Remove compatibility typedefs
Now that we have broken the API, remove compatibility typedefs
introduced in 7e2605c681

Also update audio-video-properies to use the new symbols.
2022-07-09 17:56:38 +00:00
António Fernandes 9c56883cbd libnautilus-extension: Remove deprecated headers
Deprecated since commit 7e2605c681
2022-07-09 17:56:38 +00:00
António Fernandes 801e877d6e libnautilus-extension: Bump library version
The GTK3 to GTK4 switch requires extensions to port their widgets too,
because 2 versions of GTK cannot be loaded in the same program.

Therefore, this is effectively an API break. We must update the
library version.

Also, we are going to introduce breaking more changes before the API
freeze.

Closes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2135
2022-07-09 17:56:38 +00:00
António Fernandes e358c2343c general: Switch to GTK4
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
2022-01-09 01:25:39 +00:00
Aaron Jacobs a43fb2deab extension: Allow @tip to be NULL in nautilus_menu_item_new()
Tooltips are currently unused, so it makes sense to allow NULL here, as
with the @icon parameter.
2021-12-04 20:35:25 -05:00
Aaron Jacobs 960ef5fb85 extension: Add some missing nullable annotations
I've generally verified that these are nullable by looking elsewhere in
the source.
2021-12-04 20:35:25 -05:00
Aaron Jacobs ecf366b58e extension: Mark backwards-compatibility typedefs as not introspectable
I believe these are only included to prevent breakage of existing C
extensions, but as they're not intended for actual use we should mark
them with `(skip)`.

This has the added benefit of making the VAPI file generated from the
resulting GIR file much less noisy.
2021-11-28 16:22:53 -05:00
Aaron Jacobs 4309509d51 extension: Mark entry points as not introspectable
As pointed out by Emmanuele Bassi, these are not part of the ABI and
should be marked with (skip).

See: https://discourse.gnome.org/t/vala-bindings-for-an-unusual-c-ownership-function-signature/8184
2021-11-28 13:11:27 +00:00
Aaron Jacobs 068f0315bc extension: Fix annotation for modules's type list
As pointed out by Emmanuele Bassi, this should be transfer=none instead
of the present transfer=full.

See: https://discourse.gnome.org/t/vala-bindings-for-an-unusual-c-ownership-function-signature/8184
2021-11-28 13:10:14 +00:00
Ondrej Holy fd2e7dfdea general: Run uncrustify script
There are some style issue since the last run. Let's run it again
before enabling style-check CI job.
2020-04-05 16:22:26 +00:00
Patrick Monnerat 4f334aec5d menu-provider: Fix signal id argument
ITEMS_UPDATED is not the signal id. It's the index for the array of
signal ids.

Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/984
2020-01-04 21:31:11 +00:00
Ernestas Kulik 64c8ca3d13 nautilus-extension: file-info: Tweak punctuation
A bit more readable with a semicolon.
2019-02-17 19:54:11 +00:00
Tomasz Miąsko 4d0330a721 Include pkg-config package name in introspection file.
This effectively adds `<package name="libnautilus-extension"/>` to gir
xml file, which makes it easy to obtain necessary compiler and linker
flags for use in compile time bindings.
2019-01-10 14:19:19 +00:00
Ernestas Kulik c28776c4b4 nautilus-extension: file-info: Fix doc oops
The same function was accidentally documented twice.
2018-08-26 11:11:33 +03:00
Ernestas Kulik 4ae0361342 docs: Reorganize and fix
This commit completes the sections file with subsections, moves most
documentation to headers (no real reason to, especially given that
changes there may cause unwanted rebuilds, but it feels better to have
it in the headers) and fixes some annotations.

Closes https://gitlab.gnome.org/GNOME/nautilus/issues/565
2018-08-03 20:35:47 +03:00
Ernestas Kulik 200a5869b5 build: Allow disabling GIR data generation 2018-07-25 19:06:37 +03:00
Alexandru Fazakas aa7cfcf01c eel: self-checks: Fix misaligned arguments
A couple of arguments were misaligned, so we placed
them properly.
2018-03-19 14:49:44 +02:00
Alexandru Fazakas 95ecfc8ea0 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: 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
2018-03-19 14:43:38 +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
Carlos Soriano b6ebffd567 general: Run uncrustify 2018-02-13 20:11:55 +01:00
Ernestas Kulik 0e5815e95a libnautilus-extension: add removed includes back in
Some extensions break because of weird inclusion patterns.

Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/252
2018-02-13 07:22:49 +02:00
Emmanuele Bassi 900d2be31c Ensure that extensions depends on generated headers
The libnautilus-extensions internal dependency must include the
generated enumeration header file, otherwise we may end up building
targets that depend on the library prior to have the header properly
generated.
2018-02-09 13:32:19 +00:00
Ernestas Kulik 7e2605c681 general: refactor extension library
The changes include:

  * adding a single-include header and deprecating
    nautilus-extension-types.h and direct inclusions of individual
    headers;

  * type definition simplifications - this causes some breakages in
    nautilus-file, because NautilusFile used to be typedefed to
    NautilusFileInfo, and that is no longer possible, so the interface
    implementation was moved to static functions and the public
    NautilusFile API provides thin wrappers for them to maintain
    compatibility;

  * documentation cleanups and reorganization;

  * general build rule and code cleanups: mostly g_auto* sprinkled
    around and style changes (sorry)
2018-02-09 06:32:38 +02:00
Ernestas Kulik 2128efccae nautilus-extension: use Meson to generate pkgconfig file
Currently, the pkgconfig file for nautilus-extension is generated by
substituting variables in a template file. That is prone to mistakes and
requires manual tracking of dependencies. Using the pkgconfig module
from Meson helps automate much of the process.
2018-02-09 06:32:38 +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 767c7ad95a Add license to libnautilus-extension
https://bugzilla.gnome.org/show_bug.cgi?id=785062
2017-08-07 14:50:20 +03: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
Ernestas Kulik fd50ac5011 meson: set correct libnautilus-extension version in .pc
Currently, when building with Meson, the version of the pkg-config file
for libnautilus-extension is set to the version of the library itself.
This is incompatible with how it was before - the version was set to the
version of Nautilus. That breaks some modules that build extensions
(e.g. file-roller).

https://bugzilla.gnome.org/show_bug.cgi?id=779472
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
Carlos Soriano 838691f27a general: format code with newer Uncrustify
Some issues were fixed, and now we can rerun Uncrustify to format
correctly more part of the code.
2016-11-30 21:35:21 +01:00