Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rpms
diff options
context:
space:
mode:
authorBernie Innocenti <bernie@codewiz.org>2010-08-02 17:44:30 (GMT)
committer Bernie Innocenti <bernie@codewiz.org>2010-08-02 17:44:44 (GMT)
commit042b0848c88fcfabba2207a0300c5dc6be87e8d3 (patch)
tree4711cebea2f73a8fa47b7231e70f03967376a0e1 /rpms
parentb778c19688a67d008a4f53b0cb43c9131cd0d417 (diff)
Switch to touchpad in frame
Diffstat (limited to 'rpms')
-rw-r--r--rpms/sugar/sl2006-file-exists-check.patch26
-rw-r--r--rpms/sugar/sl2006-touchpad-section-for-control-panel.patch404
-rw-r--r--rpms/sugar/sugar.spec11
3 files changed, 6 insertions, 435 deletions
diff --git a/rpms/sugar/sl2006-file-exists-check.patch b/rpms/sugar/sl2006-file-exists-check.patch
deleted file mode 100644
index 0981b99..0000000
--- a/rpms/sugar/sl2006-file-exists-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3f52994220944760786a161c8046c2fbbd7ca89a Mon Sep 17 00:00:00 2001
-From: Walter Bender <walter@sugarlabs.org>
-Date: Fri, 21 May 2010 11:08:06 -0400
-Subject: [PATCH] file exisits check
-
----
- extensions/cpsection/touchpad/model.py | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/extensions/cpsection/touchpad/model.py b/extensions/cpsection/touchpad/model.py
-index 77eefa4..8c17cb9 100644
---- a/extensions/cpsection/touchpad/model.py
-+++ b/extensions/cpsection/touchpad/model.py
-@@ -38,7 +38,8 @@ def get_touchpad():
- def set_touchpad(touchpad):
- """Set the touchpad mode."""
- if touchpad == _CAPACITIVE:
-- system("rm %s" % (_flag_path))
-+ if path.exists(_flag_path):
-+ system("rm %s" % (_flag_path))
- system("echo 0 > %s" % (_node_path))
- else:
- system("touch %s" % (_flag_path))
---
-1.7.0.4
-
diff --git a/rpms/sugar/sl2006-touchpad-section-for-control-panel.patch b/rpms/sugar/sl2006-touchpad-section-for-control-panel.patch
deleted file mode 100644
index 914477c..0000000
--- a/rpms/sugar/sl2006-touchpad-section-for-control-panel.patch
+++ /dev/null
@@ -1,404 +0,0 @@
-From f485b65a85609713e0fdb179f354977e63646f33 Mon Sep 17 00:00:00 2001
-From: Walter Bender <walter@sugarlabs.org>
-Date: Wed, 19 May 2010 08:29:22 -0400
-Subject: [PATCH] touchpad section for control panel
-
----
- configure.ac | 1 +
- data/icons/Makefile.am | 1 +
- data/icons/module-touchpad.svg | 36 ++++++
- extensions/cpsection/Makefile.am | 2 +-
- extensions/cpsection/touchpad/Makefile.am | 6 +
- extensions/cpsection/touchpad/__init__.py | 25 ++++
- extensions/cpsection/touchpad/model.py | 59 ++++++++++
- extensions/cpsection/touchpad/view.py | 178 +++++++++++++++++++++++++++++
- 8 files changed, 307 insertions(+), 1 deletions(-)
- create mode 100644 data/icons/module-touchpad.svg
- create mode 100644 extensions/cpsection/touchpad/Makefile.am
- create mode 100644 extensions/cpsection/touchpad/__init__.py
- create mode 100644 extensions/cpsection/touchpad/model.py
- create mode 100644 extensions/cpsection/touchpad/view.py
-
-diff --git a/configure.ac b/configure.ac
-index 4f60892..e7d1c73 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -59,6 +59,7 @@ extensions/cpsection/modemconfiguration/Makefile
- extensions/cpsection/Makefile
- extensions/cpsection/network/Makefile
- extensions/cpsection/power/Makefile
-+extensions/cpsection/touchpad/Makefile
- extensions/cpsection/updater/backends/Makefile
- extensions/cpsection/updater/Makefile
- extensions/deviceicon/Makefile
-diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
-index a35643a..b65b34e 100644
---- a/data/icons/Makefile.am
-+++ b/data/icons/Makefile.am
-@@ -10,6 +10,7 @@ sugar_DATA = \
- module-modemconfiguration.svg \
- module-network.svg \
- module-power.svg \
-+ module-touchpad.svg \
- module-updater.svg
-
- EXTRA_DIST = $(sugar_DATA)
-diff --git a/data/icons/module-touchpad.svg b/data/icons/module-touchpad.svg
-new file mode 100644
-index 0000000..5794fd7
---- /dev/null
-+++ b/data/icons/module-touchpad.svg
-@@ -0,0 +1,36 @@
-+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-+<!-- Created with Inkscape (http://www.inkscape.org/) -->
-+
-+<svg
-+ xmlns:svg="http://www.w3.org/2000/svg"
-+ xmlns="http://www.w3.org/2000/svg"
-+ version="1.1"
-+ width="55"
-+ height="55"
-+ viewBox="0 0 55 55"
-+ id="Layer_1"
-+ xml:space="preserve"><defs
-+ id="defs2829" />
-+<g
-+ transform="translate(0,-3.9)"
-+ id="g2817">
-+</g>
-+
-+
-+
-+<g
-+ transform="translate(0,4.3506441)"
-+ id="g2928"><g
-+ transform="translate(0,-20)"
-+ id="g2819">
-+<path
-+ d="m 2.934,28.664 0,18.209 49.391,0 0,-18.209 -49.391,0 z M 36,45.833 l -17,0 0,-16.129 17,0 0,16.129 z"
-+ id="path2821"
-+ style="fill:#ffffff;stroke:#666666;stroke-width:2" />
-+</g><path
-+ d="m 46.742465,3.78755 -5.095999,6.747499 -1.044001,1.3585 -1.7375,4.133 c -0.023,0.052 -0.009,0.1115 0.0345,0.1475 0.0445,0.036 0.1055,0.042 0.1535,0.01 l 3.913,-2.5185 c 0.0055,-0.004 0.0055,-0.0135 0.011,-0.0215 0.0325,-0.0245 0.071,-0.046 0.098,-0.081 0.0015,-10e-4 0.017,-0.0205 0.017,-0.0245 l 0.9155,-1.1355 2.7345,-3.527 4.005501,-5.164499 c 0.011,-0.0115 0.0745,-0.1015 0.0745,-0.1015 0.048,-0.0805 0.074,-0.1725 0.074,-0.278 0,-0.0305 0,-0.059 -0.006,-0.088 -0.0435,-0.3815 -0.357501,-0.841 -0.819501,-1.2065 -0.4615,-0.364 -0.9845,-0.5615 -1.364,-0.517 -0.163,0.021 -0.3945,0.1875 -0.3945,0.1875 l -1.5695,2.0795 z"
-+ id="path2823"
-+ style="fill:#ffffff;stroke:#666666;stroke-width:1.5" /><path
-+ d="m 22.817123,44.784359 c 0,0 -3.23492,-8.766448 -3.243008,-9.837791 -0.0135,-1.797291 -2.398098,-2.342156 -2.398098,-2.342156 0,0 -0.621319,-2.249376 0,-2.770053 0.656117,-0.549837 2.934483,-0.629824 3.735004,0.330634 l 2.413094,2.895211 0,-12.75 c 0,0 0.888891,-1.589214 1.643962,-1.454545 0.745806,0.133019 1.356038,1.454545 1.356038,1.454545 l 0,10.5 0,-4.5 c 0,0 0.947828,-0.746067 1.5,-0.75 0.552172,-0.0039 1.5,0.75 1.5,0.75 l 0,4.5 0,-3.75 c 0,0 0.675747,-0.758712 1.5,-0.75 0.824253,0.0087 1.5,0.568182 1.5,0.568182 l 0,3.931818 0,-3 c 0,0 0.857274,-0.33549 1.5,-0.375 0.526597,-0.03237 1.448303,0.97351 1.5,1.575 0.220672,2.567514 0.969363,5.350927 0.823983,7.574377 -0.100086,1.53071 -0.67874,8.199778 -2.212713,8.199778 l -11.118262,0 z"
-+ id="path2825"
-+ style="fill:#ffffff;stroke:#666666;stroke-width:1.5" /></g></svg>
-\ No newline at end of file
---- sugar-0.88.0/extensions/cpsection/Makefile.am.orig 2010-05-23 17:22:09.000000000 -0400
-+++ sugar-0.88.0/extensions/cpsection/Makefile.am 2010-05-23 17:23:42.000000000 -0400
-@@ -1,5 +1,16 @@
--SUBDIRS = aboutme aboutcomputer datetime frame keyboard language \
-- modemconfiguration network power updater
-+SUBDIRS = \
-+ aboutme \
-+ aboutcomputer \
-+ datetime \
-+ frame \
-+ keyboard \
-+ language \
-+ modemconfiguration \
-+ network \
-+ power \
-+ touchpad \
-+ updater \
-+ #
-
- sugardir = $(pkgdatadir)/extensions/cpsection
- sugar_PYTHON = __init__.py
-diff --git a/extensions/cpsection/touchpad/Makefile.am b/extensions/cpsection/touchpad/Makefile.am
-new file mode 100644
-index 0000000..fd83e2f
---- /dev/null
-+++ b/extensions/cpsection/touchpad/Makefile.am
-@@ -0,0 +1,6 @@
-+sugardir = $(pkgdatadir)/extensions/cpsection/touchpad
-+
-+sugar_PYTHON = \
-+ __init__.py \
-+ model.py \
-+ view.py
-diff --git a/extensions/cpsection/touchpad/__init__.py b/extensions/cpsection/touchpad/__init__.py
-new file mode 100644
-index 0000000..95c1af8
---- /dev/null
-+++ b/extensions/cpsection/touchpad/__init__.py
-@@ -0,0 +1,25 @@
-+# Copyright (C) 2008, OLPC
-+#
-+# 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 _
-+from os import path
-+
-+# Only include this Control Panel section if on OLPC XO-1.0 CL1 hardware.
-+if path.exists('/sys/devices/platform/i8042/serio1/ptmode'):
-+ CLASS = 'Touchpad'
-+ ICON = 'module-touchpad'
-+ TITLE = _('Touchpad')
-+ KEYWORDS = ['touchpad']
-diff --git a/extensions/cpsection/touchpad/model.py b/extensions/cpsection/touchpad/model.py
-new file mode 100644
-index 0000000..77eefa4
---- /dev/null
-+++ b/extensions/cpsection/touchpad/model.py
-@@ -0,0 +1,59 @@
-+# Copyright (C) 2010, Walter Bender, Sugar Labs
-+#
-+# 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 _
-+from os import system, path
-+import gconf
-+
-+_CAPACITIVE = 0
-+_RESISTIVE = 1
-+_flag_path = '/home/olpc/.olpc-pentablet-mode'
-+_node_path = '/sys/devices/platform/i8042/serio1/ptmode'
-+
-+def get_touchpad():
-+ """Get the touchpad mode."""
-+
-+ _file_handle = open(_node_path, "r")
-+ _text = _file_handle.read()
-+ _file_handle.close()
-+
-+ if _text[0] == '1':
-+ return _RESISTIVE
-+ else:
-+ return _CAPACITIVE
-+
-+def set_touchpad(touchpad):
-+ """Set the touchpad mode."""
-+ if touchpad == _CAPACITIVE:
-+ system("rm %s" % (_flag_path))
-+ system("echo 0 > %s" % (_node_path))
-+ else:
-+ system("touch %s" % (_flag_path))
-+ system("echo 1 > %s" % (_node_path))
-+ return
-+
-+def print_touchpad():
-+ """Print the future touchpad mode."""
-+ if get_touchpad == _CAPACITIVE:
-+ print _('Touchpad set to finger mode.')
-+ else:
-+ print _('Touchpad set to stylus mode.')
-+
-+def get_color_xo():
-+ """Get xo color"""
-+ client = gconf.client_get_default()
-+ return client.get_string("/desktop/sugar/user/color")
-+
-diff --git a/extensions/cpsection/touchpad/view.py b/extensions/cpsection/touchpad/view.py
-new file mode 100644
-index 0000000..19fb686
---- /dev/null
-+++ b/extensions/cpsection/touchpad/view.py
-@@ -0,0 +1,178 @@
-+# Copyright (C) 2008, OLPC
-+# Copyright (C) 2010, Walter Bender, Sugar Labs
-+#
-+# 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
-+
-+import gtk
-+import gobject
-+from gettext import gettext as _
-+
-+from sugar.graphics.icon import Icon
-+from sugar.graphics import style
-+from sugar.graphics.xocolor import XoColor
-+
-+from jarabe.controlpanel.sectionview import SectionView
-+from jarabe.controlpanel.inlinealert import InlineAlert
-+
-+_CAPACITIVE = 0
-+_RESISTIVE = 1
-+
-+class TouchpadEventIcon(gtk.EventBox):
-+ """A subclass of the Sugar Event Icon"""
-+ __gtype_name__ = "SugarEventIcon"
-+
-+ def __init__(self, **kwargs):
-+ """Create an extra-large, clickable icon."""
-+ gtk.EventBox.__init__(self)
-+
-+ self.icon = Icon(pixel_size = style.XLARGE_ICON_SIZE, **kwargs)
-+
-+ self.set_visible_window(False)
-+ self.set_app_paintable(True)
-+ self.set_events(gtk.gdk.BUTTON_PRESS_MASK)
-+
-+ self.add(self.icon)
-+ self.icon.show()
-+
-+class TouchpadPicker(TouchpadEventIcon):
-+ """A class for the touchpad selection buttons"""
-+ __gsignals__ = {
-+ 'touchpad-changed': (gobject.SIGNAL_RUN_FIRST,
-+ gobject.TYPE_NONE,
-+ ([object]))
-+ }
-+
-+ def __init__(self, touchpad_mode):
-+ """Create icons for the touchpad mode buttons."""
-+ TouchpadEventIcon.__init__(self)
-+
-+ if touchpad_mode == _CAPACITIVE:
-+ self.icon.props.icon_name = 'capacitive'
-+ else:
-+ self.icon.props.icon_name = 'resistive'
-+ self._touchpad_mode = touchpad_mode
-+
-+ self.icon.props.pixel_size = style.XLARGE_ICON_SIZE
-+
-+ self.connect('button_press_event', self.__pressed_cb, touchpad_mode)
-+
-+ def update(self, touchpad, xo_color):
-+ """Update the button states."""
-+ if self._touchpad_mode == _CAPACITIVE:
-+ self.icon.props.icon_name = 'capacitive'
-+ if touchpad == _CAPACITIVE:
-+ self.icon.props.xo_color = xo_color
-+ else:
-+ self.icon.props.xo_color = XoColor('#666666,#FFFFFF')
-+ elif self._touchpad_mode == _RESISTIVE:
-+ self.icon.props.icon_name = 'resistive'
-+ if touchpad == _RESISTIVE:
-+ self.icon.props.xo_color = xo_color
-+ else:
-+ self.icon.props.xo_color = XoColor('#666666,#FFFFFF')
-+
-+ def __pressed_cb(self, button, event, touchpad_mode):
-+ """Callback for button click."""
-+ self.emit('touchpad-changed', touchpad_mode)
-+
-+class Touchpad(SectionView):
-+ """A class for the touchpad selection panel"""
-+
-+ def __init__(self, model, alerts):
-+ """ Create the touchpad panel."""
-+ SectionView.__init__(self)
-+
-+ self._model = model
-+ self._color = XoColor(self._model.get_color_xo())
-+ self._handlers = []
-+
-+ self.set_border_width(style.DEFAULT_SPACING * 2)
-+ self.set_spacing(style.DEFAULT_SPACING)
-+ self._group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
-+
-+ self._touchpad_label = gtk.HBox(spacing=style.DEFAULT_SPACING)
-+ self._touchpad_box = gtk.HBox(spacing=style.DEFAULT_SPACING)
-+ self._touchpad_alert_box = gtk.HBox(spacing=style.DEFAULT_SPACING)
-+ self._touchpad_alert = None
-+
-+ self._pickers = {
-+ _CAPACITIVE: TouchpadPicker(_CAPACITIVE),
-+ _RESISTIVE: TouchpadPicker(_RESISTIVE)}
-+
-+ self._setup_touchpad()
-+ self._initial_value = self._model.get_touchpad()
-+ self._update_pickers(self._initial_value)
-+
-+ self.setup()
-+
-+ def _setup_touchpad(self):
-+ """Layout the panel: label, buttons, alert"""
-+ label_touchpad = gtk.Label(_('Click to change your touchpad:'))
-+ label_touchpad.modify_fg(gtk.STATE_NORMAL,
-+ style.COLOR_SELECTION_GREY.get_gdk_color())
-+ self._group.add_widget(label_touchpad)
-+ self._touchpad_label.pack_start(label_touchpad, expand=False)
-+ label_touchpad.show()
-+
-+ for touchpad_mode in sorted(self._pickers.keys()):
-+ picker = self._pickers[touchpad_mode]
-+ picker.show()
-+ self._touchpad_box.pack_start(picker, expand=False)
-+
-+ label_touchpad_error = gtk.Label()
-+ self._group.add_widget(label_touchpad_error)
-+ self._touchpad_alert_box.pack_start(label_touchpad_error, expand=False)
-+ label_touchpad_error.show()
-+
-+ self._touchpad_alert = InlineAlert()
-+ self._touchpad_alert_box.pack_start(self._touchpad_alert)
-+
-+ self._center_in_panel = gtk.Alignment(0.5)
-+ self._center_in_panel.add(self._touchpad_box)
-+ self.pack_start(self._touchpad_label, False)
-+ self.pack_start(self._center_in_panel, False)
-+ self.pack_start(self._touchpad_alert_box, False)
-+ self._touchpad_label.show()
-+ self._touchpad_box.show()
-+ self._touchpad_alert_box.show()
-+ self._center_in_panel.show()
-+
-+ def setup(self):
-+ """Set up the buttons."""
-+ self.needs_restart = False
-+
-+ def connect(widget, signal, callback):
-+ self._handlers.append((widget, widget.connect(signal, callback)))
-+
-+ for picker in self._pickers.values():
-+ connect(picker, 'touchpad-changed', self.__touchpad_changed_cb)
-+
-+ def undo(self):
-+ """Undo any changes."""
-+ for widget, handler in self._handlers:
-+ widget.disconnect(handler)
-+ self._model.set_touchpad(self._initial_value)
-+ self._touchpad_alert.hide()
-+
-+ def _update_pickers(self, touchpad):
-+ """Update the buttons to reflect selection"""
-+ for picker in self._pickers.values():
-+ picker.update(touchpad, self._color)
-+
-+ def __touchpad_changed_cb(self, touchpadpicker, touchpad):
-+ """Callback for mode change -- no restart alert is needed."""
-+ self._model.set_touchpad(touchpad)
-+ self._update_pickers(touchpad)
-+ return False
---
-1.7.0.4
-
diff --git a/rpms/sugar/sugar.spec b/rpms/sugar/sugar.spec
index 76da138..aba5d79 100644
--- a/rpms/sugar/sugar.spec
+++ b/rpms/sugar/sugar.spec
@@ -3,7 +3,7 @@
Summary: Constructionist learning platform
Name: sugar
Version: 0.88.1
-Release: 5.26dxo%{?dist}
+Release: 5.27dxo%{?dist}
URL: http://sugarlabs.org/
Source0: http://download.sugarlabs.org/sources/sucrose/glucose/%{name}/%{name}-%{version}.tar.bz2
@@ -55,8 +55,6 @@ Patch208: journal-0002-reindex.patch
# experimental patches
Patch500: sl2006-touchpad-device-on-frame.patch
-Patch501: sl2006-touchpad-section-for-control-panel.patch
-Patch502: sl2006-file-exists-check.patch
Patch503: cpu-and-memory-resource-indicator.patch
Patch504: sl2064-always-listen-for-NameOwnerChanged-DBus-message.patch
Patch506: jasg-register-rename.patch
@@ -102,6 +100,11 @@ Requires: python-telepathy
Requires: gstreamer-python
Requires: pygtksourceview
Requires: python-xklavier
+Requires: ax
+Requires: magnifier-Ceibal
+Requires: FlatbedCursors
+Requires: CapitalFont
+Requires: python-xlib
# for dbus-launch
Requires: dbus-x11
@@ -184,8 +187,6 @@ multiple instances of sugar.
%patch208 -p1
%patch500 -p1
-%patch501 -p1
-%patch502 -p1
%patch503 -p1
%patch504 -p1
%patch506 -p1