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 [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 [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 [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, 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.
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
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: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.
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.
Benjamin Otte [Wed, 25 May 2011 02:48:20 +0000 (04:48 +0200)]
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.
Benjamin Otte [Wed, 25 May 2011 02:24:26 +0000 (04:24 +0200)]
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.
Kjell Ahlstedt [Mon, 23 May 2011 20:02:00 +0000 (15:02 -0500)]
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.
Benjamin Otte [Mon, 23 May 2011 13:46:59 +0000 (15:46 +0200)]
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.