65 Commits (master)

Author SHA1 Message Date
Pro-Panda aa8a5e70c4 Port from Python 2 to six
Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago
Rahul Bothra 13a2282e5e Port from GObject to GLib 6 years ago
Pro-Panda 7589102e34 Remove example unrelated to Sugar Toolkit 6 years ago
Pro-Panda 0bd9e8fabf Update example to explain various response states
- As a part of #379, which fixed the Response sent on Timeout by TimeoutAlert and NotifyAlert

modified:   examples/alert.py
6 years ago
Ignacio Rodríguez b6d449681d Example fixes
- replaced Gtk.HBox/Gtk.VBox by GtkBox as seen in [1] and [2]
GtkHbox and GtkVBox are deprecated
- use delete-event instead of destroy event in GtkWindow
- replaced icon_size for pixel_size where used
it's also deprecated as seen in commit [3]
- use sugar_theme in all examples; set it manually not by just
importing common module
- fixed GtkBox.pack_start arguments
- flake/pep8 fixes

[1] https://developer.gnome.org/gtk3/stable/GtkHBox.html
[2] https://developer.gnome.org/gtk3/stable/GtkVBox.html
[3] 5802d67ee1
7 years ago
Hrishi f4fc8c0d1f
Write documentation for sugar3.graphics.ColorToolButton
- add one example,

- part of feature Sugar3 Docs,
  https://wiki.sugarlabs.org/go/Features/Sugar3_Docs

Added documentation and example for Colorbutton
7 years ago
Ignacio Rodríguez a735c7a6ce fixed the flake8 errors for examples
doesn't affect that much the code, it just remove
unused modules and make it look better.
7 years ago
Hrishi 4f7ab56c3e Write documentation for sugar3.graphics.ProgressIcon
- add one example,

- part of feature Sugar3 Docs,
  https://wiki.sugarlabs.org/go/Features/Sugar3_Docs
7 years ago
Hrishi c7d1c7acfb Write documentation for sugar3.graphics.ToggleToolButton
- add one example,

- part of feature Sugar3 Docs,
  https://wiki.sugarlabs.org/go/Features/Sugar3_Docs

Signed-off-by: James Cameron <quozl@laptop.org>
7 years ago
James Cameron c92d0009df Write documentation for sugar3.graphics.ToolButton
- add two examples,

- document critical properties as keyword arguments in the class init,

- ensure documentation is consistent between RadioToolButton and
  ToolButton, (as some of the text is similar),

- part of feature Sugar3 Docs,
  https://wiki.sugarlabs.org/go/Features/Sugar3_Docs

- follow How To Guide
  https://wiki.sugarlabs.org/go/Features/Sugar3_Docs/How_To_Write

Derived from work by

- Hrishi <hrishipatel99@gmail.com> (31176ea) and

- radicalonion <ndefilippis98@gmail.com> (db89aca).
7 years ago
Sam Parkinson 3f4a5e904d
First pass sugar3.graphics.icon docs 8 years ago
Sam Parkinson ab0f5a18aa Merge branch 'doc-combobox' of https://github.com/samdroid-apps/sugar-toolkit-gtk3 8 years ago
radicalonion db89aca86a Write docs for sugar3.graphics.radiotoolbutton 8 years ago
Sam Parkinson a334888eb9 Write documentation for sugar3.graphics.combobox 9 years ago
Gonzalo Odiard 49365e132c New invoker, TreeViewInvoker
This new invoker is able to handle all the palettes on a treeview,
removing the need of one invoker per cell renderer (CellRendererInvoker).
This simplifies the code and makes it more efficient.
Also removes the logic from the CellRendererIcon, which
should only care about drawing itself. [1]

Is important to note than in Gtk3 a CellRenderer is not a GtkWidget
then can't know when the mouse is over it or have the usual events
used by other invokers, making the implementation CellRendererInvoker
very complicate.

This commit also removes the invoker of CellRendererIcon.

The ScrollingDetector logic is simplified too,
because now there are only one invoker instead of one by renderer
and the example code updated.

[1] https://developer.gnome.org/gtk3/stable/GtkCellRenderer.html
9 years ago
Gonzalo Odiard 5626a6c182 Detect scrolling in treviews and optimize drawing
Detecting if the treeview is scrolling we can improve the performance of
the CellRendererIcon by avoiding unneeded calculations.

The example scrollingdetector.py shows how this can be used.  The
changes are backward compatible.

Signed-off-by: Manuel Quiñones <manuel.por.aca@gmail.com>
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
9 years ago
Daniel Narvaez 01ed63ee4b Fixes for pep8 1.5 10 years ago
William Orr 30acc63d51 pep8'd examples 11 years ago
William Orr e649070aa2 Replaced deprecated GObject methods with GLib methods 11 years ago
Daniel Narvaez 148655635f Add a make target for tests
We are running the existing test_mime.py. All the other tests which
are not unit tests but more examples of code one can run interactively
are moved to the example directory.
11 years ago
Daniel Narvaez db448c4eea Remove a lot of unused imports
Signed-off-by: Daniel Narvaez <dwnarvaez@gmail.com>
11 years ago
Simon Schampijer b9a19e952f Add examples for Alert, Animator, ComboBox, IconEntry and Notebook
Signed-off-by: Simon Schampijer <simon@schampijer.de>
[squashed two patches into one]
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
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
Sascha Silbe 7acfbd070f style cleanup: prefer ' for strings
Tomeu prefers ' for strings, so let's use it wherever we don't have a good
reason to use ".

Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
14 years ago
Sascha Silbe e2231d5620 PEP8 cleanup: fix number of blank lines
Caught by pep8.

Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
14 years ago
Tomeu Vizoso d1c84b911c Remove symlink that was committed by mistake 15 years ago
Aleksey Lim 353564f12c Fix review issues 15 years ago
Aleksey Lim 3dd0ac8432 Rename ToolbarBox.bar to ToolbarBox.toolbar 15 years ago
Aleksey Lim 7ca9574ca1 Rename ToolbarBox.top to ToolbarBox.bar 15 years ago
Aleksey Lim 61ab4110fa Rename toolbar.py to toolbarbox.py 15 years ago
Aleksey Lim a2f20f39ff Fix review issues 15 years ago
Aleksey Lim 2655a8ccad Suppress sub-palettes in radiopalette 15 years ago
Aleksey Lim 872b18a103 Fix review issues 15 years ago
Aleksey Lim 165b9e1e05 Provide fast access to all sub-widgets in Toolbar 15 years ago
Aleksey Lim 5d2c5b98ff Do not hide sub-widget when sub-palette was opened 15 years ago
Aleksey Lim 55609885de Add radiopalette.py 15 years ago
Aleksey Lim e256b96366 Implement palette mode 15 years ago
Aleksey Lim f9de29f539 Delete sub-widgets clearly 15 years ago
Aleksey Lim 2fc1cab92d Add simple toolbars example 15 years ago
Marco Pesenti Gritti b8018bb889 Add a test for icons 18 years ago
Marco Pesenti Gritti 621e43563f Get rid of the initial implementation of Diana design since that's no more the plan. 18 years ago
Marco Pesenti Gritti d2f76cc41d More work on the new home page.
Remove obsolete import.
18 years ago
Marco Pesenti Gritti e4a87bea06 Implement a stage view 18 years ago
Marco Pesenti Gritti 1e3633baf7 Implement translation 18 years ago
Marco Pesenti Gritti 1c35f8d92c Small improvements 18 years ago
Marco Pesenti Gritti 1e3af85c40 Implement basic animation 18 years ago
Marco Pesenti Gritti fe69904b6c Add layout manager and a circle layout 18 years ago
Marco Pesenti Gritti a02313d85a Beginnings of a simple scene API. Inspired opened-hand's Clutter 18 years ago
Marco Pesenti Gritti 5731405901 Promote terminal activity from terminal to activities. Fix api 18 years ago