29 Commits (aa8a5e70c415e6c2acf4ff373d9b366ac4692bb1)

Author SHA1 Message Date
Pro-Panda aa8a5e70c4 Port from Python 2 to six
Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago
James Cameron 85fc4680e9 Fedora 18 backport - GObject.ParamFlags does not have READWRITE 5 years ago
Rahul Bothra 13a2282e5e Port from GObject to GLib 6 years ago
Pro-Panda af31aa8059 Fix: TimeoutAlert response on Timeout
Explanation:
There was inconsistency between docs and the code.
 - Docs said it returns -1 on timeout
 - Code returned Gtk.Response.OK on timeout

Effect of this commit:
 - Code returns -1 on timeout
6 years ago
James Cameron dd512c9c29 Fix common typo, occured should be occurred 7 years ago
James Cameron 5750773dda Documentation - rewrite activity section
- rewrite of activity section, bundle section, graphics.alert, and
  graphics.window.
7 years ago
James Cameron 83697d21f9 Save As - add an optional Gtk.Entry to Alert
An Alert may have a Gtk.Entry, which is placed between the title and the
buttons.  It is for when text is to be input during the alert.
7 years ago
Sam Parkinson 57fe093886 Merge branch 'ellipsize' of https://github.com/AbrahmAB/sugar-toolkit-gtk3 8 years ago
AbrahmAB cd449e7149 Ellipsis in title and msg of alert 8 years ago
Sam Parkinson 8d0cc98e43 Set css name for widgets
In Gtk+ 3.20, you need to use the css name to select elements,
rather than the gtype name.  Therefore, these must be added.

The css name must be set before the class instances are created, as
it effects the class rather than the instance.  This is why it must
be places after the class definition.
8 years ago
James Cameron 0e724a78eb move guts of TimeoutAlert and NotifyAlert to a private class
Create a private class for the button, timeout and response.  Use the
private class as parent for both NotifyAlert and TimeoutAlert.

Extends the spurious response fix (cfeabdc) to NotifyAlert.

Also use g_timeout_add in preference to g_timeout_add_seconds, because
the latter is less precise in implementation.

Tested by changing the Register alert temporarily.
9 years ago
Sam Parkinson d2e1793108 Merge branch '12813-e' of https://github.com/quozl/sugar-toolkit-gtk3 9 years ago
James Cameron cfeabdc3af remove GSource used by TimeoutAlert
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.
9 years ago
James Cameron 9de70acfff fix alerts documentation
- s/Set/Get for a get property method,

- fix two typos.
9 years ago
Sam Parkinson 0bed21ccc8 Change graphics.alert docs to work well with Sphinx 9 years ago
Daniel Narvaez d12a1d5131 Fix translations domains to point to new toolkit 11 years ago
Daniel Narvaez b83ddaefaf Revert "Fix translations domains to point to new toolkit"
This reverts commit abe0de3ef8.
11 years ago
Daniel Narvaez abe0de3ef8 Fix translations domains to point to new toolkit 11 years ago
William Orr e649070aa2 Replaced deprecated GObject methods with GLib methods 11 years ago
Manuel Quiñones 9c230ea498 Alert: fix for traceback in the draw - SL #4251
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>
12 years ago
Manuel Quiñones 76da9331a4 Alert: use GtkStyleContext instead of deprecated GtkStyle - SL #3907
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>
12 years ago
Daniel Drake 15946211cf Trivial GTK3 porting fixes
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>
13 years ago
Simon Schampijer 09b3740768 _TimeoutIcon: use markup instead of Pango for bold text
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>
13 years ago
Simon Schampijer 1b9af6f6d5 Replace "expose-event" signal by a new "draw" signal
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>
13 years ago
Simon Schampijer 20319cb3c4 Use GObject constructor for Gtk.Alignment
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>
13 years ago
Sascha Silbe 820efa56b9 Run pygi-convert.sh for automatic conversion from GTK2 to GTK3 + pygi.
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>
13 years ago
Daniel Drake 2f7f95f9af Pass all parameters to Box.pack_start() and ...pack_end()
With PyGTK, several Box.pack_{start,end}() parameters had defaults [1,2].
With GTK3+pygi all values must be passed [3,4].

[1] http://developer.gnome.org/pygtk/stable/class-gtkbox.html#method-gtkbox--pack-start
[2] http://developer.gnome.org/pygtk/stable/class-gtkbox.html#method-gtkbox--pack-end
[3] http://developer.gnome.org/gtk/stable/GtkBox.html#gtk-box-pack-start
[4] http://developer.gnome.org/gtk/stable/GtkBox.html#gtk-box-pack-end

[assembled from several patches; replaced description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 8f1a821d68 Rename imports from sugar to sugar3
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 000ed75cbe Rename the module to sugar3
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>
13 years ago