]> Pileus Git - ~andy/gtk/log
~andy/gtk
12 years agoPrefer xdg data directory to legacy .icons directory
William Jon McCann [Fri, 27 Apr 2012 16:39:17 +0000 (12:39 -0400)]
Prefer xdg data directory to legacy .icons directory

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

12 years agoTry to load css themes from the XDG config directory first
William Jon McCann [Fri, 27 Apr 2012 16:32:18 +0000 (12:32 -0400)]
Try to load css themes from the XDG config directory first

Will fall back to previous locations.

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

12 years agoMigrate to XDG config dir for custom papers
William Jon McCann [Fri, 27 Apr 2012 16:23:38 +0000 (12:23 -0400)]
Migrate to XDG config dir for custom papers

Will read from old location if new location isn't found but will
only write to the new location.

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

12 years agoDon't load binary modules from the home directory by default
William Jon McCann [Fri, 27 Apr 2012 14:52:13 +0000 (10:52 -0400)]
Don't load binary modules from the home directory by default

We should rely on the module path environment variables being
set correctly for the architecture rather than load from .gtk-3.0

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

12 years agoFix the colord support in GtkPrinterCups when the PPD is loaded async
Richard Hughes [Thu, 26 Apr 2012 16:13:49 +0000 (17:13 +0100)]
Fix the colord support in GtkPrinterCups when the PPD is loaded async

If the PPD is not available when the printer is loaded then the PPD options are
not available and we can't get the correct qualifier to use with colord.

When the PPD becomes available, refresh the profile title to reflect reality.

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

12 years agoGtkGrid: Add a note about overlapping children
Matthias Clasen [Sat, 28 Apr 2012 06:19:45 +0000 (02:19 -0400)]
GtkGrid: Add a note about overlapping children

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

12 years agoRevert "WIP: make GtkNotebook window-draggable"
Matthias Clasen [Sat, 28 Apr 2012 06:06:37 +0000 (02:06 -0400)]
Revert "WIP: make GtkNotebook window-draggable"

This reverts commit b3a66c59ade144c094d4dbc568e33a5ef85c1a7d.

12 years agotreemodelsort: fix iter_previous so it can go back to the first item
Carlos Garnacho [Sun, 22 Apr 2012 20:32:46 +0000 (22:32 +0200)]
treemodelsort: fix iter_previous so it can go back to the first item

It was getting the previous element, then checking whether it was the
first one, that has to be inverted so it doesn't stop on the second
item.

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

12 years agoWIP: make GtkNotebook window-draggable
Diego Escalante Urrelo [Wed, 28 Mar 2012 08:38:10 +0000 (03:38 -0500)]
WIP: make GtkNotebook window-draggable

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

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

12 years agoAdd a 'fine adjustment' mode to ranges
Matthias Clasen [Thu, 26 Apr 2012 21:51:13 +0000 (17:51 -0400)]
Add a 'fine adjustment' mode to ranges

Shift-click in the slider now starts a drag in 'fine adjustment'
mode, where we move the slider 10-times slower than the mouse.

This can be very helpful when scrolling through a very long document
or webpage, and moving the scrollbar even a single pixel already
jumps too far in the content.

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

12 years agoChange button bindings for range widgets around
Matthias Clasen [Thu, 26 Apr 2012 20:32:14 +0000 (16:32 -0400)]
Change button bindings for range widgets around

It seems to be general consensus that button 1 should do the jumping,
so we now jump to the clicked position on primary button clicks and
page on secondary button clicks. Touch behaves like primary.

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

12 years agostylecontext: Add GTK_STYLE_CLASS_DIM_LABEL
Debarshi Ray [Fri, 20 Apr 2012 13:35:44 +0000 (15:35 +0200)]
stylecontext: Add GTK_STYLE_CLASS_DIM_LABEL

Fixes: https://bugzilla.gnome.org/674468
12 years agogtk-demo: fix the tool palette demo
Matthias Clasen [Fri, 27 Apr 2012 12:30:05 +0000 (08:30 -0400)]
gtk-demo: fix the tool palette demo

The palette was confined to its minimal size, when in horizontal mode.

12 years agotoolpalette: Configure adjustment properly
Benjamin Otte [Fri, 27 Apr 2012 01:33:57 +0000 (03:33 +0200)]
toolpalette: Configure adjustment properly

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

12 years agotoolpalette: Rename variable
Benjamin Otte [Fri, 27 Apr 2012 01:28:22 +0000 (03:28 +0200)]
toolpalette: Rename variable

The variable that holds the total size for all widget allocations
shouldn't be called page_start.

12 years agoicontheme: search first in all themes if the requested icon is symbolic
Cosimo Cecchi [Wed, 25 Apr 2012 01:47:33 +0000 (21:47 -0400)]
icontheme: search first in all themes if the requested icon is symbolic

Symbolic icons use a "-symbolic" suffix to distinguish themselves from
highcolor variants. Note that the dash character here has a different
meaning than the specificity level defined in the icon-naming-spec [1],
as it identifies a property of the icon itself.

Since they might be provided by a parent theme (e.g. the HighContrast theme
relies on the gnome icon theme for them), when we are looking up one we
should first escape the generic icon inheritance mechanism defined in the
icon-naming-spec [1], and privilege a symbolic icon, if it exists in a
parent theme, before applying the inheritance evaluation.

This fixes symbolic icons not working properly when used in the
HighContrast theme with the GTK_ICON_LOOKUP_GENERIC_FALLBACK flag set.

[1]
http://standards.freedesktop.org/icon-naming-spec/latest/ar01s03.html

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

12 years agothemingengine: simplify render_extension() default implementation
Cosimo Cecchi [Wed, 25 Apr 2012 00:22:24 +0000 (20:22 -0400)]
themingengine: simplify render_extension() default implementation

Avoid doing useless translations/rotations, since themes will most
likely set different CSS gradients using left/right/top/bottom style
classes, or use a plain color.

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

12 years agothemingengine: render a frame in gtk_render_handle()
Cosimo Cecchi [Wed, 25 Apr 2012 01:47:45 +0000 (21:47 -0400)]
themingengine: render a frame in gtk_render_handle()

We already render a background there after all.

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

12 years agospinbutton: port to GtkIconHelper
Cosimo Cecchi [Wed, 25 Apr 2012 01:17:25 +0000 (21:17 -0400)]
spinbutton: port to GtkIconHelper

Instead of doing our own lookup for symbolic icons and rendering the
pixbuf, use GtkIconHelper as other widgets do, which saves a bunch of
code.

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

12 years agoRegenerate the gdk/gdkkeysyms.h and gdk/gdkkeysyms-compat.h files
Mark Vender [Thu, 12 Apr 2012 11:35:20 +0000 (11:35 +0000)]
Regenerate the gdk/gdkkeysyms.h and gdk/gdkkeysyms-compat.h files

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

12 years agoFix the gdk/gdkkeysyms-update.pl to reflect new upstream location
Mark Vender [Thu, 12 Apr 2012 11:33:26 +0000 (11:33 +0000)]
Fix the gdk/gdkkeysyms-update.pl to reflect new upstream location

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

12 years agowayland: Calculate window position offset to give emulated root coordinates
Rob Bradford [Mon, 23 Apr 2012 16:26:49 +0000 (17:26 +0100)]
wayland: Calculate window position offset to give emulated root coordinates

This allows combo box popup windows to appear in the correct place. This is a
workaround emulating root coordinates by calculating the offset for a chain
of windows that that are relative to each other.

12 years agowayland: Only update position if the with_move flag is set
Rob Bradford [Fri, 20 Apr 2012 16:57:33 +0000 (17:57 +0100)]
wayland: Only update position if the with_move flag is set

This was causing the combobox popup to be moved to (0,0) when just the
size was asserted.

12 years agowayland: Improve error message handling in cursor buffer code
Rob Bradford [Fri, 20 Apr 2012 12:53:54 +0000 (13:53 +0100)]
wayland: Improve error message handling in cursor buffer code

12 years agoMake page up/down work again in scrolled menus
Matthias Clasen [Wed, 25 Apr 2012 03:34:12 +0000 (23:34 -0400)]
Make page up/down work again in scrolled menus

This was broken since before GTK+ 3.0, when we replaced
a use of requisition by allocation. Fix this by using the
requisition height, that is already cached by the menu code.

The math is not quite right here; if you page all the way
down a long menu, you end up on the second-to-last menuitem.
But at least, page up/down let you move up and down the menu
again.
https://bugzilla.gnome.org/show_bug.cgi?id=668931

12 years agoFix build with XInput < 2.2
Sam Thursfield [Tue, 24 Apr 2012 11:49:51 +0000 (12:49 +0100)]
Fix build with XInput < 2.2

Fixes regression introduced in fa8e6f7857e9b4afba227c3108111f359dc826d5

12 years agodocs: add gtk_builder_add_from_resource() to gtk-doc
Cosimo Cecchi [Mon, 23 Apr 2012 21:41:54 +0000 (17:41 -0400)]
docs: add gtk_builder_add_from_resource() to gtk-doc

12 years agoRemove some more CUPS 1.2 ifdefs.
John Ralls [Mon, 23 Apr 2012 19:37:48 +0000 (12:37 -0700)]
Remove some more CUPS 1.2 ifdefs.

12 years agoBug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
John Ralls [Sun, 19 Feb 2012 23:11:24 +0000 (15:11 -0800)]
Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6

Fix up accesses of ipp structures in gtkcupsutils.c

12 years agoBug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
John Ralls [Sun, 19 Feb 2012 21:48:19 +0000 (13:48 -0800)]
Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6

Having refactored cups_request_printer_list_cb so that the cups
version-dependent block size is small enough to be handled in a single ifdef,
make the ifdef HAVE_CUPS_API_1_6 block.

12 years agoMove some variable declarations into the scopes in which they're used.
John Ralls [Sun, 19 Feb 2012 21:45:17 +0000 (13:45 -0800)]
Move some variable declarations into the scopes in which they're used.

12 years agoExtract Function cups_create_printer
John Ralls [Sun, 19 Feb 2012 21:29:11 +0000 (13:29 -0800)]
Extract Function cups_create_printer

12 years agoExtract function cups_printer_handle_attribute
John Ralls [Sun, 19 Feb 2012 21:28:42 +0000 (13:28 -0800)]
Extract function cups_printer_handle_attribute

12 years agoExtract printer setup variables into a struct
John Ralls [Sun, 19 Feb 2012 21:19:11 +0000 (13:19 -0800)]
Extract printer setup variables into a struct

So that it can be passed as a single parameter to functions as we extract-function to make cups_request_printer_list_cb more manageable.

Note that not all of the affected variables are changed in this changeset. Those are in extracted functions and will be addressed in the next two changes.

12 years agoCreate enum PrinterStateLevel
John Ralls [Sun, 19 Feb 2012 21:15:40 +0000 (13:15 -0800)]
Create enum PrinterStateLevel

Fixes "magic number" in printer_state_reason_level.

12 years agoExtract reasons and reasons_desc arrays to file level
John Ralls [Sun, 19 Feb 2012 21:14:36 +0000 (13:14 -0800)]
Extract reasons and reasons_desc arrays to file level

So that they can be used from more than one function. Rename them to avoid naming conflicts.

12 years agoBug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
John Ralls [Sat, 18 Feb 2012 22:16:27 +0000 (14:16 -0800)]
Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6

The first, simple changes. Turns off the deprecation warnings and substitutes macros and short ifdef blocks where feasible.

12 years agoStyleProviderPrivate: mark internal variable as static
Giovanni Campagna [Sun, 22 Apr 2012 17:25:16 +0000 (19:25 +0200)]
StyleProviderPrivate: mark internal variable as static

Otherwise, it could conflict with other symbols with the same
name exported by a different shared library, with undefined
effects.

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

12 years agoUpdated Russian translation
Yuri Kozlov [Mon, 23 Apr 2012 08:14:57 +0000 (12:14 +0400)]
Updated Russian translation

12 years agoxi2: ignore extraneous events for smooth scroll
Cosimo Cecchi [Fri, 20 Apr 2012 21:34:08 +0000 (17:34 -0400)]
xi2: ignore extraneous events for smooth scroll

Since the event will be ignored anyway after it's translated (slave
devices are disabled), don't let it run in the smooth scroll code path,
as it will burn our caches for the actual event we're interested in.

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

12 years agoxi2: fix thinko in variable type
Cosimo Cecchi [Fri, 20 Apr 2012 21:24:45 +0000 (17:24 -0400)]
xi2: fix thinko in variable type

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

12 years agoXI2: More logging for smooth scrolling
Matthias Clasen [Sun, 22 Apr 2012 16:50:29 +0000 (12:50 -0400)]
XI2: More logging for smooth scrolling

In addition to the delta, log device information.
This was triggered by
https://bugzilla.gnome.org/show_bug.cgi?id=673644

12 years agoBeginning of keyhash tests
Matthias Clasen [Sun, 22 Apr 2012 05:32:20 +0000 (01:32 -0400)]
Beginning of keyhash tests

Not very interesting yet

12 years agoquartz: fix coordinates for synthesized event
Kristian Rietveld [Sun, 22 Apr 2012 15:11:38 +0000 (17:11 +0200)]
quartz: fix coordinates for synthesized event

Of course, we must pass coordinates in the NSWindow coordinate system
when creating an NSEvent. This fixes drag icon positioning and makes
the icon slide back to the correct position when the drag is
canceled.

12 years agoUpdated Hebrew translation.
Yaron Shahrabani [Sun, 22 Apr 2012 08:43:37 +0000 (11:43 +0300)]
Updated Hebrew translation.

12 years agoUpdated Bulgarian translation
Alexander Shopov [Sun, 22 Apr 2012 06:13:05 +0000 (09:13 +0300)]
Updated Bulgarian translation

12 years agoUpdated Serbian translation
Мирослав Николић [Sat, 21 Apr 2012 07:30:37 +0000 (09:30 +0200)]
Updated Serbian translation

12 years ago./configure: fix error output for no -libXext
Ryan Lortie [Mon, 16 Apr 2012 13:34:30 +0000 (09:34 -0400)]
./configure: fix error output for no -libXext

Due to the way the tests are structured, a missing libXext will give a
warning about a missing libX11 (even if libX11 is installed).  This is
confusing to people who are trying to build Gtk.

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

12 years agoprinting: Localize loaded PPD files
Marek Kasik [Fri, 20 Apr 2012 15:09:58 +0000 (17:09 +0200)]
printing: Localize loaded PPD files

Use ppdLocalize() to localize strings in loaded PPD file (#674326).

12 years agoprinting: Get default number-up value from CUPS
Marek Kasik [Tue, 17 Apr 2012 15:12:56 +0000 (17:12 +0200)]
printing: Get default number-up value from CUPS

Requests "number-up-default" attribute from CUPS and
uses its value for setting value of "gtk-n-up" option.
(#672993)

12 years agogtk-demo: Find gtk-demo-application.exe on win32
Alexander Larsson [Fri, 20 Apr 2012 14:00:48 +0000 (16:00 +0200)]
gtk-demo: Find gtk-demo-application.exe on win32

We need to append the ".exe" extension when looking for the
application file on windows.

12 years agoFix a cornercase of menu parsing
Matthias Clasen [Fri, 20 Apr 2012 05:50:01 +0000 (01:50 -0400)]
Fix a cornercase of menu parsing

When a uimanager in a gtkbuilder file contains a menu,
the builder parser was getting confused.

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

12 years agoCosmetic
Matthias Clasen [Fri, 20 Apr 2012 03:41:53 +0000 (23:41 -0400)]
Cosmetic

12 years agostylecontext: add a define for an OSD style class
Cosimo Cecchi [Thu, 19 Apr 2012 19:01:04 +0000 (15:01 -0400)]
stylecontext: add a define for an OSD style class

12 years agostylecontext: reorder style classes defines
Cosimo Cecchi [Thu, 19 Apr 2012 19:00:03 +0000 (15:00 -0400)]
stylecontext: reorder style classes defines

A couple of style classes defines ended up mixed with the region
defines.

12 years agowayland: Improve the error reporting in the Cairo GL surface code path
Rob Bradford [Thu, 19 Apr 2012 16:25:56 +0000 (17:25 +0100)]
wayland: Improve the error reporting in the Cairo GL surface code path

12 years agowayland: Improve error messages during SHM buffer creation
Rob Bradford [Thu, 19 Apr 2012 16:18:46 +0000 (17:18 +0100)]
wayland: Improve error messages during SHM buffer creation

Use g_critical rather than fprintf and and also grab the error messages from
errno and from Cairo

12 years agoGtkAppplication docs: Fix small typo.
Murray Cumming [Thu, 19 Apr 2012 07:25:40 +0000 (09:25 +0200)]
GtkAppplication docs: Fix small typo.

12 years agoUpdated Czech translation
Marek Černocký [Wed, 18 Apr 2012 20:02:40 +0000 (22:02 +0200)]
Updated Czech translation

12 years agomessagedialog: also set GtkMisc alignment to zero for dialog labels
Cosimo Cecchi [Wed, 18 Apr 2012 18:40:33 +0000 (14:40 -0400)]
messagedialog: also set GtkMisc alignment to zero for dialog labels

Setting xalign to START is not enough to make them left-aligned in every
case. This fixes a regression introduced in commit
cc0be1f949020de1562534fbc31ddf0af4651fe2

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

12 years agomessagedialog: don't use gtk_widget_override_font()
Cosimo Cecchi [Wed, 18 Apr 2012 17:46:39 +0000 (13:46 -0400)]
messagedialog: don't use gtk_widget_override_font()

Instead of overriding the font theme settings, just set the Pango
attributes we want on the label. This fixes message dialogs growing on
style_update after recent GTK+ changes.

12 years agogdk: add missing GDK_VERSION_3_6 symbol
Cosimo Cecchi [Wed, 18 Apr 2012 17:23:29 +0000 (13:23 -0400)]
gdk: add missing GDK_VERSION_3_6 symbol

12 years agocontainer: fix wrong branching logic
Cosimo Cecchi [Wed, 18 Apr 2012 16:12:32 +0000 (12:12 -0400)]
container: fix wrong branching logic

If the resize mode of the container was GTK_RESIZE_IMMEDIATE we would
also fall trough to the next case in the switch, and always throw an
assertion.

12 years agoUpdated Slovenian translation
Matej Urbančič [Tue, 17 Apr 2012 19:44:37 +0000 (21:44 +0200)]
Updated Slovenian translation

12 years agoUpdated Galician translations
Fran Diéguez [Tue, 17 Apr 2012 18:04:05 +0000 (20:04 +0200)]
Updated Galician translations

Signed-off-by: Fran Diéguez <fran.dieguez@mabishu.com>
12 years agowayland: Expose GdkWaylandDisplayManager as a public GType
Rob Bradford [Tue, 17 Apr 2012 17:28:55 +0000 (18:28 +0100)]
wayland: Expose GdkWaylandDisplayManager as a public GType

This permits a runtime test of whether we are running on the Wayland platform
or not.

12 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 17 Apr 2012 16:03:01 +0000 (18:03 +0200)]
Updated Spanish translation

12 years agoUpdated POTFILES.in
Piotr Drąg [Tue, 17 Apr 2012 15:17:21 +0000 (17:17 +0200)]
Updated POTFILES.in

12 years agowayland: Rename GdkScreenWayland to GdkWaylandScreen
Rob Bradford [Tue, 17 Apr 2012 13:06:18 +0000 (14:06 +0100)]
wayland: Rename GdkScreenWayland to GdkWaylandScreen

This makes it consistent with the functions in the vtable and also consistent
with other backends.

12 years agowayland: Rename GdkDisplayWayland to GdkWaylandDisplay
Rob Bradford [Mon, 16 Apr 2012 15:55:43 +0000 (16:55 +0100)]
wayland: Rename GdkDisplayWayland to GdkWaylandDisplay

This makes it consistent with the functions in the vtable and also consistent
with other backends.

12 years agotests: Add a parsing test for the transition property
Benjamin Otte [Tue, 17 Apr 2012 06:52:10 +0000 (08:52 +0200)]
tests: Add a parsing test for the transition property

12 years agocontainer: Redo style validation handling
Benjamin Otte [Fri, 13 Apr 2012 15:27:47 +0000 (17:27 +0200)]
container: Redo style validation handling

Instead of using 1 global queue for both resizes and style validation,
use 2 queues. This makes the code a lot simpler and fixes a bug where we
could accidentally stop restylying for very delayed restyles.

12 years agocontainer: needs_resize is a container flag, not a widget flag
Benjamin Otte [Fri, 13 Apr 2012 14:51:19 +0000 (16:51 +0200)]
container: needs_resize is a container flag, not a widget flag

The widget flag is alloc_needed, needs_resize is used for "is queued
into the container resize queue".

12 years agocssvalue: Remove GObject macros
Benjamin Otte [Wed, 11 Apr 2012 16:10:52 +0000 (18:10 +0200)]
cssvalue: Remove GObject macros

GtkCssValue is not a GObject

12 years agostylecontext: Avoid style_context_save() calls
Benjamin Otte [Wed, 11 Apr 2012 14:36:48 +0000 (16:36 +0200)]
stylecontext: Avoid style_context_save() calls

Introduce style_data_lookup_for_state() that does this.

12 years agostylecontext: Pull all the animation code together
Benjamin Otte [Wed, 11 Apr 2012 14:27:38 +0000 (16:27 +0200)]
stylecontext: Pull all the animation code together

We now animate the core style information (see comment in
gtk_style_context_save()). A lot of widgets save + set custom style
classes/states during drawing and so can't be animated. It does work for
labels, menus and buttons though.

12 years agostylecontext: Add GtkCssAnimatedValues
Benjamin Otte [Wed, 11 Apr 2012 14:15:45 +0000 (16:15 +0200)]
stylecontext: Add GtkCssAnimatedValues

This is a GtkCssComputedValues subclass. So it's essentially a store for
computed CSS values. But it can be animated by advancing it to a certain
timestamp.

12 years agoanimation: Add CSS transition object
Benjamin Otte [Wed, 11 Apr 2012 14:04:46 +0000 (16:04 +0200)]
animation: Add CSS transition object

This is an implementation of GtkStyleAnimation for CSS transitions.

Again, this doesn't do anything but store the data needed to do the
transition.

12 years agostylecontext: Add new class for animation handling
Benjamin Otte [Wed, 11 Apr 2012 14:00:57 +0000 (16:00 +0200)]
stylecontext: Add new class for animation handling

A StyleAnimation is an immutable object used to track the state of CSS
values. I'd have liked to make it fully immutable - ie not have the
timestamp in there - but couldn't find a place to sanely store the
timestamp.

This is an abstract base class. Implementations for this will be added
later (for both CSS3 transitions and animations, potentially for
animated images).

Actually aplying the information in this object will be done by a
different object commtted later.

12 years agobutton: Remove _gtk_button_paint()
Benjamin Otte [Wed, 11 Apr 2012 13:02:56 +0000 (15:02 +0200)]
button: Remove _gtk_button_paint()

All buttons use the same paint function these days. States are managed
correctly so this was just leftovers from GTK 1 or GTK 2.

12 years agomenuitem: Don't set menubar style class randomly
Benjamin Otte [Wed, 11 Apr 2012 13:02:00 +0000 (15:02 +0200)]
menuitem: Don't set menubar style class randomly

a) We're not a menubar, you can match on the parent if you have to
b) It's not set while getting preferred sizes

12 years agowidget: Set .default class when widget is default
Benjamin Otte [Wed, 11 Apr 2012 12:56:15 +0000 (14:56 +0200)]
widget: Set .default class when widget is default

Don't just conditionally set it on buttons.

12 years agostylecontext: Shuffle around code
Benjamin Otte [Wed, 11 Apr 2012 10:37:44 +0000 (12:37 +0200)]
stylecontext: Shuffle around code

This has two goals:

1) Move invalidation code out of a nested if branch. Invalidation is
actually the most important thing this function does.

2) Have the changes bitmask available. It will needed for invalidate
calls to children later.

12 years agostylecontext: Add style_info_set_data()
Benjamin Otte [Wed, 11 Apr 2012 10:22:07 +0000 (12:22 +0200)]
stylecontext: Add style_info_set_data()

.. to take care of the refcounting properly.

12 years agostylecontext: Make StyleInfo keep the next pointer
Benjamin Otte [Wed, 11 Apr 2012 10:14:36 +0000 (12:14 +0200)]
stylecontext: Make StyleInfo keep the next pointer

12 years agostylecontext: Make StyleData refcounted
Benjamin Otte [Tue, 10 Apr 2012 21:24:41 +0000 (23:24 +0200)]
stylecontext: Make StyleData refcounted

This is needed for animations where we want to keep a custom StyleData
for animations.

12 years agostylecontext: Add public API to stop animations
Benjamin Otte [Tue, 10 Apr 2012 13:50:00 +0000 (15:50 +0200)]
stylecontext: Add public API to stop animations

... and use it.

Of course, there still are no animations, so we don't turn anything off
yet.

12 years agostylecontext: Add an animating framework
Benjamin Otte [Tue, 10 Apr 2012 13:37:35 +0000 (15:37 +0200)]
stylecontext: Add an animating framework

The design principles were:

- synchronized
If multiple style contexts are animating, they should all do an
animation step at the same time.

- degrades well
Even when there's thousands of style contexts all animating at the same
time, the animation steps don't starve the CPU. This is achieved by
making sure the timeout is really fast. It just sets a bunch of flags.

- no hidden bottlenecks
Turning animatability on or off on a style context is O(1).

So far it is unused.

12 years agocomputedvalues: Split out a function
Benjamin Otte [Tue, 10 Apr 2012 11:25:56 +0000 (13:25 +0200)]
computedvalues: Split out a function

12 years agostylecontext: Don't queue a resize when none is needed
Benjamin Otte [Mon, 9 Apr 2012 19:15:22 +0000 (21:15 +0200)]
stylecontext: Don't queue a resize when none is needed

12 years agocontainer: Split out a function
Benjamin Otte [Mon, 9 Apr 2012 19:04:47 +0000 (21:04 +0200)]
container: Split out a function

12 years agocontainer: Remove duplicated flag
Benjamin Otte [Mon, 9 Apr 2012 18:53:37 +0000 (20:53 +0200)]
container: Remove duplicated flag

GtkContainer::need_resize and GtkWidget::alloc_needed are the same
thing.

12 years agocontainer: Simplify code
Benjamin Otte [Mon, 9 Apr 2012 18:28:45 +0000 (20:28 +0200)]
container: Simplify code

This code should not have any functional changes and just be simpler.

12 years agostylecontext: Listen to the new changed signal
Benjamin Otte [Sun, 8 Apr 2012 15:34:17 +0000 (17:34 +0200)]
stylecontext: Listen to the new changed signal

12 years agostyleprovider: Make all implementors emit the new signal
Benjamin Otte [Sun, 8 Apr 2012 15:35:24 +0000 (17:35 +0200)]
styleprovider: Make all implementors emit the new signal

... and listen to it in the cases where they use other style providers.

12 years agostyleprovider: Add a private signal for when things change
Benjamin Otte [Sun, 8 Apr 2012 15:33:22 +0000 (17:33 +0200)]
styleprovider: Add a private signal for when things change

12 years agostylecontext: Pass time to style_context_validate()
Benjamin Otte [Sat, 7 Apr 2012 20:44:00 +0000 (22:44 +0200)]
stylecontext: Pass time to style_context_validate()

This way, we can ensure that every style context uses the same timestamp
for whatever they do.

12 years agostylecontext: Compute if things changed before invalidating
Benjamin Otte [Sat, 7 Apr 2012 16:09:17 +0000 (18:09 +0200)]
stylecontext: Compute if things changed before invalidating

This is only a small performance boost by itself, but it's necessary
for animations, so we need it.

Benchmark numbers for my Glade benchmark for interested people:
        GTK 3.4.0    last commit  this commit
Raleigh
  real  0m41.879s    0m10.176s    0m9.900s
  user  0m41.394s    0m9.895s     0m9.628s
  sys   0m0.111s     0m0.096s     0m0.102s

Adwaita                                        (*)
  real  0m51.049s    0m13.432s    0m14.848s    0m12.253s
  user  0m50.487s    0m13.034s    0m13.218s    0m11.927s
  sys   0m0.117s     0m0.151s     0m0.147s     0m0.107s

Ambiance (patched to not use private GTK APIs)
  real  0m52.167s    0m13.115s    0m13.117s    0m12.944s
  user  0m51.576s    0m12.739s    0m12.768s    0m12.651s
  sys   0m0.119s     0m0.137s     0m0.136s     0m0.118s

(*) Adwaita and unico currently use custom properties, and
_gtk_css_value_compare() for custom properties always returns FALSE,
which makes this optimization never trigger. So I modified
_gtk_css_value_compare() to return TRUE for these properties instead and
reran the benchmark. Those are the numbers.

12 years agoreftests: Fix reftests for recent changes
Benjamin Otte [Sat, 7 Apr 2012 14:39:17 +0000 (16:39 +0200)]
reftests: Fix reftests for recent changes

12 years agowidget: Don't cache widget paths all the time
Benjamin Otte [Sat, 7 Apr 2012 12:15:35 +0000 (14:15 +0200)]
widget: Don't cache widget paths all the time

Add an internal API that allows GtkStyleContext to create a widget path
for the widget and with that bypassing gtk_widget_get_path() and that
  function caching the path.