Matthias Clasen
f16e58e9a7
builder tool: Canonicalize property names
...
When simplifying, convert property names to canonical form,
so we don't waste time while looking them up later.
2016-05-06 16:09:12 -04:00
Cédric Valmary
8ead17ee76
Updated Occitan translation
2016-05-06 18:31:42 +00:00
Lapo Calamandrei
1b8c9de09a
Adwaita: darken treeview exapanders
2016-05-06 19:34:12 +02:00
Lapo Calamandrei
55a76cbc31
Adwaita: cosmetic change
2016-05-06 19:01:19 +02:00
Lapo Calamandrei
5f5a02f3e5
Adwaita: relocate a selector
...
relocate treview acceleditor > label in the treeview section and
add a comment for a testcase.
2016-05-06 19:00:12 +02:00
Matthias Clasen
0f116135f4
Avoid emitting ::style-set by name
...
GtkStyle is deprecated, but we still emit ::style-set quite
a bit, so lets at least not be slow while doing it.
2016-05-06 10:14:07 -04:00
Matthias Clasen
12dfb368e2
Don't emit ::query-tooltip by name
...
This signal is emitted quite a bit, and we can easily avoid it.
2016-05-06 10:14:07 -04:00
Matthias Clasen
64710def82
Stop storing has-tooltip in qdata
...
This is queried quite a bit, and we have room for an extra
bit in GtkWidgetPrivate.
2016-05-06 10:14:07 -04:00
Matthias Clasen
9fac83783c
Don't use qdata for getting the default css style
...
There's no point in using qdata for looking this up, since
we only ever set it on the default screen anyway.
2016-05-06 10:14:07 -04:00
Lapo Calamandrei
1de2f21994
Adwaita: tidy treeview style properties...
...
...removing a double definition in the process.
2016-05-06 15:36:26 +02:00
Matthias Clasen
b938cfe5be
settings: Fix font names *again*
...
This is the last time, I hope.
2016-05-06 07:08:56 -04:00
Matthias Clasen
ff3264b4c5
widget: Store accessible in GtkWidgetPrivate
...
Every widget may have one of these, and they are accessed somewhat
frequently.
2016-05-06 06:44:28 -04:00
Matthias Clasen
cb8817f710
Ensure we initialize a quark first
...
The style function here can also be called before the corresponding
class_init had a chance to create the quark. Fix this.
2016-05-06 06:44:28 -04:00
Matthias Clasen
d91b8c91d3
tooltip: Ensure our quark is not 0
...
Many of the tooltip functions can be called before a tooltip
object is created, and thus initializing the quark in class_init
is not good enough.
2016-05-06 06:44:28 -04:00
Matthias Clasen
360a3c1690
Use a cheaper way to store settings per display
...
This was another very frequent use of qdata. Since we typically
have only one or two display objects, storing the display-settings
association in a simple array is faster than using object data
or a hash table.
2016-05-06 06:44:28 -04:00
Matthias Clasen
cca894b912
Use a cheaper way to store debug flags
...
This was the most frequent use of qdata *by far*.
2016-05-06 06:44:28 -04:00
Matthias Clasen
46edfaa89c
Fix indentation mishap
2016-05-06 06:44:28 -04:00
Matthias Clasen
c50e774b29
Fix a typo
2016-05-06 06:44:28 -04:00
Christian Hergert
ebb894cd64
wayland: use g_signal_handler_disconnect()
...
Use of g_signal_handlers_disconnect_by_func() needs to do more work than
necessary to find all the matching handlers. Instead, just hold on to the
signal identifier and remove it directly so we hit the fast path.
Not terribly ground breaking in terms of performance gains, but its done
enough to be worthwhile.
https://bugzilla.gnome.org/show_bug.cgi?id=766049
2016-05-06 11:33:12 +03:00
Matthias Clasen
c27b8b48ab
Update color name css style test
...
Verify rebeccapurple too.
2016-05-05 15:37:42 -04:00
Matthias Clasen
27210f523b
scale: Fix mark positioning at the left/top edge
...
We were failing to take the widget allocation.x/y into account
when deciding whether we need to push in the mark.
https://bugzilla.gnome.org/show_bug.cgi?id=765922
2016-05-05 15:17:56 -04:00
Matthias Clasen
6b64c31f6d
Generalize the previous commit
...
Update all xsettings when we get a screen, to prevent similar
problems from occurring in the future.
2016-05-05 14:13:03 -04:00
Matthias Clasen
fe7be14db8
settings: Avoid a crash
...
Christian Hergert reported seeing webkit crashes with recent
GTK+. The stacktrace points at the CSS machinery calling into
GtkSettings to get the font name, and then getting surprised
by a property notification that triggers style validation.
To avoid this, query the font name xsetting right away when
we get set a screen.
2016-05-05 13:32:58 -04:00
Carlos Garnacho
c14572fdae
x11: Rely on passive keyboard grabs with XI2 for DnD
...
The active keyboard grab can be spared then. This way the passive
key grabs allow other key combinations (eg. alt-tab) that are not
mandatory to grab here.
2016-05-05 19:16:25 +02:00
Lapo Calamandrei
870a674283
Adwaita: more flexible headerbar_fill mixin
...
add an additional background layer as a parameter.
2016-05-05 18:36:03 +02:00
Carlos Garnacho
27c1cce726
searchenginetracker: Quote fts match so it's seen as a single phrase
...
FTS5 has a complex enough syntax that it makes not much sense to wrap
in simple search boxes.
https://bugzilla.gnome.org/show_bug.cgi?id=765981
2016-05-05 16:40:33 +02:00
Timm Bäder
df38db70a0
label: Also initialize text
...
So gtk_label_get_text returns the default value of "". Broke the
GtkModelButton default value test.
2016-05-05 11:31:41 +02:00
Timm Bäder
c1d1d46d34
cssgadget: Remove unused function
2016-05-05 11:31:41 +02:00
Timm Bäder
f7e6385506
gtkrender: Remove superfluous cairo_save/restore calls
...
These were all surrounding functions that either call
cairo_save/cairo_restore themselves or don't need to.
2016-05-05 11:02:06 +02:00
Matthias Clasen
1c4e609750
css node: Stop extraneous change notification
...
The ::name and ::widget-type properties are entirely independent,
no need to notify both when either changes.
2016-05-04 16:05:40 -04:00
Matthias Clasen
bf66cd1e94
box: Only emit ::child-notify when necessary
...
We can easily check if the values for expand, padding and so forth
actually changed, so lets do it.
2016-05-04 15:05:08 -04:00
Matthias Clasen
5b19747ef8
Revert "When creating a widget path, use the widget type"
...
This reverts commit 0d78b67bca
.
As Benjamin points out: that'll break all widgets that query style
properties in their init function.
2016-05-04 13:52:22 -04:00
Matthias Clasen
0d78b67bca
When creating a widget path, use the widget type
...
No need to pull the type out of the css node - its our own type.
This will let us stop setting the type on the css node later on.
2016-05-04 13:42:54 -04:00
Matthias Clasen
3ca9a218ec
Set the proper state on the css node
...
This will almost certainly overwritten before the widget gets
to the screen, but while we are doing this, we might as well
use the same state that we initialize the widgets state to.
2016-05-04 13:42:54 -04:00
Matthias Clasen
7df668f2ac
css names are always set
...
No need to check for it, we set the css name on GtkWidgetClass
ourselves.
2016-05-04 13:42:54 -04:00
Timm Bäder
0efe186d95
switch: Remove .slider from slider gadget
...
As the documentation states, neither the switch nor the slider gadget
should be using any style classes.
2016-05-04 18:55:33 +02:00
Timm Bäder
4ba1f19b03
switch: Create less pango layouts
...
Instead of creating 2 pango layouts in every draw() and on in
_get_content_size (and calling into gettext twice in both cases), just
keep the layouts around and create them in only one place.
2016-05-04 18:35:30 +02:00
Matthias Clasen
1da048d19a
settings: Fix xsettings handling
...
I was somehow under the misconception that we'd get GdkEventSettings
events for all the xsettings at startup. That is not in general true,
so we need to make sure that we check for the xsettings value before
we use them, or derived fields. Update all the private getters to
do so; and fix settings_update_font_values() to cope with font
descriptions that might miss the family or size.
2016-05-04 11:19:03 -04:00
Matthias Clasen
1d0ba98d5d
settings: Ensure derived fields are initialized
...
I mistakenly assumed that gtk_settings_init was already doing
something to trigger a notify for all properties. It doesn't,
so we have to ensure that settings_update_font_values() is
called at least once.
https://bugzilla.gnome.org/show_bug.cgi?id=765966
2016-05-04 06:28:59 -04:00
Matthias Clasen
adc90b9e9d
wayland: Small improvements to update_direction
...
Avoid memory allocation if possible, and use the proper
min/max keycodes.
2016-05-03 23:14:05 -04:00
Matthias Clasen
09aa48b748
wayland: Don't emit direction-changed unless it did
...
We can easily check this, so lets do it.
2016-05-03 22:52:38 -04:00
Matthias Clasen
3b75cadc41
trivial formatting fixes
2016-05-03 22:36:20 -04:00
Matthias Clasen
449fd4a350
Use g_set_object in one more place
2016-05-03 22:15:17 -04:00
Timm Bäder
944f9d4f28
label: don't use set_text in gtk_label_new
...
It would just set up lots of things with the default values, but a
common case is that a few gtk_label_set_* calls follow.
2016-05-03 19:26:43 -04:00
Kjartan Maraas
e0ab19a8f0
Updated Norwegian bokmål translation.
2016-05-03 23:23:11 +02:00
Timm Bäder
4ae6f10ae9
label: minimum/natural size parameters are not nullable
...
Stop comparing them to NULL.
2016-05-03 16:25:57 -04:00
Timm Bäder
e75894da13
label: Don't set out parameters twice
...
We set them later again when we calculate the vertical size, so just
move the general assignment to -1 into the horizontal branch.
2016-05-03 16:25:57 -04:00
Timm Bäder
cb419794f8
widget: Remove useless NULL check
...
We are checking for allocation != NULL at the beginning of the function
already. This also means that the allocation parameter is not nullable.
2016-05-03 18:21:33 +02:00
Timm Bäder
71b360cc8e
roundedbox: Initialize the hashtable key before using it
...
In mem_hash, we are iterating over the individual bytes of the key, so
make sure all of it is initialized.
2016-05-03 10:58:02 -04:00
Benjamin Otte
a72c4576b2
cssimagebuiltin: Remove icons that don't draw anything anymore
2016-05-03 12:59:13 +02:00