After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698547 - gtk-demo: Add demos showing Python threads and processes with GLib and Gtk
gtk-demo: Add demos showing Python threads and processes with GLib and Gtk
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: documentation
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-22 08:02 UTC by Simon Feltman
Modified: 2018-01-10 20:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add Python threading examples (4.99 KB, patch)
2013-04-22 08:11 UTC, Simon Feltman
needs-work Details | Review
gtk-demo: Use GtkSource.View for showing source code (8.46 KB, patch)
2013-04-28 05:03 UTC, Simon Feltman
none Details | Review
gtk-demo: Use GtkSource.View for showing source code (9.31 KB, patch)
2013-04-28 05:10 UTC, Simon Feltman
committed Details | Review
gtk-demo: Use textwrap to reformat description for Gtk.TextView (1.26 KB, patch)
2013-04-28 05:31 UTC, Simon Feltman
committed Details | Review
gtk-demo: Change demo to use Gtk.Application (3.82 KB, patch)
2013-05-06 01:14 UTC, Simon Feltman
none Details | Review
gtk-demo: Change demo to use Gtk.Application (3.82 KB, patch)
2013-05-06 01:20 UTC, Simon Feltman
none Details | Review
gtk-demo: Change demo to use Gtk.Application (4.26 KB, patch)
2013-05-06 03:12 UTC, Simon Feltman
committed Details | Review

Description Simon Feltman 2013-04-22 08:02:23 UTC
These should be working examples for linking from the following wiki page:

https://live.gnome.org/PyGObject/Threading
Comment 1 Simon Feltman 2013-04-22 08:11:17 UTC
Created attachment 242119 [details] [review]
Add Python threading examples

Add example scripts which make use of Python threads
and Gio/Gtk.Application main loops.
Comment 2 Simon Feltman 2013-04-28 05:03:15 UTC
Created attachment 242698 [details] [review]
gtk-demo: Use GtkSource.View for showing source code

Replace manual syntax highlighting of Gtk.TextView with usage of
GtkSource.View when available. Fall back to TextView with no
hightlighting when GtkSource is not available.
Comment 3 Simon Feltman 2013-04-28 05:03:55 UTC
Comment on attachment 242119 [details] [review]
Add Python threading examples

Will replace with gtk-demo version.
Comment 4 Simon Feltman 2013-04-28 05:10:29 UTC
Created attachment 242699 [details] [review]
gtk-demo: Use GtkSource.View for showing source code

(removed unused InputStream class)
Comment 5 Simon Feltman 2013-04-28 05:31:40 UTC
Created attachment 242700 [details] [review]
gtk-demo: Use textwrap to reformat description for Gtk.TextView
Comment 6 Martin Pitt 2013-04-28 13:06:49 UTC
Comment on attachment 242699 [details] [review]
gtk-demo: Use GtkSource.View for showing source code

This looks good to me. One nitpick: please consider dropping has_source_view and just ask "if GtkSource:", to avoid redundancy.

Thanks!
Comment 7 Simon Feltman 2013-04-28 21:19:24 UTC
Comment on attachment 242699 [details] [review]
gtk-demo: Use GtkSource.View for showing source code

Committed with removal of has_source_view

Attachment 242699 [details] pushed as ed41e26 - gtk-demo: Use GtkSource.View for showing source code
Comment 8 Simon Feltman 2013-04-28 21:19:52 UTC
Comment on attachment 242700 [details] [review]
gtk-demo: Use textwrap to reformat description for Gtk.TextView

Attachment 242700 [details] pushed as f0d4b96 - gtk-demo: Use textwrap to reformat description for Gtk.TextView
Comment 9 Simon Feltman 2013-05-06 01:14:28 UTC
Created attachment 243362 [details] [review]
gtk-demo: Change demo to use Gtk.Application

Replace deriving from Gtk.Window with deriving from Gtk.Application
connected to a Gtk.ApplicationWindow instance.
Comment 10 Simon Feltman 2013-05-06 01:20:18 UTC
Created attachment 243364 [details] [review]
gtk-demo: Change demo to use Gtk.Application

Replace deriving from Gtk.Window with deriving from Gtk.Application
connected to a Gtk.ApplicationWindow instance.
Comment 11 Simon Feltman 2013-05-06 03:12:09 UTC
Created attachment 243370 [details] [review]
gtk-demo: Change demo to use Gtk.Application

Replace deriving from Gtk.Window with deriving from Gtk.Application
connected to a Gtk.ApplicationWindow instance.
Comment 12 Martin Pitt 2013-07-25 13:27:21 UTC
Review of attachment 243370 [details] [review]:

LGTM otherwise, thanks!

::: demos/gtk-demo/gtk-demo.py
@@ +96,1 @@
 

TBH I'm not too fond of this bit, as it makes it harder to spot bugs and regressions there. But I have no strong opinion about it.

But this should become a separate commit, as it's not related to GApplication.
Comment 13 Simon Feltman 2013-07-26 01:04:48 UTC
Comment on attachment 243370 [details] [review]
gtk-demo: Change demo to use Gtk.Application

Committed with changes limited to Gtk.Application usage.

Attachment 243370 [details] pushed as 6ea41b6 - gtk-demo: Change demo to use Gtk.Application
Comment 14 GNOME Infrastructure Team 2018-01-10 20:24:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pygobject/issues/50.