Commit Graph

45261 Commits

Author SHA1 Message Date
Christoph Reiter
47325a827b imagedefinition: The storage type is not a boolean 2015-12-19 06:13:56 +01:00
Matthias Clasen
a3fd5a010b Simplify actionbar
We don't need a frame widget here, just render a top border on the
box.
2015-12-18 22:57:16 -05:00
Matthias Clasen
b90fa7dcd1 Adwaita: fix action bar styling
Make action bar buttons have some padding again.
2015-12-18 22:37:57 -05:00
Matthias Clasen
ac65952f0d icon helper: suppress style_changed when transient
Transient nodes should not propagate style-changed signals
that can cause widgets to get reallocated. This was causing
treeviews and iconviews with pixbuf cells to be constantly
resized and redrawn.
2015-12-18 20:53:02 -05:00
Matthias Clasen
7acb670e70 Add more icon entry tests
This test shows that changing icon types works.
2015-12-18 19:38:19 -05:00
Matthias Clasen
18e8842a7e entry: Don't clear when setting icons
Clearing the icon doesn't appear to be necessary with
todays code, and it has the unfortunate side-effect of
temoorarily hiding the icon's window, which breaks grabs
and makes us miss the button release event when the icon
is changed from a button press handler.
2015-12-18 19:38:07 -05:00
Matthias Clasen
6f5b19a0a5 css node: Use g_set_object
Replace unref + assignment + ref combinations by g_set_object_calls.
2015-12-18 16:56:04 -05:00
Matthias Clasen
51ba8421c3 entry: Remove some dead code
These defines are no longer used.
2015-12-18 10:55:26 -05:00
Timm Bäder
e8aa9b0440 Add a way to highlight resizing widgets
https://bugzilla.gnome.org/show_bug.cgi?id=759586
2015-12-18 16:20:19 +01:00
Timm Bäder
20a6ee30b7 GtkWidget: Don't mix code and declarations 2015-12-18 16:08:22 +01:00
Matthias Clasen
666e4135e8 expander: Deprecate style properties
This can all be done with CSS properties now.
2015-12-18 09:26:16 -05:00
Matthias Clasen
53787d29ad expander: Let gadget render focus
This lets us drop lots of allocation fiddling, and reduces
the code that is consulting the style properties we want
to get rid of.
2015-12-18 08:29:49 -05:00
Matthias Clasen
d81f8c1025 box: Add a way to get the gadget
This will be used in GtkButtonBox.
2015-12-18 07:37:52 -05:00
Matthias Clasen
acd339a9a5 buttonbox: Convert to gadgets
Set a css name and use a gadget for button box allocation and
drawing.
2015-12-18 06:52:35 -05:00
Matthias Clasen
2e25407638 Fix a problem with entry gadgets
place_windows is accessing the gadgets allocation, so make sure
to allocate the gadget before calling it.
2015-12-17 15:17:23 -05:00
Daniel Mustieles
fab31e16ed Updated Spanish translation 2015-12-17 19:14:57 +01:00
William Hua
54fa65f544 gdkborder: change types from gint16 to gint 2015-12-17 12:56:35 -05:00
William Hua
5190d010d9 gtkborder: restore original struct definition
We're going to add back the original struct definition removed by
a6e4de28, because using the typedef breaks all sorts of things like
gtkmm and WebKit, and having separate struct definitions allows us to
change the types in GdkBorder from gint16s to gints without breaking
ABI.
2015-12-17 12:56:35 -05:00
Paolo Borelli
8c355d8fe6 Win32: call dnd exit when finalizing the display
Since we init dnd when opening the display, call the corresponding
exit function (which is unused at the moment) when finalizing the
display.
2015-12-17 17:18:02 +01:00
Paolo Borelli
2e5616b27e Win32: move CoInitialize to dnd init
Functions requiring CoInitialize are called just in two places:
 - the filechooser thread which calls its own CoInitializeEx
 - the dnd code

Moving CoInitialize in the dnd specific init is cleaner and
we can pair it with the corresponding CoUninitialize since
CoUninitialize should be called as many times as CoInitialize.
Note that it is ok to call this function multiple times, so it
will not break if another codepath will need it in the future.

The patch also replaces the deprecated CoInitialize with the
equivalent call to CoInitializeEx (already used in the filechooser).
2015-12-17 17:18:01 +01:00
Timm Bäder
f6b0067718 GtkSeparator: Don't leak the gadget 2015-12-17 14:51:34 +01:00
Matthias Clasen
35c243b26f entry: use a gadget
Use a gadget for the entry. Selection and progress still
just use a CSS node. Most things seem to work correctly
with non-zero margin or padding.
2015-12-17 00:01:58 -05:00
Lionel Landwerlin
776778efc8 inspector: Ensure clip is always shown 2015-12-17 01:14:31 +00:00
Matthias Clasen
117ab50922 inspector: Always show clip
It is less confusing than hiding it sometimes.
2015-12-16 19:24:43 -05:00
Matthias Clasen
0e82076527 gadget: Don't warn about unset clip
Instead of warning about an unset clip, simply ignore
empty content clips.
2015-12-16 19:14:39 -05:00
Matthias Clasen
7778c237e6 cellview: Convert to gadgets 2015-12-16 19:07:26 -05:00
Matthias Clasen
f3c95e1c63 gadget: Avoid warning for empty containers
Empty boxes end up setting the clip to { 0, 0, 0, 0}, so warning
for a width or height of 0 triggers false positives. Instead,
initialize the clip to clearly invalid values.
2015-12-16 17:52:47 -05:00
Matthias Clasen
09d9674d69 gadget: Add more information to warnings
We have the gadget at hand, so we should print out some
information that helps tracking down where it comes from.
2015-12-16 17:41:04 -05:00
Matthias Clasen
083a17acd4 gadget: Update docs
Make it clear that out_clip must be set.
2015-12-16 17:32:24 -05:00
Matthias Clasen
ec5596ce20 gadget: Warn if clip is not set
This leads to hard-to-track-down drawing errors, so better
warn explicitly about it.
2015-12-16 17:27:14 -05:00
Matthias Clasen
2417184a1f frame: Fix gadget conversion
The GtkCssAllocateFunc must set the clip to meaningful values.
2015-12-16 17:12:12 -05:00
Matthias Clasen
576028bdec frame: Convert to gadgets
As part of this conversion, remove the hardcoded padding around
the label.

Unfortunately, we cannot use the main gadget for drawing the frame
decoration, since we want to draw a custom border instead of the
stock css border that gadgets insist on drawing for us. Therefore,
add an extra gadget with name border and use it just for rendering
the frame.
2015-12-16 15:15:18 -05:00
Carlos Garnacho
3be4971e05 GtkPopover: Ensure we unset modality before unparenting the popover
Otherwise the gtk_grab_remove() calls on widget destruction will happen
on the default window group, which may leave the real window group
of the popover with a dangling pointer if it is not the default one.

This could be seen on the inspector, open a popover in the properties
list and close the window with alt-F4.
2015-12-16 20:47:25 +01:00
Benjamin Otte
197e42efd8 label: Position the text properly
The PangoLayout needs to be positioned according to the content
allocation of the gadget, not the widget's allocation.
2015-12-16 20:39:51 +01:00
Benjamin Otte
2e362eafc7 cssnode: Redo first/last-child change tracking
Invisible nodes don't change the first/last-child status of the nodes
after/before them. That means we don't have to just check the state of
the adjacent node when modifying this state, but all their siblings
until we hit a visible node.

The same way, a node is not the first child if it has no previous
sibling, it is the first child if it has no previous visible sibling.
This is important for caching in the global lookup cache.
2015-12-16 19:55:50 +01:00
Benjamin Otte
36653bea41 checkbutton: Use a builtin icon
Also, add support to uiltin icons to look up the default size from a
style property.
2015-12-16 19:55:50 +01:00
Matthias Clasen
abbd6b11f6 switch: Deprecate style properties
CSS min-width and min-height on the slider node fit this
perfectly. We still fall back to the slider-width and
slider-height style properties if the CSS properties are
not set.
2015-12-16 13:53:13 -05:00
Matthias Clasen
4e05148bef Simplify some code
Deal with the min-width/min-height fallback the same way
as in GtkBuiltinIcon.
2015-12-16 13:53:13 -05:00
Carlos Garnacho
3f7eefb922 inspector: Use seat grabs for the "inspect widget" feature
And remove some usages of GdkDeviceManager API.
2015-12-16 19:47:07 +01:00
Carlos Garnacho
32c9db8600 GtkTreeView: Add ignore deprecation statements
We still need access to floating devices at places.
2015-12-16 19:47:07 +01:00
Carlos Garnacho
4f9f3f04c0 GtkWindow: Add ignore deprecation statements
We still need access to floating devices at places
2015-12-16 19:47:07 +01:00
Carlos Garnacho
4a7589ea12 GtkWindow: Avoid GdkDeviceManager API
We can iterate over the seats' pointers, instead of over master pointers.
2015-12-16 19:47:07 +01:00
Carlos Garnacho
0f98f225d1 GtkWidget: Add some ignore deprecation statements
We still need access to floating devices here.
2015-12-16 19:47:07 +01:00
Carlos Garnacho
04d7bd49d0 GtkMenu: Avoid GdkDeviceManager API
We used to pick a master pointer "at random", use the default seat pointer
instead.
2015-12-16 19:47:07 +01:00
Carlos Garnacho
26f3d02f03 GtkComboBox: Avoid GdkDeviceManager API
We used to pick a master pointer "at random", use the default seat pointer
instead.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
e2c8d3c680 scrolledwindow: Remove unneeded code
We no longer take a grab here, no need to undo it on grab_notify
2015-12-16 19:47:06 +01:00
Carlos Garnacho
24afce5650 x11: Make fallback window dragging use seat grabs
Also, gdk_seat_ungrab() will undo the implicit grab when EWMH dragging
is used.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
7ead57be8c x11: Add some ignore deprecation statements
In those places we still need access to floating devices, or we need to
use the GdkDeviceManager as its GdkEventTranslator interface.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
c3f1565c18 x11: Avoid gdk_device_manager_get_client_pointer()
We can use the pointer of the default seat instead.
2015-12-16 19:47:06 +01:00
Carlos Garnacho
1fbf2fe4d7 wayland: Avoid GdkDeviceManager APIs
In most places, we can do with the pointer/keyboard of the default seat
instead of the client pointer. We can also remove some code from
gdk_input_init() because we know for sure there's no floating devices to
care about here.
2015-12-16 19:47:06 +01:00