Alexander Larsson
6723feae8a
viewport: Set frame styleclass when getting border size during size allocation
...
Without this you don't get the right border/padding for widget->window
and the border shows up under the scrolled contents.
2012-02-09 16:39:23 +01:00
Matthias Clasen
c2512d1c03
Avoid a C99ism
...
Move variable declarations to the beginning of the block.
https://bugzilla.gnome.org/show_bug.cgi?id=669511
2012-02-08 07:26:25 -05:00
Diego Escalante Urrelo
63865720b7
gtkbuilder-menus: translation-domain can be NULL
...
GtkBuilder defaults its translation-domain to NULL, which is a perfectly
fine value for d_gettext() and friends.
https://bugzilla.gnome.org/show_bug.cgi?id=669638
2012-02-08 04:36:26 -05:00
Diego Escalante Urrelo
a0f6fc137b
gtkactiongroup: clarify set_translation_domain docs
...
NULL is an actual useful value for
gtk_action_group_set_translation_domain, but this information is buried
in g_dgettext() documentation.
Be extra redundant, to make it obvious that NULL is ok.
https://bugzilla.gnome.org/show_bug.cgi?id=669636
2012-02-08 04:36:26 -05:00
Benjamin Otte
33864064f4
tests: Remove untrue assertion
...
Even if something is not at the top, things might still not be scrolled.
For example in the case where things are exactly at the center.
2012-02-06 21:53:36 +01:00
Benjamin Otte
75eddfffbb
tests: Don't test something we can't test
...
When using GtkTreeStore, don't compute row positions assuming
everything's a list store, which is how get_row_start_for_index() works.
So instead, do a laxer check and don't insist on proper alignment.
2012-02-06 21:53:35 +01:00
Benjamin Otte
6a381b0c1d
tests: Remove unused argument from treeview-scrolling test
2012-02-06 21:53:35 +01:00
Benjamin Otte
33961154b6
tests: Fix height checks in treeview scrolling test
...
If things get centered in the scrolling area depens on the height of the
row, too.
2012-02-06 20:43:05 +01:00
Benjamin Otte
c2a6dcc73c
tests: Fix assertion emission
...
We want to assert() when doing the actual check, not do some
g_assert (testing_failed());
2012-02-06 20:43:05 +01:00
Alexander Larsson
cb625d21b4
Fix leak when parsing image urls
2012-02-06 15:06:29 +01:00
Ignacio Casal Quinteiro
022e17afbc
aboutdialog: add a \n in the copyright text
2012-02-03 17:13:38 +01:00
Alexander Larsson
fb0c53a0ed
Fix crash with theme resource file
...
The freeing the GResource in gtk_css_provider_reset caused problems
because it was called from gtk_css_provider_load_from_path() inside
gtk_css_provider_get_named(). We fix this by delaying the
setting of priv->resource until we successfully loaded the file.
2012-02-03 16:37:54 +01:00
Alexander Larsson
6b2f10321f
Remove accidental leftover spew
2012-02-03 16:27:32 +01:00
Alexander Larsson
b5b9965283
css: Remove any loaded resource in gtk_css_provider_reset
2012-02-03 16:01:51 +01:00
Alexander Larsson
610ea728b2
Special case resource pixbuf files loading
...
This means we can share the pixbuf data when using GdkPixdata
images in the resource.
2012-02-03 15:51:55 +01:00
Alexander Larsson
57386285fa
Support a gtk.gresource file in themes
...
This lets themes install a .gresource for efficient loading
of resources. This resource file will (if it exists) be automatically
loaded (mmaped) when the theme is used and unloaded when not used.
2012-02-03 15:50:49 +01:00
Benjamin Otte
e84af235ee
css: Implement padding as numbers
...
Also remove the now unused border parsing function for shorthands.
2012-02-02 03:14:02 +01:00
Benjamin Otte
3c4b8a676f
css: Port margin properties to GtkCssNumber
2012-02-02 03:14:01 +01:00
Benjamin Otte
2434dbc10a
themingbackground: Implement background-size support
2012-02-02 03:14:01 +01:00
Benjamin Otte
1979d048d3
css: Implement parsing for 'background-size'
2012-02-02 03:14:01 +01:00
Benjamin Otte
811e848832
css: Implement repeating linear gradients
2012-02-02 03:14:00 +01:00
Benjamin Otte
5df9b0188a
css: Implement CSS 3 linear-gradient() syntax
2012-02-02 03:14:00 +01:00
Benjamin Otte
0c140daff2
css: Implement support for angles
2012-02-02 03:14:00 +01:00
Benjamin Otte
a63ff72406
css: Convert border-radius to GtkCssNumber
...
We can do % now, wohoo!
2012-02-02 03:14:00 +01:00
Benjamin Otte
82c2dad178
themingengine: Add a private function to query lengths
2012-02-02 03:14:00 +01:00
Benjamin Otte
762ea4793f
css: Make border-width a length property
2012-02-02 03:14:00 +01:00
Benjamin Otte
a81ac3d5cd
css: Add a check function for specified types
...
... and use it.
It seems kinda necessary for the refactoring I'm about to do...
2012-02-02 03:14:00 +01:00
Benjamin Otte
9551f542bd
css: Ensure proper type for parsing custom properties
2012-02-02 03:14:00 +01:00
Benjamin Otte
893807bee0
css: Add GtkCssNumber
2012-02-02 03:14:00 +01:00
Benjamin Otte
bd8fefb20e
styleproperties: Add a warning
...
GtkStyleProperties stores computed values. Make sure it does.
2012-02-02 03:14:00 +01:00
Benjamin Otte
032e8f9f9b
styleproperty: Simplifiy registering function
...
... and rename it to conform to the actual type.
We don't need 2 registering functions anymore now that we can use the
specified type.
2012-02-02 03:13:58 +01:00
Benjamin Otte
6ba33e7af5
css: Allow bypassing the compute_value() stage
...
This is useful when overriding values.
2012-02-02 03:13:38 +01:00
Benjamin Otte
e4c2d9b259
csslookup: Query the bitmask
...
Checking if the value is NULL is the wrong thing to do - the bitmask is
usd to keep track of that.
The reason for that will become apparent in the next patch.
2012-02-02 03:13:38 +01:00
Benjamin Otte
4c8e9ee6b6
css: Remove two unused declarations
2012-02-02 03:13:38 +01:00
Benjamin Otte
c8786c3b97
css: color_compute no longer needs to check type
...
The input is always a symbolic color.
2012-02-02 03:13:38 +01:00
Benjamin Otte
5e5e8367ce
css: Initialize value before calling compute function
2012-02-02 03:13:38 +01:00
Benjamin Otte
f7e0ce3b28
css: Initialize values to their specified type
...
.. when parsing.
2012-02-02 03:13:38 +01:00
Benjamin Otte
25affd4766
css: Create SymbolicColor fallback properties for colors
2012-02-02 03:13:38 +01:00
Benjamin Otte
c2fb315878
css: parse 'currentColor' for symbolic colors
2012-02-02 03:13:38 +01:00
Benjamin Otte
9fa764abec
styleproperty: Introduce "specified type" and "computed type"
...
Make the types explicit. This way, we can actually do useful stuff with
them (like sanity checks, d'oh).
2012-02-02 03:13:34 +01:00
Benjamin Otte
05f14af24c
css: Make the 'currentColor' keyword a symbolic color
...
This is the first step on a quest to ensure that there is only ever one
GType in use for GValues in every stage of the CSS resolving process.
2012-02-02 00:40:33 +01:00
Benjamin Otte
6b04c0f828
raleigh: remove general 'padding' declaration
...
Fixes reftests that were broken after images and labels applied padding.
Things look much more cramped now. On the plus side, treeview headers
and comboboxes have better spacing. Menubars look like crap now though.
Needs someone with artistical talent to figure out.
2012-02-02 00:14:01 +01:00
Benjamin Otte
21e20b0d5b
raleigh: Remove unnecessary border-width declaration
2012-02-02 00:09:05 +01:00
Benjamin Otte
4dd9a73c8a
raleigh: Don't set bg-color for all widgets
...
Just set oit for things that need it.
(FIXME: Buttons should probably not need it, but spinbuttons and
treeview headers don't have a proper background without it.)
2012-02-02 00:05:51 +01:00
Cosimo Cecchi
2ae2c443d0
app-chooser-dialog: cancel the PK operation when the dialog is dismissed
...
This doesn't really seem to have any effect; probably PK doesn't listen
for changes on the passed-in cancellable, but it's correct.
Related to: https://bugzilla.gnome.org/show_bug.cgi?id=649121
2012-02-01 13:21:43 -05:00
Cosimo Cecchi
623b5192cc
app-chooser-dialog: make sure to hold a ref when doing async ops
...
Hold a ref to the GtkDialog while doing async operations with the
GtkAppChooserOnline object.
This is needed, since somebody could call gtk_widget_destroy() on us
while an async operation is in progress. We don't want to be finalized
in that case, but mark the fact that we were dismissed and just return
from the callback in that case.
This avoids crashing if the dialog is destroyed in the middle of a PK
operation.
https://bugzilla.gnome.org/show_bug.cgi?id=649121
2012-02-01 13:21:43 -05:00
Benjamin Otte
c0ee68b7fe
gtkmain: Invoke keysnoopers unconditionally
...
Now that ATK no longer uses a key snooper but is invoked directly,
checking in advance for existing snoopers is wrong and stops ATK from
working.
Also: code reduction without performance loss == good thing.
https://bugzilla.gnome.org/show_bug.cgi?id=669176
2012-02-01 15:45:49 +01:00
Cosimo Cecchi
26ff536069
combobox: fix cell area allocation in menu mode for RTL
...
We were missing a padding to subtract from the child widget here.
2012-01-31 20:30:43 -05:00
Cosimo Cecchi
aa16f469bc
combobox: fix dropdown menu alignment for RTL languages
...
We need to add in the left padding, instead of subtracting it in that
case.
2012-01-31 20:30:43 -05:00
Cosimo Cecchi
65e6248542
combobox: use gtk_container_class_handle_border_width()
...
Avoids us fiddling with the border width manually in our size request
and allocation cycles.
2012-01-31 20:30:43 -05:00