Re: [Sugar-devel] Reminder of GTK3 plans
On 10/28/2011 04:49 AM, Daniel Drake wrote: Hi, This weekend, several of us are meeting in Prague for Sugar/GTK3 hacking: http://wiki.sugarlabs.org/go/Marketing_Team/Events/Gtk3_Hackfest_2011 We will be implementing the plan described at http://wiki.sugarlabs.org/go/Features/GTK3 which has already seen a few rounds of discussion/refinement As a quick reminder of the overall plan: - sugar-artwork will ship a GTK3 theme - sugar-toolkit will ship a new sugar1 module which will be the equivalent of sugar but ported to GTK3 - The release version numbering scheme will not change - we will go 0.96 0.98 0.100 0.102 etc. every 6 months - Some sugar-toolkit API removals/cleanups will happen in the new sugar1 module (see the above link) - The existing GTK2 sugar sugar-toolkit module will stay put for a transition period, but frozen (no further changes accepted) - Read (currently broken) can then be ported to GTK3 - Browse (currently broken) can then be ported to GTK3 and WebKit - Other activities and the sugar shell can follow later - there is no immediate urgency to port things that are not broken It is my hope that this weekend we can crank out a working GTK3 theme and put that alongside the earlier Desktop Summit work which showed how sugar-toolkit could be easily ported to GTK3 (see http://www.itevenworks.net/2011/10/porting-sugar-toolkit-to-gtk3/ ). Hopefully we will finish the weekend with the changes committed to sugar-toolkit and sugar-artwork master. cheers Daniel The current repository for the sugar-toolkit using gtk-3 is at [1]. Regards, Simon [1] http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3/commits/master ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Idea about palettes with gtk3
Hello, On Fri, 2011-10-28 at 19:13 +0100, Marco Pesenti Gritti wrote: we was discussing at the hackfest today how to fixup palettes to work in gtk3. I looked more into the GtkMenuShell code on the train and I had an idea. It seems like GtkMenuShell basically gets access to all the enter/leave events while it's active (because of the grab and some local forwarding through gtk_widget_event). And we can get the actual widget that was entered/left using Gtk.get_event_widget. You can see this by running the attached code snippet. So the palette could be a standard GtkMenu. The icon would popup() on enter. The palette would listen to those events and popdown/popup things depending if we are on the icon, the palette, another icon for the palette in the same group, a submenu of the palette. This looks perfect. By simply overriding the events on the Palette/Menu, we can implement any behaviour that we want. I am thinking of doing the override inside the palette group, as we could easily check whether the user is hovering on top of another palette/menu invoker, and switch right away. It does not work with current pygobject introspection because of some broken performance work that was done, where chaining up to the original event handler does not work properly. Tomeu has got a simple fix for this already though, it will require more work to not regress with regard to the performance. Benjamin ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Reminder of GTK3 plans
On Sat, Oct 29, 2011 at 9:32 AM, Simon Schampijer si...@schampijer.de wrote: The current repository for the sugar-toolkit using gtk-3 is at [1]. Regards, Simon [1] http://git.sugarlabs.org/~erikos/sugar-toolkit/sugar-toolkit-gtk3/commits/master Great, lets document the ongoing process here: http://wiki.sugarlabs.org/go/Features/GTK3/Development ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] sugar-toolkit-gtk3 plans
Hi, We have started to implement GTK3 support in sugar-toolkit/sugar-artwork and have been faced with some decisions which have met a lot of discussion in the group. Some of this is simply expanding on the plans so far, which did not dive down into the gory details which we now face: http://wiki.sugarlabs.org/go/Features/GTK3 and some is a slight modification to what is documented there. Here's what we are thinking: http://www.itevenworks.net/2011/10/sugar-gtk3-hackfest-prague-day-1/ sugar-toolkit git master will be ported to GTK3 directly, without keeping the GTK2 version. The package name in configure.ac will be changed from sugar-toolkit to sugar-toolkit-gtk3, affecting the name of the resultant tarball (the version number will stay as 0.95/0.96 however). This acts as an implicit recommendation to distributions that sugar-toolkit-gtk3 is a separate package from sugar-toolkit; we can back this up with an explicit packaging recommendation in the release notes. sugar-toolkit will still exist as a GTK2 version in the sucrose-0.94 branch. We are toying with the idea of freezing this immediately and not making any changes going forward, so that all sugar-toolkit development efforts are spent on the ever-important GTK3 port, and as an incentive for activity developers to move to GTK3 sooner rather than later. However, we aren't too sure about being able to completely leave this alone - a compromise of only making very few changes may be more appropriate (for now we won't be freezing - this is just a thought). In sugar-toolkit master, we will git mv src/sugar src/sugar3 and adjust the build machinery to install this module under the new sugar3 name. This means that sugar-toolkit-gtk3 will be installable in parallel with sugar-toolkit, meaning that we have support for GTK2 and GTK3 activities. The name sugar3 is chosen with some reluctance - we couldn't find a solution we really like for the problem of needing to somehow have two different, incompatible sugar-toolkits installed (but we decided both on this list and at this meeting that having separate namespaces is better than somehow hacking both into the same sugar module name). We decided that sugar3 is the best compromise as a name of the new GTK3-based toolkit. The 3 indicates that it is based on GTK3, which *is* an item of importance for sugar activity developers: they will need to go to gtk.org or whatever and choose between GTK1/GTK2/GTK3 documentation, in this case the 3 will help guide them to the right place. And it is somewhat future-proof, we can envision sugar4 for GTK4 and so on. Distributions will then ship sugar-toolkit-0.94.x and sugar-toolkit-gtk3-0.96.x, installing both at the same times on users systems for a transition period of 1 year after the first official sugar-toolkit-gtk3 stable release. After 1 year the recommendation to drop sugar-toolkit will be made, leaving only GTK3 support. sugar-base includes some stuff that gets installed in the sugar module. This will be moved into sugar-toolkit-gtk3's sugar3 module. The main bit here is the MIME type stuff; unfortunately gio doesn't provide all that we need (such as the ability to get the default extension of a mime type) - in the longer term we should look at extending the gio API. It additionally installs a small logger class (easy to move) and a dispatch mechanism, also easy to move, and we could consider moving to equivalent glib functionality in the longer term. When distros drop sugar-toolkit-0.94 to remove gtk2 support, they can also drop sugar-base. The next problem is that of /usr/bin/sugar-activity. Right now, this imports from the sugar (GTK2) module (specifically activity/main.py). We are planning to refactor this so that /usr/bin/sugar-activity is made independent of the sugar/sugar3 module. The GTK-specific stuff that happens in main.main() will be moved into the activity class (for both gtk2 and gtk3), and the rest will be moved into /usr/bin/sugar-activity. The final thing is invoking gtk.main or Gtk.main - this will be done by adding a run_main_loop method to the activity classes, called by sugar-activity once the activity instance has been instantiated. If we get things into good shape, we are planning to commit all this to master tomorrow evening. We have already made lots of progress including a somewhat functional theme and a major palette-related headache solved. Code and plans will be carefully reviewed and developed in collaboration by the Sugar superstars we are fortunate to have in the room this weekend (as has already been happening). We'll be happy to respond to comments that come in this weekend or afterwards in further commits. Sascha, would this be OK with you? While things are still a little 'raw' we will be working in branches today and tomorrow morning, they will be detailed here: http://wiki.sugarlabs.org/go/Features/GTK3/Development Thanks, Daniel ___ Sugar-devel mailing list
Re: [Sugar-devel] sugar-toolkit-gtk3 plans
Excerpts from Daniel Drake's message of 2011-10-29 12:12:54 +0200: If we get things into good shape, we are planning to commit all this to master tomorrow evening. We have already made lots of progress including a somewhat functional theme and a major palette-related headache solved. Code and plans will be carefully reviewed and developed in collaboration by the Sugar superstars we are fortunate to have in the room this weekend (as has already been happening). We'll be happy to respond to comments that come in this weekend or afterwards in further commits. Sascha, would this be OK with you? This is rather sudden. I'm on the road this weekend and not sure whether I'll have any time to work on Sugar (like responding in detail to this mail). What's the hurry in getting it landed on mainline master this weekend? Wouldn't a separate branch or different repo work for you? As for the sugar-toolkit plans, I don't care much about the particular branching model (i.e. whether sugar-toolkit mainline master is the GTK3 version or the GTK2 version). However I consider assuming that most activity authors will publish GTK3 based activity versions any time soon (measured in school years) to be wishful thinking. Of those that do actively maintain their activities, I'd expect most to want their activities to run on older versions of Sugar and distros shipping Sugar. Even if we provide _excellent_ support for maintaining GTK2 and GTK3 versions in parallel - which more or less means fully automatic conversion from the GTK2 version to the GTK3 version - I doubt that a significant portion of the authors (excluding the handful of authors that I'd consider part of the core team) would go to these lengths. Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: PGP signature ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH sugar-toolkit PoC] taphold for Palettes
Most touch screens only have a single kind of action, no direct equivalent to the secondary (even n-ary) actions (right-click) of standard PC mice. Taphold is a well-established way on touch screen oriented user interfaces of getting responses similar to what right click would do on WIMP interaces. This patch is a hack to add taphold support to Sugar palettes for evaluation purposes. The real thing (TM) should hook into GTK instead in order to make it work beyond just Sugar palettes. Signed-off-by: Sascha Silbe si...@activitycentral.com --- src/sugar/graphics/palettewindow.py | 88 +++--- 1 files changed, 70 insertions(+), 18 deletions(-) diff --git a/src/sugar/graphics/palettewindow.py b/src/sugar/graphics/palettewindow.py index 0d56f77..e3e2f95 100644 --- a/src/sugar/graphics/palettewindow.py +++ b/src/sugar/graphics/palettewindow.py @@ -22,6 +22,7 @@ STABLE. import logging +import time import gtk import gobject @@ -32,6 +33,12 @@ from sugar.graphics import animator from sugar.graphics import style +# Shorter than 250ms is considered a tap, longer than 1s hold. Anything in +# between is ignored as ambiguous. +_TAP_TIMEOUT_MS = 250 +_HOLD_TIMEOUT_MS = 1000 + + def _calculate_gap(a, b): Helper function to find the gap position and size of widget a # Test for each side if the palette and invoker are @@ -462,6 +469,8 @@ class Invoker(gobject.GObject): self._cursor_y = -1 self._palette = None self._cache_palette = True +self._last_tap = None +self._hold_timeout_hid = None def attach(self, parent): self.parent = parent @@ -632,6 +641,10 @@ class Invoker(gobject.GObject): self.emit('mouse-enter') def notify_mouse_leave(self): +if self._last_tap is not None: +self._last_tap = None +gobject.source_remove(self._hold_timeout_hid) + self.emit('mouse-leave') def notify_right_click(self): @@ -678,6 +691,39 @@ class Invoker(gobject.GObject): if not self.props.cache_palette: self.set_palette(None) +def _button_release_event_cb(self, widget, event): +logging.debug('_button_release_event_cb %d', event.button) +if event.button == 3: +self.notify_right_click() +return True +elif self._last_tap is not None: +time_elapsed = time.time() - self._last_tap +self._last_tap = None +gobject.source_remove(self._hold_timeout_hid) +return time_elapsed = (_TAP_TIMEOUT_MS / 1000.) +return False + +def _button_press_event_cb(self, widget, event): +logging.debug('_button_press_event_cb %d', event.button) +if event.button != 1: +return False + +self._last_tap = time.time() +self._hold_timeout_hid = gobject.timeout_add(_HOLD_TIMEOUT_MS, + self._tap_hold_cb) +return False + +def _tap_hold_cb(self): +logging.debug('_tap_hold_cb') + +if time.time() - self._last_tap (_HOLD_TIMEOUT_MS / 1000.): +logging.debug('too early') +return False + +logging.debug('triggering after %.1fs', time.time() - self._last_tap) +self.notify_right_click() +return False + class WidgetInvoker(Invoker): @@ -688,6 +734,7 @@ class WidgetInvoker(Invoker): self._enter_hid = None self._leave_hid = None self._release_hid = None +self._press_hid = None if parent or widget: self.attach_widget(parent, widget) @@ -700,12 +747,16 @@ class WidgetInvoker(Invoker): self.notify('widget') +self._widget.add_events(gtk.gdk.BUTTON_PRESS_MASK) self._enter_hid = self._widget.connect('enter-notify-event', self.__enter_notify_event_cb) self._leave_hid = self._widget.connect('leave-notify-event', self.__leave_notify_event_cb) self._release_hid = self._widget.connect('button-release-event', -self.__button_release_event_cb) +self._button_release_event_cb) +self._press_hid = self._widget.connect('button-press-event', +self._button_press_event_cb) +logging.debug('press handler connected') self.attach(parent) @@ -714,6 +765,7 @@ class WidgetInvoker(Invoker): self._widget.disconnect(self._enter_hid) self._widget.disconnect(self._leave_hid) self._widget.disconnect(self._release_hid) +self._widget.disconnect(self._press_hid) def get_rect(self): allocation = self._widget.get_allocation() @@ -766,13 +818,6 @@ class WidgetInvoker(Invoker): def __leave_notify_event_cb(self, widget, event): self.notify_mouse_leave() -def __button_release_event_cb(self, widget, event): -if event.button == 3: -self.notify_right_click() -return True -
Re: [Sugar-devel] [Testing] Testing Summary: 29 October 2011 - Auckland, New Zealand
On 10/29/2011 01:23 PM, Tabitha Roder wrote: Testing Summary: 29 October 2011 - Auckland, New Zealand Had planned to test soas v6 but satellit said that it doesn't boot. Tabs; No: f16-EFI Boot USB does not boot.[1] F16-RC1 CD's boot fine [2] (f15-EFI Boot USB works fine on Macbook Pro i7) Tom Gilliard/satellit_ [1] http://wiki.sugarlabs.org/go/Community/Distributions/Fedora-SoaS#MacBook_Persistent_SoaS_v5_USB_EFI_Boot [2] http://wiki.sugarlabs.org/go/Community/Distributions/Fedora-SoaS#F16-RC1-live-i686-SoaS Tested random activities today as no new build to test. Letters 23 - cute little game like scrabble. Found that it uses a word list so you do have to use real words, can't just pick random letters. Keeps a best score which appears the same as the total score in your first game, if you exit the game and reopen it then the total is reset but the best still appears. If you start new activity then the best score is reset as well. The best score doesn't say how many turns you had, so you can beat your best score by playing the game longer. All letters have the same value, so perhaps if there was to be levels then it could assign extra points for using some letters like q or z. Maybe there should be deliberate sets of letters and you have to make as many words as possible, then you get a list of words you missed afterwards. Currently this activity gives random letters so you often get letters that don't easily make words, and you get q without u. Could this game be played in other languages that require tildes and things? DidgArt - very good idea. The mouse pointer is small so hard for people with glasses to see, but is probably useful for fine art work - maybe a resize pointer button? Reading the instructions made the activity make sense, was harder to learn without instructions. Found the keyboard tool change options very useful.. Pictures created don't appear in the journal so cant be added to Write. Python-Tute Requires you to use the Terminal as well. Maths functions working well. A bit ackward shifting between Python-tute and Terminal, tried using the alt tab but python-tute is very slow to display. Completed the first two pages. Derecho a Transitar - clicked on a speech bubble option and then there was no progress. Appears to still be running but never progressed and couldn't click on anything else. Same problem on XO-1.0 and XO-1.5 machines. Textdungeon - seems there is only two spaces you can stand in as every way is blocked. Can pick up a key, sword, lamp and princess. Tried using them all, killed a dragon, but that is it. Stuck. Seems you can't progress further than that. Not sure how to edit the game as it suggests in Write. There will be no testing in Auckland at the Windsor for the next two Saturdays. Tabitha, Tom and Oliver will be visiting Wellington next weekend and can bring the XO-1.75s to show anyone in Wellington who is interested (Tom is going to KiwiCon). The following weekend we will be at Sunshine Coast if anyone lives there and wants to see them ;-) otherwise back to testing as usual on Saturday 19 November at the Windsor, Parnell. Thanks testers Tabitha ___ Testing mailing list test...@lists.laptop.org http://lists.laptop.org/listinfo/testing ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Ruler-14
Activity Homepage: http://activities.sugarlabs.org/addon/4192 Sugar Platform: 0.82 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27689/ruler-14.xo Release notes: 14 * New translations Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release SamplePlay-3
Activity Homepage: http://activities.sugarlabs.org/addon/4489 Sugar Platform: 0.82 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27695/sampleplay-3.xo Release notes: Version 3: GUI tweaks Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Telescope-12
Activity Homepage: http://activities.sugarlabs.org/addon/4481 Sugar Platform: 0.82 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27686/telescope-12.xo Release notes: * Additional experimental 'Camera Gain' control mode. This adds the functionality of controlling the camera gain, with the option of switching automatic gain on/off. Note: Generally speaking, more gain=more noise, so if you have to choose between a higher gain and higher exposure for similar looking images, go for higher exposure. Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Across and Down-24
Activity Homepage: http://activities.sugarlabs.org/addon/4498 Sugar Platform: 0.82 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27698/across_and_down-24.xo Release notes: First Public Version Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Time Line-1
Activity Homepage: http://activities.sugarlabs.org/addon/4497 Sugar Platform: 0.84 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27697/time_line-1.xo Release notes: First stable version Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [SWEETS] Sweets v1.0.1 release and Sugar sweets updates
Hi all! == Sweets-1.0.1 == Major features in this release: * Suggested dependencies. These are recommended dependencies that will be used only if -S|--force-suggested sweets command-line argument was specified. There is new recipe option, suggests for these dependencies http://wiki.sugarlabs.org/go/Platform_Team/Recipe_Specification#Common_options * Optional dependencies. If there are no implementations to use for these dependencies, they will be discarded without errors. Optional dependencies need to be wrapped to square brackets http://wiki.sugarlabs.org/go/Platform_Team/Guide/Sweets_Packaging#Dependencies Use the http://wiki.sugarlabs.org/go/Platform_Team/Guide/Sweets_Usage#Upgrade instructions to upgrade your Sweets. == Sugar sweets == As a result of new Sweets' features, Sugar sweets can be launched in recent Fedora 16 environment that contains evince without pygtk binding and doesn't have hal (need for not recent Sugar versions). Also, sdk/sugar and dextrose/sugar were changed to keep Fructose as suggested dependencies instead of using :shell command. To refresh local feeds, run sweets with -R command-line argument for the first time. For example to start sugar in emulator mode without fetching Fructose dependencies, use: sweets -R sdk/sugar:emulator to fetch Fructose dependencies, e.g., xulrunner-1.9.2 to start Browse in Fedora-16, use: sweets -RS sdk/sugar:emulator All Sugar sweets depends on custom telepathy-mission-control to avoid gnome-keyring usage from telepathy-mission-control versions that come with distributions. -- Aleksey ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release FileMix-10
Activity Homepage: http://activities.sugarlabs.org/addon/4329 Sugar Platform: 0.82 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27700/filemix-10.xo Release notes: Version 10: GUI tweaks Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Our Music-6
Activity Homepage: http://activities.sugarlabs.org/addon/4226 Sugar Platform: 0.82 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27701/ourmusic-6.xo Release notes: Version 6: GUI tweaks Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Sun-Moon Music-2
Activity Homepage: http://activities.sugarlabs.org/addon/4307 Sugar Platform: 0.82 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27702/sunmoonmusic-2.xo Release notes: Version 2: GUI tweaks Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Sun-Moon Music MC-2
Activity Homepage: http://activities.sugarlabs.org/addon/4308 Sugar Platform: 0.82 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27703/sunmoonmusicmc-2.xo Release notes: Version 2: GUI tweaks Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Our Music MC-6
Activity Homepage: http://activities.sugarlabs.org/addon/4227 Sugar Platform: 0.82 - 0.94 Download Now: http://activities.sugarlabs.org/downloads/file/27704/ourmusicmc-6.xo Release notes: Version 6: GUI tweaks Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel