Commit Graph

81443 Commits

Author SHA1 Message Date
Christian Hergert
dd3447a41e filedialog: add gtk_file_dialog_add_choice() and related
This brings back the add_choice() API that was deprecated as part of the
move to GtkFileDialog move without a replacement API.

This is needed for applications like Text Editor and Builder to migrate
to using GtkFileDialog.
2024-08-17 11:36:39 -07:00
Luca Bacci
b1995d0d77 Merge branch 'gtkshowwin32' into 'main'
Hook up file/URI launching to ShellExecute

See merge request GNOME/gtk!7556
2024-08-12 14:17:27 +00:00
Matthias Clasen
8ccfda4972 Merge branch 'docs-fix' into 'main'
docs: fix since annotation

See merge request GNOME/gtk!7600
2024-08-12 10:14:35 +00:00
Yosef Or Boczko
9a47c0f923 Update Hebrew translation 2024-08-12 09:58:40 +00:00
Sergey Bugaev
b33b679b13 Hook up gtk_show_uri_full () to gtk_show_uri_win32 ()
On Windows, always use gtk_show_uri_win32 () instead of going through
GAppInfo.  Hook up gtk_file_launcher_launch () to gtk_show_uri_win32 ()
as well, always extracting the file path (and not a URI) and propagating
the always-ask flag.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2024-08-12 11:18:23 +03:00
Sergey Bugaev
8d41ecff3e Add gtk_show_uri_win32 ()
This is a new internal utility to open/show/launch/execute URIs and
files on Windows, using Windows's native ShellExecuteEx () and
SHOpenWithDialog () APIs.

The advantages this has over using the win32 implementation of
g_app_info_launch_default_for_uri ():

* the implementation here is fairly simple;
* it doesn't involve trying to grok the registry for app / file	type
  registrations (at least not inside GLib/GTK side, the implementations
  of ShellExecuteEx/SHOpenWithDialog presumably do that internally);
* it doesn't require convoluted formatting / escaping of invocation
  command lines that GWin32AppInfo / gspawn-win32 has to do otherwise
  (again, presumably the Windows libraries implement this internally);
* it's certain to end up opening the file/URI the same way other apps
  in the system would;
* it can/will open the native system UI for picking an app in case there
  are multiple options (or when so requested programmatically with the
  always-ask flag), or if there is no app installed that can handle the
  URI scheme / file type;
* it lets us pass the parent window handle, much like the portal APIs;
  presumably Windows would use this for positioning the picking UI, or
  placing the launched app's window;
* presumably, this will properly elevate privileges with a User Access
  Control (UAC) prompt if the app being launched requires administrator
  access; this presumably is impossible with the wspawn* APIs that
  gspawn-win32 uses;
* this has a much better chance to work properly with the win32 app
  isolation (AppContainer) technology.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2024-08-12 11:18:17 +03:00
Jan Willem
85bcf9a366 docs: fix since annotation 2024-08-12 07:05:47 +00:00
Matthias Clasen
b27e3631f0 Merge branch 'matthiasc/for-main' into 'main'
colorstate: Avoid a memcpy

See merge request GNOME/gtk!7599
2024-08-11 22:00:03 +00:00
Matthias Clasen
4d5ba0631d colorstate: Avoid a memcpy
We don't need it here, and this call can happen with
values being in memory that is not amenable to fast memcpy.
2024-08-11 16:31:42 -04:00
Matthias Clasen
0f618ae29e Cosmetics 2024-08-11 16:31:35 -04:00
Matthias Clasen
13d415f2f6 Add a comment 2024-08-11 16:31:18 -04:00
Matthias Clasen
e7b14ae26e Post-release version bump 2024-08-11 15:52:33 -04:00
Matthias Clasen
07658347a9 4.15.5 2024-08-11 15:43:54 -04:00
Matthias Clasen
0436801a9c Merge branch 'matthiasc/for-main' into 'main'
docs: Mark the docs check as failing

See merge request GNOME/gtk!7598
2024-08-11 19:43:16 +00:00
Matthias Clasen
4da593a3de Merge branch 'printdialog_fix_sporadic_win32_build_failures' into 'main'
printdialog: fix sporadic win32 build failures

See merge request GNOME/gtk!7464
2024-08-11 19:35:32 +00:00
Matthias Clasen
f5194bbf83 gdk: Mark the docs check as failing
It complains about get_type functions, which really don't need
or want docs.
2024-08-11 15:03:13 -04:00
Matthias Clasen
15552e5478 docs: Mark the docs check as failing
Despite promises, and after fixing the configuration, the test still
complains about deprecated api not having docs. Not useful.
2024-08-11 15:01:59 -04:00
Matthias Clasen
d9616c1993 docs: Try to fix the docs check 2024-08-11 15:00:54 -04:00
Matthias Clasen
5dbce5ce9b docs: Add a missing bit 2024-08-11 14:47:59 -04:00
Matthias Clasen
1f47c36e49 docs: Fix a typo 2024-08-11 14:47:48 -04:00
Benjamin Otte
ed05890740 Merge branch 'wip/otte/for-main' into 'main'
gl: Interpolate gradient colors as premultiplied

See merge request GNOME/gtk!7597
2024-08-11 17:41:41 +00:00
Benjamin Otte
68d73dcce5 nodeparser: Handle disallowed values for radial gradients
Make sure the radii are strictly positive.

Also handle the case where start >= end.
We can't really underline that error, because we don't track the
locations of the start/end properties until we know that there's an
error.
So just underline the whole radial gradient declaration.

Test included
2024-08-11 19:07:40 +02:00
Benjamin Otte
9643a21827 gl: Interpolate gradient colors as premultiplied
Tests included
2024-08-11 19:07:40 +02:00
Matthias Clasen
07b64c2f0f Merge branch 'matthiasc/for-main' into 'main'
docs: Updates

See merge request GNOME/gtk!7596
2024-08-11 15:53:11 +00:00
Matthias Clasen
3df3ec2a29 css: Fix a copy-paste error
We want to use the decoration color if has_decoration_color is
TRUE, not if it is FALSE.
2024-08-11 10:02:03 -04:00
Matthias Clasen
0015fda94c docs: Updates
Keep the docs for our debug variables in sync with reality.
2024-08-11 09:02:35 -04:00
Matthias Clasen
589f483e7b NEWS: Updates 2024-08-11 08:50:42 -04:00
Daniel Șerbănescu
a77f8c9f62 Update Romanian translation
(cherry picked from commit cfbfaeae01)
2024-08-11 11:14:37 +00:00
Matthias Clasen
1d7aa9e40b Merge branch 'matthiasc/for-main' into 'main'
Small cleanups

See merge request GNOME/gtk!7592
2024-08-11 11:01:58 +00:00
Benjamin Otte
8de4b04819 Merge branch 'wip/otte/for-main' into 'main'
color: NEVER EVER use memcpy() in critical path

See merge request GNOME/gtk!7593
2024-08-11 05:39:26 +00:00
Benjamin Otte
175dba86fd color: NEVER EVER use memcpy() in critical path
Unless there is a very good reason to use memcpy(), don't use it.

Not using it makes the compiler not screw up and waste tons of CPU that
it could have not wasted.

Gets my framerate back from 1250 => 1750 and makes sysprof no longer
report ~40% of render time spent in gsk_gpu_colorize_op().
2024-08-11 06:51:58 +02:00
Matthias Clasen
767b9b9405 Docs: Add the image tool to the list 2024-08-10 22:47:02 -04:00
Matthias Clasen
202a51d9e3 Cosmetics 2024-08-10 22:41:31 -04:00
Matthias Clasen
3014d36a61 Merge branch 'matthiasc/for-main' into 'main'
inspector: Show fine transform categories

See merge request GNOME/gtk!7591
2024-08-11 02:40:25 +00:00
Matthias Clasen
d718fda057 memory texture: Fix a memory leak
The callers assumed that gdk_memory_sanitize is transfer full in
both directions, but it wasn't. Make it so.
2024-08-10 22:24:29 -04:00
Matthias Clasen
bbb7b365d5 inspector: Show roles for nodes
For some node types, the child nodes play different roles. E.g.
for a mask node, one of the two children is the source, the other
the mask. Show this information in the inspector.
2024-08-10 21:51:06 -04:00
Matthias Clasen
740e485160 NEWS: Updates 2024-08-10 21:09:29 -04:00
Matthias Clasen
5a69127862 inspector: Show fine transform categories
This is information we care about in particular for offloading,
so show it.
2024-08-10 21:08:53 -04:00
Matthias Clasen
798883f21a Merge branch 'css-color-hookup-5' into 'main'
Make non-srgb css colors work for text nodes

See merge request GNOME/gtk!7558
2024-08-10 16:28:31 +00:00
Matthias Clasen
bec71a15b4 Merge branch 'matthiasc/for-main' into 'main'
Fix a copy-paste error

See merge request GNOME/gtk!7589
2024-08-10 12:55:32 +00:00
Matthias Clasen
c4baf60044 inspector: Rename add_color2_row to add_color_row
The original add_color_row is gone now, so we can rename its
successor back.
2024-08-10 08:16:40 -04:00
Matthias Clasen
d32081401f inspector: Show more details for text nodes
Show the color state, and create textures with the full color
information.

The GdkRGBA-based helper functions are no longer used with this
commit and have been dropped.
2024-08-10 08:16:40 -04:00
Matthias Clasen
ed119ae246 gtk: Port selection drawing to new apis
Preserve color state information when drawing selections or block
cursors in GtkTextView.
2024-08-10 08:16:40 -04:00
Matthias Clasen
51768d0e16 gtk: Port caret drawing to new apis
Preserve color state information here.
2024-08-10 08:16:40 -04:00
Matthias Clasen
6f1a4e5bb9 gtk: Use the new apis
It is not perfect, since PangoRenderer, GtkTextAppearance and
GtkTextTag all carry colors as PangoColor or GdkRGBA. But at least,
we get glowing foreground colors.
2024-08-10 08:14:23 -04:00
Matthias Clasen
e323d2a93e gtk: Add gtk_snapshot_append_text2/layout2
These are private snapshot functions that use the new constructor
to create a text node with a given color state.
2024-08-10 07:48:18 -04:00
Matthias Clasen
23922eebf1 gl: Handle text colors with color states
Since we don't have proper color management here, just convert
any color we meet to sRGB and hope for the best.
2024-08-10 07:48:18 -04:00
Matthias Clasen
92bd85ba30 nodeparser: Support color states in text nodes
Test included.
2024-08-10 07:37:01 -04:00
Matthias Clasen
ca7aa30bc5 gsk: Use private text node api 2024-08-10 07:37:01 -04:00
Matthias Clasen
d17972427a gsk: Add private text node api
Add a constructor that takes a GdkColor and a corresponding getter.
2024-08-10 07:37:01 -04:00