Commit Graph

74791 Commits

Author SHA1 Message Date
Matthias Clasen
d43e0fb9a7 css: Avoid allocation for tokens
All valid dimensions are short, so store
the dimension inside the token.
2023-01-12 00:11:46 -05:00
Matthias Clasen
6fb6f47fc8 css: Avoid some allocations
Reuse the name_buffer for reading strings.
2023-01-12 00:11:11 -05:00
Matthias Clasen
0f7d8e04d8 css: Some inlining 2023-01-12 00:11:10 -05:00
Matthias Clasen
c9fca559dc Cosmetics 2023-01-12 00:11:10 -05:00
Matthias Clasen
b9d1b5d6a3 icontheme: Bit a bit less wasteful 2023-01-12 00:11:10 -05:00
Emin Tufan Çetin
5f75ba46a5 Update Turkish translation 2023-01-11 07:01:44 +00:00
Emin Tufan Çetin
2507301983 Update Turkish translation 2023-01-11 05:41:40 +00:00
Matthias Clasen
41aeff331d texthistory: Avoid g_autofree
msvc does not like it, unfortunately.
2023-01-10 22:20:57 -05:00
Matthias Clasen
3aab48ec16 Merge branch 'wip/chergert/fix-5506' into 'main'
istring: fix istring_prepend() on malloc transition

Closes #5506

See merge request GNOME/gtk!5411
2023-01-11 02:39:32 +00:00
Christian Hergert
ad0348b85e texthistory: add debugging helpers to print undo stack
This is helpful to have when tracking down issues like #5506.
2023-01-10 13:36:16 -08:00
Christian Hergert
6a134551b9 istring: fix istring_prepend() on malloc transition
When transitioning from internal to malloc, the strings were placed in
the wrong order to g_strconcat(). This fixes an issue with undo where
if you hit the boundary in just the right way, your undo stack will do
unexpected things.

Fixes #5506
2023-01-10 13:32:38 -08:00
Matthias Clasen
0e1ae6ad11 Merge branch 'matthiasc/for-main' into 'main'
Add some more text undo tests

See merge request GNOME/gtk!5410
2023-01-10 19:05:13 +00:00
Aleksandr Melman
5baf4b4b2e Update Russian translation 2023-01-10 12:57:03 +00:00
Matthias Clasen
63560061e8 Add some more text undo tests
Unsuccessfully trying to reproduce #5506.
2023-01-10 07:34:55 -05:00
Matthias Clasen
be721f5797 Merge branch 'matthiasc/for-main' into 'main'
Deprecate gdk_display_put_event

See merge request GNOME/gtk!5409
2023-01-09 21:15:08 +00:00
Matthias Clasen
0073bb79a7 Deprecate gdk_display_put_event
The documentation already tells you not to
use this function.

Ifdef the remaining users in the X11 backend.
2023-01-09 15:46:25 -05:00
Matthias Clasen
f59b506674 Merge branch 'macos-stable-dnd' into 'main'
macos: Drag and drop should not freeze applications

See merge request GNOME/gtk!5291
2023-01-09 11:52:50 +00:00
Matthias Clasen
88b4404296 Merge branch 'wip/corey/popover-accel' into 'main'
gtkmodelbutton: Ensure that accel label is always aligned to end

Closes #5504

See merge request GNOME/gtk!5407
2023-01-09 10:58:14 +00:00
Corey Berla
e20bc7723a gtkmodelbutton: Ensure that accel label is always aligned to end
When the model button just has a text label and accel text,
the button fills and the accel label is implicitly aigned to end.
When there's also a icon, even though it's not shown (because
icons are only shown if there's no text), the button doesn't fill
and the accel ends up not aligned (assuming one of the other buttons
is longer). Ensure that the accel label is aligned to the end.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5504
2023-01-08 22:32:22 -08:00
Emmanuele Bassi
7edf8841fb Merge branch 'a11y_check_null_path' into 'main'
a11y: Avoid crashing if GtkAtSpiContext::path is NULL

See merge request GNOME/gtk!5405
2023-01-09 00:14:21 +00:00
Emmanuele Bassi
6b5b7eab04 Merge branch 'doc-improvements' into 'main'
Two docs improvements

See merge request GNOME/gtk!5406
2023-01-08 22:16:49 +00:00
Marco Melorio
c775262e9d docs: Improve gtk_window_present description
Move most of the documentation from gtk_window_present_with_time and
also reword it a bit to make it more understandable.
2023-01-08 22:41:19 +01:00
Marco Melorio
553fde9761 docs: Don't mention deprecated API in gtk_widget_set_visible
That statement is true, but since that API is deprecated, it doesn't
need to be there anymore to avoid confusing people.
2023-01-08 21:49:28 +01:00
Barnabás Pőcze
f2593dec4b a11y: Use fallback logic when GApplication has no DBus object path
Use the fallback logic to generate the base path for the GtkAtSpiRoot
if the GApplication has no DBus object path to guarantee that
the base path will not stay NULL.
2023-01-08 19:58:54 +01:00
Barnabás Pőcze
ab5a6ed0f1 a11y: Check if path is NULL when removing from cache
`gtk_at_spi_cache_add_context()` checks if the GtkAtSpiContext's path
is NULL before inserting the context object into the hash table.
Do the same in `gtk_at_spi_cache_remove_context()` to avoid a NULL
pointer dereference in `g_str_hash()` during the hash table lookup
if a context with NULL path is removed. That can happen when the
GtkAtSpiRoot::base_path is NULL, which, in turn, can happen if
`g_application_get_dbus_object_path()` returns NULL.

  ==394047==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fd1966f8b84 bp 0x7fff11e3ded0 sp 0x7fff11e3de58 T0)
  ==394047==The signal is caused by a READ memory access.
  ==394047==Hint: address points to the zero page.
      #0 0x7fd1966f8b84 in g_str_hash (/usr/lib/libglib-2.0.so.0+0x37b84)
      #1 0x7fd1966f9c09 in g_hash_table_contains (/usr/lib/libglib-2.0.so.0+0x38c09)
      #2 0x7fd196062c10 in gtk_at_spi_cache_remove_context ../gtk/a11y/gtkatspicache.c:447
      #3 0x7fd19606e0a9 in gtk_at_spi_root_unregister ../gtk/a11y/gtkatspiroot.c:653
      #4 0x7fd196067f58 in gtk_at_spi_context_unrealize ../gtk/a11y/gtkatspicontext.c:1559
      #5 0x7fd195ced97f in gtk_at_context_unrealize ../gtk/gtkatcontext.c:668
      #6 0x7fd195f5576e in gtk_widget_unroot_at_context ../gtk/gtkwidget.c:2399
      #7 0x7fd195f55bd2 in gtk_widget_unroot ../gtk/gtkwidget.c:2499
      ...
2023-01-08 19:56:49 +01:00
Matthias Clasen
dd3cdc52f5 Fix code style 2023-01-08 14:41:11 +00:00
Matthias Clasen
5a3156a8b7 gdk: Update docs
Update the docs for gdk_display_get_monitor_at_surface.
2023-01-07 21:35:29 -05:00
Matthias Clasen
a4c2f19155 Merge branch 'gdk-display-get-monitor-is-nullable' into 'main'
gdkdisplay: Document get_monitor_at_surface can return NULL

Closes #5075

See merge request GNOME/gtk!4917
2023-01-07 20:39:04 +00:00
Matthias Clasen
be8fb1e9b8 Merge branch 'more-filesystemmodel-cleanups' into 'main'
filesystemmodel: Crop tree model cruft

See merge request GNOME/gtk!5402
2023-01-07 18:42:14 +00:00
Matthias Clasen
52c97dbf67 Merge branch 'win-file-ext' into 'main'
filechoosernativewin32: Set default extension

See merge request GNOME/gtk!5266
2023-01-07 18:14:37 +00:00
robxnano
57ebf26f15 filechoosernativewin32: Set default extension 2023-01-07 18:14:36 +00:00
Matthias Clasen
32247bc50e filesystemmodel: Drop tree model cruft
We no longer need the placeholder item for the
editable, so drop it.
2023-01-07 12:22:25 -05:00
Matthias Clasen
ad940bc892 filesystemmodel: Rename private header 2023-01-07 12:01:15 -05:00
Matthias Clasen
7d34e7e0f7 Merge branch 'filesystemmodel-cleanups' into 'main'
filesystemmodel: Cleanup unused defines

See merge request GNOME/gtk!5401
2023-01-07 14:36:20 +00:00
Georges Basile Stavracas Neto
b2f43076bd gtkfilesystemmodel: Use g_clear_* helpers
Saves some code.
2023-01-07 09:17:37 -05:00
Georges Basile Stavracas Neto
202e889577 filesystemmodel: Use G_DECLARE_FINAL_TYPE()
Clean up boilerplate. It's a private object anyway.
2023-01-07 09:17:37 -05:00
Georges Basile Stavracas Neto
a8690c84ab filesystemmodel: Cosmetics
Adjust code style, and shuffle some functions around. Remove
unhelpful doc comments.
2023-01-07 09:17:15 -05:00
Matthias Clasen
35244f4b59 filesystemmodel: Use g_set_object 2023-01-07 09:12:44 -05:00
Georges Basile Stavracas Neto
503c3ec04d filesystemmodel: Make function private to gtkfilesystemmodel.c
The _gtk_file_system_model_update_file() function is not used outside
GtkFileSystemModel, so no need to expose it in the header.

Shuffle it around in code, and remove it from the header.
2023-01-07 08:44:40 -05:00
Georges Basile Stavracas Neto
4a5a466975 filesystemmodel: Cleanup unused defines
They were made unused with the removal of GtkTreeModel interface
implementation.
2023-01-07 08:44:34 -05:00
Matthias Clasen
e694511da3 Merge branch 'werror-fixes' into 'main'
gtk-launch: Remove compile-time warning

See merge request GNOME/gtk!5400
2023-01-07 13:22:20 +00:00
Matthias Clasen
0a94827b9c Merge branch 'wip/corey/calendar' into 'main'
calendar: Fix marked days

See merge request GNOME/gtk!5399
2023-01-07 13:11:01 +00:00
Corey Berla
735cf301a4 calendar: Set marked days immediately
The marked days are set only as part of gtk_calendar_select_day().
This is insufficient, especially because the day-selected signal
is emitted after the marked days are set in gtk_calendar_select_day().
2023-01-06 20:37:54 -08:00
Corey Berla
e8a29f90d1 calendar: Only apply the marked_day to the current month
The marked day gets applied to the current month, and either the previous
or subsequent month if they are visible within the current month.
This doesn't make any sense and likely was an accidental regression
in a6f9052cf1.  Clarify the docs.
2023-01-06 20:21:35 -08:00
Corey Berla
182cc74834 calendar: Add css style for marked days
As part of a6f9052cf1, marked days lost
their style, essentially making that function worthless.  Previously,
they were simply bolded, but that doesn't give them proper justice.
2023-01-06 20:21:35 -08:00
Matthias Clasen
7801dd8944 Merge branch 'wip/phako/fix-activate-action-annotation' into 'main'
widget: Mark format as nullable in activate_action

See merge request GNOME/gtk!4653
2023-01-07 01:06:00 +00:00
Matthias Clasen
38e090f5c1 Merge branch 'main' into 'main'
Fix a typo

See merge request GNOME/gtk!5170
2023-01-07 00:59:32 +00:00
Benjamin Otte
998c382037 build: Turn off tautological-constant-out-of-range-compare warning
This issues a warning when an enum value is compared to a value that is
out of range for the enum.

We do this a lot, either when using -1 for undefined values or when
comparing array sizes to enum values like so:

  enum {
    ONE,
    TWO,
    THREE
  } some_enum_value;
  const char *names= { "one", "two", "three" };

  g_assert (some_enum_value < G_N_ELEMENTS (names));
2023-01-06 19:46:58 -05:00
Benjamin Otte
ac81e71f78 gtk-launch: Fix unused variable warning on macOS 2023-01-06 19:46:58 -05:00
Benjamin Otte
de271c9a30 ci: Disable -Werror on all subprojects
Would be nice if meson had a nicer way of doing this, but...
2023-01-06 19:46:58 -05:00