]>
Pileus Git - ~andy/gtk/log
Benjamin Otte [Mon, 30 May 2011 21:32:09 +0000 (23:32 +0200)]
stylecontext: Implement the color getters using the regular API
Has two benefits:
1) Less code
2) I can refactor things
Benjamin Otte [Mon, 30 May 2011 18:25:41 +0000 (20:25 +0200)]
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.
Benjamin Otte [Sun, 29 May 2011 05:03:59 +0000 (07:03 +0200)]
css: Make font property a shorthand
... and implement the CSS font properties:
- font-size
- font-style
- font-family
- font-weight
- font-variant
Benjamin Otte [Sun, 29 May 2011 03:25:05 +0000 (05:25 +0200)]
styleproperty: Factor out the string print function
We print strings in lots of places.
Benjamin Otte [Sun, 29 May 2011 03:24:28 +0000 (05:24 +0200)]
tests: Add tests for font-family
Benjamin Otte [Sat, 28 May 2011 03:43:07 +0000 (05:43 +0200)]
styleproperty: Move default value setting to styleproperty.c
Benjamin Otte [Sat, 28 May 2011 02:36:48 +0000 (04:36 +0200)]
styleproperties: use property, not pspec as key
This allows calling functions on the style property from more places.
Benjamin Otte [Sat, 28 May 2011 02:30:45 +0000 (04:30 +0200)]
tests: Add a test for border-radius handling
Benjamin Otte [Fri, 27 May 2011 23:01:42 +0000 (01:01 +0200)]
cssprovider: Remove colors when resetting
Benjamin Otte [Fri, 27 May 2011 22:54:56 +0000 (00:54 +0200)]
tests: Add a cute demo and test app for the new box css
It contains a live editor for CSS, that thing finds lots of bugs...
Benjamin Otte [Fri, 27 May 2011 22:17:01 +0000 (00:17 +0200)]
box: Add RTL support for sibling paths
We want the reverse path when the box is right-to-left.
Benjamin Otte [Fri, 27 May 2011 22:16:31 +0000 (00:16 +0200)]
reftests: Add a reftest setting all colors to "none"
Benjamin Otte [Fri, 27 May 2011 22:09:20 +0000 (00:09 +0200)]
tests: Add CSS test for the last two bugs
And it's a 1-byte file, too!
Benjamin Otte [Fri, 27 May 2011 22:07:10 +0000 (00:07 +0200)]
css: Don't infloop when resyncing over a slash
Benjamin Otte [Fri, 27 May 2011 22:06:46 +0000 (00:06 +0200)]
css: We want to unescape backslashes, not slashes
Benjamin Otte [Fri, 27 May 2011 21:58:10 +0000 (23:58 +0200)]
stylecontext: Don't crash when colors are "none"
Instead, use their default value (pink).
Benjamin Otte [Wed, 25 May 2011 18:05:55 +0000 (20:05 +0200)]
css: Match pseudo-classes for siblings
Benjamin Otte [Wed, 25 May 2011 21:38:59 +0000 (23:38 +0200)]
box: Add support for siblings in widget paths of box children
Benjamin Otte [Fri, 27 May 2011 16:52:02 +0000 (18:52 +0200)]
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.
Benjamin Otte [Fri, 27 May 2011 16:22:09 +0000 (18:22 +0200)]
API: Add support for siblings to widget paths
Benjamin Otte [Fri, 27 May 2011 16:01:11 +0000 (18:01 +0200)]
docs: Fix typo
Benjamin Otte [Fri, 27 May 2011 15:51:40 +0000 (17:51 +0200)]
widgetpath: Factor out the element copy function
I'll need that function soon.
Benjamin Otte [Fri, 27 May 2011 14:37:16 +0000 (16:37 +0200)]
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.
Benjamin Otte [Fri, 27 May 2011 14:36:07 +0000 (16:36 +0200)]
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.
Benjamin Otte [Thu, 26 May 2011 03:09:48 +0000 (05:09 +0200)]
themingengine: Add support for the border-radii
Benjamin Otte [Thu, 26 May 2011 01:50:53 +0000 (03:50 +0200)]
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.
Benjamin Otte [Thu, 26 May 2011 01:44:09 +0000 (03:44 +0200)]
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.
Benjamin Otte [Wed, 25 May 2011 23:50:41 +0000 (01:50 +0200)]
styleproperty: Make keybindings use custom parse/print functions
We don't want to use it for GPtrArray.
Benjamin Otte [Wed, 25 May 2011 23:46:49 +0000 (01:46 +0200)]
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.
Benjamin Otte [Wed, 25 May 2011 23:32:01 +0000 (01:32 +0200)]
styleproperty: Rename ParseFunc and PrintFunc typedefs
Rename them to GtkStyleParseFunc and GtkStylePrintFunc, so we can export
them.
Benjamin Otte [Wed, 25 May 2011 23:25:00 +0000 (01:25 +0200)]
css: Move property parsing into styleproperty file
Just shuffles code around for parsing properties.
Benjamin Otte [Wed, 25 May 2011 23:01:44 +0000 (01:01 +0200)]
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.
Benjamin Otte [Wed, 25 May 2011 22:09:26 +0000 (00:09 +0200)]
css: Rename struct variable
I want to add parse_func as something different soon.
Benjamin Otte [Mon, 23 May 2011 05:16:17 +0000 (07:16 +0200)]
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.
Benjamin Otte [Mon, 23 May 2011 05:02:36 +0000 (07:02 +0200)]
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.
Benjamin Otte [Wed, 25 May 2011 21:52:48 +0000 (23:52 +0200)]
reftests: Test new pseudo-class support in GtkBox
Benjamin Otte [Wed, 25 May 2011 20:21:15 +0000 (22:21 +0200)]
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).
Benjamin Otte [Wed, 25 May 2011 18:42:27 +0000 (20:42 +0200)]
API: Add gtk_widget_path_append_for_widget()
Includes a bunch of header shuffling so we can use GtkWidget* in
gtkwidgetpath.h
Matthias Clasen [Wed, 1 Jun 2011 22:40:11 +0000 (18:40 -0400)]
Silence a theme parser error
Benjamin Otte [Wed, 1 Jun 2011 21:37:21 +0000 (23:37 +0200)]
notebook: Implement height_for_width and width_for_height getters
Benjamin Otte [Wed, 1 Jun 2011 21:31:04 +0000 (23:31 +0200)]
notebook: Rewrite size request function for wfh
Benjamin Otte [Wed, 1 Jun 2011 21:20:58 +0000 (23:20 +0200)]
notebook: Split out tabs size computation into its own function
Benjamin Otte [Wed, 1 Jun 2011 19:56:13 +0000 (21:56 +0200)]
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.
Benjamin Otte [Wed, 1 Jun 2011 19:45:21 +0000 (21:45 +0200)]
notebook: Remove uneeded function declaration
Benjamin Otte [Wed, 1 Jun 2011 15:45:14 +0000 (17:45 +0200)]
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.
Benjamin Otte [Wed, 1 Jun 2011 14:52:34 +0000 (16:52 +0200)]
tests: Make variable const to silence gcc
Javier Jardón [Mon, 16 May 2011 11:28:56 +0000 (12:28 +0100)]
configure.ac: Use AS_HELP_STRING instead deprecated AC_HELP_STRING
Matthias Clasen [Wed, 1 Jun 2011 05:08:13 +0000 (01:08 -0400)]
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
Matthias Clasen [Wed, 1 Jun 2011 04:05:06 +0000 (00:05 -0400)]
Trivial NULL vs 0 confusion
Matthias Clasen [Wed, 1 Jun 2011 03:50:13 +0000 (23:50 -0400)]
Fix an example
Matthias Clasen [Wed, 1 Jun 2011 02:10:58 +0000 (22:10 -0400)]
Change GtkTreePath to grow exponentially
To avoid quadratic behaviour when building up
paths by repeated appending indices. Bug 634491.
Matthias Clasen [Wed, 1 Jun 2011 02:10:40 +0000 (22:10 -0400)]
Add tests for GtkTreePath
Matthias Clasen [Wed, 1 Jun 2011 01:26:40 +0000 (21:26 -0400)]
GtkSearchEngineTracker: avoid an unused variable warning
Matthias Clasen [Wed, 1 Jun 2011 00:50:42 +0000 (20:50 -0400)]
Make tracker search engine less verbose
Patch by Vincent Untz,
https://bugzilla.gnome.org/show_bug.cgi?id=642768
Matthias Clasen [Wed, 1 Jun 2011 00:37:43 +0000 (20:37 -0400)]
Add annotations to gtk_css_provider_load_from_data
https://bugzilla.gnome.org/show_bug.cgi?id=646859
Matthias Clasen [Wed, 1 Jun 2011 00:29:53 +0000 (20:29 -0400)]
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.
Matthias Clasen [Wed, 1 Jun 2011 00:11:28 +0000 (20:11 -0400)]
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.
Alexander Saprykin [Sat, 14 May 2011 09:34:01 +0000 (13:34 +0400)]
gtkeditable.c: Remove unused variable in example code
https://bugzilla.gnome.org/show_bug.cgi?id=650167
Matthias Clasen [Wed, 1 Jun 2011 00:07:14 +0000 (20:07 -0400)]
GtkEntryCompletion: add a sanity check
Patch by John Lindgren,
https://bugzilla.gnome.org/show_bug.cgi?id=650110
Diego Celix [Sat, 21 May 2011 17:37:26 +0000 (19:37 +0200)]
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
Diego Celix [Fri, 20 May 2011 01:48:22 +0000 (02:48 +0100)]
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
Diego Celix [Sat, 21 May 2011 17:30:33 +0000 (19:30 +0200)]
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
Diego Celix [Sat, 21 May 2011 17:09:58 +0000 (19:09 +0200)]
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
Matthias Clasen [Wed, 1 Jun 2011 00:00:50 +0000 (20:00 -0400)]
GtkAppChooser: improve docs
Add a cross-reference to GContentType.
https://bugzilla.gnome.org/show_bug.cgi?id=650012
Matthias Clasen [Wed, 1 Jun 2011 00:00:11 +0000 (20:00 -0400)]
Make cross-references to gio docs work
Matthias Clasen [Tue, 31 May 2011 23:12:13 +0000 (19:12 -0400)]
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
Matthias Clasen [Tue, 31 May 2011 22:28:55 +0000 (18:28 -0400)]
Sort GtkApplication windows by most-recently-focused
Based on a patch by Matt Barnes,
https://bugzilla.gnome.org/show_bug.cgi?id=624539
Cosimo Cecchi [Tue, 31 May 2011 20:13:50 +0000 (16:13 -0400)]
gtk-demo: don't use a non-existent icon name
Javier Jardón [Tue, 31 May 2011 15:10:46 +0000 (17:10 +0200)]
all: avoid boxed structs copying where possible (and 2)
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.
Javier Jardón [Sun, 29 May 2011 14:45:40 +0000 (16:45 +0200)]
tests: avoid boxed structs copying where possible
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.
Carlos Garnacho [Mon, 30 May 2011 17:29:22 +0000 (19:29 +0200)]
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.
Carlos Garnacho [Mon, 30 May 2011 17:26:28 +0000 (19:26 +0200)]
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.
Carlos Garnacho [Mon, 30 May 2011 17:21:42 +0000 (19:21 +0200)]
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.
Carlos Garnacho [Mon, 30 May 2011 17:18:41 +0000 (19:18 +0200)]
gtkstyleproperties: zero GValue out before using G_VALUE_COLLECT_INIT()
Fixes invalid reads in valgrind
Carlos Garnacho [Mon, 30 May 2011 17:04:22 +0000 (19:04 +0200)]
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.
Carles Ferrando [Sun, 29 May 2011 12:10:00 +0000 (14:10 +0200)]
[l10n]Updated Catalan (Valencian) translation
Carles Ferrando [Sun, 29 May 2011 12:09:36 +0000 (14:09 +0200)]
[l10n]Updated Catalan (Valencian) translation
Kristjan SCHMIDT [Sat, 28 May 2011 12:32:09 +0000 (14:32 +0200)]
Updated Esperanto translation
Benjamin Otte [Fri, 27 May 2011 02:29:56 +0000 (04:29 +0200)]
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.
Benjamin Otte [Fri, 27 May 2011 02:24:10 +0000 (04:24 +0200)]
styleproperties: Remove unused priv variables
Benjamin Otte [Fri, 27 May 2011 02:23:29 +0000 (04:23 +0200)]
treeview: Remove unused variables
... and all the code doing complex computations to assign values to
them.
Benjamin Otte [Fri, 27 May 2011 02:23:10 +0000 (04:23 +0200)]
button: Remove unused variables
Benjamin Otte [Fri, 27 May 2011 02:22:52 +0000 (04:22 +0200)]
docs: Remove unused variables in shooter example
Benjamin Otte [Fri, 27 May 2011 02:22:24 +0000 (04:22 +0200)]
gtk-demo: Don't store anchor in an unused variable
Benjamin Otte [Fri, 27 May 2011 02:21:57 +0000 (04:21 +0200)]
gtk-demo: Remove unused variable for text tags
Benjamin Otte [Fri, 27 May 2011 02:21:40 +0000 (04:21 +0200)]
tests: Remove unused variables
Benjamin Otte [Fri, 27 May 2011 02:20:45 +0000 (04:20 +0200)]
tests: Make forcing of class registers work without gcc warnings
Benjamin Otte [Wed, 25 May 2011 15:40:03 +0000 (17:40 +0200)]
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.
Benjamin Otte [Wed, 25 May 2011 18:22:14 +0000 (20:22 +0200)]
widgetpath: Make includes absolute
Just like everywhere else
Benjamin Otte [Wed, 25 May 2011 15:53:12 +0000 (17:53 +0200)]
menuitem: Remove unused variable
Seriously, can't people compile with -Werror? Broke with
5f2ef59d6968f311abe3ebf9f477120240c1acb2
Benjamin Otte [Thu, 26 May 2011 01:14:00 +0000 (03:14 +0200)]
styleproperty: Fix memleak in unpacking code
Benjamin Otte [Thu, 26 May 2011 14:45:25 +0000 (16:45 +0200)]
menuitem: Fix copy/paste error
Thanks to Kalev Lember for noticing this one.
Carlos Garnacho [Fri, 20 May 2011 20:21:59 +0000 (22:21 +0200)]
configure: Check for XGetEventData()
This is a call only available in recent libX11, only the XI2 code
depends on this within GDK, but XI2 implies having GenericEvents
available too.
Carlos Garnacho [Fri, 20 May 2011 20:17:03 +0000 (22:17 +0200)]
gdk: do not fallback to event->xany.window in GdkEventTranslator
This is already done in gdk_event_source_get_filter_window(), and
could lead to wrong event assignment if an event translator happens
to return a window for an event it doesn't handle.
Matthias Clasen [Thu, 26 May 2011 17:15:40 +0000 (13:15 -0400)]
Cut deadwood
The old tutorial examples haven't been built in years, and are
not useful to keep around in git unless somebody does the work
to integrate them into the 'Getting started' section of the
current docs.
Florian Müllner [Thu, 26 May 2011 12:57:21 +0000 (14:57 +0200)]
configure: Fix build of pixbuf-demo
Matthias Clasen [Thu, 26 May 2011 04:32:31 +0000 (00:32 -0400)]
Move demos around
The pixbuf-demo gets its own subdirectory, the other small
tests move from demos/ to tests/.
Matthias Clasen [Thu, 26 May 2011 04:21:54 +0000 (00:21 -0400)]
And actually delete it
Matthias Clasen [Thu, 26 May 2011 04:20:59 +0000 (00:20 -0400)]
Remove no-longer-needed pixbuf_init hack
Since gdk-pixbuf is now a separate project again, we no
longer need to locate it inside our source tree.
Matthias Clasen [Thu, 26 May 2011 04:08:43 +0000 (00:08 -0400)]
Remove an incomplete, dead copy of testgtk