Commit Graph

27800 Commits

Author SHA1 Message Date
Jakub Steiner
a8a545510d Adwaita: help fullcolor app icons
- draw a large dropshadow for aboutboxes
- draw an outline for low res

See issues #1434 and #1445.
2018-11-05 15:03:11 +01:00
LRN
d45537a743 Merge branch 'win32-honest-clipboard' into 'gtk-3-24'
GDK W32: be more honest about clipboard format support

See merge request GNOME/gtk!382
2018-10-31 05:13:18 +00:00
John Ralls
60dafa38c7 Merge branch '1411-handle-null-from-nsgraphicscontex' into gtk-3-24. 2018-10-29 11:32:10 -07:00
Jakub Steiner
c1dbf96413 Adwaita: prevent devel styling break selection mode
- Selection mode does not get the special devel styling.

    - removed teh last-child() selector for it doesn't work anymore.
      Better style all section of the headerbar than none. Proper fix pending.
2018-10-22 10:41:41 +02:00
John Ralls
7600c4e3f7 Modify Quartz gtk_drag_begin_internal to match 4172138. 2018-10-20 12:26:13 -07:00
Philip Chimento
df0e5cc8e6 quartz: Fix crash when realizing GtkOffscreenWindow
GtkOffscreenWindow doesn't have a NSView or NSWindow, so return NULL if
passed one of those.

Closes: #379
2018-10-19 05:38:28 +01:00
Matthias Clasen
00034c00be Merge branch '1371-flickering-tooltips-if-no-mouse-cursor-theme-loaded-gtk3' into 'gtk-3-24'
Tooltip: Fix the used cursor size if 0 in Settings

See merge request GNOME/gtk!374
2018-10-16 23:20:25 +00:00
Matthias Clasen
c0b5d66069 Merge branch '1397-gtknotebook-built-in-popup-menu-listing-tabs-doesn-t-use-tab-label-text-for-the-last-tab' into 'gtk-3-24'
Notebook: Ensure menu label updates with tab_label

See merge request GNOME/gtk!385
2018-10-16 20:52:04 +00:00
Руслан Ижбулатов
4172138154 DnD: fix setting icon in drag-begin
Commit 1c96b703 changed the way icon
information is given to DnD. Previously an icon helper was kept at
the drag source site. Now an image definition is stored there.
The difference is that icon helper is an object that changes its
state in response to an icon being set, thus the object survived
multiple icon changes. Whereas image definition is destroyed and
re-created from scratch every time a drag icon is changed.
This created a problem where gtk_drag_begin_internal() would receive
the value of site->image_def when a drag just began, then it emits
"drag-begin" signal, in response to which an application can
set drag icon, changing the value of site->image_def. However,
gtk_drag_begin_internal() is unable to know about that change and
continues to use the old value it received from up the stack.

Not only does it prevent drag icon from being set from "drag-begin",
it also can induce a crash, since the old image_def value used
by gtk_drag_begin_internal() points to a freed memory region.

Fix this by only setting a default icon (which is created in-place)
in gtk_drag_begin_internal() if the caller does not care about icons.
Otherwise gtk_drag_begin_internal() will return a boolean that indicates
whether an icon needs to be set. Then the caller can invoke
gtk_drag_set_icon_definition() to set the icon, if needed.

Fixes #1407.
2018-10-16 19:04:54 +00:00
Руслан Ижбулатов
5e00fd25da Fix GtkDragSourceInfo disposal
gtk_drag_clear_source_info() immediately unrefs the info attached
to the context (the very same info we're in the process of destroying
in gtk_drag_source_info_free()). If that reference was the last one,
then accessing the info object after that is a use-after-free error.
Also, change the order a bit to first free the event, and only then
unref the context.

Fix this by copying all the fields of the info that we need, and
then working with these copies.
2018-10-16 03:07:13 +00:00
Timm Bäder
dbbc7b3859 emojichooser: Pass chooser to add_emoji
https://gitlab.gnome.org/GNOME/gtk/issues/1398
2018-10-13 14:01:08 +01:00
Daniel Boles
2856fb86a9 Adwaita: Regenerate CSS for new window.devel style
Commit 955aa8d54b forgot this, again.
2018-10-12 23:55:02 +01:00
Daniel Boles
80a3d7090a Notebook: Ensure menu_label updates with tab_label
This was noticed in Firefox and demonstrated using a GtkBuilder ui file.
buildable_add_child() calls set_tab_label(), but the latter did nothing
to update the menu_label corresponding to that tab with the new text.
Using Builder to populate the tab child, only tabs other than last got
the right non-default labels, and even that was mostly coincidental, as
adding the main child called update_labels() via real_insert_page(), so
it took effect when the 2nd last main child is added, updating the rest
but leaving the last with the default label, not that given in Builder.

Fix by factoring out the code from child_reordered() to a new helper
menu_item_recreate() and calling that in set_tab_label(), so that
whenever the tab_label is updated, so is its corresponding menu_label.

This fixes the reported case and presumably others that we could write.

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1397
2018-10-12 23:49:29 +01:00
Daniel Boles
82c5308947 Notebook: Don't notify 2x from set_tab_label_text
It calls set_tab_label(), which already does that.
2018-10-12 23:38:52 +01:00
Jakub Steiner
955aa8d54b Adwaita: backport nightly styling
- nightly apps get a headerbar styling
2018-10-10 09:38:50 +02:00
Hugo Lefeuvre
adbaee796d gtkstack: fix null pointer dereference
The gtk_stack_snapshot_slide() function dereferences the
last_visible_child pointer without proper != NULL ckeck. This might
result in NULL pointer dereference and crash if last_visible_child is
invalid.

Add a != NULL check before dereferencing the pointer.

cherry-picked from https://gitlab.gnome.org/GNOME/gtk/merge_requests/361
2018-10-07 18:31:03 +01:00
Daniel Boles
9b7d886b72 Tooltip: Fix the used cursor size if 0 in Settings
Before the recent rework of positioning in GtkTooltip, the widget always
used the cursor_size of the GdkDisplay. That work redid this to instead
take GtkSettings::gtk-cursor-theme-size. But that property's doc says:

> Size to use for cursors, or 0 to use the default size.

and has 0 as its default. This is quite a likely scenario for anyone
whose desktop or settings.ini does not explicitly provide a cursor size,
which is the case for XFCE and win32, to name just two common platforms.

Then, it seems getting a cursor_size of 0 causes GtkTooltip to freak out
and hide/show itself at a very rapid speed, thus making it unusable.

So, we should check whether the Settings return 0 and, if so, still use
gdk_display_get_default_cursor_size (display) to ensure we get a size.

https://gitlab.gnome.org/GNOME/gtk/issues/1371
2018-10-07 18:26:30 +01:00
Руслан Ижбулатов
885672520a gtkselection: add a W32 tip about image/bmp support 2018-10-07 12:23:16 +00:00
Benjamin Otte
4ef082d2ed Merge branch 'wip/arnaudb/fix-dashed-border' into 'gtk-3-24'
Make dashed border-style work correctly

See merge request GNOME/gtk!349
2018-09-24 18:21:02 +00:00
Daniel Boles
ed57e564a9 SidebarRow: Set ::no-show-all on end_icon_widget
All the other conditionally visible child widgets have this. Without it,
it seems some cases can wrongly reveal it, with a nonsensical home icon.

https://gitlab.gnome.org/GNOME/gtk/issues/1345
2018-09-22 19:57:59 +01:00
Arnaud B
0feebcf145 Make dashed border-style work correctly
There’s a short-path done for focus rectangles, but it can be taken in other conditions, and then fail occasionally to render a dashed line if the border-width is too big.
2018-09-21 12:25:23 +00:00
Matthias Clasen
8fd2d461fc gtk_application_inihit: allow no reason
We document this argument as nullable, so treat it as such.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1327
2018-09-13 23:32:45 -04:00
Matthias Clasen
b1d3beedc3 Add a missing include
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1325
2018-09-12 23:02:26 -04:00
Chun-wei Fan
5d903cb094 builds: Fix introspection with MSVC builds
For building the introspection dumper program on Visual Studio, leave out
the G_LOG_DOMAIN as g-ir-scanner does not like it when it constructs the
compiler command line for Visual Studio.

Also ensure that we are looking for the freshly-built libraries by looking
for the .lib's from the output directories of the Visual Studio project files.
2018-09-11 18:13:10 +08:00
Jakub Steiner
416feacfe3 Merge branch 'adwaita-fixes-3' into 'gtk-3-24'
Adwaita: Fix errors in two recent MRs

See merge request GNOME/gtk!330
2018-09-10 19:07:26 +00:00
Adrien Plazas
f893e668c8 Adwaita: Fix sidebar separator styling
Simplify the styling of sidebar separators by not setting their borders
and margins rather than trying to drop it afterward, which was actually
not working anyway.
2018-09-10 15:05:22 +02:00
Adrien Plazas
a0acdcd08c Adwaita: Fix dropping the backgroud on nested headerbars
Make the selector less greedy to not remove the background on
non-titlebar headerbars contained in non-headerbar titlebars and only to
the ones contained in headerbar titlebars. This avoid issues in some
applications.

Also make dropping the background more agressive to actually remove it.
2018-09-10 14:54:19 +02:00
Jakub Steiner
6ab9a85ac9 Merge branch 'wip/adwaita/linked-entry-error-state-fix-3-24' into 'gtk-3-24'
Adwaita: Fix linked elements in error state

See merge request GNOME/gtk!316
2018-09-10 10:46:03 +00:00
Jakub Steiner
7e0aba77ff Merge branch 'selection-mode-ancestor-3' into 'gtk-3-24'
Adwaita: Set selection mode to headerbars if it's on ancestors

See merge request GNOME/gtk!325
2018-09-10 08:59:37 +00:00
Jakub Steiner
cbf76d4693 Merge branch 'separator-sidebar-3' into 'gtk-3-24'
Adwaita: Style separator.sidebar

See merge request GNOME/gtk!323
2018-09-10 08:59:04 +00:00
Adrien Plazas
43c458f45f Adwaita: Set selection mode to headerbars if it's on ancestors
This allows to set the container of the headerbars in selection mode
rather than having to set the mode to each element of the title bar.
2018-09-07 15:27:22 +02:00
Adrien Plazas
f0696dfae0 Adwaita: Drop the background of nested headerbars
This is needed to work around headerbar sliding animation issues without
refactoring Adwaita's support of titlebars and headerbars as it may
break applications.

https://gitlab.gnome.org/GNOME/gtk/issues/1264
2018-09-07 13:07:46 +02:00
Adrien Plazas
f9ba306116 Adwaita: Style separator.sidebar
Let separators be declared as sidebars to have the same style as those
drawn by GtkStackSidebar. This also let them handle the selection-mode
class, whether they are assigned it or they descend from something in
selection mode.

This is convenient when building a custom sidebar using a GtkSeparator
and to extend a sidebar to the title bar.
2018-09-07 12:42:26 +02:00
Matthias Clasen
47122288b8 Fix portal path handling
This was broken when I recently introduced this helper
function.
2018-09-05 19:58:03 -04:00
Jan Alexander Steffens (heftig)
3c7d5e749c
GtkApplication: Fix CRITICAL on shutdown when register_session=FALSE 2018-09-05 21:46:28 +02:00
Alex Monday
e33b93a97e themes: Fix linked elements in error state
Add instructions for color of linked elements border which ajoints
entry, when parent linked entry is in error state.
2018-09-02 14:43:13 +05:00
Matthias Clasen
813c7b19ea GtkApplication: track screensaver state
A number of applications want to track the state of the screensaver.
Make this information available as a boolean property. We only listen
for state changes when ::register-session is set to TRUE.

This is implemented for unsandboxed D-Bus access by talking
directly to org.gnome.ScreenSaver or org.freedesktop.ScreenSaver,
and for sandboxed D-Bus by using a (new) portal API.
A Quartz implementation is missing.
2018-08-30 23:17:37 -04:00
Matthias Clasen
3fc319ff1b GtkApplication: Respect GTK_USE_PORTAL
When the environment variable is set, don't connect
to the session manager, but instead rely on the
inhibit portal.
2018-08-30 23:17:37 -04:00
Matthias Clasen
f734c3d3b0 file chooser portal: use request path utilities
Less code duplication, more sticky toffee!
2018-08-30 23:10:13 -04:00
Matthias Clasen
c3077467d0 print portal: use request path utilities
Less code duplication, more cookies!
2018-08-30 23:10:13 -04:00
Matthias Clasen
e2d066a2ec color picker portal: Add request path utility
Less code duplication, more cake!
2018-08-30 23:10:13 -04:00
Matthias Clasen
6829719d6d Add utility functions for portal paths
The paths that we create for requests and sessions
need some icky code to create. Keep it in one place.
2018-08-30 23:10:13 -04:00
Kai Willadsen
5111f7af99 FileChooserWidget: Don't show recent items with private hint set 2018-08-28 20:14:16 +00:00
Matthias Clasen
aa69b3af5a Merge branch 'gtk-3-24.win.updated' into 'gtk-3-24'
Fix pre-C99 builds of the gtk-3-24 branch

See merge request GNOME/gtk!310
2018-08-28 20:10:04 +00:00
Matthias Clasen
2307f8ec67 Merge branch 'fix-warning-combobox-destroy' into 'gtk-3-24'
Fix warning on GtkComboBox destroy

See merge request GNOME/gtk!311
2018-08-28 19:27:24 +00:00
Luca Bacci
aa5d926c84 Check for NULL priv->popup_window in gtk_combo_box_popdown()
Fixes issue #125
2018-08-28 18:39:05 +02:00
Matthias Clasen
61921eba57 Fix a typo
Its Hieroglyphs!

Closes: #1292
2018-08-28 12:26:49 -04:00
Chun-wei Fan
6cf7297653 gtk/gtkeventcontrollerscroll.c: Include fallback-c89.c
... instead of just math.h, as it uses the C99 function trunc().  This
is so that the code builds on pre-C99 compilers.
2018-08-28 17:43:11 +08:00
Chun-wei Fan
723e50990f gtk/fallback-c89.c: Add C89 fallback for trunc()
Check for trunc() during configure and provide a fallback implementation
for it if it is not found.
2018-08-28 17:43:04 +08:00
Matthias Clasen
ac654740f3 Deprecate GtkRange::upper/lower-stepper-sensitivity
These properties have been removed in GTK+ 4.
Deprecate them here.
2018-08-26 18:58:59 -04:00