Re: [Sugar-devel] Dist_xo of bundlebuilder
I make this to fix the problem, no crash the existing system and resolvethe problem of no GIT: function: get_files_in_git, line 160 of bundlebuilder.py # pylint: disable=E1103return [path.strip() for path in stdout.strip('\n').split('\n')] Converted in: # pylint: disable=E1103files = [path.strip() for path in stdout.strip('\n').split('\n')]if (files == ['']):files = self.builder.get_files()return files And.. Why this patch was not applied?? http://lists.sugarlabs.org/archive/sugar-devel/2011-November/034196.html ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] conversations about sugar ui design
On Mon, Aug 20, 2012 at 09:09:57AM -0400, Walter Bender wrote: On Sun, Aug 19, 2012 at 11:56 PM, David Brown djhbr...@gmail.com wrote: ... with 69 apps already mooted (and presumably a thousand more waiting to be added), that creates a navigation issue which needs to be addressed. i feel that it could be done by creating categories of activity (such as learn, play and meet) and subcategories etc, making a simple tree structure (or maybe a network with cross-links). the one thing i am sure of is that trying to put buttons for everything on one screen creates information overload. As regard the activity icons on the home page (as several people have responded already) we haven't observed this as being a major problem with Sugar in the field. Also, at least in the beginning, we were disciplined about naming activities as actions, e.g., Paint, Browse, etc. Turtle Art was a bit of an exception and probably could have been named Program. Keeping activity names consistent sounds too over centralized for dispersed community on SL level. But I think it will be useful if UI will present two id elements for one activity (somehow, not exactly two labels for one activity item). When the first one will be a functional name, e.g., Paint (despite of presence Paint activity, it might be, e.g., TuxPaint) that can be tweaked on distribution level (different distributors might follow different naming schemes assuming the targeting audience). On ASLO, this feature is implemented by categories and tags. But for desktop application (which is different to ASLO because clicking assumes immediate launch) it might be useful to implement this feature a bit different. For example, having functional abstraction level in addition to activities one. Users might run activities directly from functional level but can switch to direct activities (and select what particular activity will represent Paint function). It has been oft observed that children will push buttons in order to find out what they do, as oppose to adults, who like to know what buttons do before they push them. In general, there are roll-over text hints for every icon in Sugar. We've had a long (4+ years) argument about the length of the delay in revealing those texts and in the most recent Sugar, all secondary palettes will appear immediately. Functional level will be useful not only for newcomers when people don't know what TurtleArt does, but also for simplification users experience. -- Aleksey ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar] Remove _MouseListener from the frame and cleanup, v2, SL #3820
On 08/23/2012 07:23 AM, Manuel Quiñones wrote: Yes! This complies with the behavior we agreed in the other thread. Please commit. Great, pushed as: 3e28f565b219c9c2b3744204e1e58b48ab76285b 2012/8/22 Simon Schampijer si...@schampijer.de: Move the code of mouse_enter() method into the client class, so a class is not needed anymore. Fix calls to non existent mouse_leave() method from commit 238338d4. Cleanup of unused leave methods due to the new behavior. Signed-off-by: Manuel Quiñones ma...@laptop.org Signed-off-by: Simon Schampijer si...@laptop.org --- src/jarabe/frame/frame.py | 47 --- 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/src/jarabe/frame/frame.py b/src/jarabe/frame/frame.py index ee112a1..4bdcc40 100644 --- a/src/jarabe/frame/frame.py +++ b/src/jarabe/frame/frame.py @@ -54,17 +54,6 @@ class _Animation(animator.Animation): self._frame.move(current) -class _MouseListener(object): -def __init__(self, frame): -self._frame = frame - -def mouse_enter(self): -if self._frame.visible: -self._frame.hide() -else: -self._frame.show() - - class _KeyListener(object): def __init__(self, frame): self._frame = frame @@ -103,7 +92,6 @@ class Frame(object): screen.connect('size-changed', self._size_changed_cb) self._key_listener = _KeyListener(self) -self._mouse_listener = _MouseListener(self) self._notif_by_icon = {} @@ -143,12 +131,6 @@ class Frame(object): self.current_position = pos self._update_position() -def _is_hover(self): -return (self._top_panel.hover or \ -self._bottom_panel.hover or \ -self._left_panel.hover or \ -self._right_panel.hover) - def _create_top_panel(self): panel = self._create_panel(gtk.POS_TOP) @@ -184,9 +166,6 @@ class Frame(object): def _create_left_panel(self): panel = ClipboardPanelWindow(self, gtk.POS_LEFT) -panel.connect('drag-motion', self._drag_motion_cb) -panel.connect('drag-leave', self._drag_leave_cb) - return panel def _create_panel(self, orientation): @@ -226,29 +205,11 @@ class Frame(object): def _size_changed_cb(self, screen): self._update_position() -def _enter_notify_cb(self, window, event): -if event.detail != gtk.gdk.NOTIFY_INFERIOR: -self._mouse_listener.mouse_enter() - -def _leave_notify_cb(self, window, event): -if event.detail == gtk.gdk.NOTIFY_INFERIOR: -return - -if not self._is_hover() and not self._palette_group.is_up(): -self._mouse_listener.mouse_leave() - -def _palette_group_popdown_cb(self, group): -if not self._is_hover(): -self._mouse_listener.mouse_leave() - -def _drag_motion_cb(self, window, context, x, y, time): -self._mouse_listener.mouse_enter() - -def _drag_leave_cb(self, window, drag_context, timestamp): -self._mouse_listener.mouse_leave() - def _enter_corner_cb(self, event_area): -self._mouse_listener.mouse_enter() +if self.visible: +self.hide() +else: +self.show() def notify_key_press(self): self._key_listener.key_press() -- 1.7.11.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3 2/2] Fix the drawing of ColorToolButton, RadioToolButton and ToggleToolButton
On 08/23/2012 07:12 AM, Manuel Quiñones wrote: gtk_paint_box is deprecated [1] and now we can use the CSS to change the style of the button's prelight state. To test the buttons, I provide a patch for HelloWorld activity [2]. They are added in the main toolbar. We should really make sure we have a test-suite for the toolkit/artwork. At the moment we are only patching while going ;p Signed-off-by: Manuel Quiñones ma...@laptop.org [1] http://developer.gnome.org/gtk3/stable/GtkStyle.html#gtk-paint-box [2] http://dev.laptop.org/~manuq/shell-port/test_gtk3_buttons.patch Cool, while trying this out I came across the issue that when the you click on the colorbutton the size changes and therefore there is a gap between toolbar and Palette. Looking at gtk-widgets.css.em this is causing this (border-width): .button:focused { border-width: $(thickness)px; border-color: @white; border-style: solid; } We should find out for which exact use cases it is there. git-blame only told me that it has been added in the general conversion. src/sugar3/graphics/colorbutton.py | 14 -- src/sugar3/graphics/radiotoolbutton.py | 14 -- src/sugar3/graphics/toggletoolbutton.py | 14 -- 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/src/sugar3/graphics/colorbutton.py b/src/sugar3/graphics/colorbutton.py index 95d023a..0783481 100644 --- a/src/sugar3/graphics/colorbutton.py +++ b/src/sugar3/graphics/colorbutton.py @@ -523,20 +523,14 @@ class ColorToolButton(Gtk.ToolItem): title = GObject.property(type=str, getter=get_title, setter=set_title) -def do_expose_event(self, event): +def do_draw(self, cr): child = self.get_child() allocation = self.get_allocation() if self._palette and self._palette.is_up(): invoker = self._palette.props.invoker -invoker.draw_rectangle(event, self._palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -Gtk.ToolButton.do_expose_event(self, event) +invoker.draw_rectangle(cr, self._palette) + +Gtk.ToolButton.do_draw(self, cr) In the toolbutton we have a more detailed drawing. We should see how it exactly differs and if we need to do similar here. def __notify_change(self, widget, pspec): self.notify(pspec.name) diff --git a/src/sugar3/graphics/radiotoolbutton.py b/src/sugar3/graphics/radiotoolbutton.py index 8fd01f7..d843b1f 100644 --- a/src/sugar3/graphics/radiotoolbutton.py +++ b/src/sugar3/graphics/radiotoolbutton.py @@ -165,18 +165,12 @@ class RadioToolButton(Gtk.RadioToolButton): palette_invoker = GObject.property( type=object, setter=set_palette_invoker, getter=get_palette_invoker) -def do_expose_event(self, event): +def do_draw(self, cr): child = self.get_child() allocation = self.get_allocation() if self.palette and self.palette.is_up(): invoker = self.palette.props.invoker -invoker.draw_rectangle(event, self.palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -Gtk.RadioToolButton.do_expose_event(self, event) +invoker.draw_rectangle(cr, self.palette) + +Gtk.RadioToolButton.do_draw(self, cr) diff --git a/src/sugar3/graphics/toggletoolbutton.py b/src/sugar3/graphics/toggletoolbutton.py index c865332..63f4ed6 100644 --- a/src/sugar3/graphics/toggletoolbutton.py +++ b/src/sugar3/graphics/toggletoolbutton.py @@ -113,20 +113,14 @@ class ToggleToolButton(Gtk.ToggleToolButton): accelerator = GObject.property(type=str, setter=set_accelerator, getter=get_accelerator) -def do_expose_event(self, event): +def do_draw(self, cr): allocation = self.get_allocation() child = self.get_child() if self.palette and self.palette.is_up(): invoker = self.palette.props.invoker -invoker.draw_rectangle(event, self.palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', -
Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3 1/2] Fix the drawing method of _IconWidget, used by IconTray
Looks correct, please go ahead. Thanks, Simon On 08/23/2012 07:12 AM, Manuel Quiñones wrote: Invoker draw_rectangle() now receives a Cairo context, as can be seen in [1] The testcase is also fixed by this commit. Signed-off-by: Manuel Quiñones ma...@laptop.org [1] http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/blobs/master/src/sugar3/graphics/palettewindow.py#line1018 --- src/sugar3/graphics/tray.py | 6 +++--- tests/graphics/common.py| 1 + tests/graphics/tray.py | 10 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/sugar3/graphics/tray.py b/src/sugar3/graphics/tray.py index d1c0cfd..82e1d97 100644 --- a/src/sugar3/graphics/tray.py +++ b/src/sugar3/graphics/tray.py @@ -415,13 +415,13 @@ class _IconWidget(Gtk.EventBox): self.add(self._icon) self._icon.show() -def do_expose_event(self, event): +def do_draw(self, cr): palette = self.get_parent().palette if palette and palette.is_up(): invoker = palette.props.invoker -invoker.draw_rectangle(event, palette) +invoker.draw_rectangle(cr, palette) -Gtk.EventBox.do_expose_event(self, event) +Gtk.EventBox.do_draw(self, cr) def get_icon(self): return self._icon diff --git a/tests/graphics/common.py b/tests/graphics/common.py index e5aabd4..3d20d58 100644 --- a/tests/graphics/common.py +++ b/tests/graphics/common.py @@ -16,6 +16,7 @@ # Boston, MA 02111-1307, USA. from gi.repository import Gtk +from gi.repository import GObject from sugar3.graphics.toolbutton import ToolButton diff --git a/tests/graphics/tray.py b/tests/graphics/tray.py index fbe78d1..3da60e3 100644 --- a/tests/graphics/tray.py +++ b/tests/graphics/tray.py @@ -31,10 +31,10 @@ test = common.Test() vbox = Gtk.VBox() tray = HTray() -vbox.pack_start(tray, False) +vbox.pack_start(tray, False, False, 0) tray.show() -theme_icons = Gtk.IconTheme.get_default().list_icons() +theme_icons = Gtk.IconTheme.get_default().list_icons(context=None) for i in range(0, 100): button = TrayButton(icon_name=theme_icons[i]) @@ -42,7 +42,7 @@ for i in range(0, 100): button.show() tray = HTray() -vbox.pack_start(tray, False) +vbox.pack_start(tray, False, False, 0) tray.show() for i in range(0, 10): @@ -53,7 +53,7 @@ for i in range(0, 10): hbox = Gtk.HBox() tray = VTray() -hbox.pack_start(tray, False) +hbox.pack_start(tray, False, False, 0) tray.show() for i in range(0, 100): @@ -62,7 +62,7 @@ for i in range(0, 100): button.show() tray = VTray() -hbox.pack_start(tray, False) +hbox.pack_start(tray, False, False, 0) tray.show() for i in range(0, 4): ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Dist_xo of bundlebuilder
Use git to get the list of files was done after deprecate the MANIFEST files And.. Why this patch was not applied?? http://lists.sugarlabs.org/archive/sugar-devel/2011-November/034196.html Good question. Gonzalo ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] More tests of Write with introspection bindings
Reading again http://www.abisource.com/mailinglists/abiword-dev/2012/Jul/0050.html probably I have the same the problem that Carlos describe: * I can also see graphical oddities (like the AbiWidget disappearing from the window briefly after being shown), but this is doesn't seem to be related to python nor gobject-introspection, as I also reproduced on a simple C client, I'm still investigating what could cause this. Gonzalo On Thu, Aug 23, 2012 at 12:56 AM, Manuel Quiñones ma...@laptop.org wrote: 2012/8/23 Gonzalo Odiard gonz...@laptop.org: Hi Carlos, I continue doing tests, with little advance. Report here to see if you can help me. I have rebuilded all my env, using sugar-build, compiled libgsf and abiword, applied the changes ion your patch to Write activity and the activity crash again. If I replace in the gi/overrides/Abi.py the line: Abi.init(sys.argv) by Abi.init_noargs() the activity starts but the canvas is not visible. But should be present because when quit the activity saves a empty abiword file! The canvas is not displayed in this minimal example neither: from gi.repository import Gtk from gi.repository import Abi win = Gtk.Window() abi = Abi.Widget() win.add(abi) win.show_all() win.connect(destroy, Gtk.main_quit) Gtk.main() The environment I am using is easy to reproduce: In Fedora 17 * Install sugar-build git clone git://git.sugarlabs.org/sugar-build/sugar-build.git cd sugar-build Do you need some recent addition to the gtk stack? You can see the revision number sugar-build uses for each module in scripts/system.modules . -- .. manuq .. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3 2/2] Fix the drawing of ColorToolButton, RadioToolButton and ToggleToolButton
2012/8/23 Simon Schampijer si...@schampijer.de: On 08/23/2012 07:12 AM, Manuel Quiñones wrote: gtk_paint_box is deprecated [1] and now we can use the CSS to change the style of the button's prelight state. To test the buttons, I provide a patch for HelloWorld activity [2]. They are added in the main toolbar. We should really make sure we have a test-suite for the toolkit/artwork. At the moment we are only patching while going ;p Yes! I was thinking the same. So there is the 'tests' directory in sugar-toolkit-gtk3, we have to improve it. We need something like a test activity where we can add toolbuttons to the toolbar, for example. Signed-off-by: Manuel Quiñones ma...@laptop.org [1] http://developer.gnome.org/gtk3/stable/GtkStyle.html#gtk-paint-box [2] http://dev.laptop.org/~manuq/shell-port/test_gtk3_buttons.patch Cool, while trying this out I came across the issue that when the you click on the colorbutton the size changes and therefore there is a gap between toolbar and Palette. Looking at gtk-widgets.css.em this is causing this (border-width): Yes I've seen that too, this is work to be done in the theme. And the prelight for that button should be fixed too. .button:focused { border-width: $(thickness)px; border-color: @white; border-style: solid; } Ah seems you already started :) We should find out for which exact use cases it is there. git-blame only told me that it has been added in the general conversion. I can continue checking from there, thanks. src/sugar3/graphics/colorbutton.py | 14 -- src/sugar3/graphics/radiotoolbutton.py | 14 -- src/sugar3/graphics/toggletoolbutton.py | 14 -- 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/src/sugar3/graphics/colorbutton.py b/src/sugar3/graphics/colorbutton.py index 95d023a..0783481 100644 --- a/src/sugar3/graphics/colorbutton.py +++ b/src/sugar3/graphics/colorbutton.py @@ -523,20 +523,14 @@ class ColorToolButton(Gtk.ToolItem): title = GObject.property(type=str, getter=get_title, setter=set_title) -def do_expose_event(self, event): +def do_draw(self, cr): child = self.get_child() allocation = self.get_allocation() if self._palette and self._palette.is_up(): invoker = self._palette.props.invoker -invoker.draw_rectangle(event, self._palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -Gtk.ToolButton.do_expose_event(self, event) +invoker.draw_rectangle(cr, self._palette) + +Gtk.ToolButton.do_draw(self, cr) In the toolbutton we have a more detailed drawing. We should see how it exactly differs and if we need to do similar here. Ok! I will check. def __notify_change(self, widget, pspec): self.notify(pspec.name) diff --git a/src/sugar3/graphics/radiotoolbutton.py b/src/sugar3/graphics/radiotoolbutton.py index 8fd01f7..d843b1f 100644 --- a/src/sugar3/graphics/radiotoolbutton.py +++ b/src/sugar3/graphics/radiotoolbutton.py @@ -165,18 +165,12 @@ class RadioToolButton(Gtk.RadioToolButton): palette_invoker = GObject.property( type=object, setter=set_palette_invoker, getter=get_palette_invoker) -def do_expose_event(self, event): +def do_draw(self, cr): child = self.get_child() allocation = self.get_allocation() if self.palette and self.palette.is_up(): invoker = self.palette.props.invoker -invoker.draw_rectangle(event, self.palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -Gtk.RadioToolButton.do_expose_event(self, event) +invoker.draw_rectangle(cr, self.palette) + +Gtk.RadioToolButton.do_draw(self, cr) diff --git a/src/sugar3/graphics/toggletoolbutton.py b/src/sugar3/graphics/toggletoolbutton.py index c865332..63f4ed6 100644 --- a/src/sugar3/graphics/toggletoolbutton.py +++ b/src/sugar3/graphics/toggletoolbutton.py @@ -113,20 +113,14 @@ class ToggleToolButton(Gtk.ToggleToolButton): accelerator = GObject.property(type=str, setter=set_accelerator, getter=get_accelerator) -def do_expose_event(self, event): +def
Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3 2/2] Fix the drawing of ColorToolButton, RadioToolButton and ToggleToolButton
While you are here, can see http://bugs.sugarlabs.org/ticket/3388 ? Gonzalo On Thu, Aug 23, 2012 at 8:58 AM, Manuel Quiñones ma...@laptop.org wrote: 2012/8/23 Simon Schampijer si...@schampijer.de: On 08/23/2012 07:12 AM, Manuel Quiñones wrote: gtk_paint_box is deprecated [1] and now we can use the CSS to change the style of the button's prelight state. To test the buttons, I provide a patch for HelloWorld activity [2]. They are added in the main toolbar. We should really make sure we have a test-suite for the toolkit/artwork. At the moment we are only patching while going ;p Yes! I was thinking the same. So there is the 'tests' directory in sugar-toolkit-gtk3, we have to improve it. We need something like a test activity where we can add toolbuttons to the toolbar, for example. Signed-off-by: Manuel Quiñones ma...@laptop.org [1] http://developer.gnome.org/gtk3/stable/GtkStyle.html#gtk-paint-box [2] http://dev.laptop.org/~manuq/shell-port/test_gtk3_buttons.patch Cool, while trying this out I came across the issue that when the you click on the colorbutton the size changes and therefore there is a gap between toolbar and Palette. Looking at gtk-widgets.css.em this is causing this (border-width): Yes I've seen that too, this is work to be done in the theme. And the prelight for that button should be fixed too. .button:focused { border-width: $(thickness)px; border-color: @white; border-style: solid; } Ah seems you already started :) We should find out for which exact use cases it is there. git-blame only told me that it has been added in the general conversion. I can continue checking from there, thanks. src/sugar3/graphics/colorbutton.py | 14 -- src/sugar3/graphics/radiotoolbutton.py | 14 -- src/sugar3/graphics/toggletoolbutton.py | 14 -- 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/src/sugar3/graphics/colorbutton.py b/src/sugar3/graphics/colorbutton.py index 95d023a..0783481 100644 --- a/src/sugar3/graphics/colorbutton.py +++ b/src/sugar3/graphics/colorbutton.py @@ -523,20 +523,14 @@ class ColorToolButton(Gtk.ToolItem): title = GObject.property(type=str, getter=get_title, setter=set_title) -def do_expose_event(self, event): +def do_draw(self, cr): child = self.get_child() allocation = self.get_allocation() if self._palette and self._palette.is_up(): invoker = self._palette.props.invoker -invoker.draw_rectangle(event, self._palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -Gtk.ToolButton.do_expose_event(self, event) +invoker.draw_rectangle(cr, self._palette) + +Gtk.ToolButton.do_draw(self, cr) In the toolbutton we have a more detailed drawing. We should see how it exactly differs and if we need to do similar here. Ok! I will check. def __notify_change(self, widget, pspec): self.notify(pspec.name) diff --git a/src/sugar3/graphics/radiotoolbutton.py b/src/sugar3/graphics/radiotoolbutton.py index 8fd01f7..d843b1f 100644 --- a/src/sugar3/graphics/radiotoolbutton.py +++ b/src/sugar3/graphics/radiotoolbutton.py @@ -165,18 +165,12 @@ class RadioToolButton(Gtk.RadioToolButton): palette_invoker = GObject.property( type=object, setter=set_palette_invoker, getter=get_palette_invoker) -def do_expose_event(self, event): +def do_draw(self, cr): child = self.get_child() allocation = self.get_allocation() if self.palette and self.palette.is_up(): invoker = self.palette.props.invoker -invoker.draw_rectangle(event, self.palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -Gtk.RadioToolButton.do_expose_event(self, event) +invoker.draw_rectangle(cr, self.palette) + +Gtk.RadioToolButton.do_draw(self, cr) diff --git a/src/sugar3/graphics/toggletoolbutton.py b/src/sugar3/graphics/toggletoolbutton.py index c865332..63f4ed6 100644 --- a/src/sugar3/graphics/toggletoolbutton.py +++
Re: [Sugar-devel] Dist_xo of bundlebuilder
On 08/23/2012 12:06 PM, Gonzalo Odiard wrote: Use git to get the list of files was done after deprecate the MANIFEST files And.. Why this patch was not applied?? http://lists.sugarlabs.org/archive/sugar-devel/2011-November/034196.html Good question. Gonzalo Thanks, this one got lost somehow. /me wonders who or what he could blame for that... Pushed now to toolkit*. Happy packaging - with or without git, Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH sugar-toolkit-gtk3 v2] Fix the drawing of ColorToolButton, RadioToolButton and ToggleToolButton
Draw a black background in the buttons when the palette is up, as commit 01a06943 did with the ToolButton. As the comment for that commit states, we can change the prelight background color in the theme, but not when the mouse moves over the Palette. To test the buttons, I provide a patch for HelloWorld activity [1]. They are added in the main toolbar. Signed-off-by: Manuel Quiñones ma...@laptop.org --- [1] http://dev.laptop.org/~manuq/shell-port/test_gtk3_buttons.patch v2: Paint the background color as per Simon's feedback. --- src/sugar3/graphics/colorbutton.py | 20 ++-- src/sugar3/graphics/radiotoolbutton.py | 20 ++-- src/sugar3/graphics/toggletoolbutton.py | 20 ++-- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/sugar3/graphics/colorbutton.py b/src/sugar3/graphics/colorbutton.py index 95d023a..823fd61 100644 --- a/src/sugar3/graphics/colorbutton.py +++ b/src/sugar3/graphics/colorbutton.py @@ -523,20 +523,20 @@ class ColorToolButton(Gtk.ToolItem): title = GObject.property(type=str, getter=get_title, setter=set_title) -def do_expose_event(self, event): +def do_draw(self, cr): child = self.get_child() allocation = self.get_allocation() if self._palette and self._palette.is_up(): invoker = self._palette.props.invoker -invoker.draw_rectangle(event, self._palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -Gtk.ToolButton.do_expose_event(self, event) +invoker.draw_rectangle(cr, self._palette) + +allocation = self.get_allocation() +# draw a black background, has been done by the engine before +cr.set_source_rgb(0, 0, 0) +cr.rectangle(0, 0, allocation.width, allocation.height) +cr.paint() + +Gtk.ToolButton.do_draw(self, cr) def __notify_change(self, widget, pspec): self.notify(pspec.name) diff --git a/src/sugar3/graphics/radiotoolbutton.py b/src/sugar3/graphics/radiotoolbutton.py index 8fd01f7..006d167 100644 --- a/src/sugar3/graphics/radiotoolbutton.py +++ b/src/sugar3/graphics/radiotoolbutton.py @@ -165,18 +165,18 @@ class RadioToolButton(Gtk.RadioToolButton): palette_invoker = GObject.property( type=object, setter=set_palette_invoker, getter=get_palette_invoker) -def do_expose_event(self, event): +def do_draw(self, cr): child = self.get_child() allocation = self.get_allocation() if self.palette and self.palette.is_up(): invoker = self.palette.props.invoker -invoker.draw_rectangle(event, self.palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -Gtk.RadioToolButton.do_expose_event(self, event) +invoker.draw_rectangle(cr, self.palette) + +allocation = self.get_allocation() +# draw a black background, has been done by the engine before +cr.set_source_rgb(0, 0, 0) +cr.rectangle(0, 0, allocation.width, allocation.height) +cr.paint() + +Gtk.RadioToolButton.do_draw(self, cr) diff --git a/src/sugar3/graphics/toggletoolbutton.py b/src/sugar3/graphics/toggletoolbutton.py index c865332..f50d2fd 100644 --- a/src/sugar3/graphics/toggletoolbutton.py +++ b/src/sugar3/graphics/toggletoolbutton.py @@ -113,20 +113,20 @@ class ToggleToolButton(Gtk.ToggleToolButton): accelerator = GObject.property(type=str, setter=set_accelerator, getter=get_accelerator) -def do_expose_event(self, event): +def do_draw(self, cr): allocation = self.get_allocation() child = self.get_child() if self.palette and self.palette.is_up(): invoker = self.palette.props.invoker -invoker.draw_rectangle(event, self.palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -
Re: [Sugar-devel] porting Gstreamer Activities to PYGobject and Gstreamer 1.0
On Wed, Aug 1, 2012 at 5:39 PM, Daniel Narvaez dwnarv...@gmail.com wrote: If you are using a plugin which is not built, please let me know and I'll add the required system dependencies. Can you add gst-plugins-ugly, gst-plugins-bad and gst-ffmpeg? I tried to do it by myself but I couldn't. I'm attaching my diff just in case. Thanks, -- Kaufmann Manuel Blog: http://humitos.wordpress.com/ Porfolio: http://fotos.mkaufmann.com.ar/ PyAr: http://www.python.com.ar/ gst-plugins.diff Description: Binary data ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH sugar-toolkit] Don't cache window size in palettewindow invoker
From: Gonzalo Odiard godi...@gmail.com The screen size can change, by example when the screen rotate, and the stored values are not useful anymore. Without this patch the device icons palettes in the Journal or in the frame are not displayed if the screen is rotated to right or left. Signed-off-by: Gonzalo Odiard gonz...@laptop.org --- src/sugar/graphics/palettewindow.py | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/sugar/graphics/palettewindow.py b/src/sugar/graphics/palettewindow.py index 5281e54..a19db62 100644 --- a/src/sugar/graphics/palettewindow.py +++ b/src/sugar/graphics/palettewindow.py @@ -453,8 +453,6 @@ class Invoker(gobject.GObject): self.parent = None -self._screen_area = gtk.gdk.Rectangle(0, 0, gtk.gdk.screen_width(), - gtk.gdk.screen_height()) self._position_hint = self.ANCHORED self._cursor_x = -1 self._cursor_y = -1 @@ -502,20 +500,17 @@ class Invoker(gobject.GObject): palette_width, palette_height) def _in_screen(self, rect): -return rect.x = self._screen_area.x and \ - rect.y = self._screen_area.y and \ - rect.x + rect.width = self._screen_area.width and \ - rect.y + rect.height = self._screen_area.height +return rect.x = 0 and rect.y = 0 and \ + rect.x + rect.width = gtk.gdk.screen_width() and \ + rect.y + rect.height = gtk.gdk.screen_height() def _get_area_in_screen(self, rect): Return area of rectangle visible in the screen -x1 = max(rect.x, self._screen_area.x) -y1 = max(rect.y, self._screen_area.y) -x2 = min(rect.x + rect.width, -self._screen_area.x + self._screen_area.width) -y2 = min(rect.y + rect.height, -self._screen_area.y + self._screen_area.height) +x1 = max(rect.x, 0) +y1 = max(rect.y, 0) +x2 = min(rect.x + rect.width, gtk.gdk.screen_width()) +y2 = min(rect.y + rect.height, gtk.gdk.screen_height()) return (x2 - x1) * (y2 - y1) @@ -545,8 +540,8 @@ class Invoker(gobject.GObject): rect.x = max(0, rect.x) rect.y = max(0, rect.y) -rect.x = min(rect.x, self._screen_area.width - rect.width) -rect.y = min(rect.y, self._screen_area.height - rect.height) +rect.x = min(rect.x, gtk.gdk.screen_width() - rect.width) +rect.y = min(rect.y, gtk.gdk.screen_height() - rect.height) return rect @@ -572,7 +567,8 @@ class Invoker(gobject.GObject): iv = best_alignment[3] rect = self.get_rect() -screen_area = self._screen_area +screen_area = gtk.gdk.Rectangle(0, 0, gtk.gdk.screen_width(), + gtk.gdk.screen_height()) if best_alignment in self.LEFT or best_alignment in self.RIGHT: dtop = rect.y - screen_area.y -- 1.7.11.2 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Design] On Screen Keyboard – part of the 'get Sugar touch ready' feature set
Hi Chris, On 23 Aug 2012, at 05:56, Chris Leonard cjlhomeaddr...@gmail.com wrote: On Wed, Aug 22, 2012 at 9:09 PM, Gary Martin garycmar...@googlemail.com wrote: The key layout is a more complicated affair as it requires modification of XML files for each language layout [1], so I'd rather lock down an agreed layout before I start trying to apply them to 40+ different languages – and yes I plan to script the edits as far as I can ;) FWIW, looks like this will be a patch set we need to apply to out builds as although maliit supports custom styles (olpc-xo is the one they added for us), their layouts are shared between all styles, so they would be unlikely to accept patches from us wanting to modify them all for Sugar's needs. [1] https://gitorious.org/maliit/maliit-plugins/trees/master/maliit-keyboard/data/languages I like the most recent version well enough, http://wiki.sugarlabs.org/go/File:Maliit_Sugar_theme_work_13.png High praise ;) Improvements/changes? I'm a little concerned that the absence of the Home/Friends/Neighborhood/World quartet of XO specific keys will be missed, but I understand that it is tough to collapse 6 rows of XO keys into 4 rows for Maliit. Yes space is at a premium using an OSK [1], however as the OSK is only visible when a text input widget has focus, we need to make sure Neighborhood/Group/Home/Activity/Journal are accessible at all other times as well, primarily by improving touch access to the Frame (and improving Frame discovery, though unlkely for this cycle). I've got lots of other questions, but they are more i18n related, so I'll forego inserting them into this design thread, No, bring them up here if they are OSK related! but I can't resist throwing one out there. Is there currently a mechanism for re-creating the many xkb-based layouts already designed for OLPC that never got silkscreened? http://wiki.laptop.org/go/Keyboard_layouts No, those are physical layouts not designed for OSK. There about 40 existing maliit layouts that I'll update to match our OSK design modifications. And then I'd imagine we will want to closely check the OSK layouts for the languages we prioritise, and make sure they cover our needs (the existing OLPC layouts will be a useful reference). Thanks for the feedback! Regards, --Gary [1] 8-10mm per touch target is about as small as you want to go for key hit targets, and we are at 9.5mm in portrait for the v13 layout example (assuming the current XO screen dimensions). cjl ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] porting Gstreamer Activities to PYGobject and Gstreamer 1.0
On Thu, Aug 23, 2012 at 10:14 AM, Manuel Kaufmann humi...@gmail.com wrote: I tried to do it by myself but I couldn't. I'm attaching my diff just in case. I could do it! :D I'm attaching the patch for this and I pointing you to the log because there is something wrong on the compiling step :( * http://mkaufmann.com.ar/~humitos/olpc/build-20120823-115105.log -- Kaufmann Manuel Blog: http://humitos.wordpress.com/ Porfolio: http://fotos.mkaufmann.com.ar/ PyAr: http://www.python.com.ar/ 0001-GStreamer-1.0-plugins-added.patch Description: Binary data ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Design] On Screen Keyboard – part of the 'get Sugar touch ready' feature set
[1] 8-10mm per touch target is about as small as you want to go for key hit targets, and we are at 9.5mm in portrait for the v13 layout example (assuming the current XO screen dimensions). Do you know how much is this in pixels or better in style.zoom() units? Should be good have this information available for activity developers. Gonzalo ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Design] On Screen Keyboard – part of the 'get Sugar touch ready' feature set
Hi Gonzalo, On 23 Aug 2012, at 16:20, Gonzalo Odiard gonz...@laptop.org wrote: [1] 8-10mm per touch target is about as small as you want to go for key hit targets, and we are at 9.5mm in portrait for the v13 layout example (assuming the current XO screen dimensions). Do you know how much is this in pixels or better in style.zoom() units? Should be good have this information available for activity developers. Well I can tell you that our standard toolbar button size is already pretty much spot on :) this is part of the reason I was happy that Sugar designs already had a very good basis for touch support vs. other desktop operating systems. Regards, --Gary Gonzalo ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] porting Gstreamer Activities to PYGobject and Gstreamer 1.0
On 23 August 2012 17:16, Manuel Kaufmann humi...@gmail.com wrote: On Thu, Aug 23, 2012 at 10:14 AM, Manuel Kaufmann humi...@gmail.com wrote: I tried to do it by myself but I couldn't. I'm attaching my diff just in case. I could do it! :D I'm attaching the patch for this and I pointing you to the log because there is something wrong on the compiling step :( * http://mkaufmann.com.ar/~humitos/olpc/build-20120823-115105.log The log is incomplete so I'm not sure where it's failing. Though I applied your patch and it fails for me because of too old gstreamer. Trying to update revisions and seeing if I can get it to build... ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH sugar] Launcher: set the standard SPLASHSCREEN hint instead of our own _SUGAR_WINDOW_TYPE hint
From: Simon Schampijer si...@laptop.org Currently we have issues with introspecting gdk_property_get and we already have a wrapper around gdk_property_change [1]. We discussed reimplementing the toolkit wm module in C, and provide the following functions: get_activity_id get_bundle_id set_activity_id set_bundle_id To prepare for this move we want to remove our own _SUGAR_WINDOW_TYPE hint and replace it with the standard SPLASHSCREEN one [2][3], which is done in this patch. [1] http://wiki.sugarlabs.org/go/Features/GTK3/Shell#gdk_property_change [2] http://www.pygtk.org/docs/pygtk/gdk-constants.html#gdk-window-type-hint-constants [3] http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html Signed-off-by: Simon Schampijer si...@laptop.org --- src/jarabe/model/shell.py | 8 +--- src/jarabe/view/launcher.py | 4 +--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py index 31605f7..1f3ee8d 100644 --- a/src/jarabe/model/shell.py +++ b/src/jarabe/model/shell.py @@ -521,7 +521,8 @@ class ShellModel(gobject.GObject): them. -if window.get_window_type() == wnck.WINDOW_NORMAL: +if window.get_window_type() == wnck.WINDOW_NORMAL or \ +window.get_window_type() == wnck.WINDOW_SPLASHSCREEN: home_activity = None activity_id = wm.get_activity_id(window) @@ -552,7 +553,7 @@ class ShellModel(gobject.GObject): logging.debug('window registered for %s', activity_id) home_activity.add_window(window) -if wm.get_sugar_window_type(window) != 'launcher' \ +if window.get_window_type() != wnck.WINDOW_SPLASHSCREEN \ and home_activity.get_launch_status() == Activity.LAUNCHING: self.emit('launch-completed', home_activity) startup_time = time.time() - home_activity.get_launch_time() @@ -563,7 +564,8 @@ class ShellModel(gobject.GObject): self._set_active_activity(home_activity) def _window_closed_cb(self, screen, window): -if window.get_window_type() == wnck.WINDOW_NORMAL: +if window.get_window_type() == wnck.WINDOW_NORMAL or \ +window.get_window_type() == wnck.WINDOW_SPLASHSCREEN: xid = window.get_xid() activity = self._get_activity_by_xid(xid) if activity is not None: diff --git a/src/jarabe/view/launcher.py b/src/jarabe/view/launcher.py index 5c645c4..e9f81d7 100644 --- a/src/jarabe/view/launcher.py +++ b/src/jarabe/view/launcher.py @@ -32,7 +32,7 @@ class LaunchWindow(gtk.Window): def __init__(self, activity_id, icon_path, icon_color): gobject.GObject.__init__(self) -self.props.type_hint = gtk.gdk.WINDOW_TYPE_HINT_NORMAL +self.props.type_hint = gtk.gdk.WINDOW_TYPE_HINT_SPLASHSCREEN self.props.decorated = False self.modify_bg(gtk.STATE_NORMAL, style.COLOR_WHITE.get_gdk_color()) @@ -94,8 +94,6 @@ class LaunchWindow(gtk.Window): def __realize_cb(self, widget): wm.set_activity_id(widget.window, str(self._activity_id)) -widget.window.property_change('_SUGAR_WINDOW_TYPE', 'STRING', 8, - gtk.gdk.PROP_MODE_REPLACE, 'launcher') def __size_changed_cb(self, screen): self._update_size() -- 1.7.11.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] porting Gstreamer Activities to PYGobject and Gstreamer 1.0
Pushed a patch based on your. You might need to add stuff to check-system if you need certain plugins to be built. Let me know if you have any issues... ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH sugar-toolkit-gtk3] Finish the port of the CellRendererIcon
In pygtk custom cellrenderers were done inheriting gtk.GenericCellRenderer, and overriding the on_* methods. Now we inherit Gtk.CellRenderer and the methods to override changed to do_* . The destroy signal was moved to Gtk.Widget [1] so the Gtk.CellRenderer doesn't have it anymore. Now we do the cleanup in the python destructor method. A testcase tests/graphics/customdestroy.py shows how is done. tests/graphics/cellrenderericon.py tests the usage. Signed-off-by: Manuel Quiñones ma...@laptop.org [1] http://developer.gnome.org/gtk3/stable/ch24s02.html#id1459754 --- src/sugar3/graphics/icon.py| 25 ++ tests/graphics/cellrenderericon.py | 37 tests/graphics/customdestroy.py| 44 ++ 3 files changed, 92 insertions(+), 14 deletions(-) create mode 100644 tests/graphics/cellrenderericon.py create mode 100644 tests/graphics/customdestroy.py diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py index 1bea136..ecf657c 100644 --- a/src/sugar3/graphics/icon.py +++ b/src/sugar3/graphics/icon.py @@ -497,7 +497,6 @@ class EventIcon(Gtk.EventBox): from sugar3.graphics.palette import CursorInvoker self._palette_invoker = CursorInvoker() - self._palette_invoker.attach(self) self.connect('destroy', self.__destroy_cb) @@ -705,9 +704,7 @@ class CellRendererIcon(Gtk.CellRenderer): self._palette_invoker.attach_cell_renderer(tree_view, self) -self.connect('destroy', self.__destroy_cb) - -def __destroy_cb(self, icon): +def __del__(self): self._palette_invoker.detach() def create_palette(self): @@ -779,7 +776,8 @@ class CellRendererIcon(Gtk.CellRenderer): size = GObject.property(type=object, setter=set_size) -def on_get_size(self, widget, cell_area): +def do_get_size(self, widget, cell_area, x_offset=None, y_offset=None, +width=None, height=None): width = self._buffer.width + self.props.xpad * 2 height = self._buffer.height + self.props.ypad * 2 xoffset = 0 @@ -797,11 +795,11 @@ class CellRendererIcon(Gtk.CellRenderer): return xoffset, yoffset, width, height -def on_activate(self, event, widget, path, background_area, cell_area, +def do_activate(self, event, widget, path, background_area, cell_area, flags): pass -def on_start_editing(self, event, widget, path, background_area, cell_area, +def do_start_editing(self, event, widget, path, background_area, cell_area, flags): pass @@ -814,7 +812,7 @@ class CellRendererIcon(Gtk.CellRenderer): path_, column, x, y = pos -for cell_renderer in column.get_cell_renderers(): +for cell_renderer in column.get_cells(): if cell_renderer == self: cell_x, cell_width = column.cell_get_position(cell_renderer) if x cell_x and x (cell_x + cell_width): @@ -823,8 +821,7 @@ class CellRendererIcon(Gtk.CellRenderer): return False -def on_render(self, window, widget, background_area, cell_area, -expose_area, flags): +def do_render(self, cr, widget, background_area, cell_area, flags): if self._xo_color is not None: stroke_color = self._xo_color.get_stroke_color() fill_color = self._xo_color.get_fill_color() @@ -839,7 +836,7 @@ class CellRendererIcon(Gtk.CellRenderer): has_prelit_colors = None not in [prelit_fill_color, prelit_stroke_color] -if flags Gtk.CELL_RENDERER_PRELIT and has_prelit_colors and \ +if flags Gtk.CellRendererState.PRELIT and has_prelit_colors and \ self._is_prelit(widget): self._buffer.fill_color = prelit_fill_color @@ -852,14 +849,14 @@ class CellRendererIcon(Gtk.CellRenderer): if surface is None: return -xoffset, yoffset, width_, height_ = self.on_get_size(widget, cell_area) +xoffset, yoffset, width_, height_ = self.do_get_size(widget, cell_area) x = cell_area.x + xoffset y = cell_area.y + yoffset -cr = window.cairo_create() cr.set_source_surface(surface, math.floor(x), math.floor(y)) -cr.rectangle(expose_area) +cr.rectangle(cell_area.x, cell_area.y, cell_area.width, + cell_area.height) cr.paint() diff --git a/tests/graphics/cellrenderericon.py b/tests/graphics/cellrenderericon.py new file mode 100644 index 000..1f87552 --- /dev/null +++ b/tests/graphics/cellrenderericon.py @@ -0,0 +1,37 @@ +from gi.repository import Gtk + +from sugar3.graphics import style +from sugar3.graphics.icon import CellRendererIcon + +import common + + +test = common.Test() +test.show() + +model = Gtk.ListStore(str) +for icon in ['one', 'two', 'three']: +
Re: [Sugar-devel] [Design] On Screen Keyboard – part of the 'get Sugar touch ready' feature set
On Thu, Aug 23, 2012 at 11:10 AM, Gary Martin garycmar...@googlemail.com wrote: I like the most recent version well enough, http://wiki.sugarlabs.org/go/File:Maliit_Sugar_theme_work_13.png High praise ;) Improvements/changes? Sorry, I did not mean to damn with faint praise, it is really good work under very tight restrictions. I personally find the XO physical kb limiting, so I bought a rollable rubber USB kb :-) I am sincerely excited about the potential for an OSK in the realm of limitless i18n/L10n freed from the shackles of silkscreening. I'm a little concerned that the absence of the Home/Friends/Neighborhood/World quartet of XO specific keys will be missed, but I understand that it is tough to collapse 6 rows of XO keys into 4 rows for Maliit. Yes space is at a premium using an OSK [1], however as the OSK is only visible when a text input widget has focus, we need to make sure Neighborhood/Group/Home/Activity/Journal are accessible at all other times as well, primarily by improving touch access to the Frame (and improving Frame discovery, though unlikely for this cycle). Yes, the ergonomics of frame invocation/dismissal and switching focus from kb to other touch input needs deep thought, but I have confidence in the people smarter in UI design than I am that will be working on it. :-). I don't expect it to be tuned to re-training fossils like me, but at the agile minds and fingers of kids. I've got lots of other questions, but they are more i18n related, so I'll forego inserting them into this design thread, No, bring them up here if they are OSK related! Ok, you asked for it :-) Is there currently a mechanism for re-creating the many xkb-based layouts already designed for OLPC that never got silkscreened? http://wiki.laptop.org/go/Keyboard_layouts No, those are physical layouts not designed for OSK. There about 40 existing maliit layouts that I'll update to match our OSK design modifications. And then I'd imagine we will want to closely check the OSK layouts for the languages we prioritise, and make sure they cover our needs (the existing OLPC layouts will be a useful reference). Getting the existing OLPC xkb designs recreated is going to be pretty important once the existing Maliit layouts are adapted. It's also going to be a repetitive task (see attached spreadsheet), I'm wondering if there are hackerish methods for assisting in that task (scripts, spreadsheet templates, etc.)? Even the list of OLPC xkb layouts in my spreadsheet is incomplete, for example, I know of a layout for an Inuktitut variant that Walter helped some Canadians design. Generating some local documentation on de novo Maliit keyboard design is going to pretty important as I can easily imagine getting asked a lot of questions about this that can no longer be put off with, well, first you make a silkscreen in a factory in China. . . I'd love to be able to do more for new languages than say go look at https://wiki.maliit.org/Documentation and let me know when you've figured out their process. Sugar Labs is, by it's nature, an entry point for languages under-represented in ICT and we already do a lot of stuff (like glibc locale design assistance) in support of these language communities. Language switching: So, with the language switch key you can toggle through a stack of keyboards that you've configured in the Control Panel (in advance). All by itself, that would be awesome and really enhance multilingual / multi-script input. This more-or-less implements the Language key already found on Arabic and Thai OLPC keyboards, but does so for all keyboards. http://wiki.laptop.org/go/Keyboard#Special_Keys http://wiki.laptop.org/go/OLPC_Arabic_Keyboard http://wiki.laptop.org/go/File:Key_arabic.jpg http://wiki.laptop.org/go/OLPC_Thai_Keyboard http://wiki.laptop.org/go/File:Key_thai.jpg This also seems to be necessary, but not sufficient, for the utopian ideal of toggling through UI languages / glibc locales on-the-fly (without going to Control Panel and rebooting). How far away is such a promised land once we have keyboard switching? cjl OLPC_kbs.ods Description: application/vnd.oasis.opendocument.spreadsheet ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar] Launcher: set the standard SPLASHSCREEN hint instead of our own _SUGAR_WINDOW_TYPE hint
Yes, the launch window works with this standard SPLASHSCREEN. Great work. 2012/8/23 Simon Schampijer si...@schampijer.de: From: Simon Schampijer si...@laptop.org Currently we have issues with introspecting gdk_property_get and we already have a wrapper around gdk_property_change [1]. We discussed reimplementing the toolkit wm module in C, and provide the following functions: get_activity_id get_bundle_id set_activity_id set_bundle_id To prepare for this move we want to remove our own _SUGAR_WINDOW_TYPE hint and replace it with the standard SPLASHSCREEN one [2][3], which is done in this patch. [1] http://wiki.sugarlabs.org/go/Features/GTK3/Shell#gdk_property_change [2] http://www.pygtk.org/docs/pygtk/gdk-constants.html#gdk-window-type-hint-constants [3] http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html Signed-off-by: Simon Schampijer si...@laptop.org Acked-by: Manuel Quiñones ma...@laptop.org --- src/jarabe/model/shell.py | 8 +--- src/jarabe/view/launcher.py | 4 +--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py index 31605f7..1f3ee8d 100644 --- a/src/jarabe/model/shell.py +++ b/src/jarabe/model/shell.py @@ -521,7 +521,8 @@ class ShellModel(gobject.GObject): them. -if window.get_window_type() == wnck.WINDOW_NORMAL: +if window.get_window_type() == wnck.WINDOW_NORMAL or \ +window.get_window_type() == wnck.WINDOW_SPLASHSCREEN: home_activity = None activity_id = wm.get_activity_id(window) @@ -552,7 +553,7 @@ class ShellModel(gobject.GObject): logging.debug('window registered for %s', activity_id) home_activity.add_window(window) -if wm.get_sugar_window_type(window) != 'launcher' \ +if window.get_window_type() != wnck.WINDOW_SPLASHSCREEN \ and home_activity.get_launch_status() == Activity.LAUNCHING: self.emit('launch-completed', home_activity) startup_time = time.time() - home_activity.get_launch_time() @@ -563,7 +564,8 @@ class ShellModel(gobject.GObject): self._set_active_activity(home_activity) def _window_closed_cb(self, screen, window): -if window.get_window_type() == wnck.WINDOW_NORMAL: +if window.get_window_type() == wnck.WINDOW_NORMAL or \ +window.get_window_type() == wnck.WINDOW_SPLASHSCREEN: xid = window.get_xid() activity = self._get_activity_by_xid(xid) if activity is not None: diff --git a/src/jarabe/view/launcher.py b/src/jarabe/view/launcher.py index 5c645c4..e9f81d7 100644 --- a/src/jarabe/view/launcher.py +++ b/src/jarabe/view/launcher.py @@ -32,7 +32,7 @@ class LaunchWindow(gtk.Window): def __init__(self, activity_id, icon_path, icon_color): gobject.GObject.__init__(self) -self.props.type_hint = gtk.gdk.WINDOW_TYPE_HINT_NORMAL +self.props.type_hint = gtk.gdk.WINDOW_TYPE_HINT_SPLASHSCREEN self.props.decorated = False self.modify_bg(gtk.STATE_NORMAL, style.COLOR_WHITE.get_gdk_color()) @@ -94,8 +94,6 @@ class LaunchWindow(gtk.Window): def __realize_cb(self, widget): wm.set_activity_id(widget.window, str(self._activity_id)) -widget.window.property_change('_SUGAR_WINDOW_TYPE', 'STRING', 8, - gtk.gdk.PROP_MODE_REPLACE, 'launcher') def __size_changed_cb(self, screen): self._update_size() -- 1.7.11.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- .. manuq .. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar] Launcher: set the standard SPLASHSCREEN hint instead of our own _SUGAR_WINDOW_TYPE hint
2012/8/23 Simon Schampijer si...@schampijer.de: From: Simon Schampijer si...@laptop.org --- a/src/jarabe/view/launcher.py +++ b/src/jarabe/view/launcher.py @@ -32,7 +32,7 @@ class LaunchWindow(gtk.Window): def __init__(self, activity_id, icon_path, icon_color): gobject.GObject.__init__(self) -self.props.type_hint = gtk.gdk.WINDOW_TYPE_HINT_NORMAL +self.props.type_hint = gtk.gdk.WINDOW_TYPE_HINT_SPLASHSCREEN self.props.decorated = False Only one thing, self.props.decorated = False is not needed now, as setting the hint to splashscreen does it for us. -- .. manuq .. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] porting Gstreamer Activities to PYGobject and Gstreamer 1.0
On Thu, Aug 23, 2012 at 2:26 PM, Daniel Narvaez dwnarv...@gmail.com wrote: Pushed a patch based on your. You might need to add stuff to check-system if you need certain plugins to be built. Let me know if you have any issues... Perfect! Thanks! The only difference that I see is the yasm dependency added. I was so close :) -- Kaufmann Manuel Blog: http://humitos.wordpress.com/ Porfolio: http://fotos.mkaufmann.com.ar/ PyAr: http://www.python.com.ar/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH sugar-toolkit-gtk3] Use the Sugar Theme in the testsuite
To make useful tests for the Sugar widgets, the theme must be the same. Signed-off-by: Manuel Quiñones ma...@laptop.org --- tests/graphics/common.py | 13 + 1 file changed, 13 insertions(+) diff --git a/tests/graphics/common.py b/tests/graphics/common.py index 3d20d58..02c3e19 100644 --- a/tests/graphics/common.py +++ b/tests/graphics/common.py @@ -20,6 +20,18 @@ from gi.repository import GObject from sugar3.graphics.toolbutton import ToolButton +import os + + +def set_theme(): +settings = Gtk.Settings.get_default() +sugar_theme = 'sugar-72' +if 'SUGAR_SCALING' in os.environ: +if os.environ['SUGAR_SCALING'] == '100': +sugar_theme = 'sugar-100' +settings.set_property('gtk-theme-name', sugar_theme) +settings.set_property('gtk-icon-theme-name', 'sugar') + class Test(Gtk.VBox): def __init__(self): @@ -45,6 +57,7 @@ class TestPalette(Test): class TestRunner(object): def run(self, test): +set_theme() window = Gtk.Window() window.connect('destroy', lambda w: Gtk.main_quit()) window.add(test) -- 1.7.11.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Graph Plotter-5
Activity Homepage: http://activities.sugarlabs.org/addon/4591 Sugar Platform: 0.86 - 0.98 Download Now: http://activities.sugarlabs.org/downloads/file/28191/graph_plotter-5.xo Release notes: Updated translations. Try to remove conflicts with pootle. (Thanks to cjl) No relevant changes because there's a bug work pending, developing a compatibility shape between the activity and the desktop, for use it in both environments: Sugar and Gnome. Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] porting Gstreamer Activities to PYGobject and Gstreamer 1.0
On Thu, Aug 9, 2012 at 5:55 AM, Simon Schampijer si...@schampijer.de wrote: There is some progress on packaging Gstreamer1 for Fedora 18 [1][2]. I'm not sure to understand this. Will I be able to install gstreamer 1.0 if I download and install F18? I've almost ported Jukebox to GStreamer 1.0, the audio visualization is missing only, and I'd like to test it. -- Kaufmann Manuel Blog: http://humitos.wordpress.com/ Porfolio: http://fotos.mkaufmann.com.ar/ PyAr: http://www.python.com.ar/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH v3 sugar-toolkit-gtk3] Fix the drawing of ColorToolButton, RadioToolButton and ToggleToolButton
Draw a black background in the buttons when the palette is up, as commit 01a06943 did with the ToolButton. As the comment for that commit states, we can change the prelight background color in the theme, but not when the mouse moves over the Palette. Also add testcase to test the three toolbuttons. Signed-off-by: Manuel Quiñones ma...@laptop.org --- v2: Paint the background color as per Simon's feedback. v3: Add testcase. --- src/sugar3/graphics/colorbutton.py | 20 +++ src/sugar3/graphics/radiotoolbutton.py | 20 +++ src/sugar3/graphics/toggletoolbutton.py | 20 +++ tests/graphics/toolbuttons.py | 45 + 4 files changed, 75 insertions(+), 30 deletions(-) create mode 100644 tests/graphics/toolbuttons.py diff --git a/src/sugar3/graphics/colorbutton.py b/src/sugar3/graphics/colorbutton.py index 95d023a..823fd61 100644 --- a/src/sugar3/graphics/colorbutton.py +++ b/src/sugar3/graphics/colorbutton.py @@ -523,20 +523,20 @@ class ColorToolButton(Gtk.ToolItem): title = GObject.property(type=str, getter=get_title, setter=set_title) -def do_expose_event(self, event): +def do_draw(self, cr): child = self.get_child() allocation = self.get_allocation() if self._palette and self._palette.is_up(): invoker = self._palette.props.invoker -invoker.draw_rectangle(event, self._palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -Gtk.ToolButton.do_expose_event(self, event) +invoker.draw_rectangle(cr, self._palette) + +allocation = self.get_allocation() +# draw a black background, has been done by the engine before +cr.set_source_rgb(0, 0, 0) +cr.rectangle(0, 0, allocation.width, allocation.height) +cr.paint() + +Gtk.ToolButton.do_draw(self, cr) def __notify_change(self, widget, pspec): self.notify(pspec.name) diff --git a/src/sugar3/graphics/radiotoolbutton.py b/src/sugar3/graphics/radiotoolbutton.py index 8fd01f7..006d167 100644 --- a/src/sugar3/graphics/radiotoolbutton.py +++ b/src/sugar3/graphics/radiotoolbutton.py @@ -165,18 +165,18 @@ class RadioToolButton(Gtk.RadioToolButton): palette_invoker = GObject.property( type=object, setter=set_palette_invoker, getter=get_palette_invoker) -def do_expose_event(self, event): +def do_draw(self, cr): child = self.get_child() allocation = self.get_allocation() if self.palette and self.palette.is_up(): invoker = self.palette.props.invoker -invoker.draw_rectangle(event, self.palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -Gtk.RadioToolButton.do_expose_event(self, event) +invoker.draw_rectangle(cr, self.palette) + +allocation = self.get_allocation() +# draw a black background, has been done by the engine before +cr.set_source_rgb(0, 0, 0) +cr.rectangle(0, 0, allocation.width, allocation.height) +cr.paint() + +Gtk.RadioToolButton.do_draw(self, cr) diff --git a/src/sugar3/graphics/toggletoolbutton.py b/src/sugar3/graphics/toggletoolbutton.py index c865332..f50d2fd 100644 --- a/src/sugar3/graphics/toggletoolbutton.py +++ b/src/sugar3/graphics/toggletoolbutton.py @@ -113,20 +113,20 @@ class ToggleToolButton(Gtk.ToggleToolButton): accelerator = GObject.property(type=str, setter=set_accelerator, getter=get_accelerator) -def do_expose_event(self, event): +def do_draw(self, cr): allocation = self.get_allocation() child = self.get_child() if self.palette and self.palette.is_up(): invoker = self.palette.props.invoker -invoker.draw_rectangle(event, self.palette) -elif child.state == Gtk.StateType.PRELIGHT: -child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, - Gtk.ShadowType.NONE, event.area, - child, 'toolbutton-prelight', - allocation.x, allocation.y, - allocation.width, allocation.height) - -
Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3 2/2] Fix the drawing of ColorToolButton, RadioToolButton and ToggleToolButton
2012/8/23 Simon Schampijer si...@schampijer.de: On 08/23/2012 07:12 AM, Manuel Quiñones wrote: gtk_paint_box is deprecated [1] and now we can use the CSS to change the style of the button's prelight state. To test the buttons, I provide a patch for HelloWorld activity [2]. They are added in the main toolbar. We should really make sure we have a test-suite for the toolkit/artwork. At the moment we are only patching while going ;p Yes Simon, we have to build a real testsuite. I have sent a patch to set the sugar theme in the testsuite. So from a sugar shell, you can run the testcase and see the same as in sugar/activities. v3 of this patch adds a file to the tests directory. Cheers, -- .. manuq .. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel