]> Pileus Git - ~andy/gtk/log
~andy/gtk
11 years agoUpdated POTFILES.skip
Piotr Drąg [Fri, 9 Nov 2012 23:38:13 +0000 (00:38 +0100)]
Updated POTFILES.skip

11 years agoicon-theme: Add some preconditions for NULL arguments
Stef Walter [Fri, 9 Nov 2012 10:55:44 +0000 (11:55 +0100)]
icon-theme: Add some preconditions for NULL arguments

Related to this crash: https://bugzilla.gnome.org/show_bug.cgi?id=687967

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

11 years agoMake _gtk_css_lookup_get_missing inline
Alexander Larsson [Fri, 9 Nov 2012 09:09:06 +0000 (10:09 +0100)]
Make _gtk_css_lookup_get_missing inline

This is called a lot in the loop in gtk_css_style_provider_lookup which
actually showed up on profiles.

11 years agogtk_css_style_provider_lookup: minor loop optimiziation
Alexander Larsson [Fri, 9 Nov 2012 09:06:55 +0000 (10:06 +0100)]
gtk_css_style_provider_lookup: minor loop optimiziation

This is a minor performance improvement but this loop
is run a lot so it actually matters in large state
changes.

11 years agoExit early in gtk_style_context_update_cache codepaths
Alexander Larsson [Fri, 9 Nov 2012 09:15:23 +0000 (10:15 +0100)]
Exit early in gtk_style_context_update_cache codepaths

If lookup->missing is empty we don't need to continue looking.
We short circuit in several places as this can happen
after iteratively makeign lookup->missing smaller.

11 years agoFix cnp bug in _gtk_bitmask_intersects
Alexander Larsson [Fri, 9 Nov 2012 08:05:47 +0000 (09:05 +0100)]
Fix cnp bug in _gtk_bitmask_intersects

We need to use the allocated codepath if *any* argument is
allocated, not if one arg is not allocated.
This bug caused unnecessary calls to _gtk_bitmask_is_allocated,
as well as return completely wrong result if both bitmask are
allocated.

11 years agogdk: Add gdk_window_has_alpha helper
Alexander Larsson [Wed, 7 Nov 2012 11:57:38 +0000 (12:57 +0100)]
gdk: Add gdk_window_has_alpha helper

This centralizes the current checks for has_alpha_bg, which
lets us extend the check later.

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

11 years agoAdd "parent widget" button to test property editor
Alexander Larsson [Wed, 7 Nov 2012 11:54:55 +0000 (12:54 +0100)]
Add "parent widget" button to test property editor

Without this its hard to access the properties of container
widgets.

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

11 years agogtkbin: Remove the silliest code on earth
Jasper St. Pierre [Fri, 9 Nov 2012 00:13:52 +0000 (19:13 -0500)]
gtkbin: Remove the silliest code on earth

What is this bin doing with all these crazy deltas? Company does:

<Company> that can safely be removed
<Company> in general, code that isn't obvious can either be understood
<Company> with a bit of thinking or it can be removed
<Company> if in doubt, go for the 2nd of those :)

Most GtkBin subclasses override this strange garbage anyway, so it's
not like this code is ever *run*, per se. Just make it proxy directly
to the child, and hope nothing goes wrong.

11 years agogtkbin: Complete more of a base implementation for GtkBin subclasses
Jasper St. Pierre [Thu, 8 Nov 2012 23:21:01 +0000 (18:21 -0500)]
gtkbin: Complete more of a base implementation for GtkBin subclasses

Implement get_preferred_width, get_preferred_height, and size_allocate.
This allows GtkBin subclasses to be quick and easy, without the
author doing the subclassing to have to do much work.

11 years agogtkversion.h.in: Put the documentation inside the header guards
Jasper St. Pierre [Thu, 8 Nov 2012 23:40:38 +0000 (18:40 -0500)]
gtkversion.h.in: Put the documentation inside the header guards

This fixes a warning with gobject-introspecion scanning

11 years agoreftests: Add test for recent fix
Benjamin Otte [Thu, 8 Nov 2012 22:16:55 +0000 (23:16 +0100)]
reftests: Add test for recent fix

11 years agolabel: Fix another sizing corner case causing segfaults
Benjamin Otte [Thu, 8 Nov 2012 22:15:19 +0000 (23:15 +0100)]
label: Fix another sizing corner case causing segfaults

If the "wider" label is the smaller one, use the wider size for both
cases. This can happen when ellipsizing a single character, which is
often smaller than the ellipsizing glpyph(s).

11 years agostylecontext: Fix a memleak
Benjamin Otte [Thu, 8 Nov 2012 21:08:36 +0000 (22:08 +0100)]
stylecontext: Fix a memleak

11 years agostylecontext: Remove unused function
Benjamin Otte [Thu, 8 Nov 2012 17:21:45 +0000 (18:21 +0100)]
stylecontext: Remove unused function

11 years agocssvalue: Convert shadows to GtkCssColorValue
Benjamin Otte [Thu, 8 Nov 2012 16:33:53 +0000 (17:33 +0100)]
cssvalue: Convert shadows to GtkCssColorValue

11 years agocssimage: Use GtkCssColorValue
Benjamin Otte [Thu, 8 Nov 2012 16:25:26 +0000 (17:25 +0100)]
cssimage: Use GtkCssColorValue

11 years agocssstyleproperty: Replace symbolic colors with GtkCssColorValue
Benjamin Otte [Thu, 8 Nov 2012 16:22:56 +0000 (17:22 +0100)]
cssstyleproperty: Replace symbolic colors with GtkCssColorValue

11 years agocssvalue: Add GtkCssColorValue
Benjamin Otte [Thu, 8 Nov 2012 16:03:15 +0000 (17:03 +0100)]
cssvalue: Add GtkCssColorValue

This is mostly copy/paste from GtkSymbolicColor and is indeed intended
to replace it.

11 years agosymboliccolor: Change the print output
Benjamin Otte [Thu, 8 Nov 2012 15:17:00 +0000 (16:17 +0100)]
symboliccolor: Change the print output

Functions should not have a space before the opening parenthesis. So
change output like
  alpha (@color, 0.5)
to
  alpha(@color, 0.5)
and do the same for "shade" and "mix".

Tests have been updated accordingly.

11 years agosymboliccolor: Split out HSLA code
Benjamin Otte [Thu, 8 Nov 2012 14:26:33 +0000 (15:26 +0100)]
symboliccolor: Split out HSLA code

11 years agoUpdate a11y test results
Matthias Clasen [Thu, 8 Nov 2012 01:21:50 +0000 (20:21 -0500)]
Update a11y test results

These are expected changes, since a11y class name show up in the
dumps.

11 years agoNuke GtkBoxAccessible
Matthias Clasen [Thu, 8 Nov 2012 01:17:30 +0000 (20:17 -0500)]
Nuke GtkBoxAccessible

It didn't contain anything useful.

11 years agotext-cell-accessible: fix a double unref
Cosimo Cecchi [Wed, 7 Nov 2012 20:46:16 +0000 (15:46 -0500)]
text-cell-accessible: fix a double unref

We're unreffing the GtkCellRenderer object twice, causing the
application to crash when trying to access the renderer later.

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

11 years agoUpdated Traditional Chinese translation(Hong Kong and Taiwan)
Cheng-Chia Tseng [Tue, 6 Nov 2012 18:35:44 +0000 (02:35 +0800)]
Updated Traditional Chinese translation(Hong Kong and Taiwan)

11 years agogradient: Add color stops to the right gradient
Benjamin Otte [Tue, 6 Nov 2012 19:51:29 +0000 (20:51 +0100)]
gradient: Add color stops to the right gradient

This was causing an infinite loop happily eating up memory.

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

11 years agotests: Include config.h
Benjamin Otte [Tue, 6 Nov 2012 19:51:15 +0000 (20:51 +0100)]
tests: Include config.h

11 years agoDisable deprecation checks for all libraries we depend on on stable branches.
Benjamin Otte [Tue, 6 Nov 2012 19:50:09 +0000 (20:50 +0100)]
Disable deprecation checks for all libraries we depend on on stable branches.

This is so newer versions of those libraries don't cause more warnings
with a stable GTK version.
We don't ever want to turn off deprecation warnings for master however,
because that's where we get rid of deprecated API we use.

Note that only glib allows use to easily do this, so nothing is done for
Pango, gdk-pixbuf or Cairo here.

11 years agocssimage: Fix huge memleak
Benjamin Otte [Tue, 6 Nov 2012 16:50:14 +0000 (17:50 +0100)]
cssimage: Fix huge memleak

When transitioning gradients, we were leaking the gradient structs. Not
good.

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

11 years agocss: Fix copy/paste error
Cosimo Cecchi [Tue, 6 Nov 2012 16:49:15 +0000 (17:49 +0100)]
css: Fix copy/paste error

Benjamin replaced start with end in a bunch of locations, but not all of
them apparently.

11 years agoUpdated POTFILES.skip
Piotr Drąg [Mon, 5 Nov 2012 22:04:55 +0000 (23:04 +0100)]
Updated POTFILES.skip

11 years agoreftests: Add a reftest for latest fix
Benjamin Otte [Mon, 5 Nov 2012 18:34:00 +0000 (19:34 +0100)]
reftests: Add a reftest for latest fix

11 years agolabel: Handle crazy corner cases
Benjamin Otte [Mon, 5 Nov 2012 17:55:27 +0000 (18:55 +0100)]
label: Handle crazy corner cases

With ellipsizing, the ellipsized text can have a smaller height than the
non-ellipsized text. So the wider text is also higher. Example:
  .<big>TEXT</big>
will ellipsize to the small text.

Reported-By: Rico Tzschichholz <ricotz@t-online.de>
11 years agoFixed Brazilian Portuguese Translation
Adorilson Bezerra [Mon, 5 Nov 2012 14:11:26 +0000 (12:11 -0200)]
Fixed Brazilian Portuguese Translation

11 years agoBump GLib dependency to 2.35
Matthias Clasen [Tue, 30 Oct 2012 16:52:11 +0000 (12:52 -0400)]
Bump GLib dependency to 2.35

And drop deprecated g_type_init() calls.

11 years agoreftests: Add test for recent fix
Benjamin Otte [Sun, 4 Nov 2012 16:57:49 +0000 (17:57 +0100)]
reftests: Add test for recent fix

This test checks the fix in a46368dede684ded093395ac056eaeecf554330d

11 years agoreftests: Mark windows as popup
Benjamin Otte [Sun, 4 Nov 2012 16:15:20 +0000 (17:15 +0100)]
reftests: Mark windows as popup

This makes the tests run faster and should always be done.

11 years agosizerequest: do not derefence NULL pointers
Stefano Facchini [Sun, 4 Nov 2012 16:42:55 +0000 (17:42 +0100)]
sizerequest: do not derefence NULL pointers

11 years agogtkmenubutton: remove weak pointer when needed
Paolo Borelli [Sun, 4 Nov 2012 15:46:35 +0000 (16:46 +0100)]
gtkmenubutton: remove weak pointer when needed

We must make sure to remove the weak pointer when disposing the widget
or when resetting the align widget otherwise glib will try to nullify
invalid memory.

11 years agogtkmenubutton: set menu to NULL in dispose.
Paolo Borelli [Sun, 4 Nov 2012 11:09:23 +0000 (12:09 +0100)]
gtkmenubutton: set menu to NULL in dispose.

Prevent menu to be detached multiple times.

11 years agosizerequest: Restructure code
Benjamin Otte [Sun, 4 Nov 2012 15:10:20 +0000 (16:10 +0100)]
sizerequest: Restructure code

Make the compute_size_request() function take into account size groups
itself instead of doing a weird "bump_requisition" call.

11 years agosizerequest: Move sizegroups function to different source file
Benjamin Otte [Sun, 4 Nov 2012 15:02:14 +0000 (16:02 +0100)]
sizerequest: Move sizegroups function to different source file

11 years agosizegroup: Construct the set of sizegroup peers as a hash table
Benjamin Otte [Sun, 4 Nov 2012 14:47:03 +0000 (15:47 +0100)]
sizegroup: Construct the set of sizegroup peers as a hash table

This way we don't need a marker on GtkWidgetParivate that needs to be
unset later, so we have all our data in the same place and can avoid
problems with reentrancy and shenanigans like that.

But the main reason I wrote that is cleaner code.

11 years agoreftests: Add a test from evolution
Benjamin Otte [Sun, 4 Nov 2012 13:28:04 +0000 (14:28 +0100)]
reftests: Add a test from evolution

This was used in a bug report.

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

11 years agoreftests: Add a test for all the recent sizegroup hackery
Benjamin Otte [Sat, 3 Nov 2012 18:01:11 +0000 (19:01 +0100)]
reftests: Add a test for all the recent sizegroup hackery

11 years agosizegroup: Use _gtk_widget_compute_size_for_orientation()
Benjamin Otte [Sat, 3 Nov 2012 17:57:50 +0000 (18:57 +0100)]
sizegroup: Use _gtk_widget_compute_size_for_orientation()

With this function now available, we can do size computation in 2
ways:
(1) Compute size with size groups
(2) Compute size without size groups

And have (1) use (2) instead of setting flags on widgets. This patch
does exactly that.

11 years agosizerequest: Move optimization
Benjamin Otte [Sat, 3 Nov 2012 17:52:28 +0000 (18:52 +0100)]
sizerequest: Move optimization

With size groups now doing hfw, doing the optimization for CONSTANT_SIZE
was done too early. Size groups need to know that it's a hfw request, so
the other widgets in the size group get the correct behavior.

11 years agolabel: Redo get_preferred_width/height()
Benjamin Otte [Sat, 3 Nov 2012 14:36:22 +0000 (15:36 +0100)]
label: Redo get_preferred_width/height()

This is important for size groups mostly, but also has some small fixes.
The label-sizing reftest as been updated accordingly.

11 years agolabel: Fix ellipsize and wrap being set
Benjamin Otte [Fri, 2 Nov 2012 20:49:32 +0000 (21:49 +0100)]
label: Fix ellipsize and wrap being set

The label code assumed that Pango treats this as "wrap to as much space
as possible and then ellipsize all the lines", but for Pango, ellipsize
takes precedence over wrap. So do the same thing in GtkLabel.

Also updated is the reftest that checked this behavior.

11 years agoreftests: Improve reftest performance
Benjamin Otte [Fri, 2 Nov 2012 20:38:16 +0000 (21:38 +0100)]
reftests: Improve reftest performance

Get rid of all the event boxes in this test. Event boxes need GDK
windows which cost a lot of performance when running the test and they
clip the label output.

Getting rid of the clipping also shows 2 bugs in this test that weren't
visible before. Those will be fixed in a followup patch.

11 years agoreftests: Make label-sizing tests use better CSS
Benjamin Otte [Fri, 2 Nov 2012 18:16:46 +0000 (19:16 +0100)]
reftests: Make label-sizing tests use better CSS

ow that labels can have backgrounds, just use label backgrounds

11 years agosizerequest: Export _gtk_widget_compute_size_for_orientation()
Benjamin Otte [Fri, 2 Nov 2012 12:40:00 +0000 (13:40 +0100)]
sizerequest: Export _gtk_widget_compute_size_for_orientation()

and add an "ignore_size_groups" flag to it. This way we can use it for
size group shenanigans.

11 years agosizegroup: Move GtkSizeGroupMode to gtkenums.h
Benjamin Otte [Fri, 2 Nov 2012 12:39:19 +0000 (13:39 +0100)]
sizegroup: Move GtkSizeGroupMode to gtkenums.h

This is in preparation for the next patch, which would otherwise lead to
conflicts.

11 years agosizerequest: Cache sizes without size groups
Benjamin Otte [Thu, 1 Nov 2012 23:50:54 +0000 (00:50 +0100)]
sizerequest: Cache sizes without size groups

We compute on-demand for size groups anyway, so we can (in theory, this
patch doesn't do that yet) get around costly cache blowing when
invalidating single widgets of a size group this way.

11 years agosizegroups: Use is_visible() instead of get_mapped() for visibility
Benjamin Otte [Thu, 1 Nov 2012 23:44:30 +0000 (00:44 +0100)]
sizegroups: Use is_visible() instead of get_mapped() for visibility

The current approach of using gtk_widget_get_mapped() is broken:
The usual steps taken when showing a window are:
(1) request the sizes
(2) allocate the sizes
(3) show the window in the allocated size

Showing the window with a random size between steps (1) and (2) would of
course
result in extra work and potential flickering when the widgets get
resized to
their proper sizes.

However, as GtkSizeGroup::ignore-hidden uses gtk_widget_get_mapped() to
determine visibility for a widget, the following will happen:
(1) the widget will request a 0 size
(2) the widget will be allocated a 0 size
(3) the widget will be too small when it is shown

gtk_widget_get_visible() however is set in advance. Note that toggling
visibility also causes a gtk-widget_queue_resize() call already so we
take care of changes in here automatically.

11 years agoAPI: Add gtk_widget_is_visible()
Benjamin Otte [Thu, 1 Nov 2012 23:42:45 +0000 (00:42 +0100)]
API: Add gtk_widget_is_visible()

This is a recursive gtk_widget_get_visible(): Returns TRUE if the widget
and all its parents are visible.

11 years agosizegroup: Handle hfw in size groups
Benjamin Otte [Thu, 1 Nov 2012 23:33:42 +0000 (00:33 +0100)]
sizegroup: Handle hfw in size groups

11 years agosizegroup: Add a function for clarity
Benjamin Otte [Thu, 1 Nov 2012 23:28:10 +0000 (00:28 +0100)]
sizegroup: Add a function for clarity

... and restructure code to accomodate that function.

11 years agosizegroup: Don't keep groups around everywhere
Benjamin Otte [Thu, 1 Nov 2012 23:18:11 +0000 (00:18 +0100)]
sizegroup: Don't keep groups around everywhere

The code is only interested in the actual widgets that belong together,
not in the groups. So just don't return the groups.

11 years agosizegroup: Check ignore_hidden flag when adding groups
Benjamin Otte [Thu, 1 Nov 2012 23:12:48 +0000 (00:12 +0100)]
sizegroup: Check ignore_hidden flag when adding groups

Instead of only checking the ignore_hidden flag when getting the
preferred sizes, respect it already when constructing the list of
widgets. This way, widgets don't queue resizes for groups they're
ignored in anyway.

11 years agosizegroup: Use for loops
Benjamin Otte [Thu, 1 Nov 2012 23:06:02 +0000 (00:06 +0100)]
sizegroup: Use for loops

For loops to loop over lists look nicer and actually do the right thing
with "break" and "continue" statements. So they are vastly preferred to
while loops.

11 years agosizegroups: Restructure code
Benjamin Otte [Thu, 1 Nov 2012 22:58:23 +0000 (23:58 +0100)]
sizegroups: Restructure code

This way, we do the checks at the start of the effected function, not
before calling it.

11 years agosizegroup: Don't cache the sizes anymore
Benjamin Otte [Thu, 1 Nov 2012 22:41:38 +0000 (23:41 +0100)]
sizegroup: Don't cache the sizes anymore

This simplifies code and because sizes are cached by the widgets
themselves, it's not a large performance problem (unless people use huge
amounts of widgets in a single size group, but who does that?

11 years agoMerge branch 'bgo687196-filesystemmodel-crash'
Federico Mena Quintero [Fri, 2 Nov 2012 20:13:02 +0000 (14:13 -0600)]
Merge branch 'bgo687196-filesystemmodel-crash'

11 years agobgo#687196 - Fix model corruption during file removal
Federico Mena Quintero [Thu, 1 Nov 2012 23:48:23 +0000 (17:48 -0600)]
bgo#687196 - Fix model corruption during file removal

The main problem is that we were emitting the row-deleted signal for the model in the middle
of the process that actually deletes the row from the model (remove the row from the array,
update the model->file_lookup hash table, etc.).  In the model's caller, one of the row-deleted
callbacks was requesting an iter, which caused the model to revalidate itself - but it did
this while it was in an inconsistent state.  This led to an assertion failure later when the
model resorted itself.

The fix in remove_file() is like this:

* The filteredness/visibility of the deleted node is not updated.  The
  node will simply be gone; we don't need to update those values at
  all.

* We invalidate just the node that is being deleted.

* The model->file_lookup hash table is not completely nuked; instead,
  we carefully adjust its indices.

* The row-deleted signal is only emitted at the very end, when
  deletion is complete and the model is consistent.

Many thanks to William Hua for doing the detective work on this bug!

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agoMake freeze_updates() and thaw_updates() static functions
Federico Mena Quintero [Thu, 1 Nov 2012 23:21:47 +0000 (17:21 -0600)]
Make freeze_updates() and thaw_updates() static functions

They were in the semi-public API of GtkFileSystemModel, but never actually used outside of it.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agoComments on how the filtering and sorting processes work
Federico Mena Quintero [Thu, 1 Nov 2012 23:19:10 +0000 (17:19 -0600)]
Comments on how the filtering and sorting processes work

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agosizegroup: Always at least use widget's size
Benjamin Otte [Thu, 1 Nov 2012 19:22:35 +0000 (20:22 +0100)]
sizegroup: Always at least use widget's size

When widgets were hidden, they were otherwise assigned a 0 size.

11 years agosettings: Reset all styles when the enable-animations settings changes
Benjamin Otte [Thu, 1 Nov 2012 11:23:42 +0000 (12:23 +0100)]
settings: Reset all styles when the enable-animations settings changes

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

11 years agoRaleigh: Fix spinners with disabled animations
Benjamin Otte [Thu, 1 Nov 2012 11:16:06 +0000 (12:16 +0100)]
Raleigh: Fix spinners with disabled animations

When animations are disabled, active and inactive spinners should look
different.

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

11 years agocssimage: Implement some equal functions
Benjamin Otte [Wed, 31 Oct 2012 23:22:39 +0000 (00:22 +0100)]
cssimage: Implement some equal functions

11 years agoRemove argument to _gtk_file_system_model_update_file() that should not be part of...
Federico Mena Quintero [Thu, 1 Nov 2012 02:54:02 +0000 (20:54 -0600)]
Remove argument to _gtk_file_system_model_update_file() that should not be part of the internal API

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agoRename gtk_tree_path_new_from_node() to tree_path_new_from_node()
Federico Mena Quintero [Thu, 1 Nov 2012 02:21:47 +0000 (20:21 -0600)]
Rename gtk_tree_path_new_from_node() to tree_path_new_from_node()

This is a function internal to the file system model; let's not pollute the gtk_tree_path namespace.

Also, make the 'i' variable into 'r' as it refers to a row index, not a file-array index (for
consistency with the docs and the rest of the code).

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agoicon-theme: support loading symbolic GFileIcons from generic URIs
Cosimo Cecchi [Sun, 28 Oct 2012 19:01:30 +0000 (15:01 -0400)]
icon-theme: support loading symbolic GFileIcons from generic URIs

Right now we support loading and recoloring symbolic GFileIcons, but
only if the underlying GFile has a local path. This breaks when the
GFileIcon is loaded from a GResource, which is a reasonable option for an
application that wants to ship a custom symbolic icon.

This patch changes GtkIconInfo to store a GFile together with the file
path, and changes the symbolic icon lookup code to use the GFile URI,
which transparently makes the code work also for GResources.

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

11 years agothemingbackground: Remove struct members
Benjamin Otte [Sat, 27 Oct 2012 01:22:03 +0000 (03:22 +0200)]
themingbackground: Remove struct members

... and put them in the only function they are used in.

11 years agoreftests: Add reftest for fractional border sizes
Benjamin Otte [Sat, 27 Oct 2012 01:17:43 +0000 (03:17 +0200)]
reftests: Add reftest for fractional border sizes

11 years agothemingengine: Draw fradctional border sizes
Benjamin Otte [Sat, 27 Oct 2012 01:16:35 +0000 (03:16 +0200)]
themingengine: Draw fradctional border sizes

11 years agoreftests: Fix linear-gradient reftest
Benjamin Otte [Sat, 27 Oct 2012 00:40:14 +0000 (02:40 +0200)]
reftests: Fix linear-gradient reftest

... and add it to the Makefile

11 years agothemingbackground: Remove GtkThemingBackgroundLayer
Benjamin Otte [Sat, 27 Oct 2012 00:25:36 +0000 (02:25 +0200)]
themingbackground: Remove GtkThemingBackgroundLayer

The struct was just the index. So just pass the index around instead of
a full struct.

11 years agothemingbackground: Use get_box() for background image size
Benjamin Otte [Sat, 27 Oct 2012 00:23:23 +0000 (02:23 +0200)]
themingbackground: Use get_box() for background image size

11 years agothemingbackground: Introduce gtk_theming_background_get_box()
Benjamin Otte [Sat, 27 Oct 2012 00:16:42 +0000 (02:16 +0200)]
themingbackground: Introduce gtk_theming_background_get_box()

to query the different clip boxes used by the background drawing code.
Use this function to query these boxes when clipping.

11 years agothemingbackground: Add content_box variable
Benjamin Otte [Sat, 27 Oct 2012 00:07:43 +0000 (02:07 +0200)]
themingbackground: Add content_box variable

... to go with border_box and padding_box.

11 years agothemingbackground: Get rid of flags variable
Benjamin Otte [Fri, 26 Oct 2012 23:55:41 +0000 (01:55 +0200)]
themingbackground: Get rid of flags variable

11 years agothemingbackground: Move image variable
Benjamin Otte [Fri, 26 Oct 2012 23:52:08 +0000 (01:52 +0200)]
themingbackground: Move image variable

... from the Layer struct onto the stack of the only function using it.

11 years agothemingbackground: Restructure code some more
Benjamin Otte [Fri, 26 Oct 2012 23:39:30 +0000 (01:39 +0200)]
themingbackground: Restructure code some more

Move variable initialization outside the first code with side effects.
This allows adding some more early returns, including one for code that
used to trigger g_return_if_fail() in certain corner cases.

11 years agothemingbackground: Restructure code
Benjamin Otte [Fri, 26 Oct 2012 23:35:00 +0000 (01:35 +0200)]
themingbackground: Restructure code

Make if statements encompassing the whole function into early returns.
The rest of the diff is reindenting.

11 years agocssimage: Add a warning for drawing empty images
Benjamin Otte [Fri, 26 Oct 2012 23:31:59 +0000 (01:31 +0200)]
cssimage: Add a warning for drawing empty images

width and height of an image must be > 0 for the image to get drawn.
It's up to the code further up to ensure that this is not happening.

11 years agoreftests: Add a reftest for recent commit
Benjamin Otte [Fri, 26 Oct 2012 21:38:19 +0000 (23:38 +0200)]
reftests: Add a reftest for recent commit

Check that a computed background-size of 0 is treated as 0.

11 years agocssvalue: Compute "background-size: 0 0" properly
Benjamin Otte [Fri, 26 Oct 2012 21:36:39 +0000 (23:36 +0200)]
cssvalue: Compute "background-size: 0 0" properly

Previously a computed value of 0 was treated as "auto", which is wrong.

11 years agostylecontext: Don't use bg image in gtk_style_context_set_background()
Benjamin Otte [Fri, 26 Oct 2012 21:33:40 +0000 (23:33 +0200)]
stylecontext: Don't use bg image in gtk_style_context_set_background()

Old code tried to use the "background-image" proeprty for setting the
default image background. While this used to work in the early days of
GTK3, today it is grossly misleading as the backgronud image may be
resized, repositioned and semi-translucent which causes very weird
artifacts when rendering.

So we use the background-color only instead.

11 years agocssimage: Add an equal vfunc
Benjamin Otte [Thu, 11 Oct 2012 10:10:20 +0000 (12:10 +0200)]
cssimage: Add an equal vfunc

No implementations for it exist yet.

11 years agomenuitem: Draw background unconditionally
Benjamin Otte [Thu, 11 Oct 2012 09:48:32 +0000 (11:48 +0200)]
menuitem: Draw background unconditionally

11 years agosettings: Use _gtk_css_provider_load_named()
Benjamin Otte [Wed, 19 Sep 2012 14:41:19 +0000 (16:41 +0200)]
settings: Use _gtk_css_provider_load_named()

This way we create one provider per settings object instead of stuffing
it into a global unchanging never-deleting hash table.
Also, we now reload the theme when instructed instead of keeping the old
loaded (and possibly stale) data forever.

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

11 years agocssprovider: Move fallback code into _gtk_css_provider_load_named()
Benjamin Otte [Wed, 19 Sep 2012 14:30:27 +0000 (16:30 +0200)]
cssprovider: Move fallback code into _gtk_css_provider_load_named()

This makes sure the full theme loading logic resides in one function and
isn't scattered around.

As a side-effect, the hash table kept by gtk_css_provider_get_named()
will now be populated with fallback themes. This will not be a problem
after the next commit though.

11 years agocssprovider: Export gtk_css_provider_load_named) function
Benjamin Otte [Wed, 19 Sep 2012 14:15:05 +0000 (16:15 +0200)]
cssprovider: Export gtk_css_provider_load_named) function

... and document it.
For now, the function is only exported internally.

11 years agocssprovider: Split out theme loading function
Benjamin Otte [Wed, 19 Sep 2012 14:07:39 +0000 (16:07 +0200)]
cssprovider: Split out theme loading function

Split maintaining the global themes hash table and the theme loading
code into two functions.
This also fixes leaking the provider when loading a theme from a builtin
resource.

11 years agoUpdated Galician translations
Fran Diéguez [Wed, 31 Oct 2012 09:52:47 +0000 (10:52 +0100)]
Updated Galician translations

11 years agoUpdated Marathi Translations
Sandeep Sheshrao Shedmake [Wed, 31 Oct 2012 05:09:01 +0000 (10:39 +0530)]
Updated Marathi Translations

11 years agoUpdated German translation
Wolfgang Stoeggl [Tue, 30 Oct 2012 18:45:59 +0000 (19:45 +0100)]
Updated German translation

11 years ago[l10n] Updated Estonian translation
Mattias Põldaru [Tue, 30 Oct 2012 13:38:09 +0000 (15:38 +0200)]
[l10n] Updated Estonian translation