Commit Graph

47312 Commits

Author SHA1 Message Date
Ray Strode
02a5fe87da headerbar: don't allocate both label and custom title
It's only possible to have a label or a custom title, not both.
The size allocate code confusingly treats them as independent.

That is confusing, because, as the code is written, it makes it
look like the space for the custom title isn't getting accounted
for.

This commit else-ifies some parts of the size allocate code for
clarity.
2016-08-04 10:34:06 -04:00
Carlos Garnacho
ba30d1e458 GtkPopover: Honor widget margins when calculating tail position
If there are widget margins set, the whole popover will be displaced.
However the calculation of the tail position doesn't have this into
account, ending up with the tail being detached from the popover if
the margin grew too big.

We should not render the arrows invariably next to the GdkWindow edge,
but optionally displaced inside it depending on the widget margins.
Fixes the gtk3-demo "Popovers" demo case, whose GtkEntry popovers set
widget margins for some reason.

https://bugzilla.gnome.org/show_bug.cgi?id=767851
2016-08-04 10:34:06 -04:00
Christian Hergert
74a8099261 listbox: short-circuit if no sort function is set
do_sort will crash if sort_func is not defined. Instead of adding a check
there in the hot path, just check for sort_func before invalidating the
sort of the underlying GSequence.
2016-08-04 10:34:06 -04:00
Olivier Fourdan
c906dbc9f1 wayland: do not set PRIMARY selection if focus is lost
If keyboard focus is (already) lost, do not advertise PRIMARY selection.

https://bugzilla.gnome.org/show_bug.cgi?id=767848
2016-08-04 10:34:05 -04:00
Carlos Garnacho
86ece29797 treeview: Ensure the treeview has the implicit grab before grabbing focus
The cellrenderer signals might be taking the grab somewhere else, at which
point it's dubious we should attempt to take the keyboard focus into the
treeview.

This concretely breaks popovers triggered from cellrenderer signals on
button press, because the treeview will attempt to grab focus
inconditionally then.

https://bugzilla.gnome.org/show_bug.cgi?id=767468
2016-08-04 10:34:05 -04:00
Matthew Leeds
90d3c9b31a GtkActionHelper: Change a message to a warning
It's almost certainly a programmer error if an action isn't
activatable because its target and parameter type don't match.
This commit changes the existing g_message to a g_warning.

https://bugzilla.gnome.org/show_bug.cgi?id=767705
2016-08-04 10:34:05 -04:00
Matthias Clasen
8fd61c4f5a shortcuts window: Fix handling of significant xml chars
We are using markup in the labels, so we need to escape things
like < and >.

https://bugzilla.gnome.org/show_bug.cgi?id=767795
2016-08-04 10:34:05 -04:00
Ray Strode
0969dc59ef wayland: fall back to shm_open if memfd unavailable
Debian stable currently ships with a 3.16 kernel, so
it doesn't have memfd available.

This commit adds shm_open fall back code for that case
(for now).

https://bugzilla.gnome.org/show_bug.cgi?id=766341
2016-08-04 10:34:05 -04:00
Ray Strode
30e5ddfb63 wayland: fix error handling for memfd_create
We currently use syscall() directly to invoke memfd_create,
since the function isn't available in libc headers yet.

The code, though, mishandles how errors are passed from syscall().
It assumes syscall returns the error code directly (but negative),
when in fact, syscall() uses errno.

Also, the code fails to retry on EINTR.

This commit moves the handling of memfd create to a helper function,
and changes the code to use errno and handle EINTR.

https://bugzilla.gnome.org/show_bug.cgi?id=766341
2016-08-04 10:34:05 -04:00
Matthias Clasen
5f80715ffb Update GtkLabel::angle docs
We can have wrapped or ellipsized labels at an angle nowadays.
Still no selections though.
2016-08-04 10:34:04 -04:00
Matthias Clasen
8d34a176c7 scale, spinbutton: Avoid -0.0
This is a very longstanding bug; time to finally put it to rest.

https://bugzilla.gnome.org/show_bug.cgi?id=118959
2016-08-04 10:34:04 -04:00
Carlos Garnacho
310cd19dc8 searchenginetracker: Fix prefix searches
With the FTS5 query syntax, when using quotes to delimit the search phrase
the '*' token must happen after the quote, or will otherwise be considered
a character to match, go through the tokenizer, and end up ignored in
result.
2016-08-04 10:34:04 -04:00
Matthias Clasen
3b6eb70539 treeview: fix an off-by-one error
gtk_tree_view_get_path_at_pos() mistakenly identifies the first
pixel of all but the first column in a tree view as belonging to
the previous column.

https://bugzilla.gnome.org/show_bug.cgi?id=708148
2016-08-04 10:34:04 -04:00
Matthias Clasen
b89ba25631 Make gtk_tooltip_trigger_tooltip_query work again
This was broken ever since we started looking at the
source device of the event.

https://bugzilla.gnome.org/show_bug.cgi?id=674215
2016-08-04 10:34:04 -04:00
Matthias Clasen
6ca325f6ef inspector: Ellipsize accessible description.
This string can be long, and we don't want to break the ui
2016-08-04 09:45:42 -04:00
Matthias Clasen
1790e7af77 viewport: Free gadgets in finalize
This is the right place for this.
2016-08-04 09:45:35 -04:00
Matthias Clasen
9de63a147c scrolled window: Free gestures and gadgets in finalize
This is the right place for this.
2016-08-04 09:45:28 -04:00
Matthias Clasen
88cd815efc range: Free gadgets in finalize
This is the right place for this.
2016-08-04 09:45:20 -04:00
Matthias Clasen
1a6129d815 notebook: Free gadgets in finalize
This is the right place for this.
2016-08-04 09:45:13 -04:00
Matthias Clasen
76f7e57fb6 menu: Free gadgets in finalize
This is the right place to do this.
2016-08-04 09:45:07 -04:00
Matthias Clasen
4763524052 button: Free gadgets and gestures in finalize
This is the right place to free them.
2016-08-04 09:45:01 -04:00
Timm Bäder
c63dad2c53 entry: Fix undershoot position wrt entry icons
Draw them inside of the icons, which is where the text scrolls.
2016-08-04 09:43:37 -04:00
Matthias Clasen
bf2e267526 Teach gtk-builder-tool to leave GtkDialog::border-width alone
This is one of the properties that need to be explicitly set.
2016-08-04 09:40:08 -04:00
Руслан Ижбулатов
9397158fbc GtkFileChooser: don't override already opened folder
When filechooer is re-used (instead of being created and destroyed
every time it's needed), it might happen that the directory the
application wishes to initially show is the same directory that
was shown last time the filechooser was used. In that case, make sure
filechooser knows that it does not need to do its default "select $pwd
or $home" routine.

https://bugzilla.gnome.org/show_bug.cgi?id=766122
2016-08-04 09:39:57 -04:00
Matthias Clasen
f7e57b5eeb Update migration guide a bit
Resize grips are no more.
2016-08-04 09:39:43 -04:00
Matthias Clasen
98c74b6e5c Fix a duplicate word in the docs 2016-08-04 09:39:32 -04:00
Benjamin Otte
c51e97c15e window: Unfreeze window on unmap
Make sure to keep parity with the number of times we froze the window
when we unmap it.
Otherwise it will permanently stay frozen after being remapped.

https://bugzilla.gnome.org/show_bug.cgi?id=766643
https://bugzilla.mozilla.org/show_bug.cgi?id=1225044
2016-08-04 09:39:22 -04:00
Bastian Ilsø
86b8c796cf gtktextview: document how to get line space
adds a paragraph to gtk_text_view_get_pixels_below_lines(),
describing how it can be used together with
gtk_text_view_get_pixels_above_lines() to get the total
amount of line spacing between two paragraphs.

https://bugzilla.gnome.org/show_bug.cgi?id=747206
2016-08-04 09:39:15 -04:00
Matthias Clasen
2669c207bd Add a deprecation note
Mark GtkWidget:style property as deprecated in the docs.
2016-08-04 09:38:01 -04:00
Emmanuele Bassi
6b2a984892 gdk: Provide safe fallback for creating GL contexts
If the backend does not override GdkWindowClass.create_gl_context()
then we should provide a fallback that gives an error, instead of
crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=766782
2016-08-04 09:37:43 -04:00
Emmanuele Bassi
f5e192583a gl: Add a realize() fallback
Calling gdk_gl_context_realize() should always result in a valid result,
so we need to provide a default implementation, to avoid a call to a
NULL function pointer.
2016-08-04 09:37:34 -04:00
Ondrej Holy
a01ee5a7b0 Improve external drives detection
Use g_drive_is_removable for external drives detection. Current heuristic
fails in some cases (e.g. when removable drive is attached before login),
see Bug 765457.

Bump GLib version accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=765924
2016-08-04 09:36:49 -04:00
Matthias Clasen
de595bd1c3 scale: Avoid a crash
gtk_scale_get_layout was not careful enough, leading to a crash
when opening the inspector on a scale.
2016-08-01 09:28:33 -04:00
Carlos Garnacho
5863a41f37 GtkWindow: Ensure the toplevel is realized before realizing popovers
Otherwise those get a NULL parent window, which is toplevel-y enough
to disembody the popover.

https://bugzilla.gnome.org/show_bug.cgi?id=764060
2016-07-30 11:34:04 +02:00
Lapo Calamandrei
9c4ca4ab15 Adwaita: dim calendar uninteresting days some more
see https://bugzilla.gnome.org/show_bug.cgi?id=769003
2016-07-22 14:15:45 +02:00
Lapo Calamandrei
553b332faa Adwaita: clean calendar styling
remove some non working props and generally simplify and clean up
the code, in the process address:

https://bugzilla.gnome.org/show_bug.cgi?id=769003
2016-07-22 14:15:11 +02:00
Owen W. Taylor
26ca5dbc6b Change the priority of the window-close idle to G_PRIORITY_DEFAULT
If we have an application that never goes idle (or takes a long time to
go idle), the close buttons in CSD decoration don't work properly.
While it's not clear why the usage of an idle was added in the first
place, keep on using it to avoid unexpected reentrancy problems, but
change the priority to G_PRIORITY_DEFAULT.

https://bugzilla.gnome.org/show_bug.cgi?id=768485
2016-07-07 07:54:16 -04:00
Olivier Fourdan
ff99d89f8f wayland: return child only in device_query_state()
On X11, device_query_state() uses XIQueryPointer() which will return a
child window only if the pointer is within an actual child of the given
window.

Wayland backend would return the pointer->focus window independently of
the given window, but that breaks the logic in get_device_state() and
later in gdk_window_get_device_position_double() because the window is
searched based on coordinates from another window without sibling
relationship, breaking gtkmenu sub-menus further down the line.

Fix the Wayland backend to mimic X11's XIQueryPointer() to return a
child only if really a child of the given window.

That's the most sensible thing to do to fix the issue, but the API here
seems to be modeled after the X11 implementation and the description of
gdk_window_get_device_position_double() is not entirely accurate.

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

(cherry picked from commit 298221bfba)
2016-07-05 15:55:09 +02:00
Andika Triwidada
23673851b7 Updated Indonesian translation 2016-06-26 22:21:22 +00:00
Lapo Calamandrei
8b7091d43c Adwaita: color the selection of entries with error...
...or warning style class applied.
This particular style bit wasn't converted to the saner 3.20 way
so `entry:selected` used in place of `entry selection`.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=768025
2016-06-25 18:36:01 +02:00
Lapo Calamandrei
fbec4164ca Adwaita: restrict infobar styling to, well, infobars
we used to style infobars by using the .info, .question, .warning
and .error selectors directly, which used to be ok when we had just
styleclasses all over the place, now it needs to be more specific
or it interferes with everything with those styleclasses applied
like entries.
2016-06-25 18:35:40 +02:00
Andika Triwidada
3abb9ffa91 Updated Indonesian translation 2016-06-25 03:18:54 +00:00
Misty De Meo
d7c1a34bfd configure: fix detecting CUPS 2.x
https://bugzilla.gnome.org/show_bug.cgi?id=767766
2016-06-17 14:47:12 +02:00
Matthias Clasen
9a81e714d6 range: Add a queue_resize call
This is a workaround for a regression in updating scrollbars in
some applications; notably eog. We haven't fully tracked down yet
why a queue_allocation is not sufficient here, it should.
2016-06-06 12:31:41 -04:00
Timm Bäder
3659eb65d0 Scale: Set the correct value alignment
We're measuring both the width of the minimal and the maximal value for
the value gadget, but only give the value the minimal width for its
current value, resultnig in an always left-aligned value.

Fix this by assigning the width of the value gadget to the value layout
and letting pango align the text inside the layout.

https://bugzilla.gnome.org/show_bug.cgi?id=766120
2016-06-01 14:27:54 +02:00
Lapo Calamandrei
b1a59daa71 Adwaita: ensure menuitem labels are not overridden
see https://bugzilla.gnome.org/show_bug.cgi?id=767058
2016-05-31 21:01:49 +02:00
Lapo Calamandrei
72ad8b58c5 Adwaita: explicitelly set label caret-color to currentColor
since it doesn't always inherit 'color' color as it should.
2016-05-30 14:23:11 +02:00
Lapo Calamandrei
5c763e97c4 Adwaita: make selection on infobars visible
see https://bugzilla.gnome.org/show_bug.cgi?id=745622
2016-05-30 14:02:36 +02:00
Lapo Calamandrei
6e56aaffe3 Adwaita: remove textview border
see https://bugzilla.gnome.org/show_bug.cgi?id=764203
2016-05-27 11:34:47 +02:00
Kjartan Maraas
ab598631af Updated Norwegian bokmål translation. 2016-05-23 18:56:02 +02:00