Commit Graph

25974 Commits

Author SHA1 Message Date
Benjamin Otte
d7bc0fd24c textview: Fix coordinates when background drawing of text node
Fixes black areas in source view of gtk-demo.
2016-02-27 03:27:39 +01:00
Matthias Clasen
ca3d87ce70 Avoid an out-of-bounds access
When the offset gets smaller than min_offset, we can't
access the array at that position.
2016-02-26 15:52:19 -05:00
Matthias Clasen
88e372cd09 infobar: Avoid a memory leak in an error case
Parsing <action-widgets> could sometimes fail to free
some of the data, if a nonexisting widget is referenced.
Found by gcc's leak sanitizer.
2016-02-26 15:52:19 -05:00
Matthias Clasen
c784d5d700 levelbar: Avoid a use-after-free
We were freeing the old offset before using its name to
recreate a new one. Don't do that.
Found by gcc's undefined behavior sanitizer.
2016-02-26 15:52:19 -05:00
Matthias Clasen
5ca860dcaf dialog: Avoid a memory leak in an error case
Parsing <action-widgets> could sometimes fail to free
some of the data, if a nonexisting widget is referenced.
Found by gcc's leak sanitizer.
2016-02-26 15:52:19 -05:00
Matthias Clasen
6108c646c5 cssselector: Don't invoke undefined behavior
Avoid undefined behavior in the calculation of some
hash values. Found by gcc's undefined behavior sanitizer.
2016-02-26 15:52:19 -05:00
Matthias Clasen
2cabfcc801 Avoid an a crash with GTK_DEBUG=builder
We might cast objects to GtkBuildable even if they aren't,
to print their names. Don't do that.

Found by gcc's address sanitizer.
2016-02-26 15:52:19 -05:00
Lapo Calamandrei
4fd5ad2f07 Adwaita: notebook tab sizing fix 2016-02-26 19:01:55 +01:00
Lapo Calamandrei
9f606b8270 Adwaita: stricter selector for split headerbar separator
with a descendant select was erroneusly catching normal headerbar
separators in paned split headerabar case, see gedit. Using a child
selector fixes.
2016-02-26 13:15:37 +01:00
Lapo Calamandrei
296a7c24f9 Adwaita: simplify mixed buttons styling 2016-02-26 13:07:09 +01:00
Lapo Calamandrei
1a0b6568fa Adwaita: fix separator in non paned using split headerbar
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=762593
2016-02-26 12:53:02 +01:00
Carlos Soriano
ea9e8221b1 gtkplacessidebar: use gpointers in trash row
It's the right casting. Forgot to push it with the previous patch.
2016-02-26 11:55:05 +01:00
Carlos Soriano
377ac909b7 gtkplacessidebar: clean up trash row on destroy
Track with a weak ref the trash row, so we can clean up the data in the
private struct.

Spotted and reviewed by Christian Hergert.
2016-02-26 11:52:50 +01:00
Benjamin Otte
34e204952e win32 theme: Make titlebuttons look like they're the right size
This is a hack because we can't really rtesize the buttons.

Instead, we draw the background only over the area that they would
be drawn if they were drawn by Windows. The button is still selectable
outside of this area, but what can you do...
2016-02-26 03:20:42 +01:00
Benjamin Otte
ad204c88ca win32 theme: Fix decorations
... and draw them properly.
2016-02-26 03:20:42 +01:00
Matthias Clasen
8b93c013c3 inspector: Simplify general tab setup
Factor out the code to create a listbox row with two labels,
and use it throughout.
2016-02-25 20:49:09 -05:00
Matthias Clasen
4f5f299266 inspector: React to device changes
Recreate the device section in the general tab when
devices come or go.
2016-02-25 20:28:23 -05:00
Benjamin Otte
5df1e98b2a window: Draw decorations in the right place
When we draw our own shadows, we need to offset the calls to render the
background to the border rectangle.
2016-02-25 23:21:29 +01:00
Matthias Clasen
09b1571093 Better baseline adjustment
The way we were adjusting baselines if min-height forces
a size increase was not quite working as intended. Redo
it in a simpler way: just split up the excess and count
half of it for above the baseline and half below.

This fixes button labels in dialogs appearing too low.
2016-02-25 16:36:13 -05:00
Matthias Clasen
a975e733dc fix a typo 2016-02-25 16:17:55 -05:00
Timm Bäder
0213815d2f Move .keycap docs from GtkFrame to GtkLabel
That's where .keycap is used nowadays.
2016-02-25 20:45:33 +01:00
Timm Bäder
77594be976 frame: Measure border gadget separately
https://bugzilla.gnome.org/show_bug.cgi?id=760482
2016-02-25 20:45:33 +01:00
Timm Bäder
3431451463 frame: Let GtkContainer handle border-width
https://bugzilla.gnome.org/show_bug.cgi?id=760482
2016-02-25 20:45:33 +01:00
Matthias Clasen
abd781a2c9 icon helper: Don't set baseline to 0
It is clearly not the intention that the baseline of icons is at
the very top. The visible effect of this was that spin buttons were
higher than expeted, because the box gadget was trying to line up
the baseline of the text with the top of the buttons, forcing extra
height to be requested.

Just don't set a baseline at all for now.
2016-02-25 13:18:02 -05:00
Benjamin Otte
3a9ceffe12 win32 theme: Make entries and textview work 2016-02-25 16:53:22 +01:00
Benjamin Otte
4e8fb33f56 pixelcache: Don't have a style context argument
That would imply the pixelcache monitors the style context for changes
and it doesn't do that.

Its only use case was opacity checks, so add
gtk_pixel_cache_se_is_opaque() instead.
2016-02-25 16:52:58 +01:00
Benjamin Otte
71a9fd9d83 stylecontext: Move background_is_opaque() function
The new way, it no longer depends on the style context, but on the
CssStyle. This will become relevant in the next commit.
2016-02-25 16:52:58 +01:00
Ignacio Casal Quinteiro
53fe9c2b0c inspector: use guint to fix the windows build 2016-02-25 15:25:19 +01:00
Carlos Soriano
20cf42c9ea gtkplacessidebar: avoid unresponsive UI while trashing
We were updating the whole places sidebar when the trash changed.
This effectively removes all rows and create new ones for every trash
state change.

Although when using GtkTreeView it was somehow ok, with the new
implementation with GtkListBox this effectively locks the UI while the
trash operations are being performed.

When performing operations for i.e. 100 files, the UI can be locked
for more than 1 minute since gvfs-trash usually takes time.

To fix this just update the icon of the trash when the state of the
trash change instead of the whole sidebar.

https://bugzilla.gnome.org/show_bug.cgi?id=762677
2016-02-25 14:44:40 +01:00
Matthias Clasen
fe4602acc5 inspector: Show ::num-touches for touch devices
This can be useful information.
2016-02-25 08:27:08 -05:00
Carlos Soriano
1977994128 gtkplacesview: clean up mount server callback
And fix a warning of unused variable.

Reviewed by Nacho on IRC
2016-02-25 13:45:20 +01:00
Matthias Clasen
84ba01d713 inspector: Update for screen config changes
Repopulate the display section whenever the monitor configuration
changes.
2016-02-25 01:22:01 -05:00
Matthias Clasen
15ccdcd25b inspector: Don't show numeric ids
The vendor and product ids for input devices aren't useful
as-is; need to figure out how to translate them to names.
2016-02-25 01:10:23 -05:00
Matthias Clasen
455935a06a inspector: Show more device information
This adds vendor and product id and axes. This reveals that
the GDK backends have quite different quality when it comes
to returning meaningful information here.
2016-02-25 00:49:50 -05:00
Matthias Clasen
03db14c2d6 inspector: Show some basic device information
Add information about seats and their associated devices
in the General tab.
2016-02-25 00:17:09 -05:00
Matthias Clasen
dde33623ca gadget: Warn about missing size allocation
When size_allocate is overridden in widgets, but draw is not,
we can end up drawing a gadget that has not been given a size.

Warn about this, and limp along by drawing the gadget over the
full allocation of its owner widget.

https://bugzilla.gnome.org/show_bug.cgi?id=762614
2016-02-24 22:22:11 -05:00
Benjamin Otte
760b540c8c treeview: Don't make things way too high
If the size-request is larger than the dedicated size, don't increase
the dedicated size by the size request, only increase it to the
size request.
2016-02-25 04:03:41 +01:00
Benjamin Otte
8ed804f1b4 textview: Draw the background properly
The background is *not* drawn relative to the clipping area.
2016-02-25 04:03:41 +01:00
Benjamin Otte
9016a00edd treeview: Fix positioning of editing widgets
This looks like a thinko.
2016-02-25 04:03:41 +01:00
Ben Iofel
e390e3b8e3 GtkIMContext: remove broken anchors in documentation 2016-02-24 14:37:35 -05:00
Carlos Garnacho
60d7f4376e GtkTextHandle: Look up for the first child of a scrolled window found
Text handles use to connect to the first GtkScrollable up the hierarchy
so they can be repositioned when scrolling. It makes more sense to look
up the first child of a GtkScrolledWindow, it must be an scrollable too,
and will be the scrollable that can actually change the position of the
text handles.

https://bugzilla.gnome.org/show_bug.cgi?id=761676
2016-02-24 17:58:19 +01:00
Jean-François Fortin Tam
cf6c0b09a5 spin button: Use the Ctrl modifier for Home and End key bindings
https://bugzilla.gnome.org/show_bug.cgi?id=309300
2016-02-23 21:20:00 -05:00
Timm Bäder
0c25c5d43d revealer: Don't report >0 preferred width...
... if the child is concealed and the transition type is set to NONE.
In this case, both preferred width and preferred height should be 0, but
we still can't use that to allocate a size for the child, so care about
the minimum size of the child in gtk_revealer_get_child_allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=761760
2016-02-23 20:45:45 -05:00
Carlos Soriano
17a4bd51bb gtkplacesview: use location instead of the enclosing one
We were using the enclosing location when connecting to a server, so
for instance if  we were connecting to ftp://test/test it would actually
open ftp://test/ instead of the full path.

To fix it, use the full location when emitting the open location signal.

https://bugzilla.gnome.org/show_bug.cgi?id=756659
2016-02-23 20:42:01 -05:00
Carlos Garnacho
3d700515e1 GtkGestureMultiPress: reset multi-press sequence if the source device changes
This prevents multipress sequences to possibly come from different mice.
Now the accumulated number of presses will be reset if the device changes
in the mean time.

https://bugzilla.gnome.org/show_bug.cgi?id=723659
2016-02-23 20:35:01 -05:00
Carlos Soriano
63a204e1c5 gtkplacessidebar: add open flags to other locations
We weren't using the open flags on the other locations signal, which
makes impossible for applications like nautilus to act in the same
way that for any other location where the user can choose between
opening in the current view, in a new window or in a new tab.

Add the signal missing parameter in order to allow it.

https://bugzilla.gnome.org/show_bug.cgi?id=754743
2016-02-23 20:29:03 -05:00
Benjamin Otte
cf71d98b05 entry: Make the get_text_area() vfunc relative to top left of entry
This fixes GdTaggedEntry. I hope.
2016-02-23 04:22:19 +01:00
Benjamin Otte
3056d793a4 cssparser: Make _gtk_css_parser_has_number() a bit smarter
Previously we just checked the first character. And if that was a "-" as
in "-gtk-some-special-value", we assumed it was a number. Which it
clearly wasn't.

Test included
2016-02-23 04:22:19 +01:00
Benjamin Otte
437dec6295 csscolorvalue: Print a comma for win32 values 2016-02-23 04:22:19 +01:00
Benjamin Otte
c3dc0d80f1 container: Request layout again depending on layout mode
Containers with RESIZE_MODE_PARENT should never request layout and those
with RESIZE_MODE_IMMEDIATE should only request it for updating CSS.

Fixes clutter embeds (like the tray icon embed in gnome-shell)
continuously requesting relayout when all they want to do is relegate
relayout to Clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=758893
2016-02-23 04:22:19 +01:00