Commit Graph

2716 Commits

Author SHA1 Message Date
Matthias Clasen
4b1575c42c Deprecate GtkShortcutsWindow
This will be replaced by something better in libadwaita.
2025-01-04 07:36:17 -05:00
Matthias Clasen
b837847128 Merge branch 'amolenaar/macos-default-actions' into 'main'
macos: Provide Edit menu with actions for undo/copy/paste

Closes #6829

See merge request GNOME/gtk!7906
2025-01-03 22:23:06 +00:00
Arjan Molenaar
db263f8162 macos: Remove special handling for delete key
It works as expected out of the box.
2024-12-27 21:24:08 +01:00
Matthias Clasen
d0f41dc8f7 Remove debug spew 2024-12-27 07:31:36 -05:00
Matthias Clasen
2d53b3f74f widget-factory: Don't create extra windows
When activate() is called via D-Bus, just present the window we
already have.
2024-12-26 11:48:12 -05:00
Matthias Clasen
d149c1e1f1 print-editor: Don't create extra windows
When activate() is called via D-Bus, just present the window we
already have.
2024-12-26 10:16:35 -05:00
Matthias Clasen
06c19b98d3 node-editor: Don't create extra windows
When activate() is called via D-Bus, just present the window we
already have.
2024-12-26 10:15:40 -05:00
Arjan Molenaar
52ea24e4e6 demos: Add edit menu to gtk-demo-application
Edit shortcuts work now when opening a file.
2024-12-25 21:19:10 +01:00
Matthias Clasen
6565cb78da gtk-demo: Don't create extra windows
When activate() is called via D-Bus, just present the window we
already have.

Fixes: #7213
2024-12-21 10:39:09 -05:00
Matthias Clasen
cec8d46b6a print-editor: Add --version support
Since it is easy now.
2024-12-10 21:18:44 -05:00
Matthias Clasen
761e92c664 widget-factory: Use g_application_set_version
A better version of --version.
2024-12-10 21:16:52 -05:00
Matthias Clasen
c8a9ea0228 node-editor: Use g_application_set_version
The easy way to add --version arguments.
2024-12-10 21:14:38 -05:00
Matthias Clasen
48940f976a gtk-demo: Use g_application_set_version
A small comfort measure that appeared in GLib 2.80.
2024-12-10 21:12:02 -05:00
Matthias Clasen
3a9c26a9ec demos: Quiet some deprecation warnings
The pixbuf animation api forces us to ues deprecated GLib api.
2024-12-10 19:03:11 -05:00
Sergey Bugaev
e633032786 demo: Fix a check
This way, some actual GTK logos show up.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2024-11-25 15:28:33 +03:00
Matthias Clasen
ed6f2a9693 Merge branch 'fix-demo-expander' into 'main'
demo: Fix "Expander" demonstration

See merge request GNOME/gtk!7887
2024-11-05 18:37:11 +00:00
Matthias Clasen
6a02caf216 Merge branch 'fix-demo-dnd' into 'main'
demo: Fix drag and drop demo critical

See merge request GNOME/gtk!7892
2024-11-05 18:32:43 +00:00
Florian "sp1rit"​
036364f4d4
demos: Add xmlns to appstream metainfo files
Pixiewood expects well-formed XML files, whose tags match the AppStream
namespace. Note that AppStream itself does not do this, so picking a
prefix for the namespace is fine for pixiewood but not AppStream.
2024-11-02 20:43:54 +01:00
Florian "sp1rit"​
4b619930f2
demo: Fix drag and drop demo critical
Right now, child is NULL when starting a drag in the main area and
moving the pointer onto the colors, there releasing it.
To avoid gtk_widget_get_ancestor thowing a critical, early exit if child
is NULL.
2024-11-02 19:25:01 +01:00
Florian "sp1rit"​
56f0735e2b
demo: Fix "Expander" demonstration
The expander window is not a dialog anymore, so attempting connecting to
its "response" is invalid and throws a critical:
  signal 'response' is invalid for instance '<PTR>' of type 'GtkWindow'
2024-10-31 08:59:49 +01:00
Alice Mikhaylenko
3274a286cc application: Set default window icon to appid by default
Lots of newer apps that use their appid as their icon name don't set
window icons, since they aren't used in GNOME. Instead of setting it
manually in every app, just default to it.

Only set the icon if it exists in the icon theme.

Remove manually set default icons in the demo.

No tests as GtkApplication doesn't have any in the first place.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/7120
2024-10-30 23:39:23 +04:00
Matthias Clasen
4bf6668906 demo: Use GtkInscription more
Port the columnview Unicode demo to GtkInscription.
2024-10-25 22:14:45 -04:00
Matthias Clasen
c09a51628b gtk4-demo: Call gtk_init in main
We end up using a display via gtk_application_set_accels_for_action,
and that can't happen before gtk_init anymore.
2024-10-21 21:17:00 -04:00
Benjamin Otte
a84cbe22d1 Merge branch 'wip/otte/win32-fixes' into 'main'
win32: Various fixes

See merge request GNOME/gtk!7848
2024-10-21 21:39:30 +00:00
Matthias Clasen
5366f83711 demos: Beef up about dialogs 2024-10-21 11:39:04 -04:00
Matthias Clasen
3ffc194e9c demos: Drop the icon-browser fully
This was forgotten in 32d03a548e.
2024-10-21 11:39:04 -04:00
Matthias Clasen
0170f8e261 Drop expandtab from vim modelines
This is already covered by our editorconfig.
2024-10-21 11:39:04 -04:00
Benjamin Otte
66e059ae52 build: Fix MSVC warning about function prototypes
We're using custom sorters and those want int as the return value,
not GtkOrdering.
2024-10-21 07:35:41 +02:00
Matthias Clasen
32d03a548e Drop some demos
The gtk4-icon-browser and gtk4-constraint-editor demos are basically
unmaintained, and not great showcases for GTK, so lets drop them.
2024-10-04 21:24:11 -04:00
Matthias Clasen
39374c7209 gtk4-demo: Make demos standalone
Making the demo windows transient and modal makes gnome-shell
treat them like dialogs, which is not right.
2024-10-02 19:15:31 -04:00
Matthias Clasen
64ecb972cf gtk4-demo: Add another scrolling case
Add a case for text with various underlines. In particular error
underlines, since these are more complicated and use repeat nodes
and offscreens.
2024-10-02 07:21:41 -04:00
Matthias Clasen
ded6d400d7 gtk-demo: Make scrolling benchmark resizable
The small window does not really tax our renderer much. Make it
resizable, so we can test fullscreen scrolling.
2024-10-02 07:20:36 -04:00
Matthias Clasen
d483883f38 node-editor: Use NGL for exporting images
This is a step towards dropping the GL renderer.
2024-09-30 18:58:33 -04:00
Matthias Clasen
0dc0bea1d5 gtk4-demo: Drop the glshader demos
The GL renderer will be going away in 4.18, and with that, shader
nodes will stop working for good. It is time to start preparing
for that.
2024-09-30 18:58:33 -04:00
Matthias Clasen
f20ca9067e gtk-demo: Stop using g_time_zone_new
It is deprecated in favor of g_time_zone_new_identifier.
2024-09-25 21:57:49 -04:00
Benjamin Otte
37cefde5b0 demo: Unmix argument names 2024-09-25 02:50:22 +02:00
Benjamin Otte
2f670bdc59 demo: Fix typo 2024-09-25 02:50:22 +02:00
Benjamin Otte
8d5660b4ab demo: Fix argument name 2024-09-25 02:50:22 +02:00
Benjamin Otte
820ba1ef13 demo: Correct argument name 2024-09-25 02:50:22 +02:00
Benjamin Otte
9507130dbc demo: Unmix argument names 2024-09-25 02:50:22 +02:00
Benjamin Otte
d2dede635b demo: include missing header 2024-09-25 02:50:22 +02:00
Matthias Clasen
171612671f demo: Beef up the image scaling demo
Add buttons for loading the Portland Rose, and a nameless large
png. Make them load the texture in a thread, to demonstrate better
handling of large images.
2024-09-06 16:14:24 -04:00
Matthias Clasen
a8e49cc21f gtk-demo: Cosmetics
Don't print out when the user just canceled the print dialog,
in the fill and stroke demo.
2024-09-01 10:33:27 -04:00
Fina Wilke
649782b547 a11y: Consistently use list type for errormessage relation
This more closely matches the spec. This is an API break, however the
atspi backend already assumed that this was a list, and would throw
criticals whenever this relation was set. Therefore it can be assumed
that this relation was not previously in active use.
2024-08-30 20:22:59 +00:00
Balló György
283c66251b demos: Set icon for the windows 2024-08-28 17:02:44 +02:00
Matthias Clasen
22860389de node-editor: Make Ctrl-Shift-V undoable 2024-08-18 21:45:25 -04:00
Matthias Clasen
cefaec5d6f node-editor: Add Ctrl-Shift-V
Make Ctrl-Shift-V trigger a 'paste-as-node' action which replaces
the current content with the render node in the clipboard.
2024-08-18 15:44:40 -04:00
Matthias Clasen
78935ec83c Make node-format.md part of the docs
This makes useful information more easily available, and it also
serves to validate the markdown.
2024-08-05 11:11:15 -04:00
Matthias Clasen
16431da3f2 nodeparser: Add support for cicp color states
Allow defining cicp color states with an @-rule:

    @cicp "jpeg" {
      primaries: 1;
      transfer: 13;
      matrix: 6;
      range: full;
    }

And allow using them in color() like this:

    color("jpeg" 50% 0.5 1 / 75%)

Note that custom color states use a string, unlike default color
states which use an ident.

Test included.
2024-08-05 11:11:15 -04:00
Simon McVittie
15a09c79f9 Fix debug format strings for non-LP64 platforms
Unfortunately the format string for a size_t, `%zu`, is not portable
to all Windows compilers, and the appropriate format string for the
fundamental type that implements size_t varies between platforms
(typically `%u` on 32-bit platforms, `%lu` on 64-bit Linux or
`%llu` on 64-bit Windows).

In gtk-demo, cast the number of search results to long, to avoid
breaking up a translatable string.

Elsewhere, use GLib's abstraction for this.

Signed-off-by: Simon McVittie <smcv@debian.org>
2024-07-27 18:14:31 +01:00