Matthias Clasen
e8079df420
mountoperation: Fix a crash
...
We only create the gesture when the dialog is needed,
so don't free it unconditionally.
2018-01-16 14:50:25 -05:00
Matthias Clasen
e0990b2311
Drop ::button-press/release event
...
We are no longer using these, and there are several gestures
that can be used instead. If you need to catch raw button events,
use the ::event signal.
2018-01-16 14:14:11 -05:00
Matthias Clasen
fb2df00f15
popover: Stop using ::button-press/release-event
...
Just use a generic ::event handler.
2018-01-16 14:14:10 -05:00
Matthias Clasen
f768ae4281
menushell: Stop using ::button-press/release-event
...
Merge the handlers into the existing handler for ::event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
e8dfbf35e8
menu: Remove stray references to 'button_press'
...
No code change, but this string was still used in
docs and comments.
2018-01-16 14:14:10 -05:00
Matthias Clasen
15e67e27ca
places sidebar: Stop using ::button-press/release-event
...
We'll use a generic ::event signal instead.
2018-01-16 14:14:10 -05:00
Matthias Clasen
64c3db931d
Drop ::motion-notify-event
...
We no longer emit this signal. You can use various gestures
and event controllers instead. If you need to catch raw
motion events, use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
f90659cde8
places sidebar: Stop using ::motion-notify-event
...
We can use the generic ::event signal here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
472f5e4b13
treeview: Stop using ::button-press-event
...
We can just use a gesture here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
8dcafc597c
recent chooser: Stop using ::button-press-event
...
We can just use a multipress gesture here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
ab283933be
mount operation: Stop using ::button-press-event
...
A multipress gesture does just fine here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
fa0f637268
entry completion: Drop another ::button-press-event handler
...
This one will be replaced by a generic ::event handler.
2018-01-16 14:14:10 -05:00
Matthias Clasen
4b613c2f6a
docs: Stop referring to legacy event signals
...
These are going away.
2018-01-16 14:14:10 -05:00
Matthias Clasen
a94d2826ae
entry completion: Stop using ::button-press-event
...
Just use the existing ::row-activated signal on the treeviews.
2018-01-16 14:14:10 -05:00
Matthias Clasen
1818e7bed2
places view: Stop using ::button-press-event
...
Instead, use a multi-press gesture in the row widget,
and emit ::popup-menu from there.
2018-01-16 14:14:10 -05:00
Matthias Clasen
270b6d3a84
file chooser: Use a multipress gesture
...
This replaces the use of ::button-press-event. There's two
issues with this commit:
1) We don't have a good way to do the equivalent of
gdk_event_triggers_context_menu with gestures
2) We have to defer to and idle to avoid ordering
issues with the treeviews own gestures
2018-01-16 14:14:10 -05:00
Matthias Clasen
c8a6a1138b
Revert "file chooser: Allow activating without double-click"
...
This reverts commit fb0a13b7f0
.
It is getting in the way of gesture conversion, and didn't
really make anybody happy anyway.
2018-01-16 14:14:10 -05:00
Matthias Clasen
f042d7a9a8
app chooser: Use a gesture
...
Instead of connecting to ::button-press-event, use
a multipress gesture here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
9ba5f053d9
Drop ::focus-in/out-event
...
These signals are no longer used in GTK+.
If you need to catch focus events, use the ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
ad4287e338
treeview: Stop using ::focus-out-event
...
We can just use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
7ae240199b
file chooser entry: Stop using ::focus-out-event
...
Just use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
5cb1c606bb
spin button: Stop using ::focus-out-event
...
Just use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
4f3065a5e8
calendar: Stop using ::focus-out-event
...
Use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
e733aa43cf
color editor: stop using ::focus-out-event
...
Again, the has-focus property is sufficient.
2018-01-16 14:14:10 -05:00
Matthias Clasen
5d57f0be8a
text cell renderer: Stop using ::focus-out-event
...
The has-focus property works fine here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
7af2f73608
spin cell renderer: Stop using ::focus-out-event
...
The has-focus property works fine here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
04adcff624
combo cell renderer: Stop using ::focus-out-event
...
The has-focus property works fine here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
e3e00a2673
popover: Stop using ::focus-in/out-event
...
We can use the is-active property of the window instead.
2018-01-16 14:14:10 -05:00
Matthias Clasen
b12371e1b0
application: Stop using ::focus-in-event
...
We are really interested in the active window, so use
that property directly.
2018-01-16 14:14:10 -05:00
Matthias Clasen
7277d657d9
window: Stop using ::focus-in/out-event
...
We can just use the generic ::event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
327ec24e51
text view: Stop using ::focus-in/out-event
...
We can just use the generic ::event here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
253ac15928
entry completion: Stop using ::focus-out-event
...
We can just use ::event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
8c6c2be316
entry: Stop using ::focus-in/out-event
...
We can just use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
144448d18b
a11y: Stop using ::focus-in/out-event
...
We can just use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
5759bc59c9
Drop gtk_widget_hide_on_delete
...
This function is misnamed - it is only ever relevant for
windows. And with the ::hide-on-delete property , it is
no longer necessary to use the signal for this simple case.
2018-01-16 14:14:10 -05:00
Matthias Clasen
2b59917a9d
Drop ::event-after
...
This signal is not used in GTK+, and we are reducing the
amount of widget signals devoted to events in favor of
event controllers.
2018-01-16 14:14:10 -05:00
Matthias Clasen
1c2e09116a
Drop ::grab-broken-event
...
This signal is no longer used in GTK+. Grab broken events
can be handled with the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
0583b80d1b
button: Stop using ::grab-broken-event
...
The event-specific signals are going away. Just use ::event here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
4bbda548b7
menushell: Stop using ::grab-broken
...
The event-specific signals are going away. Just use ::event here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
fa07fe2124
notebook: some cleanup
2018-01-16 14:14:10 -05:00
Matthias Clasen
af8bf498e9
notebook: Use a motion event controller
...
This lets us avoid the ::motion-notify-event handler.
2018-01-16 14:14:10 -05:00
Matthias Clasen
7046463b88
textview: Use a motion event controller
...
This lets us replace the ::motion-notify-event handler.
2018-01-16 14:14:10 -05:00
Matthias Clasen
f594807c0a
Drop ::enter/leave-notify-event
...
These signals are no longer used in GTK+ and have a (not quite
perfect yet) replacement with GtkEventControllerMotion.
If you need to catch the raw events, the generic ::event
signal still works.
2018-01-16 14:14:10 -05:00
Matthias Clasen
06605d54f2
menu: Use a motion event controller
...
This lets us replace the ::enter/leave-notify-event handlers.
Not that there is a FIXME here - we currently can't get the
crossing mode from the event controller, so we have to fall
back to gtk_get_current_event().
2018-01-16 14:14:10 -05:00
Matthias Clasen
6acf276a1a
menuitem: Use a motion event controller
...
This lets us replace the ::enter/leave-notify-event handlers.
Not that there is a FIXME here - we currently can't get the
crossing mode from the event controller, so we have to fall
back to gtk_get_current_event().
2018-01-16 14:14:10 -05:00
Matthias Clasen
118424bd93
iconview: Use a motion event controller
...
This can replace ::motion-notify-event and ::leave-notify-event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
ab4f4fb045
scrolled window: Use a motion event controller
...
This lets use replace one of the last uses of ::leave-notify-event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
9ceafd7c38
entry completion: Drop initial selection avoidance
...
This is a minor thing, and it is hard to recreate
with event controllers, so drop it for now.
2018-01-16 14:14:10 -05:00
Matthias Clasen
a2a80f8a15
treeview: Use a motion event controller
...
This replaces handlers for ::enter/leave/motion-notify-event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
cf9074a2e9
Add x/y to GtkEventControllerMotion::enter
...
We have this information available in enter events,
and having it in the controller signal as well makes
porting easier.
Update existing users.
2018-01-16 14:14:10 -05:00
Matthias Clasen
a9d468a4c8
Drop ::configure-event
...
This signal is unused in GTK+ and configure events are handled
internally by GtkWindow.
If you need to catch configure events, the generic ::event
signal still works.
2018-01-16 14:14:10 -05:00
Matthias Clasen
59572e5fcf
window: Stop using ::configure-event
...
We already have a generic ::event handler that we
can just press into service for this.
2018-01-16 14:14:10 -05:00
Matthias Clasen
fa885f437c
Drop ::touch-event
...
This signal is not used in GTK+, and has a suitable
replacement with GtkGesture and its subclasses.
If you need to catch the raw touch events, the generic ::event
signal still works, too.
2018-01-16 14:14:10 -05:00
Matthias Clasen
47712a826b
Drop ::scroll-event
...
This signal is not used in GTK+, and has a suitable
replacement with GtkEventControllerScroll.
If you need to catch these events, the generic ::event
signal still works, too.
2018-01-16 14:14:10 -05:00
Matthias Clasen
e93c2517e6
Drop ::proximity-in-event and ::proximity-out-event
...
These are unused in GTK+, and are not very common.
If you need to catch these events, the generic ::event
signal still works.
2018-01-16 14:14:09 -05:00
Matthias Clasen
fd2a3b602f
Drop ::map-event and ::unmap-event
...
These are unused in GTK+, and are not very common.
If you need to catch these events, the generic ::event
signal still works.
2018-01-16 14:14:09 -05:00
Matthias Clasen
ab53142c0f
window: Stop using ::map-event
...
Use ::event here, since we want to drop the event-specific
signals, and we already have a handler for the generic signal.
2018-01-16 14:14:09 -05:00
Matthias Clasen
1e0ae936fe
widget: Stop using ::map-event
...
Use ::event here, since we want to drop the event-specific
signals.
2018-01-16 14:14:09 -05:00
Matthias Clasen
7b581ca096
Drop GtkWidget::destroy-event
...
This signal is unused in GTK+, and is documented as
'hard to ever get', so there's no good reason for
keeping it.
2018-01-16 14:14:09 -05:00
Matthias Clasen
2b52b4be5d
Drop GtkWidget::delete-event
...
Nobody is using this signal anymore, and ::delete is there
for the few places where it is needed.
2018-01-16 14:14:09 -05:00
Matthias Clasen
a739ee6905
Replace GtkWidget::delete-event by GtkWindow::close-request
...
The event is not useful at all, so we are better off
with a signal that doesn't have it, and it is only
relevant on toplevel windows, so we don't need it on
GtkWidget.
With this commit, delete events no longer go through the
::event, ::delete-event, ::event-after widget signals,
but just cause the ::close-request signal on GtkWindow to be
emitted.
2018-01-16 14:14:09 -05:00
Matthias Clasen
76fea5c5fa
treeview: Don't handle ::delete-event
...
I don't think there is a way to get a delete event
on this popup - there's no window decorations, no close
button, etc. So no need to handle ::delete-event.
2018-01-16 14:14:09 -05:00
Matthias Clasen
7e491fd3fc
font chooser: Stop using ::scroll-event
...
We have an event controller for this purpose now.
2018-01-16 14:14:09 -05:00
Matthias Clasen
d2edcf489b
treeview: Use a scroll event controller
...
This is the recommended way to deal with scroll events
now.
2018-01-16 14:14:09 -05:00
Matthias Clasen
4923da3550
Drop gtk_true and gtk_false
...
These functions are entirely trivial, their documentation
is much longer than their implementation, and it contains
an example that is annotated as "don't do this"...
2018-01-16 14:14:09 -05:00
Matthias Clasen
75271c44c2
inspector: Stop using ::delete-event signal
...
We can just use GtkWindow::hide-on-close instead.
2018-01-16 14:14:09 -05:00
Matthias Clasen
e7bd666711
treeview: Stop using gtk_true
2018-01-16 14:14:09 -05:00
Matthias Clasen
c4513a6737
dialog: Stop using the ::delete-event signal
...
We can achieve the desired result with a class handler
and the ::hide-on-close property.
2018-01-16 14:14:09 -05:00
Matthias Clasen
d6e92cd984
file chooser native: Stop connecting to ::delete-event
...
We can just use GtkWindow::hide-on-close.
2018-01-16 14:14:09 -05:00
Matthias Clasen
d0f071aae9
file chooser button: Stop connecting to ::delete-event
...
We can just use GtkWindow::hide-on-close.
2018-01-16 14:14:09 -05:00
Matthias Clasen
a1b6bf19c1
applicationwindow: Stop connecting to ::delete-event
...
We can just use GtkWindow::hide-on-close.
2018-01-16 14:14:09 -05:00
Matthias Clasen
59878f281f
about dialog: Stop connecting to ::delete-event
...
We can just use GtkWindow::hide-on-close.
2018-01-16 14:14:09 -05:00
Matthias Clasen
c86e8d0e60
color button: Stop connecting to ::delete-event
...
We can just use GtkWindow::hide-on-close.
2018-01-16 14:14:09 -05:00
Matthias Clasen
b919c3348f
font button: Use GtkWindow::hide-on-close
...
Instead of the ::delete-event signal.
2018-01-16 14:14:09 -05:00
Matthias Clasen
c04f192113
window: Add a hide-on-close property
...
This lets us avoid ::delete-event signal handlers for just
this purpose.
2018-01-16 14:14:09 -05:00
Matthias Clasen
370d666406
inspector: Avoid a critical
...
I forgot to initialized the text field when I added
it back.
2018-01-15 08:01:54 -05:00
Matthias Clasen
978c597e94
inspector: Some logging support
...
Add a way to toggle debug output on and off
from the inspector. For now, we don't add a
log viewer here, since that has the risk of
deadlock until we've the logging completely
separated by display, and also requires us
to install a log writer function, which
libraries are not supposed to do.
2018-01-14 17:05:04 -05:00
Matthias Clasen
f9100719bd
inspector: Turn off gsk debugging
...
We don't want debug spew from the renderer that
is used for the inspector window, so turn it off.
2018-01-14 17:05:04 -05:00
Matthias Clasen
c3215de005
gtk Use per-renderer flags for node names
...
We are moving to per-renderer flags, so lets check them here.
2018-01-14 17:05:04 -05:00
Matthias Clasen
1d2606dc94
Drop the cairo-recording debug flag
...
It is not very useful. The cairo-image option on the
other hand is has been useful in tracking down problems
in the past, so we'll keep it.
2018-01-14 17:05:04 -05:00
Matthias Clasen
08dc2cd6a8
Drop the gl-always debug option
...
This doesn't seem very useful.
2018-01-14 17:05:04 -05:00
Matthias Clasen
e151058dff
Make gdk logging per-display
...
As far as possible, use per-display debug flags.
This will minimize the debug spew that we get from
the inspector if it is running on a separate display.
2018-01-14 17:05:04 -05:00
Matthias Clasen
c5fc841285
gdk: Reorganize env vars
...
Drop GDK_GL, GDK_VULKAN and GDK_RENDERING_MODE.
Merge the useful bits into GDK_DEBUG.
Drop unused debug flags (CURSOR).
2018-01-14 17:05:04 -05:00
Matthias Clasen
af7f695068
Make geometry logging per-display
...
Use the new macro to do this.
2018-01-14 17:05:04 -05:00
Matthias Clasen
461d05f643
icon theme: Make logging per-display
...
As far as possible, for now. This needs some more
work to cover all locations.
2018-01-14 17:05:04 -05:00
Matthias Clasen
22e59ecd28
gtk: add a per-display log macro
...
This makes the conversion easier.
2018-01-14 17:05:04 -05:00
Daniel Boles
db6127a118
HeaderBar: Explain use in conjunction w/ GtkWindow
...
After hinting how good GtkHeaderBar is for GtkWindow, let’s link to
the latter and indicate how users can make the two work together.
2018-01-13 20:06:20 +00:00
Daniel Boles
e0f69353bb
Window: Mention GtkHeaderBar in set_titlebar() doc
...
This is the typical thing passed here and what most users want, so we
should mention it here, rather than requiring users to figure it out.
2018-01-13 20:06:20 +00:00
Daniel Boles
339d355dda
Window: Clarify resize() doc about titlebar widget
...
Clarify the reference to HeaderBar, as it applies to any custom title
widget; HeaderBar is only the most common one used. Also, fix a typo.
2018-01-13 20:06:20 +00:00
Timm Bäder
f8d235ecc2
tooltip: Fix tooltip positions
...
Since gtk_widget_get_allocation doesn't return x/y values relative to
the GdkWindow anymore, we need to manually translate the widget
coordinates here.
2018-01-13 10:39:16 +01:00
Timm Bäder
e64028b41d
tooltip: Remove some unused members
2018-01-13 10:23:01 +01:00
Timm Bäder
256bf3bf25
tooltip: Remove some unused includes
2018-01-13 10:23:01 +01:00
Timm Bäder
fc711040d1
tooltip: Remove custom picking code
...
Just use gtk_widget_pick here for now. This also makes tooltips of
widgets work which are not inside a container.
2018-01-13 10:23:01 +01:00
Timm Bäder
aa17c20951
window: Remove a resize grip mention from the docs
2018-01-13 10:23:01 +01:00
Timm Bäder
32166a9595
adwaita: Regenerate proper CSS
2018-01-13 07:39:54 +01:00
Timm Bäder
d8f6b12685
tooltip: Remove excessive padding
...
tooltips support padding now, just like everthing else.
2018-01-12 22:34:22 +01:00
Timm Bäder
c910a955d1
window: Fix tooltip allocation
...
Using get_preferred_size here does not work since it computes the
minimum height for the minimum width, but we want to know the minimum
height for the current width.
2018-01-12 22:34:22 +01:00
Timm Bäder
846a6e8157
tooltip: Fold a function into its only caller
2018-01-12 22:34:22 +01:00
Timm Bäder
abc0f67cf6
main: Set event user data earlier
...
event_widget is not modified anymore after the assignment from
handle_pointing event and we need the event's user data set for the
_gtk_window_check_handle_wm_event call.
2018-01-12 22:34:22 +01:00
Matthias Clasen
0f76228c15
docs: Mention textures in the GtkImage docs
...
This is now the preferred way to load images.
2018-01-10 16:43:17 -05:00
Timm Bäder
185525a58d
scrolledwindow: Remove workarounds
...
Instead of making sure here that the scrollbars are the last children,
just add the bin child as first one and keep the scrollbars last.
2018-01-10 16:36:59 +01:00
Timm Bäder
6652beae65
magnifier: gtk_snapshot_finish may return NULL
2018-01-10 16:36:59 +01:00
Timm Bäder
60d3378dd1
entry: Fix text clipping
...
Clipping the text to the entire widget allocation is wrong if there are
icons involved.
2018-01-10 11:02:10 +01:00
Timm Bäder
6235b12ca4
entry: Fix get_text_allocation
...
These should be reported in GtkEntry coordinates, so relative to the
entry's origin. This fixes entrys with top/bottom padding applied.
2018-01-10 10:49:13 +01:00
Timm Bäder
77769a52b3
adwaita: Add some spacing to the scale value
...
So the slider does not overlap the value label. Since the value label is
allocated at the widget edge in gtk3, the correct fix here would
probably be to remove the 12px padding we apply to the entire scale and
instead apply it only to the trough.
2018-01-10 10:11:31 +01:00
Timm Bäder
15b3f33965
adwaita: Fix scale styling for latest changes
2018-01-10 09:29:45 +01:00
Timm Bäder
b9531e3a7c
scale: Allocate marks widget along the trough
2018-01-10 09:29:05 +01:00
Timm Bäder
31974e02ca
renderbackground: Avoid excess css value lookups
...
We iterate over all background layers twice, so only lookup blend mode
vlaues once.
2018-01-10 08:46:22 +01:00
Timm Bäder
5e39f3c23b
renderbackground: Add some constness
2018-01-10 08:46:22 +01:00
Timm Bäder
c9e6fcd5fa
renderbackground: Pull out a gdk_rgba_is_clear check
...
We only call snapshot_color once, and this way it's clearer that nothing
will happen for a clear color from the caller side.
2018-01-10 08:46:22 +01:00
Timm Bäder
1a8b9e9180
widget: Refine docs a bit
2018-01-10 08:46:22 +01:00
Matthias Clasen
4dbae1d4bf
Drop unused GDK_GL values
...
And document the existing ones.
2018-01-10 00:02:23 -05:00
Matthias Clasen
124a7969eb
Drop another unused debug value
...
GTK_DEBUG_MULTIHEAD is unused as well.
2018-01-09 23:07:08 -05:00
Matthias Clasen
92e6557015
Remove an unused debug value
...
GTK_DEBUG_MISC is not used at all. Drop it.
2018-01-09 22:56:40 -05:00
Matthias Clasen
0fe6d76ab6
Make size request warnings more useful
...
Print the css name of the widget in question, so we have
a chance of knowing that this is caused by the marks, not
by the slider.
2018-01-09 17:48:51 -05:00
Matthias Clasen
4908b5ef54
Fix file chooser
...
Now that the places sidebar is private, we need to
ensure the type is known.
2018-01-09 17:20:23 -05:00
Matthias Clasen
9a3b61ec9d
Drop GtkPlacesSidebar from public API
...
This is a bit of filechooser internals that gets shared with
nautilus, which is fine, but it shouldn't be part of our
public API. There are no other users than nautilus.
2018-01-08 14:38:55 -05:00
Timm Bäder
8f3cb2658a
inspector: Stop adding event controllers to the object tree
...
There's a dedicated "Gesture" page for all the gestures.
2018-01-08 19:23:06 +01:00
Timm Bäder
0aca394a96
adwaita: Uncomment accidentally commented lines
...
The result looks wrong but the css looks right.
2018-01-08 17:44:37 +01:00
Timm Bäder
9a68c068a8
treeview: Stop rendering focus outline
...
This is done on a widget-level via css these days.
2018-01-08 17:44:37 +01:00
Timm Bäder
16cf4637e9
widget: Fix css padding debug drawing
2018-01-08 17:44:37 +01:00
Matthias Clasen
5ce2d77691
toolbutton: Fix off-center icons
...
When the toolbar style is both-horiz, and the item
is not important, we were not centering the icon in the
same way as in gtk3. The reason is that we overlooked
the expand child property being set to TRUE in this case.
2018-01-07 12:44:35 -05:00
Daniel Boles
b89bf98731
ScrolledWindow: add() before remove() in snippet
...
We can't remove() a child widget that wasn't already add()ed, of course.
2018-01-07 16:47:24 +00:00
Ting-Wei Lan
14b181ebd4
build: Use pkg-config to find iso-codes
...
Instead of hard-coding the path of iso-codes, we can get the prefix with
pkg-config. We still fallback to /usr when it is not available.
https://bugzilla.gnome.org/show_bug.cgi?id=792282
2018-01-07 14:53:41 +08:00
Rico Tzschichholz
3c38ebb906
filechooser: Add missing array annotations to add_choice()
2018-01-06 09:34:44 +01:00
Rico Tzschichholz
6e6e6d774f
iconview: Prevent ownership transfer of cell out-param in get_item_at_pos()
2018-01-06 09:27:44 +01:00
Matthias Clasen
258e504c6a
Implement equal for GtkCssImageUrl
...
This should in theory speed some things up if the same
image is used in multiple places.
2018-01-05 17:15:44 -05:00
Matthias Clasen
36e09f3ad9
label: Properly handle multi-line selections
...
They were rendered as a single rectangle, which is not
what is expected. Same for multi-line links.
2018-01-05 15:54:49 -05:00
Matthias Clasen
c8770b3c63
file button: Don't leak rows
...
The file chooser button manually manages the memory of
data in its model, so it needs to explicitly free the
rows.
2018-01-05 11:50:22 -05:00
Matthias Clasen
98da7730ea
label: Plug a memory leak
...
We were sometimes leaking the content serializer object.
2018-01-04 22:24:43 -05:00
Matthias Clasen
3dd3ae1b9d
font chooser: Plug a memory leak
...
We were leaking the hb_font object.
2018-01-04 22:24:21 -05:00
Matthias Clasen
e41e8c4c53
font chooser: Fix a memory leak
...
We were leaking the delayed font descriptions.
2018-01-04 21:19:28 -05:00
Timm Bäder
7479e6cb50
notebook: Fix wrong tab widgets allocation
...
Since we allocate the tab widgets on demand, we have to queue an extra
resize here.
2018-01-04 21:41:35 +01:00
Timm Bäder
85fa396176
widget: Avoid casting event coordinates to int in contains()
2018-01-04 21:41:35 +01:00
Matthias Clasen
8a5b6d422f
fontchooser: fix feature formatting
...
There was a " missing, causing some features to be missed.
2018-01-04 08:39:18 -05:00
Timm Bäder
33162eee1a
window: Fix an event widget/target mixup
...
This makes dragging inside a GtkEntry in the window decoration work
again.
2018-01-04 13:16:24 +01:00
Timm Bäder
a89e88fc3e
widget: Ignore non-gestures in _gtk_widget_consumes_motion
...
priv->event_controllers is a list of all event controllers, which aren't
all GtkGesture subclasses.
2018-01-04 13:15:15 +01:00
Timm Bäder
62ccf8743a
filechooser: Manage spinner state
...
So we don't get an allocate every frame.
2018-01-04 12:20:27 +01:00
Timm Bäder
f55be762e2
recorder: Fix a button tooltip
...
This button will save the selected node to a file, not all recorded
frames.
2018-01-04 12:20:27 +01:00
Matthias Clasen
a79f950dfe
font chooser: Manage tweak button sensitivity
...
When we don't have any font features or variation axes,
there is no point in going to the tweak page, so disable
the action in this case.
2018-01-03 14:06:00 -05:00
Matthias Clasen
34b4de09fc
font chooser dialog: Improve sensitivity handling
...
We should not tie the sensitivity of the select button
to the tweak action, since there may be fonts which are
selectable, but not tweakable.
Instead, enable the select button when a font is selected,
as it should be.
2018-01-03 14:05:33 -05:00
Matthias Clasen
7687393583
font chooser: Don't set hardcoded default features
...
We should rely on harfbuzz to select the right defaults.
2018-01-03 13:41:20 -05:00
Matthias Clasen
4cc68a97a8
font chooser: Support font variations
...
Add sliders for the available axes to the tweak page.
2018-01-03 13:28:33 -05:00
Matthias Clasen
379970082a
font button: Take variations into account
...
We need to apply variations too, when we are using
the font to render the button label.
2018-01-03 13:07:55 -05:00
Matthias Clasen
fb51e438e9
Implement font-variation-settings
...
This is a CSS font level 4 property that lets us
use font variation settings from css.
2018-01-03 13:07:55 -05:00
Matthias Clasen
894a0c0ff4
font chooser: Add properties for features and language
...
These can't be returned as part of the font description,
so we need new api for them. For now, this is just readonly
properties. Maybe these should be writable too, eventually.
2018-01-03 12:18:18 -05:00
Matthias Clasen
ade33c6e14
Add font features on the tweak page
2018-01-03 12:18:18 -05:00
Matthias Clasen
15f8b2d0ae
font chooser: Add a tweak page
...
Add a button the dialog's header bar that lets us
switch to a second page where we can customize
the selected font.
Make the font chooser widget export an action that the
dialog can use for the button. This has some advantages:
- we can export not just the toggle state, but also enabled
- we can reuse the same enabled state to make the select
button insensitive when no font is selected
To determine whether a font is selected, listen to changes
of the list selection. And ensure that the font chooser is
in an initial state when mapped, even if we close the dialog
from the tweak page.
2018-01-03 12:18:18 -05:00
Matthias Clasen
70bae02612
font button: Remove show-font and show-size
...
These are now handled in a more systematic fashion
using GtkFontChooserLevel.
2018-01-03 12:18:18 -05:00
Matthias Clasen
f0526359d1
font chooser: introduce font chooser levels
...
This is a more systematic approach to reducing the
level of detail in the font chooser.
2018-01-03 12:18:18 -05:00
Matthias Clasen
78f9193d7e
font chooser: Small revision of the UI
...
Show only the font names in the list, in their own
font, in order to make the list less noisy.
2018-01-03 12:18:18 -05:00
Timm Bäder
3f68475b6f
Make a few more code samples compile
2018-01-03 17:11:32 +01:00
Timm Bäder
5cd138f0f2
entry: Remove some questionable code examples
2018-01-03 17:11:32 +01:00
Timm Bäder
614bcefa21
widget: Make all code snippets compile
2018-01-03 17:11:32 +01:00
Timm Bäder
cba24360b1
Move geometry management docs do GtkWidget
...
Both GtkWidget and GtkContainer had similar docs regarding hfw/wfh
geometry management. Move these just to GtkWidget. Also make sure the
examples compile, port everything from gtk_preferred_* to measure and
replace some occurrences of "container" with "widget" where container
was just used to refer to a widget with child widgets.
2018-01-03 17:11:32 +01:00
Timm Bäder
e8376f5c01
liststore: Make a code snippet compile
2018-01-03 17:11:32 +01:00
Timm Bäder
3744bbdc27
searchbar: Make a code snippet compile
2018-01-03 17:11:32 +01:00
Timm Bäder
cf9942e3cc
menuitem: Make a code snippet compile
2018-01-03 17:11:32 +01:00
Timm Bäder
3d9421509c
expander: Make a code snippet compile
2018-01-03 17:11:32 +01:00
Timm Bäder
9f86cb2b4e
treeviewcolumn: Make a code snippet compile
2018-01-03 17:11:32 +01:00
Timm Bäder
1c267398ef
notebook: Make a code snippet compile
2018-01-03 17:11:32 +01:00
Timm Bäder
4a999cbd1f
scrolledwindow: Fix code sample compilation
2018-01-03 17:11:32 +01:00
Matthias Clasen
a25357007e
Fix pointer obscuring in text view
...
The code for hiding the mouse cursor until the next motion
event was not working, probably due to a typo here.
2018-01-02 21:52:43 -05:00
Arnaud Bonatti
f1e3b503de
Make GtkListBoxRow GtkActionable.
...
https://bugzilla.gnome.org/show_bug.cgi?id=741633
2018-01-02 17:56:10 -08:00
Matthias Clasen
9f94736c92
Remove selection-handling leftovers
...
The selection_get and selection_received vfuncs are
no longer used, remove them.
2018-01-02 18:14:14 -05:00
Matthias Clasen
12e4f4256d
Drop an unused enum value
...
We haven't had a GtkWindow::frame-event since the
linux-fb backends demise.
2018-01-02 18:14:13 -05:00
Matthias Clasen
5f608a1d07
Revert "inspector: Stop using GtkWidget::event"
...
This reverts commit 1268440c35
.
Turns out we'll keep ::event, so this was misguided.
2018-01-02 18:14:08 -05:00
Matthias Clasen
750341414d
Revert "treeviewcolumn: Stop using GtkWidget::event"
...
This reverts commit da74314779
.
Turns out we'll keep ::event, so this was misguided.
2018-01-02 18:14:04 -05:00
Matthias Clasen
506b436f09
Revert "text handler: Stop using GtkWidget::event"
...
This reverts commit 74f563b501
.
Turns out we'll keep ::event, so this was misguided.
2018-01-02 18:13:34 -05:00
Matthias Clasen
361a3885b5
spinner cell: Avoid a crash
...
The icon helper is not used, so no point in crashing
while trying to destroy it.
2018-01-02 18:05:30 -05:00
Matthias Clasen
d072201b12
docs: Don't mention non-longer-existing signals
...
The ::window-state-event signal no longer exists.
2018-01-02 18:05:19 -05:00
Timm Bäder
355b883f32
stack-allocate GtkCssLookup instances
2018-01-02 08:36:10 +01:00
Timm Bäder
9ef700b161
css parser: Reuse one GString
...
Instead of creating a new one for every ident, name and string, just
create one GString and reuse it. This means the GString we keep around
will grow to the maximum size of any ident, name or string we parse,
which is still not terribly large.
2018-01-02 08:10:06 +01:00
Daniel Boles
ab0edd1091
themes: missing specificity bump on expander arrow
...
Commit 4ee02725b4
made the :hover apply to
the title node, not the arrow node, but the selectors it added were not
caught by the recent commits fixing the specificity of title > arrow.
2018-01-01 21:22:23 +00:00
Daniel Boles
3bcbf4cf4e
themes: Regenerate CSS to reflect recent commits
...
a lot of them, in this case
2018-01-01 19:53:43 +00:00
Daniel Boles
4878eea06b
HighContrast: Avoid expander↔combobox interference
...
as per commit 4241c4bdbd
2018-01-01 18:54:13 +00:00
Matthias Clasen
17bad98084
emoji: Accept unpaired releases for variations
...
This enables a single long-press-move-release gesture
for picking a variation. This is not perfect yet: We
don't get hover in this case.
2017-12-30 23:24:22 -05:00
Matthias Clasen
72c9853999
list, flow box: Make unpaired releases opt-in
...
We don't want a pointer that is moved off a scrollbar
to trigger a row when it gets released. To avoid this,
require an explicit opt-in to handling unpaired-releases.
2017-12-30 23:23:16 -05:00
Matthias Clasen
1be0b6d2d5
dnd: Drop docs that are no longer relevant
...
We no longer take an event as argument, so no
need to explain how to obtain a suitable event.
2017-12-30 22:46:28 -05:00
Matthias Clasen
74f563b501
text handler: Stop using GtkWidget::event
...
This signal is going away.
2017-12-30 22:38:14 -05:00
Matthias Clasen
da74314779
treeviewcolumn: Stop using GtkWidget::event
...
This signal is going away.
2017-12-30 22:27:54 -05:00
Matthias Clasen
1268440c35
inspector: Stop using GtkWidget::event
...
This signal is going away.
2017-12-30 22:13:45 -05:00
Matthias Clasen
7d659b21e6
Drop deprecated text view layers
...
These have been marked as deprecated, so lets drop them.
2017-12-29 13:13:36 -05:00
Arnaud Rebillout
25523e60c3
gtk: remove non-breaking space, probably there by mistake
...
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>
https://bugzilla.gnome.org/show_bug.cgi?id=791710
2017-12-29 12:51:31 -05:00
Timm Bäder
c1573a1fda
window: Avoid a set-but-not-used warning
2017-12-29 08:59:53 +01:00
Timm Bäder
a61eecc22e
snapshot: Don't create clip nodes with 0 width or height
2017-12-28 16:48:35 +01:00
Matthias Clasen
4241c4bdbd
Adwaita: Avoid expander<>combobox interference
...
Putting a combobox in an expander was causing the combo arrow
to go sideways. Increase the specificity with which we address
the expander arrow to avoid that.
2017-12-28 08:40:39 -05:00
Matthias Clasen
e90787d975
fontchooser: Add global keynav
...
Starting to type should focus the search entry and start
a search.
2017-12-27 17:29:24 -05:00
Matthias Clasen
06ad134876
Add an unrealize function to GtkLabel
...
We need to drpo the primary clipboard when the label
is getting unrealized while holding it. This fixes
a crash in the accessibility-dump test.
2017-12-26 23:33:39 -05:00
Matthias Clasen
c176d0c3d8
Simplify ui files
...
Run gtk3-builder-tool simplify over all our ui files.
2017-12-26 23:12:37 -05:00
Matthias Clasen
8c10849094
Avoid excess notification for GdkEventControllerScroll::flags
...
We have a test that checks this, and it is the right thing to do.
2017-12-26 20:06:06 -05:00
Matthias Clasen
8d9414c228
Avoid excess notification for GdkCellRendererPixbuf::icon-size
...
We have a test that checks this, and it is right thing to do.
2017-12-26 20:06:06 -05:00
Matthias Clasen
f307fa99a5
Drop gratitious use of GdkPoint
...
This is the only use of this undocumented struct,
and it does not make this code any better. Just drop it.
2017-12-26 13:00:27 -05:00
Matthias Clasen
d04f66eb52
Add GtkIconSize back to the docs
...
And document how it works now.
2017-12-26 08:40:43 -05:00
Matthias Clasen
b379ca3e02
check button: Fix inconsistent state
...
This has been broken since the inconsistent state
was moved here in 2aea8dfee9
.
2017-12-25 11:36:39 -05:00
Emmanuele Bassi
f27dd8834b
docs: Add missing signal parameter
...
The `flags` parameter is missing, and the introspection scanner is
complaining about it.
2017-12-21 19:00:28 +00:00
Emmanuele Bassi
18a56cd795
build: Ensure we introspect the print operation sources
...
The documentation and annotations for some of the print API is defined
in platform-specific source files, so we need to ensure we're passing
those files to the introspection scanner in order to avoid warnings, and
to get the appropriate introspected API.
2017-12-21 18:57:25 +00:00
Timm Bäder
358c139a43
gl renderer: Rework once more
...
Last time, I swear.
2017-12-21 19:12:30 +01:00
Timm Bäder
b488329104
GskRenderer: Remove viewport property
2017-12-21 18:25:52 +01:00
Timm Bäder
19871cfd68
snapshot: Add & use API for linear gradient nodes
...
This way, we can also clip the created node bounds to the current clip
of the GtkSnapshot. This works as long as we don't modify the start and
end points, and happens all the time while rendering.
2017-12-21 18:25:52 +01:00
Timm Bäder
d9f1620b2f
snapshot: Directly clip color nodes
...
Clipping a color node is trivial so we do it here directly since that
might later save the entire clip node as well as freeing the fragment
shaders from coloring lots of pixels that will be clipped away.
2017-12-21 18:25:52 +01:00
Timm Bäder
8107b1a2dd
snapshot: Fix typo
2017-12-21 18:25:51 +01:00
Matthias Clasen
1c3f343baf
Remove font-name leftovers
...
There were still a few places where the font-name
property was used internally.
2017-12-21 12:18:53 -05:00
Matthias Clasen
559a2bf033
Add a missing include
2017-12-21 12:18:10 -05:00
Matthias Clasen
6ff3222cbd
font button: Drop the font-name property
...
We already have the GtkFontChooser::font property
which serves the same purpose, so get rid of the
duplication.
2017-12-21 11:10:44 -05:00
Matthias Clasen
8581345acc
Remove debug spew
2017-12-21 08:04:26 -05:00
Matthias Clasen
495d00e925
Fix a mis-merge
2017-12-20 10:36:25 -05:00
Matthias Clasen
22f9562928
Implement font-feature-settings
...
This is a missing part of the CSS font level 3 module.
2017-12-20 10:31:30 -05:00
Matthias Clasen
6042b82964
Update the docs for GtkCssChange
...
The docs were out of sync with the flags we actually have.
2017-12-20 08:46:03 -05:00
Matthias Clasen
5478bd59bf
Fix a crash introduced in the previous commit
...
The signatures of row-inserted and row-deleted are not
identical, so we need to be a bit more careful here.
2017-12-19 14:17:55 -05:00
Matthias Clasen
1b05474979
font chooser: Simplify some code
...
Instead of separate handlers, just keep a single
handler for both row-inserted and row-deleted.
Slightly less work that way.
2017-12-19 12:10:47 -05:00
Matthias Clasen
e5154547f8
font chooser: Stop listening to style-updated
...
The only time a style-updated indicates we need
to reload fonts is when it is synthesized by GtkSettings
in response to a fontconfig timestamp change, but
we are listening to those already, anyway.
2017-12-19 11:45:56 -05:00
Timm Bäder
fcbbaae63c
window: Make sure an event has a display
...
This fixes a crash happening later on when something tries to access the
event's display.
2017-12-19 07:39:29 +01:00
Matthias Clasen
675a4111e9
emoji: Skip overly wide fallback rendering
...
Some emoji fonts (such as Emoji One), render Emoji sequences
such as some of the family variations using multiple individual
glyphs. This rendering is too wide and breaks our grid layout.
Therefore, we will just skip any sequence whose rendering is
more than twice as wide as a simple smiley.
2017-12-17 22:11:24 -05:00
Matthias Clasen
22269902ed
Avoid calling unsetenv too late
...
Stash the DESKTOP_AUTOSTART_ID env var in a constructor,
before any threads have been created.
https://bugzilla.gnome.org/show_bug.cgi?id=790963
2017-12-17 17:32:05 -05:00
Matthias Clasen
9a7624b47a
inspector: Allow to bump scale to 3
...
Might as well allow this, for 'large scale testing'.
2017-12-17 16:40:10 -05:00
Matthias Clasen
21064a41b5
Remove unneeded deprecation guards
...
No deprecated api used in here, it seems.
2017-12-17 13:15:18 -05:00
Matthias Clasen
1293209d23
Don't place dnd cursor in placeholder text
...
That is just misleading - the entire placeholder text is going
to be replaced by the drop.
2017-12-17 10:52:33 -05:00
Benjamin Otte
f824439137
dnd: Get rid of IPC widgets
...
Instead, pass the source window to gdk_drag_begin().
Also make Wayland use this window instead of the one under the pointer
(though those 2 Windows are most likely the same anyway).
2017-12-16 02:48:12 +01:00
Benjamin Otte
8f6194a883
dnd: Remove unused function
...
The function was referencing itself in ways that bamboozled gcc:
static void
foo (void)
{
g_signal_handlers_disconnect_by_func (NULL, foo, NULL);
}
Well done, function, you get your own commit!
2017-12-16 02:48:12 +01:00
Benjamin Otte
510581e0ef
x11: Use gdk_drag_context_get_display()
2017-12-16 02:48:12 +01:00
Matthias Clasen
4573d2d19b
listbox: Fix a crash during keynav
...
The code was asserting something that was not always holding
true. We can hit row == NULL here on page-up too. Handle that
case by moving to the first row.
https://bugzilla.gnome.org/show_bug.cgi?id=791549
2017-12-15 18:48:50 -05:00
Benjamin Otte
cb9867cb48
dnd: Remove handler for nonexisting signal
...
The signal has been gone since e3e9bf4bea
2017-12-15 23:57:33 +01:00
Benjamin Otte
31119c89df
gtk: Remove unused include
2017-12-15 23:53:18 +01:00
Benjamin Otte
a04afde35c
gdk: Remove DRAG_STATUS and DROP_FINISHED events
...
Those are source-side events that are handled by signals of the
Dragontext these days.
2017-12-15 23:48:36 +01:00
Juan Pablo Ugarte
e0ce028c88
css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()
...
https://bugzilla.gnome.org/show_bug.cgi?id=791281
2017-12-15 10:28:21 -03:00
Matthias Clasen
e92c0e85ec
Replace gdk_keymap_get_for_display by gdk_display_get_keymap
...
Replace all uses of the old function by the new one.
No functional change.
2017-12-15 07:44:58 -05:00
Matthias Clasen
fd85ff0c7a
Drop gdk_keymap_get_default()
...
It is better to use the explicit keymap getter - the
default display may not even use the current gdk backend.
2017-12-14 23:57:54 -05:00
Matthias Clasen
9194ee4973
gdk: Drop GDK_DAMAGE
...
We haven't been generating events of this type
since we dropped offscreen windows.
2017-12-14 23:35:08 -05:00
Matthias Clasen
65fc43a1f3
Drop GDK_CLIENT_EVENT
...
We never generate events of this type, so no need
to carry it around.
2017-12-14 22:55:03 -05:00
Matthias Clasen
a4a2ecb21a
widget: Remove the ::window-state-event signal
...
We no longer use this signal, so remove it.
2017-12-14 22:24:06 -05:00
Matthias Clasen
0313b8f0bc
gtk: Stop handling GdkEventWindowState
...
These events have been superseded by GdkWindow::state.
2017-12-14 22:24:06 -05:00
Matthias Clasen
8476fc3fb0
menu: Stop using GdkEventWindowState
...
These events are going away.
2017-12-14 22:24:06 -05:00
Matthias Clasen
c1f9d7cb16
a11y: Stop using GdkEventWindowState
...
These events are going way.
2017-12-14 22:24:06 -05:00
Matthias Clasen
40d57ff884
headerbar: Stop using GdkEventWindowState
...
Use GdkWindow::state instead - the event is going away.
2017-12-14 22:24:06 -05:00
Matthias Clasen
1e1904a9b8
gtk: Stop using GdkEventWindowState
...
We can instead use the new GdkWindow::state property
change notification. The event is going away.
2017-12-14 22:24:06 -05:00
Daniel Boles
fe20fc3128
FileChooser: Update set_local_only() doc’s default
...
The property now defaults to FALSE, but the setter doc didn’t reflect it
While here, add a missing apostrophe too.
https://bugzilla.gnome.org/show_bug.cgi?id=791176
2017-12-14 15:36:43 +00:00
Benjamin Otte
920259c250
x11: Get rid of default Atom converters
...
No, using the default Wayland display is not okay to query Atoms.
2017-12-14 13:35:32 +01:00
Matthias Clasen
54a6273191
Drop gdk_atom_intern
...
Atoms are just interned strings now, so we can just
use g_intern_string.
2017-12-13 23:39:03 -05:00
Matthias Clasen
4c083c1ed4
Drop gdk_atom_name
...
Since atoms are just interned strings now, we can just
cast them to const char * where needed.
2017-12-13 23:26:23 -05:00
Matthias Clasen
e3e9bf4bea
Remove no-longer-used signals
...
GtkWidget::selection-get and ::selection-received are no
longer used, so get rid of them.
2017-12-13 22:53:50 -05:00
Benjamin Otte
b49a9b9933
dnd: Remove gdk_drag_get_selection()
...
Without selections, drags can't have them either.
Also included is removing the selection from GtkSelectionData.
Includes a bunch of crude cleanups to Wayland code that no longer has to
care about selection atoms.
2017-12-14 04:39:22 +01:00
Benjamin Otte
f2bb2024c8
gdk: Remove properties
...
They are not used anymore.
Gone with them are PropertyNotify events.
2017-12-14 03:05:34 +01:00
Benjamin Otte
38d8fa0b6a
gesture: Fix gcc constness warning
2017-12-14 03:05:34 +01:00
Benjamin Otte
d7f34874ab
x11: Make unsetting transient-for work
...
... and just unset it from GtkWindow instead of fiddling with
properties.
2017-12-14 03:05:34 +01:00
Benjamin Otte
a4b42f0b73
gdk: Remove selection defines
...
And with it, remove the selections section from the docs.
So selections are gone for good now.
2017-12-14 03:05:34 +01:00
Carlos Garnacho
332b640cd3
gtk: Make gtk_get_current_event() return a reference
...
All callers in gtk seem to be ok with it, and it makes sense if
we are dealing with events as "static after delivered".
2017-12-14 01:05:48 +01:00
Carlos Garnacho
ee178947d7
gtk: Avoid some event copies
...
Those places can do with an extra reference.
2017-12-14 01:05:48 +01:00
Carlos Garnacho
d491e49fd6
gtk: s/gdk_event_free/g_object_unref/
2017-12-14 01:05:48 +01:00
Carlos Garnacho
47f04afa48
gtk: Remove CONSTRUCT_ONLY flag from GtkEventControllerScroll::flags
...
There is a gtk_event_controller_scroll_set_flags() call that's meant
to be called after construction (eg. due to scrolledwindow relayouts
hiding/showing scrollbars). The property shouldn't be construct-only
for consistence.
2017-12-14 01:05:48 +01:00