Matthias Clasen
fe1e2cbfad
css section: No need for atomic refcounting
...
We are all in one thread, anyway.
2015-09-12 12:50:38 -04:00
Matthias Clasen
3eacfa88f2
Avoid type checking overhead for resize-mode
2015-09-12 12:50:38 -04:00
Matthias Clasen
95cf550e15
window: Avoid unnecessary detours
...
Don't call gtk_widget_get_screen on a window - it only ends up
calling gtk_window_get_screen in the end, anyway.
2015-09-12 12:50:38 -04:00
Matthias Clasen
caa0ee3d25
Remove type check from gtk_widget_get_request_mode
2015-09-12 12:50:38 -04:00
Matthias Clasen
09e4f753fd
widget: Move _gtk_widget_peek_request_cache to private.h
2015-09-12 12:50:38 -04:00
Matthias Clasen
20c49b8837
css node declaration: Avoid optional out parameters
...
Always pass a pos to find_class, and avoid the if.
2015-09-12 12:50:37 -04:00
Matthias Clasen
29505af07f
css node declaration: Fix a typo
2015-09-12 12:50:37 -04:00
Matthias Clasen
bbeec3608f
css section: Replace g_return by gtk_internal_return
2015-09-12 11:29:46 -04:00
Matthias Clasen
a9b80a6391
style cascade: Replace g_return by gtk_internal_return
2015-09-12 11:29:37 -04:00
Matthias Clasen
60ccda0597
css lookup: Replace g_return by gtk_internal return
...
These functions are called in an inner loop in
gtk_css_style_provider_lookup.
2015-09-12 11:28:39 -04:00
Matthias Clasen
83d68ea107
css selector: Use a builtin to count bits
2015-09-12 11:24:43 -04:00
Matthias Clasen
a831f1fb11
css matcher: Avoid a redundant call
...
The sole caller passes an interned string, so we don't
need to call g_intern_string again.
2015-09-12 11:24:42 -04:00
Matthias Clasen
11d3582333
css selector: Take advantage of interned strings
...
We know these strings are interned, no need to use strcmp or
g_str_hash for hem.
2015-09-12 11:24:42 -04:00
Matthias Clasen
4654fa6efe
bitmask: Trivial formatting fix
2015-09-12 11:24:37 -04:00
Matthias Clasen
c86f0b1b23
bitmask: Optimize no-op resizes
...
Statistics for the gtk3-demo listbox example show that the
vast majority of calls to _gtk_allocated_bitmask_resize go
from a size of 2 to 2. Don't needlessly call realloc() in
this case.
2015-09-12 11:24:37 -04:00
Matthias Clasen
0957ba5220
bitmask: Optimize intersect
...
The functions was written in a way that would possibly
resize the mask twice, which is not necessary.
2015-09-12 11:24:37 -04:00
Matthias Clasen
3a503b7ba1
widget-factory: Simplify the ui file
2015-09-12 11:24:37 -04:00
Matthias Clasen
3b67184f86
gtk-demo: Simplify ui files
2015-09-12 11:24:37 -04:00
Matthias Clasen
a531633660
Run gtk-builder-tool simplify over all templates
2015-09-12 11:24:36 -04:00
Matthias Clasen
3c247f20ea
gtk-builder-tool: Canonicalize booleans
...
Always write booleans as '0' or '1'.
2015-09-12 11:24:36 -04:00
Matthias Clasen
4b92f0895a
builder: Minor tweak
2015-09-12 11:24:36 -04:00
Benjamin Otte
c6a5a12922
widgetpath: Implement using GtkCssNodeDeclaration
...
This removes a bunch of code but more importantly allows providing the
declaration in CSS matchers.
2015-09-12 05:27:35 +02:00
Benjamin Otte
610452dda8
cssnode: Move clear_classes() into the NodeDeclaration
...
The previous code was crashing when used as the returned classes array
would have been invalid after the first deletion. So if a 2nd class
would be deleted, invalid memory might have been referenced.
2015-09-12 05:27:35 +02:00
Garrett Regier
6118893a4e
stylecontext: Fix list_classes() after optimization
...
Otherwise a junk value is returned.
2015-09-11 09:48:38 -07:00
Garrett Regier
6d29c1db92
widgetpath: Remove bad function prototypes
2015-09-11 09:48:38 -07:00
Benjamin Otte
f92c861eec
iconcache: Guard deprecated gdk-pixbuf APIs
2015-09-11 18:33:05 +02:00
Garrett Regier
41b386cd6a
cssnode: Optimize listing of classes
...
Avoid creating the GList of strings when the GQuarks
will just be determined again. Instead have
gtk_style_context_list_classes() do it specifically.
2015-09-11 18:26:11 +02:00
Garrett Regier
44460cd720
container: Don't add classes twice
...
_gtk_widget_create_path() already adds the style classes.
2015-09-11 17:56:44 +02:00
Alberts Muktupāvels
4539804086
gtkplug.c: remove draw function, not needed
...
Background will be rendered by parent class - GtkWindow.
https://bugzilla.gnome.org/show_bug.cgi?id=754854
2015-09-11 17:56:44 +02:00
Michael Weghorn
838391e420
Improve printer distinction for option retrieval
...
In order to retrieve the user options for a printer, the respective
printer name is used.
This fixes the comparison of printer names to avoid that the options of
another printer are accidently read whose name starts with the same
letters, but is longer (e.g. "myprinterlongername" instead of
"myprinter").
This fixes Bug 753628.
2015-09-11 15:19:35 +02:00
Jakub Steiner
3ffef0ca03
HighContrast: make sidebar list rows taller
...
sync with Adwaita
https://bugzilla.gnome.org/show_bug.cgi?id=754866
2015-09-11 12:40:48 +02:00
Ross Lagerwall
4993b02da8
GtkFileSystem: Add to the list of remote filesystems
...
Add afp and google-drive to the list of remote filesystems.
https://bugzilla.gnome.org/show_bug.cgi?id=754746
2015-09-10 21:46:36 +01:00
Dušan Kazik
f90b97cf0e
Updated Slovak translation
2015-09-10 16:26:56 +00:00
Timm Bäder
a6982cc76e
GtkWidget: Fix typo in #ifdef
...
It's ENABLE, not ENABEL. Also fix the corresponding #endif comments.
2015-09-10 11:47:34 +02:00
Timm Bäder
3900700479
GtkContainer: Fix paramter name in doc comment
2015-09-10 11:34:44 +02:00
Matthias Clasen
cf0e087527
Optimize gtk_css_node_declaration_has_class
...
This function is getting called a lot. Statistics for the gtk3-demo
listbox example show most calls with 0-4 classes. Unrolling the cases
a bit brings the instruction count in callgrind from 93M to 52M.
2015-09-09 14:40:36 -04:00
Matthias Clasen
59797754b4
More bit manipulation speedups
...
The same trick that was applied to _gtk_css_change_for_child in
the previous commit can be applied to _gtk_css_change_for_sibling
as well, and that is what this commit does.
With both functions converted, gtk_css_change_translate is no
longer needed and gets dropped.
2015-09-09 14:09:21 -04:00
Matthias Clasen
d7dd6eccd5
Manipulate bits more efficiently
...
The function to translate GtkCssChange enum values to the PARENT
ones is called very frequently. This patch speeds it up tremendously.
The callgrind instruction count for this function in the listbox
demo goes from 108M to 7M.
2015-09-09 14:02:27 -04:00
Matthias Clasen
a9481cb410
match_all: Only allocate an array when needed
...
My statistics show that more than half of all calls end up
with 0 matches, so we can avoid some overhead by not allocating
an array at all in this case.
2015-09-09 11:17:13 -04:00
Matthias Clasen
2d29ae4159
Handle match_all returning NULL
...
This is in preparation for not allocating an array at all if there
are no matches.
2015-09-09 11:17:13 -04:00
Matthias Clasen
117b50f8fb
Optimize gtk_css_selector_match_all
...
We are dealing with really short lists here.
95% are < 10 matches, and the longest I've been able to record was 19.
So just do away with the hash table and do sorted insertion in
the array directly.
2015-09-09 11:17:13 -04:00
Carlos Garnacho
dbf85cc4db
x11: Declare variable for the inner loop
...
Otherwise the outer loop control variable is messed up, and we end
up with uninitialized axes if there were any more valuators after
the XIKeyClass one.
This bug was sneakily introduced by fdb9a8e14
, many thanks to
Carlos Soriano for helping spot the source of this bug.
https://bugzilla.gnome.org/show_bug.cgi?id=753431
2015-09-09 16:46:26 +02:00
Lapo Calamandrei
f7894a7588
Adwaita: special case selection mode lists checks
...
...otherwise the special selection mode 40x40px checks are used
shrinked to 16x16.
See https://bugzilla.gnome.org/show_bug.cgi?id=754610
2015-09-09 16:37:49 +02:00
Matthias Clasen
d52da39183
Update the gtk3-demo man page
...
We have options now !
2015-09-09 10:20:07 -04:00
Matthias Clasen
23d7c3d435
gtk-demo:Add a --list option
...
This just shows the available examples and then exists.
2015-09-09 10:14:17 -04:00
Matthias Clasen
bce8d771a2
gtk-demo: Make --autoquit a simple option
...
No real need to specify the amount of delay, just make this
a plain boolean.
2015-09-09 08:07:20 -04:00
Matthias Clasen
9da0aa5d40
Use G_ENABLE_CONSISTENCY_CHECKS for template finalization checks
2015-09-09 06:32:47 -04:00
Matthias Clasen
0e86278fcc
css selector: Use the quarks we have
...
Unless I'm missing something, there is no reason to go from
quarks back to strings to implement hasing or comparison.
2015-09-09 06:32:47 -04:00
Matthias Clasen
c8072c89ba
style provider private: Use gtk_internal_return_if_fail
2015-09-09 06:32:47 -04:00
Matthias Clasen
3526b08e01
Clean up debug features
...
Introduce a GTK_DEBUG_CHECK() macro and use it to check for
GTK_DEBUG flags everywhere. Also guard all such places by
2015-09-09 06:32:46 -04:00