Commit Graph

36806 Commits

Author SHA1 Message Date
Matthias Clasen
f4831df8ff Fix gtkenums doc section 2014-01-23 21:09:24 -05:00
Matthias Clasen
c091efcd84 Add versioned dependencies in pc files
This helps with runtime deps between devel packages.
https://bugzilla.gnome.org/show_bug.cgi?id=722638
2014-01-23 21:09:24 -05:00
Matthias Clasen
fec0116493 Slight rewording of some docs 2014-01-23 21:09:24 -05:00
Matthias Clasen
41944337af Trivial formatting fix 2014-01-23 21:09:24 -05:00
William Jon McCann
4a11acdc8c resources: move resources into a subdirectory 2014-01-23 21:04:59 -05:00
William Jon McCann
0426abd3c6 Improve docs for focus-line-pattern 2014-01-23 16:58:18 -05:00
William Jon McCann
a2ccb6601e gdk: enable rgba visuals by default
Unless GDK_RGBA=0 is set.

https://bugzilla.gnome.org/show_bug.cgi?id=630217
2014-01-23 11:51:51 -05:00
William Jon McCann
b617b003ef Use 16px as default button and small toolbar icon sizes
https://bugzilla.gnome.org/show_bug.cgi?id=350190
2014-01-23 11:51:51 -05:00
Yosef Or Boczko
773e40ca7b docs: Add more a reference in GtkHeaderBar 2014-01-23 18:29:31 +02:00
Jakub Steiner
2eedebce19 stock icons: print icons no longer fuzzy
- improve legibility by aligning to the grid
- less dramatic stroke around application-exit
2014-01-23 16:05:55 +01:00
Daniel Mustieles
363ec9a9e7 Updated Spanish translation 2014-01-23 10:53:51 +01:00
GunChleoc
c924fe4b59 Updated Scottish Gaelic translation 2014-01-22 21:10:54 +01:00
Carlos Garnacho
090a4f0af3 window: add missing return
A branch in the if/else if/else was missing a return, that was
unintended.
2014-01-22 20:50:33 +01:00
Carlos Garnacho
8595a38145 magnifier: Fix compiler warning 2014-01-22 20:50:33 +01:00
Piotr Drąg
a2b8a96f09 Updated POTFILES.in and POTFILES.skip 2014-01-22 19:41:26 +01:00
Carlos Garnacho
ce32476f32 Merge branch 'popovers' 2014-01-22 18:42:29 +01:00
Carlos Garnacho
074e17e100 popover: Don't overdraw background
It was only done so the background would connect visually to the popover
tail, but then it brings aliasing issues when the border is drawn over the
background. Instead, overdraw the tail, so it also fills the gap left by
the border.
2014-01-22 18:32:16 +01:00
Carlos Garnacho
eb2c1242fe popover: Update child visibility when scrolling happens
If pointing_to starts falling outside of the parent scrollable allocation,
the popover will be automatically hidden, and shown back again when
pointing_to scrolls back to visibility.
2014-01-22 17:10:07 +01:00
Carlos Garnacho
8d3439db61 popover: Track parent scrollable adjustments
This makes sure popovers follow the relative_to widget if it is
contained within a GtkScrollable.
2014-01-22 17:10:07 +01:00
Carlos Garnacho
9fe26a93eb texthandle: Update child visibility of handles within scrollables
If the rect a handle points to starts falling outside of the parent
scrollable allocation, the handle will be automatically hidden, and
shown again when the rectangle is visible too.
2014-01-22 17:10:07 +01:00
Carlos Garnacho
328404795b texthandle: Track parent scrollable adjustments
This makes sure texthandles follow the parent if it is contained within a
GtkScrollable.
2014-01-22 17:10:07 +01:00
Carlos Garnacho
360d5f04c0 texthandle: ensure handles are recreated on parent hierarchy changes
This ensures the handles come out right even if the parent widget is
reparented to a different toplevel.
2014-01-22 17:10:07 +01:00
Carlos Garnacho
81f13232d8 popover: fix g-i warning 2014-01-22 17:10:07 +01:00
Carlos Garnacho
d0c74dc288 popover: Fix documentation blurb
The grabbing behavior is no longer exclusively controlled by the caller,
mention gtk_popover_set_modal().
2014-01-22 17:10:07 +01:00
Carlos Garnacho
834ad653ea texthandle: Use GtkWindow private popover API. 2014-01-22 17:10:07 +01:00
Carlos Garnacho
5f667b5820 popover: use GtkWindow private popover API 2014-01-22 17:10:07 +01:00
Carlos Garnacho
168227165d window: Make popover window private 2014-01-22 17:10:07 +01:00
Carlos Garnacho
889a280979 window: Use GList to store popover structs
When all popovers are removed on destroy(), if a popover is nested into
(eg. with relative_to within) another popover, the removal of one can
lead to the other being removed while the hashtable is being iterated,
which would lead to undefined behavior in further iterations.

Then, use a GList to store popovers, iterating can be made more resilient
on these situations, and unless on pathological cases there's not going
to be as many of those popovers as to cause performance decreases at the
times those are iterated.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
5bb259bc6a textview: Set GTK_STYLE_CLASS_OSD on text selection popovers 2014-01-22 17:10:06 +01:00
Carlos Garnacho
65edb10243 entry: Set GTK_STYLE_CLASS_OSD on text selection popovers 2014-01-22 17:10:06 +01:00
Carlos Garnacho
649004ce43 popover: Do not set GTK_STYLE_CLASS_OSD directly
That's up to the caller, popovers are by design not only meant to
have that role.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
462e7f0de1 popover: Fix allocation of CSS margins
that was forgotten about, leaving no room for theme shadows that'd
make popovers look less flat.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
69182c03fb popover: Flip popovers positioning on left/right on RTL.
If widgets have GTK_TEXT_DIRECTION_RTL, popovers being positioned
on GTK_POS_LEFT/RIGHT will default to appearing on the other side
too.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
a3b3b4621c window: Remove popovers on dispose() before unsetting focus.
The popovers may return keyboard grabs to previous widgets, so if
called after unsetting the focus, the window may be left with a
dangling GtkWidget that would cause crash at later dispose() calls.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
d105a3a36a entry: Improve positioning of touch selection magnifier
Always show completely above or below entry to avoid covering
content, and limit horizontal position so it doesn't overflow
to the right.
2014-01-22 17:10:06 +01:00
Matthias Clasen
ea0a1e31a7 Implement wfh functions
With only get_preferred_width and get_preferred_height implemented,
we end up calling the GtkBin height_for_width implmementation, which
knows nothing about the margins and paddings that GtkPopover needs.
As a result, a listbox added to a popover was getting cut off
at the bottom.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
e8fa9e1851 popover: Remember last focused widget on the toplevel when a popover is shown
This is so the previously focused widget can regain focus when a modal popover
is dismissed.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
1d495cbafd popover: Add a "modal" boolean property to GtkPopover
This property is TRUE by default, when a popover is modal, it
will automatically set a GTK+ grab on the popover, and grab
the keyboard focus into the popover.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
7e30b82aee gtk-demo: Fix crash after running popovers demo
The GtkBuilder window containing the complex popover UI was left
dangling, and with a dangling pointer to its former child, causing
crashes on gtk_grab_notify() after the popover was destroyed.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
31042fe95f popover: Fix memory management of popovers
Popovers are strange in the sense that they aren't attached to a
parent directly, they rely on the relative_to widget so the toplevel
is shared, and when they have a parent, it is the toplevel itself,
not relative_to. This also means that there are conditions where the
popover loses it's parent, so they must survive unparenting.

The previous code would be floating the last reference as soon as the
parent is gone, but it was non-obvious who'd own that reference. So
fix this situation by granting the ownership of popovers to their
relative_to widget, an extra reference may be held by the toplevel
when the popover has a parent, but the popover object will be
guaranteed to be alive as long as the parent lives.

This way, memory management of popovers is as hidden from the user
as regular widgets within containers are, users are free to call
gtk_widget_destroy() on a popover, but it'd eventually become
destructed when relative_to is.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
342c23da23 popover: Implement keyboard focus behavior
When a popover is focused, the focus is forwarded so the first
child what would get the focus actually gets it. Also, implement
correct focus chain, so the keyboard focus stays within the popover
when navigating with keyboard.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
bd5490ad62 texthandle: Fix arguments in ::style-updated callback 2014-01-22 17:10:06 +01:00
Carlos Garnacho
36abb4b829 gtkmain: Let windows handle WM-related events before delivering to the grab_widget
This makes it possible to move/resize client-side decorated windows that are
otherwise obscured by a GTK+ grab somewhere else, either a popover within the
window itself or a modal dialog above the window.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
bfc87a315d entry: Show a GtkMagnifier popover on touch selection 2014-01-22 17:10:05 +01:00
Carlos Garnacho
4a8a2286e1 texthandle: Remove relative_to API
It's unused now, GtkTextHandle uses widget coordinates.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
844c6b8951 texthandles: Use GtkWindow popovers API
This offers the same behavior, but GDK_WINDOW_TEMP windows aren't used
anymore, involving less translations from/to root coordinates, plus no
glitches in having handles snap to content as windows move.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
db9e1d36d0 window: Keep track of popover children mapped status
In order to maintain visibility of the GdkWindow that's the parent window
of the popover widget.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
ace25368b1 window: Add gtk_window_get_popover_position()
A getter to complement the setter
2014-01-22 17:10:05 +01:00
Carlos Garnacho
7b9e060994 entry: Set use-underline in popover GtkToolButtons 2014-01-22 17:10:05 +01:00
Carlos Garnacho
d7acd29421 textview: Set use-underline in popover GtkToolButtons 2014-01-22 17:10:05 +01:00