Who is maintaining the Help activity? I have a few small patches: 1) change in the css to better use of screen, now we can rotate screen again. 2) replace home icon by the new icon. 3) add a view toolbar, stolen from browse 4) fix the icon because in F13 there are changes in the svg rendering and the old icon does not look ok.
Gonzalo
From 72eed478e325e98afade02d26513c6eb9fac97e6 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard <[email protected]> Date: Mon, 1 Nov 2010 09:49:52 -0300 Subject: [PATCH 1/4] Remove width from content section in css to improve screen usage - OLPC #8513 --- help/style.css | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/help/style.css b/help/style.css index 9710be2..5f3244a 100755 --- a/help/style.css +++ b/help/style.css @@ -8,7 +8,6 @@ body { position:absolute; top:20px; left:135px; - width:665px; border-width:4px; border-style:solid; border-color:#666666; -- 1.7.2.3
From ecb8ee0e9fd86a00042f87cd0eb49876147d64bb Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard <[email protected]> Date: Mon, 1 Nov 2010 10:16:18 -0300 Subject: [PATCH 2/4] Use go-home icon. OLPC #10267 --- helpactivity.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/helpactivity.py b/helpactivity.py index 100652d..9c9ec71 100755 --- a/helpactivity.py +++ b/helpactivity.py @@ -77,7 +77,7 @@ class Toolbar(gtk.Toolbar): self.insert(self._forward, -1) self._forward.show() - home = ToolButton('zoom-home') + home = ToolButton('go-home') home.set_tooltip(_('Home')) home.connect('clicked', self._go_home_cb) self.insert(home, -1) -- 1.7.2.3
From 7bdf4f1aa01cab6acd0df80b00d44408428ba635 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard <[email protected]> Date: Mon, 1 Nov 2010 10:20:47 -0300 Subject: [PATCH 3/4] Add view toolbar with zoom in, zoom out, and full screen buttons. --- helpactivity.py | 5 +++- viewtoolbar.py | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletions(-) create mode 100644 viewtoolbar.py diff --git a/helpactivity.py b/helpactivity.py index 9c9ec71..ab113b0 100755 --- a/helpactivity.py +++ b/helpactivity.py @@ -28,7 +28,7 @@ hulahop.startup(os.path.join(activity.get_activity_root(), 'data/gecko')) from browser import Browser import xpcom from xpcom.components import interfaces - +from viewtoolbar import ViewToolbar gobject.threads_init() HOME = os.path.join(activity.get_bundle_path(), 'help/XO_Introduction.html') @@ -49,6 +49,9 @@ class HelpActivity(activity.Activity): toolbar = Toolbar(self._web_view) toolbox.add_toolbar(_('Navigation'), toolbar) toolbar.show() + viewtoolbar = ViewToolbar(self) + toolbox.add_toolbar(_('View'),viewtoolbar) + viewtoolbar.show() self.set_canvas(self._web_view) self._web_view.show() diff --git a/viewtoolbar.py b/viewtoolbar.py new file mode 100644 index 0000000..503a697 --- /dev/null +++ b/viewtoolbar.py @@ -0,0 +1,63 @@ +# Copyright (C) 2007, One Laptop Per Child +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +from gettext import gettext as _ + +import gtk + +from sugar.graphics.toolbutton import ToolButton + + +class ViewToolbar(gtk.Toolbar): + + def __init__(self, activity): + gtk.Toolbar.__init__(self) + + self._activity = activity + + self._browser = self._activity._web_view + + self.zoomout = ToolButton('zoom-out') + self.zoomout.set_tooltip(_('Zoom out')) + self.zoomout.connect('clicked', self.__zoomout_clicked_cb) + self.insert(self.zoomout, -1) + self.zoomout.show() + + self.zoomin = ToolButton('zoom-in') + self.zoomin.set_tooltip(_('Zoom in')) + self.zoomin.connect('clicked', self.__zoomin_clicked_cb) + self.insert(self.zoomin, -1) + self.zoomin.show() + + self.separator = gtk.SeparatorToolItem() + self.separator.set_draw(True) + self.insert(self.separator, -1) + self.separator.show() + + self.fullscreen = ToolButton('view-fullscreen') + self.fullscreen.set_tooltip(_('Fullscreen')) + self.fullscreen.connect('clicked', self.__fullscreen_clicked_cb) + self.insert(self.fullscreen, -1) + self.fullscreen.show() + + def __zoomin_clicked_cb(self, button): + self._browser.zoom_in() + + def __zoomout_clicked_cb(self, button): + self._browser.zoom_out() + + def __fullscreen_clicked_cb(self, button): + self._activity.fullscreen() -- 1.7.2.3
From c20d1b93622ad2388ba8653ba7a31a97b1f5a39c Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard <[email protected]> Date: Mon, 1 Nov 2010 10:41:02 -0300 Subject: [PATCH 4/4] Fix icon for F13 changes in rendering --- activity/activity-help.svg | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/activity/activity-help.svg b/activity/activity-help.svg index 4611d8a..171948d 100755 --- a/activity/activity-help.svg +++ b/activity/activity-help.svg @@ -1,9 +1,9 @@ <?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [ <!ENTITY stroke_color "#000"> <!ENTITY fill_color "#eee"> -]><svg height="55px" viewBox="0 0 55 55" width="55px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5" stroke="&stroke_color;" fill="&fill_color;"> +]><svg height="55px" viewBox="0 0 55 55" width="55px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g> - <path d="M 50 27.625 C 50 39.9681 39.8431 50.125 27.5 50.125 C 15.1569 50.125 5 39.9681 5 27.625 C 5 15.2819 15.1569 5.125 27.5 5.125 C 39.8431 5.125 50 15.2819 50 27.625 Z " /> - <path d="M 23.956 27.167 C 23.956 25.546 25.756 25.277 27.601 24.781 C 29.401 24.286 31.201 23.566 31.201 20.956 C 31.201 18.976 29.356 17.536 27.467 17.536 C 23.687 17.536 23.102 21.991 20.221 21.991 C 18.601 21.991 17.476 20.731 17.476 18.751 C 17.476 14.025 23.416 11.326 27.467 11.326 C 33.273 11.326 38.223 14.926 38.223 20.957 C 38.223 25.952 35.073 28.878 30.438 30.048 L 30.438 31.667 C 30.438 33.468 29.087 34.772 27.197 34.772 C 25.172 34.772 23.957 33.467 23.957 31.667 L 23.957 27.167 Z M 23.686 40.937 C 23.686 39.002 25.261 37.427 27.196 37.427 C 29.132 37.427 30.706 39.002 30.706 40.937 C 30.706 42.873 29.132 44.449 27.196 44.449 C 25.261 44.448 23.686 42.872 23.686 40.937 Z " fill="&stroke_color;" stroke="none" /> + <path stroke="&stroke_color;" fill="&fill_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5" d="M 50 27.625 C 50 39.9681 39.8431 50.125 27.5 50.125 C 15.1569 50.125 5 39.9681 5 27.625 C 5 15.2819 15.1569 5.125 27.5 5.125 C 39.8431 5.125 50 15.2819 50 27.625 Z " /> + <path d="M 23.956 27.167 C 23.956 25.546 25.756 25.277 27.601 24.781 C 29.401 24.286 31.201 23.566 31.201 20.956 C 31.201 18.976 29.356 17.536 27.467 17.536 C 23.687 17.536 23.102 21.991 20.221 21.991 C 18.601 21.991 17.476 20.731 17.476 18.751 C 17.476 14.025 23.416 11.326 27.467 11.326 C 33.273 11.326 38.223 14.926 38.223 20.957 C 38.223 25.952 35.073 28.878 30.438 30.048 L 30.438 31.667 C 30.438 33.468 29.087 34.772 27.197 34.772 C 25.172 34.772 23.957 33.467 23.957 31.667 L 23.957 27.167 Z M 23.686 40.937 C 23.686 39.002 25.261 37.427 27.196 37.427 C 29.132 37.427 30.706 39.002 30.706 40.937 C 30.706 42.873 29.132 44.449 27.196 44.449 C 25.261 44.448 23.686 42.872 23.686 40.937 Z " fill="&stroke_color;" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5" /> </g> -</svg> \ No newline at end of file +</svg> -- 1.7.2.3
_______________________________________________ Devel mailing list [email protected] http://lists.laptop.org/listinfo/devel
