For an object of class TimeoutAlert, an OK response occurs on timeout,
even if user has clicked a button.
Remove the timeout when the user clicks a button.
A new method _response is added which overrides the parent method.
The Gtk.StyleContext get_background_color method needs a
Gtk.StateFlags as a parameter. Feeding it with a GtkStateType doesn't
work anymore in recent gtk+.
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
Using the deprecated GtkStyle is giving an error [1] in the sugar
alert.
[1] http://bugs.sugarlabs.org/ticket/3907#comment:3
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
Fix some trivial issues missed earlier: various missing imports,
some minor API changes to adapt to, do_size_request simple porting,
etc.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
In Pango 'Pango.attr_weight_new' is not yet introspectable [1].
[1] https://bugzilla.gnome.org/show_bug.cgi?id=646788
Signed-off-by: Simon Schampijer <simon@schampijer.de>
[changed description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
GtkWidget "expose-event" signal has been replaced by
a new "draw" signal [1]. The context is already
clipped [2], so do not base it on the values returned by
get_allocation like before.
[1] http://developer.gnome.org/gtk3/3.0/ch25s02.html#id1467092
[2] http://developer.gnome.org/gtk3/3.0/GtkWidget.html#GtkWidget-draw
Signed-off-by: Simon Schampijer <simon@schampijer.de>
[squashed with a patch by Benjamin Berg <benjamin@sipsolutions.net>;
removed useless additions]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
With PyGTK, all parameters of the Alignment constructor had defaults [1].
With GTK3+pygi, when using the explicit constructor (Alignment.new() resp.
gtk_alignment_new() [2]), all values would need to be passed. However when
using the GObject constructor, named properties can be passed in instead and
we only need to pass those that different from the default.
[1] http://developer.gnome.org/pygtk/stable/class-gtkalignment.html#constructor-gtkalignment
[2] http://developer.gnome.org/gtk/stable/GtkAlignment.html#gtk-alignment-new
Signed-off-by: Simon Schampijer <simon@schampijer.de>
[assembled from several patches; replaced description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
This is only on a best-effort basis; the code will be in a broken state after
this patch and need to be fixed manually.
The purpose of committing the intermediate, non-working output is to make it
reproducible. It's impractical to manually review the changes.
The exact version used was 4f637212f13b197a95c824967a58496b9e3b877c from the
main pygobject repository [1] plus a custom patch [2] that hasn't been sent
upstream yet.
[1] git://git.gnome.org/pygobject
[2] https://sascha.silbe.org/patches/pygobject-convert-sugar-20111122.patch
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
The old gtk-2 based module will be present in
the 0.94 branch in the sugar-toolkit.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>