Matthias Clasen
df58d0acf3
Adwaita: Make dnd marks in text views green
...
We already do this in entries, this just updates
text views to match.
2020-01-03 13:00:53 -05:00
Matthias Clasen
9c2c5665df
textview: Render visible marks better
...
The only other visible mark that is in common use
besides insert and selection_bound is dnd_mark, and
we don't want it to blink or be affected by 'cursor'
visibility.
Therefore, cache not just the cursor positions, but
also whether they are insert or selection_bound,
and take that into account when rendering them.
2020-01-03 13:00:53 -05:00
Matthias Clasen
1be9c6aa3f
Merge branch 'remove-xim' into 'master'
...
Remove the XIM input method
See merge request GNOME/gtk!1195
2020-01-03 17:56:26 +00:00
Matthias Clasen
7a1aefc7f3
Fix the previous commit
...
We need to actually use the right coordinates.
2020-01-02 00:43:27 -05:00
Matthias Clasen
f7f06f810b
stackswitcher: Fix switch-while-drag functionality
2020-01-02 00:24:54 -05:00
Matthias Clasen
e02fd80adb
dnd: Be safer
...
The contents of the selection are documented
to not be NULL if size is non-negative. So
use an empty string instead of NULL for size 0,
avoiding a crash.
2020-01-01 12:51:19 -05:00
Matthias Clasen
f8a19506ab
Merge branch 'drag-icon' into 'master'
...
Drag icon
See merge request GNOME/gtk!1274
2019-12-30 21:20:26 +00:00
Matthias Clasen
67d1d5ec80
mountoperation: Handle D-Bus missing
...
Still not great to make sync calls here, but
at least we should handle failure without criticals.
2019-12-30 16:03:47 -05:00
Matthias Clasen
772ac2b0c5
tooltip: Never set a window to be its own parent
...
We do get events on the tooltip window too, and
we better ignore them, or bad things may happen,
such as widgets that are their own parents and
cause infinite loops.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2339
2019-12-30 09:52:13 -05:00
Matthias Clasen
68b3b66c03
tooltipwindow: Cosmetic fix
2019-12-30 09:28:22 -05:00
Matthias Clasen
baf99bb868
Remove gtk_window_set_hardcoded_surface
...
It is not used anymore.
2019-12-30 00:31:32 -05:00
Matthias Clasen
538efd0cc6
container: Be more careful with roots
...
We were warning if we hit non-container
roots. Instead, call suitable naive api.
2019-12-30 00:30:01 -05:00
Matthias Clasen
9ba184adf7
widget: Be more careful with roots
...
We were assuming that all roots are windows,
and calling GtkWindow apis on them.
2019-12-30 00:29:52 -05:00
Matthias Clasen
710b8d7f40
dnd: Use GtkDragIcon
...
Use the new GtkDragIcon instead of a window
of type GTK_WINDOW_POPUP and
gtk_window_set_hardcoded_surface.
2019-12-30 00:29:10 -05:00
Matthias Clasen
a6244a95be
Add GtkDragIcon
...
This is a GtkRoot implemntation for drag icons,
using the surface provided by GdkDrag. This lets
us avoid GTK_WINDOW_POPUP and
gtk_window_set_hardcoded_surface.
2019-12-30 00:28:02 -05:00
Matthias Clasen
133b6f2f23
tooltipwindow: Cosmetic fix
2019-12-29 22:48:25 -05:00
Matthias Clasen
f31a016efb
tooltips: Stop using GTK_WINDOW_POPUP
...
Make GtkTooltipWindow a GtkNative implementation,
instead of using a GTK_WINDOW_POPUP window.
2019-12-29 22:09:13 -05:00
Matthias Clasen
de694958b5
Drop custom tooltip windows
...
We want to put tooltips into something other than
windows, so this needs to go. Custom widgets are
still possible.
2019-12-29 20:52:08 -05:00
Matthias Clasen
52e0eef6cb
docs: Touch up menu button docs
2019-12-29 20:31:58 -05:00
Matthias Clasen
b06331218d
docs: Rewrite popover menu docs
...
These were outdated and did not reflect current api.
2019-12-29 20:31:58 -05:00
Matthias Clasen
9b165c8bec
treeview: Use a popover for search
...
This is a more modern way of doing things, and avoids a window
of type GTK_WINDOW_POPUP. With a popover, it doesn't make sense
to have a positioning function, so remove that api.
2019-12-29 20:31:58 -05:00
Matthias Clasen
3fd427cfce
win32: Use a regular window for printing
...
We never show this window, so it should not matter.
Ideally, we'd just create a surface to get handle,
anyway.
2019-12-29 20:31:58 -05:00
Matthias Clasen
3dd6cc405e
accelcellrenderer: Stop grabbing
...
Standalone grabs are going away.
2019-12-29 20:31:58 -05:00
Matthias Clasen
06860bb2be
accelcellrenderer: Fix editing
2019-12-29 20:31:58 -05:00
Matthias Clasen
7ee5779efc
gtk: Remove menu code
...
GtkMenu, GtkMenuBar, GtkMenuItem and their subclasses
and supporting classes are replaced by model-based popover
implementations.
2019-12-29 20:31:58 -05:00
Matthias Clasen
a2aefa83bb
accellabel: Don't mention GtkMenuItem in the docs
2019-12-29 20:31:58 -05:00
Matthias Clasen
0854140b22
label: Stop referring to GtkMenuItem in the docs
2019-12-29 20:31:58 -05:00
Matthias Clasen
57a861723c
buildertool: Drop menu properties
2019-12-29 20:31:58 -05:00
Matthias Clasen
b59521bb82
inspector: Remove menu special-casing
2019-12-29 20:31:58 -05:00
Matthias Clasen
7e8393ba0f
widget: Remove menu special-casing
2019-12-29 20:31:58 -05:00
Matthias Clasen
9e15f3df75
label: Remove menu support code
2019-12-29 20:31:58 -05:00
Matthias Clasen
27543120f2
menubutton: Stop supporting menus
2019-12-29 20:31:57 -05:00
Matthias Clasen
901518ec25
headerbar: Stop using GtkMenuButton::use-popover
...
This property is going away.
2019-12-29 20:31:57 -05:00
Matthias Clasen
4c9b0d82af
menutoolbutton: Stop supporting menus
2019-12-29 20:31:57 -05:00
Matthias Clasen
2c5f4c5871
menutoolbutton: Fix sensitivity handling
...
We don't need to set the arrow button explicitly
to insensitive, GtkMenuButton handles that automatically.
2019-12-29 20:31:57 -05:00
Matthias Clasen
8ee44d200d
toolbar: Simplify overflow implementation
...
Do away with the proxy menu items, and instead
just have toolitems provide a label for overflow
items. We create the overflow widgets ourselves
already, as model buttons.
Also replace the toggle button used for overflow
with a menubutton, simplifying things further.
2019-12-29 20:31:57 -05:00
Matthias Clasen
e424246134
combobox: Replace GtkTreeMenu with a popover
...
This does not currently try to reproduce the exact
placement, since GtkPopover doesn't have to have
the necessary placement hints.
2019-12-29 18:45:40 -05:00
Matthias Clasen
5d821425b3
accellabel: Remove an example using menus
2019-12-29 18:45:40 -05:00
Matthias Clasen
3d4acf6360
window: Move F10 handling to popover menubars
2019-12-29 18:44:26 -05:00
Matthias Clasen
0cf1e1e106
applicationwindow: Stop using a menu bar
...
We have a replacement with popovers now.
2019-12-29 17:10:16 -05:00
Matthias Clasen
b23fbe1f39
notebook: Remove menu remnants
2019-12-29 17:10:16 -05:00
Matthias Clasen
f5e79b9bc5
appchooserwidget: Remove ::populate-popup
...
We are no longer doing menus this way; if a menu turns out to be
needed at all here, we can add a menu model later.
2019-12-29 17:10:16 -05:00
Matthias Clasen
94e238c467
placesview: Use a popover
...
Replace the context menu with a popover.
2019-12-29 17:10:16 -05:00
Matthias Clasen
22f6787283
mountoperation: Use a popover
...
Replace the context menu with a popover.
2019-12-29 17:10:16 -05:00
Matthias Clasen
6255dcd8ec
filechooserbutton: Be smarter about 'None'
...
Don't refilter the model while the combo box is popped up,
that wreaks havoc with layout and does not really work.
Instead, repurpose one of the separator rows for the 'none'
case. This works because the row separator function is not
consulted for the cellview in the button.
2019-12-29 17:10:16 -05:00
Matthias Clasen
6f80eee962
window: Complete the popover conversion
2019-12-29 17:10:16 -05:00
Matthias Clasen
fd0f01bcad
popovermenubar: Cosmetics
2019-12-29 17:10:16 -05:00
Matthias Clasen
0b6e521dc5
popovermenu: Use a weak ref for active item
...
Otherwise, we can end up with a dangling pointer,
leading to badness.
2019-12-29 17:10:15 -05:00
Matthias Clasen
a73947e54f
Remove more mir remnants
...
The mir backend was removed a while ago, so
GDK_WINDOWING_MIR is never defined.
2019-12-28 21:52:34 -05:00
Matthias Clasen
7525271de1
tooltip: Remove some unneeded includes
2019-12-28 21:49:09 -05:00
Matthias Clasen
0bc65f0bde
popover: Remove some dead code
2019-12-28 21:46:39 -05:00
Matthias Clasen
9543a5daeb
popovermenu: Fix keynav with submenus
...
When we right-arrow all the way into a submenu
and then cycle to the next menu in a menubar,
we need to reset all open submenus, so that
left-arrowing back to the menu puts the focus
on the first item again.
2019-12-27 22:54:11 -05:00
Matthias Clasen
28b91a4450
modelbutton: Be focusable
...
This got lost when modelbuttons stopped being
derived from buttons. It is necessary, since
the GTK focus machinery takes this flag seriously
nowadays, and won't let us grab focus to non-focusable
widgets.
2019-12-27 21:58:54 -05:00
Matthias Clasen
6b89d8a199
inspector: Add a focus overlay
...
It helps to see what is going on.
2019-12-27 17:35:09 -05:00
Matthias Clasen
08d4bb4785
widget: Fix a memory leak
...
The transform passed to gtk_widget_allocate is
transfer full, so we must consume the reference
before returning.
2019-12-25 09:47:22 -05:00
Matthias Clasen
a02e25ffff
widget: Avoid a crash in event handling
...
I was seeing crashes in gtk_widget_run_controllers.
We were accessing the controller after calling out
to application code that might remove it. Better
be safe and do the access before.
2019-12-25 09:47:22 -05:00
Matthias Clasen
280bdb0567
inspector: Fix a small memory leak
...
We were leaking overlays.
2019-12-25 09:47:22 -05:00
Matthias Clasen
1a94e5fb0e
inspector: Fix a small memory leak
...
The property editor was leaking a few GValues.
2019-12-25 09:47:22 -05:00
Matthias Clasen
b6cfe59460
inspector: Small cleanup
2019-12-25 09:47:22 -05:00
Matthias Clasen
7db2abf918
widget: Fix a small memory leak
2019-12-25 09:47:22 -05:00
Matthias Clasen
b398af914f
eventcontroller: Fix name property
...
This never worked. Oops.
2019-12-25 09:47:22 -05:00
Matthias Clasen
77c57b4b14
Adwaita: update the README
2019-12-24 12:30:54 -05:00
Matthias Clasen
10d260ec71
HighContrast: print dialog fixes
...
Fix up the paper drawing.
2019-12-24 12:30:44 -05:00
Matthias Clasen
1ac8bb0128
Adwaita: print dialog tweaks
...
Fix up the paper drawing.
2019-12-24 12:30:35 -05:00
Matthias Clasen
28539ba838
print dialog: Fix up page drawing
...
This fixes up page drawing enough to appear properly
with the builtin themes.
2019-12-24 12:30:28 -05:00
Matthias Clasen
87502b4f2e
Fix the build
2019-12-24 09:58:56 -05:00
Matthias Clasen
3644d3a100
Merge branch 'gtk-demo-fixes' into 'master'
...
Gtk demo fixes
See merge request GNOME/gtk!1266
2019-12-24 08:47:28 +00:00
Matthias Clasen
9e3147f78d
treeview: Fix embedding cell renderers
...
We need to manually set up the css node,
since the treeview has children whose css
node is not a direct child of the treeview
css node (header buttons).
2019-12-24 03:39:02 -05:00
Matthias Clasen
cc3ecac6d8
cell renderer spin: Bring this back
...
GtkSpinButton lost its cell editable implementation
when it stopped being a GtkEntry subclass. Add it
back, and make it work.
2019-12-24 03:33:02 -05:00
Matthias Clasen
72932d2776
cell renderer text: Fix this to work again
...
We were showing the entry, and removing it right
away when the focus moved to the text child.
Avoid that.
2019-12-24 03:13:58 -05:00
Matthias Clasen
58bc9452f6
paper dialog: Make this look less horrible
2019-12-24 03:12:30 -05:00
Matthias Clasen
2a7b5d8229
accelgroup: Fix a buffer overrun
...
gtk_accelerator_parse_with_keycode can
overrun its buffer for certain inputs.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2325
2019-12-23 23:17:29 -05:00
Matthias Clasen
245546de61
Merge branch 'drop-GtkTreeViewPrivate' into 'master'
...
tree-view: Drop GtkTreeViewPrivate
See merge request GNOME/gtk!1240
2019-12-24 03:49:48 +00:00
Matthias Clasen
a3793ff137
Merge branch 'drop-gtk-tree-selection-private' into 'master'
...
tree-selection: Drop GtkTreeSelectionPrivate
See merge request GNOME/gtk!1256
2019-12-24 03:48:18 +00:00
Matthias Clasen
0a98817a6f
Merge branch 'wip/oholy/placesview-default-location' into 'master'
...
placesview: Always open default location after mounting
See merge request GNOME/gtk!1263
2019-12-24 03:47:15 +00:00
Matthias Clasen
c924b48a6c
builder-tool: Validate templates again
...
This wasn't working because it was expecting
some no-longer-existing error message.
2019-12-23 18:32:37 -05:00
Matthias Clasen
519ff576cd
colorchooser: Document actions
...
This is mainly a trial balloon for gtk-doc
support for this syntax.
See https://gitlab.gnome.org/GNOME/gtk-doc/merge_requests/30
2019-12-23 13:39:05 -05:00
Matthias Clasen
442f13ef6f
inspector: Give better advice
...
Provide the meson syntax for building a debug-enabled GLib.
2019-12-21 21:09:18 -05:00
Christoph Reiter
95aeadf36c
Merge branch 'ci-msys2-newer-pango' into 'master'
...
CI: Install a newer MSYS2 pango package; Don't allow failures again
Closes #2243
See merge request GNOME/gtk!1258
2019-12-19 17:59:40 +00:00
Ondrej Holy
267ea7552b
placesview: Always open default location after mounting
...
The default location (obtained over g_mount_get_default_location) is
opened after mounting volume, or when opening mounts from sidebar, but
not after mounting over "Connect to Server". Let's unify the behavior
and always open the default location.
https://gitlab.gnome.org/GNOME/nautilus/issues/1319
2019-12-19 17:28:35 +01:00
Yariv Barkan
0604924c20
gtkgesturerotate: Fix a memory leak
...
On touchpads gtk_gesture_get_sequences() was called without a
corresponding g_list_free(). The same was true for touchscreens
if due to some reason only a single sequence was found.
2019-12-18 23:03:19 +02:00
Christoph Reiter
8f8229dcd2
Fix various new mingw compiler warnings
...
These are the result of us missing CI for some time now and
MSYS2 having a newer GCC now I guess.
2019-12-18 09:25:06 +01:00
Peter Bloomfield
a5b5657e96
tree-selection: Drop GtkTreeSelectionPrivate
...
GtkTreeSelection is now private (since commit 79940b32
),
so it doesn't need an instance-private structure.
2019-12-16 20:54:23 -05:00
Peter Bloomfield
46d960ddfd
tree-view: Drop GtkTreeViewPrivate
...
GtkTreeView is now private, so it doesn't need an instance-private
structure.
2019-12-15 19:19:42 -05:00
Benjamin Otte
ed24f93fb9
popover: Remove unneeded vfunc
...
The vfunc is identical to the GtkWidget implementation it replaces. So
just keep using that one.
2019-12-15 21:07:54 +01:00
Benjamin Otte
c4043a8eef
treelistmodel: Improve docs
...
- Move into its own section
- Split GtkTreeListRow into its own document
Trees are weird with listmodels and they deserve their own treatment,
they shouldn't be mushed up with the rest of the list machinery.
2019-12-15 21:07:54 +01:00
Benjamin Otte
dff86c0e12
eventcontrollermotion: Add getters for the properties
...
... and use them.
Also, rename them from is/contains-pointer-focus to is/contains-pointer,
that's clear enough and not too long.
Finally, adapt the semantics of contains-pointer to mirror
GtkEventControllerKey::contains-focus. If is-pointer is set, so is
contains-pointer, they are not exclusive.
Which is what all users of this property wanted, too.
2019-12-15 21:07:54 +01:00
Matthias Clasen
47285c6642
builder: Improve type name mangling
...
When looking for the get_type function for GThemedIcon,
try both g_themed_icon_get_type and gthemed_icon_get_type
The former is what gio has, the latter is still supported
to avoid breaking gweather_location_get_type.
Update tests to cover this new case.
2019-12-13 14:21:44 -05:00
Matthias Clasen
e4fb4116fd
builder-tool: Don't try to find default boxed values
...
This doesn't work and yields an ugly, unnecessary
error message.
2019-12-13 14:21:44 -05:00
Matthias Clasen
6d3373cb2c
gtk-builder-tool: More helpful error messages
...
Include line numbers in the error messages we
report, so it is possible to find the error.
2019-12-13 14:21:44 -05:00
Matthias Clasen
9bbacd3e4c
Run gtk-builder-tool simplify over our ui files
...
This was done mainly to verify that the tool does not
make any unwarranted changes. The changes included here
are all cosmetic.
2019-12-12 18:37:39 -05:00
Matthias Clasen
050eb9ba73
Fix up GtkBuilderScope docs
...
They were not hooked into the document generation.
2019-12-12 18:18:49 -05:00
Matthias Clasen
4fa5f5497a
builder: Another small docs fix
2019-12-12 17:59:24 -05:00
Matthias Clasen
43c943e48a
Merge branch 'issue-179' into 'master'
...
Use a separate gesture for middle clicks on PlaceView rows
Closes #179
See merge request GNOME/gtk!1199
2019-12-12 22:53:36 +00:00
Matthias Clasen
d6dc5da6db
textbuffer: Minor doc fixes
...
Fix parameter name mismatches.
2019-12-12 17:31:13 -05:00
Matthias Clasen
12d787286e
builder: Minor doc fixes
...
Fix parameter name mismatches.
2019-12-12 17:30:36 -05:00
Matthias Clasen
c33a7670d0
Merge branch 'wip/otte/builder' into 'master'
...
More builder work
Closes #2267
See merge request GNOME/gtk!1230
2019-12-12 20:36:08 +00:00
Matthias Clasen
0eb2b382a2
Merge branch 'master-gitlab-HC-tooltip' into 'master'
...
Set HighContrast tooltip back to black text over white background
See merge request GNOME/gtk!1242
2019-12-12 19:18:06 +00:00
Benjamin Otte
5015730212
builder: Turn last dlsym() function into a scope API
...
Looking up a get_type function by its name is now also part of
GtkBuilderScope.
2019-12-12 19:39:36 +01:00
Benjamin Otte
f8a7f30a0d
builder: Add GtkBuilderScope
...
GtkBuilderScope is an interface that provides the scope that a builder
instance operates in.
It creates closures and resolves types. Language bindings are meant to
use this interface to customize the behavior of builder files, in
particular when instantiating templates.
A default implementation for C is provided via GtkBuilderCScope (to keep
with the awkward naming that glib uses for closures). It is derivable on
purpose so that languages or extensions that extend C can use it.
The reftest code in fact does derive GtkBuilderCScope for its own scope
implementation that implements looking up symbols in modules.
gtk-widget-factory was updated to use the new GtkBuilderCScope to add
its custom callback symbols.
So it does it different from gtk-demo, which uses the normal way of
exporting symbols for dlsym() and thereby makes the 2 demos test the 2
ways GtkBuilder uses for looking up symbols.
2019-12-12 19:39:23 +01:00