Commit Graph

19896 Commits

Author SHA1 Message Date
Benjamin Otte
fbf99febf3 docs: Add more information to gtk_widget_set_realized()
It's important to point out that widgets should only be marked as
realized very late in the process. Even GTK widgets don't get this
right.

https://bugzilla.gnome.org/show_bug.cgi?id=726717
2014-03-20 14:34:31 +01:00
Benjamin Otte
b20d49fc04 expander: Call set_realized() later
Widgets should only call set_realized() after having created and
registered their GDK windows. In this case, the creation of the style
context (or more exactly: figuring out the scale factor for it) requires
knowing if the widget is already realized. Which it isn't.

https://bugzilla.gnome.org/show_bug.cgi?id=726717
2014-03-20 14:20:49 +01:00
Benjamin Otte
38d1999f7b container: guard container variable by reffing it
vte destroys the container during removal of a child. Don't crash in
that case due to recent a11y refactoring.

https://bugzilla.gnome.org/show_bug.cgi?id=726369
2014-03-19 13:23:38 +01:00
Benjamin Otte
d5792eb1fe cssprovider: Fix error message
expected a valid semicolon
sounds kinda not so great. Make it say
  expected semicolon

Unless somebody can tell me the difference between valid and invalid
semicolons?
2014-03-19 12:44:24 +01:00
Matthias Clasen
5c10e8409f Ensure proper spacing around icons in message dialogs
We had a margin of 30 before/after the text. Put that add around
the icon as well, and separate the icon and text by 30 pixels.
This does not affect the appearance of message dialogs without
icons.
2014-03-18 19:53:36 -04:00
Murray Cumming
4ee775ebf9 docs: Tiny GtkApplication typo fixes. 2014-03-18 12:29:49 +01:00
Matthias Clasen
1a2b7bbd0a GtkDialog: Add some padding to title label 2014-03-17 22:46:22 -04:00
Matthias Clasen
70b4b622b4 GtkPopover: Fix two doc comments 2014-03-17 19:13:53 -04:00
Matthias Clasen
ac96c35230 Update documentation about link styling
The ::link-color and ::visited-link-color style properties
are ignored now. Document that.
2014-03-17 15:00:45 -04:00
Marek Kasik
b95ce71b89 printing: Fail nicely when /tmp is not writable
Don't crash when /tmp is not writable when printing to file.
Show that getting of printer details failed for CUPS printers.

https://bugzilla.gnome.org/show_bug.cgi?id=693200
2014-03-17 14:37:34 -04:00
Carlos Garnacho
3693045566 textview: Mind the lateral windows when setting handles/popovers positions
If a textview had lateral windows that might displace the text window, the
handles and popovers would appear displaced. Those lateral windows aren't
affected by RTL/LTR settings, so just checking for left/top is ok here.
2014-03-17 18:26:41 +01:00
Bastien Nocera
20c764fc5e dialog: Avoid possible use-after-free
When the dialogue's titlebar was replaced, we were still trying to
update the label we constructed but that was now destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=726492
2014-03-17 14:29:10 +01:00
Matthias Clasen
3504f49473 Show dialog titles
We want to present a clean, rounded top when there is nothing
else to show, but many dialogs in applications rely on showing
information in their title, so add a label and show the title
when it is not empty.
2014-03-14 06:28:49 -04:00
Owen W. Taylor
2f43800aa3 _gtk_widget_get_device_window: Fix for keyboard devices
Avoid a warning by returning NULL for keyboard devices, which can
never have an active pointer for a widget.
2014-03-13 10:31:08 -04:00
Owen W. Taylor
40b6d907bf Use GDK's current window tracking when synthesizing events in GTK+
Add gdk_device_get_last_event_window(), and use to implement the window
tracking we need for synthesizing crossing events for sensitivity changes
and gtk grabs, rather than keeping the information in qdata and updating
it based when GTK+ gets events.

https://bugzilla.gnome.org/show_bug.cgi?id=726187
2014-03-12 23:03:53 -04:00
Balint Reczey
4ce5fcc5c8 documentation: clarify gtk_icon_theme_add_builtin_icon() usage
https://bugzilla.gnome.org/show_bug.cgi?id=726135
2014-03-12 22:55:52 -04:00
Owen W. Taylor
827e5cb87b GtkTreeView: stop ignoring crossing events from grabs
Stop ignoring various crossing events from grabs:

Enter events with type GRAB/GTK_GRAB/GTK_UNGRAB/STATE_CHANGED:
  Ignoring these events was added as a workaround for synthesized
  events not having the right coordinates (see bug 555109) but
  now they do have the right coordinates. (see bug 704456)

Leave events with types types GTK_GRAB/GTK_UNGRAB:
  Ignoring these events was added because since we were ignoring
  the enter events as above, ignoring the leave events meant we
  could lose the prelighted row in a grab-triggered leave/enter
  pair. (See bug 653676. It's also now impossible to
  reproduce the leave events that were reported in that bug as causing
  problems.)

Leave events of type GRAB.
  Ignoring these events was added without a ChangeLog entry in 2001,
  possibly to keep the prelight from flashing when activating menus.
  But ignoring these events could lead to stuck prelighting, and we don't
  do it for any other widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=726209

The bug this patch is fixing is that currently if you have a GtkPopover in
clicking off the popover to dismiss it on a GtkTreeView (which triggers
a synthetic enter event on the GtkTreeView) will leave the GtkTreeView
in a confused state until the user moves the mouse again.
2014-03-12 22:55:19 -04:00
Matthias Clasen
8d07911d73 Work around gcc stupidity
With -Wc++-compat, gcc warns about 'and' even in contexts where it
poses absolutely no danger.

https://bugzilla.gnome.org/show_bug.cgi?id=726136
2014-03-12 22:47:10 -04:00
Benjamin Otte
63fe6de94d treeview: Don't popup a search dialog for keypresses that close it
That doesn't make sense.
And it causes issues, because when holding down the tab key, we
show/hide a lot of windows and cause a lot of map/unmap events that
stall the event pipeline.
2014-03-13 02:02:50 +01:00
Benjamin Otte
c82f2169e5 treeview: Split out a function
This is in preparation for the next patch.
2014-03-13 02:02:50 +01:00
Benjamin Otte
66fae0330c a11y: Don't use signals
Instead, call functions directly. Fixes the fact that the signals
weren't disconnected even when the accessible was destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=725733
2014-03-13 02:02:50 +01:00
Matthias Clasen
6fbe287622 csd: Fix the northeast resize handle position 2014-03-12 00:28:26 -04:00
Matthias Clasen
5b341e8e6e csd: Fix invisible border/shadow confusion
We did not set an input shape on the window, so the region outside
the invisible border where we draw the outer edges of the shadow
were still part of the window, as far as clicks and cursors were
concerned. Fix this by setting an input shape that makes all clicks
outside of the resize borders go through to the underlying window.

https://bugzilla.gnome.org/show_bug.cgi?id=726125
2014-03-12 00:18:04 -04:00
Carlos Garnacho
a86ca5c561 textview: Postpone text handles creation until when needed
This is only necessary for touch devices, so unnecessary on many setups.
2014-03-10 23:07:21 +01:00
Carlos Garnacho
7b0a5674e2 textview: Postpone magnifier creation until when needed
This is only necessary for touch devices, so unlikely on many setups.
2014-03-10 23:07:21 +01:00
Carlos Garnacho
130d8f100e entry: revert text handles to cursor mode after cut/paste
The current text selection goes away in that case, so reflect
that too in the handles.
2014-03-10 23:07:21 +01:00
Carlos Garnacho
60b0e89804 entry: postpone text handles creation until when needed
This is only necessary for touch devices, so unlikely in many setups.
2014-03-10 23:07:21 +01:00
Carlos Garnacho
45d9076f49 entry: postpone magnifier creation until when needed 2014-03-10 23:07:21 +01:00
Carlos Garnacho
89c4ef5873 a11y: Don't allocate a list just for counting widgets in GtkContainerAccessible
It's more straightforward if counting through gtk_container_foreach().
2014-03-10 23:02:41 +01:00
Carlos Garnacho
31cd153050 a11y: Add GtkPopopverAccessible
And let GtkPopover use it as its GtkAccessible implementation, this
accessible sets the POPUP_FOR relationship to the relative-to widget,
and keeps track of changes there.

https://bugzilla.gnome.org/show_bug.cgi?id=725864
2014-03-10 23:02:14 +01:00
Carlos Garnacho
168e4faf50 window: Emit a11y signals directly on popover added/removed
As those are internal children, there's no signal that GtkWindowAccessible
could catch when those are added or removed, so make GtkWindow use the private
GtkContainerAccessible methods to add/remove the child accessible when that
happens.

https://bugzilla.gnome.org/show_bug.cgi?id=725864
2014-03-10 23:02:06 +01:00
Carlos Garnacho
d4d6968e1a a11y: Add private GtkContainerAccessible functions to add/remove a child
This may be useful in container implementations, or for internal children
that trigger no signal emission.

https://bugzilla.gnome.org/show_bug.cgi?id=725864
2014-03-10 23:01:59 +01:00
Carlos Garnacho
9d54fee952 a11y: Make GtkWindowAccessible know about popovers
https://bugzilla.gnome.org/show_bug.cgi?id=725864
2014-03-10 23:01:52 +01:00
Matthias Clasen
f712cd8850 message dialog: Fine-tune vertical spacing
Requested in
https://bugzilla.gnome.org/show_bug.cgi?id=723668
2014-03-10 06:13:38 -04:00
Phillip Wood
beaba95f39 Window: Focus custom titlebar with F10
As discussed on desktop-devel-list [1], "There should be an intuitive,
consistent, immediate way to jump to the widgets that live in the
header bar." F10 has been suggested for this as it is already used to
active menubars.

F10 will focus the custom titlebar widget if the window has one and it
isn't already focused. If the titlebar widget doesn't exist or is
already focused then F10 focuses the menubar if there is one.

[1] https://mail.gnome.org/archives/desktop-devel-list/2014-February/msg00176.html

https://bugzilla.gnome.org/show_bug.cgi?id=725141
2014-03-09 20:26:54 -04:00
Carlos Garnacho
59a928f7c8 window: Turn popovers into internal children
It turns out popovers are already smart enough to cope with this
situation, so let popovers be internal children so things that rely
on gtk_container_forall(), like DnD, work without modifications.

https://bugzilla.gnome.org/show_bug.cgi?id=725727
2014-03-06 23:21:43 -05:00
Carlos Garnacho
43b0eee81d entry: Make DnD coordinate calculation compensate for entry icons
This made DnD have effect farther on the left when dragging text over
any entry with icons in it.

https://bugzilla.gnome.org/show_bug.cgi?id=725866
2014-03-06 22:54:46 -05:00
Carlos Garnacho
adf39dd291 entry: use priv->dnd_position when rendering the DND cursor
This makes "cursor position" track the DnD point again, looks much
more intuitive than just rendering it on the pre-DnD position.

https://bugzilla.gnome.org/show_bug.cgi?id=725866
2014-03-06 22:54:46 -05:00
Matthias Clasen
8195244e3b Improve GtkStack documentation
As has been pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=725711
it is a little confusing that we have the concept of
a visible child and of the child being visible itself.
2014-03-06 22:50:40 -05:00
Carlos Garnacho
efb4f2db50 calendar: grab focus first, emit signals after
It may be unusual, but handlers of day-selected may want to transfer
focus somewhere else, without getting it reset back right after by/to
the calendar. This makes popovers demo work on the calendar again, for
one...
2014-03-07 02:50:27 +01:00
Matthias Clasen
15004e5930 Allow selecting a dark variant with GTK_THEME
Dark themes need to be debugged, too.

Author:    Matthias Clasen <mclasen@redhat.com>
2014-03-06 19:30:33 -05:00
Carlos Garnacho
43e8852829 popover: Track toplevel's focus widget when visible
If the toplevel focus widget is forced out of the popover (eg. through
gtk_widget_grab_focus() anywhere else), then dismiss the popover.
2014-03-06 23:23:47 +01:00
Carlos Garnacho
dcba77fcc4 popover: Track toplevel focus changes
Make the popover temporarily undo the GTK+ grab, so it remains modal
to its window, but does not attempt to steal focus on other non-modal
windows that get the focus.

This was most confusing with keyboard navigation, as the focus would
remain stuck on the popover, and not move to the newly focused window
after the popover was dismissed. It didn't have as much effect on
pointer operations as only the first click would be consumed in order
to hide the popover.
2014-03-06 23:23:47 +01:00
Carlos Garnacho
08e9c93b17 popover: Only give back focus to drawable widgets
If the previous focus widget is not drawable anymore, don't even
bother in transmitting the focus grab to it.
2014-03-06 20:38:11 +01:00
Carlos Garnacho
aa7e00fcb8 popover: dispose popovers when unmanaging them
This makes popovers get rid of dangling pointers at the time of destroying
the relative-to widget, just in case these are kept alive by a reference.
2014-03-06 19:34:06 +01:00
Claudio Saavedra
578d43c2ba gtkentrycompletion: fix a critical warning
There are early returns in this method before the completion timeout
is set later on, so set the source to 0 to avoid trying to remove it
later again.

https://bugzilla.gnome.org/show_bug.cgi?id=725824
2014-03-06 16:38:52 +02:00
Lars Uebernickel
a5d5106fcf gtkmenu: displace popups by their css margin
Without a margin, the pointer is above the first (or last) menu item,
making it easy to accidentally activate that item.

https://bugzilla.gnome.org/show_bug.cgi?id=591258
2014-03-06 10:44:28 +01:00
Marek Kasik
158cb29e55 GtkIconViewAccessible: Don't access freed item
Don't get index from deleted GtkIconViewItem.
Remove the item before traversing list of items.

https://bugzilla.gnome.org/show_bug.cgi?id=701884
2014-03-05 21:03:36 +01:00
Benjamin Otte
25da672dbc separatortoolitem: Make gcc stop complaining
No, a ButtonEvent and a MotionEvent are not the same thing.
2014-03-05 21:03:36 +01:00
Carlos Garnacho
5b1eeac96d popover: Set pointer motion mask on the popover window
This is not necessary for the popover itself, but helps tooltips
code confine the widget lookup within the popover if the pointer
is inside it, otherwise the widget lookup may turn out wrong for
motion events, starting the tooltip widget lookup from the toplevel
window, mistakenly triggering tooltips on the natural window
descendants (ie. the widget below the popover)

https://bugzilla.gnome.org/show_bug.cgi?id=724785
2014-03-05 13:58:04 +01:00