GNOME Bugzilla – Bug 698547
gtk-demo: Add demos showing Python threads and processes with GLib and Gtk
Last modified: 2018-01-10 20:24:50 UTC
These should be working examples for linking from the following wiki page: https://live.gnome.org/PyGObject/Threading
Created attachment 242119 [details] [review] Add Python threading examples Add example scripts which make use of Python threads and Gio/Gtk.Application main loops.
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 on attachment 242119 [details] [review] Add Python threading examples Will replace with gtk-demo version.
Created attachment 242699 [details] [review] gtk-demo: Use GtkSource.View for showing source code (removed unused InputStream class)
Created attachment 242700 [details] [review] gtk-demo: Use textwrap to reformat description for Gtk.TextView
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 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 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
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.
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.
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.
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 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
-- 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.