Diego Celix
c92600c00f
gtk/gtkassistant: gtk_misc_set_alignment replacing
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkassistant.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:55 -04:00
Diego Celix
0a75ffd4a3
gtkprintunixdialog: gtk_misc_set_alignment replace
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkprintunixdialog.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:54 -04:00
Diego Celix
a06dfd6873
gtkprintbackend: gtk_misc_set_alignment replacing
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkprintbackend.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:53 -04:00
Diego Celix
eb54d933a8
gtkpagesetupunixdialog: gtk_misc_set_alignment
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkpagesetupunixdialog.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:52 -04:00
Diego Celix
8af988e744
gtkfilechooserdefault: gtk_misc_set_alignment
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkfilechooserdefault.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:51 -04:00
Diego Celix
df9d7cf9aa
gtkcellrendereraccel: gtk_misc_set_alignment
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkcellrendereraccel.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:49 -04:00
Diego Celix
cc0be1f949
gtk/gtkmessagedialog: gtk_misc_set_alignment
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkmessagedialog.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:48 -04:00
Diego Celix
0924e4d668
gtk/gtkmountoperation: gtk_misc_set_alignment
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkmountoperation.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:47 -04:00
Diego Celix
cb03ea518c
gtk/gtkradiomenuitem: gtk_misc_set_alignment
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkradiomenuitem.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:46 -04:00
Diego Celix
49e62d2a5f
gtk/gtkmenuitem: gtk_misc_set_alignment replacing
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkmenuitem.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:45 -04:00
Matthias Clasen
1c8632c911
One more change
2011-06-10 17:42:14 -04:00
Matthias Clasen
2204405c9c
Expand migration hints for h/v boxes
2011-06-10 17:40:16 -04:00
Javier Jardón
bf0d8402f5
gtk: Use const instead G_CONST_RETURN
2011-06-10 13:07:54 +01:00
Javier Jardón
0ec4fa558f
docs: Improve crossreferences
...
Use #GtkOrientable:orientation instead "orientation"
2011-06-10 10:56:35 +01:00
Murray Cumming
151bcc6dfa
Box, etc: Improve docs after H* and V* deprecations.
...
Stop documenting the base class as just a base class for the
H and V specializations, copying the useful descriptions from
those H/V classes to the base class. Do not advise the use of
the H/V classes or refer to them unnecessarily.
2011-06-10 09:50:45 +02:00
Matthias Clasen
53b586abcf
Avoid underallocations in the custom paper dialog
2011-06-10 00:17:56 -04:00
Matthias Clasen
8771f2ce9c
Don't rely on button allocations for invisible headers
...
Now that we are not allocating treeview column buttons anymore
with invisible headers, we can't rely on their allocations for
other things like cell area computations anymore. Use x-offset
and width of the column directly, instead.
2011-06-10 00:17:56 -04:00
Matthias Clasen
eeca20a800
Add API to get x position of treeview columns
...
Their width was already available.
2011-06-10 00:17:56 -04:00
Cosimo Cecchi
9e5d6544ba
border-image: unpack the GtkGradient if there's one
...
So that it will eventually be resolved by the style property lookup
machinery.
2011-06-09 23:07:50 -04:00
Cosimo Cecchi
35fdce68e1
cellrendererpix: make the icon render properly again
...
pix_rect was not initialized anymore, so the gdk_rectangle_intersect()
call would always fail.
2011-06-09 22:59:06 -04:00
Matthias Clasen
a081485269
GtkTreeView: Don't short-circuit header-height calculation
...
The code was putting header_height at zero when there is
no model. That leads to temporary underallocation of header
buttons.
2011-06-09 21:40:08 -04:00
Matthias Clasen
1743e18c87
GtkDialog: avoid underallocations
...
GtkDialog changes its size depending on style properties. If
we only do this in response to ::style-updated, it happens during
the initial realization of the dialog and leads to the dialog
'growing' between when we determine the initial window size and
when we allocate it that size. So, do this beforehand.
2011-06-09 20:43:02 -04:00
Cosimo Cecchi
3d1407a01a
border-image: add support for border-image-width too
...
It's useful to set a slice size != border-width, as backgrounds are
clipped to border-width too.
As slices can be half-transparent and overlap the background,
this would not fill the border box properly if we only use a single
property for specifying the width.
Also, this brings us even closer to CSS3.
2011-06-09 20:01:57 -04:00
Matthias Clasen
5fcf9ae09e
Don't size-allocate invisible headers
...
We don't ignore their size requests when determining the
column width, so allocating them is bound to spew tons
of annoying underallocation warnings.
2011-06-09 18:55:19 -04:00
Cosimo Cecchi
1208f2bde0
shadow: render icon-shadow for spinners
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
aa37e7323f
entry: use the current state when rendering symbolic icons
...
Make sure the current state is picked up when rendering symbolic icons
too.
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
8efa8a067e
entry: use GTK_STYLE_CLASS_IMAGE when rendering the entry icon
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
430f6ecbc3
stylecontext: add an "image" style class
...
For images such as icons in GtkEntry widgets.
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
02e82d69b8
entry: use gtk_render_icon()
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
0198662d79
cellrendererpix: use gtk_render_icon()
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
e6a3257b55
image: use gtk_render_icon()
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
514e77581a
stylecontext: add gtk_render_icon()
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
0cd810ff7c
themingengine: use cairo image surfaces to render state effects
...
This makes the code cleaner and allows this to be re-used in a
pixbuf-less future.
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
2446aef0ea
themingengine: add gtk_theming_engine_render_icon()
...
Renders a pixbuf in the provided rectangle, applying effects such as
'icon-shadow'.
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
b6b66803c0
shadow: add _gtk_icon_shadow_paint()
...
Paints a shadow of the current source, using the defined colors.
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
ef78d5b730
styleproperties: add an 'icon-shadow' style property
...
It's a custom property with the same semantics of text-shadow, which
works on icons and icon-like UI elements, such as spinners, arrows and
separators.
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
c935439a72
border-image: fix a horizontal/vertical index typo
2011-06-09 17:06:00 -04:00
Cosimo Cecchi
aa515e71d1
spinbutton: don't render an additional background below arrows
...
It's an entry, so it already has a background below, even when the entry
doesn't have a frame. Also, gtk_spin_button_draw_arrow() will render a
background and a frame in the arrow space anyway.
2011-06-09 15:06:19 -04:00
Cosimo Cecchi
4d8b5baf7e
spinbutton: don't remove the entry style class while rendering arrows
2011-06-09 15:06:18 -04:00
Cosimo Cecchi
42d7487a6e
border-image: don't try to unpack values from a NULL border-image
...
NULL is a valid value for border-image, so if it's NULL when unpacking,
don't try to access the struct fields, but just init the GValues for the
unpacked parameters.
2011-06-09 15:06:18 -04:00
Murray Cumming
fe7125e00c
gtkcssprovider.h: Remove a trailing comma.
2011-06-09 20:36:14 +02:00
Richard Hughes
16d0fca4f5
Add a 'value' GObject property to GtkPrinterOption so that it can be used with g_object_bind_property()
2011-06-09 15:50:34 +01:00
Benjamin Otte
88026c5073
themingengine: Don't modify pattern
...
Instead, scale/unscale the cairo_t.
2011-06-09 05:51:54 +02:00
Benjamin Otte
3ef4a3d46f
border-image: Redo border-image rendering
...
The new code is smaller, less crashy and correct(er), but arguably more
complex. I'd have liked to make it simpler, but this border image
algorithm is complex...
2011-06-09 05:51:54 +02:00
Benjamin Otte
9606633d94
border-image-repeat: Fix order of hrepeat and vrepeat
2011-06-09 05:51:54 +02:00
Benjamin Otte
4f8283055e
border-image: Don't use NEAREST filtering
...
use EXTEND_PAD instead to avoid borders.
2011-06-09 05:51:54 +02:00
Benjamin Otte
c0a6b1fb90
borderimage: No need to resolve
...
border-image is a shorthand, so it's unpacked unresolved and repacked
resolved.
2011-06-09 05:51:54 +02:00
Cosimo Cecchi
4e95e6ae21
border-image: move private types to gtkcsstypes.c
2011-06-09 05:51:54 +02:00
Cosimo Cecchi
052d6ef6da
border-image: don't cache the cairo_surface_t in GtkBorderImage
...
It's not useful to cache these surfaces here, as the GtkBorderImage will
be always generated on the fly, being a shorthand property.
This also allows to get rid of the intermediate image surfaces for
rendering the slices; we now use cairo_surface_create_for_rectangle()
to proxy the slices from the source surface to the rendered area, which
should also yield better performance.
2011-06-09 05:51:54 +02:00
Cosimo Cecchi
a2a8d3e8f4
docs: expand the docs for border-image
...
https://bugzilla.gnome.org/show_bug.cgi?id=651194
2011-06-09 05:51:54 +02:00
Cosimo Cecchi
4cfccde6da
border-image: ensure image->resolved is set when resolving the gradient
...
https://bugzilla.gnome.org/show_bug.cgi?id=651194
2011-06-09 05:51:54 +02:00
Cosimo Cecchi
e3dd437b67
styleproperty: turn border-image into a shorthand property
...
It's composed by
- border-image-source: a cairo_pattern_t holding an image from file or a
gradient
- border-image-slice: a GtkBorder containing the slice offsets to apply
on the image
- border-image-repeat: a GtkRepeatType for the image
We deviate from pure CSS3 in the following ways:
* border-image-width is assumed to be always 1, i.e. always equal to
what's specified by border-width. I don't think it's a particularly
useful property to have, but we could add it later if needed.
* border-image-outset is absent, as we can't render outside of the
allocation yet.
https://bugzilla.gnome.org/show_bug.cgi?id=651194
2011-06-09 05:51:54 +02:00
Cosimo Cecchi
9976530fe0
border-image: change Gtk9Slice to GtkBorderImage
...
It's a similar private type, which is much more powerful, and respects
the CSS rendering specification for border-image.
https://bugzilla.gnome.org/show_bug.cgi?id=651194
2011-06-09 05:51:53 +02:00
Benjamin Otte
4dbeac9275
toolpalette: Remove composite support
...
It seems to be very broken wrt input handling, causing random icons to
light up etc.
So until this is fixed, better remove composite support. It only removes
animations, so it's not a big loss for functionality.
2011-06-09 05:51:36 +02:00
Michal Suchanek
a64bc46c9e
bgo#652045 - Initialize local_only in GtkFileChooserEntry
...
This has to be done also when we switch to the entry, otherwise completion for
non-local URIs won't work.
2011-06-08 16:24:48 -05:00
Marek Kašík
f737246a6a
Trivial optimisation in GtkPrinterOptionWidget
...
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-06-08 18:23:11 +01:00
Richard Hughes
a8aeeffb19
Fix 93957459d8
...
It seems GtkHBox got dropped since my patch was reviewed. Oopsie.
2011-06-08 16:52:43 +01:00
Richard Hughes
93957459d8
Add a GtkPrinterOptionWidget type of INFO to just show informational text from the print backend
...
This fixes https://bugzilla.gnome.org/show_bug.cgi?id=652103
2011-06-08 16:38:23 +01:00
Javier Jardón
a1ce49c30e
gtk: Clean some includes
2011-06-08 15:23:53 +01:00
Javier Jardón
17ae6b2e0d
gtk[h/v]box: Recommend the use of GtkGrid.
2011-06-08 13:51:20 +01:00
Matthias Clasen
18c8fe52f0
Don't use GtkAlignments
2011-06-07 22:31:45 -04:00
Matthias Clasen
6176e23b30
Don't use a GtkAlignment
2011-06-07 22:31:34 -04:00
Matthias Clasen
15a4a41b72
GtkFileChooserEntry: don't use a GtkAlignment
2011-06-07 22:17:06 -04:00
Matthias Clasen
7d3c5b2763
Drop unneeded includes: gtkalignment.h
2011-06-07 21:53:11 -04:00
Matthias Clasen
4cbbe565b9
Deprecate h/v variants of GtkBox
...
This has been discussed in bug 541009.
2011-06-07 21:44:24 -04:00
Matthias Clasen
12d3f26d66
Deprecate h/v variants of GtkScale
...
This has been discussed in bug 541009.
2011-06-07 21:43:32 -04:00
Matthias Clasen
214069caee
Deprecate h/v subclasses of GtkPaned
...
This has been discussed in bug 541009.
2011-06-07 21:40:12 -04:00
Matthias Clasen
d41844c946
Deprecate h/v subclasses of GtkScrollbar
...
This has been discussed in bug 541009.
2011-06-07 21:38:15 -04:00
Matthias Clasen
00544af8c2
Deprecate h/v subclasses of GtkSeparator
...
This has been discussed in bug 541009.
2011-06-07 21:35:57 -04:00
Matthias Clasen
fdd324c855
Deprecate h/v buttonbox subclasses
...
This has been discussed in bug 541009.
2011-06-07 21:32:49 -04:00
Matthias Clasen
41952fd767
More include cleanups
2011-06-07 21:25:20 -04:00
Matthias Clasen
ab3c63cc3a
More include cleanups
2011-06-07 21:23:07 -04:00
Matthias Clasen
817e878fb5
More include cleanups
2011-06-07 21:16:00 -04:00
Matthias Clasen
3bdc51164a
More include cleanups
2011-06-07 21:12:00 -04:00
Matthias Clasen
b9a59c2ad6
Clean up more includes
...
Mainly removing unused h/v includes, but also adding some that
will be necessary as replacements.
2011-06-07 20:54:23 -04:00
Matthias Clasen
8389161842
GtkStatusbar: derive from GtkBox, not GtkHBox
2011-06-07 19:55:46 -04:00
Matthias Clasen
ec4b566866
GtkPrinterOptionWidget: derive from GtkBox, not GtkHBox
2011-06-07 19:55:24 -04:00
Matthias Clasen
876cbb7517
GtkInfoBar: derive from GtkBox, not GtkHBox
2011-06-07 19:55:03 -04:00
Matthias Clasen
34085147e9
GtkFileChooserButton: derive from GtkBox, not GtkHBox
2011-06-07 19:54:40 -04:00
Matthias Clasen
29e6646292
docs: fix parameter name mismatches
2011-06-07 19:30:51 -04:00
Matthias Clasen
cdaaea7017
Use boxes instead of vboxes
2011-06-07 18:38:28 -04:00
Matthias Clasen
44686b63c3
Use boxes instead of vboxes
2011-06-07 18:38:01 -04:00
Matthias Clasen
453849acf3
Add a missing include
2011-06-07 18:37:36 -04:00
Matthias Clasen
5b5c8f23d9
GtkFileChooserDefault: derive from GtkBox, not GtkVBox
2011-06-07 18:36:57 -04:00
Matthias Clasen
88c6fc1d84
GtkFileChooserWidget: derive from GtkBox, not GtkVBox
2011-06-07 18:36:22 -04:00
Matthias Clasen
7c0d51dd5c
GtkRecentChooserDefault: derive from GtkBox, not GtkVBox
2011-06-07 18:35:46 -04:00
Matthias Clasen
b1278b9ee2
GtkRecentChooserWidget: derive from GtkBox, not GtkVBox
2011-06-07 18:35:28 -04:00
Matthias Clasen
896540f56b
GtkFontSelection: derive from GtkBox, not GtkVBox
2011-06-07 18:34:57 -04:00
Matthias Clasen
5df02faa5f
GtkColorSel: derive from GtkBox, not GtkVBox
2011-06-07 18:34:34 -04:00
Matthias Clasen
8a5e1fe543
Don't include gtk.h here
2011-06-07 18:32:48 -04:00
Matthias Clasen
e789a31cf2
GtkPageSetupUnixPrintDialog: remove an unneeded include
2011-06-07 13:16:58 -04:00
Matthias Clasen
310c0d440b
GtkPrintUnixDialog: remove an unneeded include
2011-06-07 13:14:42 -04:00
Matthias Clasen
d2c682c9e9
Remove an unneeded include
2011-06-07 13:04:22 -04:00
Matthias Clasen
4962545ef3
GtkPathBar: don't use a GtkAlignment
2011-06-07 13:01:00 -04:00
Matthias Clasen
c26b83a0ea
GtkMountOperation: don't use a GtkAlignment
2011-06-07 12:41:10 -04:00
Matthias Clasen
d4224cd325
GtkGrid: Fix a size allocation problem
...
We need pay attention the the request mode when doing size allocation.
The code was using request mode for requisition, but orientation
for allocation.
Also add a reftest that exhibits the issue, courtesy of
Benjamin Otte.
2011-06-07 11:05:50 -04:00
Matthias Clasen
eb76287995
GtkAboutDialog: Don't use an alignment
...
Use align and margin widget properties instead.
2011-06-07 09:53:02 -04:00
Chun-wei Fan
d07907d2de
Update Windows Resource template information
2011-06-07 11:16:57 +08:00
Matthias Clasen
2f7e13067e
GtkUnixPrintDialog: Don't use GtkAlignment
...
It is going to be deprecated soon. Instead, use
widget align and margin properties.
2011-06-06 22:36:39 -04:00
Matthias Clasen
8224287d5c
GtkCustomUnixPaperDialog: don't use a GtkAlignment
...
Those are going to be deprecated sometime soon.
Instead, use widget align and margin properties.
2011-06-06 22:31:31 -04:00
Cosimo Cecchi
3ef2e36637
lockbutton: ensure the lock symbolic icon is rendered 16x16px
...
https://bugzilla.gnome.org/show_bug.cgi?id=651734
2011-06-06 15:12:27 -04:00
Vincent Untz
288df3d016
gtksearchenginetracker: Use non-case sensitive search for non-fts search
...
https://bugzilla.gnome.org/show_bug.cgi?id=642773
2011-06-06 16:39:33 +01:00
Javier Jardón
7b0d77def5
gtkcontainer: Move private functions to private header
...
https://bugzilla.gnome.org/show_bug.cgi?id=651707
2011-06-06 12:10:29 +01:00
Javier Jardón
23dda3ea8e
gtkbutton: Move private functions to private header
...
https://bugzilla.gnome.org/show_bug.cgi?id=651707
2011-06-06 11:58:07 +01:00
Benjamin Otte
c6285387e3
widget: Update the font at the right place
...
Doing it unconditionally is not useful when the subclasses actually
using them can only ever do it in the style_updated signal. So do it in
the style_updated handler instead.
2011-06-04 21:18:09 +02:00
Benjamin Otte
0ba14bb256
paned: Properly hide panes that were set to invisible
...
Gets rid of random windows when hiding the Totem statusbar.
2011-06-04 21:18:09 +02:00
Javier Jardón
fdf979dce2
gtkwidget: Move private functions to private header
...
https://bugzilla.gnome.org/show_bug.cgi?id=651707
2011-06-04 14:00:55 +02:00
Juan Pablo Ugarte
f430a76f10
Fixed bug #576492 "GtkBuilder does not respect G_PARAM_CONSTRUCT properties"
...
Added G_PARAM_CONSTRUCT flag in gtk_builder_get_parameters() checks as suggested by Johan Dahlin.
2011-06-03 14:38:59 -03:00
Javier Jardón
32ef28bc85
Replace gtk_misc_set_padding() with GtkWidget:margin properties
...
https://bugzilla.gnome.org/show_bug.cgi?id=651605
2011-06-02 18:49:54 +02:00
Javier Jardón
31f53dd8d4
gtkaccellabel: Do not use GET_PRIV macro
2011-06-02 15:10:49 +02:00
Javier Jardón
b8b54cdf3d
gtkaccelgroup.c: Do not use GET_PRIV macro
2011-06-02 15:10:49 +02:00
Matthias Clasen
bfa5d367b4
GtkCustomUnixPaperDialog: use an inline toolbar
...
This makes the dialog more similar to similar patterns,
e.g. in the file chooser.
2011-06-01 21:36:50 -04:00
Benjamin Otte
2e6bb2a0c9
Revert "css: Make font property a shorthand"
...
The hack in gtk_style_context_get_font() was causing segfaults in
combobox code. This is not acceptable and I'm not awake enough to fix
it, so just reverting until it's fixed sanely is easiest.
This reverts commit cf6bfbdb17
.
2011-06-02 02:31:44 +02:00
Benjamin Otte
a659143d55
docs: There is no font-name style property
...
It's "font"
2011-06-02 02:03:52 +02:00
Benjamin Otte
1845849596
styleproperty: Move resolving code
...
Also, resolving now always succeeds - if it doesn't we fall back to the
default value right here, instead of later.
2011-06-02 02:03:52 +02:00
Benjamin Otte
cc3afc7c0f
Revert "API: Add API to set style properties to be inherit"
...
Inheritance is now done using style property flags, so thereis no ned
anymore to clobber the pspec flags namespace.
Also, there is no need to expose this functionality in the public API
without exposing more of the styleproperty API.
This essentially reverts commit 9bfd3d2eec
.
2011-06-02 02:03:52 +02:00
Benjamin Otte
9f0e993b60
styleproperty: Use the new flags for inheritance
...
Instead of gtk_style_param_set_inherit()
2011-06-02 02:03:52 +02:00
Benjamin Otte
4feddc6190
styleproperty: Add flags
...
This allows to set a bunch of specific features, like inheritance in
here, without having to molest the psec.
2011-06-02 02:03:52 +02:00
Benjamin Otte
d59081310b
styleproperties: Rename enum value
...
I want to use that same enum value elsewhere.
2011-06-02 02:03:52 +02:00
Benjamin Otte
fd4ffbb6da
styleproperty: Add _gtk_style_property_is_inherit()
...
And use it instead of gtk_style_param_get_inherit()
2011-06-02 02:03:52 +02:00
Benjamin Otte
abeaad6166
stylecontext: Implement the color getters using the regular API
...
Has two benefits:
1) Less code
2) I can refactor things
2011-06-02 02:03:52 +02:00
Benjamin Otte
8f6efd00e7
themingengine: Improve junction handling code
...
As junctions just modify the border radius and we now have a per-corner
border-radius, we can just set the border-radius to 0 for those corners
and get the same effect.
2011-06-02 02:03:52 +02:00
Benjamin Otte
cf6bfbdb17
css: Make font property a shorthand
...
... and implement the CSS font properties:
- font-size
- font-style
- font-family
- font-weight
- font-variant
2011-06-02 02:03:52 +02:00
Benjamin Otte
8d77fcb2d5
styleproperty: Factor out the string print function
...
We print strings in lots of places.
2011-06-02 02:03:52 +02:00
Benjamin Otte
66396d2bab
styleproperty: Move default value setting to styleproperty.c
2011-06-02 02:03:52 +02:00
Benjamin Otte
914654901c
styleproperties: use property, not pspec as key
...
This allows calling functions on the style property from more places.
2011-06-02 02:03:52 +02:00
Benjamin Otte
0aa07c6fd6
cssprovider: Remove colors when resetting
2011-06-02 02:03:52 +02:00
Benjamin Otte
2bc0fca209
box: Add RTL support for sibling paths
...
We want the reverse path when the box is right-to-left.
2011-06-02 02:03:51 +02:00
Benjamin Otte
b1aa59d385
css: Don't infloop when resyncing over a slash
2011-06-02 02:03:51 +02:00
Benjamin Otte
beccec296b
css: We want to unescape backslashes, not slashes
2011-06-02 02:03:51 +02:00
Benjamin Otte
940cdb4a7f
stylecontext: Don't crash when colors are "none"
...
Instead, use their default value (pink).
2011-06-02 02:03:51 +02:00
Benjamin Otte
0d69d9558e
css: Match pseudo-classes for siblings
2011-06-02 02:03:51 +02:00
Benjamin Otte
cd838480eb
box: Add support for siblings in widget paths of box children
2011-06-02 02:03:51 +02:00
Benjamin Otte
bc9c43c1cb
box: Only emit pack-type notify if the pack type really changed
...
This is not very useful in itself, but the code reorg will be useful
once we do style invalidation.
2011-06-02 02:03:51 +02:00
Benjamin Otte
79de8e4d08
API: Add support for siblings to widget paths
2011-06-02 02:03:51 +02:00
Benjamin Otte
b669efa1a3
docs: Fix typo
2011-06-02 02:03:51 +02:00
Benjamin Otte
67fe600b2e
widgetpath: Factor out the element copy function
...
I'll need that function soon.
2011-06-02 02:03:51 +02:00
Benjamin Otte
f0e5b57699
widgetpath: Use ref/unref in boxed function
...
This way we avoid lots of copying when using widget paths as properties.
Keeping this as a separate patch so bugs where people were modifying a
structure they shouldn't are easily visible.
2011-06-02 02:03:51 +02:00
Benjamin Otte
03eb4c38c9
widgetpath: Make structure refcounted
...
I want to use widget paths in a way that make a lot more sense with a
refcounted structure. See the following patches.
2011-06-02 02:03:51 +02:00
Benjamin Otte
91602cca6e
themingengine: Add support for the border-radii
2011-06-02 02:03:51 +02:00
Benjamin Otte
90ff426396
css: Add all border-radius properties
...
Implement all border-radisu properties as specified by
http://www.w3.org/TR/css3-background/#the-border-radius
The end goal here is to get joined buttons to really look joined.
2011-06-02 02:03:51 +02:00
Benjamin Otte
812b32e9e5
styleproperty: Add a helper function for printing doubles
...
We will want to print doubles more often, so add a little helper
function for it. We cannot use printf() here, because we want English
locale output.
2011-06-02 02:03:51 +02:00
Benjamin Otte
97a07a79f3
styleproperty: Make keybindings use custom parse/print functions
...
We don't want to use it for GPtrArray.
2011-06-02 02:03:50 +02:00
Benjamin Otte
d14fbf3254
styleproperty: Allow passing in a parse func and a print func
...
It's not used yet, but it's now possible to specify a custom read or
write func.
2011-06-02 02:03:50 +02:00
Benjamin Otte
715674c45b
styleproperty: Rename ParseFunc and PrintFunc typedefs
...
Rename them to GtkStyleParseFunc and GtkStylePrintFunc, so we can export
them.
2011-06-02 02:03:50 +02:00
Benjamin Otte
d0e1e2b103
css: Move property parsing into styleproperty file
...
Just shuffles code around for parsing properties.
2011-06-02 02:03:50 +02:00
Benjamin Otte
5a42464547
css: Rename function to _gtk_style_property_parse_value()
...
... and take an optional style property as argument. This way, we can
allow custom parse functions for properties. The style property needs to
be optional so that we can use it for widget style properties, too.
2011-06-02 02:03:50 +02:00
Benjamin Otte
35488f5846
css: Rename struct variable
...
I want to add parse_func as something different soon.
2011-06-02 02:03:50 +02:00
Benjamin Otte
3e7f74c456
styleproperty: Change _css_value_to_string()
...
Name it _gtk_style_property_print_value() and actually pass it the style
property. This way, we can later change it to use custom print functions
for different style properties.
2011-06-02 02:03:50 +02:00
Benjamin Otte
02a9cb5bc0
css: Change to_string() to print()
...
It's preferrable to print to an existing GString instead of returning a
char* everywhere that needs to be freed later.
2011-06-02 02:03:50 +02:00
Benjamin Otte
a6daba5e78
API: Change semantics of gtk_container_get_child_path()
...
Include the child widget path in the returned path now. This allows
customizing the path of the current widgets - like adding flags to child
widgets (and maybe siblings in the future).
2011-06-02 02:03:50 +02:00
Benjamin Otte
b0616c8225
API: Add gtk_widget_path_append_for_widget()
...
Includes a bunch of header shuffling so we can use GtkWidget* in
gtkwidgetpath.h
2011-06-02 02:03:50 +02:00
Benjamin Otte
352569298a
notebook: Implement height_for_width and width_for_height getters
2011-06-02 00:07:25 +02:00
Benjamin Otte
4d78e9c8af
notebook: Rewrite size request function for wfh
2011-06-02 00:07:25 +02:00
Benjamin Otte
d7519e6ca2
notebook: Split out tabs size computation into its own function
2011-06-02 00:07:25 +02:00
Benjamin Otte
edd2f24b6e
notebook: Compute tab width in a simpler way
...
This code should be more obvious: The check only needs to check for
scrollable widgets, and only needs to compare to tab_width.
As a side note, for vis_pages == 1, tab_width will be smaller than
tab_max + stuff, so this code will not behave differently.
2011-06-01 21:57:45 +02:00
Benjamin Otte
86aefc2c31
notebook: Remove uneeded function declaration
2011-06-01 21:45:21 +02:00
Benjamin Otte
975f735fb7
notebook: Include arrow size in tab size computation
...
We don't want tabs to resize when a 2nd page is added, just because the
scroll arrows are now visible. And we do want the arrow size to be
included.
Note: Previosuly this code was never run, as the check
requisition->width < tab_width
was only run when tab_width wasn't computed, so was still equal to 0
(same for the height). So what this patch essentially does it add the
functionality of the if switch.
2011-06-01 17:46:22 +02:00
Matthias Clasen
1371a86fb1
GtkLabel: Make selection behave more similar to GtkEntry
...
For shift-clicks inside the selection, shrink the selection.
https://bugzilla.gnome.org/show_bug.cgi?id=353712
2011-06-01 01:08:13 -04:00
Matthias Clasen
4cd9009c57
Trivial NULL vs 0 confusion
2011-06-01 00:05:06 -04:00
Matthias Clasen
c56150ea5b
Fix an example
2011-05-31 23:50:13 -04:00
Matthias Clasen
2833cc2327
Change GtkTreePath to grow exponentially
...
To avoid quadratic behaviour when building up
paths by repeated appending indices. Bug 634491.
2011-05-31 22:10:58 -04:00
Matthias Clasen
906292541a
Add tests for GtkTreePath
2011-05-31 22:10:40 -04:00
Matthias Clasen
1c261fe2ae
GtkSearchEngineTracker: avoid an unused variable warning
2011-05-31 21:26:40 -04:00
Matthias Clasen
949125b56b
Make tracker search engine less verbose
...
Patch by Vincent Untz,
https://bugzilla.gnome.org/show_bug.cgi?id=642768
2011-05-31 20:50:42 -04:00
Matthias Clasen
0b9cd78017
Add annotations to gtk_css_provider_load_from_data
...
https://bugzilla.gnome.org/show_bug.cgi?id=646859
2011-05-31 20:37:43 -04:00
Matthias Clasen
5abadc6d95
GtkIconTheme: a small optimization
...
John Lindgren points out in bug 650202 that using judicious
use of g_key_file_has_key() can save some cycles in application
startup.
2011-05-31 20:29:53 -04:00
Matthias Clasen
0705474be6
GtkEntry: don't forget to disconnect idles
...
As pointed out by John Lindgren in bug 650114, GtkEntry forgets
to disconnect an idle source when the completion is set to NULL.
2011-05-31 20:11:28 -04:00
Alexander Saprykin
8d9f413c9b
gtkeditable.c: Remove unused variable in example code
...
https://bugzilla.gnome.org/show_bug.cgi?id=650167
2011-05-31 20:09:58 -04:00
Matthias Clasen
7ef362ec67
GtkEntryCompletion: add a sanity check
...
Patch by John Lindgren,
https://bugzilla.gnome.org/show_bug.cgi?id=650110
2011-05-31 20:07:14 -04:00
Diego Celix
7839c27e13
gtk/gtkcolorsel: gtk_misc_set_alignment replacing
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkcolorsel.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-05-31 20:02:43 -04:00
Diego Celix
95fd3d708d
gtk/gtknotebook: gtk_misc_set_alignment replacing
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtknotebook.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-05-31 20:02:42 -04:00
Diego Celix
d291709ee7
gtkcustompaperunixdialog: gtk_misc_set_alignment
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkcustompaperunixdialog.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-05-31 20:02:41 -04:00
Diego Celix
ee18c5fef3
gtk/gtkfilechooserbutton: gtk_misc_set_alignment
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkfilechooserbutton.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-05-31 20:02:39 -04:00
Matthias Clasen
ab6e3366bc
GtkAppChooser: improve docs
...
Add a cross-reference to GContentType.
https://bugzilla.gnome.org/show_bug.cgi?id=650012
2011-05-31 20:00:50 -04:00
Matthias Clasen
8143ce69eb
GtkApplication: Add window-added/-removed signals
...
This is useful to let unrelated parts of an application (or
plugins) learn about the windows of an application. Based
on a patch by Matt Barnes,
https://bugzilla.gnome.org/show_bug.cgi?id=641087
2011-05-31 19:12:13 -04:00
Matthias Clasen
75390b2d60
Sort GtkApplication windows by most-recently-focused
...
Based on a patch by Matt Barnes,
https://bugzilla.gnome.org/show_bug.cgi?id=624539
2011-05-31 18:28:55 -04:00
Javier Jardón
fb9e4c2c37
all: avoid boxed structs copying where possible (and 2)
...
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.
2011-05-31 19:18:11 +02:00
Javier Jardón
e5c7daa828
tests: avoid boxed structs copying where possible
...
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.
2011-05-31 19:12:24 +02:00
Carlos Garnacho
20433efbfa
gtkcssprovider: Free shorthand border GValues in the right place
...
The call to gtk_border_free() within unpack_border() felt completely
in the wrong place, as the border actually pertains to the GValue
being unpacked. Plus, the GValue itself was also being leaked.
2011-05-30 19:29:22 +02:00
Carlos Garnacho
2c8e01dc80
gtkcssprovider: plug several leaks
...
In finalize(), clear all rulesets.
In parse_declaration(), Free the GValue under unhandled error situations.
In gtk_css_provider_load_internal(), Do not leak the file contents.
2011-05-30 19:26:28 +02:00
Carlos Garnacho
de4ca3ae13
gtkstyleproperty: Plug two leaks
...
In rgba_value_parse(), unref the symbolic color once we've resolved it.
In gradient_value_parse(), take the GtkGradient so we leave no dangling
references.
2011-05-30 19:21:42 +02:00
Carlos Garnacho
b68172b2c6
gtkstyleproperties: zero GValue out before using G_VALUE_COLLECT_INIT()
...
Fixes invalid reads in valgrind
2011-05-30 19:18:41 +02:00
Carlos Garnacho
747dc65c2c
gtkcssprovider: Use g_slice_dup() to copy GValues around
...
GValues stored in GtkCssRulesets are gslice managed, so don't
g_memdup() GValues from shorthand properties. This fixes
memory corruptions when reloading contents in a GtkCssProvider.
2011-05-30 19:13:36 +02:00
Benjamin Otte
3500063bc1
liststore: Replace macro with an inline function
...
Also remove a duplicate check in gtk_list_store_iter_is_valid().
gcc was complaining about "comparison always true" when using the macro.
2011-05-27 16:11:10 +02:00
Benjamin Otte
0b653abcd4
styleproperties: Remove unused priv variables
2011-05-27 16:11:10 +02:00
Benjamin Otte
c5af8c7e3a
treeview: Remove unused variables
...
... and all the code doing complex computations to assign values to
them.
2011-05-27 16:11:10 +02:00
Benjamin Otte
c1b2cbcf50
button: Remove unused variables
2011-05-27 16:11:10 +02:00
Benjamin Otte
d1a8d73871
css: Constify path argument to _css_selector_matches()
...
It should have been const all the time, but I assumed widgetpath code
wasn't properly const. PEBKAC.
2011-05-27 16:11:09 +02:00
Benjamin Otte
f4b7b287b9
widgetpath: Make includes absolute
...
Just like everywhere else
2011-05-27 16:11:09 +02:00
Benjamin Otte
f6ffd6df8a
menuitem: Remove unused variable
...
Seriously, can't people compile with -Werror? Broke with
5f2ef59d69
2011-05-27 16:11:09 +02:00
Benjamin Otte
7b94a6ff2f
styleproperty: Fix memleak in unpacking code
2011-05-27 16:11:09 +02:00
Benjamin Otte
f4e730e718
menuitem: Fix copy/paste error
...
Thanks to Kalev Lember for noticing this one.
2011-05-27 16:11:09 +02:00
Matthias Clasen
9fd0458f1c
Simplify GtkLockButton
...
Now it is actually just a button, which makes things simpler
and is closer to what the designers want.
2011-05-25 20:19:08 -04:00
Benjamin Otte
5f2ef59d69
menuitem: Position submenus properly
...
Now that we can actually query the menu's size, don't query the
preferred minimum size and hope it's correct, but use its actual size.
2011-05-25 04:49:12 +02:00
Benjamin Otte
067dc19177
menu: Realize window before positioning
...
We want the menu realized so we know the size it's allocating to itself.
And we need that size to position the menu properly.
This is best visible on right-to-left.
2011-05-25 04:48:20 +02:00
Benjamin Otte
8cfcb2c123
paned: More fixes to keep windows in sync with widgets
...
Fixes sidebar in evince not showing up. This was caused by the
visiblility of the widget changing and the paned not fixing its child
window's visibility accordingly.
2011-05-25 04:27:15 +02:00
Kjell Ahlstedt
2ebe1ef6f2
bgo#642929 - Don't infinite-loop in GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
...
If the user pressed Enter to confirm the file chooser while the filename entry
was empty, then gtk_file_chooser_default_should_respond() would go back and forth
between the cases for handling the filename entry and the file list.
2011-05-23 15:02:00 -05:00
Benjamin Otte
7de5a4e08d
cssprovider: Don't convert widget style properties to CSS
...
They are still CSS, so converting them is wrong.
2011-05-23 15:56:09 +02:00
Benjamin Otte
7836df29cb
cssprovider: Use right hash table when printing
...
If the CSS provider had widget style properties, printing them would
crash since 82b340f6f0
2011-05-23 15:56:09 +02:00
Benjamin Otte
97a8ff80cc
window: Only draw resize grip if its window exists
...
Don't rely on priv->resize_grip_visible as the code comment in the
variable declaration indicates.
This fixes warnings with GtkPlug, which can cause resize_grip_visible to
be TRUE but grid_window to be NULL - running tests/teststatusicon
reproduces this.
This broke with 7ef113ce56
2011-05-23 15:56:09 +02:00
Matthias Clasen
f30efa7759
Remove unused function attributes from symbol files
2011-05-22 23:39:48 -04:00
Benjamin Otte
4c6721d096
cssparser: Fix typo where we used "uint" for a type
...
Interestingly this works for gcc, but breaks on MSVC.
2011-05-22 06:07:45 +02:00
Benjamin Otte
21236cf270
style: Make margin a shorthand
...
... and add the real properties:
- margin-top
- margin-left
- margin-bottom
- margin-right
2011-05-22 05:56:12 +02:00
Benjamin Otte
a35aa96149
style: Make padding a shorthand
...
... and add the real properties:
- padding-top
- padding-left
- padding-bottom
- padding-right
2011-05-22 05:56:12 +02:00
Benjamin Otte
962ecc6fa5
shadow: Redo shadow implementation for rotations
...
The shadows went bonkers when the labels were rotated
2011-05-22 05:56:12 +02:00
Benjamin Otte
ec34c4bd83
themingeninge: Handle translations properly
...
We want to keep the location of where to render, but transform th
context by the pango transform.
2011-05-22 05:56:12 +02:00
Benjamin Otte
03fbb1f34f
label: Account for y-translation when rotating
2011-05-22 05:56:11 +02:00
Benjamin Otte
f5c7cefcca
style: Convert border-width to a shorthand
...
Add the corresponding properties it refers to, too:
- border-top-width
- border-left-width
- border-bottom-width
- border-right-width
2011-05-22 05:56:11 +02:00
Benjamin Otte
42a4bd1c5b
style: Add support for shorthand properties
...
Shorthand properties are basically the same a in CSS. For storage in
style properties or the CSS provider, they are unpacked into the real
values, so it is possible to partially override them.
No properties are yet converted to the new world yet, this is just the
code for supporting them.
2011-05-22 01:25:17 +02:00
Benjamin Otte
70e654f1a5
stylepropertis: Use set_by_property() in set_valist()
...
... instead of duplicating code. This causes an extra g_value_copy().
If that turns out to be a performance issue, we can invent something
that handles this (like passing a gboolean take_value).
The reason for this duplication deletion is that we want to complicate
the setting code to handle shorthands by unpacking them and storing the
separate values.
2011-05-22 01:25:16 +02:00
Benjamin Otte
73c39f5b16
styleproperties: Add _gtk_style_properties_set_property_by_property()
...
... as a replacement for _gtk_style_properties_set_property_by_pspec().
We'll need that to handle shorthands.
2011-05-22 01:25:16 +02:00
Benjamin Otte
b67ae42ecd
styleproperties: Use peek_property() in get_valist()
2011-05-22 01:23:43 +02:00
Benjamin Otte
0a368fe622
styleproperties: Validate values when setting them
...
Note that validation is not necessary when resolving, because all values
are valid for those cases.
2011-05-22 01:23:36 +02:00
Benjamin Otte
e7db090620
styleproperties: Remove needless check
2011-05-21 22:49:43 +02:00
Benjamin Otte
b889f499a7
styleproperties: Use peek_property in get_property
...
... instead of duplicating the code.
2011-05-21 22:49:43 +02:00
Benjamin Otte
5f5cc79623
styleproperties: Adapt _gtk_style_properties_peek_property()
...
Optionally return the GtkStyleProperty that was looked up. This feature
isn't used yet, but will soon be.
2011-05-21 22:49:43 +02:00
Benjamin Otte
727a839d71
styleproperties: Move the style property handling code
...
... from gtkstyleproperties.c to gtkstyleproperty.c
2011-05-21 22:49:43 +02:00
Benjamin Otte
5eca8f8275
css: Rename gtkcssstrfuncs file to gtkstyleproperty
...
The idea is to handle the style property registering etc in this file
instead of the styleproperties file. The next commits will move those
files.
2011-05-21 22:49:43 +02:00
Benjamin Otte
e64b220791
stringfuncs: Remove _gtk_css_parse_url() from header
...
No code changes, just moving the function in the c file so it doesn't
need to be forward-declared.
2011-05-21 22:49:43 +02:00
Benjamin Otte
548a1302ee
cssprovider: Use _gtk_style_property_lookup()
...
This way we get the actual data node and can use it.
2011-05-21 22:49:43 +02:00
Benjamin Otte
777a6846db
styleproperties: Put gtk_style_property_lookup() in private header
2011-05-21 22:49:43 +02:00
Benjamin Otte
0f211f78a5
styleproperties: Class ref no longer necessary
...
Now that we initialize the pspecs on-demand, we can avoid the class ref.
2011-05-21 22:49:43 +02:00
Benjamin Otte
85e900b522
styleproperties: Init the default properties when they're needed
...
Instead of initing the default style properties in the class_init
func of the style properties, init them when they are first needed -
when they are queried or when new ones are registered.
That way, they will always be available.
2011-05-21 22:49:42 +02:00
Benjamin Otte
a2200e8971
styleproperties: constify gtk_style_property_lookup()
2011-05-21 22:49:42 +02:00
Benjamin Otte
1bd065fa4d
styleproperties: Rename the storage struct for style pspecs
...
PropertyNode => GtkStyleProperty
2011-05-21 22:49:42 +02:00
Diego Celix
ea79cd4314
gtk/gtkstatusbar: gtk_misc_set_alignment replacing
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkstatusbar.c
https://bugzilla.gnome.org/show_bug.cgi?id=650664
2011-05-21 09:16:00 -04:00
Matthias Clasen
e578489579
Allow NULL permissions
...
This is useful in some scenarios.
2011-05-21 09:12:40 -04:00
Benjamin Otte
d333911d30
docs: Add missing <row>
2011-05-21 03:41:52 +02:00
Cosimo Cecchi
8c65d9181d
themingengine: use the text-shadow property to render text shadow
...
This also avoids hardcoding a shadow for insensitive text in the engine,
as it can now be applied from the theme directly.
https://bugzilla.gnome.org/show_bug.cgi?id=649314
2011-05-20 18:49:54 -04:00
Cosimo Cecchi
73e0070774
shadow: add a method to paint the shadow for a PangoLayout
...
https://bugzilla.gnome.org/show_bug.cgi?id=649314
2011-05-20 18:49:54 -04:00
Cosimo Cecchi
c3f3e4a670
styleproperties: resolve properties of type GTK_TYPE_SHADOW
...
https://bugzilla.gnome.org/show_bug.cgi?id=649314
2011-05-20 18:49:50 -04:00
Cosimo Cecchi
016f540931
styleproperties: add a "text-shadow" style property
...
And document its use in the CSS parser gtk-doc.
https://bugzilla.gnome.org/show_bug.cgi?id=649314
2011-05-20 18:44:15 -04:00
Cosimo Cecchi
5b6253252e
css: add a parser for GTK_TYPE_SHADOW properties
...
https://bugzilla.gnome.org/show_bug.cgi?id=649314
2011-05-20 18:44:12 -04:00
Cosimo Cecchi
fcc78bedc8
shadow: add a GtkShadow private type
...
This will be used as a base both for parsing text-shadow and box-shadow
properties. The type is private, as there's no real use in exporting
this in a public API.
https://bugzilla.gnome.org/show_bug.cgi?id=649314
2011-05-20 18:44:07 -04:00
Cosimo Cecchi
8301b24ee5
assistant: pack the sidebar in a frame instead of an event box
...
This has mostly two advantages:
- the most obvious one is the theme can render a border around the
sidebar if it wants to.
- we also can avoid hardcoding a container border width for the sidebar,
and just use a padding from the theme. This also allows different
themes to define a different padding, etc.
The drawback is we must draw the background ourselves, but it's easy
enough.
https://bugzilla.gnome.org/show_bug.cgi?id=650530
2011-05-19 10:54:04 -04:00
Cosimo Cecchi
6bbb9d6f15
assistant: remove an useless gtk_widget_reset_style() call
...
It's not needed to call _reset_style() here, as we did not add the
widget to the parent container yet.
https://bugzilla.gnome.org/show_bug.cgi?id=650530
2011-05-19 10:54:01 -04:00
Benjamin Otte
3ecb308e56
menu: Only realize menu if it isn't realized yet
...
Lots of code calls gtk_menu_popup() and we don't want to resize the
window needlessly.
In this particular case, keyboard navigation to submenus caused those
submenus to shrink.
Note: I'm not sure this fix doesn't have nasty side effects, as I'm not
a specialist on menu popup code, so if it does, we'll need to revert it.
Until then, let's keep it, it fixes a bug.
2011-05-19 13:04:19 +02:00
Benjamin Otte
3410b14751
mac keys: Add a missing semicolon
2011-05-18 22:17:59 +02:00
Benjamin Otte
c3701c737c
keys.css: Remove semicolons at end of rules
...
This is not CSS conform (it will break resync code after errors for
generic CSS parsers), so I deprecated the support for that semicolon.
2011-05-18 22:17:59 +02:00
Benjamin Otte
a1858c5454
cssprovider: When loading themes, don't pass in an error
...
We want to parse existing themes as well as possible instead of failing.
And the g_warning() is preserved.
2011-05-18 22:17:59 +02:00
Benjamin Otte
17e3d6f85e
cssprovider: Don't propagate deprecation messages to passed-in error
...
It's an informative message, don't stop parsing the CSS because of it.
2011-05-18 22:17:59 +02:00
Benjamin Otte
d2ef71627b
css: Make property parsing functions take a css parser
...
Instead of reading a string and then passing that in, let the parse
functions use the full power of the parser.
2011-05-18 22:17:59 +02:00
Benjamin Otte
03e84b7ee3
css: Move binding set parsing to strfuncs
2011-05-18 22:17:59 +02:00
Benjamin Otte
c73d1cf2a6
cssstringfuncs: Read colors as symbolic colors always
...
... and then try to resolve them, so static colors get resolved in
advance, just like it was before.
2011-05-18 22:17:58 +02:00
Benjamin Otte
9e18d8b448
symboliccolor: Allow props == NULL when resolving
...
If props == NULL in gtk_symbolic_color_resolve(), fail sanely for named
colors. The docs used to say it was not allowed to pass NULL for named
color, but that had problems:
1) You do not know if a color was created that way. This is especially
hard for generic users (like language bindings).
2) It wasn't even true. Colors using other symbolic colors would also
fail when trying to resolve their named colors, but the docs didn't
say so.
And because I want to use the function to resolve static colors early
where possible, I changed things.
2011-05-18 22:17:58 +02:00
Benjamin Otte
8111d99183
cssprovider: Cache if rulesets have inheritable style properties
...
This provides a huge speedup as we only need to preprocess style
properties when they are indeed inherited. This roughly doubles the
performance of the CSS matcher and brings the time taken by
gtk_css_provider_get_style() from 19% to 7% in my favorite benchmark.
2011-05-18 22:17:58 +02:00
Benjamin Otte
82b340f6f0
cssprovider: Keep two hash tables per ruleset
...
One for the style properties, one for the widget style properties.
This way we can make one hash table by pspec which means we don't have
to repeat the pspec lookup.
2011-05-18 22:17:58 +02:00
Benjamin Otte
399a439103
cssprovider: Add a new setter for rulesets
...
We now have set-by-pspec (which is used for normal style properties) and
set-by-name (which is used by widget properties).
2011-05-18 22:17:58 +02:00
Benjamin Otte
0318ab2ce1
cssprovider: Refactor handling of rulesets
...
Keep rulesets as an on-stack/heap structure instead of allocating all
instances separately.
Also, pass a ruleset to the ruleset parser, so we can make the ruleset
parser do lots of fancy things that might be useful for performance.
2011-05-18 22:17:58 +02:00