1
0
mirror of https://gitlab.gnome.org/GNOME/nautilus synced 2024-06-30 23:46:35 +00:00
Commit Graph

47 Commits

Author SHA1 Message Date
Peter Eisenmann
925a4c15cc audio-video-properties: return early without discoverer
Without a correctly initialized GstDiscoverer, no locations can be
set, so return early if that is the case.
2024-04-27 17:26:14 +00:00
Peter Eisenmann
d92a6f02e6 audio-video-properties: format with uncrustify
While the code is imported, indentions on the current files are a mess.
This makes it more difficult for contributors to get things right, so
incude these files in the uncrustify script and format them.
2024-01-17 03:40:29 +00:00
Hariharan D
d6e40f5e58 audio-video-properties: Convert sample rate unit to kHz if larger than 999Hz
This changes the way sampling rate units get displayed, it will now append 'kHz' for values larger than 999Hz.
Additionally, this also includes a thousands separator for kHz for better presentation.

Fixes #3237
2024-01-11 11:41:58 +01:00
Khalid Abu Shawarib
5b9176768f extensions/image-properties: Format raw Exif datetime
Convert the Exif datetime format to standard ISO time format.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1170
2023-12-22 11:38:28 +00:00
Khalid Abu Shawarib
95c2cbe782 extensions-image-properties: Move Exif tags defs to file scope
Also rename a variable to avoid shadowing.
2023-12-22 11:37:43 +00:00
Peter Eisenmann
f4bdf4cc19 audio-video-properties: set GTypeInfo explicitly
Fixes missing field initializers warnings.
2023-11-18 00:40:09 +01:00
Peter Eisenmann
9dfbe86bcd general: simple un<>signed comparison fixes
A collection of simple fixes for comparison warnings.
2023-11-18 00:40:09 +01:00
Khalid Abu Shawarib
e253a639d9 extensions/image-properties: Remove unnecessary code 2023-11-08 00:59:11 +03:00
Khalid Abu Shawarib
33667b8994 extensions/image-properties: Cleanup cancellation properly
Free the resources left over in the case of a cancellation which
was handeled in the previous commit.
2023-11-08 00:56:31 +03:00
Khalid Abu Shawarib
7b13e541fd extensions/image-properties: Handle cancellation properly
Calling refresh_extension_model_pages() might cancel a pending
IO operation and free the ImagesPropertiesModel. Bailout after
being cancelled instead of using a freed data.
2023-11-08 00:56:21 +03:00
Khalid Abu Shawarib
3e21adc904 image-properties: Fix crash with null metadata tag
Handle the case where
gexiv2_metadata_try_get_tag_interpreted_string returns a null
pointer to avoid a crash.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/3138
2023-10-18 16:32:09 +03:00
Khalid Abu Shawarib
6d0ccc66c9 image-properties: Don't read orientation with invalid metadata
Don't try to read the image orientation if the metadata is not ready.
2023-10-12 00:11:50 +03:00
António Fernandes
4264876777 image-properties: Actually show failure info
We ask to append a failure message with NULL value, and then don't
actually append it because of the value being NULL. This makes no
sense, so fix it.

Despite that, in order to improve visuals, move the failure message
to the value and use an existing generic error string as title.
2022-10-22 11:33:51 +00:00
António Fernandes
683a3d54ef audio-video-properties: Drop obsolete test program
The properties extension no longer creates a widget, so it's no
longer a simple task of packing that widget into a window.

We never use that test program anyway; manual testing can and
should be performed in the main application.
2022-09-01 22:20:55 +00:00
António Fernandes
769b89257f audio-video-properties: Add error row on failure
Rather than displaying a broken page without any row.
2022-08-31 23:58:07 +00:00
António Fernandes
ad4cdb8a44 audio-video-properties: Port to new API 2022-08-07 01:14:22 +00:00
António Fernandes
33855b7b15 image-properties: Don't depend on GTK
GdkPixbuf is enough here.
2022-08-07 01:14:22 +00:00
António Fernandes
695c9c617b image-properties: Port to new API 2022-08-07 01:14:22 +00:00
Corey Berla
57be6b74cf sendto-extension: Remove extension
nautilus-sendto is no longer maintained and never worked in
sandboxed environments. Remove and re-add using portal

See: https://gitlab.gnome.org/GNOME/nautilus/-/issues/928
2022-07-21 21:19:11 +00: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
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
Corey Berla
ff12b4ea5a audio-video-properties: Enable build
Now that gtk4 code is in place, enable build of audio-video-properties
again.  Previously disabled in 9f8d4c9e11

However, we must still disable tests for the time being, until we port
them away from gtk_main(), together with other tests already disabled
due to gtk4 by commit 388b2cbb09
2022-07-06 13:34:53 +01:00
Corey Berla
d5a8d66be1 audio-video-properties: Switch to GTK4
Use new functions and syntax.  Minor code cleanup in order to
make debugging easier.  GTK4 doesn't use border width, use margins
consistent with main properties page.
2022-07-06 13:34:15 +01: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
Michael von Gunten
cab6380d3f image-properties: Use N/S and E/W distinction for GPS coordinates
Also drop the slash separator, which is non-standard for geographical coordinates.
2022-01-05 12:46:00 +00:00
António Fernandes
9f8d4c9e11 extensions/audio-video-properties: Disable build
Not ported to GTK 4 yet. To speedup the port, disable the extension.
To be ported later.
2021-12-31 11:12:26 +00:00
António Fernandes
54617c32b3 extensions/image-properties: Reduce container API
Preparing for GTK4.
2021-12-06 00:27:15 +00:00
António Fernandes
c1760ff543 extensions/image-properties: Don't subclass widget
GTK discourages subclassing widgets.

The only reason we are subclassing here is to add struct fields. But we
don't need to subclass a widget for that. We don't even need to subclass
GObject. A plain data struct is enough.
2021-12-06 00:27:15 +00:00
Nishal Kulkarni
0dfaaaeecd extensions/image-properties: Replace deprecated functions
Build log contains deprecation warnings for gexiv2 functions.
Replaced `gexiv2_metadata_has_tag()` with
`gexiv2_metadata_try_has_tag()` and `gexiv2_metadata_get_orientation()`
with `gexiv2_metadata_try_get_orientation()`

Closes: #2033
2021-12-04 22:54:14 +00:00
Ondrej Holy
8c5fa3eb08 extensions/image-properties: Replace deprecated symbols
The build log contains warnings about deprecated gexiv2 functions. Let's
port to the new API, unpin exiv3 and gexiv2 dependencies in flatpak manifests
and bump the build dependency accordingly to get rid of the warnings.
2021-07-09 15:46:59 +02:00
James Westman
0645e3b9aa image properties: Handle rotated images
Images with EXIF metadata can contain an orientation tag, which indicates the
image should be rotated. In the Image tab of the Properties dialog, swap the
width and height if the image is rotated by 90 or 270 degrees.

Fixes #1590.
2020-11-18 15:17:43 +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
Waqar Ahmed
6784266e3d audio-video-properties:fix string not translatable
"Frames per second" string in audio-video-properties tab was unavailable for translation.

To fix this, handle the string with g_dngettext() and allow for both singular and plural translation.

Closes https://gitlab.gnome.org/GNOME/nautilus/issues/990
2020-01-11 19:45:22 +00:00
Philip Withnall
c71adb9761 audio-video-properties: Use ‘frame rate’ and ’bit rate’ not run-ons
‘framerate’ and ‘bitrate’ aren’t dictionary words; add a space to make
them ‘frame rate’ and ‘bit rate’ instead.

This makes them match the ‘sample rate’ string also in that file.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-04-11 12:38:06 +01:00
Albert Vaca Cintora
6114cb8585 Fix build in Clang
I was getting:
error: variable 'string' is used uninitialized whenever 'if' condition is
false [-Werror,-Wsometimes-uninitialized]
2019-03-18 19:37:17 +00:00
Bastien Nocera
3096d7e544 audio-video-properties: Make the framerate more precise
Add a bit more precision to the frames per second property.

Closes: #901
2019-02-13 10:50:08 +00:00
Bastien Nocera
fdc4300ae0 audio-video-properties: Add context to "Unknown" strings
See https://gitlab.gnome.org/GNOME/totem/issues/299
2019-02-13 10:50:08 +00:00
Bastien Nocera
c51899c355 audio-video-properties: Remove unused code 2019-02-13 10:17:54 +00:00
Bastien Nocera
3d9d2ef8d1 audio-video-properties: Use totem_gst_disable_display_decoders() 2019-02-13 10:17:54 +00:00
Bastien Nocera
f826da0fb2 audio-video-properties: Add decoder disabler helper
(Re-)add a helper to disable decoders that require windowing
environments to even be used while gathering metadata.
2019-02-13 10:17:54 +00:00
Bastien Nocera
e9bb1cff99 Add copy/paste of totem's properties window nautilus extension
The code is quite stable and this is basic functionality which is going to be
better in Nautilus rather than relying on extensions, given the quite bad
extension system Nautilus has.

This will also help with the port to gtk4, so we rely in yet another important
extension providing properties pages (which in turn export gtk3 widgets).
2019-02-11 16:03:55 +01: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
9e8f138999 general: fix old-style function declarations
Parameterless function declarations imply indeterminate parameter count,
while the implementations take no arguments.
2018-03-01 08:37:49 +00:00
Yaakov Selkowitz
aae465299e extensions: build as modules instead of libraries
Since the extensions are loaded dynamically instead of being linked in,
there is no need to build them as import libraries.
2018-02-17 17:29:50 +02:00
Ernestas Kulik
cdeedcd354 extensions: sendto: modernize code
This mainly removes the manual type definitions.
2018-02-09 06:32:38 +02:00
Ernestas Kulik
6934578ebf sendto-extension: move under extensions/
Now that the image property page is an extension, both extensions can be
held under the same subdirectory. This commit also makes the image
property extension optional.
2018-02-09 06:32:38 +02:00
Ernestas Kulik
14ee0f1cdc general: reimplement image properties as an extension
The image property page is already implemented using the extension API,
but it’s not an extension and relies on a library that is not essential
to Nautilus. This commit builds the image properties as an extension and
introduces some minor refactoring to the code.
2018-02-09 06:32:38 +02:00