Benjamin Otte
feb1f8de1c
filechooser: Use SELECTION_SINGLE
...
We want to allow people to unselect the item.
2012-01-12 19:37:15 +01:00
Javier Jardón
c958667a92
gtkapplication.c: Add missing "Since" tag
2012-01-12 12:58:56 +00:00
Benjamin Otte
ff1e1e1f91
a11y: Disconnect from buffer signals
...
This way, we don't get crashes when the buffer is still in use after a
TextView gets finalized.
https://bugzilla.gnome.org/show_bug.cgi?id=667632
2012-01-12 04:45:34 +01:00
Benjamin Otte
cac47f45b7
accessible: Remove stray semicolon
...
Note to self: Use -Wempty-body more
2012-01-12 04:45:34 +01:00
Benjamin Otte
4a33eb1aae
styleproperty: Fix 'currentColor'
...
It was always looking at the 'color' keyword for the parent context
instead of only doing that when used with the 'color' property.
Tested by border-color-default.ui reftest.
2012-01-12 04:38:33 +01:00
Benjamin Otte
581cc59945
stylecontext: Don't unref animation description
...
We get it without a ref since 6962b49a99
2012-01-12 01:10:26 +01:00
Cosimo Cecchi
09b4658c06
shorthand: fix parsing of currentColor for border-color shorthand
...
Code for border-color was missing the currentColor parsing.
2012-01-11 17:35:59 -05:00
Dan Winship
05c484dcb0
GtkApplication: add inhibitor dialog under OS X
...
Since OS X doesn't have an inhibitors API, we need to display the
inhibit reason ourselves.
https://bugzilla.gnome.org/show_bug.cgi?id=667705
2012-01-11 12:00:06 -05:00
Dan Winship
7afc7081c1
GtkApplication: fix/simplify OS X implementation
...
Make the OS X implementation compile, and remove the code that was
only needed to support user interaction during the quit request.
https://bugzilla.gnome.org/show_bug.cgi?id=667705
2012-01-11 12:00:06 -05:00
Benjamin Otte
6100900e1a
themingengine: Don't draw background image if no area
...
If the background positioning area is empty (width/height <=0), don't
attempt to draw the background image.
2012-01-11 15:48:54 +01:00
Benjamin Otte
a815f10299
API: Add gtk_style_context_get_section()
...
This API allows querying the location where style properties were
defined. An example implementation will be committed soon.
2012-01-11 15:48:54 +01:00
Benjamin Otte
6962b49a99
css: Introduce GtkCssComputedValues
...
To be used for storing computed values. Is the replacement for
GtkStyleProperties, which is now legacy code.
2012-01-11 15:48:54 +01:00
Benjamin Otte
694a9114af
stylecontext: Simplify even more code
2012-01-11 15:48:54 +01:00
Benjamin Otte
f27f8db2d8
stylecontext: Use our own color resolve function
...
... instead of using the StyleProperties.
2012-01-11 15:48:54 +01:00
Benjamin Otte
abcae0cea4
stylecontext: Simplify function
...
Also, make it easier to port to what I want to do next. ;)
2012-01-11 15:48:54 +01:00
Benjamin Otte
5939baa556
styleproperty: Make query function take a vfunc
...
This way we can use different methods to query properties and aren't
bound to a GtkStyleProperties object.
2012-01-11 15:48:54 +01:00
Benjamin Otte
738f96252e
shorthand: Get rid of GParameter dance
...
Instead assign properties directly.
2012-01-11 15:48:54 +01:00
Benjamin Otte
53b2f05a64
shorthand: Unify unpack_border()
...
Just use the property names.
2012-01-11 15:48:54 +01:00
Benjamin Otte
df88700230
shorthand: Do an unpack function to assign to everything
...
It's basically the opposite to pack_first_element() - it takes the given
value and stores it in all subproperties.
2012-01-11 15:48:54 +01:00
Benjamin Otte
73fac24a3a
shorthand: Add a "pack_first_element" pack function
...
And use it where appropriate.
See the docs in the function for what it does.
2012-01-11 15:48:53 +01:00
Benjamin Otte
6ebb85a69e
shorthand: Unify border parsing code
...
Parse border.{top,right,bottom,left} into subproperties {1,2,3,4}.
2012-01-11 15:48:53 +01:00
Benjamin Otte
78fee2f54b
shorthand: Remove hack
...
This hack was used for parsing back before the refactoring.
2012-01-11 15:48:53 +01:00
Benjamin Otte
e603992ac7
shorthand: Move pack funcs from base class
...
Also make the vfuncs take the shorthand as an argument.
2012-01-11 15:48:53 +01:00
Benjamin Otte
aa98aca45f
styleproperties: Remove color set function
...
Now that we do resolvage with the style context directly, this is no
longer needed.
2012-01-11 15:48:53 +01:00
Carlos Garcia Campos
b9c7f057f1
printing: gtk_print_settings_load_key_file() ignores group_name
2012-01-11 15:38:51 +01:00
Ryan Lortie
7fdf2e0bde
document GtkActionable
...
This should have been done before it was merged...
2012-01-11 13:39:19 +01:00
Christophe Fergeau
ba2d3d1469
Remove duplicate definition of GtkStylePrintFunc
2012-01-11 13:10:28 +01:00
Rico Tzschichholz
f24dd8f067
Fix some missing renames of GtkApplicationEndStyle
2012-01-11 08:49:34 +01:00
Ryan Lortie
b7a28de755
GtkButton: don't do string compare on property set
...
Just set the property unconditionally.
https://bugzilla.gnome.org/show_bug.cgi?id=667394
2012-01-11 00:26:56 -05:00
Ryan Lortie
ab91527032
Rename gtk_application_window_get_observer
...
This should have been called _create_observer
https://bugzilla.gnome.org/show_bug.cgi?id=667394
Fixup switch
2012-01-11 00:26:47 -05:00
Matthias Clasen
fdc2e29d69
GtkSwitch: Implement GtkActionable
2012-01-11 00:10:34 -05:00
Matthias Clasen
7c0c65ec8d
Rename GtkApplicationEndStyle
...
Call it EndSession to make it clearer what this is about.
2012-01-10 22:16:01 -05:00
Matthias Clasen
1c486fb8b8
Simplify logout notification api
...
We don't expose ::quit-requested as API anymore. Instead, we expect
users to register inhibitors when needed. Without quit-requested,
there is no need for ::quit-cancelled and gtk_application_quit_response
anymore.
We still emit ::quit when the application is about to quit.
2012-01-10 21:45:30 -05:00
Guillaume Desmottes
d4fe912879
set the G_PARAM_CONSTRUCT flag on the GtkWindow:application property
...
This allows subclass to get the value of this property in their constructed
method.
https://bugzilla.gnome.org/show_bug.cgi?id=667628
2012-01-10 16:03:57 +01:00
Matthias Clasen
9cb4518a24
Fix wrong refencences in the docs
...
Replace all references to g_application_set_app_menu and
g_application_set_menubar by their gtk variants, which
actually exist. Pointed out in bug 667546
2012-01-09 17:30:09 -05:00
Matthias Clasen
64f3347cd7
Fall back to the builtin icons for spinbutton +/-
...
We do have list-add/-remove icons in the builtin icon theme,
so why not use them ?
2012-01-09 17:15:17 -05:00
Matthias Clasen
8ca309bd37
Add missing symbols
2012-01-09 16:19:50 -05:00
Benjamin Otte
c4566da282
styleproperty: Call style properties init function in more places
...
In particular, call it when querying properties by id. This is necessary
for make check to not die.
2012-01-09 22:08:48 +01:00
Matthias Clasen
2dc10600ea
Fix doc markup
2012-01-09 14:13:44 -05:00
Rui Matos
e9adaabc5e
Rename 'window-unfocused' to 'backdrop'
...
'window-unfocused' is too long and mentions "focus" which is historically
loaded with the meaning "input focus".
'backdrop' isn't generally used in GUI speak and still conveys the state the
widgets in an unfocused or background toplevel window are in.
2012-01-09 18:38:00 +01:00
Benjamin Otte
7a00a95508
themingengine: Move border-image handling into render_frame_internal()
...
This fixes 2 bugs:
1) extensions didn't get border images
2) border-images caused outlines to not be drawn
2012-01-09 18:38:00 +01:00
Benjamin Otte
0c483cab0c
roundedbox: close path
...
Just because we do it everywhere else, too.
2012-01-09 18:38:00 +01:00
Benjamin Otte
c15839f4be
themingengine: Implement outline support
2012-01-09 18:38:00 +01:00
Benjamin Otte
68cfb80631
themingengine: Split out the border drawing function
2012-01-09 18:38:00 +01:00
Benjamin Otte
e9cd339573
css: Add outline CSS properties
2012-01-09 18:38:00 +01:00
Benjamin Otte
1b9e15485e
themingengine: Implement 'dotted' and 'dashed'
2012-01-09 18:38:00 +01:00
Benjamin Otte
34a62d779b
css: Introduce a corner order enum
...
Same order as CSS again.
The nice thing about this is that now edge i in a rounded box follows
corner i and is followed by corner (i + 1) % 4.
2012-01-09 18:38:00 +01:00
Benjamin Otte
998055c835
css: Introduce GtkCssSide
...
... and use it.
This is basically an encoding of the order of sides in CSS. So when
parsing things, this is the way we parse things in.
2012-01-09 18:37:59 +01:00
Benjamin Otte
9e8e9a77b7
themingengine: Implement ridge and groove
2012-01-09 18:37:59 +01:00
Benjamin Otte
4ce34a8e13
themingengine: Redo color handling
...
Don't work on malloc()ed colors. Instead, use an array on the heap. This
makes it easier to copy the array.
2012-01-09 18:37:59 +01:00
Benjamin Otte
d21e7506e7
themingengine: Refactor drawing code
...
... and implement 'double' border-style as proof-of-concept.
2012-01-09 18:37:59 +01:00
Benjamin Otte
fbde62d8e7
css: border-style: hidden computes a 0 border
2012-01-09 18:37:59 +01:00
Benjamin Otte
de3111f1ff
API: Add all border styles from CSS 3
2012-01-09 18:37:59 +01:00
Benjamin Otte
fd3afa3606
styleproperty: Simplify code
...
Merge 1-line function into only caller
2012-01-09 18:37:59 +01:00
Paolo Borelli
c167b4129e
Also add border-{top|right|bottom|left} shorthands
2012-01-09 18:37:59 +01:00
Paolo Borelli
0120aaace5
Add the border css shorthand
2012-01-09 18:37:59 +01:00
Paolo Borelli
6525ed76e0
Rename parse_border
...
For consistency we will use this name for the boder shorthand.
2012-01-09 18:37:59 +01:00
Paolo Borelli
b8aea82743
Use the border-style subproperties for drawing
...
Use the newly introduced per-side property to draw frames.
2012-01-09 18:37:59 +01:00
Benjamin Otte
2c5a8420b5
Set border-width to 0 in compute function
...
This reverts commit c276f53796
and
implements the same feature using the compute function.
A nice side effect is that gtk_style_property_get_border() and
gtk_style_property_get("border") to the same thing now.
2012-01-09 18:37:58 +01:00
Paolo Borelli
e69f14cf2b
Add border-{top|left|bottom|right}-style properties
...
Add all the border-style subproperties and turn border-style itself in a
shorthand.
2012-01-09 18:37:58 +01:00
Benjamin Otte
066f3be659
themingengine: Remove an optimization
...
We optimize the case later on, so no need to do it here.
2012-01-09 18:37:58 +01:00
Benjamin Otte
0e48cc6dae
spinbutton: Pass the right size
...
We need a better diffrentiation between icon sizes - ie GtkIconSize vs
pixel size. Or more CSS.
2012-01-09 18:37:58 +01:00
Benjamin Otte
bbf5fe179d
background: Implement all options of background-repeat
2012-01-09 18:37:58 +01:00
Benjamin Otte
bc9373fb43
styleproperty: Parse all values for background-repeat
...
... and its component in the background property.
2012-01-09 18:37:58 +01:00
Benjamin Otte
181ac0280d
shorthand: Implement the 'background' shorthand
...
Weee, shorthands are now really trivial \o/
2012-01-09 18:37:58 +01:00
Benjamin Otte
a43553ab86
cssimage: Add _gtk_css_image_can_parse()
...
Looks at the first token of the stream to see if this looks like an
image declaration. If it does: return %TRUE.
2012-01-09 18:37:58 +01:00
Benjamin Otte
4b7ca9602d
background: Simplify background-repeat
...
It used to be a struct, now it's just an enum
2012-01-09 18:37:58 +01:00
Benjamin Otte
07aa7f6b20
css: Remove GtkCssBorderRadius
...
It's not used anymore.
2012-01-09 18:37:58 +01:00
Paolo Borelli
fee09e726f
Introduce _gtk_css_parser_try_length
...
This starts to introduce the proper API abstraction for when we will
support different units
2012-01-09 18:37:58 +01:00
Benjamin Otte
fce45757cb
borderimage: Change memory management
...
Making it a on-stack object simplifies things a lot.
2012-01-09 18:37:58 +01:00
Benjamin Otte
9b47a6a4e3
border-image: Remove pack/unpack functions
...
They are not used anymore. Also, it's no longer necessary to register
GtkBorderImage as a custom GType.
2012-01-09 18:37:58 +01:00
Benjamin Otte
96abf8c725
shorthand: Make border-image unget/settable
2012-01-09 18:37:57 +01:00
Benjamin Otte
f014d4f02e
shorthand: Don't require pack/unpack functions
...
When using G_TYPE_NONE as the shorthand's type, the property is not
gettable/settable using regular APIs, so it essentially doesn't exist.
As it should be.
2012-01-09 18:37:57 +01:00
Benjamin Otte
84bc280440
borderimage: Add _gtk_border_image_new_for_context()
...
and use it.
2012-01-09 18:37:57 +01:00
Benjamin Otte
cee05fbeb8
borderimage: Remove unused enums
2012-01-09 18:37:57 +01:00
Benjamin Otte
af8dd87867
styleproperty: Use a custom resolve function for colors
...
We want to make sure to fall back to the initial value of the property
if resolving fails.
This is kinda tricky, because the initial value itself might need
resolving, too.
2012-01-09 18:37:57 +01:00
Benjamin Otte
839b0f5317
css: Handle 'currentColor' special value
...
Computes to the value of the 'color' property, or when used on that
property, is treated as 'inherit'.
2012-01-09 18:37:57 +01:00
Benjamin Otte
84d294ee7f
stylecontext: NMake safe to call into during lookup
...
When resolving a lookup, we may want to query the current style context,
as in the next patch. This works now.
2012-01-09 18:37:57 +01:00
Benjamin Otte
6dfab12e1b
styleproperty: Change order for property registration
...
Some properties depend on other properties, handle those first.
2012-01-09 18:37:57 +01:00
Benjamin Otte
d021ed7c5e
win32: Remove GtkWin32ThemePart
...
Its job is done by GtkCssImage now.
2012-01-09 18:37:57 +01:00
Benjamin Otte
37b11b6c8a
borderimage: Convert to using GtkCssImage
2012-01-09 18:37:57 +01:00
Benjamin Otte
52af00686b
themingbackground: Convert to GtkCssImage
...
The conversion is incomplete and requires some work to account for
all the CSS crazies, like repeat modes and background-size.
2012-01-09 18:37:57 +01:00
Benjamin Otte
60b8b7a398
csslookup: Use the new gtk_style_context_peek_property()
2012-01-09 18:37:57 +01:00
Benjamin Otte
53b4fd69db
themingengine: Add _gtk_theming_engine_peek_property()
...
This is useful for getting at computed values and allows accessing
images before the code autoconverts them to a cairo pattern.
2012-01-09 18:37:57 +01:00
Benjamin Otte
2c8ef919ae
stylecontext: Add _gtk_style_context_peek_property()
...
This allows peeking at the computed value for a property. This is useful
for looking at GtkCssImage.
2012-01-09 18:37:56 +01:00
Benjamin Otte
a35df38443
theme: Apply background merging code
...
It was unused and untested and did not do at all what the CSS spec says.
2012-01-09 18:37:56 +01:00
Benjamin Otte
0bc170cd84
styleproperty: Convert background-image from pattern to GtkCssImage
2012-01-09 18:37:56 +01:00
Benjamin Otte
2bb899b5c0
cssimage: Add a few convenience functions
2012-01-09 18:37:56 +01:00
Benjamin Otte
cdd4ed6600
styleproperty: Use factored-out gradient parser
2012-01-09 18:37:56 +01:00
Benjamin Otte
2a6c168235
win32: Add a CssImage implementation
2012-01-09 18:37:56 +01:00
Benjamin Otte
f7eea0b86e
cssimage: Add GtkCssImageGradient
2012-01-09 18:37:56 +01:00
Benjamin Otte
8f42f8c554
win32: Export _gtk_win32_theme_part_create_surface()
2012-01-09 18:37:56 +01:00
Benjamin Otte
590b125ffc
win32: Export _gtk_win32_lookup_htheme_by_classname()
2012-01-09 18:37:56 +01:00
Benjamin Otte
950b95af40
cssimage: Improve new_parse() to select right image type
2012-01-09 18:37:56 +01:00
Benjamin Otte
38be9fe879
css: Add _gtk_css_parser_has_prefix()
2012-01-09 18:37:56 +01:00
Benjamin Otte
11ec705133
css: Add image implementation for urls
2012-01-09 18:37:56 +01:00
Benjamin Otte
b3389a017a
css: Add GtkCssImage class
...
Doesn't do anything yet, just exists.
2012-01-09 18:37:56 +01:00
Benjamin Otte
9181282d88
style: Remove GtkStylePropertyContext again
...
We need to solve this differently. I have no idea yet how, but I'll
invent something later.
This only affects win32 theming and that's broken anyway.
2012-01-09 18:37:56 +01:00
Benjamin Otte
32c8bbb575
styleproperty: Remove context arg from _gtk_style_context_query()
2012-01-09 18:37:56 +01:00
Benjamin Otte
a9d1be0bef
stylecontext: Remove GtkStylePropertyContext from pack funcs
2012-01-09 18:37:56 +01:00