Compare commits

...

29 Commits

Author SHA1 Message Date
Emmanuele Bassi 7778430a31 css: Emit deprecation warnings only under debug
Not every CSS provider can drop deprecated CSS constructs, especially
if they are forced to maintain backward compatibility with third party
code, like libadwaita.

The slightly annoying part is that we cannot use GTK_DEBUG_CHECK, as we
cannot include gtkdebug.h inside gtkcssparser.c, so we need to hack our
way around it.
2024-05-29 12:32:42 +01:00
Emmanuele Bassi accabe3eee css: Create a section if the variable does not have one
In case a variable definition does not have a CSS section associated to
it, we fall back to the previous behaviour of creating a CSS section
with the bounds of the error.

See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/841
2024-05-29 11:29:13 +01:00
Benjamin Otte d4c25c9ec0 Merge branch 'wip/otte/for-main' into 'main'
testsuite: Shrink maximum texture size in test

See merge request GNOME/gtk!7303
2024-05-28 15:31:08 +00:00
Benjamin Otte b69df2bc4d testsuite: Shrink maximum texture size in test
1MB textures can lead to 20s runtimes - which with asan CI being a lot
slower can be a loooong time and cause timeouts.

Limiting them to 16kB still allows hitting max texture size sometimes
but makes sure the test only runs for 3-4s worst case.
I hope that doesn't trigger timeouts even under asan.
2024-05-28 16:51:03 +02:00
Emmanuele Bassi 01d86eab66 Merge branch 'gbsneto/bitset-filechooser-leaks' into 'main'
filechooserwidget: Plug a bunch of GtkBitset leaks

See merge request GNOME/gtk!7302
2024-05-28 13:16:39 +00:00
Yosef Or Boczko 09e85aa809 Update Hebrew translation 2024-05-28 08:54:43 +00:00
Georges Basile Stavracas Neto d49816d2e6 filechooserwidget: Plug a bunch of GtkBitset leaks
gtk_selection_model_get_selection() is transfer full, and the returned
bitset must be freed by the caller. GtkFileChooserWidget freed none of
them.

Unref the bitsets.

Related: https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/91
2024-05-28 10:24:27 +02:00
Benjamin Otte 59a00d6768 Merge branch 'ngl-windows-32' into 'main'
Fix using the NGL renderer on 32-bit Windows

See merge request GNOME/gtk!7294
2024-05-28 04:39:43 +00:00
Chun-wei Fan be2ff60787 gsk: Call glDeleteSync() directly
This function does not use the standard __cdecl calling convention on
Windows, meaning using g_clear_pointer() on it directly will cause
crashes on 32-bit Windows.  Just call it directly if the GLsync it uses
exists.
2024-05-25 11:07:37 +08:00
Emmanuele Bassi ecbe6a421e Merge branch 'bilelmoussaoui/no-async-finish-docs' into 'main'
docs: Drop _finish blobs

See merge request GNOME/gtk!7295
2024-05-24 05:14:56 +00:00
Bilal Elmoussaoui 9b42377347 docs: Drop _finish blobs
As they are generated by gi-docgen thanks to the newly added async annotations.
It allows bindings that don't expose the _finish
functions to propose less-confusing docs
2024-05-23 20:39:50 +02:00
Andre Klapper 7372a845fb Correct GNOME HIG 404 URI 2024-05-23 16:31:20 +02:00
Luca Bacci d4899fdf1f Merge branch 'gdk4_win32_fix_dnd_move_cursor' into 'main'
gdk4-win32: Guarantee dnd-move as a cursor name

See merge request GNOME/gtk!7289
2024-05-23 10:16:30 +00:00
Emmanuele Bassi 4142c4d79e Merge branch 'mcatanzaro/#6734' into 'main'
text: fix critical in paste_received

Closes #6734

See merge request GNOME/gtk!7290
2024-05-22 23:17:15 +00:00
Matthias Clasen ca442f8641 Merge branch 'css-color-spaces' into 'main'
gdk: Add support for some color conversions

See merge request GNOME/gtk!7285
2024-05-22 22:32:52 +00:00
Benjamin Otte 3c1491423a Merge branch 'wip/otte/for-main' into 'main'
gsk: use the correct memory type index

See merge request GNOME/gtk!7287
2024-05-22 21:47:44 +00:00
Michael Catanzaro eb4993d3fb text: fix critical in paste_received
Here we calculate the length only in the truncate_multiline condition.
Then we pass pos - 1 to gtk_accessible_text_update_contents() as the end
position, triggering this critical that checks to ensure start <= end.
Fix it by always calculating the length of the string that we insert.

This is the first bug fixed as a result of enabling fatal criticals by
default in Epiphany! 🎉

Fixes #6734
2024-05-22 16:06:09 -05:00
g.willems aa057da1ca win32: Guarantee dnd-move as a cursor name
gdk currently falls back to the default cursor, which may not be
approriate for rendering a DnD move.
2024-05-22 20:55:21 +02:00
Matthias Clasen 1de09d59fb css: Support some color spaces
Support the hwb(), oklab() and oklch() functions for specifying
colors in these color spaces.

See https://bottosson.github.io/posts/oklab/ and
https://www.w3.org/TR/css-color-4/.

Some tests included.
2024-05-22 14:31:56 -04:00
Alejandro Piñeiro 130a6fe0cf gsk: use the correct memory type index
https://gitlab.gnome.org/GNOME/gtk/-/issues/6726
2024-05-22 19:43:03 +02:00
Matthias Clasen e1f7c027d7 Merge branch 'css-color-docs' into 'main'
css: Update docs slightly

See merge request GNOME/gtk!7281
2024-05-22 17:25:47 +00:00
Arjan Molenaar 396ef5ebe5 Merge branch 'macos-popup-shadows' into 'main'
macos: Take shadows into account when positioning popups

See merge request GNOME/gtk!7266
2024-05-22 13:15:34 +00:00
Emmanuele Bassi 840a20db3b Merge branch 'macos-surface-critical' into 'main'
gdkmacossurface: Set surface before accessing it

See merge request GNOME/gtk!7267
2024-05-22 09:10:35 +00:00
Matthias Clasen 8c6f7d1ae9 Merge branch 'matthiasc/for-main' into 'main'
4.15.1

See merge request GNOME/gtk!7283
2024-05-22 00:00:21 +00:00
Matthias Clasen c69fa6221b Post-release version bump 2024-05-21 19:54:53 -04:00
Matthias Clasen 3c92c81705 4.15.1 2024-05-21 19:52:12 -04:00
Matthias Clasen 297de981c4 css: Update docs slightly
Add more details about units and calc(), mention new color
syntax and deprecations.
2024-05-21 17:11:30 -04:00
Mat ed8255993f gdkmacossurface: Set surface before accessing it
Silences the following critial:
_gdk_macos_surface_update_fullscreen_state: assertion
'GDK_IS_MACOS_SURFACE (self)' failed
2024-05-19 23:58:35 +03:00
Mat e1431f31c1 macos: Take shadows into account when positioning popups
Otherwise popups will be misaligned. This becomes noticeable when larger
shadows are used, like in libadwaita.

Regression in 08216dcee9
2024-05-19 23:35:18 +03:00
36 changed files with 892 additions and 365 deletions
+18 -2
View File
@@ -1,12 +1,20 @@
Overview of Changes in 4.15.1, xx-xx-xxxx
Overview of Changes in 4.15.2, xx-xx-xxxx
=========================================
Overview of Changes in 4.15.1, 21-05-2024
=========================================
* GtkGraphicsOffload:
- Don't crash without a child
* GtkSpinner:
- Don't animate when unmapped
* CSS:
- Support the :root selector
- Support variables and custom properties
- Support variables and custom properties (https://www.w3.org/TR/css-variables-1/)
- Implement math functions (https://www.w3.org/TR/css-values-4/)
- Support modern syntax and calc in rgb() and hsl()
* Icontheme:
- Make symbolic svg loading more efficient
@@ -43,12 +51,20 @@ Overview of Changes in 4.15.1, xx-xx-xxxx
* Debugging:
- Show more texture details in the recorder
- Use GTK_DEBUG=css to see CSS deprecations
* macOS:
- Fix problems with events handed back to the OS
- Respect GDK_DEBUG=default-settings
- Allow applictions to handle Dock > Quit
* Deprecations:
- Use of @name colors in CSS
* Translation updates:
Catalan
Georgian
Hungarian
Korean
Portuguese
Turkish
+44 -23
View File
@@ -15,16 +15,16 @@ spec.
The following units are supported for basic datatypes:
Length
: px, pt, em, ex, rem, pc, in, cm, mm, calc()
: px, pt, em, ex, rem, pc, in, cm, mm
Percentage
: %, calc()
: %
Angle
: deg, rad, grad, turn, calc()
: deg, rad, grad, turn
Time
: s, ms, calc()
: s, ms
Length values with the em or ex units are resolved using the font
size value, unless they occur in setting the font-size itself, in
@@ -33,11 +33,15 @@ which case they are resolved using the inherited font size value.
The rem unit is resolved using the initial font size value, which is
not quite the same as the CSS definition of rem.
The calc() notation adds considerable expressive power. There are limits
on what types can be combined in such an expression (e.g. it does not make
sense to add a number and a time). For the full details, see the
[CSS3 Values and Units](https://www.w3.org/TR/css3-values/#calc-notation)
spec.
Length values using physical units (pt, pc, in, cm, mm) are translated
to px using the dpi value specified by the -gtk-dpi property, which is
different from the CSS definition, which uses a fixed dpi of 96.
The calc() notation adds considerable expressive power to all of these
datatypes. There are limits on what types can be combined in such an
expression (e.g. it does not make sense to add a number and a time).
For the full details, see the
[CSS Values and Units](https://www.w3.org/TR/css-values-4/) spec.
A common pattern among shorthand properties (called 'four sides') is one
where one to four values can be specified, to determine a value for each
@@ -82,36 +86,53 @@ color: var(--prop, green);
## Colors
### CSS Colors
Colors can be expressed in numerous ways in CSS (see the
[Color Module](https://www.w3.org/TR/css-color-5/). GTK supports
many (but not all) of these.
You can use rgb(), rgba(), hsl() with both the legacy or the modern CSS
syntax, and calc() can be used as well in color expressions.
### Non-CSS Colors
GTK extends the CSS syntax with several additional ways to specify colors.
These extensions are deprecated and should be replaced by the equivalent
standard CSS notions.
The first is a reference to a color defined via a @define-color rule in CSS.
The syntax for @define-color rules is as follows:
```
@define-color Name Color
@define-color name color
```
To refer to the color defined by a @define-color rule, prefix the name with @.
The standard CSS mechanisms that should be used instead of @define-color are
custom properties, :root and var().
GTK also supports color expressions, which allow colors to be transformed to
new ones. Color expressions can be nested, providing a rich language to
define colors. Color expressions resemble functions, taking 1 or more colors
and in some cases a number as arguments.
`lighter(Color)`
: produces a brighter variant of Color
`lighter(color)`
: produces a brighter variant of `color`.
`darker(Color)`
: produces a darker variant of Color
`darker(color)`
: produces a darker variant of `color`.
`shade(Color, Number)`
: changes the lightness of Color. The number ranges from 0 for black to 2 for white.
`shade(color, number)`
: changes the lightness of `color`. The `number` ranges from 0 for black to 2 for white.
`alpha(Color, Number)`
: replaces the alpha value of color with number (between 0 and 1)
`alpha(color, number)`
: multiplies the alpha value of `color` by `number` (between 0 and 1).
`mix(Color1, Color2, Number)`
: interpolates between the two colors
`mix(color1, color2, number)`
: interpolates between the two colors.
## Images
@@ -119,7 +140,7 @@ GTK extends the CSS syntax for images and also uses it for specifying icons.
To load a themed icon, use
```
-gtk-icontheme(Name)
-gtk-icontheme(name)
```
The specified icon name is used to look up a themed icon, while taking into
@@ -148,14 +169,14 @@ and the
syntax makes this available. -gtk-recolor requires a url as first argument.
The remaining arguments specify the color palette to use. If the palette is
not explicitly specified, the current value of the -gtk-icon-palette property
is used.
is used.
GTK supports scaled rendering on hi-resolution displays. This works best if
images can specify normal and hi-resolution variants. From CSS, this can be
done with
```
-gtk-scaled(Image1, Image2)
-gtk-scaled(image1, image2)
```
## GTK CSS Properties
-14
View File
@@ -522,8 +522,6 @@ gdk_clipboard_get_content (GdkClipboard *clipboard)
*
* If the clipboard is not local, this function does nothing but report success.
*
* The @callback must call [method@Gdk.Clipboard.store_finish].
*
* The purpose of this call is to preserve clipboard contents beyond the
* lifetime of an application, so this function is typically called on
* exit. Depending on the platform, the functionality may not be available
@@ -638,9 +636,6 @@ gdk_clipboard_read_internal (GdkClipboard *clipboard,
* Asynchronously requests an input stream to read the @clipboard's
* contents from.
*
* When the operation is finished @callback will be called. You must then
* call [method@Gdk.Clipboard.read_finish] to get the result of the operation.
*
* The clipboard will choose the most suitable mime type from the given list
* to fulfill the request, preferring the ones listed first.
*/
@@ -834,9 +829,6 @@ gdk_clipboard_read_value_internal (GdkClipboard *clipboard,
* Asynchronously request the @clipboard contents converted to the given
* @type.
*
* When the operation is finished @callback will be called. You must then call
* [method@Gdk.Clipboard.read_value_finish] to get the resulting `GValue`.
*
* For local clipboard contents that are available in the given `GType`,
* the value will be copied directly. Otherwise, GDK will try to use
* [func@content_deserialize_async] to convert the clipboard's data.
@@ -895,9 +887,6 @@ gdk_clipboard_read_value_finish (GdkClipboard *clipboard,
*
* Asynchronously request the @clipboard contents converted to a `GdkPixbuf`.
*
* When the operation is finished @callback will be called. You must then
* call [method@Gdk.Clipboard.read_texture_finish] to get the result.
*
* This is a simple wrapper around [method@Gdk.Clipboard.read_value_async].
* Use that function or [method@Gdk.Clipboard.read_async] directly if you
* need more control over the operation.
@@ -960,9 +949,6 @@ gdk_clipboard_read_texture_finish (GdkClipboard *clipboard,
*
* Asynchronously request the @clipboard contents converted to a string.
*
* When the operation is finished @callback will be called. You must then
* call [method@Gdk.Clipboard.read_text_finish] to get the result.
*
* This is a simple wrapper around [method@Gdk.Clipboard.read_value_async].
* Use that function or [method@Gdk.Clipboard.read_async] directly if you
* need more control over the operation.
-3
View File
@@ -540,9 +540,6 @@ deserialize_not_found (GdkContentDeserializer *deserializer)
*
* The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers
* indicate a higher priority.
*
* When the operation is finished, @callback will be called. You must then
* call [func@Gdk.content_deserialize_finish] to get the result of the operation.
*/
void
gdk_content_deserialize_async (GInputStream *stream,
-4
View File
@@ -279,10 +279,6 @@ gdk_content_provider_content_changed (GdkContentProvider *provider)
* Asynchronously writes the contents of @provider to @stream in the given
* @mime_type.
*
* When the operation is finished @callback will be called. You must then call
* [method@Gdk.ContentProvider.write_mime_type_finish] to get the result
* of the operation.
*
* The given mime type does not need to be listed in the formats returned by
* [method@Gdk.ContentProvider.ref_formats]. However, if the given `GType` is
* not supported, `G_IO_ERROR_NOT_SUPPORTED` will be reported.
-3
View File
@@ -546,9 +546,6 @@ serialize_not_found (GdkContentSerializer *serializer)
*
* The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers
* indicate a higher priority.
*
* When the operation is finished, @callback will be called. You must then
* call [func@Gdk.content_serialize_finish] to get the result of the operation.
*/
void
gdk_content_serialize_async (GOutputStream *stream,
+2 -6
View File
@@ -134,7 +134,7 @@ gdk_drop_read_local_async (GdkDrop *self,
g_object_get (priv->drag, "content", &content, NULL);
content_formats = gdk_content_provider_ref_formats (content);
g_object_unref (content);
g_object_unref (content);
content_formats = gdk_content_formats_union_serialize_mime_types (content_formats);
mime_type = gdk_content_formats_match_mime_type (content_formats, formats);
@@ -784,7 +784,7 @@ gdk_drop_read_value_internal (GdkDrop *self,
GdkContentFormats *formats;
GValue *value;
GTask *task;
g_return_if_fail (priv->state != GDK_DROP_STATE_FINISHED);
task = g_task_new (self, cancellable, callback, user_data);
@@ -849,10 +849,6 @@ gdk_drop_read_value_internal (GdkDrop *self,
* Asynchronously request the drag operation's contents converted
* to the given @type.
*
* When the operation is finished @callback will be called. You must
* then call [method@Gdk.Drop.read_value_finish] to get the resulting
* `GValue`.
*
* For local drag-and-drop operations that are available in the given
* `GType`, the value will be copied directly. Otherwise, GDK will
* try to use [func@Gdk.content_deserialize_async] to convert the data.
-3
View File
@@ -767,9 +767,6 @@ gdk_toplevel_titlebar_gesture (GdkToplevel *toplevel,
* This function asynchronously obtains a handle for a toplevel surface
* that can be passed to other processes.
*
* When a handle has been obtained, @callback will be called, and can
* receive the handle via [method@Gdk.Toplevel.export_handle_finish].
*
* It is an error to call this function on a surface that is already
* exported.
*
+2 -2
View File
@@ -96,12 +96,12 @@ _gdk_macos_drag_surface_constructed (GObject *object)
defer:NO
screen:screen];
_gdk_macos_surface_set_native (self, window);
[window setOpaque:NO];
[window setBackgroundColor:[NSColor clearColor]];
[window setDecorated:NO];
_gdk_macos_surface_set_native (self, window);
frame_clock = _gdk_frame_clock_idle_new ();
gdk_surface_set_frame_clock (surface, frame_clock);
g_object_unref (frame_clock);
+13 -3
View File
@@ -52,6 +52,7 @@ gdk_macos_popup_surface_layout (GdkMacosPopupSurface *self,
GdkRectangle bounds;
GdkRectangle final_rect;
int x, y;
int shadow_left, shadow_right, shadow_top, shadow_bottom;
g_assert (GDK_IS_MACOS_POPUP_SURFACE (self));
g_assert (layout != NULL);
@@ -68,10 +69,19 @@ gdk_macos_popup_surface_layout (GdkMacosPopupSurface *self,
monitor = _gdk_macos_surface_get_best_monitor (GDK_MACOS_SURFACE (self));
gdk_macos_monitor_get_workarea (monitor, &bounds);
gdk_popup_layout_get_shadow_width (layout,
&shadow_left,
&shadow_right,
&shadow_top,
&shadow_bottom);
gdk_surface_layout_popup_helper (GDK_SURFACE (self),
width,
height,
0, 0, 0, 0, /* shadow-left/right/top/bottom */
shadow_left,
shadow_right,
shadow_top,
shadow_bottom,
monitor,
&bounds,
self->layout,
@@ -306,14 +316,14 @@ _gdk_macos_popup_surface_constructed (GObject *object)
defer:NO
screen:screen];
_gdk_macos_surface_set_native (GDK_MACOS_SURFACE (self), window);
[window setOpaque:NO];
[window setBackgroundColor:[NSColor clearColor]];
[window setDecorated:NO];
[window setExcludedFromWindowsMenu:YES];
[window setLevel:NSPopUpMenuWindowLevel];
_gdk_macos_surface_set_native (GDK_MACOS_SURFACE (self), window);
gdk_surface_set_frame_clock (surface, gdk_surface_get_frame_clock (surface->parent));
GDK_END_MACOS_ALLOC_POOL;
+2 -2
View File
@@ -591,11 +591,11 @@ _gdk_macos_toplevel_surface_constructed (GObject *object)
defer:NO
screen:screen];
_gdk_macos_surface_set_native (GDK_MACOS_SURFACE (self), window);
/* Allow NSWindow to go fullscreen */
[window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
_gdk_macos_surface_set_native (GDK_MACOS_SURFACE (self), window);
frame_clock = _gdk_frame_clock_idle_new ();
gdk_surface_set_frame_clock (surface, frame_clock);
g_object_unref (frame_clock);
+1 -1
View File
@@ -128,8 +128,8 @@ install_headers(gdk_deprecated_headers, subdir: 'gtk-4.0/gdk/deprecated')
gdk_sources = gdk_public_sources + gdk_deprecated_sources
gdk_private_h_sources = files([
'gdkeventsprivate.h',
'gdkdevicetoolprivate.h',
'gdkeventsprivate.h',
'gdkhslaprivate.h',
'gdkmonitorprivate.h',
'gdkseatdefaultprivate.h',
+1
View File
@@ -37,6 +37,7 @@ static struct {
{ "appstarting", IDC_APPSTARTING },
{ "arrow", IDC_ARROW },
{ "cross", IDC_CROSS },
{ "dnd-move", IDC_ARROW },
{ "hand", IDC_HAND },
{ "help", IDC_HELP },
{ "ibeam", IDC_IBEAM },
+4 -1
View File
@@ -70,7 +70,10 @@ gsk_gl_frame_cleanup (GskGpuFrame *frame)
if (self->sync)
{
glClientWaitSync (self->sync, 0, -1);
g_clear_pointer (&self->sync, glDeleteSync);
/* can't use g_clear_pointer() on glDeleteSync(), see MR !7294 */
glDeleteSync (self->sync);
self->sync = NULL;
}
self->next_texture_slot = 0;
+7 -1
View File
@@ -249,7 +249,13 @@ gsk_gl_texture_data_free (gpointer user_data)
gdk_gl_context_make_current (data->context);
g_clear_pointer (&data->sync, glDeleteSync);
/* can't use g_clear_pointer() on glDeleteSync(), see MR !7294 */
if (data->sync)
{
glDeleteSync (data->sync);
data->sync = NULL;
}
glDeleteTextures (1, &data->texture_id);
g_object_unref (data->context);
+1 -1
View File
@@ -1261,7 +1261,7 @@ gsk_vulkan_device_find_allocator (GskVulkanDevice *self,
g_assert (found < properties.memoryTypeCount);
return gsk_vulkan_allocator_ref (gsk_vulkan_device_get_allocator (self, i, &properties.memoryTypes[i]));
return gsk_vulkan_allocator_ref (gsk_vulkan_device_get_allocator (self, found, &properties.memoryTypes[found]));
}
GskVulkanAllocator *
+24 -16
View File
@@ -26,6 +26,11 @@
#include "gtkcsserror.h"
#include "gtkcsslocationprivate.h"
/* We cannot include gtkdebug.h, so we must keep this in sync */
extern unsigned int gtk_get_debug_flags (void);
#define DEBUG_CSS (1 << 20)
#define DEBUG_CHECK_CSS ((gtk_get_debug_flags () & DEBUG_CSS) != 0)
static void clear_ref (GtkCssVariableValueReference *ref);
#define GDK_ARRAY_NAME gtk_css_parser_references
@@ -626,7 +631,7 @@ void
gtk_css_parser_skip (GtkCssParser *self)
{
const GtkCssToken *token;
token = gtk_css_parser_get_token (self);
if (gtk_css_token_is_preserved (token, NULL))
{
@@ -659,7 +664,7 @@ gtk_css_parser_skip_until (GtkCssParser *self,
GtkCssTokenType token_type)
{
const GtkCssToken *token;
for (token = gtk_css_parser_get_token (self);
!gtk_css_token_is (token, token_type) &&
!gtk_css_token_is (token, GTK_CSS_TOKEN_EOF);
@@ -817,19 +822,22 @@ gtk_css_parser_warn_deprecated (GtkCssParser *self,
const char *format,
...)
{
va_list args;
GError *error;
if (DEBUG_CHECK_CSS)
{
va_list args;
GError *error;
va_start (args, format);
error = g_error_new_valist (GTK_CSS_PARSER_WARNING,
GTK_CSS_PARSER_WARNING_DEPRECATED,
format, args);
gtk_css_parser_emit_error (self,
gtk_css_parser_get_start_location (self),
gtk_css_parser_get_end_location (self),
error);
g_error_free (error);
va_end (args);
va_start (args, format);
error = g_error_new_valist (GTK_CSS_PARSER_WARNING,
GTK_CSS_PARSER_WARNING_DEPRECATED,
format, args);
gtk_css_parser_emit_error (self,
gtk_css_parser_get_start_location (self),
gtk_css_parser_get_end_location (self),
error);
g_error_free (error);
va_end (args);
}
}
gboolean
@@ -1153,7 +1161,7 @@ gtk_css_parser_parse_url_arg (GtkCssParser *parser,
*out_url = gtk_css_parser_consume_string (parser);
if (*out_url == NULL)
return 0;
return 1;
}
@@ -1199,7 +1207,7 @@ gtk_css_parser_consume_url (GtkCssParser *self)
gtk_css_parser_error_syntax (self, "Expected a URL");
return NULL;
}
return url;
}
+1 -1
View File
@@ -62,7 +62,7 @@ struct _GtkMessageDialog
*
* > Please note that %GTK_BUTTONS_OK, %GTK_BUTTONS_YES_NO
* > and %GTK_BUTTONS_OK_CANCEL are discouraged by the
* > [GNOME Human Interface Guidelines](http://library.gnome.org/devel/hig-book/stable/).
* > [GNOME Human Interface Guidelines](https://developer.gnome.org/hig/).
*/
typedef enum
{
+2 -3
View File
@@ -99,7 +99,6 @@ window_handle_exported (GtkWindow *window,
* a given uri.
*
* The @callback will be called when the launch is completed.
* It should call gtk_show_uri_full_finish() to obtain the result.
*
* This is the recommended call to be used as it passes information
* necessary for sandbox helpers to parent their dialogs properly.
@@ -153,8 +152,8 @@ gtk_show_uri_full (GtkWindow *parent,
* Returns: %TRUE if the URI was shown successfully.
* Otherwise, %FALSE is returned and @error is set
*
* Deprecated: 4.10: Use [method@Gtk.FileLauncher.launch_finish] or
* [method@Gtk.UriLauncher.launch_finish] instead
* Deprecated: 4.10: Use [method@Gtk.FileLauncher.launch] or
* [method@Gtk.UriLauncher.launch] instead
*/
gboolean
gtk_show_uri_full_finish (GtkWindow *parent,
+1 -6
View File
@@ -33,8 +33,7 @@
* are needed to present a message to the user.
*
* The message is shown with the [method@Gtk.AlertDialog.choose]
* function. This API follows the GIO async pattern, and the result can
* be obtained by calling [method@Gtk.AlertDialog.choose_finish].
* function.
*
* If you don't need to wait for a button to be clicked, you can use
* [method@Gtk.AlertDialog.show].
@@ -687,10 +686,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
*
* This function shows the alert to the user.
*
* The @callback will be called when the alert is dismissed.
* It should call [method@Gtk.AlertDialog.choose_finish]
* to obtain the result.
*
* It is ok to pass `NULL` for the callback if the alert
* does not have more than one button. A simpler API for
* this case is [method@Gtk.AlertDialog.show].
+1 -7
View File
@@ -36,9 +36,7 @@
* should be modal.
*
* The dialog is shown with the [method@Gtk.ColorDialog.choose_rgba]
* function. This API follows the GIO async pattern, and the
* result can be obtained by calling
* [method@Gtk.ColorDialog.choose_rgba_finish].
* function.
*
* See [class@Gtk.ColorDialogButton] for a convenient control
* that uses `GtkColorDialog` and presents the results.
@@ -436,10 +434,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
* This function initiates a color choice operation by
* presenting a color chooser dialog to the user.
*
* The @callback will be called when the dialog is dismissed.
* It should call [method@Gtk.ColorDialog.choose_rgba_finish]
* to obtain the result.
*
* Since: 4.10
*/
void
+135 -1
View File
@@ -32,7 +32,9 @@
#include <math.h>
#include <string.h>
#include "gtkcolorutils.h"
#include "gtkcolorutilsprivate.h"
#include "gdkhslaprivate.h"
#include <math.h>
/* Converts from RGB to HSV */
static void
@@ -226,3 +228,135 @@ gtk_rgb_to_hsv (float r, float g, float b,
if (v)
*v = b;
}
void
gtk_rgb_to_hwb (float red, float green, float blue,
float *hue, float *white, float *black)
{
GdkRGBA rgba = (GdkRGBA) { red, green, blue, 1 };
GdkHSLA hsla;
_gdk_hsla_init_from_rgba (&hsla, &rgba);
*hue = hsla.hue;
*white = MIN (MIN (red, green), blue);
*black = (1 - MAX (MAX (red, green), blue));
}
void
gtk_hwb_to_rgb (float hue, float white, float black,
float *red, float *green, float *blue)
{
GdkHSLA hsla;
GdkRGBA rgba;
if (white + black >= 1)
{
float gray = white / (white + black);
*red = gray;
*green = gray;
*blue = gray;
return;
}
hsla.hue = hue;
hsla.saturation = 1.0;
hsla.lightness = 0.5;
_gdk_rgba_init_from_hsla (&rgba, &hsla);
*red = rgba.red * (1 - white - black) + white;
*green = rgba.green * (1 - white - black) + white;
*blue = rgba.blue * (1 - white - black) + white;
}
#define DEG_TO_RAD(x) ((x) * G_PI / 180)
#define RAD_TO_DEG(x) ((x) * 180 / G_PI)
void
gtk_oklab_to_oklch (float L, float a, float b,
float *L2, float *C, float *H)
{
*L2 = L;
*C = sqrtf (a * a + b * b);
*H = atan2 (b, a);
}
void
gtk_oklch_to_oklab (float L, float C, float H,
float *L2, float *a, float *b)
{
*L2 = L;
if (H == 0)
{
*a = *b = 0;
}
else
{
*a = C * cosf (DEG_TO_RAD (H));
*b = C * sinf (DEG_TO_RAD (H));
}
}
static float
apply_gamma (float v)
{
if (v > 0.0031308)
return 1.055 * pow (v, 1/2.4) - 0.055;
else
return 12.92 * v;
}
static float
unapply_gamma (float v)
{
if (v >= 0.04045)
return pow (((v + 0.055)/(1 + 0.055)), 2.4);
else
return v / 12.92;
}
void
gtk_oklab_to_rgb (float L, float a, float b,
float *red, float *green, float *blue)
{
float l = L + 0.3963377774f * a + 0.2158037573f * b;
float m = L - 0.1055613458f * a - 0.0638541728f * b;
float s = L - 0.0894841775f * a - 1.2914855480f * b;
l = powf (l, 3);
m = powf (m, 3);
s = powf (s, 3);
float linear_red = +4.0767416621f * l - 3.3077115913f * m + 0.2309699292f * s;
float linear_green = -1.2684380046f * l + 2.6097574011f * m - 0.3413193965f * s;
float linear_blue = -0.0041960863f * l - 0.7034186147f * m + 1.7076147010f * s;
*red = apply_gamma (linear_red);
*green = apply_gamma (linear_green);
*blue = apply_gamma (linear_blue);
}
void
gtk_rgb_to_oklab (float red, float green, float blue,
float *L, float *a, float *b)
{
float linear_red = unapply_gamma (red);
float linear_green = unapply_gamma (green);
float linear_blue = unapply_gamma (blue);
float l = 0.4122214708f * linear_red + 0.5363325363f * linear_green + 0.0514459929f * linear_blue;
float m = 0.2119034982f * linear_red + 0.6806995451f * linear_green + 0.1073969566f * linear_blue;
float s = 0.0883024619f * linear_red + 0.2817188376f * linear_green + 0.6299787005f * linear_blue;
l = cbrtf (l);
m = cbrtf (m);
s = cbrtf (s);
*L = 0.2104542553f*l + 0.7936177850f*m - 0.0040720468f*s;
*a = 1.9779984951f*l - 2.4285922050f*m + 0.4505937099f*s;
*b = 0.0259040371f*l + 0.7827717662f*m - 0.8086757660f*s;
}
+40
View File
@@ -0,0 +1,40 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2024 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "gtkcolorutils.h"
G_BEGIN_DECLS
void gtk_rgb_to_hwb (float red, float green, float blue,
float *hue, float *white, float *black);
void gtk_hwb_to_rgb (float hue, float white, float black,
float *red, float *green, float *blue);
void gtk_oklab_to_oklch (float L, float a, float b,
float *L2, float *C, float *H);
void gtk_oklch_to_oklab (float L, float C, float H,
float *L2, float *a, float *b);
void gtk_oklab_to_rgb (float L, float a, float b,
float *red, float *green, float *blue);
void gtk_rgb_to_oklab (float red, float green, float blue,
float *L, float *a, float *b);
G_END_DECLS
+257 -4
View File
@@ -28,6 +28,7 @@
#include "gdk/gdkhslaprivate.h"
#include "gdk/gdkrgbaprivate.h"
#include "gtkcolorutilsprivate.h"
typedef enum {
COLOR_TYPE_LITERAL,
@@ -694,7 +695,10 @@ gtk_css_color_value_can_parse (GtkCssParser *parser)
|| gtk_css_parser_has_function (parser, "hsl")
|| gtk_css_parser_has_function (parser, "hsla")
|| gtk_css_parser_has_function (parser, "rgb")
|| gtk_css_parser_has_function (parser, "rgba");
|| gtk_css_parser_has_function (parser, "rgba")
|| gtk_css_parser_has_function (parser, "hwb")
|| gtk_css_parser_has_function (parser, "oklab")
|| gtk_css_parser_has_function (parser, "oklch");
}
typedef struct
@@ -800,6 +804,25 @@ parse_hsl_channel_value (GtkCssParser *parser,
return TRUE;
}
static gboolean
parse_hwb_channel_value (GtkCssParser *parser,
float *value)
{
GtkCssNumberParseFlags flags = GTK_CSS_PARSE_PERCENT | GTK_CSS_PARSE_NUMBER;
GtkCssValue *val;
val = gtk_css_number_value_parse (parser, flags);
if (val == NULL)
return FALSE;
*value = gtk_css_number_value_get_canonical (val, 100);
*value = CLAMP (*value, 0.0, 100.0);
gtk_css_value_unref (val);
return TRUE;
}
static gboolean
parse_hue_value (GtkCssParser *parser,
float *value)
@@ -817,6 +840,62 @@ parse_hue_value (GtkCssParser *parser,
return TRUE;
}
static gboolean
parse_ok_L_value (GtkCssParser *parser,
float *value)
{
GtkCssNumberParseFlags flags = GTK_CSS_PARSE_PERCENT | GTK_CSS_PARSE_NUMBER;
GtkCssValue *val;
val = gtk_css_number_value_parse (parser, flags);
if (val == NULL)
return FALSE;
*value = gtk_css_number_value_get_canonical (val, 1);
*value = CLAMP (*value, 0.0, 1.0);
gtk_css_value_unref (val);
return TRUE;
}
static gboolean
parse_ok_C_value (GtkCssParser *parser,
float *value)
{
GtkCssNumberParseFlags flags = GTK_CSS_PARSE_PERCENT | GTK_CSS_PARSE_NUMBER;
GtkCssValue *val;
val = gtk_css_number_value_parse (parser, flags);
if (val == NULL)
return FALSE;
*value = gtk_css_number_value_get_canonical (val, 1);
*value = MAX (*value, 0.0);
gtk_css_value_unref (val);
return TRUE;
}
static gboolean
parse_ok_ab_value (GtkCssParser *parser,
float *value)
{
GtkCssNumberParseFlags flags = GTK_CSS_PARSE_PERCENT | GTK_CSS_PARSE_NUMBER;
GtkCssValue *val;
val = gtk_css_number_value_parse (parser, flags);
if (val == NULL)
return FALSE;
*value = gtk_css_number_value_get_canonical (val, 0.4);
gtk_css_value_unref (val);
return TRUE;
}
static guint
parse_rgba_color_channel (GtkCssParser *parser,
guint arg,
@@ -890,8 +969,129 @@ parse_hsla_color_channel (GtkCssParser *parser,
}
}
typedef struct {
float hue, white, black, alpha;
} HwbData;
static guint
parse_hwb_color_channel (GtkCssParser *parser,
guint arg,
ColorSyntax syntax,
gpointer data)
{
HwbData *hwb = data;
switch (arg)
{
case 0:
if (!parse_hue_value (parser, &hwb->hue))
return 0;
return 1;
case 1:
if (!parse_hwb_channel_value (parser, &hwb->white))
return 0;
return 1;
case 2:
if (!parse_hwb_channel_value (parser, &hwb->black))
return 0;
return 1;
case 3:
if (!parse_alpha_value (parser, &hwb->alpha, syntax))
return 0;
return 1;
default:
g_assert_not_reached ();
return 0;
}
}
typedef struct {
float L, a, b, alpha;
} LabData;
static guint
parse_oklab_color_channel (GtkCssParser *parser,
guint arg,
ColorSyntax syntax,
gpointer data)
{
LabData *oklab = data;
switch (arg)
{
case 0:
if (!parse_ok_L_value (parser, &oklab->L))
return 0;
return 1;
case 1:
if (!parse_ok_ab_value (parser, &oklab->a))
return 0;
return 1;
case 2:
if (!parse_ok_ab_value (parser, &oklab->b))
return 0;
return 1;
case 3:
if (!parse_alpha_value (parser, &oklab->alpha, syntax))
return 0;
return 1;
default:
g_assert_not_reached ();
return 0;
}
}
typedef struct {
float L, C, H, alpha;
} LchData;
static guint
parse_oklch_color_channel (GtkCssParser *parser,
guint arg,
ColorSyntax syntax,
gpointer data)
{
LchData *oklch = data;
switch (arg)
{
case 0:
if (!parse_ok_L_value (parser, &oklch->L))
return 0;
return 1;
case 1:
if (!parse_ok_C_value (parser, &oklch->C))
return 0;
return 1;
case 2:
if (!parse_hue_value (parser, &oklch->H))
return 0;
return 1;
case 3:
if (!parse_alpha_value (parser, &oklch->alpha, syntax))
return 0;
return 1;
default:
g_assert_not_reached ();
return 0;
}
}
static gboolean
parse_color_function (GtkCssParser *self,
ColorSyntax syntax,
gboolean allow_alpha,
gboolean require_alpha,
guint (* parse_func) (GtkCssParser *, guint, ColorSyntax, gpointer),
@@ -903,7 +1103,6 @@ parse_color_function (GtkCssParser *self,
guint arg;
guint min_args = 3;
guint max_args = 4;
ColorSyntax syntax = COLOR_SYNTAX_DETECTING;
token = gtk_css_parser_get_token (self);
g_return_val_if_fail (gtk_css_token_is (token, GTK_CSS_TOKEN_FUNCTION), FALSE);
@@ -1029,7 +1228,7 @@ gtk_css_color_value_parse (GtkCssParser *parser)
has_alpha = gtk_css_parser_has_function (parser, "rgba");
if (!parse_color_function (parser, has_alpha, has_alpha, parse_rgba_color_channel, &data))
if (!parse_color_function (parser, COLOR_SYNTAX_DETECTING, has_alpha, has_alpha, parse_rgba_color_channel, &data))
return NULL;
return gtk_css_color_value_new_literal (&rgba);
@@ -1040,11 +1239,65 @@ gtk_css_color_value_parse (GtkCssParser *parser)
hsla.alpha = 1.0;
if (!parse_color_function (parser, TRUE, FALSE, parse_hsla_color_channel, &hsla))
if (!parse_color_function (parser, COLOR_SYNTAX_DETECTING, TRUE, FALSE, parse_hsla_color_channel, &hsla))
return NULL;
_gdk_rgba_init_from_hsla (&rgba, &hsla);
return gtk_css_color_value_new_literal (&rgba);
}
else if (gtk_css_parser_has_function (parser, "hwb"))
{
HwbData hwb = { 0, };
float red, green, blue;
hwb.alpha = 1.0;
if (!parse_color_function (parser, COLOR_SYNTAX_MODERN, TRUE, FALSE, parse_hwb_color_channel, &hwb))
return NULL;
hwb.white /= 100.0;
hwb.black /= 100.0;
gtk_hwb_to_rgb (hwb.hue, hwb.white, hwb.black, &red, &green, &blue);
rgba.red = red;
rgba.green = green;
rgba.blue = blue;
rgba.alpha = hwb.alpha;
return gtk_css_color_value_new_literal (&rgba);
}
else if (gtk_css_parser_has_function (parser, "oklab"))
{
LabData oklab = { 0, };
oklab.alpha = 1.0;
if (!parse_color_function (parser, COLOR_SYNTAX_MODERN, TRUE, FALSE, parse_oklab_color_channel, &oklab))
return NULL;
gtk_oklab_to_rgb (oklab.L, oklab.a, oklab.b, &rgba.red, &rgba.green, &rgba.blue);
rgba.alpha = oklab.alpha;
return gtk_css_color_value_new_literal (&rgba);
}
else if (gtk_css_parser_has_function (parser, "oklch"))
{
LchData oklch = { 0, };
float L, a, b;
float red, green, blue;
oklch.alpha = 1.0;
if (!parse_color_function (parser, COLOR_SYNTAX_MODERN, TRUE, FALSE, parse_oklch_color_channel, &oklch))
return NULL;
gtk_oklch_to_oklab (oklch.L, oklch.C, oklch.H, &L, &a, &b);
gtk_oklab_to_rgb (L, a, b, &red, &green, &blue);
rgba.alpha = oklch.alpha;
return gtk_css_color_value_new_literal (&rgba);
}
else if (gtk_css_parser_has_function (parser, "lighter"))
+11 -1
View File
@@ -220,6 +220,8 @@ parser_error (GtkCssParser *parser,
{
for (int i = 0; i < n_vars; i++)
{
GtkCssSection *section;
if (names[i + 1])
g_set_error (&new_error,
GTK_CSS_PARSER_ERROR, GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
@@ -228,7 +230,15 @@ parser_error (GtkCssParser *parser,
g_set_error_literal (&new_error,
GTK_CSS_PARSER_ERROR, GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
error->message);
gtk_style_provider_emit_error (provider, vars[i]->section, new_error);
if (vars[i]->section == NULL)
section = gtk_css_section_new (gtk_css_parser_get_file (parser), start, end);
else
section = gtk_css_section_ref (vars[i]->section);
gtk_style_provider_emit_error (provider, section, new_error);
gtk_css_section_unref (section);
g_clear_error (&new_error);
}
+21
View File
@@ -1033,6 +1033,8 @@ selection_check (GtkFileChooserWidget *impl,
g_clear_object (&info);
}
g_clear_pointer (&bitset, gtk_bitset_unref);
g_assert (n_selected == 0 || !(all_files && all_folders));
if (out_num_selected)
@@ -1137,6 +1139,8 @@ add_to_shortcuts_cb (GSimpleAction *action,
g_clear_object (&info);
}
g_clear_pointer (&bitset, gtk_bitset_unref);
}
typedef struct {
@@ -1217,6 +1221,8 @@ delete_file_cb (GSimpleAction *action,
g_clear_object (&info);
}
g_clear_pointer (&bitset, gtk_bitset_unref);
}
static void
@@ -1247,6 +1253,8 @@ trash_file_cb (GSimpleAction *action,
g_clear_object (&info);
}
g_clear_pointer (&bitset, gtk_bitset_unref);
}
static void
@@ -2589,6 +2597,8 @@ location_bar_update (GtkFileChooserWidget *impl)
if (gtk_bitset_iter_init_first (&iter, bitset, &position))
put_recent_folder_in_pathbar (impl, position);
g_clear_pointer (&bitset, gtk_bitset_unref);
}
visible = FALSE;
break;
@@ -3983,6 +3993,8 @@ update_chooser_entry (GtkFileChooserWidget *impl)
n_selected++;
}
g_clear_pointer (&bitset, gtk_bitset_unref);
if (n_selected == 0)
{
if (impl->operation_mode == OPERATION_MODE_RECENT)
@@ -4469,6 +4481,8 @@ gtk_file_chooser_widget_unselect_file (GtkFileChooser *chooser,
if (gtk_bitset_iter_is_valid (&iter))
gtk_selection_model_unselect_item (impl->selection_model, i);
g_clear_pointer (&bitset, gtk_bitset_unref);
}
static void
@@ -4685,6 +4699,8 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser)
g_list_store_append (result, file);
}
g_clear_pointer (&bitset, gtk_bitset_unref);
/* If there is no selection in the file list, we probably have this situation:
*
* 1. The user typed a filename in the SAVE filename entry ("foo.txt").
@@ -4895,12 +4911,15 @@ switch_to_selected_folder (GtkFileChooserWidget *impl)
file = _gtk_file_info_get_file (info);
change_folder_and_display_error (impl, file, FALSE);
g_clear_pointer (&bitset, gtk_bitset_unref);
g_object_unref (info);
return;
}
g_clear_object (&info);
}
g_clear_pointer (&bitset, gtk_bitset_unref);
}
/* Gets the display name of the selected file in the file list; assumes single
@@ -5630,6 +5649,8 @@ gtk_file_chooser_widget_get_selected_files (GtkFileChooserWidget *impl)
g_clear_object (&info);
}
g_clear_pointer (&bitset, gtk_bitset_unref);
return result;
}
+2 -15
View File
@@ -37,10 +37,7 @@
* should be modal.
*
* The dialog is shown with [method@Gtk.FileDialog.open],
* [method@Gtk.FileDialog.save], etc. These APIs follow the
* GIO async pattern, and the result can be obtained by calling
* the corresponding finish function, for example
* [method@Gtk.FileDialog.open_finish].
* [method@Gtk.FileDialog.save], etc.
*
* Since: 4.10
*/
@@ -693,7 +690,7 @@ gtk_file_dialog_set_initial_file (GtkFileDialog *self,
{
GFile *folder;
GFileInfo *info;
if (self->initial_file && g_file_equal (self->initial_file, file))
return;
@@ -927,8 +924,6 @@ finish_multiple_files_op (GtkFileDialog *self,
* presenting a file chooser dialog to the user.
*
* The @callback will be called when the dialog is dismissed.
* It should call [method@Gtk.FileDialog.open_finish]
* to obtain the result.
*
* Since: 4.10
*/
@@ -1001,8 +996,6 @@ gtk_file_dialog_open_finish (GtkFileDialog *self,
* will be in the directory [property@Gtk.FileDialog:initial-folder].
*
* The @callback will be called when the dialog is dismissed.
* It should call [method@Gtk.FileDialog.select_folder_finish]
* to obtain the result.
*
* Since: 4.10
*/
@@ -1071,8 +1064,6 @@ gtk_file_dialog_select_folder_finish (GtkFileDialog *self,
* presenting a file chooser dialog to the user.
*
* The @callback will be called when the dialog is dismissed.
* It should call [method@Gtk.FileDialog.save_finish]
* to obtain the result.
*
* Since: 4.10
*/
@@ -1144,8 +1135,6 @@ gtk_file_dialog_save_finish (GtkFileDialog *self,
* [property@Gtk.FileDialog:initial-folder].
*
* The @callback will be called when the dialog is dismissed.
* It should call [method@Gtk.FileDialog.open_multiple_finish]
* to obtain the result.
*
* Since: 4.10
*/
@@ -1218,8 +1207,6 @@ gtk_file_dialog_open_multiple_finish (GtkFileDialog *self,
* [property@Gtk.FileDialog:initial-folder].
*
* The @callback will be called when the dialog is dismissed.
* It should call [method@Gtk.FileDialog.select_multiple_folders_finish]
* to obtain the result.
*
* Since: 4.10
*/
-10
View File
@@ -37,8 +37,6 @@
* right away.
*
* The operation is started with the [method@Gtk.FileLauncher.launch] function.
* This API follows the GIO async pattern, and the result can be obtained by
* calling [method@Gtk.FileLauncher.launch_finish].
*
* To launch uris that don't represent files, use [class@Gtk.UriLauncher].
*
@@ -464,10 +462,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
*
* This may present an app chooser dialog to the user.
*
* The @callback will be called when the operation is completed.
* It should call [method@Gtk.FileLauncher.launch_finish] to obtain
* the result.
*
* Since: 4.10
*/
void
@@ -558,10 +552,6 @@ gtk_file_launcher_launch_finish (GtkFileLauncher *self,
* This is only supported native files. It will fail if @file
* is e.g. a http:// uri.
*
* The @callback will be called when the operation is completed.
* It should call [method@Gtk.FileLauncher.open_containing_folder_finish]
* to obtain the result.
*
* Since: 4.10
*/
void
+1 -19
View File
@@ -37,9 +37,7 @@
* should be modal.
*
* The dialog is shown with the [method@Gtk.FontDialog.choose_font]
* function or its variants. This API follows the GIO async pattern,
* and the result can be obtained by calling the corresponding
* finish function, such as [method@Gtk.FontDialog.choose_font_finish].
* function or its variants.
*
* See [class@Gtk.FontDialogButton] for a convenient control
* that uses `GtkFontDialog` and presents the results.
@@ -627,10 +625,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
* This function initiates a font selection operation by
* presenting a dialog to the user for selecting a font family.
*
* The @callback will be called when the dialog is dismissed.
* It should call [method@Gtk.FontDialog.choose_family_finish]
* to obtain the result.
*
* Since: 4.10
*/
void
@@ -716,10 +710,6 @@ gtk_font_dialog_choose_family_finish (GtkFontDialog *self,
* presenting a dialog to the user for selecting a font face
* (i.e. a font family and style, but not a specific font size).
*
* The @callback will be called when the dialog is dismissed.
* It should call [method@Gtk.FontDialog.choose_face_finish]
* to obtain the result.
*
* Since: 4.10
*/
void
@@ -798,10 +788,6 @@ gtk_font_dialog_choose_face_finish (GtkFontDialog *self,
* This function initiates a font selection operation by
* presenting a dialog to the user for selecting a font.
*
* The @callback will be called when the dialog is dismissed.
* It should call [method@Gtk.FontDialog.choose_font_finish]
* to obtain the result.
*
* If you want to let the user select font features as well,
* use [method@Gtk.FontDialog.choose_font_and_features] instead.
*
@@ -883,10 +869,6 @@ gtk_font_dialog_choose_font_finish (GtkFontDialog *self,
* Font features affect how the font is rendered, for example
* enabling glyph variants or ligatures.
*
* The @callback will be called when the dialog is dismissed.
* It should call [method@Gtk.FontDialog.choose_font_and_features_finish]
* to obtain the result.
*
* Since: 4.10
*/
void
+3 -9
View File
@@ -1430,10 +1430,8 @@ print_response_cb (GtkPrintUnixDialog *window,
* and set up print settings and page setup.
*
* The @callback will be called when the dialog is dismissed.
* It should call [method@Gtk.PrintDialog.setup_finish]
* to obtain the results in the form of a [struct@Gtk.PrintSetup],
* that can then be passed to [method@Gtk.PrintDialog.print]
* or [method@Gtk.PrintDialog.print_file].
* The obtained [struct@Gtk.PrintSetup] can then be passed
* to [method@Gtk.PrintDialog.print] or [method@Gtk.PrintDialog.print_file].
*
* One possible use for this method is to have the user select a printer,
* then show a page setup UI in the application (e.g. to arrange images
@@ -1533,8 +1531,7 @@ gtk_print_dialog_setup_finish (GtkPrintDialog *self,
* If you pass `NULL` as @setup, then this method will present a print dialog.
* Otherwise, it will attempt to print directly, without user interaction.
*
* The @callback will be called when the printing is done. It should call
* [method@Gtk.PrintDialog.print_finish] to obtain the results.
* The @callback will be called when the printing is done.
*
* Since: 4.14
*/
@@ -1659,9 +1656,6 @@ gtk_print_dialog_print_finish (GtkPrintDialog *self,
* If you pass `NULL` as @setup, then this method will present a print dialog.
* Otherwise, it will attempt to print directly, without user interaction.
*
* The @callback will be called when the printing is done. It should call
* [method@Gtk.PrintDialog.print_file_finish] to obtain the results.
*
* Since: 4.14
*/
void
+2
View File
@@ -5417,6 +5417,8 @@ paste_received (GObject *clipboard,
if (priv->truncate_multiline)
length = truncate_multiline (text);
else
length = strlen (text);
begin_change (self);
if (priv->selection_bound != priv->current_pos)
-6
View File
@@ -37,8 +37,6 @@
* right away.
*
* The operation is started with the [method@Gtk.UriLauncher.launch] function.
* This API follows the GIO async pattern, and the result can be obtained by
* calling [method@Gtk.UriLauncher.launch_finish].
*
* To launch a file, use [class@Gtk.FileLauncher].
*
@@ -270,10 +268,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
*
* This may present an app chooser dialog to the user.
*
* The @callback will be called when the operation is completed.
* It should call [method@Gtk.UriLauncher.launch_finish] to obtain
* the result.
*
* Since: 4.10
*/
void
+1 -1
View File
@@ -1,5 +1,5 @@
project('gtk', 'c',
version: '4.15.1',
version: '4.15.2',
default_options: [
'buildtype=debugoptimized',
'warning_level=1',
+201 -174
View File
@@ -12,17 +12,17 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+.HEAD.he\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
"POT-Creation-Date: 2024-04-04 17:02+0000\n"
"PO-Revision-Date: 2024-04-06 16:18+0300\n"
"Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n"
"POT-Creation-Date: 2024-05-24 05:15+0000\n"
"PO-Revision-Date: 2024-05-28 11:54+0300\n"
"Last-Translator: Yosef Or Boczko <yoseforb@gmail.com>\n"
"Language-Team: Hebrew\n"
"Language: he\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n==2 ? 1 : n>10 && n%10==0 ? 2 : "
"3);\n"
"X-Generator: Poedit 3.4.2\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n==2 ? 1 : n>10 && n%10==0 ? "
"2 : 3)\n"
"X-Generator: Gtranslator 46.1\n"
"X-Project-Style: default\n"
#: gdk/broadway/gdkbroadway-server.c:135
@@ -34,11 +34,11 @@ msgstr "סוג תצוגת ה־broadway אינה נתמכת: %s"
msgid "This clipboard cannot store data."
msgstr "לוח גזירים זה לא יכול לאחסן נתונים."
#: gdk/gdkclipboard.c:287 gdk/gdkclipboard.c:786 gdk/gdkclipboard.c:1086
#: gdk/gdkclipboard.c:287 gdk/gdkclipboard.c:781 gdk/gdkclipboard.c:1072
msgid "Cannot read from empty clipboard."
msgstr "אי אפשר לקרוא מלוח גזירים ריק."
#: gdk/gdkclipboard.c:318 gdk/gdkclipboard.c:1136 gdk/gdkdrag.c:606
#: gdk/gdkclipboard.c:318 gdk/gdkclipboard.c:1122 gdk/gdkdrag.c:606
msgid "No compatible formats to transfer clipboard contents."
msgstr "אין תצורות תואמות להעברת תכני לוח גזירים."
@@ -57,7 +57,7 @@ msgstr "לא ניתן לספק תוכן בתור %s"
msgid "The current backend does not support OpenGL"
msgstr "המנשק הנוכחי אינו תומך ב־‏OpenGL"
#: gdk/gdkdisplay.c:1315 gdk/gdkvulkancontext.c:1600
#: gdk/gdkdisplay.c:1315 gdk/gdkvulkancontext.c:1638
msgid "Vulkan support disabled via GDK_DEBUG"
msgstr "התמיכה ב־Vulkan מושבתת דרך GDK_DEBUG"
@@ -124,8 +124,8 @@ msgid "No GL API allowed."
msgstr "אין GL API מאופשר."
#: gdk/gdkglcontext.c:447 gdk/win32/gdkglcontext-win32-wgl.c:395
#: gdk/win32/gdkglcontext-win32-wgl.c:538 gdk/win32/gdkglcontext-win32-wgl.c:582
#: gdk/x11/gdkglcontext-glx.c:691
#: gdk/win32/gdkglcontext-win32-wgl.c:538
#: gdk/win32/gdkglcontext-win32-wgl.c:582 gdk/x11/gdkglcontext-glx.c:691
msgid "Unable to create a GL context"
msgstr "Unable to create a GL context"
@@ -144,7 +144,7 @@ msgstr "היישום אינו תומך ב־API ‏%s"
#. translators: This is about OpenGL backend names, like
#. * "Trying to use X11 GLX, but EGL is already in use"
#: gdk/gdkglcontext.c:2123
#: gdk/gdkglcontext.c:2121
#, c-format
msgid "Trying to use %s, but %s is already in use"
msgstr "מתבצע ניסיון להשתמש ב־%s אך %s כבר בשימוש"
@@ -542,7 +542,7 @@ msgstr "שגיאה בפענוח קובץ תמונת JPEG‏ (%s)"
msgid "Unsupported JPEG colorspace (%d)"
msgstr "מרחב הצבעים של ה־JPEG אינו נתמך (%d)"
#: gdk/loaders/gdkjpeg.c:203 gdk/loaders/gdkpng.c:286 gdk/loaders/gdktiff.c:472
#: gdk/loaders/gdkjpeg.c:203 gdk/loaders/gdkpng.c:289 gdk/loaders/gdktiff.c:472
#, c-format
msgid "Not enough memory for image size %ux%u"
msgstr "אין מספיק זיכרון לתמונה בגודל ‎%u×%u‎"
@@ -552,17 +552,17 @@ msgstr "אין מספיק זיכרון לתמונה בגודל ‎%u×%u‎"
msgid "Error reading png (%s)"
msgstr "שגיאה בקריאת png (%s)"
#: gdk/loaders/gdkpng.c:212
#: gdk/loaders/gdkpng.c:215
#, c-format
msgid "Unsupported depth %u in png image"
msgstr "העומק %u אינו נתמך בתמונות png"
#: gdk/loaders/gdkpng.c:262
#: gdk/loaders/gdkpng.c:265
#, c-format
msgid "Unsupported color type %u in png image"
msgstr "סוג הצבע %u אינו נתמך בתמונות png"
#: gdk/loaders/gdkpng.c:272
#: gdk/loaders/gdkpng.c:275
#, c-format
msgid "Image stride too large for image size %ux%u"
msgstr "פסיעת התמונה גדולה מדי לגודל התמונה %ux%u"
@@ -647,7 +647,8 @@ msgstr "לא ניתן לקבל נתונים מלוח הגזירים. הקצאת
#: gdk/win32/gdkclipdrop-win32.c:930
#, c-format
msgid "Cannot get clipboard data. OpenClipboard() timed out."
msgstr "לא ניתן לקבל נתונים מלוח הגזירים. הזמן שהוקצב ל־OpenClipboard() הסתיים."
msgstr ""
"לא ניתן לקבל נתונים מלוח הגזירים. הזמן שהוקצב ל־OpenClipboard() הסתיים."
#: gdk/win32/gdkclipdrop-win32.c:940
#, c-format
@@ -815,7 +816,8 @@ msgstr "אין מספיק זיכרון ביעד"
msgid "Need complete input to do conversion"
msgstr "נדרש קלט מלא כדי לבצע המרה"
#: gdk/x11/gdktextlistconverter-x11.c:216 gdk/x11/gdktextlistconverter-x11.c:250
#: gdk/x11/gdktextlistconverter-x11.c:216
#: gdk/x11/gdktextlistconverter-x11.c:250
msgid "Invalid byte sequence in conversion input"
msgstr "רצף בתים שגוי בקלט ההמרה"
@@ -1055,7 +1057,7 @@ msgid "%d%%"
msgstr "%d%%"
#: gtk/deprecated/gtkcolorbutton.c:183 gtk/deprecated/gtkcolorbutton.c:314
#: gtk/gtkcolordialog.c:411
#: gtk/gtkcolordialog.c:409
msgid "Pick a Color"
msgstr "בחירת צבע"
@@ -1076,7 +1078,7 @@ msgid "Sans 12"
msgstr "Sans 12"
#: gtk/deprecated/gtkfontbutton.c:507 gtk/deprecated/gtkfontbutton.c:624
#: gtk/gtkfontdialog.c:596
#: gtk/gtkfontdialog.c:594
msgid "Pick a Font"
msgstr "בחירת גופן"
@@ -1122,7 +1124,7 @@ msgstr ""
"מדיניות המערכת מונעת ביצוע שינויים.‬\n"
"‫נא ליצור קשר עם מנהל המערכת"
#: gtk/deprecated/gtkshow.c:183
#: gtk/deprecated/gtkshow.c:182
msgid "Could not show link"
msgstr "לא ניתן להציג את הקישור"
@@ -1316,7 +1318,8 @@ msgstr ""
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: gtk/gtkaccelgroup.c:837 gtk/gtkshortcutlabel.c:101 gtk/gtkshortcutlabel.c:137
#: gtk/gtkaccelgroup.c:837 gtk/gtkshortcutlabel.c:101
#: gtk/gtkshortcutlabel.c:137
msgctxt "keyboard label"
msgid "Shift"
msgstr "Shift"
@@ -1326,7 +1329,8 @@ msgstr "Shift"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: gtk/gtkaccelgroup.c:856 gtk/gtkshortcutlabel.c:104 gtk/gtkshortcutlabel.c:139
#: gtk/gtkaccelgroup.c:856 gtk/gtkshortcutlabel.c:104
#: gtk/gtkshortcutlabel.c:139
msgctxt "keyboard label"
msgid "Ctrl"
msgstr "Ctrl"
@@ -1336,7 +1340,8 @@ msgstr "Ctrl"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: gtk/gtkaccelgroup.c:875 gtk/gtkshortcutlabel.c:107 gtk/gtkshortcutlabel.c:141
#: gtk/gtkaccelgroup.c:875 gtk/gtkshortcutlabel.c:107
#: gtk/gtkshortcutlabel.c:141
msgctxt "keyboard label"
msgid "Alt"
msgstr "Alt"
@@ -1346,7 +1351,8 @@ msgstr "Alt"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: gtk/gtkaccelgroup.c:893 gtk/gtkshortcutlabel.c:113 gtk/gtkshortcutlabel.c:143
#: gtk/gtkaccelgroup.c:893 gtk/gtkshortcutlabel.c:113
#: gtk/gtkshortcutlabel.c:143
msgctxt "keyboard label"
msgid "Super"
msgstr "Super"
@@ -1356,7 +1362,8 @@ msgstr "Super"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: gtk/gtkaccelgroup.c:907 gtk/gtkshortcutlabel.c:116 gtk/gtkshortcutlabel.c:145
#: gtk/gtkaccelgroup.c:907 gtk/gtkshortcutlabel.c:116
#: gtk/gtkshortcutlabel.c:145
msgctxt "keyboard label"
msgid "Hyper"
msgstr "Hyper"
@@ -1366,7 +1373,8 @@ msgstr "Hyper"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: gtk/gtkaccelgroup.c:922 gtk/gtkshortcutlabel.c:110 gtk/gtkshortcutlabel.c:148
#: gtk/gtkaccelgroup.c:922 gtk/gtkshortcutlabel.c:110
#: gtk/gtkshortcutlabel.c:148
msgctxt "keyboard label"
msgid "Meta"
msgstr "מטה"
@@ -1811,7 +1819,7 @@ msgctxt "accessibility"
msgid "terminal"
msgstr "מסוף"
#: gtk/gtkalertdialog.c:668 gtk/print/gtkcustompaperunixdialog.c:322
#: gtk/gtkalertdialog.c:667 gtk/print/gtkcustompaperunixdialog.c:322
#: gtk/gtkmessagedialog.c:166 gtk/ui/gtkassistant.ui:40
msgid "_Close"
msgstr "_סגירה"
@@ -2292,22 +2300,23 @@ msgstr "קובץ בשם זה כבר קיים"
#: gtk/gtkfilechoosernative.c:520 gtk/gtkfilechoosernative.c:600
#: gtk/gtkfilechooserwidget.c:1188 gtk/gtkfilechooserwidget.c:4973
#: gtk/gtkfiledialog.c:843 gtk/gtkmessagedialog.c:170 gtk/gtkmessagedialog.c:179
#: gtk/gtkmountoperation.c:608 gtk/print/gtkpagesetupunixdialog.c:282
#: gtk/print/gtkprintbackend.c:638 gtk/print/gtkprintunixdialog.c:682
#: gtk/print/gtkprintunixdialog.c:839 gtk/gtkwindow.c:6256
#: gtk/ui/gtkappchooserdialog.ui:48 gtk/ui/gtkassistant.ui:52
#: gtk/ui/gtkcolorchooserdialog.ui:36 gtk/ui/gtkfontchooserdialog.ui:27
#: gtk/gtkfiledialog.c:840 gtk/gtkmessagedialog.c:170
#: gtk/gtkmessagedialog.c:179 gtk/gtkmountoperation.c:608
#: gtk/print/gtkpagesetupunixdialog.c:282 gtk/print/gtkprintbackend.c:638
#: gtk/print/gtkprintunixdialog.c:682 gtk/print/gtkprintunixdialog.c:839
#: gtk/gtkwindow.c:6257 gtk/ui/gtkappchooserdialog.ui:48
#: gtk/ui/gtkassistant.ui:52 gtk/ui/gtkcolorchooserdialog.ui:36
#: gtk/ui/gtkfontchooserdialog.ui:27
msgid "_Cancel"
msgstr "_ביטול"
#: gtk/gtkfilechoosernative.c:521 gtk/gtkfilechoosernative.c:594
#: gtk/gtkfiledialog.c:815 gtk/gtkplacessidebar.c:3149
#: gtk/gtkfiledialog.c:812 gtk/gtkplacessidebar.c:3149
#: gtk/gtkplacessidebar.c:3234 gtk/gtkplacesview.c:1645
msgid "_Open"
msgstr "_פתיחה"
#: gtk/gtkfilechoosernative.c:594 gtk/gtkfiledialog.c:820
#: gtk/gtkfilechoosernative.c:594 gtk/gtkfiledialog.c:817
msgid "_Save"
msgstr "_שמירה"
@@ -2383,7 +2392,7 @@ msgid "If you delete an item, it will be permanently lost."
msgstr "אם פריט ימחק, הוא יאבד לצמיתות."
#: gtk/gtkfilechooserwidget.c:1188 gtk/gtkfilechooserwidget.c:1786
#: gtk/gtklabel.c:5712 gtk/gtktext.c:6194 gtk/gtktextview.c:9099
#: gtk/gtklabel.c:5745 gtk/gtktext.c:6196 gtk/gtktextview.c:9099
msgid "_Delete"
msgstr "מ_חיקה"
@@ -2600,7 +2609,7 @@ msgid "Name"
msgstr "שם"
#: gtk/gtkfilechooserwidget.c:7392 gtk/inspector/resource-list.ui:82
#: gtk/ui/gtkfontchooserwidget.ui:217 gtk/ui/gtkfontchooserwidget.ui:386
#: gtk/ui/gtkfontchooserwidget.ui:218 gtk/ui/gtkfontchooserwidget.ui:387
msgid "Size"
msgstr "גודל"
@@ -2611,28 +2620,28 @@ msgstr "סוג"
# hebrew note: "תיקייה" is "folder", but there is no better word for
# "directory"
#: gtk/gtkfiledialog.c:816
#: gtk/gtkfiledialog.c:813
msgid "Pick Files"
msgstr "בחירת קבצים"
#: gtk/gtkfiledialog.c:816
#: gtk/gtkfiledialog.c:813
msgid "Pick a File"
msgstr "בחירת קובץ"
#: gtk/gtkfiledialog.c:821
#: gtk/gtkfiledialog.c:818
msgid "Save a File"
msgstr "שמירץ קובץ"
#: gtk/gtkfiledialog.c:825 gtk/ui/gtkappchooserdialog.ui:53
#: gtk/gtkfiledialog.c:822 gtk/ui/gtkappchooserdialog.ui:53
#: gtk/ui/gtkcolorchooserdialog.ui:41 gtk/ui/gtkfontchooserdialog.ui:32
msgid "_Select"
msgstr "ב_חירה"
#: gtk/gtkfiledialog.c:826
#: gtk/gtkfiledialog.c:823
msgid "Select Folders"
msgstr "בחירת תיקיות"
#: gtk/gtkfiledialog.c:826
#: gtk/gtkfiledialog.c:823
msgid "Select a Folder"
msgstr "בחירת תיקייה"
@@ -2644,75 +2653,75 @@ msgstr "לא צוין"
msgid "Change Font Features"
msgstr "שינוי מאפייני גופן"
#: gtk/gtkfontchooserwidget.c:1547
#: gtk/gtkfontchooserwidget.c:1491
msgctxt "Font variation axis"
msgid "Width"
msgstr "רוחב"
#: gtk/gtkfontchooserwidget.c:1548
#: gtk/gtkfontchooserwidget.c:1492
msgctxt "Font variation axis"
msgid "Weight"
msgstr "משקל"
#: gtk/gtkfontchooserwidget.c:1549
#: gtk/gtkfontchooserwidget.c:1493
msgctxt "Font variation axis"
msgid "Italic"
msgstr "נטוי"
#: gtk/gtkfontchooserwidget.c:1550
#: gtk/gtkfontchooserwidget.c:1494
msgctxt "Font variation axis"
msgid "Slant"
msgstr "משופע"
#: gtk/gtkfontchooserwidget.c:1551
#: gtk/gtkfontchooserwidget.c:1495
msgctxt "Font variation axis"
msgid "Optical Size"
msgstr "גודל אופטי"
#: gtk/gtkfontchooserwidget.c:2109
#: gtk/gtkfontchooserwidget.c:2053
msgctxt "Font feature value"
msgid "Default"
msgstr "ברירת מחדל"
#: gtk/gtkfontchooserwidget.c:2126
#: gtk/gtkfontchooserwidget.c:2070
msgctxt "Font feature value"
msgid "Enable"
msgstr "לאפשר"
#: gtk/gtkfontchooserwidget.c:2459
#: gtk/gtkfontchooserwidget.c:2403
msgid "Default"
msgstr "ברירת מחדל"
#: gtk/gtkfontchooserwidget.c:2521
#: gtk/gtkfontchooserwidget.c:2465
msgid "Ligatures"
msgstr "צרוף אותיות"
#: gtk/gtkfontchooserwidget.c:2522
#: gtk/gtkfontchooserwidget.c:2466
msgid "Letter Case"
msgstr "אותיות רישיות"
#: gtk/gtkfontchooserwidget.c:2523
#: gtk/gtkfontchooserwidget.c:2467
msgid "Number Case"
msgstr "מספר מונה"
#: gtk/gtkfontchooserwidget.c:2524
#: gtk/gtkfontchooserwidget.c:2468
msgid "Number Spacing"
msgstr "מספר רווח"
# msgctxt "OpenType layout"
#: gtk/gtkfontchooserwidget.c:2525
#: gtk/gtkfontchooserwidget.c:2469
msgid "Fractions"
msgstr "שברים"
#: gtk/gtkfontchooserwidget.c:2526
#: gtk/gtkfontchooserwidget.c:2470
msgid "Style Variations"
msgstr "מאפייני סגנון"
#: gtk/gtkfontchooserwidget.c:2528
#: gtk/gtkfontchooserwidget.c:2472
msgid "Character Variations"
msgstr "הגווני תו"
#: gtk/gtkglarea.c:309
#: gtk/gtkglarea.c:316
msgid "OpenGL context creation failed"
msgstr "יצירת הקשר OpenGL נכשלה"
@@ -2725,32 +2734,32 @@ msgstr "סגירה"
msgid "Close the infobar"
msgstr "סגירת פס המידע"
#: gtk/gtklabel.c:5709 gtk/gtktext.c:6182 gtk/gtktextview.c:9087
#: gtk/gtklabel.c:5742 gtk/gtktext.c:6184 gtk/gtktextview.c:9087
msgid "Cu_t"
msgstr "_גזירה"
#: gtk/gtklabel.c:5710 gtk/gtktext.c:6186 gtk/gtktextview.c:9091
#: gtk/gtklabel.c:5743 gtk/gtktext.c:6188 gtk/gtktextview.c:9091
msgid "_Copy"
msgstr "ה_עתקה"
#: gtk/gtklabel.c:5711 gtk/gtktext.c:6190 gtk/gtktextview.c:9095
#: gtk/gtklabel.c:5744 gtk/gtktext.c:6192 gtk/gtktextview.c:9095
msgid "_Paste"
msgstr "ה_דבקה"
#: gtk/gtklabel.c:5717 gtk/gtktext.c:6203 gtk/gtktextview.c:9120
#: gtk/gtklabel.c:5750 gtk/gtktext.c:6205 gtk/gtktextview.c:9120
msgid "Select _All"
msgstr "בחירה בה_כול"
#: gtk/gtklabel.c:5722
#: gtk/gtklabel.c:5755
msgid "_Open Link"
msgstr "_פתיחת קישור"
#: gtk/gtklabel.c:5726
#: gtk/gtklabel.c:5759
msgid "Copy _Link Address"
msgstr "העתקת כתובת ה_קישור"
# msgctxt "OpenType layout"
#: gtk/gtklabel.c:5770 gtk/gtktext.c:2723 gtk/gtktextview.c:9169
#: gtk/gtklabel.c:5803 gtk/gtktext.c:2723 gtk/gtktextview.c:9169
msgid "Context menu"
msgstr "תפריט הקשר"
@@ -2758,7 +2767,7 @@ msgstr "תפריט הקשר"
msgid "_Copy URL"
msgstr "ה_עתקת כתובת"
#: gtk/gtklinkbutton.c:567
#: gtk/gtklinkbutton.c:589
msgid "Invalid URI"
msgstr "כתובת לא תקנית"
@@ -2822,7 +2831,7 @@ msgid "Play"
msgstr "ניגון"
#: gtk/gtkmessagedialog.c:162 gtk/gtkmessagedialog.c:180
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6257
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6258
msgid "_OK"
msgstr "_אישור"
@@ -2970,7 +2979,8 @@ msgstr "ניהול גדלים מותאמים…"
msgid "_Apply"
msgstr "ה_חלה"
#: gtk/print/gtkpagesetupunixdialog.c:318 gtk/print/gtkpagesetupunixdialog.c:570
#: gtk/print/gtkpagesetupunixdialog.c:318
#: gtk/print/gtkpagesetupunixdialog.c:570
msgid "Any Printer"
msgstr "מדפסת כלשהי"
@@ -3688,7 +3698,7 @@ msgctxt "accessibility"
msgid "Sidebar"
msgstr "סרגל צד"
#: gtk/gtktext.c:6208 gtk/gtktextview.c:9125
#: gtk/gtktext.c:6210 gtk/gtktextview.c:9125
msgid "Insert _Emoji"
msgstr "הוספת _רגשון"
@@ -3700,22 +3710,22 @@ msgstr "_ביטול"
msgid "_Redo"
msgstr "ביצוע _שוב"
#: gtk/gtkwindow.c:6245
#: gtk/gtkwindow.c:6246
#, c-format
msgid "Do you want to use GTK Inspector?"
msgstr "להשתמש במפקח GTK?"
#: gtk/gtkwindow.c:6247
#: gtk/gtkwindow.c:6248
#, c-format
msgid ""
"GTK Inspector is an interactive debugger that lets you explore and modify the "
"internals of any GTK application. Using it may cause the application to break "
"or crash."
"GTK Inspector is an interactive debugger that lets you explore and modify "
"the internals of any GTK application. Using it may cause the application to "
"break or crash."
msgstr ""
"מפקח GTK‎ הוא מנפה שגיאות הידודי המאפשר לך לחקור ולשנות את הפנים של כל יישום "
"GTK+‎. שימוש בו יכול לגרום ליישום להישבר או לקרוס."
#: gtk/gtkwindow.c:6252
#: gtk/gtkwindow.c:6253
msgid "Dont show this message again"
msgstr "לא להציג הודעה זו שוב"
@@ -3858,8 +3868,8 @@ msgstr "ניתן להקליד כאן כל הוראת CSS המוכרת על יד
#: gtk/inspector/css-editor.c:129
msgid ""
"You can temporarily disable this custom CSS by clicking on the “Pause” button "
"above."
"You can temporarily disable this custom CSS by clicking on the “Pause” "
"button above."
msgstr "ניתן להשבית באופן זמני CSS מותאם על ידי לחיצה על הכפתור „השהיה” מעל."
#: gtk/inspector/css-editor.c:130
@@ -3892,37 +3902,37 @@ msgstr "מחלקות סגנון"
msgid "CSS Property"
msgstr "מאפיין CSS"
#: gtk/inspector/general.c:370
#: gtk/inspector/general.c:371
msgctxt "GL version"
msgid "None"
msgstr "ללא"
#: gtk/inspector/general.c:461
#: gtk/inspector/general.c:462
msgctxt "GL version"
msgid "Unknown"
msgstr "לא ידוע"
#: gtk/inspector/general.c:523
#: gtk/inspector/general.c:524
msgctxt "Vulkan device"
msgid "Disabled"
msgstr "מושבת"
#: gtk/inspector/general.c:524 gtk/inspector/general.c:525
#: gtk/inspector/general.c:525 gtk/inspector/general.c:526
msgctxt "Vulkan version"
msgid "Disabled"
msgstr "מושבת"
#: gtk/inspector/general.c:576
#: gtk/inspector/general.c:577
msgctxt "Vulkan device"
msgid "None"
msgstr "ללא"
#: gtk/inspector/general.c:577 gtk/inspector/general.c:578
#: gtk/inspector/general.c:578 gtk/inspector/general.c:579
msgctxt "Vulkan version"
msgid "None"
msgstr "ללא"
#: gtk/inspector/general.c:924
#: gtk/inspector/general.c:930
msgid "IM Context is hardcoded by GTK_IM_MODULE"
msgstr "IM Context קשיחה בקוד על ידי GTK_IM_MODULE"
@@ -4232,7 +4242,7 @@ msgstr "מקור:"
msgid "Defined At"
msgstr "הגדרה"
#: gtk/inspector/recorder.c:1941
#: gtk/inspector/recorder.c:1950
#, c-format
msgid "Saving RenderNode failed"
msgstr "שמירת RenderNode נכשלה"
@@ -4370,7 +4380,7 @@ msgstr "היררכייה"
msgid "Implements"
msgstr "מיישם"
#: gtk/inspector/visual.c:765 gtk/inspector/visual.c:784
#: gtk/inspector/visual.c:690 gtk/inspector/visual.c:708
msgid "Theme is hardcoded by GTK_THEME"
msgstr "ערכת נושא קשיחה בקוד על ידי GTK_THEME"
@@ -4415,92 +4425,75 @@ msgid "Slowdown"
msgstr "האטה"
#: gtk/inspector/visual.ui:362
msgid "Antialiasing"
msgstr "החלקת קצוות"
msgid "Rendering"
msgstr "עיבוד"
#: gtk/inspector/visual.ui:387
msgid "Hinting"
msgstr "רימוז"
#: gtk/inspector/visual.ui:377
msgctxt "Font rendering"
msgid "Automatic"
msgstr "אוטומטי"
#: gtk/inspector/visual.ui:402
msgctxt "Font hinting style"
msgid "None"
msgstr "ללא"
#: gtk/inspector/visual.ui:403
msgctxt "Font hinting style"
msgid "Slight"
msgstr "קל"
#: gtk/inspector/visual.ui:404
msgctxt "Font hinting style"
msgid "Medium"
msgstr "בינוני"
#: gtk/inspector/visual.ui:378
msgctxt "Font rendering"
msgid "Manual"
msgstr "ידני"
#: gtk/inspector/visual.ui:405
msgctxt "Font hinting style"
msgid "Full"
msgstr "מלא"
#: gtk/inspector/visual.ui:422
msgid "Metrics Hinting"
msgstr "רימוז מדדים"
#: gtk/inspector/visual.ui:457
msgid "Show Framerate"
msgstr "הצגת קצב תמוניות"
#: gtk/inspector/visual.ui:482
#: gtk/inspector/visual.ui:430
msgid "Show Graphic Updates"
msgstr "הצגת עדכונים גרפיים"
#: gtk/inspector/visual.ui:502
#: gtk/inspector/visual.ui:450
msgid ""
"Tints all the places where the current renderer uses Cairo instead of the GPU."
"Tints all the places where the current renderer uses Cairo instead of the "
"GPU."
msgstr ""
"מכהה את כל המקומות שמעבד התצוגה הנוכחית משתמש ב־Cairo במקום במעבד הגרפי."
#: gtk/inspector/visual.ui:508
#: gtk/inspector/visual.ui:456
msgid "Show Cairo Rendering"
msgstr "הצגת עיבוד Cairo"
#: gtk/inspector/visual.ui:533
#: gtk/inspector/visual.ui:481
msgid "Show Baselines"
msgstr "הצגת קווי בסיס (Baselines)"
#: gtk/inspector/visual.ui:561
#: gtk/inspector/visual.ui:509
msgid "Show Layout Borders"
msgstr "הצגת גבולות פריסה"
#: gtk/inspector/visual.ui:618
#: gtk/inspector/visual.ui:566
msgid "CSS Padding"
msgstr "מרווח ב־CSS"
#: gtk/inspector/visual.ui:628
#: gtk/inspector/visual.ui:576
msgid "CSS Border"
msgstr "מסגרת CSS"
#: gtk/inspector/visual.ui:638
#: gtk/inspector/visual.ui:586
msgid "CSS Margin"
msgstr "שול CSS"
#: gtk/inspector/visual.ui:648
#: gtk/inspector/visual.ui:596
msgid "Widget Margin"
msgstr "שול הווידג׳ט"
#: gtk/inspector/visual.ui:683
#: gtk/inspector/visual.ui:631
msgid "Show Focus"
msgstr "הצגת מיקוד"
#: gtk/inspector/visual.ui:708
#: gtk/inspector/visual.ui:656
msgid "Show Accessibility warnings"
msgstr "הצגת אזהרות נגישות"
#: gtk/inspector/visual.ui:733
#: gtk/inspector/visual.ui:681
msgid "Show Graphics Offload"
msgstr "הצגת פריקת גרפיקה"
#: gtk/inspector/visual.ui:765
#: gtk/inspector/visual.ui:713
msgid "Inspect Inspector"
msgstr "חקירת חוקר"
@@ -6327,32 +6320,32 @@ msgstr "_יצירה"
msgid "Select Font"
msgstr "בחירת גופן"
#: gtk/ui/gtkfontchooserwidget.ui:64
#: gtk/ui/gtkfontchooserwidget.ui:66
msgid "Search font name"
msgstr "חיפוש שם הגופן"
#: gtk/ui/gtkfontchooserwidget.ui:77
#: gtk/ui/gtkfontchooserwidget.ui:79
msgid "Filters"
msgstr "מסננים"
#: gtk/ui/gtkfontchooserwidget.ui:89
#: gtk/ui/gtkfontchooserwidget.ui:91
msgid "Filter by"
msgstr "סינון לפי"
#: gtk/ui/gtkfontchooserwidget.ui:99
#: gtk/ui/gtkfontchooserwidget.ui:101
msgid "Monospace"
msgstr "רוחב אחיד"
#: gtk/ui/gtkfontchooserwidget.ui:105
#: gtk/ui/gtkfontchooserwidget.ui:106
msgid "Language"
msgstr "שפה"
#: gtk/ui/gtkfontchooserwidget.ui:198 gtk/ui/gtkfontchooserwidget.ui:200
#: gtk/ui/gtkfontchooserwidget.ui:353 gtk/ui/gtkfontchooserwidget.ui:357
#: gtk/ui/gtkfontchooserwidget.ui:199 gtk/ui/gtkfontchooserwidget.ui:201
#: gtk/ui/gtkfontchooserwidget.ui:354 gtk/ui/gtkfontchooserwidget.ui:358
msgid "Preview Font"
msgstr "תצוגה מקדימה לגופן"
#: gtk/ui/gtkfontchooserwidget.ui:296
#: gtk/ui/gtkfontchooserwidget.ui:297
msgid "No Fonts Found"
msgstr "לא נמצאו גופנים"
@@ -6458,7 +6451,8 @@ msgstr "_בחירה"
msgid "Pag_es:"
msgstr "_דפים:"
#: gtk/print/ui/gtkprintunixdialog.ui:260 gtk/print/ui/gtkprintunixdialog.ui:273
#: gtk/print/ui/gtkprintunixdialog.ui:260
#: gtk/print/ui/gtkprintunixdialog.ui:273
msgid ""
"Specify one or more page ranges,\n"
" e.g. 13, 7, 11"
@@ -6565,8 +6559,10 @@ msgid "A_t:"
msgstr "_ב:"
#. Ability to parse the am/pm format depends on actual locale. You can remove the am/pm values below for your locale if they are not supported.
#: gtk/print/ui/gtkprintunixdialog.ui:903 gtk/print/ui/gtkprintunixdialog.ui:905
#: gtk/print/ui/gtkprintunixdialog.ui:921 gtk/print/ui/gtkprintunixdialog.ui:923
#: gtk/print/ui/gtkprintunixdialog.ui:903
#: gtk/print/ui/gtkprintunixdialog.ui:905
#: gtk/print/ui/gtkprintunixdialog.ui:921
#: gtk/print/ui/gtkprintunixdialog.ui:923
msgid ""
"Specify the time of print,\n"
" e.g. 1530, 235 pm, 141520, 114630 am, 4 pm"
@@ -6579,7 +6575,8 @@ msgstr ""
msgid "On _hold"
msgstr "בהמ_תנה"
#: gtk/print/ui/gtkprintunixdialog.ui:937 gtk/print/ui/gtkprintunixdialog.ui:938
#: gtk/print/ui/gtkprintunixdialog.ui:937
#: gtk/print/ui/gtkprintunixdialog.ui:938
msgid "Hold the job until it is explicitly released"
msgstr "החזקת המשימה עד שתשוחרר מפורשות"
@@ -7216,22 +7213,22 @@ msgstr "לשלוח פלט לתיקייה הזאת במקום אל cwd"
msgid "Generate debug output"
msgstr "יצירת פלט ניפוי שגיאות"
#: tools/encodesymbolic.c:92
#: tools/encodesymbolic.c:95
#, c-format
msgid "Invalid size %s\n"
msgstr "גודל %s שגוי\n"
#: tools/encodesymbolic.c:104 tools/encodesymbolic.c:113
#: tools/encodesymbolic.c:107 tools/encodesymbolic.c:116
#, c-format
msgid "Cant load file: %s\n"
msgstr "לא ניתן לטעון קובץ: %s\n"
#: tools/encodesymbolic.c:141 tools/encodesymbolic.c:147
#: tools/encodesymbolic.c:144 tools/encodesymbolic.c:162
#, c-format
msgid "Cant save file %s: %s\n"
msgstr "אי אפשר לשמור קובץ %s‏: %s\n"
#: tools/encodesymbolic.c:153
#: tools/encodesymbolic.c:168
#, c-format
msgid "Cant close stream"
msgstr "אי אפשר לסגור תזרים"
@@ -7305,7 +7302,7 @@ msgstr "להשתמש בסגנון מקובץ CSS"
#: tools/gtk-builder-tool-preview.c:187 tools/gtk-builder-tool-screenshot.c:370
#: tools/gtk-builder-tool-validate.c:268
#: tools/gtk-rendernode-tool-benchmark.c:106
#: tools/gtk-rendernode-tool-render.c:203 tools/gtk-rendernode-tool-show.c:113
#: tools/gtk-rendernode-tool-render.c:262 tools/gtk-rendernode-tool-show.c:113
#, c-format
msgid "Could not initialize windowing system\n"
msgstr "לא ניתן להפעיל את מערכת החלונות\n"
@@ -7350,13 +7347,13 @@ msgstr ""
"Use --force to overwrite.\n"
#: tools/gtk-builder-tool-screenshot.c:332
#: tools/gtk-rendernode-tool-render.c:171
#: tools/gtk-rendernode-tool-render.c:230
#, c-format
msgid "Output written to %s.\n"
msgstr "Output written to %s.\n"
#: tools/gtk-builder-tool-screenshot.c:336
#: tools/gtk-rendernode-tool-render.c:175
#: tools/gtk-rendernode-tool-render.c:234
#, c-format
msgid "Failed to save %s: %s\n"
msgstr "Failed to save %s: %s\n"
@@ -7375,7 +7372,7 @@ msgstr "שכתוב קובץ קיים"
#: tools/gtk-builder-tool-screenshot.c:363
#: tools/gtk-rendernode-tool-benchmark.c:97
#: tools/gtk-rendernode-tool-render.c:196
#: tools/gtk-rendernode-tool-render.c:255
msgid "FILE…"
msgstr "FILE…"
@@ -7425,7 +7422,8 @@ msgstr ""
"לא ניתן לטעון את „%s”: %s\n"
"\n"
#: tools/gtk-builder-tool-simplify.c:2466 tools/gtk-builder-tool-simplify.c:2472
#: tools/gtk-builder-tool-simplify.c:2466
#: tools/gtk-builder-tool-simplify.c:2472
#: tools/gtk-builder-tool-simplify.c:2478
#, c-format
msgid "Cant parse “%s”: %s\n"
@@ -7876,7 +7874,8 @@ msgid "Add renderer to benchmark"
msgstr "הוספת מנגנון עיבוד למדידת ביצועים"
#: tools/gtk-rendernode-tool-benchmark.c:94
#: tools/gtk-rendernode-tool-compare.c:65 tools/gtk-rendernode-tool-render.c:195
#: tools/gtk-rendernode-tool-compare.c:65
#: tools/gtk-rendernode-tool-render.c:254
msgid "RENDERER"
msgstr "מעבד תצוגה"
@@ -7897,7 +7896,7 @@ msgid "Benchmark rendering of a .node file."
msgstr "מדידת ביצועים על עיבוד קובץ ‎.node."
#: tools/gtk-rendernode-tool-benchmark.c:127
#: tools/gtk-rendernode-tool-info.c:236 tools/gtk-rendernode-tool-render.c:224
#: tools/gtk-rendernode-tool-info.c:236 tools/gtk-rendernode-tool-render.c:283
#: tools/gtk-rendernode-tool-show.c:134
#, c-format
msgid "No .node file specified\n"
@@ -7908,7 +7907,8 @@ msgstr "לא צוין קובץ .node\n"
msgid "Can only benchmark a single .node file\n"
msgstr "יכול למדוד ביצועים רק לקובץ ‎.node בודד\n"
#: tools/gtk-rendernode-tool-compare.c:65 tools/gtk-rendernode-tool-render.c:195
#: tools/gtk-rendernode-tool-compare.c:65
#: tools/gtk-rendernode-tool-render.c:254
msgid "Renderer to use"
msgstr "עיבוד לשימוש"
@@ -7930,7 +7930,7 @@ msgid "Must specify two files\n"
msgstr "חובה לציין שני קבצים.\n"
#: tools/gtk-rendernode-tool-compare.c:102
#: tools/gtk-rendernode-tool-render.c:150
#: tools/gtk-rendernode-tool-render.c:209
#, c-format
msgid "Failed to create renderer: %s\n"
msgstr "יצירת מנגנון עיבוד נכשלה: %s\n"
@@ -7989,7 +7989,7 @@ msgstr "אספקת מידע על נקודת העיבוד החזותי."
msgid "Can only accept a single .node file\n"
msgstr "יכול לקבל רק קובץ ‎.node בודד\n"
#: tools/gtk-rendernode-tool-render.c:123
#: tools/gtk-rendernode-tool-render.c:170
#, c-format
msgid ""
"File %s exists.\n"
@@ -7998,16 +7998,17 @@ msgstr ""
"הקובץ %s קיים.\n"
"כדי לשכתב יש לציין את שם הקובץ.\n"
#: tools/gtk-rendernode-tool-render.c:137
#: tools/gtk-rendernode-tool-render.c:184
#: tools/gtk-rendernode-tool-render.c:196
#, c-format
msgid "Failed to generate SVG: %s\n"
msgstr "יצירת SVG נכשלה: %s\n"
#: tools/gtk-rendernode-tool-render.c:211
#: tools/gtk-rendernode-tool-render.c:270
msgid "Render a .node file to an image."
msgstr "עיבוד קובץ .node לתמונה."
#: tools/gtk-rendernode-tool-render.c:230
#: tools/gtk-rendernode-tool-render.c:289
#, c-format
msgid "Can only render a single .node file to a single output file\n"
msgstr "יכול לעבד קובץ ,node יחיד בלבד לקובץ פלט יחיד\n"
@@ -8142,6 +8143,31 @@ msgstr ""
"No theme index file in “%s”.\n"
"If you really want to create an icon cache here, use --ignore-theme-index.\n"
#~ msgid "Antialiasing"
#~ msgstr "החלקת קצוות"
#~ msgid "Hinting"
#~ msgstr "רימוז"
#~ msgctxt "Font hinting style"
#~ msgid "None"
#~ msgstr "ללא"
#~ msgctxt "Font hinting style"
#~ msgid "Slight"
#~ msgstr "קל"
#~ msgctxt "Font hinting style"
#~ msgid "Medium"
#~ msgstr "בינוני"
#~ msgctxt "Font hinting style"
#~ msgid "Full"
#~ msgstr "מלא"
#~ msgid "Metrics Hinting"
#~ msgstr "רימוז מדדים"
#~ msgid "Backend does not support window scaling"
#~ msgstr "הממשק אינו תומך בקנה מידה לחלון"
@@ -9156,8 +9182,8 @@ msgstr ""
#~ "צבע זה בעזרת המשולש הפנימי."
#~ msgid ""
#~ "Click the eyedropper, then click a color anywhere on your screen to select "
#~ "that color."
#~ "Click the eyedropper, then click a color anywhere on your screen to "
#~ "select that color."
#~ msgstr "יש ללחוץ על הטפטפת ואז ללחוץ על צבע כלשהו במסך לבחירת אותו הצבע."
#~ msgid "_Hue:"
@@ -9209,8 +9235,8 @@ msgstr ""
#~ "You can enter an HTML-style hexadecimal color value, or simply a color "
#~ "name such as “orange” in this entry."
#~ msgstr ""
#~ "ניתן להזין ערך צבע הקסדצימלי בסגנון HTML, או פשוט לכתוב שם צבע באנגלית כמו "
#~ "„orange” ברשומה זו."
#~ "ניתן להזין ערך צבע הקסדצימלי בסגנון HTML, או פשוט לכתוב שם צבע באנגלית "
#~ "כמו „orange” ברשומה זו."
#~ msgid "_Palette:"
#~ msgstr "_פלטה:"
@@ -10017,11 +10043,11 @@ msgstr ""
#~ msgstr "smb://foo.example.com, ssh://192.168.0.1"
#~ msgid ""
#~ "The WGL_ARB_create_context extension needed to create core profiles is not "
#~ "available"
#~ "The WGL_ARB_create_context extension needed to create core profiles is "
#~ "not available"
#~ msgstr ""
#~ "The WGL_ARB_create_context extension needed to create core profiles is not "
#~ "available"
#~ "The WGL_ARB_create_context extension needed to create core profiles is "
#~ "not available"
#~ msgid "Changes are applied instantly, only for this selected widget."
#~ msgstr "שינויים מוחלקים מיידית, רק ליישומון נבחר זה."
@@ -10535,11 +10561,11 @@ msgstr ""
#~ msgstr "Unable to load image-loading module: %s: %s"
#~ msgid ""
#~ "Image-loading module %s does not export the proper interface; perhaps it's "
#~ "from a different GTK version?"
#~ "Image-loading module %s does not export the proper interface; perhaps "
#~ "it's from a different GTK version?"
#~ msgstr ""
#~ "Image-loading module %s does not export the proper interface; perhaps it's "
#~ "from a different GTK version?"
#~ "Image-loading module %s does not export the proper interface; perhaps "
#~ "it's from a different GTK version?"
#~ msgid "Couldn't recognize the image file format for file '%s'"
#~ msgstr "לא ניתן לזהות את פורמט התמונה בקובץ '%s'"
@@ -10550,7 +10576,8 @@ msgstr ""
#~ msgid "Error writing to image file: %s"
#~ msgstr "שגיאה בכתיבה לקובץ תמונה: %s"
#~ msgid "This build of gdk-pixbuf does not support saving the image format: %s"
#~ msgid ""
#~ "This build of gdk-pixbuf does not support saving the image format: %s"
#~ msgstr "בניה זו של gdk-pixbuf לא תומכת בשמירת התמונה בפורמט: %s"
#~ msgid "Insufficient memory to save image to callback"
@@ -11128,8 +11155,8 @@ msgstr ""
#~ "available to this program.\n"
#~ "Are you sure that you want to select it?"
#~ msgstr ""
#~ "הקובץ \"%s\" תלוי במכונה אחרת (הנקראת %s) וייתכן כי לא תיהיה זמינה לתוכנית "
#~ "זו. האם אתה בטוח שברצונך לבחור אותו?"
#~ "הקובץ \"%s\" תלוי במכונה אחרת (הנקראת %s) וייתכן כי לא תיהיה זמינה "
#~ "לתוכנית זו. האם אתה בטוח שברצונך לבחור אותו?"
#~ msgid "_New Folder"
#~ msgstr "תיקייה _חדשה"
+1 -1
View File
@@ -1319,7 +1319,7 @@ test_download_random (gconstpointer data)
width = g_test_rand_int_range (1, 40) * g_test_rand_int_range (1, 40);
height = g_test_rand_int_range (1, 40) * g_test_rand_int_range (1, 40);
}
while (width * height >= 1024 * 1024);
while (width * height >= 32 * 1024);
test_download (data, width, height, 1);
}
+93 -22
View File
@@ -14,39 +14,36 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gtk/gtk.h>
#include <gtk/gtkcolorutils.h>
struct {
float r, g, b;
float h, s, v;
} tests[] = {
{ 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 0, 0, 1 },
{ 1, 0, 0, 0, 1, 1 },
{ 1, 1, 0, 1.0 / 6.0, 1, 1 },
{ 0, 1, 0, 2.0 / 6.0, 1, 1 },
{ 0, 1, 1, 3.0 / 6.0, 1, 1 },
{ 0, 0, 1, 4.0 / 6.0, 1, 1 },
{ 1, 0, 1, 5.0 / 6.0, 1, 1 },
};
/* Close enough for float precision to match, even with some
* rounding errors */
#define EPSILON 1e-6
#include <gtk/gtkcolorutilsprivate.h>
static void
test_roundtrips (void)
test_roundtrips_rgb_hsv (void)
{
struct {
float r, g, b;
float h, s, v;
} tests[] = {
{ 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 0, 0, 1 },
{ 1, 0, 0, 0, 1, 1 },
{ 1, 1, 0, 1.0 / 6.0, 1, 1 },
{ 0, 1, 0, 2.0 / 6.0, 1, 1 },
{ 0, 1, 1, 3.0 / 6.0, 1, 1 },
{ 0, 0, 1, 4.0 / 6.0, 1, 1 },
{ 1, 0, 1, 5.0 / 6.0, 1, 1 },
};
const float EPSILON = 1e-6;
for (unsigned int i = 0; i < G_N_ELEMENTS (tests); i++)
{
float r, g, b;
float h, s, v;
g_print ("color %u\n", i);
gtk_hsv_to_rgb (tests[i].h, tests[i].s, tests[i].v, &r, &g, &b);
g_assert_cmpfloat_with_epsilon (r, tests[i].r, EPSILON);
g_assert_cmpfloat_with_epsilon (g, tests[i].g, EPSILON);
g_assert_cmpfloat_with_epsilon (b, tests[i].b, EPSILON);
gtk_rgb_to_hsv (tests[i].r, tests[i].g, tests[i].b, &h, &s, &v);
g_assert_cmpfloat_with_epsilon (h, tests[i].h, EPSILON);
g_assert_cmpfloat_with_epsilon (s, tests[i].s, EPSILON);
@@ -54,13 +51,87 @@ test_roundtrips (void)
}
}
static void
test_roundtrips_rgb_hwb (void)
{
struct {
float r, g, b;
float hue, white, black;
} tests[] = {
{ 0, 0, 0, 0, 0, 1 },
{ 1, 1, 1, 0, 1, 0 },
{ 1, 0, 0, 0, 0, 0 },
{ 1, 1, 0, 60, 0, 0 },
{ 0, 1, 0, 120, 0, 0 },
{ 0, 1, 1, 180, 0, 0 },
{ 0, 0, 1, 240, 0, 0 },
{ 1, 0, 1, 300, 0, 0 },
{ 0.5, 0.5, 0.5, 0, 0.5, 0.5 },
};
const float EPSILON = 1e-6;
for (unsigned int i = 0; i < G_N_ELEMENTS (tests); i++)
{
float r, g, b;
float hue, white, black;
gtk_hwb_to_rgb (tests[i].hue, tests[i].white, tests[i].black, &r, &g, &b);
g_assert_cmpfloat_with_epsilon (r, tests[i].r, EPSILON);
g_assert_cmpfloat_with_epsilon (g, tests[i].g, EPSILON);
g_assert_cmpfloat_with_epsilon (b, tests[i].b, EPSILON);
gtk_rgb_to_hwb (tests[i].r, tests[i].g, tests[i].b, &hue, &white, &black);
g_assert_cmpfloat_with_epsilon (hue, tests[i].hue, EPSILON);
g_assert_cmpfloat_with_epsilon (white, tests[i].white, EPSILON);
g_assert_cmpfloat_with_epsilon (black, tests[i].black, EPSILON);
}
}
static void
test_roundtrips_rgb_oklab (void)
{
struct {
float red, green, blue;
float L, a, b;
} tests[] = {
{ 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 0, 0 },
{ 1, 0, 0, 0.62796, 0.22486, 0.12585 },
{ 1, 1, 0, 0.96798, -0.07137, 0.19857 },
{ 0, 1, 0, 0.86644, -0.23389, 0.17950 },
{ 0, 1, 1, 0.90540, -0.14944, -0.03940 },
{ 0, 0, 1, 0.45201, -0.03246, -0.31153 },
{ 1, 0, 1, 0.70167, 0.27457, -0.16916 },
{ 0.5, 0.5, 0.5, 0.598181, 0.00000, 0.00000 },
};
const float EPSILON = 1e-3;
for (unsigned int i = 0; i < G_N_ELEMENTS (tests); i++)
{
float red, green, blue;
float L, a, b;
gtk_oklab_to_rgb (tests[i].L, tests[i].a, tests[i].b, &red, &green, &blue);
g_assert_cmpfloat_with_epsilon (red, tests[i].red, EPSILON);
g_assert_cmpfloat_with_epsilon (green, tests[i].green, EPSILON);
g_assert_cmpfloat_with_epsilon (blue, tests[i].blue, EPSILON);
gtk_rgb_to_oklab (tests[i].red, tests[i].green, tests[i].blue, &L, &a, &b);
g_assert_cmpfloat_with_epsilon (L, tests[i].L, EPSILON);
g_assert_cmpfloat_with_epsilon (a, tests[i].a, EPSILON);
g_assert_cmpfloat_with_epsilon (b, tests[i].b, EPSILON);
}
}
int
main (int argc,
char *argv[])
{
gtk_test_init (&argc, &argv);
g_test_add_func ("/color/roundtrips", test_roundtrips);
g_test_add_func ("/color/roundtrips/rgb-hsv", test_roundtrips_rgb_hsv);
g_test_add_func ("/color/roundtrips/rgb-hwb", test_roundtrips_rgb_hwb);
g_test_add_func ("/color/roundtrips/rgb-oklab", test_roundtrips_rgb_oklab);
return g_test_run();
}