Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2009-01-16 15:18:07 (GMT)
committer Jonas Smedegaard <dr@jones.dk>2009-01-16 15:18:07 (GMT)
commite23c82b5c354b59187a00551adf7acb841e90652 (patch)
treeff9e41128180280ace4fc4823bcb8ff1661c9893
parente3325cd40f04996107509e065e79008c4f1d2f61 (diff)
Imported Upstream version 0.83.4upstream/0.83.4
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in6
-rw-r--r--aclocal.m4152
-rw-r--r--bin/Makefile.am14
-rw-r--r--bin/Makefile.in33
-rw-r--r--bin/sugar9
-rw-r--r--bin/sugar-backup11
-rw-r--r--bin/sugar-control-panel6
-rw-r--r--bin/sugar-emulator136
-rw-r--r--bin/sugar-launch17
-rw-r--r--bin/sugar-session170
-rw-r--r--bin/sugar-shell34
-rw-r--r--bin/sugar-shell-service32
-rw-r--r--bin/sugar-shell-service.in32
-rw-r--r--bin/sugar-shell.in34
-rw-r--r--bin/sugar-ui-check161
-rw-r--r--bin/sugar.in18
-rwxr-xr-xconfigure3390
-rw-r--r--configure.ac59
-rw-r--r--data/Makefile.am34
-rw-r--r--data/Makefile.in111
-rw-r--r--data/activities.defaults33
-rw-r--r--data/gtkrc.em5
-rw-r--r--data/icons/Makefile.am1
-rw-r--r--data/icons/Makefile.in5
-rw-r--r--data/icons/activity-journal.svg11
-rw-r--r--data/mime.defaults6
-rw-r--r--data/nm-user-settings.conf34
-rw-r--r--data/sugar-100.gtkrc (renamed from data/sugar-xo.gtkrc)3
-rw-r--r--data/sugar-72.gtkrc (renamed from data/sugar.gtkrc)3
-rw-r--r--data/sugar.desktop2
-rw-r--r--data/sugar.schemas.in160
-rw-r--r--extensions/Makefile.am1
-rw-r--r--extensions/Makefile.in (renamed from src/view/devices/Makefile.in)75
-rw-r--r--extensions/cpsection/Makefile.am4
-rw-r--r--extensions/cpsection/Makefile.in (renamed from src/controlpanel/Makefile.in)23
-rw-r--r--extensions/cpsection/__init__.py (copied from src/intro/__init__.py)0
-rw-r--r--extensions/cpsection/aboutme/Makefile.am6
-rw-r--r--extensions/cpsection/aboutme/Makefile.in (copied from src/model/devices/network/Makefile.in)17
-rw-r--r--extensions/cpsection/aboutme/__init__.py (renamed from bin/sugar-emulator.in)18
-rw-r--r--extensions/cpsection/aboutme/model.py (renamed from src/controlpanel/model/aboutme.py)35
-rw-r--r--extensions/cpsection/aboutme/view.py (renamed from src/controlpanel/view/aboutme.py)29
-rw-r--r--extensions/cpsection/aboutxo/Makefile.am6
-rw-r--r--extensions/cpsection/aboutxo/Makefile.in (copied from src/model/devices/network/Makefile.in)17
-rw-r--r--extensions/cpsection/aboutxo/__init__.py (copied from service/__init__.py)10
-rw-r--r--extensions/cpsection/aboutxo/model.py (renamed from src/controlpanel/model/aboutxo.py)19
-rw-r--r--extensions/cpsection/aboutxo/view.py (renamed from src/controlpanel/view/aboutxo.py)23
-rw-r--r--extensions/cpsection/datetime/Makefile.am6
-rw-r--r--extensions/cpsection/datetime/Makefile.in (copied from src/model/devices/network/Makefile.in)17
-rw-r--r--extensions/cpsection/datetime/__init__.py (copied from service/__init__.py)9
-rw-r--r--extensions/cpsection/datetime/model.py (renamed from src/controlpanel/model/datetime.py)12
-rw-r--r--extensions/cpsection/datetime/view.py (renamed from src/controlpanel/view/datetime.py)8
-rw-r--r--extensions/cpsection/frame/Makefile.am6
-rw-r--r--extensions/cpsection/frame/Makefile.in (renamed from src/controlpanel/view/Makefile.in)23
-rw-r--r--extensions/cpsection/frame/__init__.py (renamed from src/controlpanel/view/__init__.py)10
-rw-r--r--extensions/cpsection/frame/model.py (renamed from src/controlpanel/model/frame.py)31
-rw-r--r--extensions/cpsection/frame/view.py (renamed from src/controlpanel/view/frame.py)14
-rw-r--r--extensions/cpsection/language/Makefile.am6
-rw-r--r--extensions/cpsection/language/Makefile.in (copied from src/model/devices/network/Makefile.in)17
-rw-r--r--extensions/cpsection/language/__init__.py (copied from service/__init__.py)10
-rw-r--r--extensions/cpsection/language/model.py (renamed from src/controlpanel/model/language.py)101
-rw-r--r--extensions/cpsection/language/view.py236
-rw-r--r--extensions/cpsection/network/Makefile.am6
-rw-r--r--extensions/cpsection/network/Makefile.in (copied from src/model/devices/network/Makefile.in)17
-rw-r--r--extensions/cpsection/network/__init__.py (copied from src/controlpanel/__init__.py)9
-rw-r--r--extensions/cpsection/network/model.py123
-rw-r--r--extensions/cpsection/network/view.py (renamed from src/controlpanel/view/network.py)17
-rw-r--r--extensions/cpsection/power/Makefile.am6
-rw-r--r--extensions/cpsection/power/Makefile.in (renamed from src/controlpanel/model/Makefile.in)23
-rw-r--r--extensions/cpsection/power/__init__.py (renamed from bin/sugar-control-panel.in)17
-rw-r--r--extensions/cpsection/power/model.py (renamed from src/controlpanel/model/power.py)24
-rw-r--r--extensions/cpsection/power/view.py (renamed from src/controlpanel/view/power.py)11
-rw-r--r--extensions/deviceicon/Makefile.am8
-rw-r--r--extensions/deviceicon/Makefile.in (copied from src/model/devices/network/Makefile.in)19
-rw-r--r--extensions/deviceicon/__init__.py (copied from src/intro/__init__.py)0
-rw-r--r--extensions/deviceicon/battery.py252
-rw-r--r--extensions/deviceicon/network.py543
-rw-r--r--extensions/deviceicon/speaker.py (renamed from src/view/devices/speaker.py)85
-rw-r--r--extensions/deviceicon/volume.py154
-rw-r--r--extensions/globalkey/Makefile.am6
-rw-r--r--extensions/globalkey/Makefile.in (renamed from src/model/devices/network/Makefile.in)17
-rw-r--r--extensions/globalkey/__init__.py (copied from src/intro/__init__.py)0
-rw-r--r--extensions/globalkey/screenshot.py72
-rw-r--r--extensions/globalkey/viewsource.py363
-rw-r--r--intltool-extract.in875
-rw-r--r--intltool-merge.in1506
-rw-r--r--intltool-update.in1166
-rw-r--r--po/Makefile.in.in13
-rw-r--r--po/POTFILES.in93
-rw-r--r--po/ar.po193
-rw-r--r--po/de.po566
-rw-r--r--po/en.po566
-rw-r--r--po/es.po587
-rw-r--r--po/fr.po556
-rw-r--r--po/ht.po436
-rw-r--r--po/it.po500
-rw-r--r--po/ja.po500
-rw-r--r--po/mn.po131
-rw-r--r--po/nl.po557
-rw-r--r--po/pt.po145
-rw-r--r--po/si.po936
-rw-r--r--po/sl.po484
-rw-r--r--po/tr.po882
-rw-r--r--service/Makefile.am33
-rw-r--r--service/Makefile.in439
-rw-r--r--service/activityregistryservice.py166
-rw-r--r--service/clipboardservice.py212
-rw-r--r--service/config.py17
-rw-r--r--service/config.py.in17
-rwxr-xr-xservice/main.py43
-rw-r--r--service/org.laptop.ActivityRegistry.service.in4
-rw-r--r--service/org.laptop.Clipboard.service.in4
-rw-r--r--src/Makefile.am13
-rw-r--r--src/Makefile.in76
-rw-r--r--src/controlpanel/model/Makefile.am10
-rw-r--r--src/controlpanel/model/network.py101
-rw-r--r--src/controlpanel/view/Makefile.am16
-rw-r--r--src/controlpanel/view/language.py146
-rwxr-xr-xsrc/emulator.py147
-rw-r--r--src/hardware/Makefile.am13
-rw-r--r--src/hardware/Makefile.in419
-rw-r--r--src/hardware/NetworkManagerInfo.conf26
-rw-r--r--src/hardware/hardwaremanager.py123
-rw-r--r--src/hardware/nmclient.py795
-rw-r--r--src/hardware/nminfo.py556
-rw-r--r--src/intro/Makefile.am10
-rw-r--r--src/intro/glive.py200
-rw-r--r--src/jarabe/Makefile.am14
-rw-r--r--src/jarabe/Makefile.in (renamed from src/view/Makefile.in)44
-rw-r--r--src/jarabe/__init__.py (renamed from src/view/devices/deviceview.py)20
-rw-r--r--src/jarabe/config.py (renamed from src/config.py)13
-rw-r--r--src/jarabe/config.py.in (renamed from src/config.py.in)5
-rw-r--r--src/jarabe/controlpanel/Makefile.am (renamed from src/controlpanel/Makefile.am)4
-rw-r--r--src/jarabe/controlpanel/Makefile.in (copied from src/view/devices/network/Makefile.in)20
-rw-r--r--src/jarabe/controlpanel/__init__.py (copied from src/controlpanel/__init__.py)0
-rw-r--r--src/jarabe/controlpanel/cmd.py (renamed from src/controlpanel/cmd.py)37
-rw-r--r--src/jarabe/controlpanel/gui.py (renamed from src/controlpanel/gui.py)105
-rw-r--r--src/jarabe/controlpanel/inlinealert.py (renamed from src/controlpanel/inlinealert.py)0
-rw-r--r--src/jarabe/controlpanel/sectionview.py (renamed from src/controlpanel/sectionview.py)0
-rw-r--r--src/jarabe/controlpanel/toolbar.py (renamed from src/controlpanel/toolbar.py)0
-rw-r--r--src/jarabe/desktop/Makefile.am (renamed from src/view/home/Makefile.am)16
-rw-r--r--src/jarabe/desktop/Makefile.in (copied from src/view/home/Makefile.in)26
-rw-r--r--src/jarabe/desktop/__init__.py (renamed from src/hardware/__init__.py)0
-rw-r--r--src/jarabe/desktop/activitieslist.py (renamed from src/view/home/activitieslist.py)123
-rw-r--r--src/jarabe/desktop/favoriteslayout.py (renamed from src/view/home/favoriteslayout.py)66
-rw-r--r--src/jarabe/desktop/favoritesview.py (renamed from src/view/home/favoritesview.py)259
-rw-r--r--src/jarabe/desktop/friendview.py (renamed from src/view/home/FriendView.py)10
-rw-r--r--src/jarabe/desktop/grid.py (renamed from src/view/home/grid.py)2
-rw-r--r--src/jarabe/desktop/groupbox.py (renamed from src/view/home/FriendsBox.py)39
-rw-r--r--src/jarabe/desktop/homebox.py (renamed from src/view/home/HomeBox.py)72
-rw-r--r--src/jarabe/desktop/homewindow.py143
-rw-r--r--src/jarabe/desktop/keydialog.py (renamed from src/hardware/keydialog.py)194
-rw-r--r--src/jarabe/desktop/meshbox.py860
-rw-r--r--src/jarabe/desktop/myicon.py (renamed from src/view/home/MyIcon.py)8
-rwxr-xr-xsrc/jarabe/desktop/proc_smaps.py (renamed from src/view/home/proc_smaps.py)0
-rw-r--r--src/jarabe/desktop/schoolserver.py (renamed from src/hardware/schoolserver.py)12
-rw-r--r--src/jarabe/desktop/snowflakelayout.py (renamed from src/view/home/snowflakelayout.py)0
-rw-r--r--src/jarabe/desktop/spreadlayout.py (renamed from src/view/home/spreadlayout.py)2
-rw-r--r--src/jarabe/desktop/transitionbox.py (renamed from src/view/home/transitionbox.py)15
-rw-r--r--src/jarabe/frame/Makefile.am (renamed from src/view/frame/Makefile.am)6
-rw-r--r--src/jarabe/frame/Makefile.in (renamed from src/view/frame/Makefile.in)16
-rw-r--r--src/jarabe/frame/__init__.py (renamed from src/controlpanel/__init__.py)9
-rw-r--r--src/jarabe/frame/activitiestray.py815
-rw-r--r--src/jarabe/frame/clipboard.py149
-rw-r--r--src/jarabe/frame/clipboardicon.py (renamed from src/view/clipboardicon.py)123
-rw-r--r--src/jarabe/frame/clipboardmenu.py (renamed from src/view/clipboardmenu.py)143
-rw-r--r--src/jarabe/frame/clipboardobject.py (renamed from service/clipboardobject.py)38
-rw-r--r--src/jarabe/frame/clipboardpanelwindow.py (renamed from src/view/frame/clipboardpanelwindow.py)18
-rw-r--r--src/jarabe/frame/clipboardtray.py (renamed from src/view/frame/clipboardtray.py)55
-rw-r--r--src/jarabe/frame/devicestray.py54
-rw-r--r--src/jarabe/frame/eventarea.py (renamed from src/view/frame/eventarea.py)33
-rw-r--r--src/jarabe/frame/frame.py (renamed from src/view/frame/frame.py)76
-rw-r--r--src/jarabe/frame/frameinvoker.py (renamed from src/view/frame/frameinvoker.py)0
-rw-r--r--src/jarabe/frame/framewindow.py (renamed from src/view/frame/framewindow.py)0
-rw-r--r--src/jarabe/frame/friendstray.py (renamed from src/view/frame/friendstray.py)20
-rw-r--r--src/jarabe/frame/notification.py (renamed from src/view/frame/notification.py)6
-rw-r--r--src/jarabe/frame/zoomtoolbar.py (renamed from src/view/frame/zoomtoolbar.py)35
-rw-r--r--src/jarabe/intro/Makefile.am9
-rw-r--r--src/jarabe/intro/Makefile.in (renamed from src/intro/Makefile.in)21
-rw-r--r--src/jarabe/intro/__init__.py21
-rw-r--r--src/jarabe/intro/colorpicker.py (renamed from src/intro/colorpicker.py)0
-rw-r--r--src/jarabe/intro/default-picture.png (renamed from src/intro/default-picture.png)bin10442 -> 10442 bytes
-rw-r--r--src/jarabe/intro/window.py (renamed from src/intro/intro.py)68
-rw-r--r--src/jarabe/journal/Makefile.am17
-rw-r--r--src/jarabe/journal/Makefile.in (copied from src/view/devices/network/Makefile.in)29
-rw-r--r--src/jarabe/journal/__init__.py (renamed from src/intro/__init__.py)0
-rw-r--r--src/jarabe/journal/collapsedentry.py372
-rw-r--r--src/jarabe/journal/detailview.py122
-rw-r--r--src/jarabe/journal/expandedentry.py375
-rw-r--r--src/jarabe/journal/journalactivity.py337
-rw-r--r--src/jarabe/journal/journalentrybundle.py86
-rw-r--r--src/jarabe/journal/journaltoolbox.py423
-rw-r--r--src/jarabe/journal/keepicon.py59
-rw-r--r--src/jarabe/journal/listview.py459
-rw-r--r--src/jarabe/journal/misc.py224
-rw-r--r--src/jarabe/journal/modalalert.py97
-rw-r--r--src/jarabe/journal/model.py362
-rw-r--r--src/jarabe/journal/objectchooser.py198
-rw-r--r--src/jarabe/journal/palettes.py178
-rw-r--r--src/jarabe/journal/volumestoolbar.py172
-rw-r--r--src/jarabe/model/Makefile.am16
-rw-r--r--src/jarabe/model/Makefile.in (renamed from src/view/home/Makefile.in)39
-rw-r--r--src/jarabe/model/__init__.py (renamed from src/model/__init__.py)0
-rw-r--r--src/jarabe/model/buddy.py (renamed from src/model/BuddyModel.py)0
-rw-r--r--src/jarabe/model/bundleregistry.py (renamed from service/bundleregistry.py)81
-rw-r--r--src/jarabe/model/filetransfer.py331
-rw-r--r--src/jarabe/model/friends.py (renamed from src/model/Friends.py)16
-rw-r--r--src/jarabe/model/invites.py (renamed from src/model/Invites.py)2
-rw-r--r--src/jarabe/model/neighborhood.py273
-rw-r--r--src/jarabe/model/network.py368
-rw-r--r--src/jarabe/model/notifications.py95
-rw-r--r--src/jarabe/model/owner.py (renamed from src/model/Owner.py)21
-rw-r--r--src/jarabe/model/screen.py64
-rw-r--r--src/jarabe/model/session.py (renamed from src/session.py)5
-rw-r--r--src/jarabe/model/shell.py578
-rw-r--r--src/jarabe/model/sound.py58
-rw-r--r--src/jarabe/util/Makefile.am6
-rw-r--r--src/jarabe/util/Makefile.in (renamed from src/model/Makefile.in)27
-rw-r--r--src/jarabe/util/__init__.py (renamed from service/__init__.py)5
-rw-r--r--src/jarabe/util/telepathy/Makefile.am4
-rw-r--r--src/jarabe/util/telepathy/Makefile.in (copied from src/view/devices/network/Makefile.in)18
-rw-r--r--src/jarabe/util/telepathy/__init__.py (renamed from src/controlpanel/model/__init__.py)6
-rw-r--r--src/jarabe/util/telepathy/connection_watcher.py110
-rw-r--r--src/jarabe/view/Makefile.am11
-rw-r--r--src/jarabe/view/Makefile.in (renamed from src/view/devices/network/Makefile.in)23
-rw-r--r--src/jarabe/view/__init__.py (renamed from src/model/devices/__init__.py)0
-rw-r--r--src/jarabe/view/buddyicon.py (renamed from src/view/BuddyIcon.py)2
-rw-r--r--src/jarabe/view/buddymenu.py (renamed from src/view/BuddyMenu.py)31
-rw-r--r--src/jarabe/view/keyhandler.py (renamed from src/view/keyhandler.py)103
-rw-r--r--src/jarabe/view/launcher.py (renamed from src/view/launchwindow.py)43
-rw-r--r--src/jarabe/view/palettes.py (renamed from src/view/palettes.py)51
-rw-r--r--src/jarabe/view/pulsingicon.py231
-rw-r--r--src/jarabe/view/service.py (renamed from src/shellservice.py)57
-rw-r--r--src/jarabe/view/tabbinghandler.py (renamed from src/view/tabbinghandler.py)54
-rw-r--r--src/logsmanager.py56
-rw-r--r--src/main.py153
-rw-r--r--src/model/Makefile.am14
-rw-r--r--src/model/MeshModel.py237
-rw-r--r--src/model/accesspointmodel.py80
-rw-r--r--src/model/devices/Makefile.am10
-rw-r--r--src/model/devices/Makefile.in552
-rw-r--r--src/model/devices/battery.py97
-rw-r--r--src/model/devices/device.py45
-rw-r--r--src/model/devices/devicesmodel.py144
-rw-r--r--src/model/devices/network/Makefile.am6
-rw-r--r--src/model/devices/network/__init__.py16
-rw-r--r--src/model/devices/network/mesh.py86
-rw-r--r--src/model/devices/network/wired.py28
-rw-r--r--src/model/devices/network/wireless.py102
-rw-r--r--src/model/devices/speaker.py65
-rw-r--r--src/model/homeactivity.py240
-rw-r--r--src/model/homemodel.py286
-rw-r--r--src/model/shellmodel.py104
-rw-r--r--src/view/ActivityHost.py63
-rw-r--r--src/view/Makefile.am17
-rw-r--r--src/view/OverlayWindow.py70
-rw-r--r--src/view/Shell.py272
-rw-r--r--src/view/__init__.py16
-rw-r--r--src/view/devices/Makefile.am9
-rw-r--r--src/view/devices/__init__.py16
-rw-r--r--src/view/devices/battery.py130
-rw-r--r--src/view/devices/network/Makefile.am6
-rw-r--r--src/view/devices/network/__init__.py16
-rw-r--r--src/view/devices/network/mesh.py174
-rw-r--r--src/view/devices/network/wired.py25
-rw-r--r--src/view/devices/network/wireless.py191
-rw-r--r--src/view/frame/__init__.py16
-rw-r--r--src/view/frame/activitiestray.py394
-rw-r--r--src/view/frame/devicestray.py66
-rw-r--r--src/view/home/HomeWindow.py153
-rw-r--r--src/view/home/MeshBox.py646
-rw-r--r--src/view/home/__init__.py16
-rw-r--r--src/view/pulsingicon.py239
273 files changed, 18673 insertions, 17809 deletions
diff --git a/Makefile.am b/Makefile.am
index 11777bc..9e252af 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = bin data po src service
+SUBDIRS = bin data po src extensions
DISTCLEANFILES = \
intltool-extract \
diff --git a/Makefile.in b/Makefile.in
index 3e014c6..b487a0d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -89,6 +89,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -203,9 +206,10 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = bin data po src service
+SUBDIRS = bin data po src extensions
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
diff --git a/aclocal.m4 b/aclocal.m4
index 03cfcd9..637ae4d 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,12 +13,56 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(AC_AUTOCONF_VERSION, [2.61],,
-[m4_warning([this file was generated for autoconf 2.61.
+m4_if(AC_AUTOCONF_VERSION, [2.63],,
+[m4_warning([this file was generated for autoconf 2.63.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
+dnl AM_GCONF_SOURCE_2
+dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
+dnl (i.e. pass to gconftool-2
+dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
+dnl you should install foo.schemas files
+dnl
+
+AC_DEFUN([AM_GCONF_SOURCE_2],
+[
+ if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
+ GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
+ else
+ GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
+ fi
+
+ AC_ARG_WITH([gconf-source],
+ AC_HELP_STRING([--with-gconf-source=sourceaddress],
+ [Config database for installing schema files.]),
+ [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
+
+ AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
+ AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
+
+ if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
+ GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
+ fi
+
+ AC_ARG_WITH([gconf-schema-file-dir],
+ AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
+ [Directory for installing schema files.]),
+ [GCONF_SCHEMA_FILE_DIR="$withval"],)
+
+ AC_SUBST(GCONF_SCHEMA_FILE_DIR)
+ AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
+
+ AC_ARG_ENABLE(schemas-install,
+ [ --disable-schemas-install Disable the schemas installation],
+ [case ${enableval} in
+ yes|no) ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
+ esac])
+ AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
+])
+
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
#
@@ -454,9 +498,10 @@ fi])
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 36 IT_PROG_INTLTOOL
-AC_DEFUN([IT_PROG_INTLTOOL],
-[AC_PREREQ([2.50])dnl
+# serial 40 IT_PROG_INTLTOOL
+AC_DEFUN([IT_PROG_INTLTOOL], [
+AC_PREREQ([2.50])dnl
+AC_REQUIRE([AM_NLS])dnl
case "$am__api_version" in
1.[01234])
@@ -470,14 +515,21 @@ if test -n "$1"; then
AC_MSG_CHECKING([for intltool >= $1])
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
- INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
- [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
+ INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+ [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
]
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
fi
+AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
+AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
+AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+ AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
+fi
+
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
@@ -522,6 +574,7 @@ AC_SUBST(INTLTOOL_POLICY_RULE)
AC_PATH_PROG(XGETTEXT, xgettext)
AC_PATH_PROG(MSGMERGE, msgmerge)
AC_PATH_PROG(MSGFMT, msgfmt)
+AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
fi
@@ -532,12 +585,7 @@ if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
fi
-# Use the tools built into the package, not the ones that are installed.
-AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
-AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
-AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
-
-AC_PATH_PROG(INTLTOOL_PERL, perl)
+AC_PATH_PROG(INTLTOOL_PERL, [perl])
if test -z "$INTLTOOL_PERL"; then
AC_MSG_ERROR([perl not found; required for intltool])
fi
@@ -583,42 +631,6 @@ AC_SUBST(DATADIRNAME)
IT_PO_SUBDIR([po])
-dnl The following is very similar to
-dnl
-dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
-dnl
-dnl with the following slight differences:
-dnl - the *.in files are in ac_aux_dir,
-dnl - if the file haven't changed upon reconfigure, it's not touched,
-dnl - the evaluation of the third parameter enables a hack which computes
-dnl the actual value of $libdir,
-dnl - the user sees "executing intltool commands", instead of
-dnl "creating intltool-extract" and such.
-dnl
-dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
-dnl a reason for it.
-
-AC_CONFIG_COMMANDS([intltool], [
-
-for file in intltool-extract intltool-merge intltool-update; do
- sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
- -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
- -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
- < ${ac_aux_dir}/${file}.in > ${file}.out
- if cmp -s ${file} ${file}.out 2>/dev/null; then
- rm -f ${file}.out
- else
- mv -f ${file}.out ${file}
- fi
- chmod ugo+x ${file}
- chmod u+w ${file}
-done
-
-],
-[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
-prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
-
])
@@ -634,6 +646,9 @@ dnl The following CONFIG_COMMANDS should be exetuted at the very end
dnl of config.status.
AC_CONFIG_COMMANDS_PRE([
AC_CONFIG_COMMANDS([$1/stamp-it], [
+ if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" ]; then
+ AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
+ fi
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
>"$1/stamp-it.tmp"
[sed '/^#/d
@@ -642,28 +657,55 @@ AC_CONFIG_COMMANDS_PRE([
'"s|^| $ac_top_srcdir/|" \
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
]
- if test ! -f "$1/Makefile"; then
- AC_MSG_ERROR([$1/Makefile is not ready.])
- fi
- mv "$1/Makefile" "$1/Makefile.tmp"
[sed '/^POTFILES =/,/[^\\]$/ {
/^POTFILES =/!d
r $1/POTFILES
}
- ' "$1/Makefile.tmp" >"$1/Makefile"]
+ ' "$1/Makefile.in" >"$1/Makefile"]
rm -f "$1/Makefile.tmp"
mv "$1/stamp-it.tmp" "$1/stamp-it"
])
])dnl
])
-
# deprecated macros
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
# A hint is needed for aclocal from Automake <= 1.9.4:
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
+# nls.m4 serial 3 (gettext-0.15)
+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+])
+
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
diff --git a/bin/Makefile.am b/bin/Makefile.am
index ca6ddef..05a9215 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -1,14 +1,14 @@
-bin_SCRIPTS = \
- sugar \
+python_scripts = \
sugar-activity \
- sugar-backup \
sugar-control-panel \
sugar-emulator \
sugar-install-bundle \
sugar-launch \
- sugar-shell \
- sugar-shell-service
+ sugar-session \
+ sugar-ui-check
-EXTRA_DIST = $(bin_SCRIPTS) sugar.in
+bin_SCRIPTS = \
+ sugar \
+ $(python_scripts)
-DISTCLEANFILES = sugar
+EXTRA_DIST = $(python_scripts) sugar.in
diff --git a/bin/Makefile.in b/bin/Makefile.in
index 8c1ac15..140a78a 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -32,16 +32,13 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = bin
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/sugar-control-panel.in $(srcdir)/sugar-emulator.in \
- $(srcdir)/sugar-shell-service.in $(srcdir)/sugar-shell.in \
$(srcdir)/sugar.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES = sugar sugar-control-panel sugar-emulator \
- sugar-shell sugar-shell-service
+CONFIG_CLEAN_FILES = sugar
am__installdirs = "$(DESTDIR)$(bindir)"
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS)
@@ -71,6 +68,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -185,21 +185,23 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-bin_SCRIPTS = \
- sugar \
+python_scripts = \
sugar-activity \
- sugar-backup \
sugar-control-panel \
sugar-emulator \
sugar-install-bundle \
sugar-launch \
- sugar-shell \
- sugar-shell-service
+ sugar-session \
+ sugar-ui-check
+
+bin_SCRIPTS = \
+ sugar \
+ $(python_scripts)
-EXTRA_DIST = $(bin_SCRIPTS) sugar.in
-DISTCLEANFILES = sugar
+EXTRA_DIST = $(python_scripts) sugar.in
all: all-am
.SUFFIXES:
@@ -234,14 +236,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
sugar: $(top_builddir)/config.status $(srcdir)/sugar.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-sugar-control-panel: $(top_builddir)/config.status $(srcdir)/sugar-control-panel.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-sugar-emulator: $(top_builddir)/config.status $(srcdir)/sugar-emulator.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-sugar-shell: $(top_builddir)/config.status $(srcdir)/sugar-shell.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-sugar-shell-service: $(top_builddir)/config.status $(srcdir)/sugar-shell-service.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@@ -321,7 +315,6 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
diff --git a/bin/sugar b/bin/sugar
deleted file mode 100644
index 88e478a..0000000
--- a/bin/sugar
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-export SUGAR_THEME=sugar-xo
-
-if [ -f /etc/olpc-security ] ; then
- exec dbus-launch --exit-with-session --config-file=/etc/dbus-1/session-olpc.conf sugar-shell
-else
- exec dbus-launch --exit-with-session sugar-shell
-fi
diff --git a/bin/sugar-backup b/bin/sugar-backup
deleted file mode 100644
index c90da63..0000000
--- a/bin/sugar-backup
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-import time
-
-i = 0
-while i <= 100:
- time.sleep(0.5)
- sys.stdout.write('%d\n' % i)
- sys.stdout.flush()
- i += 5
diff --git a/bin/sugar-control-panel b/bin/sugar-control-panel
index a440a85..a97e3c0 100644
--- a/bin/sugar-control-panel
+++ b/bin/sugar-control-panel
@@ -17,9 +17,11 @@
import sys
-sys.path.insert(0, '/home/marco/sucrose-0.82/install/share/sugar/shell')
+from jarabe import config
-from controlpanel.cmd import main
+sys.path.append(config.ext_path)
+
+from jarabe.controlpanel.cmd import main
main()
diff --git a/bin/sugar-emulator b/bin/sugar-emulator
index dfc5e9c8..8c0aa8e 100644
--- a/bin/sugar-emulator
+++ b/bin/sugar-emulator
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (C) 2008, Red Hat, Inc.
+# Copyright (C) 2006-2008, Red Hat, Inc.
#
# 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
@@ -15,12 +15,138 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-import sys
+import os
+import random
+import subprocess
+import time
+from optparse import OptionParser
-sys.path.insert(0, '/home/marco/sucrose-0.82/install/share/sugar/shell')
+import gtk
+import gobject
-from emulator import main
+from sugar import env
-main()
+def _run_xephyr(display, dpi, dimensions):
+ cmd = [ 'Xephyr' ]
+ cmd.append(':%d' % display)
+ cmd.append('-ac')
+
+ if dimensions is not None:
+ cmd.append('-screen')
+ cmd.append(dimensions)
+ elif gtk.gdk.screen_width() < 1200 or gtk.gdk.screen_height() < 900:
+ cmd.append('-fullscreen')
+ else:
+ cmd.append('-screen')
+ cmd.append('%dx%d' % (1200, 900))
+
+ if dpi is None:
+ dpi = gtk.settings_get_default().get_property('gtk-xft-dpi') / 1024
+ if dpi > 0:
+ cmd.append('-dpi')
+ cmd.append('%d' % dpi)
+
+ result = gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH)
+ pid = result[0]
+
+ os.environ['DISPLAY'] = ":%d" % (display)
+ os.environ['SUGAR_EMULATOR_PID'] = str(pid)
+
+def _check_xephyr(display):
+ result = subprocess.call(['xdpyinfo', '-display', ':%d' % display],
+ stdout=open(os.devnull, "w"),
+ stderr=open(os.devnull, "w"))
+ return result == 0
+
+def _start_xephyr(dpi, dimensions):
+ # FIXME evil workaround until F10 Xephyr is fixed
+ if os.path.exists('/etc/fedora-release'):
+ if open('/etc/fedora-release').read().startswith('Fedora release 10'):
+ _run_xephyr(random.randint(100, 500), dpi, dimensions)
+ return
+
+ for display in range(100, 110):
+ if not _check_xephyr(display):
+ _run_xephyr(display, dpi, dimensions)
+
+ tries = 10
+ while tries > 0:
+ if _check_xephyr(display):
+ return
+ else:
+ tries -= 1
+ time.sleep(0.1)
+
+def _start_matchbox():
+ cmd = ['matchbox-window-manager']
+
+ cmd.extend(['-use_titlebar', 'no'])
+ cmd.extend(['-theme', 'sugar'])
+
+ gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH)
+
+def _setup_env():
+ os.environ['SUGAR_EMULATOR'] = 'yes'
+ os.environ['GABBLE_LOGFILE'] = os.path.join(
+ env.get_profile_path(), 'logs', 'telepathy-gabble.log')
+ os.environ['SALUT_LOGFILE'] = os.path.join(
+ env.get_profile_path(), 'logs', 'telepathy-salut.log')
+ os.environ['STREAM_ENGINE_LOGFILE'] = os.path.join(
+ env.get_profile_path(), 'logs', 'telepathy-stream-engine.log')
+ path = os.path.join(os.environ.get("HOME"), '.i18n')
+ if os.path.exists(path):
+ fd = open(path, "r")
+ lines = fd.readlines()
+ fd.close()
+ language_env_variable = None
+ lang_env_variable = None
+
+ for line in lines:
+ if line.startswith("LANGUAGE="):
+ lang = line[9:].replace('"', '')
+ language_env_variable = lang.strip()
+ elif line.startswith("LANG="):
+ lang_env_variable = line[5:].replace('"', '')
+
+ # There might be cases where .i18n may not contain a LANGUAGE field
+ if language_env_variable is not None:
+ os.environ['LANGUAGE'] = language_env_variable
+ if lang_env_variable is not None:
+ os.environ['LANG'] = lang_env_variable
+
+def main():
+ """Script-level operations"""
+
+ parser = OptionParser()
+ parser.add_option('-d', '--dpi', dest='dpi', type="int",
+ help='Emulator dpi')
+ parser.add_option('-s', '--scaling', dest='scaling',
+ help='Sugar scaling in %')
+ parser.add_option('-i', '--dimensions', dest='dimensions',
+ help='Emulator dimensions (ex. 1200x900)')
+ (options, args) = parser.parse_args()
+
+ _setup_env()
+
+ _start_xephyr(options.dpi, options.dimensions)
+
+ if options.scaling:
+ os.environ['SUGAR_SCALING'] = options.scaling
+
+ command = ['dbus-launch', 'dbus-launch', '--exit-with-session']
+
+ if not args:
+ command.append('sugar')
+ else:
+ _start_matchbox()
+
+ if args[0].endswith('.py'):
+ command.append('python')
+
+ command.append(args[0])
+
+ os.execlp(*command)
+
+main()
diff --git a/bin/sugar-launch b/bin/sugar-launch
index 7765ff1..68fe613 100644
--- a/bin/sugar-launch
+++ b/bin/sugar-launch
@@ -18,10 +18,11 @@
import os
import sys
+import dbus
from optparse import OptionParser
from sugar.activity import activityfactory
-from sugar.activity.registry import get_registry
+from sugar.bundle.activitybundle import ActivityBundle
usage = "usage: %prog [options] activity"
parser = OptionParser(usage)
@@ -30,15 +31,17 @@ parser.add_option("-d", "--debug", action="store_true", dest="debug",
(options, args) = parser.parse_args()
if len(args) == 0:
- print 'You need to specify the activity name or part of it.'
+ print 'You need to specify the activity bundle_id.'
sys.exit(1)
-registry = get_registry()
-activities = registry.find_activity(args[0])
-if len(activities) == 0:
- print 'Activity not found.'
+bus = dbus.SessionBus()
+proxy = bus.get_object('org.laptop.Shell', '/org/laptop/Shell')
+path = dbus.Interface(proxy, 'org.laptop.Shell').GetBundlePath(args[0])
+if not path:
+ print 'Cannot find %s bundle.' % args[0]
+ sys.exit(1)
-activity = activities[0]
+activity = ActivityBundle(path)
cmd_args = activityfactory.get_command(activity)
def _which(exec_file):
diff --git a/bin/sugar-session b/bin/sugar-session
new file mode 100644
index 0000000..fc10eb8
--- /dev/null
+++ b/bin/sugar-session
@@ -0,0 +1,170 @@
+#!/usr/bin/env python
+# Copyright (C) 2006, Red Hat, Inc.
+#
+# 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 os
+import sys
+import time
+
+if os.environ.get('SUGAR_LOGGER_LEVEL', '') == 'debug':
+ print '%r STARTUP: Starting the shell' % time.time()
+ sys.stdout.flush()
+
+import shutil
+import gettext
+import logging
+
+import gconf
+import gtk
+import gobject
+import dbus.glib
+
+gtk.gdk.threads_init()
+dbus.glib.threads_init()
+
+from sugar import logger
+from sugar import env
+
+from jarabe.desktop.homewindow import HomeWindow
+from jarabe.model import sound
+from jarabe.view import launcher
+from jarabe import intro
+from jarabe import config
+
+def cleanup_logs():
+ """Clean up the log directory, moving old logs into a numbered backup
+ directory. We only keep `_MAX_BACKUP_DIRS` of these backup directories
+ around; the rest are removed."""
+ logs_dir = env.get_logs_path()
+ if not os.path.isdir(logs_dir):
+ os.makedirs(logs_dir)
+
+ backup_logs = []
+ backup_dirs = []
+ for f in os.listdir(logs_dir):
+ path = os.path.join(logs_dir, f)
+ if os.path.isfile(path):
+ backup_logs.append(f)
+ elif os.path.isdir(path):
+ backup_dirs.append(path)
+
+ if len(backup_dirs) > 3:
+ backup_dirs.sort()
+ root = backup_dirs[0]
+ for f in os.listdir(root):
+ os.remove(os.path.join(root, f))
+ os.rmdir(root)
+
+ if len(backup_logs) > 0:
+ name = str(int(time.time()))
+ backup_dir = os.path.join(logs_dir, name)
+ os.mkdir(backup_dir)
+ for log in backup_logs:
+ source_path = os.path.join(logs_dir, log)
+ dest_path = os.path.join(backup_dir, log)
+ os.rename(source_path, dest_path)
+
+def start_ui_service():
+ from jarabe.view.service import UIService
+
+ ui_service = UIService()
+ ui_service.start()
+
+def start_session_manager():
+ from jarabe.model.session import get_session_manager
+
+ session_manager = get_session_manager()
+ session_manager.start()
+
+def unfreeze_dcon_cb():
+ logging.debug('STARTUP: unfreeze_dcon_cb')
+ from jarabe.model import screen
+
+ screen.set_dcon_freeze(0)
+
+def setup_frame_cb():
+ logging.debug('STARTUP: setup_frame_cb')
+ from jarabe import frame
+ frame.get_view()
+
+def setup_keyhandler_cb():
+ logging.debug('STARTUP: setup_keyhandler_cb')
+ from jarabe.view import keyhandler
+ from jarabe import frame
+ keyhandler.setup(frame.get_view())
+
+def setup_journal_cb():
+ logging.debug('STARTUP: setup_journal_cb')
+ from jarabe.journal import journalactivity
+ journalactivity.start()
+
+def show_software_updates_cb(home_window):
+ logging.debug('STARTUP: show_software_updates_cb')
+ if os.path.isfile(os.path.expanduser('~/.sugar-update')):
+ home_window.get_home_box().show_software_updates_alert()
+
+def setup_notification_service_cb():
+ from jarabe.model import notifications
+ notifications.init()
+
+def setup_file_transfer_cb():
+ from jarabe.model import filetransfer
+ filetransfer.init()
+
+def main():
+ cleanup_logs()
+ logger.start('shell')
+
+ intro.check_profile()
+
+ client = gconf.client_get_default()
+ timezone = client.get_string('/desktop/sugar/date/timezone')
+
+ if timezone is not '':
+ os.environ['TZ'] = timezone
+
+ start_ui_service()
+ start_session_manager()
+
+ sound.restore()
+
+ sys.path.append(config.ext_path)
+
+ gettext.bindtextdomain('sugar', config.locale_path)
+ gettext.textdomain('sugar')
+
+ icons_path = os.path.join(config.data_path, 'icons')
+ gtk.icon_theme_get_default().append_search_path(icons_path)
+
+ launcher.setup()
+
+ home_window = HomeWindow()
+ home_window.show()
+
+ gobject.idle_add(unfreeze_dcon_cb)
+ gobject.idle_add(setup_frame_cb)
+ gobject.idle_add(setup_keyhandler_cb)
+ gobject.idle_add(setup_journal_cb)
+ gobject.idle_add(setup_notification_service_cb)
+ gobject.idle_add(setup_file_transfer_cb)
+ gobject.idle_add(show_software_updates_cb, home_window)
+
+ try:
+ gtk.main()
+ except KeyboardInterrupt:
+ print 'Ctrl+C pressed, exiting...'
+
+main()
diff --git a/bin/sugar-shell b/bin/sugar-shell
deleted file mode 100644
index b11c33e..0000000
--- a/bin/sugar-shell
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2008, Red Hat, Inc.
-#
-# 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 os
-import sys
-
-if os.environ.has_key('SUGAR_THEME'):
- theme = os.environ['SUGAR_THEME']
-else:
- theme = 'sugar'
-
-os.environ['GTK2_RC_FILES'] = '/home/marco/sucrose-0.82/install/share/sugar/data/%s.gtkrc' % theme
-
-sys.path.insert(0, '/home/marco/sucrose-0.82/install/share/sugar/shell')
-
-from main import main
-
-main()
-
-
diff --git a/bin/sugar-shell-service b/bin/sugar-shell-service
deleted file mode 100644
index 5df21a8..0000000
--- a/bin/sugar-shell-service
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2008, Red Hat, Inc.
-#
-# 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 sys
-from os import environ
-
-if not environ.has_key('SUGAR_ACTIVITIES'):
- environ['SUGAR_ACTIVITIES'] = '/home/marco/sucrose-0.82/install/share/sugar/activities:' \
- '/home/marco/sucrose-0.82/install/lib64/sugar/activities:' \
- '/home/marco/sucrose-0.82/install/lib/sugar/activities'
-
-sys.path.insert(0, '/home/marco/sucrose-0.82/install/share/sugar/service')
-
-from main import main
-
-main()
-
-
diff --git a/bin/sugar-shell-service.in b/bin/sugar-shell-service.in
deleted file mode 100644
index 49c2764..0000000
--- a/bin/sugar-shell-service.in
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2008, Red Hat, Inc.
-#
-# 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 sys
-from os import environ
-
-if not environ.has_key('SUGAR_ACTIVITIES'):
- environ['SUGAR_ACTIVITIES'] = '@prefix@/share/sugar/activities:' \
- '@prefix@/lib64/sugar/activities:' \
- '@prefix@/lib/sugar/activities'
-
-sys.path.insert(0, '@prefix@/share/sugar/service')
-
-from main import main
-
-main()
-
-
diff --git a/bin/sugar-shell.in b/bin/sugar-shell.in
deleted file mode 100644
index 55a25a7..0000000
--- a/bin/sugar-shell.in
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2008, Red Hat, Inc.
-#
-# 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 os
-import sys
-
-if os.environ.has_key('SUGAR_THEME'):
- theme = os.environ['SUGAR_THEME']
-else:
- theme = 'sugar'
-
-os.environ['GTK2_RC_FILES'] = '@prefix@/share/sugar/data/%s.gtkrc' % theme
-
-sys.path.insert(0, '@prefix@/share/sugar/shell')
-
-from main import main
-
-main()
-
-
diff --git a/bin/sugar-ui-check b/bin/sugar-ui-check
new file mode 100644
index 0000000..4d71796
--- /dev/null
+++ b/bin/sugar-ui-check
@@ -0,0 +1,161 @@
+#!/usr/bin/env python
+# Copyright (C) 2008, Red Hat, Inc.
+#
+# 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 logging
+import os
+import sys
+import subprocess
+import time
+
+import dbus
+import gobject
+import gtk
+import wnck
+
+from sugar import wm
+
+from jarabe.model.shell import get_sugar_window_type
+from sugar.bundle.activitybundle import ActivityBundle
+from jarabe import config
+
+checks_queue = []
+checks_failed = []
+checks_succeeded = []
+
+def get_dbus_version():
+ p = subprocess.Popen(['dbus-daemon', '--version'], stdout=subprocess.PIPE)
+
+ output = p.communicate()[0]
+ first_line = output.split('\n')[0]
+
+ return first_line.split(' ')[-1]
+
+class Check(object):
+ def __init__(self):
+ self.name = None
+ self.succeeded = False
+ self.start_time = None
+ self.max_time = None
+ self.timeout = None
+
+ def start(self):
+ logging.info('Start %s check.' % self.name)
+
+ self.start_time = time.time()
+
+ def get_failed(self):
+ if self.max_time and self.start_time:
+ if time.time() - self.start_time > self.max_time:
+ return True
+ return False
+
+ failed = property(get_failed)
+
+class ShellCheck(Check):
+ def __init__(self):
+ Check.__init__(self)
+
+ self.name = 'Shell'
+ self.max_time = 30
+
+ def start(self):
+ Check.start(self)
+
+ screen = wnck.screen_get_default()
+ screen.connect('window-opened', self._window_opened_cb)
+
+ def _window_opened_cb(self, screen, window):
+ if window.get_window_type() == wnck.WINDOW_DESKTOP:
+ self.succeeded = True
+
+class ActivityCheck(Check):
+ def __init__(self, bundle_id):
+ Check.__init__(self)
+
+ self.name = bundle_id
+ self.max_time = 120
+
+ def start(self):
+ Check.start(self)
+
+ self.launch_activity()
+
+ screen = wnck.screen_get_default()
+ screen.connect('window-opened', self._window_opened_cb)
+
+ def launch_activity(self):
+ from sugar.activity import activityfactory
+
+ bus = dbus.SessionBus()
+ proxy = bus.get_object('org.laptop.Shell', '/org/laptop/Shell')
+ iface = dbus.Interface(proxy, 'org.laptop.Shell')
+ path = iface.GetBundlePath(self.name)
+
+ if path:
+ activityfactory.create(ActivityBundle(path))
+ else:
+ logging.error('Cannot find activity %s.' % self.name)
+
+ def _window_opened_cb(self, screen, window):
+ if wm.get_bundle_id(window) == self.name and \
+ get_sugar_window_type(window) != 'launcher':
+ self.succeeded = True
+
+def _timeout_cb():
+ check = checks_queue[0]
+ if check.failed:
+ logging.info('%s check failed.' % (check.name))
+ checks_failed.append(checks_queue.pop(0))
+ elif check.succeeded:
+ logging.info('%s check succeeded.' % (check.name))
+ checks_succeeded.append(checks_queue.pop(0))
+ else:
+ return True
+
+ if len(checks_queue) > 0:
+ checks_queue[0].start()
+ else:
+ gtk.main_quit()
+
+ return True
+
+def main():
+ os.environ['GTK2_RC_FILES'] = os.path.join(config.data_path, 'sugar-100.gtkrc')
+
+ logging.basicConfig(level=logging.INFO,
+ format='%(asctime)s %(levelname)s %(message)s')
+
+ checks_queue.append(ShellCheck())
+
+ if get_dbus_version() >= '1.2.1':
+ # FIXME needs to get a list of the installed activities
+ checks_queue.append(ActivityCheck('org.laptop.Log'))
+ checks_queue.append(ActivityCheck('org.laptop.Chat'))
+ checks_queue.append(ActivityCheck('org.laptop.WebActivity'))
+ checks_queue.append(ActivityCheck('org.laptop.Pippy'))
+ checks_queue.append(ActivityCheck('org.laptop.Terminal'))
+ checks_queue.append(ActivityCheck('org.laptop.AbiWordActivity'))
+
+ checks_queue[0].start()
+ gobject.timeout_add(500, _timeout_cb)
+
+ gtk.main()
+
+ if len(checks_failed) > 0:
+ sys.exit(1)
+
+main()
diff --git a/bin/sugar.in b/bin/sugar.in
index 88e478a..af7f6b2 100644
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -1,9 +1,17 @@
#!/bin/sh
-export SUGAR_THEME=sugar-xo
+if test -z "$SUGAR_SCALING"; then
+ export SUGAR_SCALING=100
+fi
+
+export GTK2_RC_FILES="@prefix@/share/sugar/data/sugar-$SUGAR_SCALING.gtkrc"
-if [ -f /etc/olpc-security ] ; then
- exec dbus-launch --exit-with-session --config-file=/etc/dbus-1/session-olpc.conf sugar-shell
-else
- exec dbus-launch --exit-with-session sugar-shell
+if ! test -f "$GTK2_RC_FILES"; then
+ echo "sugar: ERROR: Gtk theme for scaling $SUGAR_SCALING not available."
+ exit 1
fi
+
+matchbox-window-manager -use_titlebar no -theme sugar \
+ -kbdconfig @prefix@/share/sugar/data/kbdconfig &
+
+exec sugar-session
diff --git a/configure b/configure
index 66c0140..aab52a6 100755
--- a/configure
+++ b/configure
@@ -1,9 +1,9 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for Sugar 0.82.8.
+# Generated by GNU Autoconf 2.63 for Sugar 0.83.4.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
@@ -15,7 +15,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -37,17 +37,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
else
- PATH_SEPARATOR=:
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
fi
- rm -f conf$$.sh
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
# Support unset when possible.
@@ -63,8 +91,6 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
-as_nl='
-'
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
@@ -87,7 +113,7 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
{ (exit 1); exit 1; }
fi
@@ -100,17 +126,10 @@ PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -132,7 +151,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -158,7 +177,7 @@ else
as_have_required=no
fi
- if test $as_have_required = yes && (eval ":
+ if test $as_have_required = yes && (eval ":
(as_func_return () {
(exit \$1)
}
@@ -240,7 +259,7 @@ IFS=$as_save_IFS
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -261,7 +280,7 @@ _ASEOF
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -341,10 +360,10 @@ fi
if test "x$CONFIG_SHELL" != x; then
for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi
@@ -413,9 +432,10 @@ fi
test \$exitcode = 0") || {
echo No shell found that supports shell functions.
- echo Please tell autoconf@gnu.org about your system,
- echo including any error possibly output before this
- echo message
+ echo Please tell bug-autoconf@gnu.org about your system,
+ echo including any error possibly output before this message.
+ echo This can help us improve future autoconf versions.
+ echo Configuration will now proceed without shell functions.
}
@@ -451,7 +471,7 @@ test \$exitcode = 0") || {
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
@@ -479,7 +499,6 @@ case `echo -n x` in
*)
ECHO_N='-n';;
esac
-
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
@@ -492,19 +511,22 @@ if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
+ fi
else
as_ln_s='cp -p'
fi
@@ -529,10 +551,10 @@ else
as_test_x='
eval sh -c '\''
if test -d "$1"; then
- test -d "$1/.";
+ test -d "$1/.";
else
case $1 in
- -*)set "./$1";;
+ -*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
???[sx]*):;;*)false;;esac;fi
@@ -572,8 +594,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='Sugar'
PACKAGE_TARNAME='sugar'
-PACKAGE_VERSION='0.82.8'
-PACKAGE_STRING='Sugar 0.82.8'
+PACKAGE_VERSION='0.83.4'
+PACKAGE_STRING='Sugar 0.83.4'
PACKAGE_BUGREPORT=''
ac_unique_file="configure.ac"
@@ -613,144 +635,159 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-SUCROSE_VERSION
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-am__isrc
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-STRIP
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-PYTHON
-PYTHON_VERSION
-PYTHON_PREFIX
-PYTHON_EXEC_PREFIX
-PYTHON_PLATFORM
-pythondir
-pkgpythondir
-pyexecdir
-pkgpyexecdir
-PKG_CONFIG
-SHELL_CFLAGS
-SHELL_LIBS
-INTLTOOL_DESKTOP_RULE
-INTLTOOL_DIRECTORY_RULE
-INTLTOOL_KEYS_RULE
-INTLTOOL_PROP_RULE
-INTLTOOL_OAF_RULE
-INTLTOOL_PONG_RULE
-INTLTOOL_SERVER_RULE
-INTLTOOL_SHEET_RULE
-INTLTOOL_SOUNDLIST_RULE
-INTLTOOL_UI_RULE
-INTLTOOL_XAM_RULE
-INTLTOOL_KBD_RULE
-INTLTOOL_XML_RULE
-INTLTOOL_XML_NOMERGE_RULE
-INTLTOOL_CAVES_RULE
-INTLTOOL_SCHEMAS_RULE
-INTLTOOL_THEME_RULE
-INTLTOOL_SERVICE_RULE
-INTLTOOL_POLICY_RULE
-XGETTEXT
-MSGMERGE
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+GCONF_SCHEMAS_INSTALL_FALSE
+GCONF_SCHEMAS_INSTALL_TRUE
+GCONF_SCHEMA_FILE_DIR
+GCONF_SCHEMA_CONFIG_SOURCE
+GCONFTOOL
+ENABLE_UPDATE_MIMEDB_FALSE
+ENABLE_UPDATE_MIMEDB_TRUE
+MKINSTALLDIRS
+POSUB
+POFILES
+PO_IN_DATADIR_FALSE
+PO_IN_DATADIR_TRUE
+INTLLIBS
+INSTOBJEXT
+GMOFILES
+CATOBJEXT
+CATALOGS
+MSGFMT_OPTS
+EGREP
+GREP
+CPP
+GETTEXT_PACKAGE
+DATADIRNAME
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+ALL_LINGUAS
+INTLTOOL_PERL
+GMSGFMT
MSGFMT
+MSGMERGE
+XGETTEXT
+INTLTOOL_POLICY_RULE
+INTLTOOL_SERVICE_RULE
+INTLTOOL_THEME_RULE
+INTLTOOL_SCHEMAS_RULE
+INTLTOOL_CAVES_RULE
+INTLTOOL_XML_NOMERGE_RULE
+INTLTOOL_XML_RULE
+INTLTOOL_KBD_RULE
+INTLTOOL_XAM_RULE
+INTLTOOL_UI_RULE
+INTLTOOL_SOUNDLIST_RULE
+INTLTOOL_SHEET_RULE
+INTLTOOL_SERVER_RULE
+INTLTOOL_PONG_RULE
+INTLTOOL_OAF_RULE
+INTLTOOL_PROP_RULE
+INTLTOOL_KEYS_RULE
+INTLTOOL_DIRECTORY_RULE
+INTLTOOL_DESKTOP_RULE
INTLTOOL_EXTRACT
INTLTOOL_MERGE
INTLTOOL_UPDATE
-INTLTOOL_PERL
-ALL_LINGUAS
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
-DATADIRNAME
-GETTEXT_PACKAGE
-CPP
-GREP
-EGREP
USE_NLS
-MSGFMT_OPTS
-GMSGFMT
-CATALOGS
-CATOBJEXT
-GMOFILES
-INSTOBJEXT
-INTLLIBS
-PO_IN_DATADIR_TRUE
-PO_IN_DATADIR_FALSE
-POFILES
-POSUB
-MKINSTALLDIRS
-ENABLE_UPDATE_MIMEDB_TRUE
-ENABLE_UPDATE_MIMEDB_FALSE
-LIBOBJS
-LTLIBOBJS'
+SHELL_LIBS
+SHELL_CFLAGS
+PKG_CONFIG
+pkgpyexecdir
+pyexecdir
+pkgpythondir
+pythondir
+PYTHON_PLATFORM
+PYTHON_EXEC_PREFIX
+PYTHON_PREFIX
+PYTHON_VERSION
+PYTHON
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+SUCROSE_VERSION
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_nls
+enable_dependency_tracking
+enable_update_mimedb
+with_gconf_source
+with_gconf_schema_file_dir
+enable_schemas_install
+'
ac_precious_vars='build_alias
host_alias
target_alias
@@ -768,6 +805,8 @@ CPP'
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
@@ -866,13 +905,21 @@ do
datarootdir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=no ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
-docdir | --docdir | --docdi | --doc | --do)
ac_prev=docdir ;;
@@ -885,13 +932,21 @@ do
dvidir=$ac_optarg ;;
-enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=\$ac_optarg ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -1082,22 +1137,38 @@ do
ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=\$ac_optarg ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=no ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
@@ -1117,7 +1188,7 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) { echo "$as_me: error: unrecognized option: $ac_option
+ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; }
;;
@@ -1126,16 +1197,16 @@ Try \`$0 --help' for more information." >&2
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
{ (exit 1); exit 1; }; }
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
@@ -1144,22 +1215,38 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
+ { $as_echo "$as_me: error: missing argument to $ac_option" >&2
{ (exit 1); exit 1; }; }
fi
-# Be sure to have absolute directory names.
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
+ { (exit 1); exit 1; }; } ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
do
eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
case $ac_val in
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; }
done
@@ -1174,7 +1261,7 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
@@ -1190,10 +1277,10 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { echo "$as_me: error: Working directory cannot be determined" >&2
+ { $as_echo "$as_me: error: working directory cannot be determined" >&2
{ (exit 1); exit 1; }; }
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
{ (exit 1); exit 1; }; }
@@ -1201,12 +1288,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1233,12 +1320,12 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
{ (exit 1); exit 1; }; }
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
{ (exit 1); exit 1; }; }
pwd)`
# When building in place, set srcdir=.
@@ -1265,7 +1352,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Sugar 0.82.8 to adapt to many kinds of systems.
+\`configure' configures Sugar 0.83.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1287,9 +1374,9 @@ Configuration:
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -1299,25 +1386,25 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/sugar]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/sugar]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
@@ -1331,17 +1418,28 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Sugar 0.82.8:";;
+ short | recursive ) echo "Configuration of Sugar 0.83.4:";;
esac
cat <<\_ACEOF
Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-nls do not use Native Language Support
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--disable-update-mimedb disable the update-mime-database after install
default=no
+ --disable-schemas-install Disable the schemas installation
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-gconf-source=sourceaddress
+ Config database for installing schema files.
+ --with-gconf-schema-file-dir=dir
+ Directory for installing schema files.
Some influential environment variables:
PKG_CONFIG path to pkg-config utility
@@ -1367,15 +1465,17 @@ fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" || continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1411,7 +1511,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1420,11 +1520,11 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Sugar configure 0.82.8
-generated by GNU Autoconf 2.61
+Sugar configure 0.83.4
+generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1434,8 +1534,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Sugar $as_me 0.82.8, which was
-generated by GNU Autoconf 2.61. Invocation command line was
+It was created by Sugar $as_me 0.83.4, which was
+generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -1471,7 +1571,7 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
+ $as_echo "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -1506,7 +1606,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
@@ -1558,11 +1658,12 @@ _ASBOX
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
*) $as_unset $ac_var ;;
esac ;;
esac
@@ -1592,9 +1693,9 @@ _ASBOX
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- echo "$ac_var='\''$ac_val'\''"
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
@@ -1609,9 +1710,9 @@ _ASBOX
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- echo "$ac_var='\''$ac_val'\''"
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
@@ -1627,8 +1728,8 @@ _ASBOX
echo
fi
test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -1670,21 +1771,24 @@ _ACEOF
# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- set x "$CONFIG_SITE"
+ ac_site_file1=$CONFIG_SITE
elif test "x$prefix" != xNONE; then
- set x "$prefix/share/config.site" "$prefix/etc/config.site"
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
else
- set x "$ac_default_prefix/share/config.site" \
- "$ac_default_prefix/etc/config.site"
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
fi
-shift
-for ac_site_file
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
+ test "x$ac_site_file" = xNONE && continue
if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
@@ -1694,16 +1798,16 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -1717,29 +1821,38 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -1749,10 +1862,12 @@ echo "$as_me: current value: $ac_new_val" >&2;}
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1793,7 +1908,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-SUCROSE_VERSION="0.82.1"
+SUCROSE_VERSION="0.83.x"
am__api_version='1.10'
@@ -1815,8 +1930,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1842,11 +1957,12 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -1875,17 +1991,29 @@ case $as_dir/ in
# program-specific install script used by HP pwplus--don't use.
:
else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
fi
fi
done
done
;;
esac
+
done
IFS=$as_save_IFS
+rm -rf conftest.one conftest.two conftest.dir
fi
if test "${ac_cv_path_install+set}" = set; then
@@ -1898,8 +2026,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -1909,8 +2037,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
# Just in case
sleep 1
echo timestamp > conftest.file
@@ -1933,9 +2061,9 @@ if (
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+ { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1946,26 +2074,23 @@ then
# Ok.
:
else
- { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+ { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
+$as_echo "$as_me: error: newly created file is older than distributed files!
Check your system clock" >&2;}
{ (exit 1); exit 1; }; }
fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $. echo might interpret backslashes.
+# Double any \ or $.
# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
@@ -1976,15 +2101,15 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
- { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
-{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
if test "${ac_cv_path_mkdir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
@@ -2019,8 +2144,8 @@ fi
MKDIR_P="$ac_install_sh -d"
fi
fi
-{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-echo "${ECHO_T}$MKDIR_P" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
mkdir_p="$MKDIR_P"
case $mkdir_p in
@@ -2032,10 +2157,10 @@ for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AWK+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -2048,7 +2173,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2059,22 +2184,23 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
test -n "$AWK" && break
done
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
@@ -2091,12 +2217,12 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
SET_MAKE=
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -2115,8 +2241,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
am__isrc=' -I$(srcdir)'
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -2133,7 +2259,7 @@ fi
# Define the identity of the package.
PACKAGE='sugar'
- VERSION='0.82.8'
+ VERSION='0.83.4'
cat >>confdefs.h <<_ACEOF
@@ -2171,10 +2297,10 @@ if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
@@ -2187,7 +2313,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2198,11 +2324,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2211,10 +2337,10 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
@@ -2227,7 +2353,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2238,11 +2364,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -2250,12 +2376,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -2290,10 +2412,10 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PYTHON+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $PYTHON in
[\\/]* | ?:[\\/]*)
@@ -2308,7 +2430,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2320,11 +2442,11 @@ esac
fi
PYTHON=$ac_cv_path_PYTHON
if test -n "$PYTHON"; then
- { echo "$as_me:$LINENO: result: $PYTHON" >&5
-echo "${ECHO_T}$PYTHON" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2337,21 +2459,21 @@ test -n "$PYTHON" || PYTHON=":"
if test "$PYTHON" = :; then
- { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5
-echo "$as_me: error: no suitable Python interpreter found" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5
+$as_echo "$as_me: error: no suitable Python interpreter found" >&2;}
{ (exit 1); exit 1; }; }
else
- { echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5
-echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5
+$as_echo_n "checking for $am_display_PYTHON version... " >&6; }
if test "${am_cv_python_version+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"`
fi
-{ echo "$as_me:$LINENO: result: $am_cv_python_version" >&5
-echo "${ECHO_T}$am_cv_python_version" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_python_version" >&5
+$as_echo "$am_cv_python_version" >&6; }
PYTHON_VERSION=$am_cv_python_version
@@ -2362,30 +2484,30 @@ echo "${ECHO_T}$am_cv_python_version" >&6; }
- { echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5
-echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5
+$as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
if test "${am_cv_python_platform+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`
fi
-{ echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5
-echo "${ECHO_T}$am_cv_python_platform" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5
+$as_echo "$am_cv_python_platform" >&6; }
PYTHON_PLATFORM=$am_cv_python_platform
- { echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5
-echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5
+$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
if test "${am_cv_python_pythondir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
fi
-{ echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5
-echo "${ECHO_T}$am_cv_python_pythondir" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5
+$as_echo "$am_cv_python_pythondir" >&6; }
pythondir=$am_cv_python_pythondir
@@ -2393,16 +2515,16 @@ echo "${ECHO_T}$am_cv_python_pythondir" >&6; }
pkgpythondir=\${pythondir}/$PACKAGE
- { echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5
-echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5
+$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
if test "${am_cv_python_pyexecdir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`
fi
-{ echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5
-echo "${ECHO_T}$am_cv_python_pyexecdir" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5
+$as_echo "$am_cv_python_pyexecdir" >&6; }
pyexecdir=$am_cv_python_pyexecdir
@@ -2421,10 +2543,10 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
@@ -2439,7 +2561,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2451,11 +2573,11 @@ esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
- { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2464,10 +2586,10 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
@@ -2482,7 +2604,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2494,11 +2616,11 @@ esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
- { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
@@ -2506,12 +2628,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
@@ -2523,33 +2641,33 @@ fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.9.0
- { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
pkg_failed=no
-{ echo "$as_me:$LINENO: checking for SHELL" >&5
-echo $ECHO_N "checking for SHELL... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for SHELL" >&5
+$as_echo_n "checking for SHELL... " >&6; }
if test -n "$SHELL_CFLAGS"; then
pkg_cv_SHELL_CFLAGS="$SHELL_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pygtk-2.0 gtk+-2.0\"") >&5
- ($PKG_CONFIG --exists --print-errors "pygtk-2.0 gtk+-2.0") 2>&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pygtk-2.0 gtk+-2.0 gconf-2.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "pygtk-2.0 gtk+-2.0 gconf-2.0") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_SHELL_CFLAGS=`$PKG_CONFIG --cflags "pygtk-2.0 gtk+-2.0" 2>/dev/null`
+ pkg_cv_SHELL_CFLAGS=`$PKG_CONFIG --cflags "pygtk-2.0 gtk+-2.0 gconf-2.0" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -2560,12 +2678,12 @@ if test -n "$SHELL_LIBS"; then
pkg_cv_SHELL_LIBS="$SHELL_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pygtk-2.0 gtk+-2.0\"") >&5
- ($PKG_CONFIG --exists --print-errors "pygtk-2.0 gtk+-2.0") 2>&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pygtk-2.0 gtk+-2.0 gconf-2.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "pygtk-2.0 gtk+-2.0 gconf-2.0") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_SHELL_LIBS=`$PKG_CONFIG --libs "pygtk-2.0 gtk+-2.0" 2>/dev/null`
+ pkg_cv_SHELL_LIBS=`$PKG_CONFIG --libs "pygtk-2.0 gtk+-2.0 gconf-2.0" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -2583,14 +2701,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- SHELL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pygtk-2.0 gtk+-2.0" 2>&1`
+ SHELL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pygtk-2.0 gtk+-2.0 gconf-2.0" 2>&1`
else
- SHELL_PKG_ERRORS=`$PKG_CONFIG --print-errors "pygtk-2.0 gtk+-2.0" 2>&1`
+ SHELL_PKG_ERRORS=`$PKG_CONFIG --print-errors "pygtk-2.0 gtk+-2.0 gconf-2.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$SHELL_PKG_ERRORS" >&5
- { { echo "$as_me:$LINENO: error: Package requirements (pygtk-2.0 gtk+-2.0) were not met:
+ { { $as_echo "$as_me:$LINENO: error: Package requirements (pygtk-2.0 gtk+-2.0 gconf-2.0) were not met:
$SHELL_PKG_ERRORS
@@ -2601,7 +2719,7 @@ Alternatively, you may set the environment variables SHELL_CFLAGS
and SHELL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
-echo "$as_me: error: Package requirements (pygtk-2.0 gtk+-2.0) were not met:
+$as_echo "$as_me: error: Package requirements (pygtk-2.0 gtk+-2.0 gconf-2.0) were not met:
$SHELL_PKG_ERRORS
@@ -2614,7 +2732,9 @@ See the pkg-config man page for more details.
" >&2;}
{ (exit 1); exit 1; }; }
elif test $pkg_failed = untried; then
- { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
@@ -2624,7 +2744,7 @@ See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
+$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
@@ -2634,12 +2754,12 @@ See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
else
SHELL_CFLAGS=$pkg_cv_SHELL_CFLAGS
SHELL_LIBS=$pkg_cv_SHELL_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
:
fi
@@ -2647,6 +2767,20 @@ fi
#
ALL_LINGUAS="af am ar ay bg bn bn_IN ca de dz el en es fa fa_AF ff fr gu ha hi ht ig is it ja km ko mk ml mn mr mvo nb ne nl pa pap pis pl ps pt pt_BR qu ro ru rw sd si sl te th tpi tr ur vi yo zh_CN zh_TW"
GETTEXT_PACKAGE=sugar
+
+ { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+ # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval=$enable_nls; USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@@ -2659,8 +2793,8 @@ am__doit:
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
am__include="#"
am__quote=
_am_result=none
@@ -2687,8 +2821,8 @@ if test "$am__include" = "#"; then
fi
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
rm -f confinc confmf
# Check whether --enable-dependency-tracking was given.
@@ -2717,10 +2851,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2733,7 +2867,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2744,11 +2878,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2757,10 +2891,10 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2773,7 +2907,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2784,11 +2918,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -2796,12 +2930,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -2814,10 +2944,10 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2830,7 +2960,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2841,11 +2971,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2854,10 +2984,10 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2875,7 +3005,7 @@ do
continue
fi
ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2898,11 +3028,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2913,10 +3043,10 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2929,7 +3059,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2940,11 +3070,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2957,10 +3087,10 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2973,7 +3103,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2984,11 +3114,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -3000,12 +3130,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -3015,44 +3141,50 @@ fi
fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler --version >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (ac_try="$ac_compiler -v >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler -v >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (ac_try="$ac_compiler -V >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler -V >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
@@ -3071,27 +3203,22 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-#
-# List of possible output files, starting from the most likely.
-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
-# only as a last resort. b.out is created by i960 compilers.
-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
-#
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions. Remove them first so a
-# subsequent execution test works.
+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
ac_rmfiles=
for ac_file in $ac_files
do
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
* ) ac_rmfiles="$ac_rmfiles $ac_file";;
esac
done
@@ -3102,10 +3229,11 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
@@ -3116,7 +3244,7 @@ for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
@@ -3143,25 +3271,27 @@ else
ac_file=''
fi
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
+$as_echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+ { (exit 77); exit 77; }; }; }
fi
ac_exeext=$ac_cv_exeext
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
@@ -3170,49 +3300,53 @@ if test "$cross_compiling" != yes; then
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
+$as_echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
fi
fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
@@ -3221,31 +3355,33 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
break;;
* ) break;;
esac
done
else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
rm -f conftest$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -3268,40 +3404,43 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -3327,20 +3466,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
@@ -3350,15 +3490,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
@@ -3385,20 +3529,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
CFLAGS=""
@@ -3423,20 +3568,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_c_werror_flag=$ac_save_c_werror_flag
@@ -3462,20 +3608,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -3490,8 +3637,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -3507,10 +3654,10 @@ else
CFLAGS=
fi
fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
ac_save_CC=$CC
@@ -3581,20 +3728,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cc_c89=$ac_arg
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -3610,15 +3758,15 @@ fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
x)
- { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
+ { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
xno)
- { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
*)
CC="$CC $ac_cv_prog_cc_c89"
- { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
@@ -3630,10 +3778,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
depcc="$CC" am_compiler_list=
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
@@ -3721,8 +3869,8 @@ else
fi
fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
@@ -3738,10 +3886,11 @@ fi
+
case "$am__api_version" in
1.01234)
- { { echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5
-echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5
+$as_echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
{ (exit 1); exit 1; }; }
;;
*)
@@ -3749,18 +3898,144 @@ echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
esac
if test -n "0.33"; then
- { echo "$as_me:$LINENO: checking for intltool >= 0.33" >&5
-echo $ECHO_N "checking for intltool >= 0.33... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for intltool >= 0.33" >&5
+$as_echo_n "checking for intltool >= 0.33... " >&6; }
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.33 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
- INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
- INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
+ INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+ INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
- { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
-echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
+$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
- { { echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool 0.33 or later." >&5
-echo "$as_me: error: Your intltool is too old. You need intltool 0.33 or later." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool 0.33 or later." >&5
+$as_echo "$as_me: error: Your intltool is too old. You need intltool 0.33 or later." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Extract the first word of "intltool-update", so it can be a program name with args.
+set dummy intltool-update; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $INTLTOOL_UPDATE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
+if test -n "$INTLTOOL_UPDATE"; then
+ { $as_echo "$as_me:$LINENO: result: $INTLTOOL_UPDATE" >&5
+$as_echo "$INTLTOOL_UPDATE" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "intltool-merge", so it can be a program name with args.
+set dummy intltool-merge; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $INTLTOOL_MERGE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
+if test -n "$INTLTOOL_MERGE"; then
+ { $as_echo "$as_me:$LINENO: result: $INTLTOOL_MERGE" >&5
+$as_echo "$INTLTOOL_MERGE" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "intltool-extract", so it can be a program name with args.
+set dummy intltool-extract; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $INTLTOOL_EXTRACT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
+if test -n "$INTLTOOL_EXTRACT"; then
+ { $as_echo "$as_me:$LINENO: result: $INTLTOOL_EXTRACT" >&5
+$as_echo "$INTLTOOL_EXTRACT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+ { { $as_echo "$as_me:$LINENO: error: The intltool scripts were not found. Please install intltool." >&5
+$as_echo "$as_me: error: The intltool scripts were not found. Please install intltool." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -3807,10 +4082,10 @@ INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcar
# Check the gettext tools to make sure they are GNU
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $XGETTEXT in
[\\/]* | ?:[\\/]*)
@@ -3825,7 +4100,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3837,20 +4112,20 @@ esac
fi
XGETTEXT=$ac_cv_path_XGETTEXT
if test -n "$XGETTEXT"; then
- { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
# Extract the first word of "msgmerge", so it can be a program name with args.
set dummy msgmerge; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_MSGMERGE+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $MSGMERGE in
[\\/]* | ?:[\\/]*)
@@ -3865,7 +4140,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3877,20 +4152,20 @@ esac
fi
MSGMERGE=$ac_cv_path_MSGMERGE
if test -n "$MSGMERGE"; then
- { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
-echo "${ECHO_T}$MSGMERGE" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $MSGFMT in
[\\/]* | ?:[\\/]*)
@@ -3905,7 +4180,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3917,42 +4192,75 @@ esac
fi
MSGFMT=$ac_cv_path_MSGFMT
if test -n "$MSGFMT"; then
- { echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
- { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
-echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
{ (exit 1); exit 1; }; }
fi
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
- { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
-echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
{ (exit 1); exit 1; }; }
fi
-# Use the tools built into the package, not the ones that are installed.
-INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
-
-INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
-
-INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
-
-
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $INTLTOOL_PERL in
[\\/]* | ?:[\\/]*)
@@ -3967,7 +4275,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3979,33 +4287,33 @@ esac
fi
INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
if test -n "$INTLTOOL_PERL"; then
- { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
-echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
+$as_echo "$INTLTOOL_PERL" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test -z "$INTLTOOL_PERL"; then
- { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
-echo "$as_me: error: perl not found; required for intltool" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
+$as_echo "$as_me: error: perl not found; required for intltool" >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
- { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
-echo "$as_me: error: perl 5.x required for intltool" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
+$as_echo "$as_me: error: perl 5.x required for intltool" >&2;}
{ (exit 1); exit 1; }; }
fi
if test "x" != "xno-xml"; then
- { echo "$as_me:$LINENO: checking for XML::Parser" >&5
-echo $ECHO_N "checking for XML::Parser... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for XML::Parser" >&5
+$as_echo_n "checking for XML::Parser... " >&6; }
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
- { echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6; }
+ { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
else
- { { echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5
-echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5
+$as_echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -4038,29 +4346,32 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
DATADIRNAME=share
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
case $host in
*-*-solaris*)
- { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
-echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+$as_echo_n "checking for bind_textdomain_codeset... " >&6; }
if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4113,32 +4424,36 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_func_bind_textdomain_codeset=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_bind_textdomain_codeset=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
-echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; }
-if test $ac_cv_func_bind_textdomain_codeset = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+$as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; }
+if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then
DATADIRNAME=share
else
DATADIRNAME=lib
@@ -4151,6 +4466,7 @@ fi
esac
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
@@ -4159,10 +4475,6 @@ fi
-ac_config_commands="$ac_config_commands intltool"
-
-
-
cat >>confdefs.h <<_ACEOF
@@ -4174,15 +4486,15 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -4214,20 +4526,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
@@ -4251,13 +4564,14 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
@@ -4265,7 +4579,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
@@ -4290,8 +4604,8 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
@@ -4319,20 +4633,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
@@ -4356,13 +4671,14 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
@@ -4370,7 +4686,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
@@ -4386,11 +4702,13 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { (exit 1); exit 1; }; }; }
fi
ac_ext=c
@@ -4400,42 +4718,37 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
+ if test -z "$GREP"; then
ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
- # Check for GNU ac_path_GREP and select it if it is found.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ $as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- echo 'GREP' >> "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac_count=`expr $ac_count + 1`
@@ -4450,74 +4763,60 @@ case `"$ac_path_GREP" --version 2>&1` in
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
-
- $ac_path_GREP_found && break 3
+ $ac_path_GREP_found && break 3
+ done
done
done
-
-done
IFS=$as_save_IFS
-
-
-fi
-
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ if test -z "$ac_cv_path_GREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
{ (exit 1); exit 1; }; }
-fi
-
+ fi
else
ac_cv_path_GREP=$GREP
fi
-
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
- # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+ if test -z "$EGREP"; then
ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
- # Check for GNU ac_path_EGREP and select it if it is found.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ $as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- echo 'EGREP' >> "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac_count=`expr $ac_count + 1`
@@ -4532,40 +4831,31 @@ case `"$ac_path_EGREP" --version 2>&1` in
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
-
- $ac_path_EGREP_found && break 3
+ $ac_path_EGREP_found && break 3
+ done
done
done
-
-done
IFS=$as_save_IFS
-
-
-fi
-
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ if test -z "$ac_cv_path_EGREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
{ (exit 1); exit 1; }; }
-fi
-
+ fi
else
ac_cv_path_EGREP=$EGREP
fi
-
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4592,20 +4882,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_header_stdc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
@@ -4697,37 +4988,40 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
+rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -4749,11 +5043,11 @@ fi
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4771,20 +5065,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Header=no"
@@ -4792,12 +5087,15 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -4809,20 +5107,21 @@ done
for ac_header in locale.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -4838,32 +5137,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -4877,69 +5177,73 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -4947,10 +5251,10 @@ fi
done
if test $ac_cv_header_locale_h = yes; then
- { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
if test "${am_cv_val_LC_MESSAGES+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4973,31 +5277,35 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
am_cv_val_LC_MESSAGES=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
am_cv_val_LC_MESSAGES=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
if test $am_cv_val_LC_MESSAGES = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -5016,17 +5324,17 @@ _ACEOF
INTLLIBS=
if test "${ac_cv_header_libintl_h+set}" = set; then
- { echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
+$as_echo_n "checking for libintl.h... " >&6; }
if test "${ac_cv_header_libintl_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+$as_echo "$ac_cv_header_libintl_h" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking libintl.h usability" >&5
-echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
+$as_echo_n "checking libintl.h usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -5042,32 +5350,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking libintl.h presence" >&5
-echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
+$as_echo_n "checking libintl.h presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -5081,76 +5390,77 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
;;
esac
-{ echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
+$as_echo_n "checking for libintl.h... " >&6; }
if test "${ac_cv_header_libintl_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_cv_header_libintl_h=$ac_header_preproc
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+$as_echo "$ac_cv_header_libintl_h" >&6; }
fi
-if test $ac_cv_header_libintl_h = yes; then
+if test "x$ac_cv_header_libintl_h" = x""yes; then
gt_cv_func_dgettext_libintl="no"
libintl_extra_libs=""
#
# First check in libc
#
- { echo "$as_me:$LINENO: checking for ngettext in libc" >&5
-echo $ECHO_N "checking for ngettext in libc... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for ngettext in libc" >&5
+$as_echo_n "checking for ngettext in libc... " >&6; }
if test "${gt_cv_func_ngettext_libc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5175,38 +5485,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
gt_cv_func_ngettext_libc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
gt_cv_func_ngettext_libc=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5
-echo "${ECHO_T}$gt_cv_func_ngettext_libc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5
+$as_echo "$gt_cv_func_ngettext_libc" >&6; }
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
- { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
-echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5
+$as_echo_n "checking for dgettext in libc... " >&6; }
if test "${gt_cv_func_dgettext_libc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5231,43 +5545,47 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
gt_cv_func_dgettext_libc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
gt_cv_func_dgettext_libc=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
-echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
+$as_echo "$gt_cv_func_dgettext_libc" >&6; }
fi
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
for ac_func in bind_textdomain_codeset
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5320,35 +5638,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -5363,10 +5688,10 @@ done
|| test "$gt_cv_func_ngettext_libc" != "yes" \
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
- { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
-echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
+$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
@@ -5398,37 +5723,41 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_intl_bindtextdomain=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_bindtextdomain=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
-if test $ac_cv_lib_intl_bindtextdomain = yes; then
- { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
-echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
+$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
+if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then
+ { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
if test "${ac_cv_lib_intl_ngettext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
@@ -5460,37 +5789,41 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_intl_ngettext=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_ngettext=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; }
-if test $ac_cv_lib_intl_ngettext = yes; then
- { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
-echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = x""yes; then
+ { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
+$as_echo_n "checking for dgettext in -lintl... " >&6; }
if test "${ac_cv_lib_intl_dgettext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
@@ -5522,33 +5855,37 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_intl_dgettext=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_dgettext=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
-if test $ac_cv_lib_intl_dgettext = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
+$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
+if test "x$ac_cv_lib_intl_dgettext" = x""yes; then
gt_cv_func_dgettext_libintl=yes
fi
@@ -5558,14 +5895,14 @@ fi
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
- { echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5
-echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6; }
- { echo "$as_me:$LINENO: result: " >&5
-echo "${ECHO_T}" >&6; }
- { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
-echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5
+$as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
if test "${ac_cv_lib_intl_ngettext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl -liconv $LIBS"
@@ -5597,37 +5934,41 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_intl_ngettext=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_ngettext=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; }
-if test $ac_cv_lib_intl_ngettext = yes; then
- { echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5
-echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = x""yes; then
+ { $as_echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5
+$as_echo_n "checking for dcgettext in -lintl... " >&6; }
if test "${ac_cv_lib_intl_dcgettext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl -liconv $LIBS"
@@ -5659,33 +6000,37 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_lib_intl_dcgettext=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_dcgettext=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6; }
-if test $ac_cv_lib_intl_dcgettext = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5
+$as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
+if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then
gt_cv_func_dgettext_libintl=yes
libintl_extra_libs=-liconv
else
@@ -5710,11 +6055,11 @@ fi
for ac_func in bind_textdomain_codeset
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5767,35 +6112,42 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -5831,10 +6183,10 @@ _ACEOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case "$MSGFMT" in
/*)
@@ -5858,11 +6210,11 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != "no"; then
- { echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "$MSGFMT" != "no"; then
glib_save_LIBS="$LIBS"
@@ -5870,11 +6222,11 @@ fi
for ac_func in dcgettext
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5927,43 +6279,50 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
MSGFMT_OPTS=
- { echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5
-echo $ECHO_N "checking if msgfmt accepts -c... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5
+$as_echo_n "checking if msgfmt accepts -c... " >&6; }
cat >conftest.foo <<_ACEOF
msgid ""
@@ -5977,25 +6336,25 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
_ACEOF
-if { (echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5
+if { ($as_echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5
($MSGFMT -c -o /dev/null conftest.foo) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- MSGFMT_OPTS=-c; { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ MSGFMT_OPTS=-c; { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
echo "$as_me: failed input was:" >&5
sed 's/^/| /' conftest.foo >&5
fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_GMSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $GMSGFMT in
[\\/]* | ?:[\\/]*)
@@ -6010,7 +6369,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6023,20 +6382,20 @@ esac
fi
GMSGFMT=$ac_cv_path_GMSGFMT
if test -n "$GMSGFMT"; then
- { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case "$XGETTEXT" in
/*)
@@ -6060,11 +6419,11 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
- { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
cat >conftest.$ac_ext <<_ACEOF
@@ -6089,30 +6448,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
CATOBJEXT=.gmo
DATADIRNAME=share
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
case $host in
*-*-solaris*)
- { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
-echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+$as_echo_n "checking for bind_textdomain_codeset... " >&6; }
if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -6165,32 +6527,36 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
ac_cv_func_bind_textdomain_codeset=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_bind_textdomain_codeset=no
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
-echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; }
-if test $ac_cv_func_bind_textdomain_codeset = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+$as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; }
+if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then
CATOBJEXT=.gmo
DATADIRNAME=share
else
@@ -6206,6 +6572,7 @@ fi
esac
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS="$glib_save_LIBS"
@@ -6231,8 +6598,8 @@ _ACEOF
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
- { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
-echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
+ { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
XGETTEXT=":"
fi
fi
@@ -6264,8 +6631,8 @@ echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
- { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
-echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+$as_echo_n "checking for catalogs to be installed... " >&6; }
NEW_LINGUAS=
for presentlang in $ALL_LINGUAS; do
useit=no
@@ -6289,8 +6656,8 @@ echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
fi
done
LINGUAS=$NEW_LINGUAS
- { echo "$as_me:$LINENO: result: $LINGUAS" >&5
-echo "${ECHO_T}$LINGUAS" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5
+$as_echo "$LINGUAS" >&6; }
fi
if test -n "$LINGUAS"; then
@@ -6338,10 +6705,114 @@ else
fi
-ac_config_files="$ac_config_files bin/sugar bin/sugar-control-panel bin/sugar-emulator bin/sugar-shell bin/sugar-shell-service service/config.py src/config.py"
+# Verify that gconftool is installed
+#
+# Extract the first word of "gconftool-2", so it can be a program name with args.
+set dummy gconftool-2; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GCONFTOOL+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $GCONFTOOL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GCONFTOOL="$GCONFTOOL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GCONFTOOL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GCONFTOOL" && ac_cv_path_GCONFTOOL="no"
+ ;;
+esac
+fi
+GCONFTOOL=$ac_cv_path_GCONFTOOL
+if test -n "$GCONFTOOL"; then
+ { $as_echo "$as_me:$LINENO: result: $GCONFTOOL" >&5
+$as_echo "$GCONFTOOL" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+if test "$GCONFTOOL" = no; then
+ { { $as_echo "$as_me:$LINENO: error: gconftool-2 executable not found in your path - should be installed with GConf" >&5
+$as_echo "$as_me: error: gconftool-2 executable not found in your path - should be installed with GConf" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+ if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
+ GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
+ else
+ GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
+ fi
+
+
+# Check whether --with-gconf-source was given.
+if test "${with_gconf_source+set}" = set; then
+ withval=$with_gconf_source; GCONF_SCHEMA_CONFIG_SOURCE="$withval"
+fi
+
+
+
+ { $as_echo "$as_me:$LINENO: result: Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&5
+$as_echo "Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&6; }
+
+ if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
+ GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
+ fi
+
+
+# Check whether --with-gconf-schema-file-dir was given.
+if test "${with_gconf_schema_file_dir+set}" = set; then
+ withval=$with_gconf_schema_file_dir; GCONF_SCHEMA_FILE_DIR="$withval"
+fi
-ac_config_files="$ac_config_files Makefile bin/Makefile data/Makefile data/icons/Makefile service/Makefile src/Makefile src/controlpanel/Makefile src/controlpanel/model/Makefile src/controlpanel/view/Makefile src/intro/Makefile src/hardware/Makefile src/view/Makefile src/view/devices/Makefile src/view/devices/network/Makefile src/view/frame/Makefile src/view/home/Makefile src/model/Makefile src/model/devices/Makefile src/model/devices/network/Makefile po/Makefile.in"
+
+ { $as_echo "$as_me:$LINENO: result: Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&5
+$as_echo "Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&6; }
+
+ # Check whether --enable-schemas-install was given.
+if test "${enable_schemas_install+set}" = set; then
+ enableval=$enable_schemas_install; case ${enableval} in
+ yes|no) ;;
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-schemas-install" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --enable-schemas-install" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+fi
+
+ if test "$enable_schemas_install" != no; then
+ GCONF_SCHEMAS_INSTALL_TRUE=
+ GCONF_SCHEMAS_INSTALL_FALSE='#'
+else
+ GCONF_SCHEMAS_INSTALL_TRUE='#'
+ GCONF_SCHEMAS_INSTALL_FALSE=
+fi
+
+
+
+
+ac_config_files="$ac_config_files bin/sugar src/jarabe/config.py"
+
+
+ac_config_files="$ac_config_files Makefile bin/Makefile data/Makefile data/icons/Makefile extensions/Makefile extensions/cpsection/Makefile extensions/cpsection/aboutme/Makefile extensions/cpsection/aboutxo/Makefile extensions/cpsection/datetime/Makefile extensions/cpsection/frame/Makefile extensions/cpsection/language/Makefile extensions/cpsection/network/Makefile extensions/cpsection/power/Makefile extensions/deviceicon/Makefile extensions/globalkey/Makefile src/Makefile src/jarabe/Makefile src/jarabe/controlpanel/Makefile src/jarabe/desktop/Makefile src/jarabe/frame/Makefile src/jarabe/intro/Makefile src/jarabe/journal/Makefile src/jarabe/view/Makefile src/jarabe/model/Makefile src/jarabe/util/Makefile src/jarabe/util/telepathy/Makefile po/Makefile.in"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -6370,11 +6841,12 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
*) $as_unset $ac_var ;;
esac ;;
esac
@@ -6407,12 +6879,12 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
test "x$cache_file" != "x/dev/null" &&
- { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
cat confcache >$cache_file
else
- { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -6429,6 +6901,12 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# take arguments), then branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
t clear
:clear
s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
@@ -6458,7 +6936,7 @@ ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`echo "$ac_i" | sed "$ac_script"`
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -6470,16 +6948,16 @@ LTLIBOBJS=$ac_ltlibobjs
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
+$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -6488,19 +6966,27 @@ fi
if test -z "${ENABLE_UPDATE_MIMEDB_TRUE}" && test -z "${ENABLE_UPDATE_MIMEDB_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"ENABLE_UPDATE_MIMEDB\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_UPDATE_MIMEDB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"ENABLE_UPDATE_MIMEDB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"ENABLE_UPDATE_MIMEDB\" was never defined.
+$as_echo "$as_me: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -6513,7 +6999,7 @@ ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
@@ -6523,7 +7009,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -6545,17 +7031,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
else
- PATH_SEPARATOR=:
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
fi
- rm -f conf$$.sh
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
# Support unset when possible.
@@ -6571,8 +7085,6 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
-as_nl='
-'
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
@@ -6595,7 +7107,7 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
{ (exit 1); exit 1; }
fi
@@ -6608,17 +7120,10 @@ PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -6640,7 +7145,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -6691,7 +7196,7 @@ $as_unset CDPATH
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
@@ -6719,7 +7224,6 @@ case `echo -n x` in
*)
ECHO_N='-n';;
esac
-
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
@@ -6732,19 +7236,22 @@ if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
+ fi
else
as_ln_s='cp -p'
fi
@@ -6769,10 +7276,10 @@ else
as_test_x='
eval sh -c '\''
if test -d "$1"; then
- test -d "$1/.";
+ test -d "$1/.";
else
case $1 in
- -*)set "./$1";;
+ -*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
???[sx]*):;;*)false;;esac;fi
@@ -6794,8 +7301,8 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Sugar $as_me 0.82.8, which was
-generated by GNU Autoconf 2.61. Invocation command line was
+This file was extended by Sugar $as_me 0.83.4, which was
+generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -6808,27 +7315,34 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_commands="$ac_config_commands"
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [FILE]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
- -q, --quiet do not print progress messages
+ -q, --quiet, --silent
+ do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
Configuration files:
$config_files
@@ -6839,13 +7353,13 @@ $config_commands
Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-Sugar config.status 0.82.8
-configured by $0, generated by GNU Autoconf 2.61,
- with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+Sugar config.status 0.83.4
+configured by $0, generated by GNU Autoconf 2.63,
+ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2008 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -6853,11 +7367,12 @@ ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
@@ -6879,21 +7394,24 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- echo "$ac_cs_version"; exit ;;
+ $as_echo "$ac_cs_version"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
ac_need_defaults=false;;
--he | --h | --help | --hel | -h )
- echo "$ac_cs_usage"; exit ;;
+ $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) { echo "$as_me: error: unrecognized option: $1
+ -*) { $as_echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; } ;;
@@ -6912,78 +7430,78 @@ if $ac_cs_silent; then
fi
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- CONFIG_SHELL=$SHELL
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
- exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ exec "\$@"
fi
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- echo "$ac_log"
+ $as_echo "$ac_log"
} >&5
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
-prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Handling of arguments.
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "intltool") CONFIG_COMMANDS="$CONFIG_COMMANDS intltool" ;;
"default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"bin/sugar") CONFIG_FILES="$CONFIG_FILES bin/sugar" ;;
- "bin/sugar-control-panel") CONFIG_FILES="$CONFIG_FILES bin/sugar-control-panel" ;;
- "bin/sugar-emulator") CONFIG_FILES="$CONFIG_FILES bin/sugar-emulator" ;;
- "bin/sugar-shell") CONFIG_FILES="$CONFIG_FILES bin/sugar-shell" ;;
- "bin/sugar-shell-service") CONFIG_FILES="$CONFIG_FILES bin/sugar-shell-service" ;;
- "service/config.py") CONFIG_FILES="$CONFIG_FILES service/config.py" ;;
- "src/config.py") CONFIG_FILES="$CONFIG_FILES src/config.py" ;;
+ "src/jarabe/config.py") CONFIG_FILES="$CONFIG_FILES src/jarabe/config.py" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
"data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;;
"data/icons/Makefile") CONFIG_FILES="$CONFIG_FILES data/icons/Makefile" ;;
- "service/Makefile") CONFIG_FILES="$CONFIG_FILES service/Makefile" ;;
+ "extensions/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/Makefile" ;;
+ "extensions/cpsection/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/cpsection/Makefile" ;;
+ "extensions/cpsection/aboutme/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/cpsection/aboutme/Makefile" ;;
+ "extensions/cpsection/aboutxo/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/cpsection/aboutxo/Makefile" ;;
+ "extensions/cpsection/datetime/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/cpsection/datetime/Makefile" ;;
+ "extensions/cpsection/frame/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/cpsection/frame/Makefile" ;;
+ "extensions/cpsection/language/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/cpsection/language/Makefile" ;;
+ "extensions/cpsection/network/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/cpsection/network/Makefile" ;;
+ "extensions/cpsection/power/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/cpsection/power/Makefile" ;;
+ "extensions/deviceicon/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/deviceicon/Makefile" ;;
+ "extensions/globalkey/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/globalkey/Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
- "src/controlpanel/Makefile") CONFIG_FILES="$CONFIG_FILES src/controlpanel/Makefile" ;;
- "src/controlpanel/model/Makefile") CONFIG_FILES="$CONFIG_FILES src/controlpanel/model/Makefile" ;;
- "src/controlpanel/view/Makefile") CONFIG_FILES="$CONFIG_FILES src/controlpanel/view/Makefile" ;;
- "src/intro/Makefile") CONFIG_FILES="$CONFIG_FILES src/intro/Makefile" ;;
- "src/hardware/Makefile") CONFIG_FILES="$CONFIG_FILES src/hardware/Makefile" ;;
- "src/view/Makefile") CONFIG_FILES="$CONFIG_FILES src/view/Makefile" ;;
- "src/view/devices/Makefile") CONFIG_FILES="$CONFIG_FILES src/view/devices/Makefile" ;;
- "src/view/devices/network/Makefile") CONFIG_FILES="$CONFIG_FILES src/view/devices/network/Makefile" ;;
- "src/view/frame/Makefile") CONFIG_FILES="$CONFIG_FILES src/view/frame/Makefile" ;;
- "src/view/home/Makefile") CONFIG_FILES="$CONFIG_FILES src/view/home/Makefile" ;;
- "src/model/Makefile") CONFIG_FILES="$CONFIG_FILES src/model/Makefile" ;;
- "src/model/devices/Makefile") CONFIG_FILES="$CONFIG_FILES src/model/devices/Makefile" ;;
- "src/model/devices/network/Makefile") CONFIG_FILES="$CONFIG_FILES src/model/devices/network/Makefile" ;;
+ "src/jarabe/Makefile") CONFIG_FILES="$CONFIG_FILES src/jarabe/Makefile" ;;
+ "src/jarabe/controlpanel/Makefile") CONFIG_FILES="$CONFIG_FILES src/jarabe/controlpanel/Makefile" ;;
+ "src/jarabe/desktop/Makefile") CONFIG_FILES="$CONFIG_FILES src/jarabe/desktop/Makefile" ;;
+ "src/jarabe/frame/Makefile") CONFIG_FILES="$CONFIG_FILES src/jarabe/frame/Makefile" ;;
+ "src/jarabe/intro/Makefile") CONFIG_FILES="$CONFIG_FILES src/jarabe/intro/Makefile" ;;
+ "src/jarabe/journal/Makefile") CONFIG_FILES="$CONFIG_FILES src/jarabe/journal/Makefile" ;;
+ "src/jarabe/view/Makefile") CONFIG_FILES="$CONFIG_FILES src/jarabe/view/Makefile" ;;
+ "src/jarabe/model/Makefile") CONFIG_FILES="$CONFIG_FILES src/jarabe/model/Makefile" ;;
+ "src/jarabe/util/Makefile") CONFIG_FILES="$CONFIG_FILES src/jarabe/util/Makefile" ;;
+ "src/jarabe/util/telepathy/Makefile") CONFIG_FILES="$CONFIG_FILES src/jarabe/util/telepathy/Makefile" ;;
"po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
"po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
done
@@ -7023,243 +7541,144 @@ $debug ||
(umask 077 && mkdir "$tmp")
} ||
{
- echo "$me: cannot create a temporary directory in ." >&2
+ $as_echo "$as_me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then
-_ACEOF
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-SUCROSE_VERSION!$SUCROSE_VERSION$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-am__isrc!$am__isrc$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-PYTHON!$PYTHON$ac_delim
-PYTHON_VERSION!$PYTHON_VERSION$ac_delim
-PYTHON_PREFIX!$PYTHON_PREFIX$ac_delim
-PYTHON_EXEC_PREFIX!$PYTHON_EXEC_PREFIX$ac_delim
-PYTHON_PLATFORM!$PYTHON_PLATFORM$ac_delim
-pythondir!$pythondir$ac_delim
-pkgpythondir!$pkgpythondir$ac_delim
-pyexecdir!$pyexecdir$ac_delim
-pkgpyexecdir!$pkgpyexecdir$ac_delim
-PKG_CONFIG!$PKG_CONFIG$ac_delim
-SHELL_CFLAGS!$SHELL_CFLAGS$ac_delim
-SHELL_LIBS!$SHELL_LIBS$ac_delim
-INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
-INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
-INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
-INTLTOOL_PROP_RULE!$INTLTOOL_PROP_RULE$ac_delim
-INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
-INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
-INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
-INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
-INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
-INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
-INTLTOOL_XAM_RULE!$INTLTOOL_XAM_RULE$ac_delim
-INTLTOOL_KBD_RULE!$INTLTOOL_KBD_RULE$ac_delim
-INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
-INTLTOOL_XML_NOMERGE_RULE!$INTLTOOL_XML_NOMERGE_RULE$ac_delim
-INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
-INTLTOOL_SCHEMAS_RULE!$INTLTOOL_SCHEMAS_RULE$ac_delim
-INTLTOOL_THEME_RULE!$INTLTOOL_THEME_RULE$ac_delim
-INTLTOOL_SERVICE_RULE!$INTLTOOL_SERVICE_RULE$ac_delim
-INTLTOOL_POLICY_RULE!$INTLTOOL_POLICY_RULE$ac_delim
-XGETTEXT!$XGETTEXT$ac_delim
-MSGMERGE!$MSGMERGE$ac_delim
-MSGFMT!$MSGFMT$ac_delim
-INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
-INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
-INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
-_ACEOF
-
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
- break
- elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
+ac_cr=' '
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
fi
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
_ACEOF
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
-ALL_LINGUAS!$ALL_LINGUAS$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-EXEEXT!$EXEEXT$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-DATADIRNAME!$DATADIRNAME$ac_delim
-GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
-CPP!$CPP$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-USE_NLS!$USE_NLS$ac_delim
-MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim
-GMSGFMT!$GMSGFMT$ac_delim
-CATALOGS!$CATALOGS$ac_delim
-CATOBJEXT!$CATOBJEXT$ac_delim
-GMOFILES!$GMOFILES$ac_delim
-INSTOBJEXT!$INSTOBJEXT$ac_delim
-INTLLIBS!$INTLLIBS$ac_delim
-PO_IN_DATADIR_TRUE!$PO_IN_DATADIR_TRUE$ac_delim
-PO_IN_DATADIR_FALSE!$PO_IN_DATADIR_FALSE$ac_delim
-POFILES!$POFILES$ac_delim
-POSUB!$POSUB$ac_delim
-MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
-ENABLE_UPDATE_MIMEDB_TRUE!$ENABLE_UPDATE_MIMEDB_TRUE$ac_delim
-ENABLE_UPDATE_MIMEDB_FALSE!$ENABLE_UPDATE_MIMEDB_FALSE$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
+ . ./conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 40; then
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
{ (exit 1); exit 1; }; }
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
done
+rm -f conf$$subs.sh
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
-fi
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+ { (exit 1); exit 1; }; }
_ACEOF
-
# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
@@ -7275,19 +7694,21 @@ s/^[^=]*=[ ]*$//
}'
fi
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"
-for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
do
case $ac_tag in
:[FHLC]) ac_mode=$ac_tag; continue;;
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
{ (exit 1); exit 1; }; };;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
@@ -7316,26 +7737,38 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
{ (exit 1); exit 1; }; };;
esac
- ac_file_inputs="$ac_file_inputs $ac_f"
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ ac_file_inputs="$ac_file_inputs '$ac_f'"
done
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
- configure_input="Generated from "`IFS=:
- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
+ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin";;
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
;;
esac
@@ -7345,7 +7778,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
+$as_echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -7371,7 +7804,7 @@ echo X"$ac_file" |
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -7380,7 +7813,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
+$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -7401,17 +7834,17 @@ echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -7456,12 +7889,13 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
esac
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
-case `sed -n '/datarootdir/ {
+ac_sed_dataroot='
+/datarootdir/ {
p
q
}
@@ -7470,13 +7904,14 @@ case `sed -n '/datarootdir/ {
/@infodir@/p
/@localedir@/p
/@mandir@/p
-' $ac_file_inputs` in
+'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
s&@datadir@&$datadir&g
s&@docdir@&$docdir&g
@@ -7490,15 +7925,16 @@ _ACEOF
# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
+s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
@@ -7509,26 +7945,33 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined." >&2;}
rm -f "$tmp/stdin"
case $ac_file in
- -) cat "$tmp/out"; rm -f "$tmp/out";;
- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
- esac
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
;;
- :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
+ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
;;
esac
@@ -7550,7 +7993,7 @@ $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
+$as_echo X"$mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -7594,7 +8037,7 @@ $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$file" : 'X\(//\)[^/]' \| \
X"$file" : 'X\(//\)$' \| \
X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
+$as_echo X"$file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -7620,7 +8063,7 @@ echo X"$file" |
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -7629,7 +8072,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
+$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -7650,35 +8093,23 @@ echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
;;
- "intltool":C)
-
-for file in intltool-extract intltool-merge intltool-update; do
- sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
- -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
- -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
- < ${ac_aux_dir}/${file}.in > ${file}.out
- if cmp -s ${file} ${file}.out 2>/dev/null; then
- rm -f ${file}.out
- else
- mv -f ${file}.out ${file}
- fi
- chmod ugo+x ${file}
- chmod u+w ${file}
-done
-
- ;;
"default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
esac ;;
"po/stamp-it":C)
+ if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" ; then
+ { { $as_echo "$as_me:$LINENO: error: po/Makefile.in.in was not created by intltoolize." >&5
+$as_echo "$as_me: error: po/Makefile.in.in was not created by intltoolize." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
>"po/stamp-it.tmp"
sed '/^#/d
@@ -7687,17 +8118,11 @@ done
'"s|^| $ac_top_srcdir/|" \
"$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
- if test ! -f "po/Makefile"; then
- { { echo "$as_me:$LINENO: error: po/Makefile is not ready." >&5
-echo "$as_me: error: po/Makefile is not ready." >&2;}
- { (exit 1); exit 1; }; }
- fi
- mv "po/Makefile" "po/Makefile.tmp"
sed '/^POTFILES =/,/[^\\]$/ {
/^POTFILES =/!d
r po/POTFILES
}
- ' "po/Makefile.tmp" >"po/Makefile"
+ ' "po/Makefile.in" >"po/Makefile"
rm -f "po/Makefile.tmp"
mv "po/stamp-it.tmp" "po/stamp-it"
;;
@@ -7711,6 +8136,11 @@ _ACEOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
+test $ac_write_fail = 0 ||
+ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
@@ -7732,4 +8162,8 @@ if test "$no_create" != yes; then
# would make configure fail if this is the last instruction.
$ac_cs_success || { (exit 1); exit 1; }
fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
diff --git a/configure.ac b/configure.ac
index 028b807..748657e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,18 +1,18 @@
-AC_INIT([Sugar],[0.82.8],[],[sugar])
+AC_INIT([Sugar],[0.83.4],[],[sugar])
AC_PREREQ([2.59])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([configure.ac])
-SUCROSE_VERSION="0.82.1"
+SUCROSE_VERSION="0.83.x"
AC_SUBST(SUCROSE_VERSION)
AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2 no-dist-gzip])
AM_PATH_PYTHON
-PKG_CHECK_MODULES(SHELL, pygtk-2.0 gtk+-2.0)
+PKG_CHECK_MODULES(SHELL, pygtk-2.0 gtk+-2.0 gconf-2.0)
# Setup GETTEXT
#
@@ -29,14 +29,20 @@ AC_ARG_ENABLE(update-mimedb,
enable_update_mimedb=yes)
AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)
+# Verify that gconftool is installed
+#
+AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
+
+if test "$GCONFTOOL" = no; then
+ AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
+fi
+
+AM_GCONF_SOURCE_2
+
+
AC_CONFIG_FILES([
bin/sugar
-bin/sugar-control-panel
-bin/sugar-emulator
-bin/sugar-shell
-bin/sugar-shell-service
-service/config.py
-src/config.py
+src/jarabe/config.py
])
AC_OUTPUT([
@@ -44,20 +50,27 @@ Makefile
bin/Makefile
data/Makefile
data/icons/Makefile
-service/Makefile
+extensions/Makefile
+extensions/cpsection/Makefile
+extensions/cpsection/aboutme/Makefile
+extensions/cpsection/aboutxo/Makefile
+extensions/cpsection/datetime/Makefile
+extensions/cpsection/frame/Makefile
+extensions/cpsection/language/Makefile
+extensions/cpsection/network/Makefile
+extensions/cpsection/power/Makefile
+extensions/deviceicon/Makefile
+extensions/globalkey/Makefile
src/Makefile
-src/controlpanel/Makefile
-src/controlpanel/model/Makefile
-src/controlpanel/view/Makefile
-src/intro/Makefile
-src/hardware/Makefile
-src/view/Makefile
-src/view/devices/Makefile
-src/view/devices/network/Makefile
-src/view/frame/Makefile
-src/view/home/Makefile
-src/model/Makefile
-src/model/devices/Makefile
-src/model/devices/network/Makefile
+src/jarabe/Makefile
+src/jarabe/controlpanel/Makefile
+src/jarabe/desktop/Makefile
+src/jarabe/frame/Makefile
+src/jarabe/intro/Makefile
+src/jarabe/journal/Makefile
+src/jarabe/view/Makefile
+src/jarabe/model/Makefile
+src/jarabe/util/Makefile
+src/jarabe/util/telepathy/Makefile
po/Makefile.in
])
diff --git a/data/Makefile.am b/data/Makefile.am
index cdf9dc5..585f071 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,12 +1,12 @@
SUBDIRS = icons
-sugar.gtkrc: gtkrc.em
- $(srcdir)/em.py -D theme=\'sugar\' $(srcdir)/gtkrc.em > \
- $(top_builddir)/data/sugar.gtkrc
+sugar-72.gtkrc: gtkrc.em
+ $(srcdir)/em.py -D scaling=\'72\' $(srcdir)/gtkrc.em > \
+ $(top_builddir)/data/sugar-72.gtkrc
-sugar-xo.gtkrc: gtkrc.em
- $(srcdir)/em.py -D theme=\'sugar-xo\' $(srcdir)/gtkrc.em > \
- $(top_builddir)/data/sugar-xo.gtkrc
+sugar-100.gtkrc: gtkrc.em
+ $(srcdir)/em.py -D scaling=\'100\' $(srcdir)/gtkrc.em > \
+ $(top_builddir)/data/sugar-100.gtkrc
sugardir = $(pkgdatadir)/data
sugar_DATA = \
@@ -16,8 +16,8 @@ sugar_DATA = \
$(GTKRC_FILES)
GTKRC_FILES = \
- sugar.gtkrc \
- sugar-xo.gtkrc
+ sugar-72.gtkrc \
+ sugar-100.gtkrc
xsessionsdir = $(datadir)/xsessions
xsessions_DATA = sugar.desktop
@@ -29,6 +29,9 @@ mime_xml_files = $(mime_xml_in_files:.xml.in=.xml)
mimedir = $(datadir)/mime/packages
mime_DATA = $(mime_xml_files)
+nmservicedir = $(sysconfdir)/dbus-1/system.d/
+nmservice_DATA = nm-user-settings.conf
+
install-data-hook:
if ENABLE_UPDATE_MIMEDB
if [ -z "$$DESTDIR" ]; then \
@@ -43,5 +46,16 @@ if ENABLE_UPDATE_MIMEDB
fi
endif
-EXTRA_DIST = $(sugar_DATA) $(xsessions_DATA) $(mime_xml_in_files) em.py gtkrc.em
-CLEANFILES = $(GTKRC_FILES) $(mime_xml_files)
+@INTLTOOL_SCHEMAS_RULE@
+
+schemadir = $(GCONF_SCHEMA_FILE_DIR)
+schema_in_files = sugar.schemas.in
+schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+
+install-data-local: $(schema_DATA)
+if GCONF_SCHEMAS_INSTALL
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule sugar.schemas 2>&1 > /dev/null
+endif
+
+EXTRA_DIST = $(sugar_DATA) $(xsessions_DATA) $(nmservice_DATA) $(mime_xml_in_files) em.py gtkrc.em $(schema_in_files)
+CLEANFILES = $(GTKRC_FILES) $(mime_xml_files) $(schema_DATA)
diff --git a/data/Makefile.in b/data/Makefile.in
index dcbb82f..2b15d2e 100644
--- a/data/Makefile.in
+++ b/data/Makefile.in
@@ -53,12 +53,16 @@ am__vpath_adj = case $$p in \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(mimedir)" "$(DESTDIR)$(sugardir)" \
+am__installdirs = "$(DESTDIR)$(mimedir)" "$(DESTDIR)$(nmservicedir)" \
+ "$(DESTDIR)$(schemadir)" "$(DESTDIR)$(sugardir)" \
"$(DESTDIR)$(xsessionsdir)"
mimeDATA_INSTALL = $(INSTALL_DATA)
+nmserviceDATA_INSTALL = $(INSTALL_DATA)
+schemaDATA_INSTALL = $(INSTALL_DATA)
sugarDATA_INSTALL = $(INSTALL_DATA)
xsessionsDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(mime_DATA) $(sugar_DATA) $(xsessions_DATA)
+DATA = $(mime_DATA) $(nmservice_DATA) $(schema_DATA) $(sugar_DATA) \
+ $(xsessions_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
@@ -88,6 +92,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -202,6 +209,7 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = icons
@@ -213,8 +221,8 @@ sugar_DATA = \
$(GTKRC_FILES)
GTKRC_FILES = \
- sugar.gtkrc \
- sugar-xo.gtkrc
+ sugar-72.gtkrc \
+ sugar-100.gtkrc
xsessionsdir = $(datadir)/xsessions
xsessions_DATA = sugar.desktop
@@ -222,8 +230,13 @@ mime_xml_in_files = sugar.xml.in
mime_xml_files = $(mime_xml_in_files:.xml.in=.xml)
mimedir = $(datadir)/mime/packages
mime_DATA = $(mime_xml_files)
-EXTRA_DIST = $(sugar_DATA) $(xsessions_DATA) $(mime_xml_in_files) em.py gtkrc.em
-CLEANFILES = $(GTKRC_FILES) $(mime_xml_files)
+nmservicedir = $(sysconfdir)/dbus-1/system.d/
+nmservice_DATA = nm-user-settings.conf
+schemadir = $(GCONF_SCHEMA_FILE_DIR)
+schema_in_files = sugar.schemas.in
+schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+EXTRA_DIST = $(sugar_DATA) $(xsessions_DATA) $(nmservice_DATA) $(mime_xml_in_files) em.py gtkrc.em $(schema_in_files)
+CLEANFILES = $(GTKRC_FILES) $(mime_xml_files) $(schema_DATA)
all: all-recursive
.SUFFIXES:
@@ -273,6 +286,40 @@ uninstall-mimeDATA:
echo " rm -f '$(DESTDIR)$(mimedir)/$$f'"; \
rm -f "$(DESTDIR)$(mimedir)/$$f"; \
done
+install-nmserviceDATA: $(nmservice_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(nmservicedir)" || $(MKDIR_P) "$(DESTDIR)$(nmservicedir)"
+ @list='$(nmservice_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(nmserviceDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(nmservicedir)/$$f'"; \
+ $(nmserviceDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(nmservicedir)/$$f"; \
+ done
+
+uninstall-nmserviceDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nmservice_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(nmservicedir)/$$f'"; \
+ rm -f "$(DESTDIR)$(nmservicedir)/$$f"; \
+ done
+install-schemaDATA: $(schema_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(schemadir)" || $(MKDIR_P) "$(DESTDIR)$(schemadir)"
+ @list='$(schema_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(schemaDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(schemadir)/$$f'"; \
+ $(schemaDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(schemadir)/$$f"; \
+ done
+
+uninstall-schemaDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(schema_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(schemadir)/$$f'"; \
+ rm -f "$(DESTDIR)$(schemadir)/$$f"; \
+ done
install-sugarDATA: $(sugar_DATA)
@$(NORMAL_INSTALL)
test -z "$(sugardir)" || $(MKDIR_P) "$(DESTDIR)$(sugardir)"
@@ -486,7 +533,7 @@ check: check-recursive
all-am: Makefile $(DATA)
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(mimedir)" "$(DESTDIR)$(sugardir)" "$(DESTDIR)$(xsessionsdir)"; do \
+ for dir in "$(DESTDIR)$(mimedir)" "$(DESTDIR)$(nmservicedir)" "$(DESTDIR)$(schemadir)" "$(DESTDIR)$(sugardir)" "$(DESTDIR)$(xsessionsdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
@@ -532,7 +579,8 @@ info: info-recursive
info-am:
-install-data-am: install-mimeDATA install-sugarDATA \
+install-data-am: install-data-local install-mimeDATA \
+ install-nmserviceDATA install-schemaDATA install-sugarDATA \
install-xsessionsDATA
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
@@ -569,7 +617,8 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-mimeDATA uninstall-sugarDATA \
+uninstall-am: uninstall-mimeDATA uninstall-nmserviceDATA \
+ uninstall-schemaDATA uninstall-sugarDATA \
uninstall-xsessionsDATA
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
@@ -582,24 +631,27 @@ uninstall-am: uninstall-mimeDATA uninstall-sugarDATA \
ctags-recursive distclean distclean-generic distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-data-hook \
- install-dvi install-dvi-am install-exec install-exec-am \
- install-html install-html-am install-info install-info-am \
- install-man install-mimeDATA install-pdf install-pdf-am \
- install-ps install-ps-am install-strip install-sugarDATA \
- install-xsessionsDATA installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am uninstall-hook \
- uninstall-mimeDATA uninstall-sugarDATA uninstall-xsessionsDATA
-
-
-sugar.gtkrc: gtkrc.em
- $(srcdir)/em.py -D theme=\'sugar\' $(srcdir)/gtkrc.em > \
- $(top_builddir)/data/sugar.gtkrc
-
-sugar-xo.gtkrc: gtkrc.em
- $(srcdir)/em.py -D theme=\'sugar-xo\' $(srcdir)/gtkrc.em > \
- $(top_builddir)/data/sugar-xo.gtkrc
+ install-data-local install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-mimeDATA \
+ install-nmserviceDATA install-pdf install-pdf-am install-ps \
+ install-ps-am install-schemaDATA install-strip \
+ install-sugarDATA install-xsessionsDATA installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-hook uninstall-mimeDATA uninstall-nmserviceDATA \
+ uninstall-schemaDATA uninstall-sugarDATA \
+ uninstall-xsessionsDATA
+
+
+sugar-72.gtkrc: gtkrc.em
+ $(srcdir)/em.py -D scaling=\'72\' $(srcdir)/gtkrc.em > \
+ $(top_builddir)/data/sugar-72.gtkrc
+
+sugar-100.gtkrc: gtkrc.em
+ $(srcdir)/em.py -D scaling=\'100\' $(srcdir)/gtkrc.em > \
+ $(top_builddir)/data/sugar-100.gtkrc
@INTLTOOL_XML_RULE@
install-data-hook:
@@ -611,6 +663,11 @@ uninstall-hook:
@ENABLE_UPDATE_MIMEDB_TRUE@ if [ -z "$$DESTDIR" ]; then \
@ENABLE_UPDATE_MIMEDB_TRUE@ update-mime-database "$(datadir)/mime"; \
@ENABLE_UPDATE_MIMEDB_TRUE@ fi
+
+@INTLTOOL_SCHEMAS_RULE@
+
+install-data-local: $(schema_DATA)
+@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule sugar.schemas 2>&1 > /dev/null
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/data/activities.defaults b/data/activities.defaults
index fe229a1..b726355 100644
--- a/data/activities.defaults
+++ b/data/activities.defaults
@@ -1,19 +1,30 @@
# Activities to be automatically added to the ring after an upgrade
-org.laptop.Chat
-org.laptop.WebActivity
+com.garycmartin.Moon
+com.jotaro.ImplodeActivity
+com.laptop.Ruler
+edu.mit.media.ScratchActivity
org.laptop.AbiWordActivity
-org.laptop.RecordActivity
-org.laptop.Oficina
-org.laptop.TamTamMini
-org.vpri.EtoysActivity
-org.laptop.TurtleArtActivity
-org.laptop.Pippy
+org.laptop.AcousticMeasure
+org.laptop.Analyze
org.laptop.Calculate
-org.laptop.Terminal
+org.laptop.Chat
+org.laptop.HelpActivity
+org.laptop.Log
org.laptop.MeasureActivity
-org.laptop.AcousticMeasure
org.laptop.Memorize
-org.laptop.TamTamJam
+org.laptop.Oficina
+org.laptop.Pippy
+org.laptop.RecordActivity
org.laptop.TamTamEdit
+org.laptop.TamTamJam
+org.laptop.TamTamMini
org.laptop.TamTamSynthLab
+org.laptop.Terminal
+org.laptop.TurtleArtActivity
+org.laptop.WebActivity
+org.laptop.WikipediaActivityEN
+org.laptop.sugar.ReadActivity
+org.vpri.EtoysActivity
+vu.lux.olpc.Maze
+vu.lux.olpc.Speak
diff --git a/data/gtkrc.em b/data/gtkrc.em
index a19b519..f355141 100644
--- a/data/gtkrc.em
+++ b/data/gtkrc.em
@@ -1,14 +1,15 @@
@{
-if theme == 'sugar':
+if scaling == '72':
font_name = 'Sans Serif 10'
icon_sizes = 'gtk-large-toolbar=40,40'
else:
font_name = 'Sans Serif 7'
icon_sizes = 'gtk-large-toolbar=55,55'
}@
-gtk-theme-name = "@theme"
+gtk-theme-name = "sugar-@scaling"
gtk-icon-theme-name = "sugar"
gtk-font-name = "@font_name"
gtk-cursor-theme-name = "sugar"
gtk-toolbar-style = GTK_TOOLBAR_ICONS
gtk-icon-sizes = "@icon_sizes"
+gtk-cursor-blink-timeout = 3
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index 8209ca3..ac26247 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -1,6 +1,7 @@
sugardir = $(pkgdatadir)/data/icons
sugar_DATA = \
+ activity-journal.svg \
module-about_me.svg \
module-about_my_xo.svg \
module-date_and_time.svg \
diff --git a/data/icons/Makefile.in b/data/icons/Makefile.in
index bb9dcda..fde690e 100644
--- a/data/icons/Makefile.in
+++ b/data/icons/Makefile.in
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,10 +190,12 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
sugardir = $(pkgdatadir)/data/icons
sugar_DATA = \
+ activity-journal.svg \
module-about_me.svg \
module-about_my_xo.svg \
module-date_and_time.svg \
diff --git a/data/icons/activity-journal.svg b/data/icons/activity-journal.svg
new file mode 100644
index 0000000..1ae35db
--- /dev/null
+++ b/data/icons/activity-journal.svg
@@ -0,0 +1,11 @@
+<?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 "#666666">
+ <!ENTITY fill_color "#ffffff">
+]><svg enable-background="new 0 0 55 55" height="55px" id="Layer_1" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"><g display="block" id="activity-journal">
+ <path d="M45.866,44.669 c0,2.511-1.528,4.331-4.332,4.331H12.077V6h29.458c2.15,0,4.332,2.154,4.332,4.33L45.866,44.669L45.866,44.669z" fill="&fill_color;" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5"/>
+
+ <line fill="none" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5" x1="21.341" x2="21.341" y1="6.121" y2="48.881"/>
+ <path d="M7.384,14.464 c0,0,2.084,0.695,4.17,0.695c2.086,0,4.173-0.695,4.173-0.695" fill="none" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5"/>
+ <path d="M7.384,28.021 c0,0,1.912,0.695,4.345,0.695s3.999-0.695,3.999-0.695" fill="none" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5"/>
+ <path d="M7.384,41.232 c0,0,1.736,0.695,4.518,0.695c2.781,0,3.825-0.695,3.825-0.695" fill="none" stroke="&stroke_color;" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5"/>
+</g></svg> \ No newline at end of file
diff --git a/data/mime.defaults b/data/mime.defaults
index 1cb2687..4400803 100644
--- a/data/mime.defaults
+++ b/data/mime.defaults
@@ -9,9 +9,9 @@ text/x-xml-abiword org.laptop.AbiWordActivity
application/msword org.laptop.AbiWordActivity
application/rtf org.laptop.AbiWordActivity
-image/png org.laptop.WebActivity
-image/gif org.laptop.WebActivity
-image/jpeg org.laptop.WebActivity
+image/png org.laptop.ImageViewerActivity
+image/gif org.laptop.ImageViewerActivity
+image/jpeg org.laptop.ImageViewerActivity
text/html org.laptop.WebActivity
application/xhtml+xml org.laptop.WebActivity
application/xml org.laptop.WebActivity
diff --git a/data/nm-user-settings.conf b/data/nm-user-settings.conf
new file mode 100644
index 0000000..af7c642
--- /dev/null
+++ b/data/nm-user-settings.conf
@@ -0,0 +1,34 @@
+<!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <policy user="root">
+ <allow own="org.freedesktop.NetworkManagerUserSettings"/>
+
+ <allow send_destination="org.freedesktop.NetworkManagerUserSettings"/>
+ <allow send_interface="org.freedesktop.NetworkManagerSettings"/>
+
+ <!-- Only root can get secrets -->
+ <allow send_interface="org.freedesktop.NetworkManagerSettings.Secrets"/>
+ </policy>
+ <policy at_console="true">
+ <allow own="org.freedesktop.NetworkManagerUserSettings"/>
+
+ <allow send_destination="org.freedesktop.NetworkManagerUserSettings"/>
+ <allow send_interface="org.freedesktop.NetworkManagerSettings"/>
+
+ <!-- Only root can get secrets -->
+ <deny send_interface="org.freedesktop.NetworkManagerSettings.Secrets"/>
+ </policy>
+ <policy context="default">
+ <deny own="org.freedesktop.NetworkManagerUserSettings"/>
+
+ <allow send_destination="org.freedesktop.NetworkManagerUserSettings"/>
+ <allow send_interface="org.freedesktop.NetworkManagerSettings"/>
+ <!-- Only root can get secrets -->
+ <deny send_interface="org.freedesktop.NetworkManagerSettings.Secrets"/>
+ </policy>
+
+ <limit name="max_replies_per_connection">512</limit>
+</busconfig>
+
diff --git a/data/sugar-xo.gtkrc b/data/sugar-100.gtkrc
index 62831ad..dced036 100644
--- a/data/sugar-xo.gtkrc
+++ b/data/sugar-100.gtkrc
@@ -1,6 +1,7 @@
-gtk-theme-name = "sugar-xo"
+gtk-theme-name = "sugar-100"
gtk-icon-theme-name = "sugar"
gtk-font-name = "Sans Serif 7"
gtk-cursor-theme-name = "sugar"
gtk-toolbar-style = GTK_TOOLBAR_ICONS
gtk-icon-sizes = "gtk-large-toolbar=55,55"
+gtk-cursor-blink-timeout = 3
diff --git a/data/sugar.gtkrc b/data/sugar-72.gtkrc
index 473396f..dd53b81 100644
--- a/data/sugar.gtkrc
+++ b/data/sugar-72.gtkrc
@@ -1,6 +1,7 @@
-gtk-theme-name = "sugar"
+gtk-theme-name = "sugar-72"
gtk-icon-theme-name = "sugar"
gtk-font-name = "Sans Serif 10"
gtk-cursor-theme-name = "sugar"
gtk-toolbar-style = GTK_TOOLBAR_ICONS
gtk-icon-sizes = "gtk-large-toolbar=40,40"
+gtk-cursor-blink-timeout = 3
diff --git a/data/sugar.desktop b/data/sugar.desktop
index f608979..2d7133f 100644
--- a/data/sugar.desktop
+++ b/data/sugar.desktop
@@ -2,5 +2,5 @@
Encoding=UTF-8
Name=Sugar
GenericName=Sugar
-Exec=sugar-shell
+Exec=sugar
Type=Application
diff --git a/data/sugar.schemas.in b/data/sugar.schemas.in
new file mode 100644
index 0000000..669a25b
--- /dev/null
+++ b/data/sugar.schemas.in
@@ -0,0 +1,160 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+ <schemalist>
+ <schema>
+ <key>/schemas/desktop/sugar/user/nick</key>
+ <applyto>/desktop/sugar/user/nick</applyto>
+ <owner>sugar</owner>
+ <type>string</type>
+ <default></default>
+ <locale name="C">
+ <short>User Name</short>
+ <long>User name that is used throughout the desktop.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/desktop/sugar/user/color</key>
+ <applyto>/desktop/sugar/user/color</applyto>
+ <owner>sugar</owner>
+ <type>string</type>
+ <default></default>
+ <locale name="C">
+ <short>User Color</short>
+ <long>Color for the XO icon that is used throughout the
+ desktop. The string is composed of the stroke color and fill
+ color, format is that of rbg colors. Example: #AC32FF,#9A5200
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/desktop/sugar/sound/volume</key>
+ <applyto>/desktop/sugar/sound/volume</applyto>
+ <owner>sugar</owner>
+ <type>int</type>
+ <default>80</default>
+ <locale name="C">
+ <short>Volume Level</short>
+ <long>Volume level for the sound device.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/desktop/sugar/sound/mute</key>
+ <applyto>/desktop/sugar/sound/mute</applyto>
+ <owner>sugar</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Sound Muted</short>
+ <long>Setting for muting the sound device.</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/desktop/sugar/backup_url</key>
+ <applyto>/desktop/sugar/backup_url</applyto>
+ <owner>sugar</owner>
+ <type>string</type>
+ <default></default>
+ <locale name="C">
+ <short>Backup URL</short>
+ <long>Url where the backup is saved to.</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/desktop/sugar/date/timezone</key>
+ <applyto>/desktop/sugar/date/timezone</applyto>
+ <owner>sugar</owner>
+ <type>string</type>
+ <default>"UTC"</default>
+ <locale name="C">
+ <short>Timezone</short>
+ <long>Timezone setting for the system.</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/desktop/sugar/desktop/favorites_layout</key>
+ <applyto>/desktop/sugar/desktop/favorites_layout</applyto>
+ <owner>sugar</owner>
+ <type>string</type>
+ <default>"ring-layout"</default>
+ <locale name="C">
+ <short>Favorites Layout</short>
+ <long>Layout of the favorites view.</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/desktop/sugar/frame/edge_delay</key>
+ <applyto>/desktop/sugar/frame/edge_delay</applyto>
+ <owner>sugar</owner>
+ <type>int</type>
+ <default>1000</default>
+ <locale name="C">
+ <short>Edge Delay</short>
+ <long>Delay for the activation of the frame using the edges.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/desktop/sugar/frame/corner_delay</key>
+ <applyto>/desktop/sugar/frame/corner_delay</applyto>
+ <owner>sugar</owner>
+ <type>int</type>
+ <default>0</default>
+ <locale name="C">
+ <short>Corner Delay</short>
+ <long>Delay for the activation of the frame using the corners.</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/desktop/sugar/collaboration/jabber_server</key>
+ <applyto>/desktop/sugar/collaboration/jabber_server</applyto>
+ <owner>sugar</owner>
+ <type>string</type>
+ <default>jabber.sugarlabs.org</default>
+ <locale name="C">
+ <short>Jabber Server</short>
+ <long>Url of the jabber server to use.</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/desktop/sugar/power/automatic</key>
+ <applyto>/desktop/sugar/power/automatic</applyto>
+ <owner>sugar</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Power Automatic</short>
+ <long>Power Automatic.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/desktop/sugar/power/extreme</key>
+ <applyto>/desktop/sugar/power/extreme</applyto>
+ <owner>sugar</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Power Extreme</short>
+ <long>Power Extreme. </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/desktop/sugar/collaboration/publish_gadget</key>
+ <applyto>/desktop/sugar/collaboration/publish_gadget</applyto>
+ <owner>sugar</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Publish to Gadget</short>
+ <long>If TRUE, Sugar will make us searchable for the other users of the Jabber server.</long>
+ </locale>
+ </schema>
+
+ </schemalist>
+</gconfschemafile>
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
new file mode 100644
index 0000000..d4ab534
--- /dev/null
+++ b/extensions/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = cpsection deviceicon globalkey
diff --git a/src/view/devices/Makefile.in b/extensions/Makefile.in
index 718b268..8207566 100644
--- a/src/view/devices/Makefile.in
+++ b/extensions/Makefile.in
@@ -29,9 +29,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/view/devices
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(sugar_PYTHON)
+subdir = extensions
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -47,15 +46,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(sugardir)"
-sugarPYTHON_INSTALL = $(INSTALL_DATA)
-py_compile = $(top_srcdir)/py-compile
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
@@ -85,6 +75,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -199,16 +192,10 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = network
-sugardir = $(pkgdatadir)/shell/view/devices
-sugar_PYTHON = \
- __init__.py \
- battery.py \
- deviceview.py \
- speaker.py
-
+SUBDIRS = cpsection deviceicon globalkey
all: all-recursive
.SUFFIXES:
@@ -221,9 +208,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/view/devices/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/view/devices/Makefile
+ $(AUTOMAKE) --foreign extensions/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -241,34 +228,6 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-sugarPYTHON: $(sugar_PYTHON)
- @$(NORMAL_INSTALL)
- test -z "$(sugardir)" || $(MKDIR_P) "$(DESTDIR)$(sugardir)"
- @list='$(sugar_PYTHON)'; dlist=''; for p in $$list; do\
- if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
- if test -f $$b$$p; then \
- f=$(am__strip_dir) \
- dlist="$$dlist $$f"; \
- echo " $(sugarPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(sugardir)/$$f'"; \
- $(sugarPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(sugardir)/$$f"; \
- else :; fi; \
- done; \
- if test -n "$$dlist"; then \
- if test -z "$(DESTDIR)"; then \
- PYTHON=$(PYTHON) $(py_compile) --basedir "$(sugardir)" $$dlist; \
- else \
- PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(sugardir)" $$dlist; \
- fi; \
- else :; fi
-
-uninstall-sugarPYTHON:
- @$(NORMAL_UNINSTALL)
- @list='$(sugar_PYTHON)'; dlist=''; for p in $$list; do\
- f=$(am__strip_dir) \
- rm -f "$(DESTDIR)$(sugardir)/$$f"; \
- rm -f "$(DESTDIR)$(sugardir)/$${f}c"; \
- rm -f "$(DESTDIR)$(sugardir)/$${f}o"; \
- done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -448,9 +407,6 @@ check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(sugardir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
@@ -493,7 +449,7 @@ info: info-recursive
info-am:
-install-data-am: install-sugarPYTHON
+install-data-am:
install-dvi: install-dvi-recursive
@@ -527,7 +483,7 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-sugarPYTHON
+uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
@@ -540,11 +496,10 @@ uninstall-am: uninstall-sugarPYTHON
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
- install-strip install-sugarPYTHON installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-sugarPYTHON
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+ tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/extensions/cpsection/Makefile.am b/extensions/cpsection/Makefile.am
new file mode 100644
index 0000000..0e69fd1
--- /dev/null
+++ b/extensions/cpsection/Makefile.am
@@ -0,0 +1,4 @@
+SUBDIRS = aboutme aboutxo datetime frame language network power
+
+sugardir = $(pkgdatadir)/extensions/cpsection
+sugar_PYTHON = __init__.py
diff --git a/src/controlpanel/Makefile.in b/extensions/cpsection/Makefile.in
index e00cc18..c599e06 100644
--- a/src/controlpanel/Makefile.in
+++ b/extensions/cpsection/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/controlpanel
+subdir = extensions/cpsection
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -85,6 +85,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -199,18 +202,12 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = model view
-sugardir = $(pkgdatadir)/shell/controlpanel
-sugar_PYTHON = \
- __init__.py \
- cmd.py \
- gui.py \
- inlinealert.py \
- sectionview.py \
- toolbar.py
-
+SUBDIRS = aboutme aboutxo datetime frame language network power
+sugardir = $(pkgdatadir)/extensions/cpsection
+sugar_PYTHON = __init__.py
all: all-recursive
.SUFFIXES:
@@ -223,9 +220,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/controlpanel/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/cpsection/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/controlpanel/Makefile
+ $(AUTOMAKE) --foreign extensions/cpsection/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/intro/__init__.py b/extensions/cpsection/__init__.py
index e69de29..e69de29 100644
--- a/src/intro/__init__.py
+++ b/extensions/cpsection/__init__.py
diff --git a/extensions/cpsection/aboutme/Makefile.am b/extensions/cpsection/aboutme/Makefile.am
new file mode 100644
index 0000000..9ca91d2
--- /dev/null
+++ b/extensions/cpsection/aboutme/Makefile.am
@@ -0,0 +1,6 @@
+sugardir = $(pkgdatadir)/extensions/cpsection/aboutme
+
+sugar_PYTHON = \
+ __init__.py \
+ model.py \
+ view.py
diff --git a/src/model/devices/network/Makefile.in b/extensions/cpsection/aboutme/Makefile.in
index cf6ff13..f1e9963 100644
--- a/src/model/devices/network/Makefile.in
+++ b/extensions/cpsection/aboutme/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/model/devices/network
+subdir = extensions/cpsection/aboutme
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,14 +190,14 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/model/devices/network
+sugardir = $(pkgdatadir)/extensions/cpsection/aboutme
sugar_PYTHON = \
__init__.py \
- mesh.py \
- wired.py \
- wireless.py
+ model.py \
+ view.py
all: all-am
@@ -208,9 +211,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/model/devices/network/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/cpsection/aboutme/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/model/devices/network/Makefile
+ $(AUTOMAKE) --foreign extensions/cpsection/aboutme/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/bin/sugar-emulator.in b/extensions/cpsection/aboutme/__init__.py
index 1ee6fc5..98843e1 100644
--- a/bin/sugar-emulator.in
+++ b/extensions/cpsection/aboutme/__init__.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-# Copyright (C) 2008, Red Hat, Inc.
+# 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
@@ -13,14 +12,17 @@
#
# 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-import sys
+from gettext import gettext as _
+import gconf
-sys.path.insert(0, '@prefix@/share/sugar/shell')
+from sugar.graphics.xocolor import XoColor
-from emulator import main
-
-main()
+CLASS = 'AboutMe'
+ICON = 'module-about_me'
+TITLE = _('About Me')
+client = gconf.client_get_default()
+COLOR = XoColor(client.get_string('/desktop/sugar/user/color'))
diff --git a/src/controlpanel/model/aboutme.py b/extensions/cpsection/aboutme/model.py
index 3818792..8500799 100644
--- a/src/controlpanel/model/aboutme.py
+++ b/extensions/cpsection/aboutme/model.py
@@ -16,9 +16,7 @@
#
from gettext import gettext as _
-
-from sugar import profile
-from sugar.graphics.xocolor import XoColor
+import gconf
_COLORS = {'red': {'dark':'#b20008', 'medium':'#e6000a', 'light':'#ffadce'},
'orange': {'dark':'#9a5200', 'medium':'#c97e00', 'light':'#ffc169'},
@@ -31,7 +29,8 @@ _COLORS = {'red': {'dark':'#b20008', 'medium':'#e6000a', 'light':'#ffadce'},
_MODIFIERS = ('dark', 'medium', 'light')
def get_nick():
- return profile.get_nick_name()
+ client = gconf.client_get_default()
+ return client.get_string("/desktop/sugar/user/nick")
def print_nick():
print get_nick()
@@ -42,18 +41,18 @@ def set_nick(nick):
"""
if not nick:
raise ValueError(_("You must enter a name."))
- pro = profile.get_profile()
if not isinstance(nick, unicode):
nick = unicode(nick, 'utf-8')
- pro.nick_name = nick
- pro.save()
+ client = gconf.client_get_default()
+ client.set_string("/desktop/sugar/user/nick", nick)
return 1
-def get_color():
- return profile.get_color()
+def get_color():
+ client = gconf.client_get_default()
+ return client.get_string("/desktop/sugar/user/color")
def print_color():
- color_string = get_color().to_string()
+ color_string = get_color()
tmp = color_string.split(',')
stroke_tuple = None
@@ -98,19 +97,19 @@ def set_color(stroke, fill, stroke_modifier='medium', fill_modifier='medium'):
color = _COLORS[stroke][stroke_modifier] + ',' \
+ _COLORS[fill][fill_modifier]
- pro = profile.get_profile()
- pro.color = XoColor(color)
- pro.save()
+
+ client = gconf.client_get_default()
+ client.set_string("/desktop/sugar/user/color", color)
return 1
-def get_color_xo():
- return profile.get_color()
+def get_color_xo():
+ client = gconf.client_get_default()
+ return client.get_string("/desktop/sugar/user/color")
def set_color_xo(color):
"""Set a color with an XoColor
This method is used by the graphical user interface
"""
- pro = profile.get_profile()
- pro.color = color
- pro.save()
+ client = gconf.client_get_default()
+ client.set_string("/desktop/sugar/user/color", color)
return 1
diff --git a/src/controlpanel/view/aboutme.py b/extensions/cpsection/aboutme/view.py
index a871871..cabd66a 100644
--- a/src/controlpanel/view/aboutme.py
+++ b/extensions/cpsection/aboutme/view.py
@@ -21,15 +21,9 @@ from gettext import gettext as _
from sugar.graphics.icon import Icon
from sugar.graphics import style
from sugar.graphics.xocolor import XoColor
-from sugar import profile
-from controlpanel.sectionview import SectionView
-from controlpanel.inlinealert import InlineAlert
-
-CLASS = 'AboutMe'
-ICON = 'module-about_me'
-COLOR = profile.get_color()
-TITLE = _('About Me')
+from jarabe.controlpanel.sectionview import SectionView
+from jarabe.controlpanel.inlinealert import InlineAlert
class EventIcon(gtk.EventBox):
__gtype_name__ = "SugarEventIcon"
@@ -49,7 +43,7 @@ class ColorPicker(EventIcon):
__gsignals__ = {
'color-changed': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE,
- ([object]))
+ ([str]))
}
def __init__(self, xocolor=None):
EventIcon.__init__(self)
@@ -64,7 +58,7 @@ class ColorPicker(EventIcon):
def _set_random_colors(self):
xocolor = XoColor()
self.icon.props.xo_color = xocolor
- self.emit('color-changed', xocolor)
+ self.emit('color-changed', xocolor.to_string())
class AboutMe(SectionView):
def __init__(self, model, alerts):
@@ -160,7 +154,8 @@ class AboutMe(SectionView):
def setup(self):
self._nick_entry.set_text(self._model.get_nick())
- self._color_picker.icon.props.xo_color = self._model.get_color_xo()
+ color = XoColor(self._model.get_color_xo())
+ self._color_picker.icon.props.xo_color = color
self._color_valid = True
self._nick_valid = True
@@ -198,13 +193,12 @@ class AboutMe(SectionView):
self._model.set_nick(widget.get_text())
except ValueError, detail:
self._nick_alert.props.msg = detail
- self._nick_valid = False
+ self._nick_valid = False
else:
self._nick_alert.props.msg = self.restart_msg
- self._nick_valid = True
+ self._nick_valid = True
self.needs_restart = True
self.restart_alerts.append('nick')
-
self._validate()
self._nick_alert.show()
return False
@@ -218,9 +212,4 @@ class AboutMe(SectionView):
self._validate()
self._color_alert.show()
-
-
-
-
-
-
+ return False
diff --git a/extensions/cpsection/aboutxo/Makefile.am b/extensions/cpsection/aboutxo/Makefile.am
new file mode 100644
index 0000000..3f71af0
--- /dev/null
+++ b/extensions/cpsection/aboutxo/Makefile.am
@@ -0,0 +1,6 @@
+sugardir = $(pkgdatadir)/extensions/cpsection/aboutxo
+
+sugar_PYTHON = \
+ __init__.py \
+ model.py \
+ view.py
diff --git a/src/model/devices/network/Makefile.in b/extensions/cpsection/aboutxo/Makefile.in
index cf6ff13..f752566 100644
--- a/src/model/devices/network/Makefile.in
+++ b/extensions/cpsection/aboutxo/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/model/devices/network
+subdir = extensions/cpsection/aboutxo
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,14 +190,14 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/model/devices/network
+sugardir = $(pkgdatadir)/extensions/cpsection/aboutxo
sugar_PYTHON = \
__init__.py \
- mesh.py \
- wired.py \
- wireless.py
+ model.py \
+ view.py
all: all-am
@@ -208,9 +211,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/model/devices/network/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/cpsection/aboutxo/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/model/devices/network/Makefile
+ $(AUTOMAKE) --foreign extensions/cpsection/aboutxo/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/service/__init__.py b/extensions/cpsection/aboutxo/__init__.py
index 52b82c8..4dc2cb2 100644
--- a/service/__init__.py
+++ b/extensions/cpsection/aboutxo/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, One Laptop Per Child
+# 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
@@ -12,5 +12,11 @@
#
# 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+from gettext import gettext as _
+
+CLASS = 'AboutXO'
+ICON = 'module-about_my_xo'
+TITLE = _('About my XO')
diff --git a/src/controlpanel/model/aboutxo.py b/extensions/cpsection/aboutxo/model.py
index 10815ef..4b5b27e 100644
--- a/src/controlpanel/model/aboutxo.py
+++ b/extensions/cpsection/aboutxo/model.py
@@ -18,6 +18,7 @@
import os
import logging
import re
+import subprocess
from gettext import gettext as _
_logger = logging.getLogger('ControlPanel - AboutXO')
@@ -62,6 +63,22 @@ def get_firmware_number():
def print_firmware_number():
print get_firmware_number()
+def get_wireless_firmware():
+ try:
+ info = subprocess.Popen(["/usr/sbin/ethtool", "-i", "eth0"],
+ stdout=subprocess.PIPE).stdout.readlines()
+ except OSError:
+ return _not_available
+ try:
+ wireless_firmware = [line for line in info
+ if line.startswith('firmware')][0].split()[1]
+ except IndexError:
+ wireless_firmware = _not_available
+ return wireless_firmware
+
+def print_wireless_firmware():
+ print get_wireless_firmware()
+
def _read_file(path):
if os.access(path, os.R_OK) == 0:
return None
@@ -77,7 +94,7 @@ def _read_file(path):
return None
def get_license():
- license_file = "/usr/share/licenses/common-licenses/GPL-2"
+ license_file = "/usr/share/licenses/common-licenses/GPLv2"
lang = os.environ['LANG']
if lang.endswith("UTF-8"):
lang = lang[:-6]
diff --git a/src/controlpanel/view/aboutxo.py b/extensions/cpsection/aboutxo/view.py
index 4c1d299..bd2f27f 100644
--- a/src/controlpanel/view/aboutxo.py
+++ b/extensions/cpsection/aboutxo/view.py
@@ -18,14 +18,10 @@
import gtk
from gettext import gettext as _
-import config
+from jarabe import config
from sugar.graphics import style
-from controlpanel.sectionview import SectionView
-
-CLASS = 'AboutXO'
-ICON = 'module-about_my_xo'
-TITLE = _('About my XO')
+from jarabe.controlpanel.sectionview import SectionView
class AboutXO(SectionView):
def __init__(self, model, alerts=None):
@@ -141,6 +137,21 @@ class AboutXO(SectionView):
box_software.pack_start(box_firmware, expand=False)
box_firmware.show()
+ box_wireless_fw = gtk.HBox(spacing=style.DEFAULT_SPACING)
+ label_wireless_fw = gtk.Label(_('Wireless Firmware:'))
+ label_wireless_fw.set_alignment(1, 0)
+ label_wireless_fw.modify_fg(gtk.STATE_NORMAL,
+ style.COLOR_SELECTION_GREY.get_gdk_color())
+ box_wireless_fw.pack_start(label_wireless_fw, expand=False)
+ self._group.add_widget(label_wireless_fw)
+ label_wireless_fw.show()
+ label_wireless_fw_no = gtk.Label(self._model.get_wireless_firmware())
+ label_wireless_fw_no.set_alignment(0, 0)
+ box_wireless_fw.pack_start(label_wireless_fw_no, expand=False)
+ label_wireless_fw_no.show()
+ box_software.pack_start(box_wireless_fw, expand=False)
+ box_wireless_fw.show()
+
self._vbox.pack_start(box_software, expand=False)
box_software.show()
diff --git a/extensions/cpsection/datetime/Makefile.am b/extensions/cpsection/datetime/Makefile.am
new file mode 100644
index 0000000..b5b518e
--- /dev/null
+++ b/extensions/cpsection/datetime/Makefile.am
@@ -0,0 +1,6 @@
+sugardir = $(pkgdatadir)/extensions/cpsection/datetime
+
+sugar_PYTHON = \
+ __init__.py \
+ model.py \
+ view.py
diff --git a/src/model/devices/network/Makefile.in b/extensions/cpsection/datetime/Makefile.in
index cf6ff13..1d9c8e6 100644
--- a/src/model/devices/network/Makefile.in
+++ b/extensions/cpsection/datetime/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/model/devices/network
+subdir = extensions/cpsection/datetime
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,14 +190,14 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/model/devices/network
+sugardir = $(pkgdatadir)/extensions/cpsection/datetime
sugar_PYTHON = \
__init__.py \
- mesh.py \
- wired.py \
- wireless.py
+ model.py \
+ view.py
all: all-am
@@ -208,9 +211,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/model/devices/network/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/cpsection/datetime/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/model/devices/network/Makefile
+ $(AUTOMAKE) --foreign extensions/cpsection/datetime/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/service/__init__.py b/extensions/cpsection/datetime/__init__.py
index 52b82c8..fc9be45 100644
--- a/service/__init__.py
+++ b/extensions/cpsection/datetime/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, One Laptop Per Child
+# 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
@@ -12,5 +12,10 @@
#
# 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+from gettext import gettext as _
+
+CLASS = 'TimeZone'
+ICON = 'module-date_and_time'
+TITLE = _('Date & Time')
diff --git a/src/controlpanel/model/datetime.py b/extensions/cpsection/datetime/model.py
index 4a4c560..76064e4 100644
--- a/src/controlpanel/model/datetime.py
+++ b/extensions/cpsection/datetime/model.py
@@ -22,8 +22,7 @@
import os
from gettext import gettext as _
-
-from sugar import profile
+import gconf
_zone_tab = '/usr/share/zoneinfo/zone.tab'
@@ -69,8 +68,8 @@ def read_all_timezones(fn=_zone_tab):
return timezones
def get_timezone():
- pro = profile.get_profile()
- return pro.timezone
+ client = gconf.client_get_default()
+ return client.get_string('/desktop/sugar/date/timezone')
def print_timezone():
print get_timezone()
@@ -82,9 +81,8 @@ def set_timezone(timezone):
timezones = read_all_timezones()
if timezone in timezones:
os.environ['TZ'] = timezone
- pro = profile.get_profile()
- pro.timezone = timezone
- pro.save()
+ client = gconf.client_get_default()
+ client.set_string('/desktop/sugar/date/timezone', timezone)
else:
raise ValueError(_("Error timezone does not exist."))
return 1
diff --git a/src/controlpanel/view/datetime.py b/extensions/cpsection/datetime/view.py
index f178515..58719b4 100644
--- a/src/controlpanel/view/datetime.py
+++ b/extensions/cpsection/datetime/view.py
@@ -21,12 +21,8 @@ from gettext import gettext as _
from sugar.graphics import style
from sugar.graphics import iconentry
-from controlpanel.sectionview import SectionView
-from controlpanel.inlinealert import InlineAlert
-
-CLASS = 'TimeZone'
-ICON = 'module-date_and_time'
-TITLE = _('Date & Time')
+from jarabe.controlpanel.sectionview import SectionView
+from jarabe.controlpanel.inlinealert import InlineAlert
class TimeZone(SectionView):
def __init__(self, model, alerts):
diff --git a/extensions/cpsection/frame/Makefile.am b/extensions/cpsection/frame/Makefile.am
new file mode 100644
index 0000000..1e09c04
--- /dev/null
+++ b/extensions/cpsection/frame/Makefile.am
@@ -0,0 +1,6 @@
+sugardir = $(pkgdatadir)/extensions/cpsection/frame
+
+sugar_PYTHON = \
+ __init__.py \
+ model.py \
+ view.py
diff --git a/src/controlpanel/view/Makefile.in b/extensions/cpsection/frame/Makefile.in
index 8787134..db7acef 100644
--- a/src/controlpanel/view/Makefile.in
+++ b/extensions/cpsection/frame/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/controlpanel/view
+subdir = extensions/cpsection/frame
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,18 +190,14 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/controlpanel/view
+sugardir = $(pkgdatadir)/extensions/cpsection/frame
sugar_PYTHON = \
- __init__.py \
- aboutme.py \
- aboutxo.py \
- datetime.py \
- frame.py \
- language.py \
- network.py \
- power.py
+ __init__.py \
+ model.py \
+ view.py
all: all-am
@@ -212,9 +211,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/controlpanel/view/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/cpsection/frame/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/controlpanel/view/Makefile
+ $(AUTOMAKE) --foreign extensions/cpsection/frame/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/controlpanel/view/__init__.py b/extensions/cpsection/frame/__init__.py
index 2b0f269..a93f9c7 100644
--- a/src/controlpanel/view/__init__.py
+++ b/extensions/cpsection/frame/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 One Laptop Per Child
+# 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
@@ -12,6 +12,10 @@
#
# 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
-#
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+from gettext import gettext as _
+CLASS = 'Frame'
+ICON = 'module-frame'
+TITLE = _('Frame')
diff --git a/src/controlpanel/model/frame.py b/extensions/cpsection/frame/model.py
index 0e19703..9eea9ad 100644
--- a/src/controlpanel/model/frame.py
+++ b/extensions/cpsection/frame/model.py
@@ -16,12 +16,12 @@
#
from gettext import gettext as _
-
-from sugar import profile
+import gconf
def get_corner_delay():
- pro = profile.get_profile()
- return pro.hot_corners_delay
+ client = gconf.client_get_default()
+ corner_delay = client.get_int('/desktop/sugar/frame/corner_delay')
+ return corner_delay
def print_corner_delay():
print get_corner_delay()
@@ -35,15 +35,15 @@ def set_corner_delay(delay):
try:
int(delay)
except ValueError:
- raise ValueError(_("Value must be an integer."))
- pro = profile.get_profile()
- pro.hot_corners_delay = int(delay)
- pro.save()
- return 1
+ raise ValueError(_("Value must be an integer."))
+ client = gconf.client_get_default()
+ client.set_int('/desktop/sugar/frame/corner_delay', int(delay))
+ return 0
def get_edge_delay():
- pro = profile.get_profile()
- return pro.warm_edges_delay
+ client = gconf.client_get_default()
+ edge_delay = client.get_int('/desktop/sugar/frame/edge_delay')
+ return edge_delay
def print_edge_delay():
print get_edge_delay()
@@ -57,8 +57,7 @@ def set_edge_delay(delay):
try:
int(delay)
except ValueError:
- raise ValueError(_("Value must be an integer."))
- pro = profile.get_profile()
- pro.warm_edges_delay = int(delay)
- pro.save()
- return 1
+ raise ValueError(_("Value must be an integer."))
+ client = gconf.client_get_default()
+ client.set_int('/desktop/sugar/frame/edge_delay', int(delay))
+ return 0
diff --git a/src/controlpanel/view/frame.py b/extensions/cpsection/frame/view.py
index 09b973e..cbe43bb 100644
--- a/src/controlpanel/view/frame.py
+++ b/extensions/cpsection/frame/view.py
@@ -20,17 +20,13 @@ from gettext import gettext as _
from sugar.graphics import style
-from controlpanel.sectionview import SectionView
-from controlpanel.inlinealert import InlineAlert
-
-CLASS = 'Frame'
-ICON = 'module-frame'
-TITLE = _('Frame')
+from jarabe.controlpanel.sectionview import SectionView
+from jarabe.controlpanel.inlinealert import InlineAlert
_never = _('never')
_instantaneous = _('instantaneous')
_seconds_label = _('%s seconds')
-_MAX_DELAY = 1000.0
+_MAX_DELAY = 1000
class Frame(SectionView):
def __init__(self, model, alerts):
@@ -197,7 +193,7 @@ class Frame(SectionView):
def __corner_delay_format_cb(self, scale, value):
if value == _MAX_DELAY:
return _never
- elif value == 0.0:
+ elif value == 0:
return _instantaneous
else:
return _seconds_label % (value / _MAX_DELAY)
@@ -230,7 +226,7 @@ class Frame(SectionView):
def __edge_delay_format_cb(self, scale, value):
if value == _MAX_DELAY:
return _never
- elif value == 0.0:
+ elif value == 0:
return _instantaneous
else:
return _seconds_label % (value / _MAX_DELAY)
diff --git a/extensions/cpsection/language/Makefile.am b/extensions/cpsection/language/Makefile.am
new file mode 100644
index 0000000..209fc32
--- /dev/null
+++ b/extensions/cpsection/language/Makefile.am
@@ -0,0 +1,6 @@
+sugardir = $(pkgdatadir)/extensions/cpsection/language
+
+sugar_PYTHON = \
+ __init__.py \
+ model.py \
+ view.py
diff --git a/src/model/devices/network/Makefile.in b/extensions/cpsection/language/Makefile.in
index cf6ff13..2a24172 100644
--- a/src/model/devices/network/Makefile.in
+++ b/extensions/cpsection/language/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/model/devices/network
+subdir = extensions/cpsection/language
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,14 +190,14 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/model/devices/network
+sugardir = $(pkgdatadir)/extensions/cpsection/language
sugar_PYTHON = \
__init__.py \
- mesh.py \
- wired.py \
- wireless.py
+ model.py \
+ view.py
all: all-am
@@ -208,9 +211,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/model/devices/network/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/cpsection/language/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/model/devices/network/Makefile
+ $(AUTOMAKE) --foreign extensions/cpsection/language/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/service/__init__.py b/extensions/cpsection/language/__init__.py
index 52b82c8..a8f9f08 100644
--- a/service/__init__.py
+++ b/extensions/cpsection/language/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, One Laptop Per Child
+# 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
@@ -12,5 +12,11 @@
#
# 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+from gettext import gettext as _
+
+CLASS = 'Language'
+ICON = 'module-language'
+TITLE = _('Language')
diff --git a/src/controlpanel/model/language.py b/extensions/cpsection/language/model.py
index 404d9dd..e714dad 100644
--- a/src/controlpanel/model/language.py
+++ b/extensions/cpsection/language/model.py
@@ -34,8 +34,7 @@ def read_all_languages():
for line in lines:
if line.find('locale:') != -1:
- locale = line.lstrip('locale:')
- locale = locale.split('archive:')[0].strip()
+ locale = line.split()[1]
elif line.find('language |') != -1:
lang = line.lstrip('language |')
elif line.find('territory |') != -1:
@@ -53,82 +52,98 @@ def read_all_languages():
return locales
def _initialize():
- if set_language.__doc__ is None:
+ if set_languages.__doc__ is None:
# when running under 'python -OO', all __doc__ fields are None,
# so += would fail -- and this function would be unnecessary anyway.
return
languages = read_all_languages()
- set_language.__doc__ += '\n'
+ set_languages.__doc__ += '\n'
for lang in languages:
- set_language.__doc__ += '%s \n' % (lang[0].replace(' ', '_') + '/' +
+ set_languages.__doc__ += '%s \n' % (lang[0].replace(' ', '_') + '/' +
lang[1].replace(' ', '_'))
-def _write_i18n(lang):
+def _write_i18n(langs):
+ colon = ':'
+ langstr = colon.join(langs)
path = os.path.join(os.environ.get("HOME"), '.i18n')
- if os.access(path, os.W_OK) == 0:
+ if not os.access(path, os.W_OK):
print _standard_msg
fd = open(path, 'w')
fd.write('LANG="%s"\n' % _default_lang)
+ fd.write('LANGUAGE="%s"\n' % _default_lang)
fd.close()
else:
- fd = open(path, 'r')
- lines = fd.readlines()
- fd.close()
- for i in range(len(lines)):
- if lines[i][:5] == "LANG=":
- lines[i] = 'LANG="%s"\n' % lang
- fd = open(path, 'w')
- fd.writelines(lines)
- fd.close()
+ fd = open(path, 'w')
+ fd.write('LANG="%s"\n' % langs[0])
+ fd.write('LANGUAGE="%s"\n' % langstr)
+ fd.close()
-def get_language():
+def get_languages():
path = os.path.join(os.environ.get("HOME"), '.i18n')
- if os.access(path, os.R_OK) == 0:
+ if not os.access(path, os.R_OK):
print _standard_msg
fd = open(path, 'w')
fd.write('LANG="%s"\n' % _default_lang)
+ fd.write('LANGUAGE="%s"\n' % _default_lang)
fd.close()
- return _default_lang
+ return [_default_lang]
fd = open(path, "r")
lines = fd.readlines()
fd.close()
- lang = None
+ langlist = None
for line in lines:
- if line[:5] == "LANG=":
- lang = line[5:].replace('"', '')
+ if line.startswith("LANGUAGE="):
+ lang = line[9:].replace('"', '')
lang = lang.strip()
+ langlist = lang.split(':')
+ elif line.startswith("LANG="):
+ lang = line[5:].replace('"', '')
- return lang
+ # There might be cases where .i18n may not contain a LANGUAGE field
+ if langlist == None:
+ return [lang]
+ else:
+ return langlist
-def print_language():
- code = get_language()
+def print_languages():
+ codes = get_languages()
languages = read_all_languages()
- for lang in languages:
- if lang[2].split('.')[0] == code.split('.')[0]:
- print lang[0].replace(' ', '_') + '/' + lang[1].replace(' ', '_')
- return
- print (_("Language for code=%s could not be determined.") % code)
+ for code in codes:
+ found_lang = False
+ for lang in languages:
+ if lang[2].split('.')[0] == code.split('.')[0]:
+ print lang[0].replace(' ', '_') + '/' + \
+ lang[1].replace(' ', '_')
+ found_lang = True
+ break
+ if not found_lang:
+ print (_("Language for code=%s could not be determined.") % code)
-def set_language(language):
+def set_languages(languages):
"""Set the system language.
languages :
"""
- if language.endswith('utf8'):
- _write_i18n(language)
- return 1
- else:
- languages = read_all_languages()
- for lang, territory, locale in languages:
- code = lang.replace(' ', '_') + '/' \
- + territory.replace(' ', '_')
- if code == language:
- _write_i18n(locale)
- return 1
- print (_("Sorry I do not speak \'%s\'.") % language)
+ if isinstance(languages, str):
+ # This came from the commandline
+ #TODO: Support multiple languages from the command line
+ if languages.endswith('utf8'):
+ _write_i18n(languages)
+ return 1
+ else:
+ langs = read_all_languages()
+ for lang, territory, locale in langs:
+ code = lang.replace(' ', '_') + '/' \
+ + territory.replace(' ', '_')
+ if code == languages:
+ _write_i18n(locale)
+ return 1
+ print (_("Sorry I do not speak \'%s\'.") % languages)
+ else:
+ _write_i18n(languages)
# inilialize the docstrings for the language
_initialize()
diff --git a/extensions/cpsection/language/view.py b/extensions/cpsection/language/view.py
new file mode 100644
index 0000000..5b7e292
--- /dev/null
+++ b/extensions/cpsection/language/view.py
@@ -0,0 +1,236 @@
+# 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
+
+import gtk
+import gobject
+import gettext
+
+from sugar.graphics import style
+from sugar.graphics.icon import Icon
+
+from jarabe.controlpanel.sectionview import SectionView
+from jarabe.controlpanel.inlinealert import InlineAlert
+
+_translate_language = lambda msg: gettext.dgettext('iso_639', msg)
+_translate_country = lambda msg: gettext.dgettext('iso_3166', msg)
+
+CLASS = 'Language'
+ICON = 'module-language'
+TITLE = gettext.gettext('Language')
+
+class Language(SectionView):
+ def __init__(self, model, alerts):
+ SectionView.__init__(self)
+
+ self._model = model
+ self.restart_alerts = alerts
+ self._lang_sid = 0
+ self._selected_lang_count = 0
+ self._labels = []
+ self._stores = []
+ self._comboboxes = []
+ self._add_remove_boxes = []
+ self._changed = False
+ self._cursor_change_handler = None
+
+ self._available_locales = self._model.read_all_languages()
+ self._selected_locales = self._model.get_languages()
+
+ self.set_border_width(style.DEFAULT_SPACING * 2)
+ self.set_spacing(style.DEFAULT_SPACING)
+
+ self._table = gtk.Table(rows=1, columns=3, homogeneous=False)
+ self.pack_start(self._table, False)
+ self._table.show()
+
+ self._lang_alert_box = gtk.HBox(spacing=style.DEFAULT_SPACING)
+ self.pack_start(self._lang_alert_box, False)
+
+ self._lang_alert = InlineAlert()
+ self._lang_alert_box.pack_start(self._lang_alert)
+ if 'lang' in self.restart_alerts:
+ self._lang_alert.props.msg = self.restart_msg
+ self._lang_alert.show()
+ self._lang_alert_box.show()
+
+ self.setup()
+
+ def _add_row(self, locale_code=None):
+ '''Adds a row to the table'''
+
+ self._selected_lang_count += 1
+
+ self._table.resize(self._selected_lang_count, 3)
+
+ label = gtk.Label(str=str(self._selected_lang_count))
+ self._labels.append(label)
+ self._attach_to_table(label, 0, 1, padding=1)
+ label.show()
+
+
+ store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
+ for language, country, code in self._available_locales:
+ description = '%s (%s)' % (_translate_language(language), \
+ _translate_country(country))
+ store.append([code, description])
+
+ combobox = gtk.ComboBox(model=store)
+ cell = gtk.CellRendererText()
+ combobox.pack_start(cell)
+ combobox.add_attribute(cell, 'text', 1)
+
+ if locale_code:
+ for row in store:
+ lang = locale_code.split('.')[0]
+ lang_column = row[0].split('.')[0]
+ if lang in lang_column:
+ combobox.set_active_iter(row.iter)
+ break
+ else:
+ combobox.set_active(1)
+
+ combobox.connect('changed', self.__combobox_changed_cb)
+
+ self._stores.append(store)
+ self._comboboxes.append(combobox)
+ self._attach_to_table(combobox, 1, 2, yoptions=gtk.SHRINK)
+
+ add_remove_box = self._create_add_remove_box()
+ self._add_remove_boxes.append(add_remove_box)
+ self._attach_to_table(add_remove_box, 2, 3)
+
+ add_remove_box.show_all()
+
+ if self._selected_lang_count > 1:
+ previous_add_removes = self._add_remove_boxes[-2]
+ previous_add_removes.hide_all()
+
+ combobox.show()
+
+ def _attach_to_table(self, widget, row, column, padding=20, \
+ yoptions=gtk.FILL):
+ self._table.attach(widget, row, column, \
+ self._selected_lang_count - 1, self._selected_lang_count, \
+ xoptions=gtk.FILL, yoptions=yoptions, xpadding=padding, \
+ ypadding=padding)
+
+ def _delete_last_row(self):
+ '''Deletes the last row of the table'''
+
+ self._selected_lang_count -= 1
+
+ label, add_remove_box, combobox, store_ = self._get_last_row()
+
+ label.destroy()
+ add_remove_box.destroy()
+ combobox.destroy()
+
+ self._table.resize(self._selected_lang_count, 3)
+
+ self._add_remove_boxes[-1].show_all()
+
+ def _get_last_row(self):
+ label = self._labels.pop()
+ add_remove_box = self._add_remove_boxes.pop()
+ combobox = self._comboboxes.pop()
+ store = self._stores.pop()
+
+ return label, add_remove_box, combobox, store
+
+ def setup(self):
+ for locale in self._selected_locales:
+ self._add_row(locale_code=locale)
+
+ def undo(self):
+ self._model.undo()
+ self._lang_alert.hide()
+
+ def _create_add_remove_box(self):
+ '''Creates gtk.Hbox with add/remove buttons'''
+ add_icon = Icon(icon_name='list-add')
+
+ add_button = gtk.Button()
+ add_button.set_image(add_icon)
+ add_button.connect('clicked',
+ self.__add_button_clicked_cb)
+
+ remove_icon = Icon(icon_name='list-remove')
+ remove_button = gtk.Button()
+ remove_button.set_image(remove_icon)
+ remove_button.connect('clicked',
+ self.__remove_button_clicked_cb)
+
+ if self._selected_lang_count == 1:
+ remove_button.set_sensitive(False)
+
+ add_remove_box = gtk.HButtonBox()
+ add_remove_box.set_layout(gtk.BUTTONBOX_START)
+ add_remove_box.set_spacing(10)
+ add_remove_box.pack_start(add_button)
+ add_remove_box.pack_start(remove_button)
+
+ return add_remove_box
+
+ def __add_button_clicked_cb(self, button):
+ self._add_row()
+ self._check_change()
+
+ def __remove_button_clicked_cb(self, button):
+ self._delete_last_row()
+ self._check_change()
+
+ def __combobox_changed_cb(self, button):
+ self._check_change()
+
+ def _check_change(self):
+ selected_langs = self._get_selected_langs()
+ self._changed = (selected_langs != self._selected_locales)
+
+ if self._changed == False:
+ # The user reverted back to the original config
+ self.needs_restart = False
+ if 'lang' in self.restart_alerts:
+ self.restart_alerts.remove('lang')
+ self._lang_alert.hide()
+ if self._lang_sid:
+ gobject.source_remove(self._lang_sid)
+ self._model.undo()
+ return False
+
+ if self._lang_sid:
+ gobject.source_remove(self._lang_sid)
+ self._lang_sid = gobject.timeout_add(self._APPLY_TIMEOUT,
+ self.__lang_timeout_cb,
+ selected_langs)
+
+ def _get_selected_langs(self):
+ new_codes = []
+ for combobox in self._comboboxes:
+ it = combobox.get_active_iter()
+ model = combobox.get_model()
+ lang_code = model.get(it, 0)[0]
+ new_codes.append(lang_code)
+
+ return new_codes
+
+ def __lang_timeout_cb(self, codes):
+ self._lang_sid = 0
+ self._model.set_languages(codes)
+ self.restart_alerts.append('lang')
+ self.needs_restart = True
+ self._lang_alert.props.msg = self.restart_msg
+ self._lang_alert.show()
+ return False
diff --git a/extensions/cpsection/network/Makefile.am b/extensions/cpsection/network/Makefile.am
new file mode 100644
index 0000000..35fd27c
--- /dev/null
+++ b/extensions/cpsection/network/Makefile.am
@@ -0,0 +1,6 @@
+sugardir = $(pkgdatadir)/extensions/cpsection/network
+
+sugar_PYTHON = \
+ __init__.py \
+ model.py \
+ view.py
diff --git a/src/model/devices/network/Makefile.in b/extensions/cpsection/network/Makefile.in
index cf6ff13..33c5890 100644
--- a/src/model/devices/network/Makefile.in
+++ b/extensions/cpsection/network/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/model/devices/network
+subdir = extensions/cpsection/network
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,14 +190,14 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/model/devices/network
+sugardir = $(pkgdatadir)/extensions/cpsection/network
sugar_PYTHON = \
__init__.py \
- mesh.py \
- wired.py \
- wireless.py
+ model.py \
+ view.py
all: all-am
@@ -208,9 +211,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/model/devices/network/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/cpsection/network/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/model/devices/network/Makefile
+ $(AUTOMAKE) --foreign extensions/cpsection/network/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/controlpanel/__init__.py b/extensions/cpsection/network/__init__.py
index a9dd95a..8fea274 100644
--- a/src/controlpanel/__init__.py
+++ b/extensions/cpsection/network/__init__.py
@@ -14,3 +14,12 @@
# 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 _
+
+CLASS = 'Network'
+ICON = 'module-network'
+TITLE = _('Network')
+KEYWORDS = ['network', 'jabber', 'radio', 'server']
+
+
+
diff --git a/extensions/cpsection/network/model.py b/extensions/cpsection/network/model.py
new file mode 100644
index 0000000..bfd008a
--- /dev/null
+++ b/extensions/cpsection/network/model.py
@@ -0,0 +1,123 @@
+# Copyright (C) 2008 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
+#
+
+import dbus
+from gettext import gettext as _
+import gconf
+
+_NM_SERVICE = 'org.freedesktop.NetworkManager'
+_NM_PATH = '/org/freedesktop/NetworkManager'
+_NM_IFACE = 'org.freedesktop.NetworkManager'
+
+KEYWORDS = ['network', 'jabber', 'radio', 'server']
+
+class ReadError(Exception):
+ def __init__(self, value):
+ self.value = value
+ def __str__(self):
+ return repr(self.value)
+
+def get_jabber():
+ client = gconf.client_get_default()
+ return client.get_string('/desktop/sugar/collaboration/jabber_server')
+
+def print_jabber():
+ print get_jabber()
+
+def set_jabber(server):
+ """Set the jabber server
+ server : e.g. 'olpc.collabora.co.uk'
+ """
+ client = gconf.client_get_default()
+ client.set_string('/desktop/sugar/collaboration/jabber_server', server)
+ return 1
+
+def get_radio():
+ bus = dbus.SystemBus()
+ try:
+ obj = bus.get_object(_NM_SERVICE, _NM_PATH)
+ nm_props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
+ except dbus.DBusException:
+ raise ReadError('%s service not available', _NM_SERVICE)
+
+ state = nm_props.Get(_NM_IFACE, 'WirelessEnabled')
+ if state in (0, 1):
+ return state
+ else:
+ raise ReadError(_('State is unknown.'))
+
+def print_radio():
+ print ('off', 'on')[get_radio()]
+
+def set_radio(state):
+ """Turn Radio 'on' or 'off'
+ state : 'on/off'
+ """
+ if state == 'on' or state == 1:
+ bus = dbus.SystemBus()
+ try:
+ obj = bus.get_object(_NM_SERVICE, _NM_PATH)
+ nm_props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
+ except dbus.DBusException:
+ raise ReadError('%s service not available', _NM_SERVICE)
+ nm_props.Set(_NM_IFACE, 'WirelessEnabled', True)
+ elif state == 'off' or state == 0:
+ bus = dbus.SystemBus()
+ try:
+ obj = bus.get_object(_NM_SERVICE, _NM_PATH)
+ nm_props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
+ except dbus.DBusException:
+ raise ReadError('%s service not available', _NM_SERVICE)
+ nm_props.Set(_NM_IFACE, 'WirelessEnabled', False)
+ else:
+ raise ValueError(_("Error in specified radio argument use on/off."))
+
+ return 0
+
+def clear_registration():
+ """Clear the registration with the schoolserver
+ """
+ client = gconf.client_get_default()
+ client.set_string('/desktop/sugar/backup_url', '')
+ return 1
+
+def clear_networks():
+ """Clear saved passwords and network configurations.
+ """
+ pass
+
+def get_publish_information():
+ client = gconf.client_get_default()
+ publish = client.get_bool('/desktop/sugar/collaboration/publish_gadget')
+ return publish
+
+def print_publish_information():
+ print get_publish_information()
+
+def set_publish_information(value):
+ """ If set to true, Sugar will make you searchable for
+ the other users of the Jabber server.
+ value: 0/1
+ """
+ try:
+ value = (False, True)[int(value)]
+ except:
+ raise ValueError(_("Error in specified argument use 0/1."))
+
+ client = gconf.client_get_default()
+ client.set_bool('/desktop/sugar/collaboration/publish_gadget', value)
+ return 0
diff --git a/src/controlpanel/view/network.py b/extensions/cpsection/network/view.py
index 2b19656..9a7f387 100644
--- a/src/controlpanel/view/network.py
+++ b/extensions/cpsection/network/view.py
@@ -20,8 +20,8 @@ from gettext import gettext as _
from sugar.graphics import style
-from controlpanel.sectionview import SectionView
-from controlpanel.inlinealert import InlineAlert
+from jarabe.controlpanel.sectionview import SectionView
+from jarabe.controlpanel.inlinealert import InlineAlert
CLASS = 'Network'
ICON = 'module-network'
@@ -59,7 +59,7 @@ class Network(SectionView):
box_wireless.set_border_width(style.DEFAULT_SPACING * 2)
box_wireless.set_spacing(style.DEFAULT_SPACING)
- radio_info = gtk.Label(_("Turn of the wireless radio to save "
+ radio_info = gtk.Label(_("Turn off the wireless radio to save "
"battery life"))
radio_info.set_alignment(0, 0)
radio_info.set_line_wrap(True)
@@ -110,7 +110,7 @@ class Network(SectionView):
self.pack_start(separator_mesh, False)
separator_mesh.show()
- label_mesh = gtk.Label(_('Mesh'))
+ label_mesh = gtk.Label(_('Collaboration'))
label_mesh.set_alignment(0, 0)
self.pack_start(label_mesh, expand=False)
label_mesh.show()
@@ -118,6 +118,15 @@ class Network(SectionView):
box_mesh.set_border_width(style.DEFAULT_SPACING * 2)
box_mesh.set_spacing(style.DEFAULT_SPACING)
+ server_info = gtk.Label(_("The server is the equivalent of what"
+ " room you are in; people on the same server"
+ " will be able to see each other, even when"
+ " they aren't on the same network."))
+ server_info.set_alignment(0, 0)
+ server_info.set_line_wrap(True)
+ box_mesh.pack_start(server_info, expand=False)
+ server_info.show()
+
box_server = gtk.HBox(spacing=style.DEFAULT_SPACING)
label_server = gtk.Label(_('Server:'))
label_server.set_alignment(1, 0.5)
diff --git a/extensions/cpsection/power/Makefile.am b/extensions/cpsection/power/Makefile.am
new file mode 100644
index 0000000..325260c
--- /dev/null
+++ b/extensions/cpsection/power/Makefile.am
@@ -0,0 +1,6 @@
+sugardir = $(pkgdatadir)/extensions/cpsection/power
+
+sugar_PYTHON = \
+ __init__.py \
+ model.py \
+ view.py
diff --git a/src/controlpanel/model/Makefile.in b/extensions/cpsection/power/Makefile.in
index ba3f6e2..c4048b5 100644
--- a/src/controlpanel/model/Makefile.in
+++ b/extensions/cpsection/power/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/controlpanel/model
+subdir = extensions/cpsection/power
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,18 +190,14 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/controlpanel/model
+sugardir = $(pkgdatadir)/extensions/cpsection/power
sugar_PYTHON = \
- __init__.py \
- aboutme.py \
- aboutxo.py \
- datetime.py \
- frame.py \
- language.py \
- network.py \
- power.py
+ __init__.py \
+ model.py \
+ view.py
all: all-am
@@ -212,9 +211,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/controlpanel/model/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/cpsection/power/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/controlpanel/model/Makefile
+ $(AUTOMAKE) --foreign extensions/cpsection/power/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/bin/sugar-control-panel.in b/extensions/cpsection/power/__init__.py
index 922f95c..8b2e85f 100644
--- a/bin/sugar-control-panel.in
+++ b/extensions/cpsection/power/__init__.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-# Copyright (C) 2008, Red Hat, Inc.
+# 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
@@ -13,14 +12,12 @@
#
# 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-import sys
-
-sys.path.insert(0, '@prefix@/share/sugar/shell')
-
-from controlpanel.cmd import main
-
-main()
+from gettext import gettext as _
+CLASS = 'Power'
+ICON = 'module-power'
+TITLE = _('Power')
+KEYWORDS = ['automatic', 'extreme', 'power', 'suspend', 'battery']
diff --git a/src/controlpanel/model/power.py b/extensions/cpsection/power/model.py
index bcf84f3..c76035d 100644
--- a/src/controlpanel/model/power.py
+++ b/extensions/cpsection/power/model.py
@@ -16,16 +16,14 @@
#
from gettext import gettext as _
+import gconf
-from sugar import profile
import dbus
OHM_SERVICE_NAME = 'org.freedesktop.ohm'
OHM_SERVICE_PATH = '/org/freedesktop/ohm/Keystore'
OHM_SERVICE_IFACE = 'org.freedesktop.ohm.Keystore'
-KEYWORDS = ['automatic', 'extreme', 'power', 'suspend', 'battery']
-
class ReadError(Exception):
def __init__(self, value):
self.value = value
@@ -33,9 +31,8 @@ class ReadError(Exception):
return repr(self.value)
def get_automatic_pm():
- pro = profile.get_profile()
- ret = pro.automatic_pm
- return ret
+ client = gconf.client_get_default()
+ return client.get_bool('/desktop/sugar/power/automatic')
def print_automatic_pm():
print ('off', 'on')[get_automatic_pm()]
@@ -56,15 +53,13 @@ def set_automatic_pm(enabled):
else:
raise ValueError(_("Error in automatic pm argument, use on/off."))
- pro = profile.get_profile()
- pro.automatic_pm = enabled
- pro.save()
+ client = gconf.client_get_default()
+ client.set_bool('/desktop/sugar/power/automatic', enabled)
return 0
def get_extreme_pm():
- pro = profile.get_profile()
- ret = pro.extreme_pm
- return ret
+ client = gconf.client_get_default()
+ return client.get_bool('/desktop/sugar/power/extreme')
def print_extreme_pm():
print ('off', 'on')[get_extreme_pm()]
@@ -85,7 +80,6 @@ def set_extreme_pm(enabled):
else:
raise ValueError(_("Error in extreme pm argument, use on/off."))
- pro = profile.get_profile()
- pro.extreme_pm = enabled
- pro.save()
+ client = gconf.client_get_default()
+ client.set_bool('/desktop/sugar/power/extreme', enabled)
return 0
diff --git a/src/controlpanel/view/power.py b/extensions/cpsection/power/view.py
index f4d817b..8f1ed56 100644
--- a/src/controlpanel/view/power.py
+++ b/extensions/cpsection/power/view.py
@@ -19,12 +19,8 @@ from gettext import gettext as _
from sugar.graphics import style
-from controlpanel.sectionview import SectionView
-from controlpanel.inlinealert import InlineAlert
-
-CLASS = 'Power'
-ICON = 'module-power'
-TITLE = _('Power')
+from jarabe.controlpanel.sectionview import SectionView
+from jarabe.controlpanel.inlinealert import InlineAlert
class Power(SectionView):
def __init__(self, model, alerts):
@@ -86,7 +82,8 @@ class Power(SectionView):
box_extreme_pm = gtk.HBox(spacing=style.DEFAULT_SPACING)
label_extreme_pm = gtk.Label(
- _('Extreme power management (disables wireless radio, increases battery life)'))
+ _('Extreme power management (disables' \
+ 'wireless radio, increases battery life)'))
label_extreme_pm.set_alignment(0, 0.5)
self._extreme_button = gtk.CheckButton()
self._extreme_button.set_alignment(0, 0)
diff --git a/extensions/deviceicon/Makefile.am b/extensions/deviceicon/Makefile.am
new file mode 100644
index 0000000..8a2e765
--- /dev/null
+++ b/extensions/deviceicon/Makefile.am
@@ -0,0 +1,8 @@
+sugardir = $(pkgdatadir)/extensions/deviceicon
+
+sugar_PYTHON = \
+ __init__.py \
+ battery.py \
+ network.py \
+ speaker.py \
+ volume.py
diff --git a/src/model/devices/network/Makefile.in b/extensions/deviceicon/Makefile.in
index cf6ff13..eb543a2 100644
--- a/src/model/devices/network/Makefile.in
+++ b/extensions/deviceicon/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/model/devices/network
+subdir = extensions/deviceicon
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,14 +190,16 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/model/devices/network
+sugardir = $(pkgdatadir)/extensions/deviceicon
sugar_PYTHON = \
__init__.py \
- mesh.py \
- wired.py \
- wireless.py
+ battery.py \
+ network.py \
+ speaker.py \
+ volume.py
all: all-am
@@ -208,9 +213,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/model/devices/network/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/deviceicon/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/model/devices/network/Makefile
+ $(AUTOMAKE) --foreign extensions/deviceicon/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/intro/__init__.py b/extensions/deviceicon/__init__.py
index e69de29..e69de29 100644
--- a/src/intro/__init__.py
+++ b/extensions/deviceicon/__init__.py
diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py
new file mode 100644
index 0000000..f83a80d
--- /dev/null
+++ b/extensions/deviceicon/battery.py
@@ -0,0 +1,252 @@
+# Copyright (C) 2006-2007, Red Hat, Inc.
+#
+# 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 logging
+from gettext import gettext as _
+import gconf
+
+import gobject
+import gtk
+import dbus
+
+from sugar.graphics import style
+from sugar.graphics.icon import get_icon_state
+from sugar.graphics.tray import TrayIcon
+from sugar.graphics.palette import Palette
+from sugar.graphics.xocolor import XoColor
+
+from jarabe.frame.frameinvoker import FrameWidgetInvoker
+
+_ICON_NAME = 'battery'
+
+_STATUS_CHARGING = 0
+_STATUS_DISCHARGING = 1
+_STATUS_FULLY_CHARGED = 2
+_STATUS_NOT_PRESENT = 3
+
+_LEVEL_PROP = 'battery.charge_level.percentage'
+_CHARGING_PROP = 'battery.rechargeable.is_charging'
+_DISCHARGING_PROP = 'battery.rechargeable.is_discharging'
+_PRESENT_PROP = 'battery.present'
+
+class DeviceView(TrayIcon):
+
+ FRAME_POSITION_RELATIVE = 101
+
+ def __init__(self, udi):
+ client = gconf.client_get_default()
+ self._color = XoColor(client.get_string('/desktop/sugar/user/color'))
+
+ TrayIcon.__init__(self, icon_name=_ICON_NAME, xo_color=self._color)
+
+ self._model = DeviceModel(udi)
+ self.palette = BatteryPalette(_('My Battery'))
+ self.set_palette(self.palette)
+ self.palette.props.invoker = FrameWidgetInvoker(self)
+ self.palette.set_group_id('frame')
+
+ self._model.connect('notify::level',
+ self._battery_status_changed_cb)
+ self._model.connect('notify::charging',
+ self._battery_status_changed_cb)
+ self._model.connect('notify::discharging',
+ self._battery_status_changed_cb)
+ self._model.connect('notify::present',
+ self._battery_status_changed_cb)
+ self._update_info()
+
+ def _update_info(self):
+ name = _ICON_NAME
+ current_level = self._model.props.level
+ xo_color = self._color
+ badge_name = None
+
+ if not self._model.props.present:
+ status = _STATUS_NOT_PRESENT
+ badge_name = None
+ xo_color = XoColor('%s,%s' % (style.COLOR_WHITE.get_svg(),
+ style.COLOR_WHITE.get_svg()))
+ elif self._model.props.charging:
+ status = _STATUS_CHARGING
+ name += '-charging'
+ xo_color = XoColor('%s,%s' % (style.COLOR_WHITE.get_svg(),
+ style.COLOR_WHITE.get_svg()))
+ elif self._model.props.discharging:
+ status = _STATUS_DISCHARGING
+ if current_level <= 15:
+ badge_name = 'emblem-warning'
+ else:
+ status = _STATUS_FULLY_CHARGED
+
+ self.icon.props.icon_name = get_icon_state(name, current_level, step=-5)
+ self.icon.props.xo_color = xo_color
+ self.icon.props.badge_name = badge_name
+
+ self.palette.set_level(current_level)
+ self.palette.set_status(status)
+
+ def _battery_status_changed_cb(self, pspec, param):
+ self._update_info()
+
+class BatteryPalette(Palette):
+
+ def __init__(self, primary_text):
+ Palette.__init__(self, primary_text)
+
+ self._level = 0
+ self._progress_bar = gtk.ProgressBar()
+ self._progress_bar.set_size_request(
+ style.zoom(style.GRID_CELL_SIZE * 4), -1)
+ self._progress_bar.show()
+ self._status_label = gtk.Label()
+ self._status_label.show()
+
+ vbox = gtk.VBox()
+ vbox.pack_start(self._progress_bar)
+ vbox.pack_start(self._status_label)
+ vbox.show()
+
+ self._progress_widget = vbox
+ self.set_content(self._progress_widget)
+
+ def set_level(self, percent):
+ self._level = percent
+ fraction = percent / 100.0
+ self._progress_bar.set_fraction(fraction)
+
+ def set_status(self, status):
+ current_level = self._level
+ secondary_text = ''
+ status_text = '%s%%' % current_level
+
+ progress_widget = self._progress_widget
+ if status == _STATUS_NOT_PRESENT:
+ secondary_text = _('Removed')
+ progress_widget = None
+ elif status == _STATUS_CHARGING:
+ secondary_text = _('Charging')
+ elif status == _STATUS_DISCHARGING:
+ if current_level <= 15:
+ secondary_text = _('Very little power remaining')
+ else:
+ #TODO: make this less of an wild/educated guess
+ minutes_remaining = int(current_level / 0.59)
+ remaining_hourpart = minutes_remaining / 60
+ remaining_minpart = minutes_remaining % 60
+ secondary_text = _('%(hour)d:%(min).2d remaining'
+ % { 'hour': remaining_hourpart,
+ 'min': remaining_minpart})
+ else:
+ secondary_text = _('Charged')
+ self.set_content(progress_widget)
+
+ self.props.secondary_text = secondary_text
+ self._status_label.set_text(status_text)
+
+class DeviceModel(gobject.GObject):
+ __gproperties__ = {
+ 'level' : (int, None, None, 0, 100, 0,
+ gobject.PARAM_READABLE),
+ 'charging' : (bool, None, None, False,
+ gobject.PARAM_READABLE),
+ 'discharging' : (bool, None, None, False,
+ gobject.PARAM_READABLE),
+ 'present' : (bool, None, None, False,
+ gobject.PARAM_READABLE)
+ }
+
+ def __init__(self, udi):
+ gobject.GObject.__init__(self)
+
+ bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
+ proxy = bus.get_object('org.freedesktop.Hal', udi,
+ follow_name_owner_changes=True)
+ self._battery = dbus.Interface(proxy, 'org.freedesktop.Hal.Device')
+ bus.add_signal_receiver(self._battery_changed,
+ 'PropertyModified',
+ 'org.freedesktop.Hal.Device',
+ 'org.freedesktop.Hal',
+ udi)
+
+ self._level = self._get_level()
+ self._charging = self._get_charging()
+ self._discharging = self._get_discharging()
+ self._present = self._get_present()
+
+ def _get_level(self):
+ try:
+ return self._battery.GetProperty(_LEVEL_PROP)
+ except dbus.DBusException:
+ logging.error('Cannot access %s' % _LEVEL_PROP)
+ return 0
+
+ def _get_charging(self):
+ try:
+ return self._battery.GetProperty(_CHARGING_PROP)
+ except dbus.DBusException:
+ logging.error('Cannot access %s' % _CHARGING_PROP)
+ return False
+
+ def _get_discharging(self):
+ try:
+ return self._battery.GetProperty(_DISCHARGING_PROP)
+ except dbus.DBusException:
+ logging.error('Cannot access %s' % _DISCHARGING_PROP)
+ return False
+
+ def _get_present(self):
+ try:
+ return self._battery.GetProperty(_PRESENT_PROP)
+ except dbus.DBusException:
+ logging.error('Cannot access %s' % _PRESENT_PROP)
+ return False
+
+ def do_get_property(self, pspec):
+ if pspec.name == 'level':
+ return self._level
+ if pspec.name == 'charging':
+ return self._charging
+ if pspec.name == 'discharging':
+ return self._discharging
+ if pspec.name == 'present':
+ return self._present
+
+ def get_type(self):
+ return 'battery'
+
+ def _battery_changed(self, num_changes, changes_list):
+ for change in changes_list:
+ if change[0] == _LEVEL_PROP:
+ self._level = self._get_level()
+ self.notify('level')
+ elif change[0] == _CHARGING_PROP:
+ self._charging = self._get_charging()
+ self.notify('charging')
+ elif change[0] == _DISCHARGING_PROP:
+ self._discharging = self._get_discharging()
+ self.notify('discharging')
+ elif change[0] == _PRESENT_PROP:
+ self._present = self._get_present()
+ self.notify('present')
+
+def setup(tray):
+ bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
+ proxy = bus.get_object('org.freedesktop.Hal',
+ '/org/freedesktop/Hal/Manager')
+ hal_manager = dbus.Interface(proxy, 'org.freedesktop.Hal.Manager')
+
+ for udi in hal_manager.FindDeviceByCapability('battery'):
+ tray.add_device(DeviceView(udi))
diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
new file mode 100644
index 0000000..d52f083
--- /dev/null
+++ b/extensions/deviceicon/network.py
@@ -0,0 +1,543 @@
+#
+# Copyright (C) 2008 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 logging
+import sha
+import socket
+import struct
+
+import gtk
+import gobject
+import gconf
+import dbus
+
+from sugar.graphics.icon import get_icon_state
+from sugar.graphics import style
+from sugar.graphics.palette import Palette
+from sugar.graphics.toolbutton import ToolButton
+from sugar.graphics.tray import TrayIcon
+from sugar.graphics import xocolor
+
+from jarabe.model import network
+from jarabe.frame.frameinvoker import FrameWidgetInvoker
+from jarabe.view.pulsingicon import PulsingIcon
+
+IP_ADDRESS_TEXT_TEMPLATE = _("IP address: %s")
+
+_NM_SERVICE = 'org.freedesktop.NetworkManager'
+_NM_IFACE = 'org.freedesktop.NetworkManager'
+_NM_PATH = '/org/freedesktop/NetworkManager'
+_NM_DEVICE_IFACE = 'org.freedesktop.NetworkManager.Device'
+_NM_WIRED_IFACE = 'org.freedesktop.NetworkManager.Device.Wired'
+_NM_WIRELESS_IFACE = 'org.freedesktop.NetworkManager.Device.Wireless'
+_NM_ACCESSPOINT_IFACE = 'org.freedesktop.NetworkManager.AccessPoint'
+_NM_ACTIVE_CONN_IFACE = 'org.freedesktop.NetworkManager.Connection.Active'
+
+_NM_DEVICE_STATE_UNKNOWN = 0
+_NM_DEVICE_STATE_UNMANAGED = 1
+_NM_DEVICE_STATE_UNAVAILABLE = 2
+_NM_DEVICE_STATE_DISCONNECTED = 3
+_NM_DEVICE_STATE_PREPARE = 4
+_NM_DEVICE_STATE_CONFIG = 5
+_NM_DEVICE_STATE_NEED_AUTH = 6
+_NM_DEVICE_STATE_IP_CONFIG = 7
+_NM_DEVICE_STATE_ACTIVATED = 8
+_NM_DEVICE_STATE_FAILED = 9
+
+def frequency_to_channel(frequency):
+ ftoc = { 2412: 1, 2417: 2, 2422: 3, 2427: 4,
+ 2432: 5, 2437: 6, 2442: 7, 2447: 8,
+ 2452: 9, 2457: 10, 2462: 11, 2467: 12,
+ 2472: 13}
+ return ftoc[frequency]
+
+class WirelessPalette(Palette):
+ __gtype_name__ = 'SugarWirelessPalette'
+
+ __gsignals__ = {
+ 'deactivate-connection' : (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE, ([]))
+ }
+
+ def __init__(self, primary_text):
+ Palette.__init__(self, label=primary_text)
+
+ self._disconnect_item = None
+
+ self._channel_label = gtk.Label()
+ self._channel_label.props.xalign = 0.0
+ self._channel_label.show()
+
+ self._ip_address_label = gtk.Label()
+
+ self._info = gtk.VBox()
+
+ def _padded(child, xalign=0, yalign=0.5):
+ padder = gtk.Alignment(xalign=xalign, yalign=yalign,
+ xscale=1, yscale=0.33)
+ padder.set_padding(style.DEFAULT_SPACING,
+ style.DEFAULT_SPACING,
+ style.DEFAULT_SPACING,
+ style.DEFAULT_SPACING)
+ padder.add(child)
+ return padder
+
+ self._info.pack_start(_padded(self._channel_label))
+ self._info.pack_start(_padded(self._ip_address_label))
+ self._info.show_all()
+
+ self._disconnect_item = gtk.MenuItem(_('Disconnect...'))
+ self._disconnect_item.connect('activate', self.__disconnect_activate_cb)
+ self.menu.append(self._disconnect_item)
+
+ def set_connecting(self):
+ self.props.secondary_text = _('Connecting...')
+
+ def set_connected(self, frequency, iaddress):
+ self.set_content(self._info)
+ self.props.secondary_text = _('Connected')
+ self._set_channel(frequency)
+ self._set_ip_address(iaddress)
+ self._disconnect_item.show()
+
+ def __disconnect_activate_cb(self, menuitem):
+ self.emit('deactivate-connection')
+
+ def _set_channel(self, frequency):
+ try:
+ channel = frequency_to_channel(frequency)
+ except KeyError:
+ channel = 0
+ self._channel_label.set_text("%s: %d" % (_("Channel"), channel))
+
+ def _set_ip_address(self, ip_address):
+ if ip_address is not None:
+ ip_address_text = IP_ADDRESS_TEXT_TEMPLATE % \
+ socket.inet_ntoa(struct.pack('I', ip_address))
+ else:
+ ip_address_text = ""
+ self._ip_address_label.set_text(ip_address_text)
+
+
+class WiredPalette(Palette):
+ __gtype_name__ = 'SugarWiredPalette'
+
+ def __init__(self):
+ Palette.__init__(self, label=_('Wired Network'))
+
+ self._speed_label = gtk.Label()
+ self._speed_label.props.xalign = 0.0
+ self._speed_label.show()
+
+ self._ip_address_label = gtk.Label()
+
+ self._info = gtk.VBox()
+
+ def _padded(child, xalign=0, yalign=0.5):
+ padder = gtk.Alignment(xalign=xalign, yalign=yalign,
+ xscale=1, yscale=0.33)
+ padder.set_padding(style.DEFAULT_SPACING,
+ style.DEFAULT_SPACING,
+ style.DEFAULT_SPACING,
+ style.DEFAULT_SPACING)
+ padder.add(child)
+ return padder
+
+ self._info.pack_start(_padded(self._speed_label))
+ self._info.pack_start(_padded(self._ip_address_label))
+ self._info.show_all()
+
+ self.set_content(self._info)
+ self.props.secondary_text = _('Connected')
+
+ def set_connected(self, speed, iaddress):
+ self._speed_label.set_text('%s: %d Mb/s' % (_('Speed'), speed))
+ self._set_ip_address(iaddress)
+
+ def _inet_ntoa(self, iaddress):
+ address = ['%s' % ((iaddress >> i) % 256) for i in [0, 8, 16, 24]]
+ return ".".join(address)
+
+ def _set_ip_address(self, ip_address):
+ if ip_address is not None:
+ ip_address_text = IP_ADDRESS_TEXT_TEMPLATE % \
+ socket.inet_ntoa(struct.pack('I', ip_address))
+ else:
+ ip_address_text = ""
+ self._ip_address_label.set_text(ip_address_text)
+
+
+class WirelessDeviceView(ToolButton):
+
+ _ICON_NAME = 'network-wireless'
+ FRAME_POSITION_RELATIVE = 302
+
+ def __init__(self, device):
+ ToolButton.__init__(self)
+
+ self._bus = dbus.SystemBus()
+ self._device = device
+ self._flags = 0
+ self._name = ''
+ self._strength = 0
+ self._frequency = 0
+ self._device_state = None
+ self._color = None
+ self._active_ap_op = None
+
+ self._icon = PulsingIcon()
+ self._icon.props.icon_name = get_icon_state(self._ICON_NAME, 0)
+ self._inactive_color = xocolor.XoColor( \
+ "%s,%s" % (style.COLOR_BUTTON_GREY.get_svg(),
+ style.COLOR_TRANSPARENT.get_svg()))
+ self._icon.props.pulse_color = self._inactive_color
+ self._icon.props.base_color = self._inactive_color
+
+ self.set_icon_widget(self._icon)
+ self._icon.show()
+
+ self._palette = WirelessPalette(self._name)
+ self._palette.connect('deactivate-connection',
+ self.__deactivate_connection)
+ self.set_palette(self._palette)
+ self._palette.props.invoker = FrameWidgetInvoker(self)
+ self._palette.set_group_id('frame')
+
+ props = dbus.Interface(self._device, 'org.freedesktop.DBus.Properties')
+ props.GetAll(_NM_DEVICE_IFACE, byte_arrays=True,
+ reply_handler=self.__get_device_props_reply_cb,
+ error_handler=self.__get_device_props_error_cb)
+
+ self._device.Get(_NM_WIRELESS_IFACE, 'ActiveAccessPoint',
+ reply_handler=self.__get_active_ap_reply_cb,
+ error_handler=self.__get_active_ap_error_cb)
+
+ self._bus.add_signal_receiver(self.__state_changed_cb,
+ signal_name='StateChanged',
+ path=self._device.object_path,
+ dbus_interface=_NM_DEVICE_IFACE)
+
+ def disconnect(self):
+ self._bus.remove_signal_receiver(self.__state_changed_cb,
+ signal_name='StateChanged',
+ path=self._device.object_path,
+ dbus_interface=_NM_DEVICE_IFACE)
+
+ def __get_device_props_reply_cb(self, properties):
+ if 'State' in properties:
+ self._device_state = properties['State']
+ self._update_state()
+
+ def __get_device_props_error_cb(self, err):
+ logging.error('Error getting the device properties: %s', err)
+
+ def __get_active_ap_reply_cb(self, active_ap_op):
+ if self._active_ap_op != active_ap_op:
+ if self._active_ap_op is not None:
+ self._bus.remove_signal_receiver(
+ self.__ap_properties_changed_cb,
+ signal_name='PropertiesChanged',
+ path=self._active_ap_op,
+ dbus_interface=_NM_ACCESSPOINT_IFACE)
+ if active_ap_op == '/':
+ self._active_ap_op = None
+ return
+ self._active_ap_op = active_ap_op
+ active_ap = self._bus.get_object(_NM_SERVICE, active_ap_op)
+ props = dbus.Interface(active_ap, 'org.freedesktop.DBus.Properties')
+
+ props.GetAll(_NM_ACCESSPOINT_IFACE, byte_arrays=True,
+ reply_handler=self.__get_all_ap_props_reply_cb,
+ error_handler=self.__get_all_ap_props_error_cb)
+
+ self._bus.add_signal_receiver(self.__ap_properties_changed_cb,
+ signal_name='PropertiesChanged',
+ path=self._active_ap_op,
+ dbus_interface=_NM_ACCESSPOINT_IFACE)
+
+ def __get_active_ap_error_cb(self, err):
+ logging.error('Error getting the active access point: %s', err)
+
+ def __state_changed_cb(self, new_state, old_state, reason):
+ self._device_state = new_state
+ self._update_state()
+
+ self._device.Get(_NM_WIRELESS_IFACE, 'ActiveAccessPoint',
+ reply_handler=self.__get_active_ap_reply_cb,
+ error_handler=self.__get_active_ap_error_cb)
+
+ def __ap_properties_changed_cb(self, properties):
+ self._update_properties(properties)
+
+ def _update_properties(self, properties):
+ if 'Ssid' in properties:
+ self._name = properties['Ssid']
+ if 'Strength' in properties:
+ self._strength = properties['Strength']
+ if 'Flags' in properties:
+ self._flags = properties['Flags']
+ if 'Frequency' in properties:
+ self._frequency = properties['Frequency']
+
+ sh = sha.new()
+ data = self._name + hex(self._flags)
+ sh.update(data)
+ h = hash(sh.digest())
+ idx = h % len(xocolor.colors)
+
+ self._color = xocolor.XoColor('%s,%s' % (xocolor.colors[idx][0],
+ xocolor.colors[idx][1]))
+ self._update()
+
+ def __get_all_ap_props_reply_cb(self, properties):
+ self._update_properties(properties)
+
+ def __get_all_ap_props_error_cb(self, err):
+ logging.error('Error getting the access point properties: %s', err)
+
+ def _update(self):
+ if self._flags == network.NM_802_11_AP_FLAGS_PRIVACY:
+ self._icon.props.badge_name = "emblem-locked"
+ else:
+ self._icon.props.badge_name = None
+
+ self._palette.props.primary_text = self._name
+
+ self._update_state()
+ self._update_color()
+
+ def _update_state(self):
+ if self._active_ap_op is not None:
+ state = self._device_state
+ else:
+ state = network.DEVICE_STATE_UNKNOWN
+
+ if state == network.DEVICE_STATE_ACTIVATED:
+ icon_name = '%s-connected' % self._ICON_NAME
+ else:
+ icon_name = self._ICON_NAME
+
+ icon_name = get_icon_state(icon_name, self._strength)
+ if icon_name:
+ self._icon.props.icon_name = icon_name
+
+ if state == network.DEVICE_STATE_PREPARE or \
+ state == network.DEVICE_STATE_CONFIG or \
+ state == network.DEVICE_STATE_NEED_AUTH or \
+ state == network.DEVICE_STATE_IP_CONFIG:
+ self._palette.set_connecting()
+ self._icon.props.pulsing = True
+ elif state == network.DEVICE_STATE_ACTIVATED:
+ props = dbus.Interface(self._device,
+ 'org.freedesktop.DBus.Properties')
+ address = props.Get(_NM_DEVICE_IFACE, 'Ip4Address')
+ self._palette.set_connected(self._frequency, address)
+ self._icon.props.pulsing = False
+
+ def _update_color(self):
+ self._icon.props.base_color = self._color
+
+ def __deactivate_connection(self, palette, data=None):
+ if self._active_ap_op is not None:
+ obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
+ netmgr = dbus.Interface(obj, _NM_IFACE)
+ netmgr_props = dbus.Interface(
+ netmgr, 'org.freedesktop.DBus.Properties')
+ active_connections_o = netmgr_props.Get(_NM_IFACE,
+ 'ActiveConnections')
+
+ for conn_o in active_connections_o:
+ obj = self._bus.get_object(_NM_IFACE, conn_o)
+ props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
+ ap_op = props.Get(_NM_ACTIVE_CONN_IFACE, 'SpecificObject')
+ if ap_op == self._active_ap_op:
+ netmgr.DeactivateConnection(conn_o)
+ break
+
+
+class WiredDeviceView(TrayIcon):
+
+ _ICON_NAME = 'network-wired'
+ FRAME_POSITION_RELATIVE = 301
+
+ def __init__(self, speed, address):
+ client = gconf.client_get_default()
+ color = xocolor.XoColor(client.get_string('/desktop/sugar/user/color'))
+
+ TrayIcon.__init__(self, icon_name=self._ICON_NAME, xo_color=color)
+
+ self._palette = WiredPalette()
+ self.set_palette(self._palette)
+ self._palette.props.invoker = FrameWidgetInvoker(self)
+ self._palette.set_group_id('frame')
+ self._palette.set_connected(speed, address)
+
+
+class WirelessDeviceObserver(object):
+ def __init__(self, device, tray):
+ self._bus = dbus.SystemBus()
+ self._device = device
+ self._device_view = None
+ self._tray = tray
+
+ props = dbus.Interface(self._device, 'org.freedesktop.DBus.Properties')
+ props.GetAll(_NM_DEVICE_IFACE, byte_arrays=True,
+ reply_handler=self.__get_device_props_reply_cb,
+ error_handler=self.__get_device_props_error_cb)
+
+ self._bus.add_signal_receiver(self.__state_changed_cb,
+ signal_name='StateChanged',
+ path=self._device.object_path,
+ dbus_interface=_NM_DEVICE_IFACE)
+
+ def disconnect(self):
+ self._bus.remove_signal_receiver(self.__state_changed_cb,
+ signal_name='StateChanged',
+ path=self._device.object_path,
+ dbus_interface=_NM_DEVICE_IFACE)
+
+ def __get_device_props_reply_cb(self, properties):
+ if 'State' in properties:
+ self._update_state(properties['State'])
+
+ def __get_device_props_error_cb(self, err):
+ logging.error('Error getting the device properties: %s', err)
+
+ def __state_changed_cb(self, new_state, old_state, reason):
+ self._update_state(new_state)
+
+ def _update_state(self, state):
+ if state == network.DEVICE_STATE_PREPARE or \
+ state == network.DEVICE_STATE_CONFIG or \
+ state == network.DEVICE_STATE_NEED_AUTH or \
+ state == network.DEVICE_STATE_IP_CONFIG or \
+ state == network.DEVICE_STATE_ACTIVATED:
+ if self._device_view is None:
+ self._device_view = WirelessDeviceView(self._device)
+ self._tray.add_device(self._device_view)
+ else:
+ if self._device_view is not None:
+ self._device_view.disconnect()
+ self._tray.remove_device(self._device_view)
+ del self._device_view
+ self._device_view = None
+
+
+class WiredDeviceObserver(object):
+ def __init__(self, device, tray):
+ self._bus = dbus.SystemBus()
+ self._device = device
+ self._device_state = None
+ self._device_view = None
+ self._tray = tray
+
+ props = dbus.Interface(self._device, 'org.freedesktop.DBus.Properties')
+ props.GetAll(_NM_DEVICE_IFACE, byte_arrays=True,
+ reply_handler=self.__get_device_props_reply_cb,
+ error_handler=self.__get_device_props_error_cb)
+
+ self._bus.add_signal_receiver(self.__state_changed_cb,
+ signal_name='StateChanged',
+ path=self._device.object_path,
+ dbus_interface=_NM_DEVICE_IFACE)
+
+ def disconnect(self):
+ self._bus.remove_signal_receiver(self.__state_changed_cb,
+ signal_name='StateChanged',
+ path=self._device.object_path,
+ dbus_interface=_NM_DEVICE_IFACE)
+
+ def __get_device_props_reply_cb(self, properties):
+ if 'State' in properties:
+ self._update_state(properties['State'])
+
+ def __get_device_props_error_cb(self, err):
+ logging.error('Error getting the device properties: %s', err)
+
+ def __state_changed_cb(self, new_state, old_state, reason):
+ self._update_state(new_state)
+
+ def _update_state(self, state):
+ if state == network.DEVICE_STATE_ACTIVATED:
+ props = dbus.Interface(self._device,
+ 'org.freedesktop.DBus.Properties')
+ address = props.Get(_NM_DEVICE_IFACE, 'Ip4Address')
+ speed = props.Get(_NM_WIRED_IFACE, 'Speed')
+ self._device_view = WiredDeviceView(speed, address)
+ self._tray.add_device(self._device_view)
+ else:
+ if self._device_view is not None:
+ self._tray.remove_device(self._device_view)
+ del self._device_view
+ self._device_view = None
+
+
+class NetworkManagerObserver(object):
+ def __init__(self, tray):
+ self._bus = dbus.SystemBus()
+ self._devices = {}
+ self._netmgr = None
+ self._tray = tray
+
+ try:
+ obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
+ self._netmgr = dbus.Interface(obj, _NM_IFACE)
+ except dbus.DBusException:
+ logging.error('%s service not available', _NM_SERVICE)
+ return
+
+ self._netmgr.GetDevices(reply_handler=self.__get_devices_reply_cb,
+ error_handler=self.__get_devices_error_cb)
+
+ self._bus.add_signal_receiver(self.__device_added_cb,
+ signal_name='DeviceAdded',
+ dbus_interface=_NM_IFACE)
+ self._bus.add_signal_receiver(self.__device_removed_cb,
+ signal_name='DeviceRemoved',
+ dbus_interface=_NM_IFACE)
+
+ def __get_devices_reply_cb(self, devices):
+ for device_op in devices:
+ self._check_device(device_op)
+
+ def __get_devices_error_cb(self, err):
+ logging.error('Failed to get devices: %s', err)
+
+ def _check_device(self, device_op):
+ nm_device = self._bus.get_object(_NM_SERVICE, device_op)
+ props = dbus.Interface(nm_device, 'org.freedesktop.DBus.Properties')
+
+ device_type = props.Get(_NM_DEVICE_IFACE, 'DeviceType')
+ if device_type == network.DEVICE_TYPE_802_3_ETHERNET:
+ device = WiredDeviceObserver(nm_device, self._tray)
+ self._devices[device_op] = device
+ elif device_type == network.DEVICE_TYPE_802_11_WIRELESS:
+ device = WirelessDeviceObserver(nm_device, self._tray)
+ self._devices[device_op] = device
+
+ def __device_added_cb(self, device_op):
+ self._check_device(device_op)
+
+ def __device_removed_cb(self, device_op):
+ if device_op in self._devices:
+ device = self._devices[device_op]
+ device.disconnect()
+ del self._devices[device_op]
+
+def setup(tray):
+ device_observer = NetworkManagerObserver(tray)
diff --git a/src/view/devices/speaker.py b/extensions/deviceicon/speaker.py
index df4995c..ffb38cb 100644
--- a/src/view/devices/speaker.py
+++ b/extensions/deviceicon/speaker.py
@@ -15,11 +15,11 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
from gettext import gettext as _
+import gconf
+import gobject
import gtk
-from hardware import hardwaremanager
-from sugar import profile
from sugar.graphics import style
from sugar.graphics.icon import get_icon_state, Icon
from sugar.graphics.menuitem import MenuItem
@@ -27,34 +27,40 @@ from sugar.graphics.tray import TrayIcon
from sugar.graphics.palette import Palette
from sugar.graphics.xocolor import XoColor
-from view.frame.frameinvoker import FrameWidgetInvoker
+from jarabe.frame.frameinvoker import FrameWidgetInvoker
+from jarabe.model import sound
_ICON_NAME = 'speaker'
class DeviceView(TrayIcon):
- FRAME_POSITION_RELATIVE = 800
+ FRAME_POSITION_RELATIVE = 102
- def __init__(self, model):
- TrayIcon.__init__(self,
- icon_name=_ICON_NAME,
- xo_color=profile.get_color())
+ def __init__(self):
+ client = gconf.client_get_default()
+ self._color = XoColor(client.get_string('/desktop/sugar/user/color'))
- self._model = model
- self.palette = SpeakerPalette(_('My Speakers'), model=model)
+ TrayIcon.__init__(self, icon_name=_ICON_NAME, xo_color=self._color)
+
+ self._model = DeviceModel()
+ self.palette = SpeakerPalette(_('My Speakers'), model=self._model)
self.palette.props.invoker = FrameWidgetInvoker(self)
self.palette.set_group_id('frame')
- model.connect('notify::level', self.__speaker_status_changed_cb)
- model.connect('notify::muted', self.__speaker_status_changed_cb)
+ self._model.connect('notify::level', self.__speaker_status_changed_cb)
+ self._model.connect('notify::muted', self.__speaker_status_changed_cb)
+
self.connect('expose-event', self.__expose_event_cb)
+ self._icon_widget.connect('button-press-event',
+ self.__update_mute_status)
+
self._update_info()
def _update_info(self):
name = _ICON_NAME
current_level = self._model.props.level
- xo_color = profile.get_color()
+ xo_color = self._color
if self._model.props.muted:
name += '-muted'
@@ -64,6 +70,9 @@ class DeviceView(TrayIcon):
self.icon.props.icon_name = get_icon_state(name, current_level, step=-1)
self.icon.props.xo_color = xo_color
+ def __update_mute_status(self, *args):
+ self._model.props.muted = not self._model.props.muted
+
def __expose_event_cb(self, *args):
self._update_info()
@@ -83,7 +92,7 @@ class SpeakerPalette(Palette):
self.set_content(vbox)
vbox.show()
- vol_step = hardwaremanager.VOL_CHANGE_INCREMENT_RECOMMENDATION
+ vol_step = sound.VOLUME_STEP
self._adjustment = gtk.Adjustment(value=self._model.props.level,
lower=0,
upper=100 + vol_step,
@@ -152,3 +161,51 @@ class SpeakerPalette(Palette):
def __popup_cb(self, palette_):
self._update_level()
self._update_muted()
+
+class DeviceModel(gobject.GObject):
+ __gproperties__ = {
+ 'level' : (int, None, None, 0, 100, 0, gobject.PARAM_READWRITE),
+ 'muted' : (bool, None, None, False, gobject.PARAM_READWRITE),
+ }
+
+ def __init__(self):
+ gobject.GObject.__init__(self)
+
+ sound.muted_changed.connect(self.__muted_changed_cb)
+ sound.volume_changed.connect(self.__volume_changed_cb)
+
+ def __muted_changed_cb(self, **kwargs):
+ self.notify('muted')
+
+ def __volume_changed_cb(self, **kwargs):
+ self.notify('level')
+
+ def _get_level(self):
+ return sound.get_volume()
+
+ def _set_level(self, new_volume):
+ sound.set_volume(new_volume)
+
+ def _get_muted(self):
+ return sound.get_muted()
+
+ def _set_muted(self, mute):
+ sound.set_muted(mute)
+
+ def get_type(self):
+ return 'speaker'
+
+ def do_get_property(self, pspec):
+ if pspec.name == "level":
+ return self._get_level()
+ elif pspec.name == "muted":
+ return self._get_muted()
+
+ def do_set_property(self, pspec, value):
+ if pspec.name == "level":
+ self._set_level(value)
+ elif pspec.name == "muted":
+ self._set_muted(value)
+
+def setup(tray):
+ tray.add_device(DeviceView())
diff --git a/extensions/deviceicon/volume.py b/extensions/deviceicon/volume.py
new file mode 100644
index 0000000..c0d265b
--- /dev/null
+++ b/extensions/deviceicon/volume.py
@@ -0,0 +1,154 @@
+# Copyright (C) 2008 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
+
+import os
+import statvfs
+from gettext import gettext as _
+import logging
+
+import gobject
+import gio
+import gtk
+import gconf
+
+from sugar.graphics.tray import TrayIcon
+from sugar.graphics.palette import Palette
+from sugar.graphics.menuitem import MenuItem
+from sugar.graphics.icon import Icon
+from sugar.graphics.xocolor import XoColor
+
+from jarabe.journal import journalactivity
+
+_icons = {}
+
+class DeviceView(TrayIcon):
+
+ FRAME_POSITION_RELATIVE = 500
+
+ def __init__(self, mount):
+ TrayIcon.__init__(self)
+ self._mount = mount
+
+ # TODO: fallback to the more generic icons when needed
+ self.get_icon().props.icon_name = self._mount.get_icon().props.names[0]
+
+ # TODO: retrieve the colors from the owner of the device
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string('/desktop/sugar/user/color'))
+ self.get_icon().props.xo_color = color
+
+ self.connect('button-release-event', self.__button_release_event_cb)
+
+ def create_palette(self):
+ return VolumePalette(self._mount)
+
+ def __button_release_event_cb(self, widget, event):
+ journal = journalactivity.get_journal()
+ journal.set_active_volume(self._mount)
+ journal.present()
+ return True
+
+class VolumePalette(Palette):
+ def __init__(self, mount):
+ Palette.__init__(self, label=mount.get_name())
+ self._mount = mount
+
+ self.props.secondary_text = mount.get_root().get_path()
+
+ vbox = gtk.VBox()
+ self.set_content(vbox)
+ vbox.show()
+
+ self._progress_bar = gtk.ProgressBar()
+ vbox.add(self._progress_bar)
+ self._progress_bar.show()
+
+ self._free_space_label = gtk.Label()
+ self._free_space_label.set_alignment(0.5, 0.5)
+ vbox.add(self._free_space_label)
+ self._free_space_label.show()
+
+ self.connect('popup', self.__popup_cb)
+
+ menu_item = MenuItem(_('Unmount'))
+
+ icon = Icon(icon_name='media-eject', icon_size=gtk.ICON_SIZE_MENU)
+ menu_item.set_image(icon)
+ icon.show()
+
+ menu_item.connect('activate', self.__unmount_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ def __unmount_activate_cb(self, menu_item):
+ self._mount.unmount(self.__unmount_cb)
+
+ def __unmount_cb(self, source, result):
+ logging.debug('__unmount_cb %r %r' % (source, result))
+
+ def __popup_cb(self, palette):
+ mount_point = self._mount.get_root().get_path()
+ stat = os.statvfs(mount_point)
+ free_space = stat[statvfs.F_BSIZE] * stat[statvfs.F_BAVAIL]
+ total_space = stat[statvfs.F_BSIZE] * stat[statvfs.F_BLOCKS]
+
+ fraction = (total_space - free_space) / float(total_space)
+ self._progress_bar.props.fraction = fraction
+ self._free_space_label.props.label = _('%(free_space)d MB Free') % \
+ {'free_space': free_space / (1024 * 1024)}
+
+def setup(tray):
+ gobject.idle_add(_setup_volumes, tray)
+
+def _setup_volumes(tray):
+ volume_monitor = gio.volume_monitor_get()
+
+ for volume in volume_monitor.get_volumes():
+ _mount(volume, tray)
+
+ for mount in volume_monitor.get_mounts():
+ _add_device(mount, tray)
+
+ #volume_monitor.connect('volume-added', _volume_added_cb, tray)
+ volume_monitor.connect('mount-added', _mount_added_cb, tray)
+ volume_monitor.connect('mount-removed', _mount_removed_cb, tray)
+
+def _volume_added_cb(volume_monitor, volume, tray):
+ _mount(volume, tray)
+
+def _mount(volume, tray):
+ #TODO: should be done by some other process, like gvfs-hal-volume-monitor
+ #TODO: use volume.should_automount() when it gets into pygtk
+ if volume.get_mount() is None and volume.can_mount():
+ #TODO: pass None as mount_operation, or better, SugarMountOperation
+ volume.mount(gtk.MountOperation(tray.get_toplevel()), _mount_cb)
+
+def _mount_cb(source, result):
+ logging.debug('mount finished %r %r' % (source, result))
+
+def _mount_added_cb(volume_monitor, mount, tray):
+ _add_device(mount, tray)
+
+def _mount_removed_cb(volume_monitor, mount, tray):
+ icon = _icons[mount]
+ tray.remove_device(icon)
+ del _icons[mount]
+
+def _add_device(mount, tray):
+ icon = DeviceView(mount)
+ _icons[mount] = icon
+ tray.add_device(icon)
+
diff --git a/extensions/globalkey/Makefile.am b/extensions/globalkey/Makefile.am
new file mode 100644
index 0000000..69afac2
--- /dev/null
+++ b/extensions/globalkey/Makefile.am
@@ -0,0 +1,6 @@
+sugardir = $(pkgdatadir)/extensions/globalkey
+
+sugar_PYTHON = \
+ __init__.py \
+ screenshot.py \
+ viewsource.py
diff --git a/src/model/devices/network/Makefile.in b/extensions/globalkey/Makefile.in
index cf6ff13..1bfc565 100644
--- a/src/model/devices/network/Makefile.in
+++ b/extensions/globalkey/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/model/devices/network
+subdir = extensions/globalkey
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,14 +190,14 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/model/devices/network
+sugardir = $(pkgdatadir)/extensions/globalkey
sugar_PYTHON = \
__init__.py \
- mesh.py \
- wired.py \
- wireless.py
+ screenshot.py \
+ viewsource.py
all: all-am
@@ -208,9 +211,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/model/devices/network/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/globalkey/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/model/devices/network/Makefile
+ $(AUTOMAKE) --foreign extensions/globalkey/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/intro/__init__.py b/extensions/globalkey/__init__.py
index e69de29..e69de29 100644
--- a/src/intro/__init__.py
+++ b/extensions/globalkey/__init__.py
diff --git a/extensions/globalkey/screenshot.py b/extensions/globalkey/screenshot.py
new file mode 100644
index 0000000..1304eae
--- /dev/null
+++ b/extensions/globalkey/screenshot.py
@@ -0,0 +1,72 @@
+# Copyright (C) 2008 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
+
+import os
+import tempfile
+import time
+from gettext import gettext as _
+
+import gtk
+import gconf
+import dbus
+
+from sugar.datastore import datastore
+from sugar.graphics import style
+
+BOUND_KEYS = ['<alt>1']
+
+def handle_key_press(key):
+ file_path = os.path.join(tempfile.gettempdir(), '%i' % time.time())
+
+ window = gtk.gdk.get_default_root_window()
+ width, height = window.get_size()
+ x_orig, y_orig = window.get_origin()
+
+ screenshot = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, has_alpha=False,
+ bits_per_sample=8, width=width,
+ height=height)
+ screenshot.get_from_drawable(window, window.get_colormap(), x_orig,
+ y_orig, 0, 0, width, height)
+ screenshot.save(file_path, "png")
+
+ client = gconf.client_get_default()
+ color = client.get_string('/desktop/sugar/user/color')
+
+ jobject = datastore.create()
+ try:
+ jobject.metadata['title'] = _('Screenshot')
+ jobject.metadata['keep'] = '0'
+ jobject.metadata['buddies'] = ''
+ jobject.metadata['preview'] = _get_preview_data(screenshot)
+ jobject.metadata['icon-color'] = color
+ jobject.metadata['mime_type'] = 'image/png'
+ jobject.file_path = file_path
+ datastore.write(jobject, transfer_ownership=True)
+ finally:
+ jobject.destroy()
+ del jobject
+
+def _get_preview_data(screenshot):
+ preview = screenshot.scale_simple(style.zoom(300), style.zoom(225),
+ gtk.gdk.INTERP_BILINEAR)
+ preview_data = []
+ def save_func(buf, data):
+ data.append(buf)
+
+ preview.save_to_callback(save_func, 'png', user_data=preview_data)
+
+ return dbus.ByteArray(''.join(preview_data))
+
diff --git a/extensions/globalkey/viewsource.py b/extensions/globalkey/viewsource.py
new file mode 100644
index 0000000..7a6e37d
--- /dev/null
+++ b/extensions/globalkey/viewsource.py
@@ -0,0 +1,363 @@
+# Copyright (C) 2008 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
+
+import os
+import logging
+import traceback
+from gettext import gettext as _
+
+import gobject
+import pango
+import gtk
+import gtksourceview2
+import dbus
+
+from sugar.graphics import style
+from sugar.graphics.toolbutton import ToolButton
+from sugar.graphics.radiotoolbutton import RadioToolButton
+from sugar import mime
+
+from jarabe.model import shell
+
+BOUND_KEYS = ['0xEC', '<alt><shift>v']
+
+_SOURCE_FONT = pango.FontDescription('Monospace %d' % style.zoom(6))
+
+_logger = logging.getLogger('ViewSource')
+map_activity_to_window = {}
+
+def handle_key_press(key):
+ shell_model = shell.get_model()
+ activity = shell_model.get_active_activity()
+
+ service = activity.get_service()
+ if service is not None:
+ try:
+ service.HandleViewSource()
+ return
+ except dbus.DBusException, e:
+ expected_exceptions = ['org.freedesktop.DBus.Error.UnknownMethod',
+ 'org.freedesktop.DBus.Python.NotImplementedError']
+ if e.get_dbus_name() not in expected_exceptions:
+ logging.error(traceback.format_exc())
+ except Exception:
+ logging.error(traceback.format_exc())
+
+ window_xid = activity.get_xid()
+ if window_xid is None:
+ _logger.error('Activity without a window xid')
+ return
+
+ if window_xid in map_activity_to_window:
+ _logger.debug('Viewsource window already open for %s %s' % \
+ (window_xid, bundle_path))
+ return
+
+ bundle_path = activity.get_bundle_path()
+
+ document_path = None
+ if service is not None:
+ try:
+ document_path = service.GetDocumentPath()
+ except dbus.DBusException, e:
+ expected_exceptions = ['org.freedesktop.DBus.Error.UnknownMethod',
+ 'org.freedesktop.DBus.Python.NotImplementedError']
+ if e.get_dbus_name() not in expected_exceptions:
+ logging.error(traceback.format_exc())
+ except Exception:
+ logging.error(traceback.format_exc())
+
+ if bundle_path is None and document_path is None:
+ _logger.debug('Activity without bundle_path nor document_path')
+ return
+
+ view_source = ViewSource(window_xid, bundle_path, document_path,
+ activity.get_title())
+ map_activity_to_window[window_xid] = view_source
+ view_source.show()
+
+class ViewSource(gtk.Window):
+ __gtype_name__ = 'SugarViewSource'
+
+ def __init__(self, window_xid, bundle_path, document_path, title):
+ gtk.Window.__init__(self)
+
+ logging.debug('ViewSource paths: %r %r' % (bundle_path, document_path))
+
+ self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
+ self.set_decorated(False)
+ self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
+ self.set_border_width(style.LINE_WIDTH)
+
+ width = gtk.gdk.screen_width() - style.GRID_CELL_SIZE * 2
+ height = gtk.gdk.screen_height() - style.GRID_CELL_SIZE * 2
+ self.set_size_request(width, height)
+
+ self._parent_window_xid = window_xid
+
+ self.connect('realize', self.__realize_cb)
+ self.connect('destroy', self.__destroy_cb, document_path)
+ self.connect('key-press-event', self.__key_press_event_cb)
+
+ vbox = gtk.VBox()
+ self.add(vbox)
+ vbox.show()
+
+ toolbar = Toolbar(title, bundle_path, document_path)
+ vbox.pack_start(toolbar, expand=False)
+ toolbar.connect('stop-clicked', self.__stop_clicked_cb)
+ toolbar.connect('source-selected', self.__source_selected_cb)
+ toolbar.show()
+
+ pane = gtk.HPaned()
+ vbox.pack_start(pane)
+ pane.show()
+
+ self._file_viewer = FileViewer(bundle_path)
+ self._file_viewer.connect('file-selected', self.__file_selected_cb)
+ pane.add1(self._file_viewer)
+ self._file_viewer.show()
+
+ self._source_display = SourceDisplay()
+ #self._source_display.set_size_request(self._calculate_char_width(80), -1)
+ pane.pack2(self._source_display)
+ self._source_display.show()
+
+ def _calculate_char_width(self, char_count):
+ widget = gtk.Label('')
+ context = widget.get_pango_context()
+ pango_font = context.load_font(_SOURCE_FONT)
+ metrics = pango_font.get_metrics()
+ return pango.PIXELS(metrics.get_approximate_char_width()) * char_count
+
+ def __realize_cb(self, widget):
+ self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
+ self.window.set_accept_focus(True)
+
+ parent = gtk.gdk.window_foreign_new(self._parent_window_xid)
+ self.window.set_transient_for(parent)
+
+ def __stop_clicked_cb(self, widget):
+ self.destroy()
+
+ def __source_selected_cb(self, widget, path):
+ if os.path.isfile(path):
+ self._source_display.file_path = path
+ self._file_viewer.hide()
+ else:
+ self._file_viewer.set_path(path)
+ self._file_viewer.show()
+
+ def __destroy_cb(self, window, document_path):
+ del map_activity_to_window[self._parent_window_xid]
+ if document_path is not None and os.path.exists(document_path):
+ os.unlink(document_path)
+
+ def __key_press_event_cb(self, window, event):
+ keyname = gtk.gdk.keyval_name(event.keyval)
+ if keyname == 'Escape':
+ self.destroy()
+
+ def __file_selected_cb(self, file_viewer, file_path):
+ if file_path is not None and os.path.isfile(file_path):
+ self._source_display.file_path = file_path
+ else:
+ self._source_display.file_path = None
+
+class Toolbar(gtk.Toolbar):
+ __gtype_name__ = 'SugarViewSourceToolbar'
+
+ __gsignals__ = {
+ 'stop-clicked': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([])),
+ 'source-selected': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([str])),
+ }
+
+ def __init__(self, title, bundle_path, document_path):
+ gtk.Toolbar.__init__(self)
+
+ text = _('View source: %r') % title
+ label = gtk.Label()
+ label.set_markup('<b>%s</b>' % text)
+ label.set_alignment(0, 0.5)
+ self._add_widget(label)
+
+ if bundle_path is not None and document_path is not None and \
+ os.path.exists(bundle_path) and os.path.exists(document_path):
+ activity_button = RadioToolButton(named_icon='printer')
+ activity_button.props.tooltip = _('Activity')
+ activity_button.connect('toggled', self.__button_toggled_cb, bundle_path)
+ self.insert(activity_button, -1)
+ activity_button.show()
+
+ document_button = RadioToolButton(named_icon='view-radial')
+ document_button.props.tooltip = _('Document')
+ document_button.props.group = activity_button
+ document_button.connect('toggled', self.__button_toggled_cb, document_path)
+ self.insert(document_button, -1)
+ document_button.show()
+
+ separator = gtk.SeparatorToolItem()
+ separator.props.draw = False
+ separator.set_expand(True)
+ self.insert(separator, -1)
+ separator.show()
+
+ stop = ToolButton(icon_name='dialog-cancel')
+ stop.set_tooltip(_('Close'))
+ stop.connect('clicked', self.__stop_clicked_cb)
+ stop.show()
+ self.insert(stop, -1)
+ stop.show()
+
+ def _add_widget(self, widget, expand=False):
+ tool_item = gtk.ToolItem()
+ tool_item.set_expand(expand)
+
+ tool_item.add(widget)
+ widget.show()
+
+ self.insert(tool_item, -1)
+ tool_item.show()
+
+ def __stop_clicked_cb(self, button):
+ self.emit('stop-clicked')
+
+ def __button_toggled_cb(self, button, path):
+ if button.props.active:
+ self.emit('source-selected', path)
+
+class FileViewer(gtk.ScrolledWindow):
+ __gtype_name__ = 'SugarFileViewer'
+
+ __gsignals__ = {
+ 'file-selected': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([str])),
+ }
+
+ def __init__(self, path):
+ gtk.ScrolledWindow.__init__(self)
+
+ self.props.hscrollbar_policy = gtk.POLICY_AUTOMATIC
+ self.props.vscrollbar_policy = gtk.POLICY_AUTOMATIC
+ self.set_size_request(style.GRID_CELL_SIZE * 3, -1)
+
+ self._path = None
+
+ self._tree_view = gtk.TreeView()
+ self.add(self._tree_view)
+ self._tree_view.show()
+
+ self._tree_view.props.headers_visible = False
+ selection = self._tree_view.get_selection()
+ selection.connect('changed', self.__selection_changed_cb)
+
+ cell = gtk.CellRendererText()
+ column = gtk.TreeViewColumn()
+ column.pack_start(cell, True)
+ column.add_attribute(cell, 'text', 0)
+ self._tree_view.append_column(column)
+ self._tree_view.set_search_column(0)
+
+ self.set_path(path)
+
+ def set_path(self, path):
+ self.emit('file-selected', None)
+ if self._path == path:
+ return
+ self._path = path
+ self._tree_view.set_model(gtk.TreeStore(str, str))
+ self._add_dir_to_model(path)
+
+ def _add_dir_to_model(self, dir_path, parent=None):
+ model = self._tree_view.get_model()
+ for f in os.listdir(dir_path):
+ full_path = os.path.join(dir_path, f)
+ if os.path.isdir(full_path):
+ new_iter = model.append(parent, [f, full_path])
+ self._add_dir_to_model(full_path, new_iter)
+ else:
+ model.append(parent, [f, full_path])
+
+ def __selection_changed_cb(self, selection):
+ model, tree_iter = selection.get_selected()
+ if tree_iter is None:
+ file_path = None
+ else:
+ file_path = model.get_value(tree_iter, 1)
+ self.emit('file-selected', file_path)
+
+class SourceDisplay(gtk.ScrolledWindow):
+ __gtype_name__ = 'SugarSourceDisplay'
+
+ def __init__(self):
+ gtk.ScrolledWindow.__init__(self)
+
+ self.props.hscrollbar_policy = gtk.POLICY_AUTOMATIC
+ self.props.vscrollbar_policy = gtk.POLICY_AUTOMATIC
+
+ self._buffer = gtksourceview2.Buffer()
+ self._buffer.set_highlight_syntax(True)
+
+ self._source_view = gtksourceview2.View(self._buffer)
+ self._source_view.set_editable(False)
+ self._source_view.set_cursor_visible(True)
+ self._source_view.set_show_line_numbers(True)
+ self._source_view.set_show_right_margin(True)
+ self._source_view.set_right_margin_position(80)
+ #self._source_view.set_highlight_current_line(True) #FIXME: Ugly color
+ self._source_view.modify_font(_SOURCE_FONT)
+ self.add(self._source_view)
+ self._source_view.show()
+
+ self._file_path = None
+
+ def _set_file_path(self, file_path):
+ if file_path == self._file_path:
+ return
+ self._file_path = file_path
+
+ if self._file_path is None:
+ self._buffer.set_text('')
+ return
+
+ mime_type = mime.get_for_file(self._file_path)
+ logging.debug('Detected mime type: %r' % mime_type)
+
+ language_manager = gtksourceview2.language_manager_get_default()
+ detected_language = None
+ for language_id in language_manager.get_language_ids():
+ language = language_manager.get_language(language_id)
+ if mime_type in language.get_mime_types():
+ detected_language = language
+ break
+
+ if detected_language is not None:
+ logging.debug('Detected language: %r' % \
+ detected_language.get_name())
+
+ self._buffer.set_language(detected_language)
+ self._buffer.set_text(open(self._file_path, 'r').read())
+
+ def _get_file_path(self):
+ return self._file_path
+
+ file_path = property(_get_file_path, _set_file_path)
+
diff --git a/intltool-extract.in b/intltool-extract.in
index e671bdd..e69de29 100644
--- a/intltool-extract.in
+++ b/intltool-extract.in
@@ -1,875 +0,0 @@
-#!@INTLTOOL_PERL@ -w
-# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-
-#
-# The Intltool Message Extractor
-#
-# Copyright (C) 2000-2001, 2003 Free Software Foundation.
-#
-# Intltool 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.
-#
-# Intltool 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-#
-# Authors: Kenneth Christiansen <kenneth@gnu.org>
-# Darin Adler <darin@bentspoon.com>
-#
-
-## Release information
-my $PROGRAM = "intltool-extract";
-my $PACKAGE = "intltool";
-my $VERSION = "0.37.1";
-
-## Loaded modules
-use strict;
-use File::Basename;
-use Getopt::Long;
-
-## Scalars used by the option stuff
-my $TYPE_ARG = "0";
-my $LOCAL_ARG = "0";
-my $HELP_ARG = "0";
-my $VERSION_ARG = "0";
-my $UPDATE_ARG = "0";
-my $QUIET_ARG = "0";
-my $SRCDIR_ARG = ".";
-
-my $FILE;
-my $OUTFILE;
-
-my $gettext_type = "";
-my $input;
-my %messages = ();
-my %loc = ();
-my %count = ();
-my %comments = ();
-my $strcount = 0;
-
-my $XMLCOMMENT = "";
-
-## Use this instead of \w for XML files to handle more possible characters.
-my $w = "[-A-Za-z0-9._:]";
-
-## Always print first
-$| = 1;
-
-## Handle options
-GetOptions (
- "type=s" => \$TYPE_ARG,
- "local|l" => \$LOCAL_ARG,
- "help|h" => \$HELP_ARG,
- "version|v" => \$VERSION_ARG,
- "update" => \$UPDATE_ARG,
- "quiet|q" => \$QUIET_ARG,
- "srcdir=s" => \$SRCDIR_ARG,
- ) or &error;
-
-&split_on_argument;
-
-
-## Check for options.
-## This section will check for the different options.
-
-sub split_on_argument {
-
- if ($VERSION_ARG) {
- &version;
-
- } elsif ($HELP_ARG) {
- &help;
-
- } elsif ($LOCAL_ARG) {
- &place_local;
- &extract;
-
- } elsif ($UPDATE_ARG) {
- &place_normal;
- &extract;
-
- } elsif (@ARGV > 0) {
- &place_normal;
- &message;
- &extract;
-
- } else {
- &help;
-
- }
-}
-
-sub place_normal {
- $FILE = $ARGV[0];
- $OUTFILE = "$FILE.h";
-
- my $dirname = dirname ($OUTFILE);
- if (! -d "$dirname" && $dirname ne "") {
- system ("mkdir -p $dirname");
- }
-}
-
-sub place_local {
- $FILE = $ARGV[0];
- $OUTFILE = fileparse($FILE, ());
- if (!-e "tmp/") {
- system("mkdir tmp/");
- }
- $OUTFILE = "./tmp/$OUTFILE.h"
-}
-
-sub determine_type {
- if ($TYPE_ARG =~ /^gettext\/(.*)/) {
- $gettext_type=$1
- }
-}
-
-## Sub for printing release information
-sub version{
- print <<_EOF_;
-${PROGRAM} (${PACKAGE}) $VERSION
-Copyright (C) 2000, 2003 Free Software Foundation, Inc.
-Written by Kenneth Christiansen, 2000.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-_EOF_
- exit;
-}
-
-## Sub for printing usage information
-sub help {
- print <<_EOF_;
-Usage: ${PROGRAM} [OPTION]... [FILENAME]
-Generates a header file from an XML source file.
-
-It grabs all strings between <_translatable_node> and its end tag in
-XML files. Read manpage (man ${PROGRAM}) for more info.
-
- --type=TYPE Specify the file type of FILENAME. Currently supports:
- "gettext/glade", "gettext/ini", "gettext/keys"
- "gettext/rfc822deb", "gettext/schemas",
- "gettext/scheme", "gettext/xml", "gettext/quoted",
- "gettext/quotedxml"
- -l, --local Writes output into current working directory
- (conflicts with --update)
- --update Writes output into the same directory the source file
- reside (conflicts with --local)
- --srcdir Root of the source tree
- -v, --version Output version information and exit
- -h, --help Display this help and exit
- -q, --quiet Quiet mode
-
-Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
-or send email to <xml-i18n-tools\@gnome.org>.
-_EOF_
- exit;
-}
-
-## Sub for printing error messages
-sub error{
- print STDERR "Try `${PROGRAM} --help' for more information.\n";
- exit;
-}
-
-sub message {
- print "Generating C format header file for translation.\n" unless $QUIET_ARG;
-}
-
-sub extract {
- &determine_type;
-
- &convert;
-
- open OUT, ">$OUTFILE";
- binmode (OUT) if $^O eq 'MSWin32';
- &msg_write;
- close OUT;
-
- print "Wrote $OUTFILE\n" unless $QUIET_ARG;
-}
-
-sub convert {
-
- ## Reading the file
- {
- local (*IN);
- local $/; #slurp mode
- open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!";
- $input = <IN>;
- }
-
- &type_ini if $gettext_type eq "ini";
- &type_keys if $gettext_type eq "keys";
- &type_xml if $gettext_type eq "xml";
- &type_glade if $gettext_type eq "glade";
- &type_scheme if $gettext_type eq "scheme";
- &type_schemas if $gettext_type eq "schemas";
- &type_rfc822deb if $gettext_type eq "rfc822deb";
- &type_quoted if $gettext_type eq "quoted";
- &type_quotedxml if $gettext_type eq "quotedxml";
-}
-
-sub entity_decode_minimal
-{
- local ($_) = @_;
-
- s/&apos;/'/g; # '
- s/&quot;/"/g; # "
- s/&amp;/&/g;
-
- return $_;
-}
-
-sub entity_decode
-{
- local ($_) = @_;
-
- s/&apos;/'/g; # '
- s/&quot;/"/g; # "
- s/&lt;/</g;
- s/&gt;/>/g;
- s/&amp;/&/g;
-
- return $_;
-}
-
-sub escape_char
-{
- return '\"' if $_ eq '"';
- return '\n' if $_ eq "\n";
- return '\\\\' if $_ eq '\\';
-
- return $_;
-}
-
-sub escape
-{
- my ($string) = @_;
- return join "", map &escape_char, split //, $string;
-}
-
-sub type_ini {
- ### For generic translatable desktop files ###
- while ($input =~ /^(#(.+)\n)?^_.*=(.*)$/mg) {
- if (defined($2)) {
- $comments{$3} = $2;
- }
- $messages{$3} = [];
- }
-}
-
-sub type_keys {
- ### For generic translatable mime/keys files ###
- while ($input =~ /^\s*_\w+=(.*)$/mg) {
- $messages{$1} = [];
- }
-}
-
-sub type_xml {
- ### For generic translatable XML files ###
- my $tree = readXml($input);
- parseTree(0, $tree);
-}
-
-sub print_var {
- my $var = shift;
- my $vartype = ref $var;
-
- if ($vartype =~ /ARRAY/) {
- my @arr = @{$var};
- print "[ ";
- foreach my $el (@arr) {
- print_var($el);
- print ", ";
- }
- print "] ";
- } elsif ($vartype =~ /HASH/) {
- my %hash = %{$var};
- print "{ ";
- foreach my $key (keys %hash) {
- print "$key => ";
- print_var($hash{$key});
- print ", ";
- }
- print "} ";
- } else {
- print $var;
- }
-}
-
-# Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment)
-sub getAttributeString
-{
- my $sub = shift;
- my $do_translate = shift || 1;
- my $language = shift || "";
- my $translate = shift;
- my $result = "";
- foreach my $e (reverse(sort(keys %{ $sub }))) {
- my $key = $e;
- my $string = $sub->{$e};
- my $quote = '"';
-
- $string =~ s/^[\s]+//;
- $string =~ s/[\s]+$//;
-
- if ($string =~ /^'.*'$/)
- {
- $quote = "'";
- }
- $string =~ s/^['"]//g;
- $string =~ s/['"]$//g;
-
- ## differences from intltool-merge.in.in
- if ($key =~ /^_/) {
- $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT;
- $messages{entity_decode($string)} = [];
- $$translate = 2;
- }
- ## differences end here from intltool-merge.in.in
- $result .= " $key=$quote$string$quote";
- }
- return $result;
-}
-
-# Verbatim copy from intltool-merge.in.in
-sub getXMLstring
-{
- my $ref = shift;
- my $spacepreserve = shift || 0;
- my @list = @{ $ref };
- my $result = "";
-
- my $count = scalar(@list);
- my $attrs = $list[0];
- my $index = 1;
-
- $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
- $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
-
- while ($index < $count) {
- my $type = $list[$index];
- my $content = $list[$index+1];
- if (! $type ) {
- # We've got CDATA
- if ($content) {
- # lets strip the whitespace here, and *ONLY* here
- $content =~ s/\s+/ /gs if (!$spacepreserve);
- $result .= $content;
- }
- } elsif ( "$type" ne "1" ) {
- # We've got another element
- $result .= "<$type";
- $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
- if ($content) {
- my $subresult = getXMLstring($content, $spacepreserve);
- if ($subresult) {
- $result .= ">".$subresult . "</$type>";
- } else {
- $result .= "/>";
- }
- } else {
- $result .= "/>";
- }
- }
- $index += 2;
- }
- return $result;
-}
-
-# Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed
-# Translate list of nodes if necessary
-sub translate_subnodes
-{
- my $fh = shift;
- my $content = shift;
- my $language = shift || "";
- my $singlelang = shift || 0;
- my $spacepreserve = shift || 0;
-
- my @nodes = @{ $content };
-
- my $count = scalar(@nodes);
- my $index = 0;
- while ($index < $count) {
- my $type = $nodes[$index];
- my $rest = $nodes[$index+1];
- traverse($fh, $type, $rest, $language, $spacepreserve);
- $index += 2;
- }
-}
-
-# Based on traverse() in intltool-merge.in.in
-sub traverse
-{
- my $fh = shift; # unused, to allow us to sync code between -merge and -extract
- my $nodename = shift;
- my $content = shift;
- my $language = shift || "";
- my $spacepreserve = shift || 0;
-
- if ($nodename && "$nodename" eq "1") {
- $XMLCOMMENT = $content;
- } elsif ($nodename) {
- # element
- my @all = @{ $content };
- my $attrs = shift @all;
- my $translate = 0;
- my $outattr = getAttributeString($attrs, 1, $language, \$translate);
-
- if ($nodename =~ /^_/) {
- $translate = 1;
- $nodename =~ s/^_//;
- }
- my $lookup = '';
-
- $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
- $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
-
- if ($translate) {
- $lookup = getXMLstring($content, $spacepreserve);
- if (!$spacepreserve) {
- $lookup =~ s/^\s+//s;
- $lookup =~ s/\s+$//s;
- }
-
- if ($lookup && $translate != 2) {
- $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT;
- $messages{$lookup} = [];
- } elsif ($translate == 2) {
- translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
- }
- } else {
- $XMLCOMMENT = "";
- my $count = scalar(@all);
- if ($count > 0) {
- my $index = 0;
- while ($index < $count) {
- my $type = $all[$index];
- my $rest = $all[$index+1];
- traverse($fh, $type, $rest, $language, $spacepreserve);
- $index += 2;
- }
- }
- }
- $XMLCOMMENT = "";
- }
-}
-
-
-# Verbatim copy from intltool-merge.in.in, $fh for compatibility
-sub parseTree
-{
- my $fh = shift;
- my $ref = shift;
- my $language = shift || "";
-
- my $name = shift @{ $ref };
- my $cont = shift @{ $ref };
-
- while (!$name || "$name" eq "1") {
- $name = shift @{ $ref };
- $cont = shift @{ $ref };
- }
-
- my $spacepreserve = 0;
- my $attrs = @{$cont}[0];
- $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
-
- traverse($fh, $name, $cont, $language, $spacepreserve);
-}
-
-# Verbatim copy from intltool-merge.in.in
-sub intltool_tree_comment
-{
- my $expat = shift;
- my $data = $expat->original_string();
- my $clist = $expat->{Curlist};
- my $pos = $#$clist;
-
- $data =~ s/^<!--//s;
- $data =~ s/-->$//s;
- push @$clist, 1 => $data;
-}
-
-# Verbatim copy from intltool-merge.in.in
-sub intltool_tree_cdatastart
-{
- my $expat = shift;
- my $clist = $expat->{Curlist};
- my $pos = $#$clist;
-
- push @$clist, 0 => $expat->original_string();
-}
-
-# Verbatim copy from intltool-merge.in.in
-sub intltool_tree_cdataend
-{
- my $expat = shift;
- my $clist = $expat->{Curlist};
- my $pos = $#$clist;
-
- $clist->[$pos] .= $expat->original_string();
-}
-
-# Verbatim copy from intltool-merge.in.in
-sub intltool_tree_char
-{
- my $expat = shift;
- my $text = shift;
- my $clist = $expat->{Curlist};
- my $pos = $#$clist;
-
- # Use original_string so that we retain escaped entities
- # in CDATA sections.
- #
- if ($pos > 0 and $clist->[$pos - 1] eq '0') {
- $clist->[$pos] .= $expat->original_string();
- } else {
- push @$clist, 0 => $expat->original_string();
- }
-}
-
-# Verbatim copy from intltool-merge.in.in
-sub intltool_tree_start
-{
- my $expat = shift;
- my $tag = shift;
- my @origlist = ();
-
- # Use original_string so that we retain escaped entities
- # in attribute values. We must convert the string to an
- # @origlist array to conform to the structure of the Tree
- # Style.
- #
- my @original_array = split /\x/, $expat->original_string();
- my $source = $expat->original_string();
-
- # Remove leading tag.
- #
- $source =~ s|^\s*<\s*(\S+)||s;
-
- # Grab attribute key/value pairs and push onto @origlist array.
- #
- while ($source)
- {
- if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
- {
- $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
- push @origlist, $1;
- push @origlist, '"' . $2 . '"';
- }
- elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
- {
- $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
- push @origlist, $1;
- push @origlist, "'" . $2 . "'";
- }
- else
- {
- last;
- }
- }
-
- my $ol = [ { @origlist } ];
-
- push @{ $expat->{Lists} }, $expat->{Curlist};
- push @{ $expat->{Curlist} }, $tag => $ol;
- $expat->{Curlist} = $ol;
-}
-
-# Copied from intltool-merge.in.in and added comment handler.
-sub readXml
-{
- my $xmldoc = shift || return;
- my $ret = eval 'require XML::Parser';
- if(!$ret) {
- die "You must have XML::Parser installed to run $0\n\n";
- }
- my $xp = new XML::Parser(Style => 'Tree');
- $xp->setHandlers(Char => \&intltool_tree_char);
- $xp->setHandlers(Start => \&intltool_tree_start);
- $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
- $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
-
- ## differences from intltool-merge.in.in
- $xp->setHandlers(Comment => \&intltool_tree_comment);
- ## differences end here from intltool-merge.in.in
-
- my $tree = $xp->parse($xmldoc);
- #print_var($tree);
-
-# <foo><!-- comment --><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
-# would be:
-# [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar,
-# [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ]
-
- return $tree;
-}
-
-sub type_schemas {
- ### For schemas XML files ###
-
- # FIXME: We should handle escaped < (less than)
- while ($input =~ /
- <locale\ name="C">\s*
- (<default>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/default>\s*)?
- (<short>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/short>\s*)?
- (<long>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/long>\s*)?
- <\/locale>
- /sgx) {
- my @totranslate = ($3,$6,$9);
- my @eachcomment = ($2,$5,$8);
- foreach (@totranslate) {
- my $currentcomment = shift @eachcomment;
- next if !$_;
- s/\s+/ /g;
- $messages{entity_decode_minimal($_)} = [];
- $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment));
- }
- }
-}
-
-sub type_rfc822deb {
- ### For rfc822-style Debian configuration files ###
-
- my $lineno = 1;
- my $type = '';
- while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg)
- {
- my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5);
- while ($pre =~ m/\n/g)
- {
- $lineno ++;
- }
- $lineno += length($newline);
- my @str_list = rfc822deb_split(length($underscore), $text);
- for my $str (@str_list)
- {
- $strcount++;
- $messages{$str} = [];
- $loc{$str} = $lineno;
- $count{$str} = $strcount;
- my $usercomment = '';
- while($pre =~ s/(^|\n)#([^\n]*)$//s)
- {
- $usercomment = "\n" . $2 . $usercomment;
- }
- $comments{$str} = $tag . $usercomment;
- }
- $lineno += ($text =~ s/\n//g);
- }
-}
-
-sub rfc822deb_split {
- # Debian defines a special way to deal with rfc822-style files:
- # when a value contain newlines, it consists of
- # 1. a short form (first line)
- # 2. a long description, all lines begin with a space,
- # and paragraphs are separated by a single dot on a line
- # This routine returns an array of all paragraphs, and reformat
- # them.
- # When first argument is 2, the string is a comma separated list of
- # values.
- my $type = shift;
- my $text = shift;
- $text =~ s/^[ \t]//mg;
- return (split(/, */, $text, 0)) if $type ne 1;
- return ($text) if $text !~ /\n/;
-
- $text =~ s/([^\n]*)\n//;
- my @list = ($1);
- my $str = '';
- for my $line (split (/\n/, $text))
- {
- chomp $line;
- if ($line =~ /^\.\s*$/)
- {
- # New paragraph
- $str =~ s/\s*$//;
- push(@list, $str);
- $str = '';
- }
- elsif ($line =~ /^\s/)
- {
- # Line which must not be reformatted
- $str .= "\n" if length ($str) && $str !~ /\n$/;
- $line =~ s/\s+$//;
- $str .= $line."\n";
- }
- else
- {
- # Continuation line, remove newline
- $str .= " " if length ($str) && $str !~ /\n$/;
- $str .= $line;
- }
- }
- $str =~ s/\s*$//;
- push(@list, $str) if length ($str);
- return @list;
-}
-
-sub type_quoted {
- while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) {
- my $message = $1;
- my $before = $`;
- $message =~ s/\\\"/\"/g;
- $before =~ s/[^\n]//g;
- $messages{$message} = [];
- $loc{$message} = length ($before) + 2;
- }
-}
-
-sub type_quotedxml {
- while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) {
- my $message = $1;
- my $before = $`;
- $message =~ s/\\\"/\"/g;
- $message = entity_decode($message);
- $before =~ s/[^\n]//g;
- $messages{$message} = [];
- $loc{$message} = length ($before) + 2;
- }
-}
-
-sub type_glade {
- ### For translatable Glade XML files ###
-
- my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message";
-
- while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) {
- # Glade sometimes uses tags that normally mark translatable things for
- # little bits of non-translatable content. We work around this by not
- # translating strings that only includes something like label4 or window1.
- $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/;
- }
-
- while ($input =~ /<items>(..[^<]*)<\/items>/sg) {
- for my $item (split (/\n/, $1)) {
- $messages{entity_decode($item)} = [];
- }
- }
-
- ## handle new glade files
- while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) {
- $messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/;
- if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) {
- $comments{entity_decode($3)} = entity_decode($2) ;
- }
- }
- while ($input =~ /<atkaction\s+action_name="([^>]*)"\s+description="([^>]+)"\/>/sg) {
- $messages{entity_decode_minimal($2)} = [];
- }
-}
-
-sub type_scheme {
- my ($line, $i, $state, $str, $trcomment, $char);
- for $line (split(/\n/, $input)) {
- $i = 0;
- $state = 0; # 0 - nothing, 1 - string, 2 - translatable string
- while ($i < length($line)) {
- if (substr($line,$i,1) eq "\"") {
- if ($state == 2) {
- $comments{$str} = $trcomment if ($trcomment);
- $messages{$str} = [];
- $str = '';
- $state = 0; $trcomment = "";
- } elsif ($state == 1) {
- $str = '';
- $state = 0; $trcomment = "";
- } else {
- $state = 1;
- $str = '';
- if ($i>0 && substr($line,$i-1,1) eq '_') {
- $state = 2;
- }
- }
- } elsif (!$state) {
- if (substr($line,$i,1) eq ";") {
- $trcomment = substr($line,$i+1);
- $trcomment =~ s/^;*\s*//;
- $i = length($line);
- } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) {
- $trcomment = "";
- }
- } else {
- if (substr($line,$i,1) eq "\\") {
- $char = substr($line,$i+1,1);
- if ($char ne "\"" && $char ne "\\") {
- $str = $str . "\\";
- }
- $i++;
- }
- $str = $str . substr($line,$i,1);
- }
- $i++;
- }
- }
-}
-
-sub msg_write {
- my @msgids;
- if (%count)
- {
- @msgids = sort { $count{$a} <=> $count{$b} } keys %count;
- }
- else
- {
- @msgids = sort keys %messages;
- }
- for my $message (@msgids)
- {
- my $offsetlines = 1;
- $offsetlines++ if $message =~ /%/;
- if (defined ($comments{$message}))
- {
- while ($comments{$message} =~ m/\n/g)
- {
- $offsetlines++;
- }
- }
- print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n"
- if defined $loc{$message};
- print OUT "/* ".$comments{$message}." */\n"
- if defined $comments{$message};
- print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/;
-
- my @lines = split (/\n/, $message, -1);
- for (my $n = 0; $n < @lines; $n++)
- {
- if ($n == 0)
- {
- print OUT "char *s = N_(\"";
- }
- else
- {
- print OUT " \"";
- }
-
- print OUT escape($lines[$n]);
-
- if ($n < @lines - 1)
- {
- print OUT "\\n\"\n";
- }
- else
- {
- print OUT "\");\n";
- }
- }
- }
-}
-
diff --git a/intltool-merge.in b/intltool-merge.in
index 60c3f3e..e69de29 100644
--- a/intltool-merge.in
+++ b/intltool-merge.in
@@ -1,1506 +0,0 @@
-#!@INTLTOOL_PERL@ -w
-# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-
-#
-# The Intltool Message Merger
-#
-# Copyright (C) 2000, 2003 Free Software Foundation.
-# Copyright (C) 2000, 2001 Eazel, Inc
-#
-# Intltool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# version 2 published by the Free Software Foundation.
-#
-# Intltool 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-#
-# Authors: Maciej Stachowiak <mjs@noisehavoc.org>
-# Kenneth Christiansen <kenneth@gnu.org>
-# Darin Adler <darin@bentspoon.com>
-#
-# Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@calixo.net>
-#
-
-## Release information
-my $PROGRAM = "intltool-merge";
-my $PACKAGE = "intltool";
-my $VERSION = "0.37.1";
-
-## Loaded modules
-use strict;
-use Getopt::Long;
-use Text::Wrap;
-use File::Basename;
-
-my $must_end_tag = -1;
-my $last_depth = -1;
-my $translation_depth = -1;
-my @tag_stack = ();
-my @entered_tag = ();
-my @translation_strings = ();
-my $leading_space = "";
-
-## Scalars used by the option stuff
-my $HELP_ARG = 0;
-my $VERSION_ARG = 0;
-my $BA_STYLE_ARG = 0;
-my $XML_STYLE_ARG = 0;
-my $KEYS_STYLE_ARG = 0;
-my $DESKTOP_STYLE_ARG = 0;
-my $SCHEMAS_STYLE_ARG = 0;
-my $RFC822DEB_STYLE_ARG = 0;
-my $QUOTED_STYLE_ARG = 0;
-my $QUOTEDXML_STYLE_ARG = 0;
-my $QUIET_ARG = 0;
-my $PASS_THROUGH_ARG = 0;
-my $UTF8_ARG = 0;
-my $MULTIPLE_OUTPUT = 0;
-my $cache_file;
-
-## Handle options
-GetOptions
-(
- "help" => \$HELP_ARG,
- "version" => \$VERSION_ARG,
- "quiet|q" => \$QUIET_ARG,
- "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility
- "ba-style|b" => \$BA_STYLE_ARG,
- "xml-style|x" => \$XML_STYLE_ARG,
- "keys-style|k" => \$KEYS_STYLE_ARG,
- "desktop-style|d" => \$DESKTOP_STYLE_ARG,
- "schemas-style|s" => \$SCHEMAS_STYLE_ARG,
- "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG,
- "quoted-style" => \$QUOTED_STYLE_ARG,
- "quotedxml-style" => \$QUOTEDXML_STYLE_ARG,
- "pass-through|p" => \$PASS_THROUGH_ARG,
- "utf8|u" => \$UTF8_ARG,
- "multiple-output|m" => \$MULTIPLE_OUTPUT,
- "cache|c=s" => \$cache_file
- ) or &error;
-
-my $PO_DIR;
-my $FILE;
-my $OUTFILE;
-
-my %po_files_by_lang = ();
-my %translations = ();
-my $iconv = $ENV{"ICONV"} || "iconv";
-my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
-
-sub isProgramInPath
-{
- my ($file) = @_;
- # If either a file exists, or when run it returns 0 exit status
- return 1 if ((-x $file) or (system("$file -l >$devnull") == 0));
- return 0;
-}
-
-if (! isProgramInPath ("$iconv"))
-{
- print STDERR " *** iconv is not found on this system!\n".
- " *** Without it, intltool-merge can not convert encodings.\n";
- exit;
-}
-
-# Use this instead of \w for XML files to handle more possible characters.
-my $w = "[-A-Za-z0-9._:]";
-
-# XML quoted string contents
-my $q = "[^\\\"]*";
-
-## Check for options.
-
-if ($VERSION_ARG)
-{
- &print_version;
-}
-elsif ($HELP_ARG)
-{
- &print_help;
-}
-elsif ($BA_STYLE_ARG && @ARGV > 2)
-{
- &utf8_sanity_check;
- &preparation;
- &print_message;
- &ba_merge_translations;
- &finalize;
-}
-elsif ($XML_STYLE_ARG && @ARGV > 2)
-{
- &utf8_sanity_check;
- &preparation;
- &print_message;
- &xml_merge_output;
- &finalize;
-}
-elsif ($KEYS_STYLE_ARG && @ARGV > 2)
-{
- &utf8_sanity_check;
- &preparation;
- &print_message;
- &keys_merge_translations;
- &finalize;
-}
-elsif ($DESKTOP_STYLE_ARG && @ARGV > 2)
-{
- &utf8_sanity_check;
- &preparation;
- &print_message;
- &desktop_merge_translations;
- &finalize;
-}
-elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2)
-{
- &utf8_sanity_check;
- &preparation;
- &print_message;
- &schemas_merge_translations;
- &finalize;
-}
-elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2)
-{
- &preparation;
- &print_message;
- &rfc822deb_merge_translations;
- &finalize;
-}
-elsif (($QUOTED_STYLE_ARG || $QUOTEDXML_STYLE_ARG) && @ARGV > 2)
-{
- &utf8_sanity_check;
- &preparation;
- &print_message;
- &quoted_merge_translations($QUOTEDXML_STYLE_ARG);
- &finalize;
-}
-else
-{
- &print_help;
-}
-
-exit;
-
-## Sub for printing release information
-sub print_version
-{
- print <<_EOF_;
-${PROGRAM} (${PACKAGE}) ${VERSION}
-Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.
-
-Copyright (C) 2000-2003 Free Software Foundation, Inc.
-Copyright (C) 2000-2001 Eazel, Inc.
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-_EOF_
- exit;
-}
-
-## Sub for printing usage information
-sub print_help
-{
- print <<_EOF_;
-Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE
-Generates an output file that includes some localized attributes from an
-untranslated source file.
-
-Mandatory options: (exactly one must be specified)
- -b, --ba-style includes translations in the bonobo-activation style
- -d, --desktop-style includes translations in the desktop style
- -k, --keys-style includes translations in the keys style
- -s, --schemas-style includes translations in the schemas style
- -r, --rfc822deb-style includes translations in the RFC822 style
- --quoted-style includes translations in the quoted string style
- --quotedxml-style includes translations in the quoted xml string style
- -x, --xml-style includes translations in the standard xml style
-
-Other options:
- -u, --utf8 convert all strings to UTF-8 before merging
- (default for everything except RFC822 style)
- -p, --pass-through deprecated, does nothing and issues a warning
- -m, --multiple-output output one localized file per locale, instead of
- a single file containing all localized elements
- -c, --cache=FILE specify cache file name
- (usually \$top_builddir/po/.intltool-merge-cache)
- -q, --quiet suppress most messages
- --help display this help and exit
- --version output version information and exit
-
-Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
-or send email to <xml-i18n-tools\@gnome.org>.
-_EOF_
- exit;
-}
-
-
-## Sub for printing error messages
-sub print_error
-{
- print STDERR "Try `${PROGRAM} --help' for more information.\n";
- exit;
-}
-
-
-sub print_message
-{
- print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG;
-}
-
-
-sub preparation
-{
- $PO_DIR = $ARGV[0];
- $FILE = $ARGV[1];
- $OUTFILE = $ARGV[2];
-
- &gather_po_files;
- &get_translation_database;
-}
-
-# General-purpose code for looking up translations in .po files
-
-sub po_file2lang
-{
- my ($tmp) = @_;
- $tmp =~ s/^.*\/(.*)\.po$/$1/;
- return $tmp;
-}
-
-sub gather_po_files
-{
- if (my $linguas = $ENV{"LINGUAS"})
- {
- for my $lang (split / /, $linguas) {
- my $po_file = $PO_DIR . "/" . $lang . ".po";
- if (-e $po_file) {
- $po_files_by_lang{$lang} = $po_file;
- }
- }
- }
- else
- {
- if (open LINGUAS_FILE, "$PO_DIR/LINGUAS")
- {
- while (<LINGUAS_FILE>)
- {
- next if /^#/;
-
- for my $lang (split)
- {
- chomp ($lang);
- my $po_file = $PO_DIR . "/" . $lang . ".po";
- if (-e $po_file) {
- $po_files_by_lang{$lang} = $po_file;
- }
- }
- }
-
- close LINGUAS_FILE;
- }
- else
- {
- for my $po_file (glob "$PO_DIR/*.po") {
- $po_files_by_lang{po_file2lang($po_file)} = $po_file;
- }
- }
- }
-}
-
-sub get_local_charset
-{
- my ($encoding) = @_;
- my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias";
-
- # seek character encoding aliases in charset.alias (glib)
-
- if (open CHARSET_ALIAS, $alias_file)
- {
- while (<CHARSET_ALIAS>)
- {
- next if /^\#/;
- return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i)
- }
-
- close CHARSET_ALIAS;
- }
-
- # if not found, return input string
-
- return $encoding;
-}
-
-sub get_po_encoding
-{
- my ($in_po_file) = @_;
- my $encoding = "";
-
- open IN_PO_FILE, $in_po_file or die;
- while (<IN_PO_FILE>)
- {
- ## example: "Content-Type: text/plain; charset=ISO-8859-1\n"
- if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/)
- {
- $encoding = $1;
- last;
- }
- }
- close IN_PO_FILE;
-
- if (!$encoding)
- {
- print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG;
- $encoding = "ISO-8859-1";
- }
-
- system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull");
- if ($?) {
- $encoding = get_local_charset($encoding);
- }
-
- return $encoding
-}
-
-sub utf8_sanity_check
-{
- print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG;
- $UTF8_ARG = 1;
-}
-
-sub get_translation_database
-{
- if ($cache_file) {
- &get_cached_translation_database;
- } else {
- &create_translation_database;
- }
-}
-
-sub get_newest_po_age
-{
- my $newest_age;
-
- foreach my $file (values %po_files_by_lang)
- {
- my $file_age = -M $file;
- $newest_age = $file_age if !$newest_age || $file_age < $newest_age;
- }
-
- $newest_age = 0 if !$newest_age;
-
- return $newest_age;
-}
-
-sub create_cache
-{
- print "Generating and caching the translation database\n" unless $QUIET_ARG;
-
- &create_translation_database;
-
- open CACHE, ">$cache_file" || die;
- print CACHE join "\x01", %translations;
- close CACHE;
-}
-
-sub load_cache
-{
- print "Found cached translation database\n" unless $QUIET_ARG;
-
- my $contents;
- open CACHE, "<$cache_file" || die;
- {
- local $/;
- $contents = <CACHE>;
- }
- close CACHE;
- %translations = split "\x01", $contents;
-}
-
-sub get_cached_translation_database
-{
- my $cache_file_age = -M $cache_file;
- if (defined $cache_file_age)
- {
- if ($cache_file_age <= &get_newest_po_age)
- {
- &load_cache;
- return;
- }
- print "Found too-old cached translation database\n" unless $QUIET_ARG;
- }
-
- &create_cache;
-}
-
-sub create_translation_database
-{
- for my $lang (keys %po_files_by_lang)
- {
- my $po_file = $po_files_by_lang{$lang};
-
- if ($UTF8_ARG)
- {
- my $encoding = get_po_encoding ($po_file);
-
- if (lc $encoding eq "utf-8")
- {
- open PO_FILE, "<$po_file";
- }
- else
- {
- print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;;
-
- open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|";
- }
- }
- else
- {
- open PO_FILE, "<$po_file";
- }
-
- my $nextfuzzy = 0;
- my $inmsgid = 0;
- my $inmsgstr = 0;
- my $msgid = "";
- my $msgstr = "";
-
- while (<PO_FILE>)
- {
- $nextfuzzy = 1 if /^#, fuzzy/;
-
- if (/^msgid "((\\.|[^\\]+)*)"/ )
- {
- $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
- $msgid = "";
- $msgstr = "";
-
- if ($nextfuzzy) {
- $inmsgid = 0;
- } else {
- $msgid = unescape_po_string($1);
- $inmsgid = 1;
- }
- $inmsgstr = 0;
- $nextfuzzy = 0;
- }
-
- if (/^msgstr "((\\.|[^\\]+)*)"/)
- {
- $msgstr = unescape_po_string($1);
- $inmsgstr = 1;
- $inmsgid = 0;
- }
-
- if (/^"((\\.|[^\\]+)*)"/)
- {
- $msgid .= unescape_po_string($1) if $inmsgid;
- $msgstr .= unescape_po_string($1) if $inmsgstr;
- }
- }
- $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
- }
-}
-
-sub finalize
-{
-}
-
-sub unescape_one_sequence
-{
- my ($sequence) = @_;
-
- return "\\" if $sequence eq "\\\\";
- return "\"" if $sequence eq "\\\"";
- return "\n" if $sequence eq "\\n";
- return "\r" if $sequence eq "\\r";
- return "\t" if $sequence eq "\\t";
- return "\b" if $sequence eq "\\b";
- return "\f" if $sequence eq "\\f";
- return "\a" if $sequence eq "\\a";
- return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7)
-
- return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/);
- return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/);
-
- # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489
-
- return $sequence;
-}
-
-sub unescape_po_string
-{
- my ($string) = @_;
-
- $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg;
-
- return $string;
-}
-
-sub entity_decode
-{
- local ($_) = @_;
-
- s/&apos;/'/g; # '
- s/&quot;/"/g; # "
- s/&lt;/</g;
- s/&gt;/>/g;
- s/&amp;/&/g;
-
- return $_;
-}
-
-# entity_encode: (string)
-#
-# Encode the given string to XML format (encode '<' etc).
-
-sub entity_encode
-{
- my ($pre_encoded) = @_;
-
- my @list_of_chars = unpack ('C*', $pre_encoded);
-
- # with UTF-8 we only encode minimalistic
- return join ('', map (&entity_encode_int_minimalist, @list_of_chars));
-}
-
-sub entity_encode_int_minimalist
-{
- return "&quot;" if $_ == 34;
- return "&amp;" if $_ == 38;
- return "&apos;" if $_ == 39;
- return "&lt;" if $_ == 60;
- return "&gt;" if $_ == 62;
- return chr $_;
-}
-
-sub entity_encoded_translation
-{
- my ($lang, $string) = @_;
-
- my $translation = $translations{$lang, $string};
- return $string if !$translation;
- return entity_encode ($translation);
-}
-
-## XML (bonobo-activation specific) merge code
-
-sub ba_merge_translations
-{
- my $source;
-
- {
- local $/; # slurp mode
- open INPUT, "<$FILE" or die "can't open $FILE: $!";
- $source = <INPUT>;
- close INPUT;
- }
-
- open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!";
- # Binmode so that selftest works ok if using a native Win32 Perl...
- binmode (OUTPUT) if $^O eq 'MSWin32';
-
- while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s)
- {
- print OUTPUT $1;
-
- my $node = $2 . "\n";
-
- my @strings = ();
- $_ = $node;
- while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) {
- push @strings, entity_decode($3);
- }
- print OUTPUT;
-
- my %langs;
- for my $string (@strings)
- {
- for my $lang (keys %po_files_by_lang)
- {
- $langs{$lang} = 1 if $translations{$lang, $string};
- }
- }
-
- for my $lang (sort keys %langs)
- {
- $_ = $node;
- s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s;
- s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg;
- print OUTPUT;
- }
- }
-
- print OUTPUT $source;
-
- close OUTPUT;
-}
-
-
-## XML (non-bonobo-activation) merge code
-
-
-# Process tag attributes
-# Only parameter is a HASH containing attributes -> values mapping
-sub getAttributeString
-{
- my $sub = shift;
- my $do_translate = shift || 0;
- my $language = shift || "";
- my $result = "";
- my $translate = shift;
- foreach my $e (reverse(sort(keys %{ $sub }))) {
- my $key = $e;
- my $string = $sub->{$e};
- my $quote = '"';
-
- $string =~ s/^[\s]+//;
- $string =~ s/[\s]+$//;
-
- if ($string =~ /^'.*'$/)
- {
- $quote = "'";
- }
- $string =~ s/^['"]//g;
- $string =~ s/['"]$//g;
-
- if ($do_translate && $key =~ /^_/) {
- $key =~ s|^_||g;
- if ($language) {
- # Handle translation
- my $decode_string = entity_decode($string);
- my $translation = $translations{$language, $decode_string};
- if ($translation) {
- $translation = entity_encode($translation);
- $string = $translation;
- }
- $$translate = 2;
- } else {
- $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate
- }
- }
-
- $result .= " $key=$quote$string$quote";
- }
- return $result;
-}
-
-# Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree
-sub getXMLstring
-{
- my $ref = shift;
- my $spacepreserve = shift || 0;
- my @list = @{ $ref };
- my $result = "";
-
- my $count = scalar(@list);
- my $attrs = $list[0];
- my $index = 1;
-
- $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
- $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
-
- while ($index < $count) {
- my $type = $list[$index];
- my $content = $list[$index+1];
- if (! $type ) {
- # We've got CDATA
- if ($content) {
- # lets strip the whitespace here, and *ONLY* here
- $content =~ s/\s+/ /gs if (!$spacepreserve);
- $result .= $content;
- }
- } elsif ( "$type" ne "1" ) {
- # We've got another element
- $result .= "<$type";
- $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
- if ($content) {
- my $subresult = getXMLstring($content, $spacepreserve);
- if ($subresult) {
- $result .= ">".$subresult . "</$type>";
- } else {
- $result .= "/>";
- }
- } else {
- $result .= "/>";
- }
- }
- $index += 2;
- }
- return $result;
-}
-
-# Translate list of nodes if necessary
-sub translate_subnodes
-{
- my $fh = shift;
- my $content = shift;
- my $language = shift || "";
- my $singlelang = shift || 0;
- my $spacepreserve = shift || 0;
-
- my @nodes = @{ $content };
-
- my $count = scalar(@nodes);
- my $index = 0;
- while ($index < $count) {
- my $type = $nodes[$index];
- my $rest = $nodes[$index+1];
- if ($singlelang) {
- my $oldMO = $MULTIPLE_OUTPUT;
- $MULTIPLE_OUTPUT = 1;
- traverse($fh, $type, $rest, $language, $spacepreserve);
- $MULTIPLE_OUTPUT = $oldMO;
- } else {
- traverse($fh, $type, $rest, $language, $spacepreserve);
- }
- $index += 2;
- }
-}
-
-sub isWellFormedXmlFragment
-{
- my $ret = eval 'require XML::Parser';
- if(!$ret) {
- die "You must have XML::Parser installed to run $0\n\n";
- }
-
- my $fragment = shift;
- return 0 if (!$fragment);
-
- $fragment = "<root>$fragment</root>";
- my $xp = new XML::Parser(Style => 'Tree');
- my $tree = 0;
- eval { $tree = $xp->parse($fragment); };
- return $tree;
-}
-
-sub traverse
-{
- my $fh = shift;
- my $nodename = shift;
- my $content = shift;
- my $language = shift || "";
- my $spacepreserve = shift || 0;
-
- if (!$nodename) {
- if ($content =~ /^[\s]*$/) {
- $leading_space .= $content;
- }
- print $fh $content;
- } else {
- # element
- my @all = @{ $content };
- my $attrs = shift @all;
- my $translate = 0;
- my $outattr = getAttributeString($attrs, 1, $language, \$translate);
-
- if ($nodename =~ /^_/) {
- $translate = 1;
- $nodename =~ s/^_//;
- }
- my $lookup = '';
-
- $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
- $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
-
- print $fh "<$nodename", $outattr;
- if ($translate) {
- $lookup = getXMLstring($content, $spacepreserve);
- if (!$spacepreserve) {
- $lookup =~ s/^\s+//s;
- $lookup =~ s/\s+$//s;
- }
-
- if ($lookup || $translate == 2) {
- my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup});
- if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) {
- $translation = $lookup if (!$translation);
- print $fh " xml:lang=\"", $language, "\"" if $language;
- print $fh ">";
- if ($translate == 2) {
- translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
- } else {
- print $fh $translation;
- }
- print $fh "</$nodename>";
-
- return; # this means there will be no same translation with xml:lang="$language"...
- # if we want them both, just remove this "return"
- } else {
- print $fh ">";
- if ($translate == 2) {
- translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
- } else {
- print $fh $lookup;
- }
- print $fh "</$nodename>";
- }
- } else {
- print $fh "/>";
- }
-
- for my $lang (sort keys %po_files_by_lang) {
- if ($MULTIPLE_OUTPUT && $lang ne "$language") {
- next;
- }
- if ($lang) {
- # Handle translation
- #
- my $translate = 0;
- my $localattrs = getAttributeString($attrs, 1, $lang, \$translate);
- my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup});
- if ($translate && !$translation) {
- $translation = $lookup;
- }
-
- if ($translation || $translate) {
- print $fh "\n";
- $leading_space =~ s/.*\n//g;
- print $fh $leading_space;
- print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">";
- if ($translate == 2) {
- translate_subnodes($fh, \@all, $lang, 1, $spacepreserve);
- } else {
- print $fh $translation;
- }
- print $fh "</$nodename>";
- }
- }
- }
-
- } else {
- my $count = scalar(@all);
- if ($count > 0) {
- print $fh ">";
- my $index = 0;
- while ($index < $count) {
- my $type = $all[$index];
- my $rest = $all[$index+1];
- traverse($fh, $type, $rest, $language, $spacepreserve);
- $index += 2;
- }
- print $fh "</$nodename>";
- } else {
- print $fh "/>";
- }
- }
- }
-}
-
-sub intltool_tree_comment
-{
- my $expat = shift;
- my $data = shift;
- my $clist = $expat->{Curlist};
- my $pos = $#$clist;
-
- push @$clist, 1 => $data;
-}
-
-sub intltool_tree_cdatastart
-{
- my $expat = shift;
- my $clist = $expat->{Curlist};
- my $pos = $#$clist;
-
- push @$clist, 0 => $expat->original_string();
-}
-
-sub intltool_tree_cdataend
-{
- my $expat = shift;
- my $clist = $expat->{Curlist};
- my $pos = $#$clist;
-
- $clist->[$pos] .= $expat->original_string();
-}
-
-sub intltool_tree_char
-{
- my $expat = shift;
- my $text = shift;
- my $clist = $expat->{Curlist};
- my $pos = $#$clist;
-
- # Use original_string so that we retain escaped entities
- # in CDATA sections.
- #
- if ($pos > 0 and $clist->[$pos - 1] eq '0') {
- $clist->[$pos] .= $expat->original_string();
- } else {
- push @$clist, 0 => $expat->original_string();
- }
-}
-
-sub intltool_tree_start
-{
- my $expat = shift;
- my $tag = shift;
- my @origlist = ();
-
- # Use original_string so that we retain escaped entities
- # in attribute values. We must convert the string to an
- # @origlist array to conform to the structure of the Tree
- # Style.
- #
- my @original_array = split /\x/, $expat->original_string();
- my $source = $expat->original_string();
-
- # Remove leading tag.
- #
- $source =~ s|^\s*<\s*(\S+)||s;
-
- # Grab attribute key/value pairs and push onto @origlist array.
- #
- while ($source)
- {
- if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
- {
- $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
- push @origlist, $1;
- push @origlist, '"' . $2 . '"';
- }
- elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
- {
- $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
- push @origlist, $1;
- push @origlist, "'" . $2 . "'";
- }
- else
- {
- last;
- }
- }
-
- my $ol = [ { @origlist } ];
-
- push @{ $expat->{Lists} }, $expat->{Curlist};
- push @{ $expat->{Curlist} }, $tag => $ol;
- $expat->{Curlist} = $ol;
-}
-
-sub readXml
-{
- my $filename = shift || return;
- if(!-f $filename) {
- die "ERROR Cannot find filename: $filename\n";
- }
-
- my $ret = eval 'require XML::Parser';
- if(!$ret) {
- die "You must have XML::Parser installed to run $0\n\n";
- }
- my $xp = new XML::Parser(Style => 'Tree');
- $xp->setHandlers(Char => \&intltool_tree_char);
- $xp->setHandlers(Start => \&intltool_tree_start);
- $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
- $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
- my $tree = $xp->parsefile($filename);
-
-# <foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
-# would be:
-# [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{},
-# 0, "Howdy", ref, [{}]], 0, "do" ] ]
-
- return $tree;
-}
-
-sub print_header
-{
- my $infile = shift;
- my $fh = shift;
- my $source;
-
- if(!-f $infile) {
- die "ERROR Cannot find filename: $infile\n";
- }
-
- print $fh qq{<?xml version="1.0" encoding="UTF-8"?>\n};
- {
- local $/;
- open DOCINPUT, "<${FILE}" or die;
- $source = <DOCINPUT>;
- close DOCINPUT;
- }
- if ($source =~ /(<!DOCTYPE.*\[.*\]\s*>)/s)
- {
- print $fh "$1\n";
- }
- elsif ($source =~ /(<!DOCTYPE[^>]*>)/s)
- {
- print $fh "$1\n";
- }
-}
-
-sub parseTree
-{
- my $fh = shift;
- my $ref = shift;
- my $language = shift || "";
-
- my $name = shift @{ $ref };
- my $cont = shift @{ $ref };
-
- while (!$name || "$name" eq "1") {
- $name = shift @{ $ref };
- $cont = shift @{ $ref };
- }
-
- my $spacepreserve = 0;
- my $attrs = @{$cont}[0];
- $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
-
- traverse($fh, $name, $cont, $language, $spacepreserve);
-}
-
-sub xml_merge_output
-{
- my $source;
-
- if ($MULTIPLE_OUTPUT) {
- for my $lang (sort keys %po_files_by_lang) {
- if ( ! -d $lang ) {
- mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
- }
- open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
- binmode (OUTPUT) if $^O eq 'MSWin32';
- my $tree = readXml($FILE);
- print_header($FILE, \*OUTPUT);
- parseTree(\*OUTPUT, $tree, $lang);
- close OUTPUT;
- print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
- }
- if ( ! -d "C" ) {
- mkdir "C" or -d "C" or die "Cannot create subdirectory C: $!\n";
- }
- open OUTPUT, ">C/$OUTFILE" or die "Cannot open C/$OUTFILE: $!\n";
- binmode (OUTPUT) if $^O eq 'MSWin32';
- my $tree = readXml($FILE);
- print_header($FILE, \*OUTPUT);
- parseTree(\*OUTPUT, $tree);
- close OUTPUT;
- print "CREATED C/$OUTFILE\n" unless $QUIET_ARG;
- } else {
- open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n";
- binmode (OUTPUT) if $^O eq 'MSWin32';
- my $tree = readXml($FILE);
- print_header($FILE, \*OUTPUT);
- parseTree(\*OUTPUT, $tree);
- close OUTPUT;
- print "CREATED $OUTFILE\n" unless $QUIET_ARG;
- }
-}
-
-sub keys_merge_translation
-{
- my ($lang) = @_;
-
- if ( ! -d $lang && $MULTIPLE_OUTPUT)
- {
- mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
- }
-
- open INPUT, "<${FILE}" or die "Cannot open ${FILE}: $!\n";
- open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
- binmode (OUTPUT) if $^O eq 'MSWin32';
-
- while (<INPUT>)
- {
- if (s/^(\s*)_(\w+=(.*))/$1$2/)
- {
- my $string = $3;
-
- if (!$MULTIPLE_OUTPUT)
- {
- print OUTPUT;
-
- my $non_translated_line = $_;
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $translation = $translations{$lang, $string};
- next if !$translation;
-
- $_ = $non_translated_line;
- s/(\w+)=.*/[$lang]$1=$translation/;
- print OUTPUT;
- }
- }
- else
- {
- my $non_translated_line = $_;
- my $translation = $translations{$lang, $string};
- $translation = $string if !$translation;
-
- $_ = $non_translated_line;
- s/(\w+)=.*/$1=$translation/;
- print OUTPUT;
- }
- }
- else
- {
- print OUTPUT;
- }
- }
-
- close OUTPUT;
- close INPUT;
-
- print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
-}
-
-sub keys_merge_translations
-{
- if ($MULTIPLE_OUTPUT)
- {
- for my $lang (sort keys %po_files_by_lang)
- {
- keys_merge_translation ($lang);
- }
- keys_merge_translation ("C");
- }
- else
- {
- keys_merge_translation (".");
- }
-}
-
-sub desktop_merge_translations
-{
- open INPUT, "<${FILE}" or die;
- open OUTPUT, ">${OUTFILE}" or die;
- binmode (OUTPUT) if $^O eq 'MSWin32';
-
- while (<INPUT>)
- {
- if (s/^(\s*)_(\w+=(.*))/$1$2/)
- {
- my $string = $3;
-
- print OUTPUT;
-
- my $non_translated_line = $_;
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $translation = $translations{$lang, $string};
- next if !$translation;
-
- $_ = $non_translated_line;
- s/(\w+)=.*/${1}[$lang]=$translation/;
- print OUTPUT;
- }
- }
- else
- {
- print OUTPUT;
- }
- }
-
- close OUTPUT;
- close INPUT;
-}
-
-sub schemas_merge_translations
-{
- my $source;
-
- {
- local $/; # slurp mode
- open INPUT, "<$FILE" or die "can't open $FILE: $!";
- $source = <INPUT>;
- close INPUT;
- }
-
- open OUTPUT, ">$OUTFILE" or die;
- binmode (OUTPUT) if $^O eq 'MSWin32';
-
- # FIXME: support attribute translations
-
- # Empty nodes never need translation, so unmark all of them.
- # For example, <_foo/> is just replaced by <foo/>.
- $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
-
- while ($source =~ s/
- (.*?)
- (\s+)(<locale\ name="C">(\s*)
- (<default>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/default>)?(\s*)
- (<short>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/short>)?(\s*)
- (<long>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/long>)?(\s*)
- <\/locale>)
- //sx)
- {
- print OUTPUT $1;
-
- my $locale_start_spaces = $2 ? $2 : '';
- my $default_spaces = $4 ? $4 : '';
- my $short_spaces = $7 ? $7 : '';
- my $long_spaces = $10 ? $10 : '';
- my $locale_end_spaces = $13 ? $13 : '';
- my $c_default_block = $3 ? $3 : '';
- my $default_string = $6 ? $6 : '';
- my $short_string = $9 ? $9 : '';
- my $long_string = $12 ? $12 : '';
-
- print OUTPUT "$locale_start_spaces$c_default_block";
-
- $default_string =~ s/\s+/ /g;
- $default_string = entity_decode($default_string);
- $short_string =~ s/\s+/ /g;
- $short_string = entity_decode($short_string);
- $long_string =~ s/\s+/ /g;
- $long_string = entity_decode($long_string);
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $default_translation = $translations{$lang, $default_string};
- my $short_translation = $translations{$lang, $short_string};
- my $long_translation = $translations{$lang, $long_string};
-
- next if (!$default_translation && !$short_translation &&
- !$long_translation);
-
- print OUTPUT "\n$locale_start_spaces<locale name=\"$lang\">";
-
- print OUTPUT "$default_spaces";
-
- if ($default_translation)
- {
- $default_translation = entity_encode($default_translation);
- print OUTPUT "<default>$default_translation</default>";
- }
-
- print OUTPUT "$short_spaces";
-
- if ($short_translation)
- {
- $short_translation = entity_encode($short_translation);
- print OUTPUT "<short>$short_translation</short>";
- }
-
- print OUTPUT "$long_spaces";
-
- if ($long_translation)
- {
- $long_translation = entity_encode($long_translation);
- print OUTPUT "<long>$long_translation</long>";
- }
-
- print OUTPUT "$locale_end_spaces</locale>";
- }
- }
-
- print OUTPUT $source;
-
- close OUTPUT;
-}
-
-sub rfc822deb_merge_translations
-{
- my %encodings = ();
- for my $lang (keys %po_files_by_lang) {
- $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang}));
- }
-
- my $source;
-
- $Text::Wrap::huge = 'overflow';
- $Text::Wrap::break = qr/\n|\s(?=\S)/;
-
- {
- local $/; # slurp mode
- open INPUT, "<$FILE" or die "can't open $FILE: $!";
- $source = <INPUT>;
- close INPUT;
- }
-
- open OUTPUT, ">${OUTFILE}" or die;
- binmode (OUTPUT) if $^O eq 'MSWin32';
-
- while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg)
- {
- my $sep = $1;
- my $non_translated_line = $3.$4;
- my $string = $5;
- my $underscore = length($2);
- next if $underscore eq 0 && $non_translated_line =~ /^#/;
- # Remove [] dummy strings
- my $stripped = $string;
- $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2;
- $stripped =~ s/\[\s[^\[\]]*\]$//;
- $non_translated_line .= $stripped;
-
- print OUTPUT $sep.$non_translated_line;
-
- if ($underscore)
- {
- my @str_list = rfc822deb_split($underscore, $string);
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $is_translated = 1;
- my $str_translated = '';
- my $first = 1;
-
- for my $str (@str_list)
- {
- my $translation = $translations{$lang, $str};
-
- if (!$translation)
- {
- $is_translated = 0;
- last;
- }
-
- # $translation may also contain [] dummy
- # strings, mostly to indicate an empty string
- $translation =~ s/\[\s[^\[\]]*\]$//;
-
- if ($first)
- {
- if ($underscore eq 2)
- {
- $str_translated .= $translation;
- }
- else
- {
- $str_translated .=
- Text::Tabs::expand($translation) .
- "\n";
- }
- }
- else
- {
- if ($underscore eq 2)
- {
- $str_translated .= ', ' . $translation;
- }
- else
- {
- $str_translated .= Text::Tabs::expand(
- Text::Wrap::wrap(' ', ' ', $translation)) .
- "\n .\n";
- }
- }
- $first = 0;
-
- # To fix some problems with Text::Wrap::wrap
- $str_translated =~ s/(\n )+\n/\n .\n/g;
- }
- next unless $is_translated;
-
- $str_translated =~ s/\n \.\n$//;
- $str_translated =~ s/\s+$//;
-
- $_ = $non_translated_line;
- s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s;
- print OUTPUT;
- }
- }
- }
- print OUTPUT "\n";
-
- close OUTPUT;
- close INPUT;
-}
-
-sub rfc822deb_split
-{
- # Debian defines a special way to deal with rfc822-style files:
- # when a value contain newlines, it consists of
- # 1. a short form (first line)
- # 2. a long description, all lines begin with a space,
- # and paragraphs are separated by a single dot on a line
- # This routine returns an array of all paragraphs, and reformat
- # them.
- # When first argument is 2, the string is a comma separated list of
- # values.
- my $type = shift;
- my $text = shift;
- $text =~ s/^[ \t]//mg;
- return (split(/, */, $text, 0)) if $type ne 1;
- return ($text) if $text !~ /\n/;
-
- $text =~ s/([^\n]*)\n//;
- my @list = ($1);
- my $str = '';
-
- for my $line (split (/\n/, $text))
- {
- chomp $line;
- if ($line =~ /^\.\s*$/)
- {
- # New paragraph
- $str =~ s/\s*$//;
- push(@list, $str);
- $str = '';
- }
- elsif ($line =~ /^\s/)
- {
- # Line which must not be reformatted
- $str .= "\n" if length ($str) && $str !~ /\n$/;
- $line =~ s/\s+$//;
- $str .= $line."\n";
- }
- else
- {
- # Continuation line, remove newline
- $str .= " " if length ($str) && $str !~ /\n$/;
- $str .= $line;
- }
- }
-
- $str =~ s/\s*$//;
- push(@list, $str) if length ($str);
-
- return @list;
-}
-
-sub quoted_translation
-{
- my ($xml_mode, $lang, $string) = @_;
-
- $string = entity_decode($string) if $xml_mode;
- $string =~ s/\\\"/\"/g;
-
- my $translation = $translations{$lang, $string};
- $translation = $string if !$translation;
- $translation = entity_encode($translation) if $xml_mode;
- $translation =~ s/\"/\\\"/g;
- return $translation
-}
-
-sub quoted_merge_translations
-{
- my ($xml_mode) = @_;
-
- if (!$MULTIPLE_OUTPUT) {
- print "Quoted only supports Multiple Output.\n";
- exit(1);
- }
-
- for my $lang (sort keys %po_files_by_lang) {
- if ( ! -d $lang ) {
- mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
- }
- open INPUT, "<${FILE}" or die;
- open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
- binmode (OUTPUT) if $^O eq 'MSWin32';
- while (<INPUT>)
- {
- s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . &quoted_translation($xml_mode, $lang, $1) . "\""/ge;
- print OUTPUT;
- }
- close OUTPUT;
- close INPUT;
- }
-}
diff --git a/intltool-update.in b/intltool-update.in
index 2684cc0..e69de29 100644
--- a/intltool-update.in
+++ b/intltool-update.in
@@ -1,1166 +0,0 @@
-#!@INTLTOOL_PERL@ -w
-# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-
-#
-# The Intltool Message Updater
-#
-# Copyright (C) 2000-2003 Free Software Foundation.
-#
-# Intltool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# version 2 published by the Free Software Foundation.
-#
-# Intltool 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-#
-# Authors: Kenneth Christiansen <kenneth@gnu.org>
-# Maciej Stachowiak
-# Darin Adler <darin@bentspoon.com>
-
-## Release information
-my $PROGRAM = "intltool-update";
-my $VERSION = "0.37.1";
-my $PACKAGE = "intltool";
-
-## Loaded modules
-use strict;
-use Getopt::Long;
-use Cwd;
-use File::Copy;
-use File::Find;
-
-## Scalars used by the option stuff
-my $HELP_ARG = 0;
-my $VERSION_ARG = 0;
-my $DIST_ARG = 0;
-my $POT_ARG = 0;
-my $HEADERS_ARG = 0;
-my $MAINTAIN_ARG = 0;
-my $REPORT_ARG = 0;
-my $VERBOSE = 0;
-my $GETTEXT_PACKAGE = "";
-my $OUTPUT_FILE = "";
-
-my @languages;
-my %varhash = ();
-my %po_files_by_lang = ();
-
-# Regular expressions to categorize file types.
-# FIXME: Please check if the following is correct
-
-my $xml_support =
-"xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required)
-"ui|". # Bonobo specific - User Interface desc. files
-"lang|". # ?
-"glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required)
-"scm(?:\\.in)*|". # ? (Note: .in is not required)
-"oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files
-"etspec|". # ?
-"server(?:\\.in)+|". # Bonobo specific
-"sheet(?:\\.in)+|". # ?
-"schemas(?:\\.in)+|". # GConf specific
-"pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer.
-"kbd(?:\\.in)+|". # GOK specific.
-"policy(?:\\.in)+"; # PolicyKit files
-
-my $ini_support =
-"icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
-"desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
-"caves(?:\\.in)+|". # GNOME Games specific
-"directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
-"soundlist(?:\\.in)+|". # GNOME specific
-"keys(?:\\.in)+|". # GNOME Mime database specific
-"theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
-"service(?:\\.in)+"; # DBus specific
-
-my $buildin_gettext_support =
-"c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py";
-
-## Always flush buffer when printing
-$| = 1;
-
-## Sometimes the source tree will be rooted somewhere else.
-my $SRCDIR = $ENV{"srcdir"} || ".";
-my $POTFILES_in;
-
-$POTFILES_in = "<$SRCDIR/POTFILES.in";
-
-my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
-
-## Handle options
-GetOptions
-(
- "help" => \$HELP_ARG,
- "version" => \$VERSION_ARG,
- "dist|d" => \$DIST_ARG,
- "pot|p" => \$POT_ARG,
- "headers|s" => \$HEADERS_ARG,
- "maintain|m" => \$MAINTAIN_ARG,
- "report|r" => \$REPORT_ARG,
- "verbose|x" => \$VERBOSE,
- "gettext-package|g=s" => \$GETTEXT_PACKAGE,
- "output-file|o=s" => \$OUTPUT_FILE,
- ) or &Console_WriteError_InvalidOption;
-
-&Console_Write_IntltoolHelp if $HELP_ARG;
-&Console_Write_IntltoolVersion if $VERSION_ARG;
-
-my $arg_count = ($DIST_ARG > 0)
- + ($POT_ARG > 0)
- + ($HEADERS_ARG > 0)
- + ($MAINTAIN_ARG > 0)
- + ($REPORT_ARG > 0);
-
-&Console_Write_IntltoolHelp if $arg_count > 1;
-
-my $PKGNAME = FindPackageName ();
-
-# --version and --help don't require a module name
-my $MODULE = $GETTEXT_PACKAGE || $PKGNAME || "unknown";
-
-if ($POT_ARG)
-{
- &GenerateHeaders;
- &GeneratePOTemplate;
-}
-elsif ($HEADERS_ARG)
-{
- &GenerateHeaders;
-}
-elsif ($MAINTAIN_ARG)
-{
- &FindLeftoutFiles;
-}
-elsif ($REPORT_ARG)
-{
- &GenerateHeaders;
- &GeneratePOTemplate;
- &Console_Write_CoverageReport;
-}
-elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/)
-{
- my $lang = $ARGV[0];
-
- ## Report error if the language file supplied
- ## to the command line is non-existent
- &Console_WriteError_NotExisting("$SRCDIR/$lang.po")
- if ! -s "$SRCDIR/$lang.po";
-
- if (!$DIST_ARG)
- {
- print "Working, please wait..." if $VERBOSE;
- &GenerateHeaders;
- &GeneratePOTemplate;
- }
- &POFile_Update ($lang, $OUTPUT_FILE);
- &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE);
-}
-else
-{
- &Console_Write_IntltoolHelp;
-}
-
-exit;
-
-#########
-
-sub Console_Write_IntltoolVersion
-{
- print <<_EOF_;
-${PROGRAM} (${PACKAGE}) $VERSION
-Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler.
-
-Copyright (C) 2000-2003 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-_EOF_
- exit;
-}
-
-sub Console_Write_IntltoolHelp
-{
- print <<_EOF_;
-Usage: ${PROGRAM} [OPTION]... LANGCODE
-Updates PO template files and merge them with the translations.
-
-Mode of operation (only one is allowed):
- -p, --pot generate the PO template only
- -s, --headers generate the header files in POTFILES.in
- -m, --maintain search for left out files from POTFILES.in
- -r, --report display a status report for the module
- -d, --dist merge LANGCODE.po with existing PO template
-
-Extra options:
- -g, --gettext-package=NAME override PO template name, useful with --pot
- -o, --output-file=FILE write merged translation to FILE
- -x, --verbose display lots of feedback
- --help display this help and exit
- --version output version information and exit
-
-Examples of use:
-${PROGRAM} --pot just create a new PO template
-${PROGRAM} xy create new PO template and merge xy.po with it
-
-Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
-or send email to <xml-i18n-tools\@gnome.org>.
-_EOF_
- exit;
-}
-
-sub echo_n
-{
- my $str = shift;
- my $ret = `echo "$str"`;
-
- $ret =~ s/\n$//; # do we need the "s" flag?
-
- return $ret;
-}
-
-sub POFile_DetermineType ($)
-{
- my $type = $_;
- my $gettext_type;
-
- my $xml_regex = "(?:" . $xml_support . ")";
- my $ini_regex = "(?:" . $ini_support . ")";
- my $buildin_regex = "(?:" . $buildin_gettext_support . ")";
-
- if ($type =~ /\[type: gettext\/([^\]].*)]/)
- {
- $gettext_type=$1;
- }
- elsif ($type =~ /schemas(\.in)+$/)
- {
- $gettext_type="schemas";
- }
- elsif ($type =~ /glade2?(\.in)*$/)
- {
- $gettext_type="glade";
- }
- elsif ($type =~ /scm(\.in)*$/)
- {
- $gettext_type="scheme";
- }
- elsif ($type =~ /keys(\.in)+$/)
- {
- $gettext_type="keys";
- }
-
- # bucket types
-
- elsif ($type =~ /$xml_regex$/)
- {
- $gettext_type="xml";
- }
- elsif ($type =~ /$ini_regex$/)
- {
- $gettext_type="ini";
- }
- elsif ($type =~ /$buildin_regex$/)
- {
- $gettext_type="buildin";
- }
- else
- {
- $gettext_type="unknown";
- }
-
- return "gettext\/$gettext_type";
-}
-
-sub TextFile_DetermineEncoding ($)
-{
- my $gettext_code="ASCII"; # All files are ASCII by default
- my $filetype=`file $_ | cut -d ' ' -f 2`;
-
- if ($? eq "0")
- {
- if ($filetype =~ /^(ISO|UTF)/)
- {
- chomp ($gettext_code = $filetype);
- }
- elsif ($filetype =~ /^XML/)
- {
- $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8
- }
- }
-
- return $gettext_code;
-}
-
-sub isNotValidMissing
-{
- my ($file) = @_;
-
- return if $file =~ /^\{arch\}\/.*$/;
- return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/;
-}
-
-sub FindLeftoutFiles
-{
- my (@buf_i18n_plain,
- @buf_i18n_xml,
- @buf_i18n_xml_unmarked,
- @buf_i18n_ini,
- @buf_potfiles,
- @buf_potfiles_ignore,
- @buf_allfiles,
- @buf_allfiles_sorted,
- @buf_potfiles_sorted,
- @buf_potfiles_ignore_sorted
- );
-
- ## Search and find all translatable files
- find sub {
- push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/;
- push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/;
- push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/;
- push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
- }, "..";
- find sub {
- push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/;
- push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/;
- push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/;
- push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
- }, "$SRCDIR/.." if "$SRCDIR" ne ".";
-
- open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n";
- @buf_potfiles = grep !/^(#|\s*$)/, <POTFILES>;
- close POTFILES;
-
- foreach (@buf_potfiles) {
- s/^\[.*]\s*//;
- }
-
- print "Searching for missing translatable files...\n" if $VERBOSE;
-
- ## Check if we should ignore some found files, when
- ## comparing with POTFILES.in
- foreach my $ignore ("POTFILES.skip", "POTFILES.ignore")
- {
- (-s "$SRCDIR/$ignore") or next;
-
- if ("$ignore" eq "POTFILES.ignore")
- {
- print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n".
- "content of this file to POTFILES.skip.\n";
- }
-
- print "Found $ignore: Ignoring files...\n" if $VERBOSE;
- open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n";
-
- while (<FILE>)
- {
- push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/;
- }
- close FILE;
-
- @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore);
- }
-
- foreach my $file (@buf_i18n_plain)
- {
- my $in_comment = 0;
- my $in_macro = 0;
-
- open FILE, "<$file";
- while (<FILE>)
- {
- # Handle continued multi-line comment.
- if ($in_comment)
- {
- next unless s-.*\*/--;
- $in_comment = 0;
- }
-
- # Handle continued macro.
- if ($in_macro)
- {
- $in_macro = 0 unless /\\$/;
- next;
- }
-
- # Handle start of macro (or any preprocessor directive).
- if (/^\s*\#/)
- {
- $in_macro = 1 if /^([^\\]|\\.)*\\$/;
- next;
- }
-
- # Handle comments and quoted text.
- while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy
- {
- my $match = $1;
- if ($match eq "/*")
- {
- if (!s-/\*.*?\*/--)
- {
- s-/\*.*--;
- $in_comment = 1;
- }
- }
- elsif ($match eq "//")
- {
- s-//.*--;
- }
- else # ' or "
- {
- if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-)
- {
- warn "mismatched quotes at line $. in $file\n";
- s-$match.*--;
- }
- }
- }
-
- if (/\w\.GetString *\(QUOTEDTEXT/)
- {
- if (defined isNotValidMissing (unpack("x3 A*", $file))) {
- ## Remove the first 3 chars and add newline
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- }
- last;
- }
-
- ## C_ N_ Q_ and _ are the macros defined in gi8n.h
- if (/[CNQ]?_ *\(QUOTEDTEXT/)
- {
- if (defined isNotValidMissing (unpack("x3 A*", $file))) {
- ## Remove the first 3 chars and add newline
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- }
- last;
- }
- }
- close FILE;
- }
-
- foreach my $file (@buf_i18n_xml)
- {
- open FILE, "<$file";
-
- while (<FILE>)
- {
- # FIXME: share the pattern matching code with intltool-extract
- if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/)
- {
- if (defined isNotValidMissing (unpack("x3 A*", $file))) {
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- }
- last;
- }
- }
- close FILE;
- }
-
- foreach my $file (@buf_i18n_ini)
- {
- open FILE, "<$file";
- while (<FILE>)
- {
- if (/_(.*)=/)
- {
- if (defined isNotValidMissing (unpack("x3 A*", $file))) {
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- }
- last;
- }
- }
- close FILE;
- }
-
- foreach my $file (@buf_i18n_xml_unmarked)
- {
- if (defined isNotValidMissing (unpack("x3 A*", $file))) {
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- }
- }
-
-
- @buf_allfiles_sorted = sort (@buf_allfiles);
- @buf_potfiles_sorted = sort (@buf_potfiles);
-
- my %in2;
- foreach (@buf_potfiles_sorted)
- {
- s#^$SRCDIR/../##;
- s#^$SRCDIR/##;
- $in2{$_} = 1;
- }
-
- foreach (@buf_potfiles_ignore_sorted)
- {
- s#^$SRCDIR/../##;
- s#^$SRCDIR/##;
- $in2{$_} = 1;
- }
-
- my @result;
-
- foreach (@buf_allfiles_sorted)
- {
- my $dummy = $_;
- my $srcdir = $SRCDIR;
-
- $srcdir =~ s#^../##;
- $dummy =~ s#^$srcdir/../##;
- $dummy =~ s#^$srcdir/##;
- $dummy =~ s#_build/##;
- if (!exists($in2{$dummy}))
- {
- push @result, $dummy
- }
- }
-
- my @buf_potfiles_notexist;
-
- foreach (@buf_potfiles_sorted)
- {
- chomp (my $dummy = $_);
- if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy"))
- {
- push @buf_potfiles_notexist, $_;
- }
- }
-
- ## Save file with information about the files missing
- ## if any, and give information about this procedure.
- if (@result + @buf_potfiles_notexist > 0)
- {
- if (@result)
- {
- print "\n" if $VERBOSE;
- unlink "missing";
- open OUT, ">missing";
- print OUT @result;
- close OUT;
- warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n".
- "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n";
- print STDERR @result, "\n";
- warn "If some of these files are left out on purpose then please add them to\n".
- "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n".
- "of left out files has been written in the current directory.\n";
- }
- if (@buf_potfiles_notexist)
- {
- unlink "notexist";
- open OUT, ">notexist";
- print OUT @buf_potfiles_notexist;
- close OUT;
- warn "\n" if ($VERBOSE or @result);
- warn "\e[1mThe following files do not exist anymore:\e[0m\n\n";
- warn @buf_potfiles_notexist, "\n";
- warn "Please remove them from POTFILES.in. A file \e[1m'notexist'\e[0m\n".
- "containing this list of absent files has been written in the current directory.\n";
- }
- }
-
- ## If there is nothing to complain about, notify the user
- else {
- print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE;
- }
-}
-
-sub Console_WriteError_InvalidOption
-{
- ## Handle invalid arguments
- print STDERR "Try `${PROGRAM} --help' for more information.\n";
- exit 1;
-}
-
-sub isProgramInPath
-{
- my ($file) = @_;
- # If either a file exists, or when run it returns 0 exit status
- return 1 if ((-x $file) or (system("$file --version >$devnull") == 0));
- return 0;
-}
-
-sub isGNUGettextTool
-{
- my ($file) = @_;
- # Check that we are using GNU gettext tools
- if (isProgramInPath ($file))
- {
- my $version = `$file --version`;
- return 1 if ($version =~ m/.*\(GNU .*\).*/);
- }
- return 0;
-}
-
-sub GenerateHeaders
-{
- my $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} || "intltool-extract";
-
- ## Generate the .h header files, so we can allow glade and
- ## xml translation support
- if (! isProgramInPath ("$EXTRACT"))
- {
- print STDERR "\n *** The intltool-extract script wasn't found!"
- ."\n *** Without it, intltool-update can not generate files.\n";
- exit;
- }
- else
- {
- open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n";
-
- while (<FILE>)
- {
- chomp;
- next if /^\[\s*encoding/;
-
- ## Find xml files in POTFILES.in and generate the
- ## files with help from the extract script
-
- my $gettext_type= &POFile_DetermineType ($1);
-
- if (/\.($xml_support|$ini_support)$/ || /^\[/)
- {
- s/^\[[^\[].*]\s*//;
-
- my $filename = "../$_";
-
- if ($VERBOSE)
- {
- system ($EXTRACT, "--update", "--srcdir=$SRCDIR",
- "--type=$gettext_type", $filename);
- }
- else
- {
- system ($EXTRACT, "--update", "--type=$gettext_type",
- "--srcdir=$SRCDIR", "--quiet", $filename);
- }
- }
- }
- close FILE;
- }
-}
-
-#
-# Generate .pot file from POTFILES.in
-#
-sub GeneratePOTemplate
-{
- my $XGETTEXT = $ENV{"XGETTEXT"} || "xgettext";
- my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || '';
- chomp $XGETTEXT;
-
- if (! isGNUGettextTool ("$XGETTEXT"))
- {
- print STDERR " *** GNU xgettext is not found on this system!\n".
- " *** Without it, intltool-update can not extract strings.\n";
- exit;
- }
-
- print "Building $MODULE.pot...\n" if $VERBOSE;
-
- open INFILE, $POTFILES_in;
- unlink "POTFILES.in.temp";
- open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing");
-
- my $gettext_support_nonascii = 0;
-
- # checks for GNU gettext >= 0.12
- my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`;
- if ($? == 0)
- {
- $gettext_support_nonascii = 1;
- }
- else
- {
- # urge everybody to upgrade gettext
- print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n".
- " strings. That means you should install a version of gettext\n".
- " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n".
- " or have to let non-ASCII strings untranslated. (If there is any)\n";
- }
-
- my $encoding = "ASCII";
- my $forced_gettext_code;
- my @temp_headers;
- my $encoding_problem_is_reported = 0;
-
- while (<INFILE>)
- {
- next if (/^#/ or /^\s*$/);
-
- chomp;
-
- my $gettext_code;
-
- if (/^\[\s*encoding:\s*(.*)\s*\]/)
- {
- $forced_gettext_code=$1;
- }
- elsif (/\.($xml_support|$ini_support)$/ || /^\[/)
- {
- s/^\[.*]\s*//;
- print OUTFILE "../$_.h\n";
- push @temp_headers, "../$_.h";
- $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code);
- }
- else
- {
- print OUTFILE "$SRCDIR/../$_\n";
- $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code);
- }
-
- next if (! $gettext_support_nonascii);
-
- if (defined $forced_gettext_code)
- {
- $encoding=$forced_gettext_code;
- }
- elsif (defined $gettext_code and "$encoding" ne "$gettext_code")
- {
- if ($encoding eq "ASCII")
- {
- $encoding=$gettext_code;
- }
- elsif ($gettext_code ne "ASCII")
- {
- # Only report once because the message is quite long
- if (! $encoding_problem_is_reported)
- {
- print STDERR "WARNING: You should use the same file encoding for all your project files,\n".
- " but $PROGRAM thinks that most of the source files are in\n".
- " $encoding encoding, while \"$_\" is (likely) in\n".
- " $gettext_code encoding. If you are sure that all translatable strings\n".
- " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n".
- " line to POTFILES.in:\n\n".
- " [encoding: UTF-8]\n\n".
- " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n".
- "(such warning message will only be reported once.)\n";
- $encoding_problem_is_reported = 1;
- }
- }
- }
- }
-
- close OUTFILE;
- close INFILE;
-
- unlink "$MODULE.pot";
- my @xgettext_argument=("$XGETTEXT",
- "--add-comments",
- "--directory\=.",
- "--default-domain\=$MODULE",
- "--flag\=g_strdup_printf:1:c-format",
- "--flag\=g_string_printf:2:c-format",
- "--flag\=g_string_append_printf:2:c-format",
- "--flag\=g_error_new:3:c-format",
- "--flag\=g_set_error:4:c-format",
- "--flag\=g_markup_printf_escaped:1:c-format",
- "--flag\=g_log:3:c-format",
- "--flag\=g_print:1:c-format",
- "--flag\=g_printerr:1:c-format",
- "--flag\=g_printf:1:c-format",
- "--flag\=g_fprintf:2:c-format",
- "--flag\=g_sprintf:2:c-format",
- "--flag\=g_snprintf:3:c-format",
- "--flag\=g_scanner_error:2:c-format",
- "--flag\=g_scanner_warn:2:c-format",
- "--output\=$MODULE\.pot",
- "--files-from\=\.\/POTFILES\.in\.temp");
- my $XGETTEXT_KEYWORDS = &FindPOTKeywords;
- push @xgettext_argument, $XGETTEXT_KEYWORDS;
- my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress;
- push @xgettext_argument, "--msgid-bugs-address\=\"$MSGID_BUGS_ADDRESS\"" if $MSGID_BUGS_ADDRESS;
- push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii);
- push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS;
- my $xgettext_command = join ' ', @xgettext_argument;
-
- # intercept xgettext error message
- print "Running $xgettext_command\n" if $VERBOSE;
- my $xgettext_error_msg = `$xgettext_command 2>\&1`;
- my $command_failed = $?;
-
- unlink "POTFILES.in.temp";
-
- print "Removing generated header (.h) files..." if $VERBOSE;
- unlink foreach (@temp_headers);
- print "done.\n" if $VERBOSE;
-
- if (! $command_failed)
- {
- if (! -e "$MODULE.pot")
- {
- print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE;
- }
- else
- {
- print "Wrote $MODULE.pot\n" if $VERBOSE;
- }
- }
- else
- {
- if ($xgettext_error_msg =~ /--from-code/)
- {
- # replace non-ASCII error message with a more useful one.
- print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n".
- " string marked for translation. Please make sure that all strings marked\n".
- " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n".
- " following line to POTFILES.in and rerun $PROGRAM:\n\n".
- " [encoding: UTF-8]\n\n";
- }
- else
- {
- print STDERR "$xgettext_error_msg";
- if (-e "$MODULE.pot")
- {
- # is this possible?
- print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n".
- " Please consult error message above if there is any.\n";
- }
- else
- {
- print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n".
- " error message above if there is any.\n";
- }
- }
- exit (1);
- }
-}
-
-sub POFile_Update
-{
- -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n";
-
- my $MSGMERGE = $ENV{"MSGMERGE"} || "msgmerge";
- my ($lang, $outfile) = @_;
-
- if (! isGNUGettextTool ("$MSGMERGE"))
- {
- print STDERR " *** GNU msgmerge is not found on this system!\n".
- " *** Without it, intltool-update can not extract strings.\n";
- exit;
- }
-
- print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE;
-
- my $infile = "$SRCDIR/$lang.po";
- $outfile = "$SRCDIR/$lang.po" if ($outfile eq "");
-
- # I think msgmerge won't overwrite old file if merge is not successful
- system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot");
-}
-
-sub Console_WriteError_NotExisting
-{
- my ($file) = @_;
-
- ## Report error if supplied language file is non-existing
- print STDERR "$PROGRAM: $file does not exist!\n";
- print STDERR "Try '$PROGRAM --help' for more information.\n";
- exit;
-}
-
-sub GatherPOFiles
-{
- my @po_files = glob ("./*.po");
-
- @languages = map (&POFile_GetLanguage, @po_files);
-
- foreach my $lang (@languages)
- {
- $po_files_by_lang{$lang} = shift (@po_files);
- }
-}
-
-sub POFile_GetLanguage ($)
-{
- s/^(.*\/)?(.+)\.po$/$2/;
- return $_;
-}
-
-sub Console_Write_TranslationStatus
-{
- my ($lang, $output_file) = @_;
- my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt";
-
- if (! isGNUGettextTool ("$MSGFMT"))
- {
- print STDERR " *** GNU msgfmt is not found on this system!\n".
- " *** Without it, intltool-update can not extract strings.\n";
- exit;
- }
-
- $output_file = "$SRCDIR/$lang.po" if ($output_file eq "");
-
- system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file);
-}
-
-sub Console_Write_CoverageReport
-{
- my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt";
-
- if (! isGNUGettextTool ("$MSGFMT"))
- {
- print STDERR " *** GNU msgfmt is not found on this system!\n".
- " *** Without it, intltool-update can not extract strings.\n";
- exit;
- }
-
- &GatherPOFiles;
-
- foreach my $lang (@languages)
- {
- print STDERR "$lang: ";
- &POFile_Update ($lang, "");
- }
-
- print STDERR "\n\n * Current translation support in $MODULE \n\n";
-
- foreach my $lang (@languages)
- {
- print STDERR "$lang: ";
- system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po");
- }
-}
-
-sub SubstituteVariable
-{
- my ($str) = @_;
-
- # always need to rewind file whenever it has been accessed
- seek (CONF, 0, 0);
-
- # cache each variable. varhash is global to we can add
- # variables elsewhere.
- while (<CONF>)
- {
- if (/^(\w+)=(.*)$/)
- {
- ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/;
- }
- }
-
- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
- {
- my $rest = $3;
- my $untouched = $1;
- my $sub = "";
- # Ignore recursive definitions of variables
- $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
-
- return SubstituteVariable ("$untouched$sub$rest");
- }
-
- # We're using Perl backticks ` and "echo -n" here in order to
- # expand any shell escapes (such as backticks themselves) in every variable
- return echo_n ($str);
-}
-
-sub CONF_Handle_Open
-{
- my $base_dirname = getcwd();
- $base_dirname =~ s@.*/@@;
-
- my ($conf_in, $src_dir);
-
- if ($base_dirname =~ /^po(-.+)?$/)
- {
- if (-f "Makevars")
- {
- my $makefile_source;
-
- local (*IN);
- open (IN, "<Makevars") || die "can't open Makevars: $!";
-
- while (<IN>)
- {
- if (/^top_builddir[ \t]*=/)
- {
- $src_dir = $_;
- $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
-
- chomp $src_dir;
- if (-f "$src_dir" . "/configure.ac") {
- $conf_in = "$src_dir" . "/configure.ac" . "\n";
- } else {
- $conf_in = "$src_dir" . "/configure.in" . "\n";
- }
- last;
- }
- }
- close IN;
-
- $conf_in || die "Cannot find top_builddir in Makevars.";
- }
- elsif (-f "$SRCDIR/../configure.ac")
- {
- $conf_in = "$SRCDIR/../configure.ac";
- }
- elsif (-f "$SRCDIR/../configure.in")
- {
- $conf_in = "$SRCDIR/../configure.in";
- }
- else
- {
- my $makefile_source;
-
- local (*IN);
- open (IN, "<Makefile") || return;
-
- while (<IN>)
- {
- if (/^top_srcdir[ \t]*=/)
- {
- $src_dir = $_;
- $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
-
- chomp $src_dir;
- $conf_in = "$src_dir" . "/configure.in" . "\n";
-
- last;
- }
- }
- close IN;
-
- $conf_in || die "Cannot find top_srcdir in Makefile.";
- }
-
- open (CONF, "<$conf_in");
- }
- else
- {
- print STDERR "$PROGRAM: Unable to proceed.\n" .
- "Make sure to run this script inside the po directory.\n";
- exit;
- }
-}
-
-sub FindPackageName
-{
- my $version;
- my $domain = &FindMakevarsDomain;
- my $name = $domain || "untitled";
-
- &CONF_Handle_Open;
-
- my $conf_source; {
- local (*IN);
- open (IN, "<&CONF") || return $name;
- seek (IN, 0, 0);
- local $/; # slurp mode
- $conf_source = <IN>;
- close IN;
- }
-
- # priority for getting package name:
- # 1. GETTEXT_PACKAGE
- # 2. first argument of AC_INIT (with >= 2 arguments)
- # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument)
-
- # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m
- # the \s makes this not work, why?
- if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m)
- {
- ($name, $version) = ($1, $2);
- $name =~ s/[\[\]\s]//g;
- $version =~ s/[\[\]\s]//g;
- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
- }
-
- if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m)
- {
- ($name, $version) = ($1, $2);
- $name =~ s/[\[\]\s]//g;
- $version =~ s/[\[\]\s]//g;
- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
- }
-
- # \s makes this not work, why?
- $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m;
-
- # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value
- # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables.
- $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g;
-
- $name = $domain if $domain;
-
- $name = SubstituteVariable ($name);
- $name =~ s/^["'](.*)["']$/$1/;
-
- return $name if $name;
-}
-
-
-sub FindPOTKeywords
-{
-
- my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_";
- my $varname = "XGETTEXT_OPTIONS";
- my $make_source; {
- local (*IN);
- open (IN, "<Makevars") || (open(IN, "<Makefile.in.in") && ($varname = "XGETTEXT_KEYWORDS")) || return $keywords;
- seek (IN, 0, 0);
- local $/; # slurp mode
- $make_source = <IN>;
- close IN;
- }
-
- # unwrap lines split with a trailing \
- $make_source =~ s/\\ $ \n/ /mxg;
- $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m;
-
- return $keywords;
-}
-
-sub FindMakevarsDomain
-{
-
- my $domain = "";
- my $makevars_source; {
- local (*IN);
- open (IN, "<Makevars") || return $domain;
- seek (IN, 0, 0);
- local $/; # slurp mode
- $makevars_source = <IN>;
- close IN;
- }
-
- $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m;
- $domain =~ s/^\s+//;
- $domain =~ s/\s+$//;
-
- return $domain;
-}
-
-sub FindMakevarsBugAddress
-{
-
- my $address = "";
- my $makevars_source; {
- local (*IN);
- open (IN, "<Makevars") || return undef;
- seek (IN, 0, 0);
- local $/; # slurp mode
- $makevars_source = <IN>;
- close IN;
- }
-
- $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m;
- $address =~ s/^\s+//;
- $address =~ s/\s+$//;
-
- return $address;
-}
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 6891e8f..57ef267 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -54,16 +54,16 @@ GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDA
ALL_LINGUAS = @ALL_LINGUAS@
-PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
-USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep ^$$lang$$`"; then printf "$$lang "; fi; done; fi)
-USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
-POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
-DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
-EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
+DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
POTFILES = \
# This comment gets stripped out
@@ -101,7 +101,6 @@ install: install-data
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
- $(mkdir_p) $(DESTDIR)$(itlocaledir)
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
diff --git a/po/POTFILES.in b/po/POTFILES.in
index dc44f2d..b0bdaa6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,36 +1,59 @@
-src/intro/intro.py
-src/view/BuddyMenu.py
-src/view/clipboardmenu.py
-src/hardware/keydialog.py
-src/hardware/schoolserver.py
-src/view/Shell.py
-src/view/clipboardicon.py
-src/view/home/HomeBox.py
-src/view/home/MeshBox.py
-src/view/devices/battery.py
-src/view/devices/speaker.py
-src/view/devices/network/wireless.py
-src/view/frame/zoomtoolbar.py
-src/controlpanel/cmd.py
-src/controlpanel/toolbar.py
-src/controlpanel/sectionview.py
-src/controlpanel/gui.py
-src/controlpanel/model/aboutme.py
-src/controlpanel/model/aboutxo.py
-src/controlpanel/model/datetime.py
-src/controlpanel/model/frame.py
-src/controlpanel/model/language.py
-src/controlpanel/model/network.py
-src/controlpanel/model/power.py
-src/controlpanel/view/aboutme.py
-src/controlpanel/view/aboutxo.py
-src/controlpanel/view/datetime.py
-src/controlpanel/view/frame.py
-src/controlpanel/view/language.py
-src/controlpanel/view/network.py
-src/controlpanel/view/power.py
-src/view/devices/network/mesh.py
-src/view/frame/activitiestray.py
-src/view/home/favoritesview.py
-src/view/palettes.py
+extensions/cpsection/aboutme/__init__.py
+extensions/cpsection/aboutme/model.py
+extensions/cpsection/aboutme/view.py
+extensions/cpsection/aboutxo/__init__.py
+extensions/cpsection/aboutxo/model.py
+extensions/cpsection/aboutxo/view.py
+extensions/cpsection/datetime/__init__.py
+extensions/cpsection/datetime/model.py
+extensions/cpsection/datetime/view.py
+extensions/cpsection/frame/__init__.py
+extensions/cpsection/frame/model.py
+extensions/cpsection/frame/view.py
+extensions/cpsection/language/__init__.py
+extensions/cpsection/language/model.py
+extensions/cpsection/language/view.py
+extensions/cpsection/network/__init__.py
+extensions/cpsection/network/model.py
+extensions/cpsection/network/view.py
+extensions/cpsection/power/__init__.py
+extensions/cpsection/power/model.py
+extensions/cpsection/power/view.py
+extensions/deviceicon/battery.py
+extensions/deviceicon/network.py
+extensions/deviceicon/speaker.py
+extensions/deviceicon/volume.py
+extensions/globalkey/screenshot.py
+extensions/globalkey/viewsource.py
+data/sugar.schemas.in
+src/jarabe/controlpanel/cmd.py
+src/jarabe/controlpanel/gui.py
+src/jarabe/controlpanel/sectionview.py
+src/jarabe/controlpanel/toolbar.py
+src/jarabe/desktop/favoriteslayout.py
+src/jarabe/desktop/favoritesview.py
+src/jarabe/desktop/homebox.py
+src/jarabe/desktop/keydialog.py
+src/jarabe/desktop/meshbox.py
+src/jarabe/desktop/schoolserver.py
+src/jarabe/frame/activitiestray.py
+src/jarabe/frame/clipboardmenu.py
+src/jarabe/frame/clipboardobject.py
+src/jarabe/frame/devicestray.py
+src/jarabe/frame/zoomtoolbar.py
+src/jarabe/intro/window.py
+src/jarabe/journal/collapsedentry.py
+src/jarabe/journal/detailview.py
+src/jarabe/journal/expandedentry.py
+src/jarabe/journal/journalactivity.py
+src/jarabe/journal/journaltoolbox.py
+src/jarabe/journal/listview.py
+src/jarabe/journal/misc.py
+src/jarabe/journal/modalalert.py
+src/jarabe/journal/objectchooser.py
+src/jarabe/journal/palettes.py
+src/jarabe/journal/volumestoolbar.py
+src/jarabe/view/buddymenu.py
+src/jarabe/view/keyhandler.py
+src/jarabe/view/palettes.py
diff --git a/po/ar.po b/po/ar.po
index d799347..5978dcf 100644
--- a/po/ar.po
+++ b/po/ar.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sugar\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-19 00:30-0400\n"
-"PO-Revision-Date: 2008-09-19 16:02-0400\n"
+"POT-Creation-Date: 2008-09-01 18:31-0400\n"
+"PO-Revision-Date: 2008-09-01 19:07-0400\n"
"Last-Translator: Khaled Hosny <khaledhosny@eglug.org>\n"
"Language-Team: Arabic <doc@arabeyes.org>\n"
"MIME-Version: 1.0\n"
@@ -19,35 +19,35 @@ msgstr ""
"Nplurals=6; Plural=N==0 ? 0: n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 "
": n%100>=11 && n%100<=99 ? 4 : 5;\n"
-#: ../src/intro/intro.py:65 ../src/controlpanel/view/aboutme.py:100
+#: ../src/intro/window.py:93 ../src/controlpanel/view/aboutme.py:100
msgid "Name:"
msgstr "الاسم:"
-#: ../src/intro/intro.py:97
+#: ../src/intro/window.py:125
msgid "Click to change color:"
msgstr "انقر لتغيير اللون:"
-#: ../src/intro/intro.py:148
+#: ../src/intro/window.py:175
msgid "Back"
msgstr "السابق"
-#: ../src/intro/intro.py:162 ../src/controlpanel/toolbar.py:61
+#: ../src/intro/window.py:189 ../src/controlpanel/toolbar.py:61
msgid "Done"
msgstr "تمّ"
-#: ../src/intro/intro.py:165
+#: ../src/intro/window.py:192
msgid "Next"
msgstr "التالي"
-#: ../src/view/BuddyMenu.py:60
+#: ../src/view/BuddyMenu.py:58
msgid "Remove friend"
msgstr "أزل صديق"
-#: ../src/view/BuddyMenu.py:63
+#: ../src/view/BuddyMenu.py:61
msgid "Make friend"
msgstr "اصنع صديق"
-#: ../src/view/BuddyMenu.py:92
+#: ../src/view/BuddyMenu.py:90
#, python-format
msgid "Invite to %s"
msgstr "ادع٠إلى %s"
@@ -68,7 +68,7 @@ msgstr "اÙتح"
#. TODO: Implement stopping downloads
#. self._stop_item.connect('activate', self._stop_item_activate_cb)
#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:85
+#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:87
msgid "Keep"
msgstr "احÙظ"
@@ -105,59 +105,71 @@ msgstr "تعذّر الاتصال بالخادوم."
msgid "The server could not complete the request."
msgstr "لم يستطع الخادوم إكمال الطلب."
-#: ../src/view/Shell.py:251
+#: ../src/view/Shell.py:261
msgid "Screenshot"
msgstr "لقطة شاشة"
-#: ../src/view/home/HomeBox.py:79
+#: ../src/view/home/HomeBox.py:81
msgid "Confirm erase"
msgstr "أكّد المسح"
-#: ../src/view/home/HomeBox.py:81
+#: ../src/view/home/HomeBox.py:83
#, python-format
msgid "Confirm erase: Do you want to permanently erase %s?"
msgstr "أكّد المسح: أتريد مسح %s نهائيا؟"
-#: ../src/view/home/HomeBox.py:88 ../src/view/palettes.py:120
+#: ../src/view/home/HomeBox.py:90 ../src/view/palettes.py:120
msgid "Erase"
msgstr "امسح"
-#: ../src/view/home/HomeBox.py:118
+#: ../src/view/home/HomeBox.py:120
msgid "Software Update"
msgstr "تحديث البرمجيات"
-#: ../src/view/home/HomeBox.py:119
+#: ../src/view/home/HomeBox.py:121
msgid "Update your activities to ensure compatibility with your new software"
msgstr "حدّث نشاطاتك لتضمن التواÙقية مع البرمجيات الجديدة"
-#: ../src/view/home/HomeBox.py:123 ../src/controlpanel/toolbar.py:115
+#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/toolbar.py:115
msgid "Cancel"
msgstr "ألغÙ"
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/gui.py:286
+#: ../src/view/home/HomeBox.py:127 ../src/controlpanel/gui.py:276
msgid "Later"
msgstr "لاحقا"
-#: ../src/view/home/HomeBox.py:128
+#: ../src/view/home/HomeBox.py:130
msgid "Check now"
msgstr "التمس الآن"
-#: ../src/view/home/HomeBox.py:262
+#: ../src/view/home/HomeBox.py:266
msgid "List view"
msgstr "منظور القائمة"
-#: ../src/view/home/HomeBox.py:263
+#: ../src/view/home/HomeBox.py:267
msgid "<Ctrl>2"
msgstr "<Ctrl>2"
-#: ../src/view/home/HomeBox.py:321
+#: ../src/view/home/HomeBox.py:325
msgid "Favorites view"
msgstr "المنظور المÙضل"
-#: ../src/view/home/HomeBox.py:322
+#: ../src/view/home/HomeBox.py:326
msgid "<Ctrl>1"
msgstr "<Ctrl>1"
+# TRANS: label for the freeform layout in the favorites view
+#. TRANS: label for the freeform layout in the favorites view
+#: ../src/view/home/HomeBox.py:334
+msgid "Freeform"
+msgstr "Ø­Ùر"
+
+# TRANS: label for the ring layout in the favorites view
+#. TRANS: label for the ring layout in the favorites view
+#: ../src/view/home/HomeBox.py:341
+msgid "Ring"
+msgstr "حلقة"
+
#: ../src/view/home/MeshBox.py:97
msgid "Connect"
msgstr "اتصل"
@@ -184,10 +196,9 @@ msgstr "يجري الاتصال..."
msgid "Connected"
msgstr "Ù…Ùتّصل"
-#. only temporarily
-#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:51
-#: ../src/view/devices/network/mesh.py:92
-#: ../src/view/devices/network/mesh.py:96
+#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:41
+#: ../src/view/devices/network/mesh.py:68
+#: ../src/view/devices/network/mesh.py:72
msgid "Mesh Network"
msgstr "شبكة عÙروÙيّة"
@@ -195,8 +206,8 @@ msgstr "شبكة عÙروÙيّة"
# priority over the normal wireless device. NM doesn't have a "disconnect"
# method for a device either (for various reasons) so this doesn't
# have a good mapping
-#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:160
-#: ../src/view/devices/network/mesh.py:125
+#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:119
+#: ../src/view/devices/network/mesh.py:89
msgid "Disconnect..."
msgstr "اÙصÙÙ„..."
@@ -233,24 +244,19 @@ msgstr "مشحون"
msgid "My Speakers"
msgstr "سماعاتي"
-#: ../src/view/devices/speaker.py:119
+#: ../src/view/devices/speaker.py:125
msgid "Unmute"
msgstr "اÙتح"
-#: ../src/view/devices/speaker.py:122
+#: ../src/view/devices/speaker.py:128
msgid "Mute"
msgstr "أصمÙت"
-#: ../src/view/devices/network/wireless.py:37
-#, python-format
-msgid "IP address: %s"
-msgstr "عنوان الإنترنت: %s"
-
-#: ../src/view/devices/network/wireless.py:86
+#: ../src/view/devices/network/wireless.py:67
msgid "Disconnected"
msgstr "Ù…Ùصول"
-#: ../src/view/devices/network/wireless.py:178
+#: ../src/view/devices/network/wireless.py:137
msgid "Channel"
msgstr "قناة"
@@ -287,7 +293,9 @@ msgstr ""
msgid "sugar-control-panel: %s"
msgstr ""
-#: ../src/controlpanel/cmd.py:33
+#. TRANS: Translators, there's a empty line at the end of this string,
+#. which must appear in the translated string (msgstr) as well.
+#: ../src/controlpanel/cmd.py:35
msgid ""
"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
" Control for the sugar environment. \n"
@@ -301,27 +309,27 @@ msgid ""
" "
msgstr ""
-#: ../src/controlpanel/cmd.py:46
+#: ../src/controlpanel/cmd.py:48
msgid "To apply your changes you have to restart sugar.\n"
msgstr "تحتاج لإعادة تشغيل «سÙكّر» لتÙطبق التغييرات.\n"
-#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:305
+#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:296
msgid "Ok"
msgstr "حسنا"
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:278
+#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:268
msgid "Changes require restart"
msgstr "تتطلب التغييرات إعادة التشغيل"
-#: ../src/controlpanel/gui.py:277
+#: ../src/controlpanel/gui.py:267
msgid "Warning"
msgstr "تحذير"
-#: ../src/controlpanel/gui.py:281
+#: ../src/controlpanel/gui.py:271
msgid "Cancel changes"
msgstr "ألغ٠التغييرات"
-#: ../src/controlpanel/gui.py:290
+#: ../src/controlpanel/gui.py:280
msgid "Restart now"
msgstr "أعÙد التشغيل الآن"
@@ -361,7 +369,7 @@ msgstr "خطأ ÙÙŠ الألوان المحددة."
msgid "Not available"
msgstr "غير Ù…Ùتاح"
-#: ../src/controlpanel/model/datetime.py:89
+#: ../src/controlpanel/model/datetime.py:85
msgid "Error timezone does not exist."
msgstr "خطأ: المنطقة الزمنية لا وجود لها."
@@ -373,21 +381,25 @@ msgstr "يجب أن تكون القيمة عددا صحيحا."
msgid "Could not access ~/.i18n. Create standard settings."
msgstr "تعذّر الوصول إلى ‭~/.i18n‬. سأنشئ إعدادات قياسية."
-#: ../src/controlpanel/model/language.py:114
+#: ../src/controlpanel/model/language.py:110
#, python-format
msgid "Language for code=%s could not be determined."
msgstr "لا يمكن تحديد لغة الرمز=%s."
-#: ../src/controlpanel/model/language.py:131
+#: ../src/controlpanel/model/language.py:127
#, python-format
msgid "Sorry I do not speak '%s'."
msgstr "آسÙØŒ لا أتحدث '%s'."
-#: ../src/controlpanel/model/network.py:62
+#: ../src/controlpanel/model/network.py:48
+msgid "You must enter a server."
+msgstr "يجب أن تÙدخÙÙ„ خادوما."
+
+#: ../src/controlpanel/model/network.py:63
msgid "State is unknown."
msgstr "الحالة مجهولة."
-#: ../src/controlpanel/model/network.py:82
+#: ../src/controlpanel/model/network.py:83
msgid "Error in specified radio argument use on/off."
msgstr "خطأ ÙÙŠ معامل الإذاعة المحدد، استخدم Ù…ÙÙعّل/Ù…Ùعطّل."
@@ -444,7 +456,7 @@ msgid ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
msgstr "حقوق النشر محÙوظة 2008 لجمعية حاسوب محمول لكل Ø·ÙÙ„Ø› ردهات؛ والمساهمين."
-#: ../src/controlpanel/view/aboutxo.py:167
+#: ../src/controlpanel/view/aboutxo.py:166
msgid ""
"Sugar is the graphical user interface that you are looking at. Sugar is free "
"software, covered by the GNU General Public License, and you are welcome to "
@@ -455,7 +467,7 @@ msgstr ""
"لرخصة جنو للتأميم عامّة الأغراض، ويمكنك تعديلها Ùˆ/أو توزيع نسخ منها ÙˆÙÙ‚ شروط "
"معينة مذكورة هنا."
-#: ../src/controlpanel/view/aboutxo.py:179
+#: ../src/controlpanel/view/aboutxo.py:178
msgid "Full license:"
msgstr "الترخيص كاملا:"
@@ -505,31 +517,19 @@ msgstr "اللغة"
msgid "Network"
msgstr "الشبكة"
-#: ../src/controlpanel/view/network.py:54
+#: ../src/controlpanel/view/network.py:53
msgid "Wireless"
msgstr "اللاسلكي"
-#: ../src/controlpanel/view/network.py:62
-msgid "Turn of the wireless radio to save battery life"
-msgstr "أغلق الإذاعة اللاسلكية لإطالة عمر البطارية"
+#: ../src/controlpanel/view/network.py:61
+msgid "Radio:"
+msgstr "الإذاعة:"
-#: ../src/controlpanel/view/network.py:75
-msgid "Radio"
-msgstr "الإذاعة"
-
-#: ../src/controlpanel/view/network.py:91
-msgid "Discard network history if you have trouble connecting to the network"
-msgstr "تجاهل تأريخ الشبكة إذا كانت لديك مشاكل ÙÙŠ الاتصال بالشبكة"
-
-#: ../src/controlpanel/view/network.py:100
-msgid "Discard network history"
-msgstr "تجاهل تأريخ الشبكة"
-
-#: ../src/controlpanel/view/network.py:113
+#: ../src/controlpanel/view/network.py:94
msgid "Mesh"
msgstr "الشبكة العروية"
-#: ../src/controlpanel/view/network.py:122
+#: ../src/controlpanel/view/network.py:103
msgid "Server:"
msgstr "الخادوم"
@@ -547,34 +547,34 @@ msgstr "إدارة آلية للطاقة (تطيل من عمر البطارية)
#: ../src/controlpanel/view/power.py:89
msgid ""
-"Extreme power management (disables wireless radio, increases battery life)"
+"Extreme power management (disableswireless radio, increases battery life)"
msgstr "إدارة قصوى للطاقة (تعطّل اللاسلكي وتطيل عمر البطارية)"
-#: ../src/view/devices/network/mesh.py:154
+#: ../src/view/devices/network/mesh.py:111
msgid "Connected to a School Mesh Portal"
msgstr "اتصل ببوابة شبكة مدرسة"
-#: ../src/view/devices/network/mesh.py:156
+#: ../src/view/devices/network/mesh.py:113
msgid "Looking for a School Mesh Portal..."
msgstr "يبحث عن بوابة شبكة مدرسة..."
-#: ../src/view/devices/network/mesh.py:159
+#: ../src/view/devices/network/mesh.py:116
msgid "Connected to an XO Mesh Portal"
msgstr "اتصل ببوابة شبكة XO"
-#: ../src/view/devices/network/mesh.py:161
+#: ../src/view/devices/network/mesh.py:118
msgid "Looking for an XO Mesh Portal..."
msgstr "يبحث عن بوابة شبكة XO..."
-#: ../src/view/devices/network/mesh.py:164
+#: ../src/view/devices/network/mesh.py:121
msgid "Connected to a Simple Mesh"
msgstr "اتصل بشبكة بسيطة"
-#: ../src/view/devices/network/mesh.py:166
+#: ../src/view/devices/network/mesh.py:123
msgid "Starting a Simple Mesh"
msgstr "يبدأ شبكة بسيطة"
-#: ../src/view/devices/network/mesh.py:173
+#: ../src/view/devices/network/mesh.py:130
msgid "Unknown Mesh"
msgstr "شبكة مجهولة"
@@ -582,36 +582,36 @@ msgstr "شبكة مجهولة"
msgid "Decline"
msgstr "ارÙض"
-#: ../src/view/home/favoritesview.py:296
+#: ../src/view/home/favoritesview.py:286
msgid "Registration Failed"
msgstr "Ùشل التسجيل"
-#: ../src/view/home/favoritesview.py:297
+#: ../src/view/home/favoritesview.py:287
#, python-format
msgid "%s"
msgstr "%s"
-#: ../src/view/home/favoritesview.py:299
+#: ../src/view/home/favoritesview.py:289
msgid "Registration Successful"
msgstr "نجح التسجيل"
-#: ../src/view/home/favoritesview.py:300
+#: ../src/view/home/favoritesview.py:290
msgid "You are now registered with your school server."
msgstr "الآن، أنت مسجّل ÙÙŠ خادوم مدرستك."
-#: ../src/view/home/favoritesview.py:420
+#: ../src/view/home/favoritesview.py:407
msgid "Control Panel"
msgstr "لوحة التحكم"
-#: ../src/view/home/favoritesview.py:425
+#: ../src/view/home/favoritesview.py:418
msgid "Restart"
msgstr "أعد التشغيل"
-#: ../src/view/home/favoritesview.py:430
+#: ../src/view/home/favoritesview.py:423
msgid "Shutdown"
msgstr "أطÙئ"
-#: ../src/view/home/favoritesview.py:436
+#: ../src/view/home/favoritesview.py:429
msgid "Register"
msgstr "سجّل"
@@ -627,34 +627,23 @@ msgstr "Ù‚Ù"
msgid "Start"
msgstr "ابدأ"
-#: ../src/view/palettes.py:138
+#: ../src/view/palettes.py:132
msgid "Remove favorite"
msgstr "احذ٠المÙضلة"
-#: ../src/view/palettes.py:142
+#: ../src/view/palettes.py:136
msgid "Make favorite"
msgstr "اصنع Ù…Ùضلة"
-#: ../src/view/palettes.py:191
+#: ../src/view/palettes.py:185
msgid "Show contents"
msgstr "أظهر المحتويات"
-#: ../src/view/palettes.py:215
+#: ../src/view/palettes.py:209
#, python-format
msgid "%(free_space)d MB Free"
msgstr "%(free_space)d م.بايت خالية"
-# TRANS: label for the freeform layout in the favorites view
-#~ msgid "Freeform"
-#~ msgstr "Ø­Ùر"
-
-# TRANS: label for the ring layout in the favorites view
-#~ msgid "Ring"
-#~ msgstr "حلقة"
-
-#~ msgid "You must enter a server."
-#~ msgstr "يجب أن تÙدخÙÙ„ خادوما."
-
#~ msgid "<Ctrl>R"
#~ msgstr "<Ctrl>Ø­"
diff --git a/po/de.po b/po/de.po
index a32998e..6102875 100644
--- a/po/de.po
+++ b/po/de.po
@@ -4,8 +4,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sugar\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-01 18:31-0400\n"
-"PO-Revision-Date: 2008-09-07 17:38-0400\n"
+"POT-Creation-Date: 2008-09-25 00:30-0400\n"
+"PO-Revision-Date: 2008-11-14 12:15-0500\n"
"Last-Translator: Markus Schlager <m.slg@gmx.de>\n"
"Language-Team: German <fedora-trans-de@redhat.com>\n"
"MIME-Version: 1.0\n"
@@ -14,44 +14,45 @@ msgstr ""
"X-Generator: Pootle 1.1.0rc2\n"
"X-Poedit-Language: German\n"
-#: ../src/intro/intro.py:65 ../src/controlpanel/view/aboutme.py:100
+#: ../src/intro/window.py:93 ../src/controlpanel/aboutme/view.py:100
msgid "Name:"
msgstr "Name:"
-#: ../src/intro/intro.py:97
+#: ../src/intro/window.py:125
msgid "Click to change color:"
msgstr "Klicken zum Wechseln der Farbe:"
-#: ../src/intro/intro.py:148
+#: ../src/intro/window.py:175 ../src/journal/detailview.py:119
msgid "Back"
msgstr "Zurück"
-#: ../src/intro/intro.py:162 ../src/controlpanel/toolbar.py:61
+#: ../src/intro/window.py:189 ../src/controlpanel/toolbar.py:61
msgid "Done"
msgstr "Fertig"
-#: ../src/intro/intro.py:165
+# (Markus S.) war 'Nächste'
+#: ../src/intro/window.py:192
msgid "Next"
-msgstr "Nächste"
+msgstr "Vor"
-#: ../src/view/BuddyMenu.py:58
+#: ../src/view/BuddyMenu.py:60
msgid "Remove friend"
msgstr "Freund entfernen"
-#: ../src/view/BuddyMenu.py:61
+#: ../src/view/BuddyMenu.py:63
msgid "Make friend"
msgstr "Freunde werden"
-#: ../src/view/BuddyMenu.py:90
+#: ../src/view/BuddyMenu.py:92
#, python-format
msgid "Invite to %s"
msgstr "Einladen zu %s"
-#: ../src/view/clipboardmenu.py:48
+#: ../src/view/clipboardmenu.py:51
msgid "Remove"
msgstr "Entfernen"
-#: ../src/view/clipboardmenu.py:53 ../src/view/clipboardmenu.py:79
+#: ../src/view/clipboardmenu.py:56 ../src/view/clipboardmenu.py:78
msgid "Open"
msgstr "Öffnen"
@@ -59,22 +60,20 @@ msgstr "Öffnen"
# TODO: Implement stopping downloads
# self._stop_item.connect('activate', self._stop_item_activate_cb)
# self.append_menu_item(self._stop_item)
-#. self._stop_item = MenuItem(_('Stop download'), 'stock-close')
-#. TODO: Implement stopping downloads
-#. self._stop_item.connect('activate', self._stop_item_activate_cb)
-#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:87
+#: ../src/view/clipboardmenu.py:61 ../src/view/home/HomeBox.py:84
msgid "Keep"
msgstr "Behalten"
-#: ../src/view/clipboardmenu.py:84
+#: ../src/view/clipboardmenu.py:83
msgid "Open with"
msgstr "Öffnen mit"
-#: ../src/view/clipboardmenu.py:216
+# (Markus S.) 'clipping', nicht 'clipped'
+#: ../src/view/clipboardmenu.py:228
#, python-format
-msgid "Clipboard object: %s."
-msgstr "Zwischenablage-Objekt: %s."
+#, fuzzy
+msgid "%s clipping"
+msgstr "%s ausgeschnitten"
#: ../src/hardware/keydialog.py:150
msgid "Key Type:"
@@ -100,73 +99,62 @@ msgstr "Kann nicht mit dem Server verbinden."
msgid "The server could not complete the request."
msgstr "Der Server konnte die Anforderung nicht erfüllen."
-#: ../src/view/Shell.py:262
+#: ../src/view/Shell.py:251
msgid "Screenshot"
msgstr "Bildschirmfoto"
-#: ../src/view/home/HomeBox.py:81
+#: ../src/view/home/HomeBox.py:78
msgid "Confirm erase"
msgstr "Löschen bestätigen"
-#: ../src/view/home/HomeBox.py:83
+#: ../src/view/home/HomeBox.py:80
#, python-format
msgid "Confirm erase: Do you want to permanently erase %s?"
msgstr "Löschen bestätigen: Willst du %s wirklich dauerhaft löschen?"
-#: ../src/view/home/HomeBox.py:90 ../src/view/palettes.py:120
+#: ../src/view/home/HomeBox.py:87 ../src/view/palettes.py:120
+#: ../src/journal/journaltoolbox.py:335 ../src/journal/palettes.py:75
msgid "Erase"
msgstr "Löschen"
-#: ../src/view/home/HomeBox.py:120
+#: ../src/view/home/HomeBox.py:117
msgid "Software Update"
msgstr "Software-Aktualisierung"
-#: ../src/view/home/HomeBox.py:121
+#: ../src/view/home/HomeBox.py:118
msgid "Update your activities to ensure compatibility with your new software"
msgstr ""
"Aktualisiere deine Aktivitäten, um die Kompatibilität mit deiner neuen "
"Software sicher zu stellen."
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/toolbar.py:115
+#: ../src/view/home/HomeBox.py:122 ../src/controlpanel/toolbar.py:115
msgid "Cancel"
msgstr "Abbrechen"
-#: ../src/view/home/HomeBox.py:127 ../src/controlpanel/gui.py:276
+#: ../src/view/home/HomeBox.py:124 ../src/controlpanel/gui.py:273
msgid "Later"
msgstr "Später"
-#: ../src/view/home/HomeBox.py:130
+#: ../src/view/home/HomeBox.py:127
msgid "Check now"
msgstr "Jetzt prüfen"
-#: ../src/view/home/HomeBox.py:266
+#: ../src/view/home/HomeBox.py:261
msgid "List view"
msgstr "Listenansicht"
-#: ../src/view/home/HomeBox.py:267
+#: ../src/view/home/HomeBox.py:262
msgid "<Ctrl>2"
msgstr "<Ctrl>2"
-#: ../src/view/home/HomeBox.py:325
+#: ../src/view/home/HomeBox.py:320
msgid "Favorites view"
msgstr "Favoritenansicht"
-#: ../src/view/home/HomeBox.py:326
+#: ../src/view/home/HomeBox.py:321
msgid "<Ctrl>1"
msgstr "<Ctrl>1"
-# TRANS: label for the freeform layout in the favorites view
-#. TRANS: label for the freeform layout in the favorites view
-#: ../src/view/home/HomeBox.py:334
-msgid "Freeform"
-msgstr "Freie Form"
-
-# TRANS: label for the ring layout in the favorites view
-#. TRANS: label for the ring layout in the favorites view
-#: ../src/view/home/HomeBox.py:341
-msgid "Ring"
-msgstr "Ring"
-
#: ../src/view/home/MeshBox.py:97
msgid "Connect"
msgstr "Verbinden"
@@ -188,20 +176,19 @@ msgstr "Trenne Verbindung..."
# priority over the normal wireless device. NM doesn't have a "disconnect"
# method for a device either (for various reasons) so this doesn't
# have a good mapping
-#: ../src/view/home/MeshBox.py:152
+#: ../src/view/home/MeshBox.py:159
msgid "Connecting..."
msgstr "Verbinde..."
# TODO: show the channel number
#. TODO: show the channel number
-#: ../src/view/home/MeshBox.py:159
+#: ../src/view/home/MeshBox.py:166
msgid "Connected"
msgstr "Verbunden"
-#. only temporarily
-#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:51
-#: ../src/view/devices/network/mesh.py:92
-#: ../src/view/devices/network/mesh.py:96
+#: ../src/view/home/MeshBox.py:218 ../src/view/devices/network/mesh.py:41
+#: ../src/view/devices/network/mesh.py:68
+#: ../src/view/devices/network/mesh.py:72
msgid "Mesh Network"
msgstr "Maschennetzwerk"
@@ -209,16 +196,18 @@ msgstr "Maschennetzwerk"
# priority over the normal wireless device. NM doesn't have a "disconnect"
# method for a device either (for various reasons) so this doesn't
# have a good mapping
-#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:160
-#: ../src/view/devices/network/mesh.py:125
+#: ../src/view/home/MeshBox.py:221 ../src/view/devices/network/wireless.py:125
+#: ../src/view/devices/network/mesh.py:89
msgid "Disconnect..."
msgstr "Verbindung trennen..."
-#: ../src/view/home/MeshBox.py:302 ../src/view/palettes.py:61
+#. TRANS: Action label for resuming an activity.
+#: ../src/view/home/MeshBox.py:309 ../src/view/palettes.py:61
+#: ../src/journal/journaltoolbox.py:399 ../src/journal/palettes.py:57
msgid "Resume"
msgstr "Wiederaufnehmen"
-#: ../src/view/home/MeshBox.py:307 ../src/view/frame/activitiestray.py:205
+#: ../src/view/home/MeshBox.py:314 ../src/view/frame/activitiestray.py:206
msgid "Join"
msgstr "Mitmachen"
@@ -247,24 +236,19 @@ msgstr "Aufgeladen"
msgid "My Speakers"
msgstr "Meine Lautsprecher"
-#: ../src/view/devices/speaker.py:119
+#: ../src/view/devices/speaker.py:125
msgid "Unmute"
msgstr "Laut schalten"
-#: ../src/view/devices/speaker.py:122
+#: ../src/view/devices/speaker.py:128
msgid "Mute"
msgstr "Stumm schalten"
-#: ../src/view/devices/network/wireless.py:37
-#, python-format
-msgid "IP address: %s"
-msgstr "IP-Addresse: %s"
-
-#: ../src/view/devices/network/wireless.py:86
+#: ../src/view/devices/network/wireless.py:67
msgid "Disconnected"
msgstr "Nicht verbunden"
-#: ../src/view/devices/network/wireless.py:178
+#: ../src/view/devices/network/wireless.py:143
msgid "Channel"
msgstr "Kanal"
@@ -276,9 +260,10 @@ msgstr "Umgebung"
msgid "Group"
msgstr "Gruppe"
+# (Markus S.) war 'Zuhause', vgl. stuffer-sheet
#: ../src/view/frame/zoomtoolbar.py:41
msgid "Home"
-msgstr "Zuhause"
+msgstr "Startbildschirm"
#: ../src/view/frame/zoomtoolbar.py:43
msgid "Activity"
@@ -290,7 +275,7 @@ msgid ""
"sugar-control-panel: WARNING, found more than one option with the same name: "
"%s module: %r"
msgstr ""
-"sugar-control-panel: WARNUNG, mehr als eine Option mit demselben Namen: %s "
+"sugar-control-panel: WARNUNG, mehr als eine Option mit demselben Namen: %s "
"und Modul: %r gefunden"
#: ../src/controlpanel/cmd.py:28
@@ -304,7 +289,9 @@ msgid "sugar-control-panel: %s"
msgstr "sugar-control-panel: %s"
# (Markus S.) war 'Benutzung: sugar-control-panel [ option ] key [ args ... ] \n'; 'Parameter' war 'Key'.
-#: ../src/controlpanel/cmd.py:33
+#. TRANS: Translators, there's a empty line at the end of this string,
+#. which must appear in the translated string (msgstr) as well.
+#: ../src/controlpanel/cmd.py:35
msgid ""
"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
" Control for the sugar environment. \n"
@@ -326,161 +313,112 @@ msgstr ""
" -g Parameter Den aktuellen Wert für diesen Parameter auslesen\n"
" -s Parameter Den aktuellen Wert für diesen Parameter festlegen\n"
" -c Parameter Den aktuellen Wert für diesen Parameter zurücksetzen\n"
-" "
+" "
-#: ../src/controlpanel/cmd.py:46
+#: ../src/controlpanel/cmd.py:48
msgid "To apply your changes you have to restart sugar.\n"
msgstr "Um die Änderungen zu übernehmen, muss Sugar neu gestartet werden.\n"
-#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:296
+#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:305
msgid "Ok"
msgstr "Ok"
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:268
+#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:265
msgid "Changes require restart"
msgstr "Neustart zur Übernahme der Änderungen notwendig"
-#: ../src/controlpanel/gui.py:267
+#: ../src/controlpanel/gui.py:264
msgid "Warning"
msgstr "Warnung"
-#: ../src/controlpanel/gui.py:271
+#: ../src/controlpanel/gui.py:268
msgid "Cancel changes"
msgstr "Änderungen aufheben"
-#: ../src/controlpanel/gui.py:280
+#: ../src/controlpanel/gui.py:277
msgid "Restart now"
msgstr "Jetzt neustarten"
-#: ../src/controlpanel/model/aboutme.py:44
+#: ../src/controlpanel/aboutme/model.py:44
msgid "You must enter a name."
msgstr "Bitte einen Namen eingeben"
-#: ../src/controlpanel/model/aboutme.py:69
+#: ../src/controlpanel/aboutme/model.py:69
#, python-format
msgid "stroke: color=%s hue=%s"
msgstr "Linie: Farbe=%s Farbton=%s"
-#: ../src/controlpanel/model/aboutme.py:72
+#: ../src/controlpanel/aboutme/model.py:72
#, python-format
msgid "stroke: %s"
msgstr "Linie: %s"
-#: ../src/controlpanel/model/aboutme.py:74
+#: ../src/controlpanel/aboutme/model.py:74
#, python-format
msgid "fill: color=%s hue=%s"
msgstr "Füllung: Farbe=%s Farbton=%s"
-#: ../src/controlpanel/model/aboutme.py:76
+#: ../src/controlpanel/aboutme/model.py:76
#, python-format
msgid "fill: %s"
msgstr "Füllung: %s"
-#: ../src/controlpanel/model/aboutme.py:87
+#: ../src/controlpanel/aboutme/model.py:87
msgid "Error in specified color modifiers."
msgstr "Fehler in den angegebenen Farbänderungen."
-#: ../src/controlpanel/model/aboutme.py:90
+#: ../src/controlpanel/aboutme/model.py:90
msgid "Error in specified colors."
msgstr "Fehler in den angegebenen Farben."
-#: ../src/controlpanel/model/aboutxo.py:24
-msgid "Not available"
-msgstr "Nicht verfügbar"
-
-#: ../src/controlpanel/model/datetime.py:85
-msgid "Error timezone does not exist."
-msgstr "Fehler: unbekannte Zeitzone."
-
-#: ../src/controlpanel/model/frame.py:38 ../src/controlpanel/model/frame.py:60
-msgid "Value must be an integer."
-msgstr "Der Wert muss ganzzahlig sein."
-
-#: ../src/controlpanel/model/language.py:28
-msgid "Could not access ~/.i18n. Create standard settings."
-msgstr "Zugriff auf %s nicht möglich. Erzeuge daher Standardeinstellungen."
-
-#: ../src/controlpanel/model/language.py:110
-#, python-format
-msgid "Language for code=%s could not be determined."
-msgstr "Sprache für Code=%s konnte nicht ermittelt werden."
-
-#: ../src/controlpanel/model/language.py:127
-#, python-format
-msgid "Sorry I do not speak '%s'."
-msgstr "Entschuldigung, ich spreche nicht '%s'."
-
-#: ../src/controlpanel/model/network.py:48
-msgid "You must enter a server."
-msgstr "Bitte einen Server angeben"
-
-#: ../src/controlpanel/model/network.py:63
-msgid "State is unknown."
-msgstr "Status ist nicht bekannt."
-
-# (Markus S.) vgl. http://lists.laptop.org/pipermail/localization/2008-July/001232.html
-#: ../src/controlpanel/model/network.py:83
-msgid "Error in specified radio argument use on/off."
-msgstr "Fehler im angegebenen radio-Parameter (Funknetz) -- on/off verwenden."
-
-# (Markus S.) vgl. http://lists.laptop.org/pipermail/localization/2008-July/001232.html
-#: ../src/controlpanel/model/power.py:57
-msgid "Error in automatic pm argument, use on/off."
-msgstr ""
-"Fehler im automatischen pm-Parameter (Energieverwaltung) --on/off verwenden."
-
-# (Markus S.) vgl. http://lists.laptop.org/pipermail/localization/2008-July/001232.html
-#: ../src/controlpanel/model/power.py:86
-msgid "Error in extreme pm argument, use on/off."
-msgstr "Fehler im extremen pm-Parameter (Energieverwaltung) -- on/off benutzen."
-
-#: ../src/controlpanel/view/aboutme.py:32
+#: ../src/controlpanel/aboutme/view.py:32
+#: ../src/controlpanel/aboutme/__init__.py:22
msgid "About Me"
msgstr "Ãœber mich"
-#: ../src/controlpanel/view/aboutme.py:134
+#: ../src/controlpanel/aboutme/view.py:134
msgid "Click to change your color:"
msgstr "Klicken, um deine Farbe zu wechseln:"
-#: ../src/controlpanel/view/aboutxo.py:28
-msgid "About my XO"
-msgstr "Ãœber meinen XO"
+#: ../src/controlpanel/aboutxo/model.py:24
+msgid "Not available"
+msgstr "Nicht verfügbar"
-#: ../src/controlpanel/view/aboutxo.py:59
+#: ../src/controlpanel/aboutxo/view.py:55
msgid "Identity"
msgstr "Identität"
-#: ../src/controlpanel/view/aboutxo.py:68
+#: ../src/controlpanel/aboutxo/view.py:64
msgid "Serial Number:"
msgstr "Seriennummer:"
-#: ../src/controlpanel/view/aboutxo.py:91
+#: ../src/controlpanel/aboutxo/view.py:87
msgid "Software"
msgstr "Software"
-#: ../src/controlpanel/view/aboutxo.py:100
+#: ../src/controlpanel/aboutxo/view.py:96
msgid "Build:"
msgstr "Version:"
-#: ../src/controlpanel/view/aboutxo.py:115
+#: ../src/controlpanel/aboutxo/view.py:111
msgid "Sugar:"
msgstr "Sugar:"
-#: ../src/controlpanel/view/aboutxo.py:130
+#: ../src/controlpanel/aboutxo/view.py:126
msgid "Firmware:"
msgstr "Firmware:"
-#: ../src/controlpanel/view/aboutxo.py:152
+#: ../src/controlpanel/aboutxo/view.py:148
msgid "Copyright and License"
msgstr "Copyright und Lizenz"
-#: ../src/controlpanel/view/aboutxo.py:160
+#: ../src/controlpanel/aboutxo/view.py:156
msgid ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
msgstr ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
-#: ../src/controlpanel/view/aboutxo.py:166
+#: ../src/controlpanel/aboutxo/view.py:163
msgid ""
"Sugar is the graphical user interface that you are looking at. Sugar is free "
"software, covered by the GNU General Public License, and you are welcome to "
@@ -492,158 +430,247 @@ msgstr ""
"darin festgelegten Bedingungen ist es erlaubt, die Software zu verändern "
"und/oder Kopien davon zu erstellen und zu verteilen."
-#: ../src/controlpanel/view/aboutxo.py:178
+#: ../src/controlpanel/aboutxo/view.py:175
msgid "Full license:"
msgstr "Vollständige Lizenz:"
-#: ../src/controlpanel/view/datetime.py:29
-msgid "Date & Time"
-msgstr "Datum & Uhrzeit"
+#: ../src/controlpanel/aboutxo/__init__.py:21
+msgid "About my XO"
+msgstr "Ãœber meinen XO"
+
+#: ../src/controlpanel/datetime/model.py:89
+msgid "Error timezone does not exist."
+msgstr "Fehler: unbekannte Zeitzone."
-#: ../src/controlpanel/view/datetime.py:72
+#: ../src/controlpanel/datetime/view.py:68
msgid "Timezone"
msgstr "Zeitzone"
-#: ../src/controlpanel/view/frame.py:28
-#, fuzzy
-msgid "Frame"
-msgstr "Frame"
+#: ../src/controlpanel/datetime/__init__.py:21
+msgid "Date & Time"
+msgstr "Datum & Uhrzeit"
-#: ../src/controlpanel/view/frame.py:30
+#: ../src/controlpanel/frame/model.py:38 ../src/controlpanel/frame/model.py:60
+msgid "Value must be an integer."
+msgstr "Der Wert muss ganzzahlig sein."
+
+#: ../src/controlpanel/frame/view.py:26
msgid "never"
msgstr "nie"
# (Markus S.) ' unmittelbar'?
-#: ../src/controlpanel/view/frame.py:31
+#: ../src/controlpanel/frame/view.py:27
msgid "instantaneous"
msgstr "sofort"
-#: ../src/controlpanel/view/frame.py:32
+#: ../src/controlpanel/frame/view.py:28
#, python-format
msgid "%s seconds"
msgstr "%s Sekunden"
-#: ../src/controlpanel/view/frame.py:56
+#: ../src/controlpanel/frame/view.py:52
msgid "Activation Delay"
msgstr "Aktivierungsverzögerung"
-#: ../src/controlpanel/view/frame.py:80
+#: ../src/controlpanel/frame/view.py:76
msgid "Corner"
msgstr "Ecke"
-#: ../src/controlpanel/view/frame.py:115
+#: ../src/controlpanel/frame/view.py:111
msgid "Edge"
msgstr "Kante"
-#: ../src/controlpanel/view/language.py:29
-#: ../src/controlpanel/view/language.py:74
+# (Markus S.) 'Rahmen'? (Vorschlag von hmeyer)
+#: ../src/controlpanel/frame/__init__.py:21
+#, fuzzy
+msgid "Frame"
+msgstr "Frame"
+
+#: ../src/controlpanel/language/model.py:28
+msgid "Could not access ~/.i18n. Create standard settings."
+msgstr "Zugriff auf %s nicht möglich. Erzeuge daher Standardeinstellungen."
+
+#: ../src/controlpanel/language/model.py:114
+#, python-format
+msgid "Language for code=%s could not be determined."
+msgstr "Sprache für Code=%s konnte nicht ermittelt werden."
+
+#: ../src/controlpanel/language/model.py:131
+#, python-format
+msgid "Sorry I do not speak '%s'."
+msgstr "Entschuldigung, ich spreche nicht '%s'."
+
+#: ../src/controlpanel/language/view.py:70
+#: ../src/controlpanel/language/__init__.py:21
msgid "Language"
msgstr "Sprache"
-#: ../src/controlpanel/view/network.py:28
+#: ../src/controlpanel/network/model.py:62
+msgid "State is unknown."
+msgstr "Status ist nicht bekannt."
+
+# (Markus S.) vgl. http://lists.laptop.org/pipermail/localization/2008-July/001232.html
+#: ../src/controlpanel/network/model.py:82
+msgid "Error in specified radio argument use on/off."
+msgstr "Fehler im angegebenen radio-Parameter (Funknetz) -- on/off verwenden."
+
+#: ../src/controlpanel/network/view.py:28
+#: ../src/controlpanel/network/__init__.py:21
msgid "Network"
msgstr "Netzwerk"
-#: ../src/controlpanel/view/network.py:53
+#: ../src/controlpanel/network/view.py:54
msgid "Wireless"
msgstr "Drahtlosnetzwerk"
+#: ../src/controlpanel/network/view.py:62
+msgid "Turn of the wireless radio to save battery life"
+msgstr "Schalte das Funknetz aus, um die Lebensdauer der Batterie zu erhöhen"
+
# (Markus S,) war 'Radio:'
-#: ../src/controlpanel/view/network.py:61
-msgid "Radio:"
-msgstr "Funknetz:"
+#: ../src/controlpanel/network/view.py:75
+#, fuzzy
+msgid "Radio"
+msgstr "Funknetz"
+
+#: ../src/controlpanel/network/view.py:91
+msgid "Discard network history if you have trouble connecting to the network"
+msgstr ""
+"Verwirf die Netzwerk-Chronik, wenn du Schwierigkeiten hast, dich mit dem "
+"Netzwerk zu verbinden"
+
+#: ../src/controlpanel/network/view.py:100
+msgid "Discard network history"
+msgstr "Netzwerk-Chronik verwerfen"
# (Markus S.) 'Zelle'?
-#: ../src/controlpanel/view/network.py:94
+#: ../src/controlpanel/network/view.py:113
msgid "Mesh"
msgstr "Masche"
-#: ../src/controlpanel/view/network.py:103
+#: ../src/controlpanel/network/view.py:122
msgid "Server:"
msgstr "Server:"
-#: ../src/controlpanel/view/power.py:27
-msgid "Power"
-msgstr "Energieversorgung"
+# (Markus S.) vgl. http://lists.laptop.org/pipermail/localization/2008-July/001232.html
+#: ../src/controlpanel/power/model.py:55
+msgid "Error in automatic pm argument, use on/off."
+msgstr ""
+"Fehler im automatischen pm-Parameter (Energieverwaltung) --on/off verwenden."
-#: ../src/controlpanel/view/power.py:51
+# (Markus S.) vgl. http://lists.laptop.org/pipermail/localization/2008-July/001232.html
+#: ../src/controlpanel/power/model.py:84
+msgid "Error in extreme pm argument, use on/off."
+msgstr "Fehler im extremen pm-Parameter (Energieverwaltung) -- on/off benutzen."
+
+#: ../src/controlpanel/power/view.py:47
msgid "Power management"
msgstr "Energieverwaltung"
-#: ../src/controlpanel/view/power.py:61
+#: ../src/controlpanel/power/view.py:57
msgid "Automatic power management (increases battery life)"
msgstr "Automatische Energieverwaltung (erhöht die Lebensdauer der Batterie)"
-#: ../src/controlpanel/view/power.py:89
+#: ../src/controlpanel/power/view.py:85
msgid ""
-"Extreme power management (disables wireless radio, increases battery life)"
+"Extreme power management (disableswireless radio, increases battery life)"
msgstr ""
"Extreme Energieverwaltung (deaktiviert das Funknetz, erhöht die Lebensdauer "
"der Batterie)"
-#: ../src/view/devices/network/mesh.py:154
+#: ../src/controlpanel/power/__init__.py:21
+msgid "Power"
+msgstr "Energieversorgung"
+
+#: ../src/view/devices/network/mesh.py:111
msgid "Connected to a School Mesh Portal"
msgstr "Verbunden mit einem Schul-Maschennetzwerk-Portal"
-#: ../src/view/devices/network/mesh.py:156
+#: ../src/view/devices/network/mesh.py:113
msgid "Looking for a School Mesh Portal..."
msgstr "Suche Schul-Maschennetzwerk-Portal..."
-#: ../src/view/devices/network/mesh.py:159
+#: ../src/view/devices/network/mesh.py:116
msgid "Connected to an XO Mesh Portal"
-msgstr "Verbunden mit einem XO Maschennetzwerk-Portal"
+msgstr "Verbunden mit einem XO-Maschennetzwerk-Portal"
-#: ../src/view/devices/network/mesh.py:161
+#: ../src/view/devices/network/mesh.py:118
msgid "Looking for an XO Mesh Portal..."
-msgstr "Suche XO Maschennetzwerk-Portal..."
+msgstr "Suche XO-Maschennetzwerk-Portal..."
-#: ../src/view/devices/network/mesh.py:164
+#: ../src/view/devices/network/mesh.py:121
msgid "Connected to a Simple Mesh"
msgstr "Verbunden mit einem einfachen Maschennetzwerk"
-#: ../src/view/devices/network/mesh.py:166
+#: ../src/view/devices/network/mesh.py:123
msgid "Starting a Simple Mesh"
msgstr "Starte ein einfaches Maschennetzwerk"
-#: ../src/view/devices/network/mesh.py:173
+#: ../src/view/devices/network/mesh.py:130
msgid "Unknown Mesh"
msgstr "Unbekanntes Maschennetzwerk"
-#: ../src/view/frame/activitiestray.py:210
+#: ../src/view/frame/activitiestray.py:211
msgid "Decline"
msgstr "Ablehnen"
-#: ../src/view/home/favoritesview.py:287
+# TRANS: label for the freeform layout in the favorites view
+#. TRANS: label for the freeform layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:107
+msgid "Freeform"
+msgstr "Freie Form"
+
+# TRANS: label for the ring layout in the favorites view
+#. TRANS: label for the ring layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:189
+msgid "Ring"
+msgstr "Ring"
+
+#. TRANS: label for the spiral layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:334
+msgid "Spiral"
+msgstr "Spirale"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:401
+msgid "Box"
+msgstr "Rechteck"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:442
+msgid "Triangle"
+msgstr "Dreieck"
+
+#: ../src/view/home/favoritesview.py:295
msgid "Registration Failed"
msgstr "Registrierung fehlgeschlagen"
-#: ../src/view/home/favoritesview.py:288
+#: ../src/view/home/favoritesview.py:296
#, python-format
msgid "%s"
msgstr "%s"
-#: ../src/view/home/favoritesview.py:290
+#: ../src/view/home/favoritesview.py:298
msgid "Registration Successful"
msgstr "Registrierung erfolgreich"
-#: ../src/view/home/favoritesview.py:291
+#: ../src/view/home/favoritesview.py:299
msgid "You are now registered with your school server."
msgstr "Du bist nun bei deinem Schulserver registriert."
-# (Markus S.) war 'Kontrollfeld'
-#: ../src/view/home/favoritesview.py:407
-msgid "Control Panel"
-msgstr "Kontrollleiste"
+#: ../src/view/home/favoritesview.py:420
+msgid "Settings"
+msgstr "Einstellungen"
-#: ../src/view/home/favoritesview.py:418
+#: ../src/view/home/favoritesview.py:425
msgid "Restart"
msgstr "Neustart"
-#: ../src/view/home/favoritesview.py:423
+#: ../src/view/home/favoritesview.py:430
msgid "Shutdown"
msgstr "Ausschalten"
-#: ../src/view/home/favoritesview.py:429
+#: ../src/view/home/favoritesview.py:436
msgid "Register"
msgstr "Registrieren"
@@ -655,27 +682,155 @@ msgstr "Starte..."
msgid "Stop"
msgstr "Stopp"
-#: ../src/view/palettes.py:104
+#. TRANS: Action label for starting an entry.
+#: ../src/view/palettes.py:104 ../src/journal/journaltoolbox.py:402
+#: ../src/journal/palettes.py:59
msgid "Start"
msgstr "Start"
-#: ../src/view/palettes.py:132
+#: ../src/view/palettes.py:138
msgid "Remove favorite"
msgstr "Favorit entfernen"
-#: ../src/view/palettes.py:136
+#: ../src/view/palettes.py:142
msgid "Make favorite"
msgstr "Zum Favorit machen"
-#: ../src/view/palettes.py:185
+#: ../src/view/palettes.py:191
msgid "Show contents"
msgstr "Inhalte anzeigen"
-#: ../src/view/palettes.py:209
+#: ../src/view/palettes.py:215
#, python-format
msgid "%(free_space)d MB Free"
msgstr "%(free_space)d MB frei"
+#: ../src/journal/journaltoolbox.py:62
+msgid "Search"
+msgstr "Suchen"
+
+#: ../src/journal/journaltoolbox.py:119
+msgid "Anytime"
+msgstr "Beliebiges Datum"
+
+#: ../src/journal/journaltoolbox.py:121
+msgid "Today"
+msgstr "Heute"
+
+#: ../src/journal/journaltoolbox.py:123
+msgid "Since yesterday"
+msgstr "Seit gestern"
+
+#. TRANS: Filter entries modified during the last 7 days.
+#: ../src/journal/journaltoolbox.py:125
+msgid "Past week"
+msgstr "Vergangene Woche"
+
+#. TRANS: Filter entries modified during the last 30 days.
+#: ../src/journal/journaltoolbox.py:127
+msgid "Past month"
+msgstr "Vergangener Monat"
+
+#. TRANS: Filter entries modified during the last 356 days.
+#: ../src/journal/journaltoolbox.py:129
+msgid "Past year"
+msgstr "Vergangenes Jahr"
+
+#: ../src/journal/journaltoolbox.py:136
+msgid "Anyone"
+msgstr "Alle"
+
+#: ../src/journal/journaltoolbox.py:138
+msgid "My friends"
+msgstr "Meine Freunde"
+
+#: ../src/journal/journaltoolbox.py:139
+msgid "My class"
+msgstr "Meine Klasse"
+
+#. TRANS: Item in a combo box that filters by entry type.
+#: ../src/journal/journaltoolbox.py:255
+msgid "Anything"
+msgstr "Alles"
+
+#. TODO: Add "Start with" menu item
+#: ../src/journal/journaltoolbox.py:325 ../src/journal/palettes.py:67
+msgid "Copy"
+msgstr "Kopieren"
+
+#: ../src/journal/collapsedentry.py:248 ../src/journal/expandedentry.py:176
+#: ../src/journal/palettes.py:51
+msgid "Untitled"
+msgstr "Ohne Titel"
+
+#: ../src/journal/journalactivity.py:119 ../src/journal/volumesmanager.py:57
+msgid "Journal"
+msgstr "Journal"
+
+#: ../src/journal/expandedentry.py:222
+msgid "No preview"
+msgstr "Keine Vorschau"
+
+#: ../src/journal/expandedentry.py:241
+msgid "Participants:"
+msgstr "Teilnehmer:"
+
+#: ../src/journal/expandedentry.py:266
+msgid "Description:"
+msgstr "Beschreibung:"
+
+#: ../src/journal/expandedentry.py:292
+msgid "Tags:"
+msgstr "Stichwörter:"
+
+#: ../src/journal/objectchooser.py:134
+msgid "Choose an object"
+msgstr "Ein Objekt auswählen"
+
+#: ../src/journal/objectchooser.py:139
+msgid "Close"
+msgstr "Schließen"
+
+#: ../src/journal/volumestoolbar.py:93
+msgid "Unmount"
+msgstr "Einbindung lösen"
+
+#: ../src/journal/misc.py:95
+msgid "No date"
+msgstr "Kein Datum"
+
+#: ../src/journal/listview.py:39
+msgid "Your Journal is empty"
+msgstr "Dein Journal ist leer."
+
+#: ../src/journal/listview.py:40
+msgid "No matching entries "
+msgstr "Keine passenden Einträge"
+
+#: ../src/journal/modalalert.py:59
+msgid "Your Journal is full"
+msgstr "Dein Journal ist voll."
+
+#: ../src/journal/modalalert.py:63
+msgid "Please delete some old Journal entries to make space for new ones."
+msgstr ""
+"Lösche bitte einige alte Journal-Einträge, um Platz für neue zu schaffen."
+
+#: ../src/journal/modalalert.py:75
+msgid "Show Journal"
+msgstr "Journal anzeigen"
+
+#, python-format
+#~ msgid "Clipboard object: %s."
+#~ msgstr "Zwischenablage-Objekt: %s."
+
+#~ msgid "You must enter a server."
+#~ msgstr "Bitte einen Server angeben"
+
+# (Markus S.) war 'Kontrollfeld'
+#~ msgid "Control Panel"
+#~ msgstr "Kontrollleiste"
+
#~ msgid "<Ctrl>R"
#~ msgstr "<Ctrl>R"
@@ -777,9 +932,6 @@ msgstr "%(free_space)d MB frei"
#~ msgid "Redo"
#~ msgstr "Wiederholen"
-#~ msgid "Copy"
-#~ msgstr "Kopieren"
-
#~ msgid "Paste"
#~ msgstr "Einfügen"
diff --git a/po/en.po b/po/en.po
index 0b17faf..a79e711 100644
--- a/po/en.po
+++ b/po/en.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-19 00:30-0400\n"
+"POT-Creation-Date: 2008-01-18 18:19+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,44 +16,44 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 1.0.1\n"
-#: ../src/intro/intro.py:65 ../src/controlpanel/view/aboutme.py:100
+#: ../shell/intro/intro.py:67
msgid "Name:"
msgstr ""
-#: ../src/intro/intro.py:97
+#: ../shell/intro/intro.py:96
msgid "Click to change color:"
msgstr ""
-#: ../src/intro/intro.py:148
+#: ../shell/intro/intro.py:146
msgid "Back"
msgstr ""
-#: ../src/intro/intro.py:162 ../src/controlpanel/toolbar.py:61
+#: ../shell/intro/intro.py:160
msgid "Done"
msgstr ""
-#: ../src/intro/intro.py:165
+#: ../shell/intro/intro.py:163
msgid "Next"
msgstr ""
-#: ../src/view/BuddyMenu.py:60
+#: ../shell/view/BuddyMenu.py:59
msgid "Remove friend"
msgstr ""
-#: ../src/view/BuddyMenu.py:63
+#: ../shell/view/BuddyMenu.py:62
msgid "Make friend"
msgstr ""
-#: ../src/view/BuddyMenu.py:92
+#: ../shell/view/BuddyMenu.py:84
#, python-format
msgid "Invite to %s"
msgstr ""
-#: ../src/view/clipboardmenu.py:48
+#: ../shell/view/clipboardmenu.py:58
msgid "Remove"
msgstr ""
-#: ../src/view/clipboardmenu.py:53 ../src/view/clipboardmenu.py:79
+#: ../shell/view/clipboardmenu.py:63
msgid "Open"
msgstr ""
@@ -61,566 +61,360 @@ msgstr ""
#. TODO: Implement stopping downloads
#. self._stop_item.connect('activate', self._stop_item_activate_cb)
#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:85
-msgid "Keep"
-msgstr ""
-
-#: ../src/view/clipboardmenu.py:84
-msgid "Open with"
+#: ../shell/view/clipboardmenu.py:73
+msgid "Add to journal"
msgstr ""
-#: ../src/view/clipboardmenu.py:216
+#: ../shell/view/clipboardmenu.py:213
#, python-format
msgid "Clipboard object: %s."
msgstr ""
-#: ../src/hardware/keydialog.py:150
+#: ../shell/hardware/keydialog.py:149
msgid "Key Type:"
msgstr ""
-#: ../src/hardware/keydialog.py:170
+#: ../shell/hardware/keydialog.py:169
msgid "Authentication Type:"
msgstr ""
-#: ../src/hardware/keydialog.py:251
+#: ../shell/hardware/keydialog.py:250
msgid "Encryption Type:"
msgstr ""
-#: ../src/hardware/schoolserver.py:17
-msgid "Cannot obtain data needed for registration."
+#: ../shell/view/home/activitiesdonut.py:90
+msgid "Starting..."
msgstr ""
-#: ../src/hardware/schoolserver.py:31
-msgid "Cannot connect to the server."
+#: ../shell/view/home/activitiesdonut.py:104 ../shell/view/home/MeshBox.py:295
+msgid "Resume"
msgstr ""
-#: ../src/hardware/schoolserver.py:36
-msgid "The server could not complete the request."
+#: ../shell/view/home/activitiesdonut.py:111
+#: ../lib/sugar/activity/activity.py:132
+msgid "Stop"
msgstr ""
-#: ../src/view/Shell.py:251
+#: ../shell/view/Shell.py:285
msgid "Screenshot"
msgstr ""
-#: ../src/view/home/HomeBox.py:79
-msgid "Confirm erase"
-msgstr ""
-
-#: ../src/view/home/HomeBox.py:81
-#, python-format
-msgid "Confirm erase: Do you want to permanently erase %s?"
-msgstr ""
-
-#: ../src/view/home/HomeBox.py:88 ../src/view/palettes.py:120
-msgid "Erase"
+#: ../shell/view/home/HomeBox.py:159
+msgid "Reboot"
msgstr ""
-#: ../src/view/home/HomeBox.py:118
-msgid "Software Update"
-msgstr ""
-
-#: ../src/view/home/HomeBox.py:119
-msgid "Update your activities to ensure compatibility with your new software"
-msgstr ""
-
-#: ../src/view/home/HomeBox.py:123 ../src/controlpanel/toolbar.py:115
-msgid "Cancel"
-msgstr ""
-
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/gui.py:286
-msgid "Later"
-msgstr ""
-
-#: ../src/view/home/HomeBox.py:128
-msgid "Check now"
-msgstr ""
-
-#: ../src/view/home/HomeBox.py:262
-msgid "List view"
-msgstr ""
-
-#: ../src/view/home/HomeBox.py:263
-msgid "<Ctrl>2"
-msgstr ""
-
-#: ../src/view/home/HomeBox.py:321
-msgid "Favorites view"
-msgstr ""
-
-#: ../src/view/home/HomeBox.py:322
-msgid "<Ctrl>1"
-msgstr ""
-
-#: ../src/view/home/MeshBox.py:97
-msgid "Connect"
-msgstr ""
-
-#: ../src/view/home/MeshBox.py:106
-msgid "Disconnect"
-msgstr ""
-
-#: ../src/view/home/MeshBox.py:118
-msgid "Disconnecting..."
-msgstr ""
-
-#: ../src/view/home/MeshBox.py:152
-msgid "Connecting..."
-msgstr ""
-
-#. TODO: show the channel number
-#: ../src/view/home/MeshBox.py:159
-msgid "Connected"
+#: ../shell/view/home/HomeBox.py:164
+msgid "Shutdown"
msgstr ""
-#. only temporarily
-#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:51
-#: ../src/view/devices/network/mesh.py:92
-#: ../src/view/devices/network/mesh.py:96
-msgid "Mesh Network"
+#: ../shell/view/home/HomeBox.py:170
+msgid "Register"
msgstr ""
-#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:160
-#: ../src/view/devices/network/mesh.py:125
+#. Only show disconnect when there's a mesh device, because mesh takes
+#. priority over the normal wireless device. NM doesn't have a "disconnect"
+#. method for a device either (for various reasons) so this doesn't
+#. have a good mapping
+#: ../shell/view/home/MeshBox.py:90 ../shell/view/home/MeshBox.py:197
+#: ../shell/view/devices/network/wireless.py:113
+#: ../shell/view/devices/network/mesh.py:83
msgid "Disconnect..."
msgstr ""
-#: ../src/view/home/MeshBox.py:302 ../src/view/palettes.py:61
-msgid "Resume"
+#: ../shell/view/home/MeshBox.py:195 ../shell/view/devices/network/mesh.py:37
+#: ../shell/view/devices/network/mesh.py:62
+#: ../shell/view/devices/network/mesh.py:66
+msgid "Mesh Network"
msgstr ""
-#: ../src/view/home/MeshBox.py:307 ../src/view/frame/activitiestray.py:205
+#: ../shell/view/home/MeshBox.py:300
msgid "Join"
msgstr ""
-#: ../src/view/devices/battery.py:45
-msgid "My Battery"
-msgstr ""
-
-#: ../src/view/devices/battery.py:114
-msgid "Charging"
-msgstr ""
-
-#: ../src/view/devices/battery.py:117
-msgid "Very little power remaining"
-msgstr ""
-
-#: ../src/view/devices/battery.py:123
-#, python-format
-msgid "%(hour)d:%(min).2d remaining"
-msgstr ""
-
-#: ../src/view/devices/battery.py:127
-msgid "Charged"
+#: ../shell/view/devices/battery.py:38
+msgid "My Battery life"
msgstr ""
-#: ../src/view/devices/speaker.py:44
-msgid "My Speakers"
+#: ../shell/view/devices/battery.py:94
+msgid "Battery charging"
msgstr ""
-#: ../src/view/devices/speaker.py:119
-msgid "Unmute"
+#: ../shell/view/devices/battery.py:96
+msgid "Battery discharging"
msgstr ""
-#: ../src/view/devices/speaker.py:122
-msgid "Mute"
+#: ../shell/view/devices/battery.py:98
+msgid "Battery fully charged"
msgstr ""
-#: ../src/view/devices/network/wireless.py:37
-#, python-format
-msgid "IP address: %s"
-msgstr ""
-
-#: ../src/view/devices/network/wireless.py:86
+#: ../shell/view/devices/network/wireless.py:61
msgid "Disconnected"
msgstr ""
-#: ../src/view/devices/network/wireless.py:178
+#: ../shell/view/devices/network/wireless.py:131
msgid "Channel"
msgstr ""
-#: ../src/view/frame/zoomtoolbar.py:37
+#: ../shell/view/frame/zoomtoolbar.py:42
msgid "Neighborhood"
msgstr ""
-#: ../src/view/frame/zoomtoolbar.py:39
+#: ../shell/view/frame/zoomtoolbar.py:54
msgid "Group"
msgstr ""
-#: ../src/view/frame/zoomtoolbar.py:41
+#: ../shell/view/frame/zoomtoolbar.py:66
msgid "Home"
msgstr ""
-#: ../src/view/frame/zoomtoolbar.py:43
+#: ../shell/view/frame/zoomtoolbar.py:78
msgid "Activity"
msgstr ""
-#: ../src/controlpanel/cmd.py:26
-#, python-format
-msgid ""
-"sugar-control-panel: WARNING, found more than one option with the same name: "
-"%s module: %r"
-msgstr ""
-
-#: ../src/controlpanel/cmd.py:28
-#, python-format
-msgid "sugar-control-panel: key=%s not an available option"
-msgstr ""
-
-#: ../src/controlpanel/cmd.py:29
-#, python-format
-msgid "sugar-control-panel: %s"
+#: ../lib/sugar/activity/activity.py:115
+msgid "Share with:"
msgstr ""
-#: ../src/controlpanel/cmd.py:33
-msgid ""
-"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
-" Control for the sugar environment. \n"
-" Options: \n"
-" -h show this help message and exit \n"
-" -l list all the available options \n"
-" -h key show information about this key \n"
-" -g key get the current value of the key \n"
-" -s key set the current value for the key \n"
-" -c key clear the current value for the key \n"
-" "
-msgstr ""
-
-#: ../src/controlpanel/cmd.py:46
-msgid "To apply your changes you have to restart sugar.\n"
+#: ../lib/sugar/activity/activity.py:117
+msgid "Private"
msgstr ""
-#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:305
-msgid "Ok"
+#: ../lib/sugar/activity/activity.py:118
+msgid "My Neighborhood"
msgstr ""
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:278
-msgid "Changes require restart"
+#: ../lib/sugar/activity/activity.py:126
+msgid "Keep"
msgstr ""
-#: ../src/controlpanel/gui.py:277
-msgid "Warning"
+#: ../lib/sugar/activity/activity.py:245
+msgid "Undo"
msgstr ""
-#: ../src/controlpanel/gui.py:281
-msgid "Cancel changes"
+#: ../lib/sugar/activity/activity.py:250
+msgid "Redo"
msgstr ""
-#: ../src/controlpanel/gui.py:290
-msgid "Restart now"
+#: ../lib/sugar/activity/activity.py:260
+msgid "Copy"
msgstr ""
-#: ../src/controlpanel/model/aboutme.py:44
-msgid "You must enter a name."
+#: ../lib/sugar/activity/activity.py:265
+msgid "Paste"
msgstr ""
-#: ../src/controlpanel/model/aboutme.py:69
+#: ../lib/sugar/activity/activity.py:454
#, python-format
-msgid "stroke: color=%s hue=%s"
+msgid "%s Activity"
msgstr ""
-#: ../src/controlpanel/model/aboutme.py:72
-#, python-format
-msgid "stroke: %s"
+#: ../lib/sugar/activity/activity.py:824
+msgid "Keep error"
msgstr ""
-#: ../src/controlpanel/model/aboutme.py:74
-#, python-format
-msgid "fill: color=%s hue=%s"
+#: ../lib/sugar/activity/activity.py:825
+msgid "Keep error: all changes will be lost"
msgstr ""
-#: ../src/controlpanel/model/aboutme.py:76
-#, python-format
-msgid "fill: %s"
+#: ../lib/sugar/activity/activity.py:828
+msgid "Don't stop"
msgstr ""
-#: ../src/controlpanel/model/aboutme.py:87
-msgid "Error in specified color modifiers."
+#: ../lib/sugar/activity/activity.py:831
+msgid "Stop anyway"
msgstr ""
-#: ../src/controlpanel/model/aboutme.py:90
-msgid "Error in specified colors."
+#: ../lib/sugar/graphics/alert.py:164 ../lib/sugar/graphics/alert.py:206
+msgid "Cancel"
msgstr ""
-#: ../src/controlpanel/model/aboutxo.py:24
-msgid "Not available"
+#: ../lib/sugar/graphics/alert.py:168
+msgid "Ok"
msgstr ""
-#: ../src/controlpanel/model/datetime.py:89
-msgid "Error timezone does not exist."
+#: ../lib/sugar/graphics/alert.py:216
+msgid "Continue"
msgstr ""
-#: ../src/controlpanel/model/frame.py:38 ../src/controlpanel/model/frame.py:60
-msgid "Value must be an integer."
+#: ../lib/sugar/graphics/alert.py:244
+msgid "OK"
msgstr ""
-#: ../src/controlpanel/model/language.py:28
-msgid "Could not access ~/.i18n. Create standard settings."
+#: ../lib/sugar/graphics/objectchooser.py:175
+#, python-format
+msgid "%d year"
msgstr ""
-#: ../src/controlpanel/model/language.py:114
+#: ../lib/sugar/graphics/objectchooser.py:175
#, python-format
-msgid "Language for code=%s could not be determined."
+msgid "%d years"
msgstr ""
-#: ../src/controlpanel/model/language.py:131
+#: ../lib/sugar/graphics/objectchooser.py:176
#, python-format
-msgid "Sorry I do not speak '%s'."
+msgid "%d month"
msgstr ""
-#: ../src/controlpanel/model/network.py:62
-msgid "State is unknown."
+#: ../lib/sugar/graphics/objectchooser.py:176
+#, python-format
+msgid "%d months"
msgstr ""
-#: ../src/controlpanel/model/network.py:82
-msgid "Error in specified radio argument use on/off."
+#: ../lib/sugar/graphics/objectchooser.py:177
+#, python-format
+msgid "%d week"
msgstr ""
-#: ../src/controlpanel/model/power.py:57
-msgid "Error in automatic pm argument, use on/off."
+#: ../lib/sugar/graphics/objectchooser.py:177
+#, python-format
+msgid "%d weeks"
msgstr ""
-#: ../src/controlpanel/model/power.py:86
-msgid "Error in extreme pm argument, use on/off."
+#: ../lib/sugar/graphics/objectchooser.py:178
+#, python-format
+msgid "%d day"
msgstr ""
-#: ../src/controlpanel/view/aboutme.py:32
-msgid "About Me"
+#: ../lib/sugar/graphics/objectchooser.py:178
+#, python-format
+msgid "%d days"
msgstr ""
-#: ../src/controlpanel/view/aboutme.py:134
-msgid "Click to change your color:"
+#: ../lib/sugar/graphics/objectchooser.py:179
+#, python-format
+msgid "%d hour"
msgstr ""
-#: ../src/controlpanel/view/aboutxo.py:28
-msgid "About my XO"
+#: ../lib/sugar/graphics/objectchooser.py:179
+#, python-format
+msgid "%d hours"
msgstr ""
-#: ../src/controlpanel/view/aboutxo.py:59
-msgid "Identity"
+#: ../lib/sugar/graphics/objectchooser.py:180
+#, python-format
+msgid "%d minute"
msgstr ""
-#: ../src/controlpanel/view/aboutxo.py:68
-msgid "Serial Number:"
+#: ../lib/sugar/graphics/objectchooser.py:180
+#, python-format
+msgid "%d minutes"
msgstr ""
-#: ../src/controlpanel/view/aboutxo.py:91
-msgid "Software"
+#: ../lib/sugar/graphics/objectchooser.py:181
+#, python-format
+msgid "%d second"
msgstr ""
-#: ../src/controlpanel/view/aboutxo.py:100
-msgid "Build:"
+#: ../lib/sugar/graphics/objectchooser.py:181
+#, python-format
+msgid "%d seconds"
msgstr ""
-#: ../src/controlpanel/view/aboutxo.py:115
-msgid "Sugar:"
+#: ../lib/sugar/graphics/objectchooser.py:191
+msgid " and "
msgstr ""
-#: ../src/controlpanel/view/aboutxo.py:130
-msgid "Firmware:"
+#: ../lib/sugar/graphics/objectchooser.py:193
+msgid ", "
msgstr ""
-#: ../src/controlpanel/view/aboutxo.py:152
-msgid "Copyright and License"
+#: ../shell/controlpanel/control.py:213
+msgid "To apply your changes you have to restart sugar.\n"
msgstr ""
-#: ../src/controlpanel/view/aboutxo.py:160
-msgid ""
-"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
+#: ../shell/controlpanel/control.py:267
+msgid "Error in specified color modifiers."
msgstr ""
-#: ../src/controlpanel/view/aboutxo.py:167
-msgid ""
-"Sugar is the graphical user interface that you are looking at. Sugar is free "
-"software, covered by the GNU General Public License, and you are welcome to "
-"change it and/or distribute copies of it under certain conditions described "
-"therein."
+#: ../shell/controlpanel/control.py:270
+msgid "Error in specified colors."
msgstr ""
-#: ../src/controlpanel/view/aboutxo.py:179
-msgid "Full license:"
+#: ../shell/controlpanel/control.py:307
+msgid "off"
msgstr ""
-#: ../src/controlpanel/view/datetime.py:29
-msgid "Date & Time"
+#: ../shell/controlpanel/control.py:309
+msgid "on"
msgstr ""
-#: ../src/controlpanel/view/datetime.py:72
-msgid "Timezone"
+#: ../shell/controlpanel/control.py:310
+msgid "State is unknown."
msgstr ""
-#: ../src/controlpanel/view/frame.py:28
-msgid "Frame"
+#: ../shell/controlpanel/control.py:332
+msgid "Error in specified radio argument use on/off."
msgstr ""
-#: ../src/controlpanel/view/frame.py:30
-msgid "never"
+#: ../shell/controlpanel/control.py:336
+msgid "Permission denied. You need to be root to run this method."
msgstr ""
-#: ../src/controlpanel/view/frame.py:31
-msgid "instantaneous"
+#: ../shell/controlpanel/control.py:366
+msgid "Error in reading timezone"
msgstr ""
-#: ../src/controlpanel/view/frame.py:32
+#: ../shell/controlpanel/control.py:397
#, python-format
-msgid "%s seconds"
+msgid "Error copying timezone (from %s): %s"
msgstr ""
-#: ../src/controlpanel/view/frame.py:56
-msgid "Activation Delay"
-msgstr ""
-
-#: ../src/controlpanel/view/frame.py:80
-msgid "Corner"
-msgstr ""
-
-#: ../src/controlpanel/view/frame.py:115
-msgid "Edge"
-msgstr ""
-
-#: ../src/controlpanel/view/language.py:29
-#: ../src/controlpanel/view/language.py:74
-msgid "Language"
-msgstr ""
-
-#: ../src/controlpanel/view/network.py:28
-msgid "Network"
-msgstr ""
-
-#: ../src/controlpanel/view/network.py:54
-msgid "Wireless"
-msgstr ""
-
-#: ../src/controlpanel/view/network.py:62
-msgid "Turn of the wireless radio to save battery life"
-msgstr "Turn off the wireless radio to save battery life"
-
-#: ../src/controlpanel/view/network.py:75
-msgid "Radio"
-msgstr ""
-
-#: ../src/controlpanel/view/network.py:91
-msgid "Discard network history if you have trouble connecting to the network"
-msgstr ""
-
-#: ../src/controlpanel/view/network.py:100
-msgid "Discard network history"
-msgstr ""
-
-#: ../src/controlpanel/view/network.py:113
-msgid "Mesh"
+#: ../shell/controlpanel/control.py:402
+#, python-format
+msgid "Changing permission of timezone: %s"
msgstr ""
-#: ../src/controlpanel/view/network.py:122
-msgid "Server:"
+#: ../shell/controlpanel/control.py:412
+msgid "Error timezone does not exist."
msgstr ""
-#: ../src/controlpanel/view/power.py:27
-msgid "Power"
+#: ../shell/controlpanel/control.py:417 ../shell/controlpanel/control.py:436
+#, python-format
+msgid "Could not access %s. Create standard settings."
msgstr ""
-#: ../src/controlpanel/view/power.py:51
-msgid "Power management"
+#: ../shell/controlpanel/control.py:463
+#, python-format
+msgid "Language for code=%s could not be determined."
msgstr ""
-#: ../src/controlpanel/view/power.py:61
-msgid "Automatic power management (increases battery life)"
-msgstr "Automatic power management (experimental, increases battery life)"
-
-#: ../src/controlpanel/view/power.py:89
-msgid ""
-"Extreme power management (disables wireless radio, increases battery life)"
+#: ../shell/controlpanel/control.py:473
+#, python-format
+msgid "Sorry I do not speak '%s'."
msgstr ""
-#: ../src/view/devices/network/mesh.py:154
+#: ../shell/view/devices/network/mesh.py:105
msgid "Connected to a School Mesh Portal"
msgstr ""
-#: ../src/view/devices/network/mesh.py:156
+#: ../shell/view/devices/network/mesh.py:107
msgid "Looking for a School Mesh Portal..."
msgstr ""
-#: ../src/view/devices/network/mesh.py:159
+#: ../shell/view/devices/network/mesh.py:110
msgid "Connected to an XO Mesh Portal"
msgstr ""
-#: ../src/view/devices/network/mesh.py:161
+#: ../shell/view/devices/network/mesh.py:112
msgid "Looking for an XO Mesh Portal..."
msgstr ""
-#: ../src/view/devices/network/mesh.py:164
+#: ../shell/view/devices/network/mesh.py:115
msgid "Connected to a Simple Mesh"
msgstr ""
-#: ../src/view/devices/network/mesh.py:166
+#: ../shell/view/devices/network/mesh.py:117
msgid "Starting a Simple Mesh"
msgstr ""
-#: ../src/view/devices/network/mesh.py:173
+#: ../shell/view/devices/network/mesh.py:124
msgid "Unknown Mesh"
msgstr ""
-#: ../src/view/frame/activitiestray.py:210
-msgid "Decline"
-msgstr ""
-
-#: ../src/view/home/favoritesview.py:296
-msgid "Registration Failed"
-msgstr ""
-
-#: ../src/view/home/favoritesview.py:297
-#, python-format
-msgid "%s"
-msgstr ""
-
-#: ../src/view/home/favoritesview.py:299
-msgid "Registration Successful"
-msgstr ""
-
-#: ../src/view/home/favoritesview.py:300
-msgid "You are now registered with your school server."
-msgstr ""
-
-#: ../src/view/home/favoritesview.py:420
-msgid "Control Panel"
-msgstr ""
-
-#: ../src/view/home/favoritesview.py:425
-msgid "Restart"
-msgstr ""
-
-#: ../src/view/home/favoritesview.py:430
-msgid "Shutdown"
-msgstr ""
-
-#: ../src/view/home/favoritesview.py:436
-msgid "Register"
-msgstr ""
-
-#: ../src/view/palettes.py:42
-msgid "Starting..."
-msgstr ""
-
-#: ../src/view/palettes.py:72
-msgid "Stop"
+#: ../shell/view/home/HomeBox.py:175 ../shell/view/home/HomeBox.py:216
+msgid "About this XO"
msgstr ""
-#: ../src/view/palettes.py:104
-msgid "Start"
-msgstr ""
-
-#: ../src/view/palettes.py:138
-msgid "Remove favorite"
-msgstr ""
-
-#: ../src/view/palettes.py:142
-msgid "Make favorite"
-msgstr ""
-
-#: ../src/view/palettes.py:191
-msgid "Show contents"
-msgstr ""
-
-#: ../src/view/palettes.py:215
-#, python-format
-msgid "%(free_space)d MB Free"
+#: ../shell/view/home/HomeBox.py:222
+msgid "Not available"
msgstr ""
diff --git a/po/es.po b/po/es.po
index 28c7d24..194f920 100644
--- a/po/es.po
+++ b/po/es.po
@@ -6,9 +6,9 @@ msgid ""
msgstr ""
"Project-Id-Version: olpc-sugar\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-01 18:31-0400\n"
-"PO-Revision-Date: 2008-08-28 19:35-0400\n"
-"Last-Translator: Rafael Ortiz <rafael@laptop.org>\n"
+"POT-Creation-Date: 2008-09-25 00:30-0400\n"
+"PO-Revision-Date: 2008-11-03 03:40-0500\n"
+"Last-Translator: Sebastian Silva <sebastian@fuentelibre.org>\n"
"Language-Team: Fedora Spanish <fedora-trans-es@redhat.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -18,44 +18,47 @@ msgstr ""
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-Basepath: .\n"
-#: ../src/intro/intro.py:65 ../src/controlpanel/view/aboutme.py:100
+#: ../src/intro/window.py:93 ../src/controlpanel/aboutme/view.py:100
msgid "Name:"
msgstr "Nombre:"
-#: ../src/intro/intro.py:97
+#: ../src/intro/window.py:125
msgid "Click to change color:"
msgstr "Clic para cambiar de color:"
-#: ../src/intro/intro.py:148
+#: ../src/intro/window.py:175 ../src/journal/detailview.py:119
msgid "Back"
msgstr "Atrás"
-#: ../src/intro/intro.py:162 ../src/controlpanel/toolbar.py:61
+#: ../src/intro/window.py:189 ../src/controlpanel/toolbar.py:61
msgid "Done"
msgstr "Hecho"
-#: ../src/intro/intro.py:165
+#: ../src/intro/window.py:192
msgid "Next"
msgstr "Siguiente"
-#: ../src/view/BuddyMenu.py:58
+# "Eliminate friend"??? That's a bit harsh. Wouldn't "quitar amigo" be a better choice?--
+#
+# agree but i preffer remover :). that verbe has the exact meaning we are looking on here.
+#: ../src/view/BuddyMenu.py:60
msgid "Remove friend"
-msgstr "Eliminar amigo"
+msgstr "Remover amigo"
-#: ../src/view/BuddyMenu.py:61
+#: ../src/view/BuddyMenu.py:63
msgid "Make friend"
msgstr "Agregar amigo"
-#: ../src/view/BuddyMenu.py:90
+#: ../src/view/BuddyMenu.py:92
#, python-format
msgid "Invite to %s"
-msgstr "Invitar a %s"
+msgstr "invitar a %s"
-#: ../src/view/clipboardmenu.py:48
+#: ../src/view/clipboardmenu.py:51
msgid "Remove"
msgstr "Eliminar"
-#: ../src/view/clipboardmenu.py:53 ../src/view/clipboardmenu.py:79
+#: ../src/view/clipboardmenu.py:56 ../src/view/clipboardmenu.py:78
msgid "Open"
msgstr "Abrir"
@@ -63,26 +66,23 @@ msgstr "Abrir"
# TODO: Implement stopping downloads
# self._stop_item.connect('activate', self._stop_item_activate_cb)
# self.append_menu_item(self._stop_item)
-#. self._stop_item = MenuItem(_('Stop download'), 'stock-close')
-#. TODO: Implement stopping downloads
-#. self._stop_item.connect('activate', self._stop_item_activate_cb)
-#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:87
+#: ../src/view/clipboardmenu.py:61 ../src/view/home/HomeBox.py:84
msgid "Keep"
msgstr "Guardar"
-#: ../src/view/clipboardmenu.py:84
+#: ../src/view/clipboardmenu.py:83
msgid "Open with"
msgstr "Abrir con"
-#: ../src/view/clipboardmenu.py:216
+#: ../src/view/clipboardmenu.py:228
#, python-format
-msgid "Clipboard object: %s."
-msgstr "Objeto de portapapel: %s."
+msgid "%s clipping"
+msgstr ""
+# This is an encryption key type, not a keyboard key
#: ../src/hardware/keydialog.py:150
msgid "Key Type:"
-msgstr "Tipo de Tecla"
+msgstr "Tipo de Clave:"
#: ../src/hardware/keydialog.py:170
msgid "Authentication Type:"
@@ -94,80 +94,72 @@ msgstr "Tipo de Encriptación:"
#: ../src/hardware/schoolserver.py:17
msgid "Cannot obtain data needed for registration."
-msgstr "No se pueden obtener los datos necesarios para el registro"
+msgstr "No se puede obtener datos necesarios para el registro"
#: ../src/hardware/schoolserver.py:31
msgid "Cannot connect to the server."
-msgstr "No se puede conectar al servidor"
+msgstr "No se puede conectar al servidor."
#: ../src/hardware/schoolserver.py:36
msgid "The server could not complete the request."
-msgstr "El servidor no pudo completar la petición "
+msgstr "El servidor no pudo completar el pedido."
-#: ../src/view/Shell.py:262
+#: ../src/view/Shell.py:251
msgid "Screenshot"
msgstr "Captura de pantalla"
-#: ../src/view/home/HomeBox.py:81
+#: ../src/view/home/HomeBox.py:78
msgid "Confirm erase"
msgstr "Confirmar borrado"
-#: ../src/view/home/HomeBox.py:83
+#: ../src/view/home/HomeBox.py:80
#, python-format
msgid "Confirm erase: Do you want to permanently erase %s?"
-msgstr "Confirmar borrado: Quiere borrar permanentemente %s?"
+msgstr "Confirmar borrado:Quiere borrar permanentemente%s?"
-#: ../src/view/home/HomeBox.py:90 ../src/view/palettes.py:120
+#: ../src/view/home/HomeBox.py:87 ../src/view/palettes.py:120
+#: ../src/journal/journaltoolbox.py:335 ../src/journal/palettes.py:75
msgid "Erase"
msgstr "Borrar"
-#: ../src/view/home/HomeBox.py:120
+#: ../src/view/home/HomeBox.py:117
msgid "Software Update"
msgstr "Actualización de Software"
-#: ../src/view/home/HomeBox.py:121
+#: ../src/view/home/HomeBox.py:118
msgid "Update your activities to ensure compatibility with your new software"
-msgstr "Actualice sus actividades para asegurar compatibilidad con su nuevo software."
+msgstr ""
+"Actualice sus actividades para asegurar compatibilidad con su nuevo software"
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/toolbar.py:115
+#: ../src/view/home/HomeBox.py:122 ../src/controlpanel/toolbar.py:115
msgid "Cancel"
msgstr "Cancelar"
-#: ../src/view/home/HomeBox.py:127 ../src/controlpanel/gui.py:276
+#: ../src/view/home/HomeBox.py:124 ../src/controlpanel/gui.py:273
msgid "Later"
msgstr "Después"
-#: ../src/view/home/HomeBox.py:130
+#: ../src/view/home/HomeBox.py:127
msgid "Check now"
-msgstr "Probar ahora"
+msgstr "Pruebe ahora"
-#: ../src/view/home/HomeBox.py:266
+#: ../src/view/home/HomeBox.py:261
msgid "List view"
msgstr "Vista en lista"
-#: ../src/view/home/HomeBox.py:267
+#: ../src/view/home/HomeBox.py:262
+#, fuzzy
msgid "<Ctrl>2"
-msgstr "<Ctrl>2"
+msgstr "<Ctrl>L"
-#: ../src/view/home/HomeBox.py:325
+#: ../src/view/home/HomeBox.py:320
msgid "Favorites view"
msgstr "Vista de Favoritos"
-#: ../src/view/home/HomeBox.py:326
+#: ../src/view/home/HomeBox.py:321
+#, fuzzy
msgid "<Ctrl>1"
-msgstr "<Ctrl>1"
-
-# TRANS: label for the freeform layout in the favorites view
-#. TRANS: label for the freeform layout in the favorites view
-#: ../src/view/home/HomeBox.py:334
-msgid "Freeform"
-msgstr "Forma libre"
-
-# TRANS: label for the ring layout in the favorites view
-#. TRANS: label for the ring layout in the favorites view
-#: ../src/view/home/HomeBox.py:341
-msgid "Ring"
-msgstr "Anillo"
+msgstr "<Ctrl>L"
#: ../src/view/home/MeshBox.py:97
msgid "Connect"
@@ -186,20 +178,19 @@ msgstr "Desconectar"
msgid "Disconnecting..."
msgstr "Desconectando..."
-#: ../src/view/home/MeshBox.py:152
+#: ../src/view/home/MeshBox.py:159
msgid "Connecting..."
msgstr "Conectando..."
# TODO: show the channel number
#. TODO: show the channel number
-#: ../src/view/home/MeshBox.py:159
+#: ../src/view/home/MeshBox.py:166
msgid "Connected"
msgstr "Conectado"
-#. only temporarily
-#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:51
-#: ../src/view/devices/network/mesh.py:92
-#: ../src/view/devices/network/mesh.py:96
+#: ../src/view/home/MeshBox.py:218 ../src/view/devices/network/mesh.py:41
+#: ../src/view/devices/network/mesh.py:68
+#: ../src/view/devices/network/mesh.py:72
msgid "Mesh Network"
msgstr "Red Malla"
@@ -207,16 +198,18 @@ msgstr "Red Malla"
# priority over the normal wireless device. NM doesn't have a "disconnect"
# method for a device either (for various reasons) so this doesn't
# have a good mapping
-#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:160
-#: ../src/view/devices/network/mesh.py:125
+#: ../src/view/home/MeshBox.py:221 ../src/view/devices/network/wireless.py:125
+#: ../src/view/devices/network/mesh.py:89
msgid "Disconnect..."
msgstr "Desconectando..."
-#: ../src/view/home/MeshBox.py:302 ../src/view/palettes.py:61
+#. TRANS: Action label for resuming an activity.
+#: ../src/view/home/MeshBox.py:309 ../src/view/palettes.py:61
+#: ../src/journal/journaltoolbox.py:399 ../src/journal/palettes.py:57
msgid "Resume"
-msgstr "Resumir"
+msgstr "Retomar"
-#: ../src/view/home/MeshBox.py:307 ../src/view/frame/activitiestray.py:205
+#: ../src/view/home/MeshBox.py:314 ../src/view/frame/activitiestray.py:206
msgid "Join"
msgstr "Unirse"
@@ -246,24 +239,20 @@ msgid "My Speakers"
msgstr "Mis parlantes"
# la traducción la tome del AlsaMixer de Gnome.
-#: ../src/view/devices/speaker.py:119
+#: ../src/view/devices/speaker.py:125
+#, fuzzy
msgid "Unmute"
msgstr "Dar voz"
-#: ../src/view/devices/speaker.py:122
+#: ../src/view/devices/speaker.py:128
msgid "Mute"
msgstr "Silenciar"
-#: ../src/view/devices/network/wireless.py:37
-#, python-format
-msgid "IP address: %s"
-msgstr ""
-
-#: ../src/view/devices/network/wireless.py:86
+#: ../src/view/devices/network/wireless.py:67
msgid "Disconnected"
msgstr "Desconectado"
-#: ../src/view/devices/network/wireless.py:178
+#: ../src/view/devices/network/wireless.py:143
msgid "Channel"
msgstr "Canal"
@@ -302,7 +291,9 @@ msgstr "sugar-control-panel: clave=%s no es una opción disponible"
msgid "sugar-control-panel: %s"
msgstr "sugar-control-panel: %s"
-#: ../src/controlpanel/cmd.py:33
+#. TRANS: Translators, there's a empty line at the end of this string,
+#. which must appear in the translated string (msgstr) as well.
+#: ../src/controlpanel/cmd.py:35
#, fuzzy
msgid ""
"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
@@ -326,311 +317,357 @@ msgstr ""
" -s clave establece el valor actual para la clave \n"
" "
-#: ../src/controlpanel/cmd.py:46
+#: ../src/controlpanel/cmd.py:48
msgid "To apply your changes you have to restart sugar.\n"
msgstr "Para aplicar sus cambios tiene que reiniciar sugar.\n"
-#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:296
+#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:305
msgid "Ok"
msgstr "Ok"
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:268
+#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:265
msgid "Changes require restart"
msgstr "Los cambios requieren reiniciar"
-#: ../src/controlpanel/gui.py:267
+#: ../src/controlpanel/gui.py:264
msgid "Warning"
msgstr "Advertencia"
-#: ../src/controlpanel/gui.py:271
+#: ../src/controlpanel/gui.py:268
msgid "Cancel changes"
msgstr "Cancelar cambios"
-#: ../src/controlpanel/gui.py:280
+#: ../src/controlpanel/gui.py:277
msgid "Restart now"
msgstr "Reiniciar ahora"
-#: ../src/controlpanel/model/aboutme.py:44
+#: ../src/controlpanel/aboutme/model.py:44
msgid "You must enter a name."
msgstr "Debe ingresar un nombre."
-#: ../src/controlpanel/model/aboutme.py:69
+#: ../src/controlpanel/aboutme/model.py:69
#, python-format
msgid "stroke: color=%s hue=%s"
msgstr "Borde: color=%s tonalidad=%s"
-#: ../src/controlpanel/model/aboutme.py:72
+#: ../src/controlpanel/aboutme/model.py:72
#, python-format
msgid "stroke: %s"
msgstr "Borde: %s"
-#: ../src/controlpanel/model/aboutme.py:74
+#: ../src/controlpanel/aboutme/model.py:74
#, python-format
msgid "fill: color=%s hue=%s"
msgstr "relleno: color=%s tonalidad=%s"
-#: ../src/controlpanel/model/aboutme.py:76
+#: ../src/controlpanel/aboutme/model.py:76
#, python-format
msgid "fill: %s"
msgstr "relleno: %s"
-#: ../src/controlpanel/model/aboutme.py:87
+#: ../src/controlpanel/aboutme/model.py:87
msgid "Error in specified color modifiers."
msgstr "Error en modificadores de color especificados."
-#: ../src/controlpanel/model/aboutme.py:90
+#: ../src/controlpanel/aboutme/model.py:90
msgid "Error in specified colors."
msgstr "Error en colores especificados."
-#: ../src/controlpanel/model/aboutxo.py:24
-msgid "Not available"
-msgstr "No disponible"
-
-#: ../src/controlpanel/model/datetime.py:85
-msgid "Error timezone does not exist."
-msgstr "Error, zona horaria no existe."
-
-#: ../src/controlpanel/model/frame.py:38 ../src/controlpanel/model/frame.py:60
-msgid "Value must be an integer."
-msgstr "El valor debe ser un número entero."
-
-#: ../src/controlpanel/model/language.py:28
-msgid "Could not access ~/.i18n. Create standard settings."
-msgstr ""
-"No se puede acceder a ~/.i18n. Crear configuración internacional estándar."
-
-#: ../src/controlpanel/model/language.py:110
-#, python-format
-msgid "Language for code=%s could not be determined."
-msgstr "El lenguaje del código=%s no pudo ser determinado."
-
-#: ../src/controlpanel/model/language.py:127
-#, python-format
-msgid "Sorry I do not speak '%s'."
-msgstr "Lo siento yo no hablo '%s'."
-
-#: ../src/controlpanel/model/network.py:48
-msgid "You must enter a server."
-msgstr "Debe ingresar un servidor"
-
-#: ../src/controlpanel/model/network.py:63
-msgid "State is unknown."
-msgstr "Estado desconocido."
-
-#: ../src/controlpanel/model/network.py:83
-msgid "Error in specified radio argument use on/off."
-msgstr "Error en argumento especificado de radio use on/off."
-
-#: ../src/controlpanel/model/power.py:57
-msgid "Error in automatic pm argument, use on/off."
-msgstr "Error en argumento automatico de pm, use on/off "
-
-#: ../src/controlpanel/model/power.py:86
-msgid "Error in extreme pm argument, use on/off."
-msgstr "Error en argumento extremo de pm, use on/off"
-
-#: ../src/controlpanel/view/aboutme.py:32
+#: ../src/controlpanel/aboutme/view.py:32
+#: ../src/controlpanel/aboutme/__init__.py:22
msgid "About Me"
msgstr "Acerca de mí."
-#: ../src/controlpanel/view/aboutme.py:134
+#: ../src/controlpanel/aboutme/view.py:134
msgid "Click to change your color:"
msgstr "Clic para cambiar su color:"
-#: ../src/controlpanel/view/aboutxo.py:28
-msgid "About my XO"
-msgstr "Acerca de mi XO"
+#: ../src/controlpanel/aboutxo/model.py:24
+msgid "Not available"
+msgstr "No disponible"
-#: ../src/controlpanel/view/aboutxo.py:59
+#: ../src/controlpanel/aboutxo/view.py:55
msgid "Identity"
msgstr "Identidad"
-#: ../src/controlpanel/view/aboutxo.py:68
+#: ../src/controlpanel/aboutxo/view.py:64
msgid "Serial Number:"
msgstr "Número de Serie:"
-#: ../src/controlpanel/view/aboutxo.py:91
+#: ../src/controlpanel/aboutxo/view.py:87
msgid "Software"
msgstr "Software"
# Por ahora..
-#: ../src/controlpanel/view/aboutxo.py:100
+#: ../src/controlpanel/aboutxo/view.py:96
msgid "Build:"
msgstr "Ensamble:"
-#: ../src/controlpanel/view/aboutxo.py:115
+#: ../src/controlpanel/aboutxo/view.py:111
msgid "Sugar:"
-msgstr ""
+msgstr "Azucar:"
-#: ../src/controlpanel/view/aboutxo.py:130
+#: ../src/controlpanel/aboutxo/view.py:126
msgid "Firmware:"
msgstr "Firmware"
-#: ../src/controlpanel/view/aboutxo.py:152
+#: ../src/controlpanel/aboutxo/view.py:148
msgid "Copyright and License"
-msgstr ""
+msgstr "Licencia y Copyright"
-#: ../src/controlpanel/view/aboutxo.py:160
+#: ../src/controlpanel/aboutxo/view.py:156
msgid ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
msgstr ""
+"© 2008 One Laptop per Child Association Inc; Red Hat Inc; y Contribuyentes."
-#: ../src/controlpanel/view/aboutxo.py:166
+#: ../src/controlpanel/aboutxo/view.py:163
msgid ""
"Sugar is the graphical user interface that you are looking at. Sugar is free "
"software, covered by the GNU General Public License, and you are welcome to "
"change it and/or distribute copies of it under certain conditions described "
"therein."
msgstr ""
+"Azucar es la interfaz gráfica de usuario que usted esta mirando. Azucar es "
+"software libre, cubierto bajo la licencia GNU Licencia Publica General, y "
+"esta invitado a cambiarla y/o distribuir copias bajo ciertas condiciones que "
+"se describen en ella."
-#: ../src/controlpanel/view/aboutxo.py:178
+#: ../src/controlpanel/aboutxo/view.py:175
msgid "Full license:"
-msgstr ""
+msgstr "Licencia Completa:"
-#: ../src/controlpanel/view/datetime.py:29
-msgid "Date & Time"
-msgstr "Fecha y Hora"
+#: ../src/controlpanel/aboutxo/__init__.py:21
+msgid "About my XO"
+msgstr "Acerca de mi XO"
+
+#: ../src/controlpanel/datetime/model.py:89
+msgid "Error timezone does not exist."
+msgstr "Error, zona horaria no existe."
-#: ../src/controlpanel/view/datetime.py:72
+#: ../src/controlpanel/datetime/view.py:68
msgid "Timezone"
msgstr "Zona horaria"
-#: ../src/controlpanel/view/frame.py:28
-msgid "Frame"
-msgstr "Cuadro"
+#: ../src/controlpanel/datetime/__init__.py:21
+msgid "Date & Time"
+msgstr "Fecha y Hora"
-#: ../src/controlpanel/view/frame.py:30
+#: ../src/controlpanel/frame/model.py:38 ../src/controlpanel/frame/model.py:60
+msgid "Value must be an integer."
+msgstr "El valor debe ser un número entero."
+
+#: ../src/controlpanel/frame/view.py:26
msgid "never"
msgstr "nunca"
-#: ../src/controlpanel/view/frame.py:31
+#: ../src/controlpanel/frame/view.py:27
msgid "instantaneous"
msgstr "instantáneo"
-#: ../src/controlpanel/view/frame.py:32
+#: ../src/controlpanel/frame/view.py:28
#, python-format
msgid "%s seconds"
msgstr "%s segundos"
-#: ../src/controlpanel/view/frame.py:56
+#: ../src/controlpanel/frame/view.py:52
msgid "Activation Delay"
-msgstr "Activación del retraso"
+msgstr "Retraso de activación"
-#: ../src/controlpanel/view/frame.py:80
+#: ../src/controlpanel/frame/view.py:76
msgid "Corner"
msgstr "Esquina"
-#: ../src/controlpanel/view/frame.py:115
+#: ../src/controlpanel/frame/view.py:111
msgid "Edge"
msgstr "Borde"
-#: ../src/controlpanel/view/language.py:29
-#: ../src/controlpanel/view/language.py:74
+#: ../src/controlpanel/frame/__init__.py:21
+msgid "Frame"
+msgstr "Cuadro"
+
+#: ../src/controlpanel/language/model.py:28
+msgid "Could not access ~/.i18n. Create standard settings."
+msgstr ""
+"No se puede acceder a ~/.i18n. Crear configuración internacional estándar."
+
+#: ../src/controlpanel/language/model.py:114
+#, python-format
+msgid "Language for code=%s could not be determined."
+msgstr "El lenguaje del código=%s no pudo ser determinado."
+
+#: ../src/controlpanel/language/model.py:131
+#, python-format
+msgid "Sorry I do not speak '%s'."
+msgstr "Lo siento yo no hablo '%s'."
+
+#: ../src/controlpanel/language/view.py:70
+#: ../src/controlpanel/language/__init__.py:21
msgid "Language"
msgstr "Idioma"
-#: ../src/controlpanel/view/network.py:28
+#: ../src/controlpanel/network/model.py:62
+msgid "State is unknown."
+msgstr "Estado desconocido."
+
+#: ../src/controlpanel/network/model.py:82
+msgid "Error in specified radio argument use on/off."
+msgstr "Error en argumento especificado de radio use on/off."
+
+#: ../src/controlpanel/network/view.py:28
+#: ../src/controlpanel/network/__init__.py:21
msgid "Network"
msgstr "Red"
-#: ../src/controlpanel/view/network.py:53
+#: ../src/controlpanel/network/view.py:54
msgid "Wireless"
msgstr "Inalámbrica"
-#: ../src/controlpanel/view/network.py:61
-msgid "Radio:"
+#: ../src/controlpanel/network/view.py:62
+msgid "Turn of the wireless radio to save battery life"
+msgstr "Apague el radio de la inalámbrica y ahorre vida de batería."
+
+#: ../src/controlpanel/network/view.py:75
+#, fuzzy
+msgid "Radio"
msgstr "Radio:"
-#: ../src/controlpanel/view/network.py:94
+#: ../src/controlpanel/network/view.py:91
+#, fuzzy
+msgid "Discard network history if you have trouble connecting to the network"
+msgstr "Descarte la historia de la red si tiene problemas de conexión "
+
+#: ../src/controlpanel/network/view.py:100
+msgid "Discard network history"
+msgstr "Descarte historial de la red."
+
+#: ../src/controlpanel/network/view.py:113
msgid "Mesh"
msgstr "Malla"
-#: ../src/controlpanel/view/network.py:103
+#: ../src/controlpanel/network/view.py:122
msgid "Server:"
msgstr "Servidor:"
-#: ../src/controlpanel/view/power.py:27
-msgid "Power"
-msgstr "Energía "
+#: ../src/controlpanel/power/model.py:55
+msgid "Error in automatic pm argument, use on/off."
+msgstr "Error en argumento automatico de pm, use on/off "
-#: ../src/controlpanel/view/power.py:51
+#: ../src/controlpanel/power/model.py:84
+msgid "Error in extreme pm argument, use on/off."
+msgstr "Error en argumento extremo de pm, use on/off"
+
+#: ../src/controlpanel/power/view.py:47
msgid "Power management"
msgstr "Manejo de energía"
-#: ../src/controlpanel/view/power.py:61
+#: ../src/controlpanel/power/view.py:57
msgid "Automatic power management (increases battery life)"
msgstr "Manejo automático de Energía (incrementa la vida de la batería)"
-#: ../src/controlpanel/view/power.py:89
+#: ../src/controlpanel/power/view.py:85
+#, fuzzy
msgid ""
-"Extreme power management (disables wireless radio, increases battery life)"
+"Extreme power management (disableswireless radio, increases battery life)"
msgstr ""
"Manejo extremo de energía (deshabilita el radio wireless, incrementa la vida "
"de la batería)"
-#: ../src/view/devices/network/mesh.py:154
+#: ../src/controlpanel/power/__init__.py:21
+msgid "Power"
+msgstr "Energía "
+
+#: ../src/view/devices/network/mesh.py:111
msgid "Connected to a School Mesh Portal"
msgstr "Conectado a un enlace escolar de red malla"
# "portal malla de colegio", en Castellano de España suena fatal... ¿Realmente se quiere decir malla?
-#: ../src/view/devices/network/mesh.py:156
+#: ../src/view/devices/network/mesh.py:113
msgid "Looking for a School Mesh Portal..."
msgstr "Buscando un enlace escolar de red malla..."
-#: ../src/view/devices/network/mesh.py:159
+#: ../src/view/devices/network/mesh.py:116
msgid "Connected to an XO Mesh Portal"
msgstr "Conectado a un Portal Malla XO"
-#: ../src/view/devices/network/mesh.py:161
+#: ../src/view/devices/network/mesh.py:118
msgid "Looking for an XO Mesh Portal..."
msgstr "Buscando un Portal Malla XO..."
-#: ../src/view/devices/network/mesh.py:164
+#: ../src/view/devices/network/mesh.py:121
msgid "Connected to a Simple Mesh"
msgstr "Conectado a una Red Malla Simple"
-#: ../src/view/devices/network/mesh.py:166
+#: ../src/view/devices/network/mesh.py:123
msgid "Starting a Simple Mesh"
msgstr "Empezando una Red Malla Simple"
-#: ../src/view/devices/network/mesh.py:173
+#: ../src/view/devices/network/mesh.py:130
msgid "Unknown Mesh"
msgstr "Red Malla Desconocida"
-#: ../src/view/frame/activitiestray.py:210
+#: ../src/view/frame/activitiestray.py:211
msgid "Decline"
msgstr "Rechazar"
-#: ../src/view/home/favoritesview.py:287
+# TRANS: label for the freeform layout in the favorites view
+#. TRANS: label for the freeform layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:107
+msgid "Freeform"
+msgstr "Forma libre"
+
+# TRANS: label for the ring layout in the favorites view
+#. TRANS: label for the ring layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:189
+msgid "Ring"
+msgstr "Anillo"
+
+#. TRANS: label for the spiral layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:334
+msgid "Spiral"
+msgstr "Espiral"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:401
+msgid "Box"
+msgstr "Caja"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:442
+msgid "Triangle"
+msgstr "Triángulo"
+
+#: ../src/view/home/favoritesview.py:295
msgid "Registration Failed"
msgstr "Registro Fallido"
-#: ../src/view/home/favoritesview.py:288
+#: ../src/view/home/favoritesview.py:296
#, python-format
msgid "%s"
msgstr "%s"
-#: ../src/view/home/favoritesview.py:290
+#: ../src/view/home/favoritesview.py:298
msgid "Registration Successful"
msgstr "Registro Exitoso"
-#: ../src/view/home/favoritesview.py:291
+#: ../src/view/home/favoritesview.py:299
msgid "You are now registered with your school server."
msgstr "Ahora estas registrado en el servidor de colegio"
-#: ../src/view/home/favoritesview.py:407
-msgid "Control Panel"
-msgstr "Panel de Control"
+#: ../src/view/home/favoritesview.py:420
+#, fuzzy
+msgid "Settings"
+msgstr "Configuración "
-#: ../src/view/home/favoritesview.py:418
+#: ../src/view/home/favoritesview.py:425
msgid "Restart"
msgstr "Reiniciar"
-#: ../src/view/home/favoritesview.py:423
+#: ../src/view/home/favoritesview.py:430
msgid "Shutdown"
msgstr "Apagar"
-#: ../src/view/home/favoritesview.py:429
+#: ../src/view/home/favoritesview.py:436
msgid "Register"
msgstr "Registro"
@@ -642,27 +679,156 @@ msgstr "Iniciando..."
msgid "Stop"
msgstr "Parar"
-#: ../src/view/palettes.py:104
+#. TRANS: Action label for starting an entry.
+#: ../src/view/palettes.py:104 ../src/journal/journaltoolbox.py:402
+#: ../src/journal/palettes.py:59
msgid "Start"
msgstr "Iniciar"
-#: ../src/view/palettes.py:132
+#: ../src/view/palettes.py:138
msgid "Remove favorite"
msgstr "Remover favorito"
-#: ../src/view/palettes.py:136
+#: ../src/view/palettes.py:142
msgid "Make favorite"
msgstr "Hacer favorito"
-#: ../src/view/palettes.py:185
+#: ../src/view/palettes.py:191
msgid "Show contents"
msgstr "Mostrar contenidos"
-#: ../src/view/palettes.py:209
+#: ../src/view/palettes.py:215
#, python-format
msgid "%(free_space)d MB Free"
msgstr "%(free_space)d MB libres"
+#: ../src/journal/journaltoolbox.py:62
+msgid "Search"
+msgstr "Buscar"
+
+#: ../src/journal/journaltoolbox.py:119
+msgid "Anytime"
+msgstr "Cualquier momento"
+
+#: ../src/journal/journaltoolbox.py:121
+msgid "Today"
+msgstr "Hoy"
+
+#: ../src/journal/journaltoolbox.py:123
+msgid "Since yesterday"
+msgstr "Desde ayer"
+
+#. TRANS: Filter entries modified during the last 7 days.
+#: ../src/journal/journaltoolbox.py:125
+msgid "Past week"
+msgstr "Última semana"
+
+#. TRANS: Filter entries modified during the last 30 days.
+#: ../src/journal/journaltoolbox.py:127
+msgid "Past month"
+msgstr "Último mes"
+
+#. TRANS: Filter entries modified during the last 356 days.
+#: ../src/journal/journaltoolbox.py:129
+msgid "Past year"
+msgstr "Último año"
+
+#: ../src/journal/journaltoolbox.py:136
+msgid "Anyone"
+msgstr "Cualquiera"
+
+#: ../src/journal/journaltoolbox.py:138
+msgid "My friends"
+msgstr "Mis amigos"
+
+#: ../src/journal/journaltoolbox.py:139
+msgid "My class"
+msgstr "Mi clase"
+
+#. TRANS: Item in a combo box that filters by entry type.
+#: ../src/journal/journaltoolbox.py:255
+msgid "Anything"
+msgstr "Cualquiera"
+
+#. TODO: Add "Start with" menu item
+#: ../src/journal/journaltoolbox.py:325 ../src/journal/palettes.py:67
+msgid "Copy"
+msgstr "Copiar"
+
+#: ../src/journal/collapsedentry.py:248 ../src/journal/expandedentry.py:176
+#: ../src/journal/palettes.py:51
+msgid "Untitled"
+msgstr "Sin título"
+
+#: ../src/journal/journalactivity.py:119 ../src/journal/volumesmanager.py:57
+msgid "Journal"
+msgstr "Diario"
+
+#: ../src/journal/expandedentry.py:222
+msgid "No preview"
+msgstr "Sin vista previa"
+
+#: ../src/journal/expandedentry.py:241
+msgid "Participants:"
+msgstr "Participantes:"
+
+#: ../src/journal/expandedentry.py:266
+msgid "Description:"
+msgstr "Descripción:"
+
+#: ../src/journal/expandedentry.py:292
+msgid "Tags:"
+msgstr "Etiquetas:"
+
+#: ../src/journal/objectchooser.py:134
+msgid "Choose an object"
+msgstr "Escoja un objeto"
+
+#: ../src/journal/objectchooser.py:139
+msgid "Close"
+msgstr "Cerrar"
+
+#: ../src/journal/volumestoolbar.py:93
+msgid "Unmount"
+msgstr "Desmontar"
+
+#: ../src/journal/misc.py:95
+msgid "No date"
+msgstr "Sin fecha"
+
+#: ../src/journal/listview.py:39
+msgid "Your Journal is empty"
+msgstr "Su diario está vacío"
+
+#: ../src/journal/listview.py:40
+msgid "No matching entries "
+msgstr "No hay entradas coincidentes"
+
+#: ../src/journal/modalalert.py:59
+msgid "Your Journal is full"
+msgstr "Su diario está vacío"
+
+#: ../src/journal/modalalert.py:63
+#, fuzzy
+msgid "Please delete some old Journal entries to make space for new ones."
+msgstr ""
+"Por favor borre las entradas viejas del diario para hacer espacio a las "
+"nuevas entradas."
+
+#: ../src/journal/modalalert.py:75
+msgid "Show Journal"
+msgstr "Mostrar Diario"
+
+#, python-format
+#~ msgid "Clipboard object: %s."
+#~ msgstr "Objeto de portapapel: %s."
+
+#~ msgid "You must enter a server."
+#~ msgstr "Debe ingresar un servidor"
+
+#~ msgid "Control Panel"
+#~ msgstr "Panel de Control"
+
#~ msgid "<Ctrl>R"
#~ msgstr "<Ctrl>R"
@@ -768,9 +934,6 @@ msgstr "%(free_space)d MB libres"
#~ msgid "Redo"
#~ msgstr "Rehacer"
-#~ msgid "Copy"
-#~ msgstr "Copiar"
-
#~ msgid "Paste"
#~ msgstr "Pegar"
diff --git a/po/fr.po b/po/fr.po
index dad93ca..a038ba5 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sugar\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-01 18:31-0400\n"
-"PO-Revision-Date: 2008-09-10 00:12-0400\n"
+"POT-Creation-Date: 2008-09-25 00:30-0400\n"
+"PO-Revision-Date: 2008-09-27 05:45-0400\n"
"Last-Translator: samy boutayeb <s.boutayeb@free.fr>\n"
"Language-Team: French <traduc@traduc.org>\n"
"MIME-Version: 1.0\n"
@@ -15,44 +15,44 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Pootle 1.1.0rc2\n"
-#: ../src/intro/intro.py:65 ../src/controlpanel/view/aboutme.py:100
+#: ../src/intro/window.py:93 ../src/controlpanel/aboutme/view.py:100
msgid "Name:"
msgstr "Nom :"
-#: ../src/intro/intro.py:97
+#: ../src/intro/window.py:125
msgid "Click to change color:"
msgstr "Cliquer pour changer de couleur :"
-#: ../src/intro/intro.py:148
+#: ../src/intro/window.py:175 ../src/journal/detailview.py:119
msgid "Back"
msgstr "Précédent"
-#: ../src/intro/intro.py:162 ../src/controlpanel/toolbar.py:61
+#: ../src/intro/window.py:189 ../src/controlpanel/toolbar.py:61
msgid "Done"
msgstr "Accepter"
-#: ../src/intro/intro.py:165
+#: ../src/intro/window.py:192
msgid "Next"
msgstr "Suivant"
-#: ../src/view/BuddyMenu.py:58
+#: ../src/view/BuddyMenu.py:60
msgid "Remove friend"
msgstr "Retirer de mes amis"
-#: ../src/view/BuddyMenu.py:61
+#: ../src/view/BuddyMenu.py:63
msgid "Make friend"
msgstr "Ajouter à mes amis"
-#: ../src/view/BuddyMenu.py:90
+#: ../src/view/BuddyMenu.py:92
#, python-format
msgid "Invite to %s"
msgstr "Inviter à %s"
-#: ../src/view/clipboardmenu.py:48
+#: ../src/view/clipboardmenu.py:51
msgid "Remove"
msgstr "Retirer"
-#: ../src/view/clipboardmenu.py:53 ../src/view/clipboardmenu.py:79
+#: ../src/view/clipboardmenu.py:56 ../src/view/clipboardmenu.py:78
msgid "Open"
msgstr "Ouvrir"
@@ -60,22 +60,18 @@ msgstr "Ouvrir"
# TODO: Implement stopping downloads
# self._stop_item.connect('activate', self._stop_item_activate_cb)
# self.append_menu_item(self._stop_item)
-#. self._stop_item = MenuItem(_('Stop download'), 'stock-close')
-#. TODO: Implement stopping downloads
-#. self._stop_item.connect('activate', self._stop_item_activate_cb)
-#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:87
+#: ../src/view/clipboardmenu.py:61 ../src/view/home/HomeBox.py:84
msgid "Keep"
msgstr "Conserver"
-#: ../src/view/clipboardmenu.py:84
+#: ../src/view/clipboardmenu.py:83
msgid "Open with"
msgstr "Ouvrir avec"
-#: ../src/view/clipboardmenu.py:216
+#: ../src/view/clipboardmenu.py:228
#, python-format
-msgid "Clipboard object: %s."
-msgstr "Objet dans le presse-papier : %s."
+msgid "%s clipping"
+msgstr "%s coupure"
#: ../src/hardware/keydialog.py:150
msgid "Key Type:"
@@ -91,82 +87,71 @@ msgstr "Type d'encryptage :"
#: ../src/hardware/schoolserver.py:17
msgid "Cannot obtain data needed for registration."
-msgstr "Impossible d'obtenir certaines données nécessaires à l'enregistrement."
+msgstr "Impossible d'obtenir les données nécessaires à l'enregistrement."
#: ../src/hardware/schoolserver.py:31
msgid "Cannot connect to the server."
-msgstr "Impossible de se connecter au serveu."
+msgstr "Impossible de se connecter au serveur."
#: ../src/hardware/schoolserver.py:36
msgid "The server could not complete the request."
msgstr "Le serveur n'a pas pu achever la requête."
-#: ../src/view/Shell.py:262
+#: ../src/view/Shell.py:251
msgid "Screenshot"
msgstr "Capture d'écran"
-#: ../src/view/home/HomeBox.py:81
+#: ../src/view/home/HomeBox.py:78
msgid "Confirm erase"
msgstr "Confirmer la suppression"
# Conformer la suppression : faut-il supprimer %s définitivement ?
-#: ../src/view/home/HomeBox.py:83
+#: ../src/view/home/HomeBox.py:80
#, python-format
msgid "Confirm erase: Do you want to permanently erase %s?"
msgstr "Confirmer la suppression : faut-il supprimer %s définitivement ?"
-#: ../src/view/home/HomeBox.py:90 ../src/view/palettes.py:120
+#: ../src/view/home/HomeBox.py:87 ../src/view/palettes.py:120
+#: ../src/journal/journaltoolbox.py:335 ../src/journal/palettes.py:75
msgid "Erase"
msgstr "Supprimer"
-#: ../src/view/home/HomeBox.py:120
+#: ../src/view/home/HomeBox.py:117
msgid "Software Update"
msgstr "Mise à jour logicielle"
-#: ../src/view/home/HomeBox.py:121
+#: ../src/view/home/HomeBox.py:118
msgid "Update your activities to ensure compatibility with your new software"
msgstr "Actualiser les activités pour assurer la compatibilité logicielle"
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/toolbar.py:115
+#: ../src/view/home/HomeBox.py:122 ../src/controlpanel/toolbar.py:115
msgid "Cancel"
msgstr "Annuler"
-#: ../src/view/home/HomeBox.py:127 ../src/controlpanel/gui.py:276
+#: ../src/view/home/HomeBox.py:124 ../src/controlpanel/gui.py:273
msgid "Later"
msgstr "Plus tard"
-#: ../src/view/home/HomeBox.py:130
+#: ../src/view/home/HomeBox.py:127
msgid "Check now"
msgstr "Vérifier maintenant"
-#: ../src/view/home/HomeBox.py:266
+#: ../src/view/home/HomeBox.py:261
msgid "List view"
msgstr "Écran liste"
-#: ../src/view/home/HomeBox.py:267
+#: ../src/view/home/HomeBox.py:262
msgid "<Ctrl>2"
msgstr "<Ctrl>2"
-#: ../src/view/home/HomeBox.py:325
+#: ../src/view/home/HomeBox.py:320
msgid "Favorites view"
msgstr "Écran favoris"
-#: ../src/view/home/HomeBox.py:326
+#: ../src/view/home/HomeBox.py:321
msgid "<Ctrl>1"
msgstr "<Ctrl>1"
-# TRANS: label for the freeform layout in the favorites view
-#. TRANS: label for the freeform layout in the favorites view
-#: ../src/view/home/HomeBox.py:334
-msgid "Freeform"
-msgstr "Libre"
-
-# TRANS: label for the ring layout in the favorites view
-#. TRANS: label for the ring layout in the favorites view
-#: ../src/view/home/HomeBox.py:341
-msgid "Ring"
-msgstr "Concentrique"
-
#: ../src/view/home/MeshBox.py:97
msgid "Connect"
msgstr "Connecter"
@@ -183,20 +168,19 @@ msgstr "Déconnecter"
msgid "Disconnecting..."
msgstr "Déconnexion..."
-#: ../src/view/home/MeshBox.py:152
+#: ../src/view/home/MeshBox.py:159
msgid "Connecting..."
msgstr "Connexion..."
# TODO: show the channel number
#. TODO: show the channel number
-#: ../src/view/home/MeshBox.py:159
+#: ../src/view/home/MeshBox.py:166
msgid "Connected"
msgstr "Connecté"
-#. only temporarily
-#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:51
-#: ../src/view/devices/network/mesh.py:92
-#: ../src/view/devices/network/mesh.py:96
+#: ../src/view/home/MeshBox.py:218 ../src/view/devices/network/mesh.py:41
+#: ../src/view/devices/network/mesh.py:68
+#: ../src/view/devices/network/mesh.py:72
msgid "Mesh Network"
msgstr "Réseau maillé"
@@ -204,16 +188,18 @@ msgstr "Réseau maillé"
# priority over the normal wireless device. NM doesn't have a "disconnect"
# method for a device either (for various reasons) so this doesn't
# have a good mapping
-#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:160
-#: ../src/view/devices/network/mesh.py:125
+#: ../src/view/home/MeshBox.py:221 ../src/view/devices/network/wireless.py:125
+#: ../src/view/devices/network/mesh.py:89
msgid "Disconnect..."
msgstr "Déconnexion..."
-#: ../src/view/home/MeshBox.py:302 ../src/view/palettes.py:61
+#. TRANS: Action label for resuming an activity.
+#: ../src/view/home/MeshBox.py:309 ../src/view/palettes.py:61
+#: ../src/journal/journaltoolbox.py:399 ../src/journal/palettes.py:57
msgid "Resume"
msgstr "Reprendre"
-#: ../src/view/home/MeshBox.py:307 ../src/view/frame/activitiestray.py:205
+#: ../src/view/home/MeshBox.py:314 ../src/view/frame/activitiestray.py:206
msgid "Join"
msgstr "Rejoindre"
@@ -242,24 +228,19 @@ msgstr "Charge complète"
msgid "My Speakers"
msgstr "Haut-parleurs"
-#: ../src/view/devices/speaker.py:119
+#: ../src/view/devices/speaker.py:125
msgid "Unmute"
msgstr "Activer le son"
-#: ../src/view/devices/speaker.py:122
+#: ../src/view/devices/speaker.py:128
msgid "Mute"
msgstr "Mettre en sourdine"
-#: ../src/view/devices/network/wireless.py:37
-#, python-format
-msgid "IP address: %s"
-msgstr "Adresse IP : %s"
-
-#: ../src/view/devices/network/wireless.py:86
+#: ../src/view/devices/network/wireless.py:67
msgid "Disconnected"
msgstr "Déconnecté"
-#: ../src/view/devices/network/wireless.py:178
+#: ../src/view/devices/network/wireless.py:143
msgid "Channel"
msgstr "Canal"
@@ -298,7 +279,9 @@ msgstr "sugar-control-panel: key=%s n'est pas une option disponible"
msgid "sugar-control-panel: %s"
msgstr "sugar-control-panel: %s"
-#: ../src/controlpanel/cmd.py:33
+#. TRANS: Translators, there's a empty line at the end of this string,
+#. which must appear in the translated string (msgstr) as well.
+#: ../src/controlpanel/cmd.py:35
msgid ""
"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
" Control for the sugar environment. \n"
@@ -311,166 +294,121 @@ msgid ""
" -c key clear the current value for the key \n"
" "
msgstr ""
-"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
+"Usage: sugar-control-panel [ option ] clé [ args ... ] \n"
" Contrôle de l'environnement sugar. \n"
" Options: \n"
" -h afficher ce message d'aide et quitter \n"
" -l afficher la liste des options disponibles \n"
-" -h clef afficher les informations sur cette clé \n"
-" -g clef obtenir la valeur actuelle associée à cette clé \n"
-" -s clef définir la valeur actuelle de cette clé \n"
+" -h clé afficher les informations sur cette clé \n"
+" -g clé obtenir la valeur actuelle associée à cette clé \n"
+" -s clé définir la valeur actuelle de cette clé \n"
" "
-#: ../src/controlpanel/cmd.py:46
+#: ../src/controlpanel/cmd.py:48
msgid "To apply your changes you have to restart sugar.\n"
msgstr "Redémarrer sugar pour que les changements prennent effet.\n"
-#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:296
+#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:305
msgid "Ok"
msgstr "Ok"
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:268
+#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:265
msgid "Changes require restart"
msgstr "Relancer pour valider"
-#: ../src/controlpanel/gui.py:267
+#: ../src/controlpanel/gui.py:264
msgid "Warning"
msgstr "Attention"
-#: ../src/controlpanel/gui.py:271
+#: ../src/controlpanel/gui.py:268
msgid "Cancel changes"
msgstr "Abandonner"
-#: ../src/controlpanel/gui.py:280
+#: ../src/controlpanel/gui.py:277
msgid "Restart now"
msgstr "Maintenant"
-#: ../src/controlpanel/model/aboutme.py:44
+#: ../src/controlpanel/aboutme/model.py:44
msgid "You must enter a name."
msgstr "Vous devez indiquer un nom."
-#: ../src/controlpanel/model/aboutme.py:69
+#: ../src/controlpanel/aboutme/model.py:69
#, python-format
msgid "stroke: color=%s hue=%s"
msgstr "stroke: color=%s hue=%s"
-#: ../src/controlpanel/model/aboutme.py:72
+#: ../src/controlpanel/aboutme/model.py:72
#, python-format
msgid "stroke: %s"
msgstr "stroke: %s"
-#: ../src/controlpanel/model/aboutme.py:74
+#: ../src/controlpanel/aboutme/model.py:74
#, python-format
msgid "fill: color=%s hue=%s"
msgstr "fill: color=%s hue=%s"
-#: ../src/controlpanel/model/aboutme.py:76
+#: ../src/controlpanel/aboutme/model.py:76
#, python-format
msgid "fill: %s"
msgstr "fill: %s"
-#: ../src/controlpanel/model/aboutme.py:87
+#: ../src/controlpanel/aboutme/model.py:87
msgid "Error in specified color modifiers."
msgstr "Erreur dans les modificateurs de couleur spécifiés."
-#: ../src/controlpanel/model/aboutme.py:90
+#: ../src/controlpanel/aboutme/model.py:90
msgid "Error in specified colors."
msgstr "Erreur dans les couleurs spécifiées."
-#: ../src/controlpanel/model/aboutxo.py:24
-msgid "Not available"
-msgstr "Non disponible"
-
-#: ../src/controlpanel/model/datetime.py:85
-msgid "Error timezone does not exist."
-msgstr "Erreur : la zone temporelle n'existe pas."
-
-#: ../src/controlpanel/model/frame.py:38 ../src/controlpanel/model/frame.py:60
-msgid "Value must be an integer."
-msgstr "La valeur doit être un entier."
-
-#: ../src/controlpanel/model/language.py:28
-msgid "Could not access ~/.i18n. Create standard settings."
-msgstr "Accès impossible à ~/.i18n. Création de paramètres par défaut."
-
-#: ../src/controlpanel/model/language.py:110
-#, python-format
-msgid "Language for code=%s could not be determined."
-msgstr "La langue associée au code = %s n'a pas pu être déterminée."
-
-#: ../src/controlpanel/model/language.py:127
-#, python-format
-msgid "Sorry I do not speak '%s'."
-msgstr "Désolé je ne parle pas '%s'."
-
-#: ../src/controlpanel/model/network.py:48
-msgid "You must enter a server."
-msgstr "Vous devez indiquer un serveur."
-
-#: ../src/controlpanel/model/network.py:63
-msgid "State is unknown."
-msgstr "État inconnu."
-
-#: ../src/controlpanel/model/network.py:83
-msgid "Error in specified radio argument use on/off."
-msgstr "Argument 'radio' spécifié incorrect. Utiliser marche/arrêt."
-
-#: ../src/controlpanel/model/power.py:57
-msgid "Error in automatic pm argument, use on/off."
-msgstr "Erreur dans l'argument gestion de l'alimentation automatique"
-
-#: ../src/controlpanel/model/power.py:86
-msgid "Error in extreme pm argument, use on/off."
-msgstr "Erreur dans l'argument gestion de l'alimentation extrême"
-
-#: ../src/controlpanel/view/aboutme.py:32
+#: ../src/controlpanel/aboutme/view.py:32
+#: ../src/controlpanel/aboutme/__init__.py:22
msgid "About Me"
msgstr "Moi"
-#: ../src/controlpanel/view/aboutme.py:134
+#: ../src/controlpanel/aboutme/view.py:134
msgid "Click to change your color:"
msgstr "Cliquer pour changer de couleur :"
-#: ../src/controlpanel/view/aboutxo.py:28
-msgid "About my XO"
-msgstr "Mon XO"
+#: ../src/controlpanel/aboutxo/model.py:24
+msgid "Not available"
+msgstr "Non disponible"
-#: ../src/controlpanel/view/aboutxo.py:59
+#: ../src/controlpanel/aboutxo/view.py:55
msgid "Identity"
msgstr "Identité"
-#: ../src/controlpanel/view/aboutxo.py:68
+#: ../src/controlpanel/aboutxo/view.py:64
msgid "Serial Number:"
msgstr "Numéro de série :"
-#: ../src/controlpanel/view/aboutxo.py:91
+#: ../src/controlpanel/aboutxo/view.py:87
msgid "Software"
msgstr "Logiciel"
-#: ../src/controlpanel/view/aboutxo.py:100
+#: ../src/controlpanel/aboutxo/view.py:96
msgid "Build:"
msgstr "Version :"
-#: ../src/controlpanel/view/aboutxo.py:115
+#: ../src/controlpanel/aboutxo/view.py:111
msgid "Sugar:"
msgstr "Sugar :"
-#: ../src/controlpanel/view/aboutxo.py:130
+#: ../src/controlpanel/aboutxo/view.py:126
msgid "Firmware:"
msgstr "Micrologiciel :"
-#: ../src/controlpanel/view/aboutxo.py:152
+#: ../src/controlpanel/aboutxo/view.py:148
msgid "Copyright and License"
msgstr "Copyright et licence"
-#: ../src/controlpanel/view/aboutxo.py:160
+#: ../src/controlpanel/aboutxo/view.py:156
msgid ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
msgstr ""
"© 2008 One Laptop per Child Association Inc ; Red Hat Inc ; et "
"contributeurs."
-#: ../src/controlpanel/view/aboutxo.py:166
+#: ../src/controlpanel/aboutxo/view.py:163
msgid ""
"Sugar is the graphical user interface that you are looking at. Sugar is free "
"software, covered by the GNU General Public License, and you are welcome to "
@@ -482,153 +420,237 @@ msgstr ""
"License). Vous êtes autorisé à le modifier et/ou à en distribuer des copies "
"aux conditions spécifiées."
-#: ../src/controlpanel/view/aboutxo.py:178
+#: ../src/controlpanel/aboutxo/view.py:175
msgid "Full license:"
msgstr "Licence complète :"
-#: ../src/controlpanel/view/datetime.py:29
-msgid "Date & Time"
-msgstr "Date & heure"
+#: ../src/controlpanel/aboutxo/__init__.py:21
+msgid "About my XO"
+msgstr "Mon XO"
-#: ../src/controlpanel/view/datetime.py:72
+#: ../src/controlpanel/datetime/model.py:89
+msgid "Error timezone does not exist."
+msgstr "Erreur : la zone temporelle n'existe pas."
+
+#: ../src/controlpanel/datetime/view.py:68
msgid "Timezone"
msgstr "Fuseau horaire"
-#: ../src/controlpanel/view/frame.py:28
-msgid "Frame"
-msgstr "Cadre"
+#: ../src/controlpanel/datetime/__init__.py:21
+msgid "Date & Time"
+msgstr "Date & heure"
+
+#: ../src/controlpanel/frame/model.py:38 ../src/controlpanel/frame/model.py:60
+msgid "Value must be an integer."
+msgstr "La valeur doit être un entier."
-#: ../src/controlpanel/view/frame.py:30
+#: ../src/controlpanel/frame/view.py:26
msgid "never"
msgstr "jamais"
-#: ../src/controlpanel/view/frame.py:31
+#: ../src/controlpanel/frame/view.py:27
msgid "instantaneous"
msgstr "immédiat"
-#: ../src/controlpanel/view/frame.py:32
+#: ../src/controlpanel/frame/view.py:28
#, python-format
msgid "%s seconds"
msgstr "%s secondes"
-#: ../src/controlpanel/view/frame.py:56
+#: ../src/controlpanel/frame/view.py:52
msgid "Activation Delay"
msgstr "Délai d'activation"
-#: ../src/controlpanel/view/frame.py:80
+#: ../src/controlpanel/frame/view.py:76
msgid "Corner"
msgstr "Coin"
-#: ../src/controlpanel/view/frame.py:115
+#: ../src/controlpanel/frame/view.py:111
msgid "Edge"
msgstr "Bord"
-#: ../src/controlpanel/view/language.py:29
-#: ../src/controlpanel/view/language.py:74
+#: ../src/controlpanel/frame/__init__.py:21
+msgid "Frame"
+msgstr "Cadre"
+
+#: ../src/controlpanel/language/model.py:28
+msgid "Could not access ~/.i18n. Create standard settings."
+msgstr "Accès impossible à ~/.i18n. Création de paramètres par défaut."
+
+#: ../src/controlpanel/language/model.py:114
+#, python-format
+msgid "Language for code=%s could not be determined."
+msgstr "La langue associée au code = %s n'a pas pu être déterminée."
+
+#: ../src/controlpanel/language/model.py:131
+#, python-format
+msgid "Sorry I do not speak '%s'."
+msgstr "Désolé je ne parle pas '%s'."
+
+#: ../src/controlpanel/language/view.py:70
+#: ../src/controlpanel/language/__init__.py:21
msgid "Language"
msgstr "Langue"
-#: ../src/controlpanel/view/network.py:28
+#: ../src/controlpanel/network/model.py:62
+msgid "State is unknown."
+msgstr "État inconnu."
+
+#: ../src/controlpanel/network/model.py:82
+msgid "Error in specified radio argument use on/off."
+msgstr "Argument 'radio' spécifié incorrect. Utiliser marche/arrêt."
+
+#: ../src/controlpanel/network/view.py:28
+#: ../src/controlpanel/network/__init__.py:21
msgid "Network"
msgstr "Réseau"
-#: ../src/controlpanel/view/network.py:53
+#: ../src/controlpanel/network/view.py:54
msgid "Wireless"
msgstr "Réseau sans fil"
-#: ../src/controlpanel/view/network.py:61
-msgid "Radio:"
-msgstr "Radio :"
+#: ../src/controlpanel/network/view.py:62
+msgid "Turn of the wireless radio to save battery life"
+msgstr "Désactiver la radio sans fil pour prolonger la batterie"
+
+#: ../src/controlpanel/network/view.py:75
+msgid "Radio"
+msgstr "Radio"
+
+#: ../src/controlpanel/network/view.py:91
+msgid "Discard network history if you have trouble connecting to the network"
+msgstr ""
+"Ignorer l'historique du réseau si vous avez du mal à vous connecter au "
+"réseau"
-#: ../src/controlpanel/view/network.py:94
+#: ../src/controlpanel/network/view.py:100
+msgid "Discard network history"
+msgstr "Ignorer l'historique du réseau"
+
+#: ../src/controlpanel/network/view.py:113
msgid "Mesh"
msgstr "Réseau maillé"
-#: ../src/controlpanel/view/network.py:103
+#: ../src/controlpanel/network/view.py:122
msgid "Server:"
msgstr "Serveur :"
-#: ../src/controlpanel/view/power.py:27
-msgid "Power"
-msgstr "Alimentation"
+#: ../src/controlpanel/power/model.py:55
+msgid "Error in automatic pm argument, use on/off."
+msgstr "Erreur dans l'argument gestion de l'alimentation automatique"
+
+#: ../src/controlpanel/power/model.py:84
+msgid "Error in extreme pm argument, use on/off."
+msgstr "Erreur dans l'argument gestion de l'alimentation extrême"
-#: ../src/controlpanel/view/power.py:51
+#: ../src/controlpanel/power/view.py:47
msgid "Power management"
msgstr "Gestion de l'alimentation"
-#: ../src/controlpanel/view/power.py:61
+#: ../src/controlpanel/power/view.py:57
msgid "Automatic power management (increases battery life)"
msgstr "Gestion automatique de l'alimentation (prolonge la batterie)"
-#: ../src/controlpanel/view/power.py:89
+#: ../src/controlpanel/power/view.py:85
msgid ""
-"Extreme power management (disables wireless radio, increases battery life)"
+"Extreme power management (disableswireless radio, increases battery life)"
msgstr ""
"Gestion extrême de l'alimentation (désactive la radio sans fil, prolonge la "
-"batterie)"
+"durée de vie de la batterie)"
+
+#: ../src/controlpanel/power/__init__.py:21
+msgid "Power"
+msgstr "Alimentation"
-#: ../src/view/devices/network/mesh.py:154
+#: ../src/view/devices/network/mesh.py:111
msgid "Connected to a School Mesh Portal"
msgstr "Connecté au portail du réseau maillé d'école"
-#: ../src/view/devices/network/mesh.py:156
+#: ../src/view/devices/network/mesh.py:113
msgid "Looking for a School Mesh Portal..."
msgstr "Recherche un portail de réseau maillé d'école..."
-#: ../src/view/devices/network/mesh.py:159
+#: ../src/view/devices/network/mesh.py:116
msgid "Connected to an XO Mesh Portal"
msgstr "Connecté au portail de réseau maillé de XO"
-#: ../src/view/devices/network/mesh.py:161
+#: ../src/view/devices/network/mesh.py:118
msgid "Looking for an XO Mesh Portal..."
msgstr "Recherche un portail de réseau maillé de XO..."
-#: ../src/view/devices/network/mesh.py:164
+#: ../src/view/devices/network/mesh.py:121
msgid "Connected to a Simple Mesh"
msgstr "Connecté à un réseau maillé simple"
-#: ../src/view/devices/network/mesh.py:166
+#: ../src/view/devices/network/mesh.py:123
msgid "Starting a Simple Mesh"
msgstr "Démarre un réseau maillé simple"
-#: ../src/view/devices/network/mesh.py:173
+#: ../src/view/devices/network/mesh.py:130
msgid "Unknown Mesh"
msgstr "Réseau maillé inconnu"
-#: ../src/view/frame/activitiestray.py:210
+#: ../src/view/frame/activitiestray.py:211
msgid "Decline"
msgstr "Refuser"
-#: ../src/view/home/favoritesview.py:287
+# TRANS: label for the freeform layout in the favorites view
+#. TRANS: label for the freeform layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:107
+msgid "Freeform"
+msgstr "Libre"
+
+# TRANS: label for the ring layout in the favorites view
+#. TRANS: label for the ring layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:189
+msgid "Ring"
+msgstr "Concentrique"
+
+#. TRANS: label for the spiral layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:334
+msgid "Spiral"
+msgstr "Spirale"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:401
+msgid "Box"
+msgstr "Boîte"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:442
+msgid "Triangle"
+msgstr "Triangle"
+
+#: ../src/view/home/favoritesview.py:295
msgid "Registration Failed"
msgstr "Echec de l'enregistrement"
-#: ../src/view/home/favoritesview.py:288
+#: ../src/view/home/favoritesview.py:296
#, python-format
msgid "%s"
msgstr "%s"
-#: ../src/view/home/favoritesview.py:290
+#: ../src/view/home/favoritesview.py:298
msgid "Registration Successful"
msgstr "Enregistrement réussi"
-#: ../src/view/home/favoritesview.py:291
+#: ../src/view/home/favoritesview.py:299
msgid "You are now registered with your school server."
msgstr "Vous êtes maintenant enregistré sur le serveur de l'école"
-#: ../src/view/home/favoritesview.py:407
-msgid "Control Panel"
-msgstr "Panneau de contrôle"
+#: ../src/view/home/favoritesview.py:420
+msgid "Settings"
+msgstr "Configuration"
-#: ../src/view/home/favoritesview.py:418
+#: ../src/view/home/favoritesview.py:425
msgid "Restart"
msgstr "Redémarrer"
-#: ../src/view/home/favoritesview.py:423
+#: ../src/view/home/favoritesview.py:430
msgid "Shutdown"
msgstr "Éteindre"
-#: ../src/view/home/favoritesview.py:429
+#: ../src/view/home/favoritesview.py:436
msgid "Register"
msgstr "S'enregistrer"
@@ -640,33 +662,161 @@ msgstr "Démarrage..."
msgid "Stop"
msgstr "Arrêter"
-#: ../src/view/palettes.py:104
+#. TRANS: Action label for starting an entry.
+#: ../src/view/palettes.py:104 ../src/journal/journaltoolbox.py:402
+#: ../src/journal/palettes.py:59
msgid "Start"
msgstr "Lancer"
-#: ../src/view/palettes.py:132
+#: ../src/view/palettes.py:138
msgid "Remove favorite"
msgstr "Retirer le favori"
-#: ../src/view/palettes.py:136
+#: ../src/view/palettes.py:142
msgid "Make favorite"
msgstr "Ajouter aux favoris"
-#: ../src/view/palettes.py:185
+#: ../src/view/palettes.py:191
msgid "Show contents"
msgstr "Afficher les contenus"
-#: ../src/view/palettes.py:209
+#: ../src/view/palettes.py:215
#, python-format
msgid "%(free_space)d MB Free"
msgstr "%(free_space)d Mo de libre"
+#: ../src/journal/journaltoolbox.py:62
+msgid "Search"
+msgstr "Rechercher"
+
+#: ../src/journal/journaltoolbox.py:119
+msgid "Anytime"
+msgstr "N'importe quand"
+
+#: ../src/journal/journaltoolbox.py:121
+msgid "Today"
+msgstr "Aujourd'hui"
+
+#: ../src/journal/journaltoolbox.py:123
+msgid "Since yesterday"
+msgstr "Depuis hier"
+
+#. TRANS: Filter entries modified during the last 7 days.
+#: ../src/journal/journaltoolbox.py:125
+msgid "Past week"
+msgstr "Depuis une semaine"
+
+#. TRANS: Filter entries modified during the last 30 days.
+#: ../src/journal/journaltoolbox.py:127
+msgid "Past month"
+msgstr "Depuis un mois"
+
+#. TRANS: Filter entries modified during the last 356 days.
+#: ../src/journal/journaltoolbox.py:129
+msgid "Past year"
+msgstr "Depuis une année"
+
+#: ../src/journal/journaltoolbox.py:136
+msgid "Anyone"
+msgstr "Tout le monde"
+
+#: ../src/journal/journaltoolbox.py:138
+msgid "My friends"
+msgstr "Mes amis"
+
+#: ../src/journal/journaltoolbox.py:139
+msgid "My class"
+msgstr "Ma classe"
+
+#. TRANS: Item in a combo box that filters by entry type.
+#: ../src/journal/journaltoolbox.py:255
+msgid "Anything"
+msgstr "Tout"
+
+#. TODO: Add "Start with" menu item
+#: ../src/journal/journaltoolbox.py:325 ../src/journal/palettes.py:67
+msgid "Copy"
+msgstr "Copier"
+
+#: ../src/journal/collapsedentry.py:248 ../src/journal/expandedentry.py:176
+#: ../src/journal/palettes.py:51
+msgid "Untitled"
+msgstr "Sans titre"
+
+#: ../src/journal/journalactivity.py:119 ../src/journal/volumesmanager.py:57
+msgid "Journal"
+msgstr "Log"
+
+#: ../src/journal/expandedentry.py:222
+msgid "No preview"
+msgstr "Pas de prévisualisation"
+
+#: ../src/journal/expandedentry.py:241
+msgid "Participants:"
+msgstr "Participants :"
+
+#: ../src/journal/expandedentry.py:266
+msgid "Description:"
+msgstr "Description :"
+
+#: ../src/journal/expandedentry.py:292
+msgid "Tags:"
+msgstr "Étiquettes :"
+
+#: ../src/journal/objectchooser.py:134
+msgid "Choose an object"
+msgstr "Choisir un objet"
+
+#: ../src/journal/objectchooser.py:139
+msgid "Close"
+msgstr "Fermer"
+
+#: ../src/journal/volumestoolbar.py:93
+msgid "Unmount"
+msgstr "Démonter"
+
+#: ../src/journal/misc.py:95
+msgid "No date"
+msgstr "Sans date"
+
+#: ../src/journal/listview.py:39
+msgid "Your Journal is empty"
+msgstr "Le journal est vide"
+
+#: ../src/journal/listview.py:40
+msgid "No matching entries "
+msgstr "Aucune entrée correspondante"
+
+#: ../src/journal/modalalert.py:59
+msgid "Your Journal is full"
+msgstr "Votre journal est plein"
+
+#: ../src/journal/modalalert.py:63
+msgid "Please delete some old Journal entries to make space for new ones."
+msgstr ""
+"Effacer des entrées anciennes du Journal pour libérer de la place pour les "
+"nouvelles entrées."
+
+#: ../src/journal/modalalert.py:75
+msgid "Show Journal"
+msgstr "Montre le Journal"
+
+#, python-format
+#~ msgid "Clipboard object: %s."
+#~ msgstr "Objet dans le presse-papier : %s."
+
+#~ msgid "You must enter a server."
+#~ msgstr "Vous devez indiquer un serveur."
+
+#~ msgid "Control Panel"
+#~ msgstr "Panneau de contrôle"
+
#~ msgid "© 2008 One Laptop per Child Assocation "
#~ msgstr "© 2008 One Laptop per Child Assocation "
#, fuzzy
#~ msgid "Sugar is the graphical user interface that "
-#~ msgstr "Sugar est l'interface utiliateur graphique que"
+#~ msgstr "Sugar est l'interface utilisateur graphique que"
#~ msgid "<Ctrl>R"
#~ msgstr "<Ctrl>R"
@@ -771,9 +921,6 @@ msgstr "%(free_space)d Mo de libre"
#~ msgid "Share"
#~ msgstr "Partager"
-#~ msgid "Close"
-#~ msgstr "Fermer"
-
#, python-format
#~ msgid "%s Activity"
#~ msgstr "Activité %s"
@@ -793,9 +940,6 @@ msgstr "%(free_space)d Mo de libre"
#~ msgid "Redo"
#~ msgstr "Répéter"
-#~ msgid "Copy"
-#~ msgstr "Copier"
-
#~ msgid "Paste"
#~ msgstr "Coller"
diff --git a/po/ht.po b/po/ht.po
index e3d2500..86a54e2 100644
--- a/po/ht.po
+++ b/po/ht.po
@@ -6,9 +6,9 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-08-19 17:12-0400\n"
-"PO-Revision-Date: 2008-08-18 16:47-0400\n"
-"Last-Translator: lacrete <le_teaseur@hotmail.com>\n"
+"POT-Creation-Date: 2008-06-21 00:30-0400\n"
+"PO-Revision-Date: 2008-03-12 09:14-0400\n"
+"Last-Translator: Jude Augusma <jayme2901@yahoo.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,36 +17,36 @@ msgstr ""
#: ../src/intro/intro.py:65 ../src/controlpanel/view/aboutme.py:100
msgid "Name:"
-msgstr "Non:"
+msgstr "Non"
-#: ../src/intro/intro.py:97
+#: ../src/intro/intro.py:94
msgid "Click to change color:"
-msgstr "Klike pou chanje koulè:"
+msgstr "Klike pou chanje koulè"
-#: ../src/intro/intro.py:148
+#: ../src/intro/intro.py:145
msgid "Back"
msgstr "Retounen"
-#: ../src/intro/intro.py:162 ../src/controlpanel/toolbar.py:61
+#: ../src/intro/intro.py:159 ../src/controlpanel/toolbar.py:61
msgid "Done"
msgstr "Fini"
-#: ../src/intro/intro.py:165
+#: ../src/intro/intro.py:162
msgid "Next"
-msgstr "Pwochen"
+msgstr "Prochen"
#: ../src/view/BuddyMenu.py:58
msgid "Remove friend"
-msgstr "Retire zanmi "
+msgstr "Retire zanmi"
#: ../src/view/BuddyMenu.py:61
msgid "Make friend"
-msgstr "Fè zanmi "
+msgstr "Fè zanmi"
#: ../src/view/BuddyMenu.py:91
#, python-format
msgid "Invite to %s"
-msgstr "Envite nan %s"
+msgstr "Envite sou %s"
#: ../src/view/clipboardmenu.py:48
msgid "Remove"
@@ -54,119 +54,73 @@ msgstr "Retire"
#: ../src/view/clipboardmenu.py:53 ../src/view/clipboardmenu.py:79
msgid "Open"
-msgstr "Ouvri"
+msgstr "Louvri"
#. self._stop_item = MenuItem(_('Stop download'), 'stock-close')
#. TODO: Implement stopping downloads
#. self._stop_item.connect('activate', self._stop_item_activate_cb)
#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:87
+#: ../src/view/clipboardmenu.py:63
msgid "Keep"
-msgstr "Kenbe"
+msgstr ""
#: ../src/view/clipboardmenu.py:84
msgid "Open with"
-msgstr "Ouvri ak"
+msgstr ""
-#: ../src/view/clipboardmenu.py:216
+#: ../src/view/clipboardmenu.py:212
#, python-format
msgid "Clipboard object: %s."
msgstr "Objè ekritwa: %s."
#: ../src/hardware/keydialog.py:150
msgid "Key Type:"
-msgstr "kalite kle:"
+msgstr "Tip kle:"
#: ../src/hardware/keydialog.py:170
msgid "Authentication Type:"
-msgstr "Kalite otantifikasyon:"
+msgstr "Tip otantifikasyon:"
#: ../src/hardware/keydialog.py:251
msgid "Encryption Type:"
-msgstr "Kalite kod sekrè"
-
-#: ../src/hardware/schoolserver.py:17
-msgid "Cannot obtain data needed for registration."
-msgstr ""
-
-#: ../src/hardware/schoolserver.py:31
-msgid "Cannot connect to the server."
-msgstr ""
+msgstr "Tip kod sekrè"
-#: ../src/hardware/schoolserver.py:36
-msgid "The server could not complete the request."
-msgstr ""
-
-#: ../src/view/Shell.py:240
+#: ../src/view/Shell.py:262
msgid "Screenshot"
msgstr "Ekran projektwa"
-#: ../src/view/home/HomeBox.py:81
-msgid "Confirm erase"
-msgstr "Konfime sa ou efase a"
-
-#: ../src/view/home/HomeBox.py:83
-#, python-format
-msgid "Confirm erase: Do you want to permanently erase %s?"
-msgstr "Konfime sa ou efase a: ou vle retire'l net %s?"
-
-#: ../src/view/home/HomeBox.py:90 ../src/view/palettes.py:120
-msgid "Erase"
-msgstr "Efase"
-
-#: ../src/view/home/HomeBox.py:120
-msgid "Software Update"
-msgstr ""
-
-#: ../src/view/home/HomeBox.py:121
-msgid "Update your activities to ensure compatibility with your new software"
+#: ../src/view/home/HomeBox.py:147
+msgid "List view"
msgstr ""
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/toolbar.py:115
-msgid "Cancel"
-msgstr "Anile"
-
-#: ../src/view/home/HomeBox.py:127 ../src/controlpanel/gui.py:275
-msgid "Later"
-msgstr "Pi ta"
-
-#: ../src/view/home/HomeBox.py:130
-msgid "Check now"
+#: ../src/view/home/HomeBox.py:148
+msgid "<Ctrl>L"
msgstr ""
-#: ../src/view/home/HomeBox.py:266
-msgid "List view"
-msgstr "Gade lis"
-
-#: ../src/view/home/HomeBox.py:267
-msgid "<Ctrl>2"
-msgstr "<Ctrl>2"
-
-#: ../src/view/home/HomeBox.py:325
+#: ../src/view/home/HomeBox.py:204
msgid "Favorites view"
-msgstr "Fas prefere"
+msgstr ""
-#: ../src/view/home/HomeBox.py:326
-msgid "<Ctrl>1"
-msgstr "<Ctrl>1"
+#: ../src/view/home/HomeBox.py:205
+msgid "<Ctrl>R"
+msgstr ""
-# TRANS: label for the freeform layout in the favorites view
#. TRANS: label for the freeform layout in the favorites view
-#: ../src/view/home/HomeBox.py:334
+#: ../src/view/home/HomeBox.py:211
msgid "Freeform"
-msgstr "Fòm lib"
+msgstr ""
-# TRANS: label for the ring layout in the favorites view
#. TRANS: label for the ring layout in the favorites view
-#: ../src/view/home/HomeBox.py:341
+#: ../src/view/home/HomeBox.py:218
msgid "Ring"
-msgstr "Zanno"
+msgstr ""
#: ../src/view/home/MeshBox.py:97
msgid "Connect"
-msgstr "Konekte"
+msgstr ""
#: ../src/view/home/MeshBox.py:106
+#, fuzzy
msgid "Disconnect"
msgstr "Dekonekte"
@@ -175,99 +129,101 @@ msgstr "Dekonekte"
# method for a device either (for various reasons) so this doesn't
# have a good mapping
#: ../src/view/home/MeshBox.py:118
+#, fuzzy
msgid "Disconnecting..."
-msgstr "An dekoneksyon..."
+msgstr "Dekonekte..."
# Only show disconnect when there's a mesh device, because mesh takes
# priority over the normal wireless device. NM doesn't have a "disconnect"
# method for a device either (for various reasons) so this doesn't
# have a good mapping
#: ../src/view/home/MeshBox.py:152
+#, fuzzy
msgid "Connecting..."
-msgstr "An koneksyon..."
+msgstr "Dekonekte..."
#. TODO: show the channel number
#: ../src/view/home/MeshBox.py:159
msgid "Connected"
-msgstr "Konekte"
+msgstr ""
-#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:41
-#: ../src/view/devices/network/mesh.py:68
-#: ../src/view/devices/network/mesh.py:72
+#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:38
+#: ../src/view/devices/network/mesh.py:65
+#: ../src/view/devices/network/mesh.py:69
msgid "Mesh Network"
-msgstr "Rezo maye"
+msgstr "Rezo "
# Only show disconnect when there's a mesh device, because mesh takes
# priority over the normal wireless device. NM doesn't have a "disconnect"
# method for a device either (for various reasons) so this doesn't
# have a good mapping
-#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:119
-#: ../src/view/devices/network/mesh.py:89
+#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:116
+#: ../src/view/devices/network/mesh.py:86
msgid "Disconnect..."
msgstr "Dekonekte..."
-#: ../src/view/home/MeshBox.py:302 ../src/view/palettes.py:61
+#: ../src/view/home/MeshBox.py:302 ../src/view/palettes.py:60
msgid "Resume"
msgstr "Repwann"
-#: ../src/view/home/MeshBox.py:307 ../src/view/frame/activitiestray.py:205
+#: ../src/view/home/MeshBox.py:307 ../src/view/frame/activitiestray.py:219
msgid "Join"
-msgstr "Rejwen'n"
+msgstr "Rankontre"
-#: ../src/view/devices/battery.py:45
+#: ../src/view/devices/battery.py:42
msgid "My Battery"
-msgstr "Batri-m"
+msgstr ""
-#: ../src/view/devices/battery.py:114
+#: ../src/view/devices/battery.py:111
msgid "Charging"
-msgstr "Ap chaje"
+msgstr ""
-#: ../src/view/devices/battery.py:117
+#: ../src/view/devices/battery.py:114
msgid "Very little power remaining"
-msgstr "Yon ti kras chaj ki rete"
+msgstr ""
-#: ../src/view/devices/battery.py:123
+#: ../src/view/devices/battery.py:120
#, python-format
msgid "%(hour)d:%(min).2d remaining"
-msgstr "%(hour)d:%(min).2d ki rete"
+msgstr ""
-#: ../src/view/devices/battery.py:127
+#: ../src/view/devices/battery.py:124
msgid "Charged"
-msgstr "Fin chaje"
+msgstr ""
-#: ../src/view/devices/speaker.py:44
+#: ../src/view/devices/speaker.py:40
msgid "My Speakers"
-msgstr "Opalè m' yo"
+msgstr ""
-#: ../src/view/devices/speaker.py:119
+#: ../src/view/devices/speaker.py:104
msgid "Unmute"
-msgstr "Aktive son an"
+msgstr ""
-#: ../src/view/devices/speaker.py:122
+#: ../src/view/devices/speaker.py:107
msgid "Mute"
-msgstr "Dezaktive son an"
+msgstr ""
-#: ../src/view/devices/network/wireless.py:67
+#: ../src/view/devices/network/wireless.py:64
msgid "Disconnected"
msgstr "Dekonekte"
-#: ../src/view/devices/network/wireless.py:137
+#: ../src/view/devices/network/wireless.py:134
msgid "Channel"
msgstr "Chanèl"
-#: ../src/view/frame/zoomtoolbar.py:37
+#: ../src/view/frame/zoomtoolbar.py:34
msgid "Neighborhood"
msgstr "Vwazinaj"
-#: ../src/view/frame/zoomtoolbar.py:39
+#: ../src/view/frame/zoomtoolbar.py:36
msgid "Group"
msgstr "Gwoup"
-#: ../src/view/frame/zoomtoolbar.py:41
+#: ../src/view/frame/zoomtoolbar.py:38
msgid "Home"
msgstr "Lakay"
-#: ../src/view/frame/zoomtoolbar.py:43
+#: ../src/view/frame/zoomtoolbar.py:40
msgid "Activity"
msgstr "Aktivite"
@@ -277,8 +233,6 @@ msgid ""
"sugar-control-panel: WARNING, found more than one option with the same name: "
"%s module: %r"
msgstr ""
-"Sugar-control-panel: Atansyon, yo jwenn plizyè opsyon ak yon menm non: %s "
-"modil: %r"
#: ../src/controlpanel/cmd.py:28
#, python-format
@@ -291,7 +245,6 @@ msgid "sugar-control-panel: %s"
msgstr "Sugar-kontwòl-panèl: %s"
#: ../src/controlpanel/cmd.py:33
-#, fuzzy
msgid ""
"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
" Control for the sugar environment. \n"
@@ -301,74 +254,81 @@ msgid ""
" -h key show information about this key \n"
" -g key get the current value of the key \n"
" -s key set the current value for the key \n"
-" -c key clear the current value for the key \n"
" "
msgstr ""
"Sèvi: Sugar-Kontwòl-panèl [opsyon] kle [args ... ]\n"
-"\tKontwòl pou anvironman sugar. \n"
-"\topsyon: \n"
-"\t-h\tmontre mesaj èd sa epi soti \n"
-"\t-l\tfè lis tout opsyon disponib yo \n"
-"\t-h kle\tmontre enfòmasyon sou kle sa \n"
-"\t-g kle\tpwan valè kouran kle-a \n"
-"\t-s kle\tfikse valè Kouran pou kle-a \n"
-"\t"
-
-#: ../src/controlpanel/cmd.py:46
+" Kontwòl pou anvironman sugar. \n"
+" opsyon: \n"
+" -h montre mesaj èd sa epi soti \n"
+" -l fè lis tout opsyon disponib yo \n"
+" -h kle montre enfòmasyon sou kle sa \n"
+" -g kle pwan valè kouran kle-a \n"
+" -s kle fikse valè Kouran pou kle-a \n"
+" "
+
+#: ../src/controlpanel/cmd.py:45
msgid "To apply your changes you have to restart sugar.\n"
msgstr "Pou aplike chanjman ou yo ou bezwen reyinisyalize program nan.\n"
-#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:296
+#: ../src/controlpanel/toolbar.py:115
+msgid "Cancel"
+msgstr ""
+
+#: ../src/controlpanel/toolbar.py:121
msgid "Ok"
-msgstr "Ok"
+msgstr ""
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:267
+#: ../src/controlpanel/sectionview.py:34 ../src/controlpanel/gui.py:250
msgid "Changes require restart"
-msgstr "Redemare pou aplike chanjman yo"
+msgstr ""
-#: ../src/controlpanel/gui.py:266
+#: ../src/controlpanel/gui.py:249
msgid "Warning"
-msgstr "Avètisman"
+msgstr ""
-#: ../src/controlpanel/gui.py:270
+#: ../src/controlpanel/gui.py:253
msgid "Cancel changes"
-msgstr "Anile chanjman yo"
+msgstr ""
+
+#: ../src/controlpanel/gui.py:257
+msgid "Later"
+msgstr ""
-#: ../src/controlpanel/gui.py:279
+#: ../src/controlpanel/gui.py:261
msgid "Restart now"
-msgstr "Redemare kounye a menm"
+msgstr ""
#: ../src/controlpanel/model/aboutme.py:44
msgid "You must enter a name."
-msgstr "Ou dwe rantre yon non."
+msgstr ""
-#: ../src/controlpanel/model/aboutme.py:69
+#: ../src/controlpanel/model/aboutme.py:67
#, python-format
msgid "stroke: color=%s hue=%s"
-msgstr "stroke:_ koulè=%s hue=%s"
+msgstr ""
-#: ../src/controlpanel/model/aboutme.py:72
+#: ../src/controlpanel/model/aboutme.py:70
#, python-format
msgid "stroke: %s"
-msgstr "stroke:_ %s"
+msgstr ""
-#: ../src/controlpanel/model/aboutme.py:74
+#: ../src/controlpanel/model/aboutme.py:72
#, python-format
msgid "fill: color=%s hue=%s"
-msgstr "fill:_ koulè=%s hue=%s"
+msgstr ""
-#: ../src/controlpanel/model/aboutme.py:76
+#: ../src/controlpanel/model/aboutme.py:74
#, python-format
msgid "fill: %s"
-msgstr "fill: _ %s"
+msgstr ""
-#: ../src/controlpanel/model/aboutme.py:87
+#: ../src/controlpanel/model/aboutme.py:85
msgid "Error in specified color modifiers."
-msgstr "Erè nan modifikatè koulè espesifye yo"
+msgstr "Erè nan modifikatè endike koulè yo"
-#: ../src/controlpanel/model/aboutme.py:90
+#: ../src/controlpanel/model/aboutme.py:88
msgid "Error in specified colors."
-msgstr "Erè nan koulè espesifye yo"
+msgstr "Erè nan koulè endike yo"
#: ../src/controlpanel/model/aboutxo.py:24
msgid "Not available"
@@ -380,11 +340,12 @@ msgstr "Erè lè lokal pa egziste."
#: ../src/controlpanel/model/frame.py:38 ../src/controlpanel/model/frame.py:60
msgid "Value must be an integer."
-msgstr "Valè-a dwe yon antye."
+msgstr ""
#: ../src/controlpanel/model/language.py:28
+#, fuzzy
msgid "Could not access ~/.i18n. Create standard settings."
-msgstr "Aksè enposib ~/.i18n. Kreye paramèt pa defo yo"
+msgstr "Pa ka rantre %s. Kreye reglaj estanda"
#: ../src/controlpanel/model/language.py:104
#, python-format
@@ -394,11 +355,11 @@ msgstr "Lang pou kod=%s pa ka tèmine."
#: ../src/controlpanel/model/language.py:121
#, python-format
msgid "Sorry I do not speak '%s'."
-msgstr "Dezole mwen pa pale '%s'."
+msgstr "Mwen regrèt mwen pa pale '%s'."
#: ../src/controlpanel/model/network.py:48
msgid "You must enter a server."
-msgstr "Ou dwe endike yon sèvè."
+msgstr ""
#: ../src/controlpanel/model/network.py:63
msgid "State is unknown."
@@ -406,224 +367,179 @@ msgstr "Yo pa konnen eta l'"
#: ../src/controlpanel/model/network.py:83
msgid "Error in specified radio argument use on/off."
-msgstr "Agiman radio espesifye-a pa kòrèk sèvi limen/etenn. "
-
-#: ../src/controlpanel/model/power.py:57
-msgid "Error in automatic pm argument, use on/off."
-msgstr "Agiman pou jere alimantasyon otomatik la pa kòrèk sèvi ak limen/etenn"
-
-#: ../src/controlpanel/model/power.py:86
-msgid "Error in extreme pm argument, use on/off."
-msgstr "Agiman pou gere alimantasyon ak dèyo pa kòrèk sèvi ak limen/etenn"
+msgstr "Erè nan itilizasyon limen/etenn agiman radio endike-a. "
#: ../src/controlpanel/view/aboutme.py:32
msgid "About Me"
-msgstr "Enfòmasyon pèsonèl"
+msgstr ""
#: ../src/controlpanel/view/aboutme.py:134
+#, fuzzy
msgid "Click to change your color:"
msgstr "Klike pou chanje koulè"
#: ../src/controlpanel/view/aboutxo.py:26
msgid "About my XO"
-msgstr "Enfòmasyon sou XO mwen"
+msgstr ""
#: ../src/controlpanel/view/aboutxo.py:47
msgid "Identity"
-msgstr "Idantite"
+msgstr ""
#: ../src/controlpanel/view/aboutxo.py:56
msgid "Serial Number:"
-msgstr "Nimero seri:"
+msgstr ""
#: ../src/controlpanel/view/aboutxo.py:79
msgid "Software"
-msgstr "Pwogram"
+msgstr ""
#: ../src/controlpanel/view/aboutxo.py:88
msgid "Build:"
-msgstr "Bati:"
+msgstr ""
#: ../src/controlpanel/view/aboutxo.py:103
msgid "Firmware:"
-msgstr "Mikrolojisyèl:"
+msgstr ""
#: ../src/controlpanel/view/datetime.py:29
msgid "Date & Time"
-msgstr "Dat ak lè"
+msgstr ""
#: ../src/controlpanel/view/datetime.py:72
msgid "Timezone"
-msgstr "Lè lokal"
+msgstr ""
#: ../src/controlpanel/view/frame.py:28
msgid "Frame"
-msgstr "Ankadreman"
+msgstr ""
#: ../src/controlpanel/view/frame.py:30
msgid "never"
-msgstr "Jamè"
+msgstr ""
#: ../src/controlpanel/view/frame.py:31
msgid "instantaneous"
-msgstr "imediat"
+msgstr ""
#: ../src/controlpanel/view/frame.py:32
#, python-format
msgid "%s seconds"
-msgstr "%s segond"
+msgstr ""
#: ../src/controlpanel/view/frame.py:56
msgid "Activation Delay"
-msgstr "Reta aktivasyon"
+msgstr ""
#: ../src/controlpanel/view/frame.py:80
msgid "Corner"
-msgstr "Kwen"
+msgstr ""
#: ../src/controlpanel/view/frame.py:115
msgid "Edge"
-msgstr "Bò"
+msgstr ""
#: ../src/controlpanel/view/language.py:29
#: ../src/controlpanel/view/language.py:74
msgid "Language"
-msgstr "Lang"
+msgstr ""
#: ../src/controlpanel/view/network.py:28
msgid "Network"
-msgstr "Rezo"
+msgstr ""
#: ../src/controlpanel/view/network.py:53
msgid "Wireless"
-msgstr "San fil"
+msgstr ""
#: ../src/controlpanel/view/network.py:61
msgid "Radio:"
-msgstr "Radio"
+msgstr ""
#: ../src/controlpanel/view/network.py:94
msgid "Mesh"
-msgstr "Rezo maye"
+msgstr ""
#: ../src/controlpanel/view/network.py:103
msgid "Server:"
-msgstr "Sèvè:"
-
-#: ../src/controlpanel/view/power.py:27
-msgid "Power"
-msgstr "Alimantasyon"
-
-#: ../src/controlpanel/view/power.py:51
-msgid "Power management"
-msgstr "Jere alimantasyon"
-
-#: ../src/controlpanel/view/power.py:61
-msgid "Automatic power management (increases battery life)"
-msgstr "automatic power management(ogmante tan batri a ap bay)"
-
-#: ../src/controlpanel/view/power.py:89
-msgid ""
-"Extreme power management (disables wireless radio, increases battery life)"
-msgstr "(retire posibilite capte ond wireless, ogmante tan batri a ap bay)"
+msgstr ""
-#: ../src/view/devices/network/mesh.py:111
+#: ../src/view/devices/network/mesh.py:108
msgid "Connected to a School Mesh Portal"
-msgstr "Konekte sou pòtay rezo lekòl la"
+msgstr "Konekte sou rezo lekòl la"
-#: ../src/view/devices/network/mesh.py:113
+#: ../src/view/devices/network/mesh.py:110
msgid "Looking for a School Mesh Portal..."
-msgstr "Ap chache pòtay rezo lekòl la"
+msgstr "Ap chache rezo lekòl la"
-#: ../src/view/devices/network/mesh.py:116
+#: ../src/view/devices/network/mesh.py:113
msgid "Connected to an XO Mesh Portal"
-msgstr "Konekte sou pòtal yon rezo XO"
+msgstr "Konekte sou yon rezo XO"
-#: ../src/view/devices/network/mesh.py:118
+#: ../src/view/devices/network/mesh.py:115
msgid "Looking for an XO Mesh Portal..."
msgstr "Ap chache yon rezo XO..."
-#: ../src/view/devices/network/mesh.py:121
+#: ../src/view/devices/network/mesh.py:118
msgid "Connected to a Simple Mesh"
msgstr "Konekte sou yon senp rezo"
-#: ../src/view/devices/network/mesh.py:123
+#: ../src/view/devices/network/mesh.py:120
msgid "Starting a Simple Mesh"
msgstr "Kòmanse yon senp rezo"
-#: ../src/view/devices/network/mesh.py:130
+#: ../src/view/devices/network/mesh.py:127
msgid "Unknown Mesh"
-msgstr "Rezo maye inkoni"
+msgstr "Rezo non idantifye"
-#: ../src/view/frame/activitiestray.py:210
+#: ../src/view/frame/activitiestray.py:224
msgid "Decline"
-msgstr "Refize"
-
-#: ../src/view/home/favoritesview.py:287
-msgid "Registration Failed"
-msgstr "enskripsyon an pa fèt"
-
-# se yon kòd enfòmatik li pa dwe chanje
-#: ../src/view/home/favoritesview.py:288
-#, python-format
-msgid "%s"
-msgstr "%s"
-
-#: ../src/view/home/favoritesview.py:290
-msgid "Registration Successful"
-msgstr "enskripsyon an fèt"
-
-#: ../src/view/home/favoritesview.py:291
-msgid "You are now registered with your school server."
-msgstr "ou pa enskri avek sèvè lekol ou a"
+msgstr ""
-#: ../src/view/home/favoritesview.py:407
+#: ../src/view/home/favoritesview.py:351
msgid "Control Panel"
-msgstr "Pano kontwòl"
+msgstr ""
-#: ../src/view/home/favoritesview.py:418
+#: ../src/view/home/favoritesview.py:362
msgid "Restart"
-msgstr "Redemare"
+msgstr ""
-#: ../src/view/home/favoritesview.py:423
+#: ../src/view/home/favoritesview.py:367
msgid "Shutdown"
-msgstr "Eten'n"
+msgstr "Fèmen"
-#: ../src/view/home/favoritesview.py:429
+#: ../src/view/home/favoritesview.py:373
msgid "Register"
msgstr "Enskri"
-#: ../src/view/palettes.py:42
+#: ../src/view/palettes.py:41
msgid "Starting..."
-msgstr "Demaraj...."
+msgstr "ap louvri"
-#: ../src/view/palettes.py:72
+#: ../src/view/palettes.py:71
msgid "Stop"
msgstr "Stope, rete"
-#: ../src/view/palettes.py:104
+#: ../src/view/palettes.py:96
msgid "Start"
-msgstr "Demare"
+msgstr ""
-#: ../src/view/palettes.py:132
+#: ../src/view/palettes.py:119
msgid "Remove favorite"
-msgstr "Siprime favori"
+msgstr ""
-#: ../src/view/palettes.py:136
+#: ../src/view/palettes.py:123
msgid "Make favorite"
-msgstr "Ajoute nan favori"
+msgstr ""
-#: ../src/view/palettes.py:185
+#: ../src/view/palettes.py:169
msgid "Show contents"
-msgstr "Afiche kontni yo"
+msgstr ""
-#: ../src/view/palettes.py:209
+#: ../src/view/palettes.py:193
#, python-format
msgid "%(free_space)d MB Free"
-msgstr "%(free_space)d MB vid"
-
-#~ msgid "<Ctrl>R"
-#~ msgstr "<Ctrl>R"
+msgstr ""
#~ msgid "off"
#~ msgstr "Etenn"
diff --git a/po/it.po b/po/it.po
index b7cd241..408a8d2 100644
--- a/po/it.po
+++ b/po/it.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-19 00:30-0400\n"
-"PO-Revision-Date: 2008-09-19 17:32-0400\n"
+"POT-Creation-Date: 2008-09-25 00:30-0400\n"
+"PO-Revision-Date: 2008-10-09 08:42-0400\n"
"Last-Translator: Carlo Falciola <cfalciola@yahoo.it>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
@@ -15,23 +15,23 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Pootle 1.1.0rc2\n"
-#: ../src/intro/intro.py:65 ../src/controlpanel/view/aboutme.py:100
+#: ../src/intro/window.py:93 ../src/controlpanel/aboutme/view.py:100
msgid "Name:"
msgstr "Nome:"
-#: ../src/intro/intro.py:97
+#: ../src/intro/window.py:125
msgid "Click to change color:"
msgstr "Seleziona per cambiare colore:"
-#: ../src/intro/intro.py:148
+#: ../src/intro/window.py:175 ../src/journal/detailview.py:119
msgid "Back"
msgstr "Indietro"
-#: ../src/intro/intro.py:162 ../src/controlpanel/toolbar.py:61
+#: ../src/intro/window.py:189 ../src/controlpanel/toolbar.py:61
msgid "Done"
msgstr "Fatto"
-#: ../src/intro/intro.py:165
+#: ../src/intro/window.py:192
msgid "Next"
msgstr "Prossimo"
@@ -48,11 +48,11 @@ msgstr "Aggiungi agli amici"
msgid "Invite to %s"
msgstr "Invito per %s"
-#: ../src/view/clipboardmenu.py:48
+#: ../src/view/clipboardmenu.py:51
msgid "Remove"
msgstr "Rimuovi"
-#: ../src/view/clipboardmenu.py:53 ../src/view/clipboardmenu.py:79
+#: ../src/view/clipboardmenu.py:56 ../src/view/clipboardmenu.py:78
msgid "Open"
msgstr "Apri"
@@ -60,22 +60,18 @@ msgstr "Apri"
# TODO: Implement stopping downloads
# self._stop_item.connect('activate', self._stop_item_activate_cb)
# self.append_menu_item(self._stop_item)
-#. self._stop_item = MenuItem(_('Stop download'), 'stock-close')
-#. TODO: Implement stopping downloads
-#. self._stop_item.connect('activate', self._stop_item_activate_cb)
-#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:85
+#: ../src/view/clipboardmenu.py:61 ../src/view/home/HomeBox.py:84
msgid "Keep"
msgstr "Memorizza"
-#: ../src/view/clipboardmenu.py:84
+#: ../src/view/clipboardmenu.py:83
msgid "Open with"
msgstr "Apri con"
-#: ../src/view/clipboardmenu.py:216
+#: ../src/view/clipboardmenu.py:228
#, python-format
-msgid "Clipboard object: %s."
-msgstr "Oggetto Clipboard: %s."
+msgid "%s clipping"
+msgstr "ritaglio %s"
#: ../src/hardware/keydialog.py:150
msgid "Key Type:"
@@ -105,55 +101,56 @@ msgstr "Il server non può completare la richiesta."
msgid "Screenshot"
msgstr "Schermata"
-#: ../src/view/home/HomeBox.py:79
+#: ../src/view/home/HomeBox.py:78
msgid "Confirm erase"
msgstr "Conferma cancellazione"
-#: ../src/view/home/HomeBox.py:81
+#: ../src/view/home/HomeBox.py:80
#, python-format
msgid "Confirm erase: Do you want to permanently erase %s?"
msgstr ""
"Conferma cancellazione: Sei sicuro di voler eliminare definitivamente %s?"
-#: ../src/view/home/HomeBox.py:88 ../src/view/palettes.py:120
+#: ../src/view/home/HomeBox.py:87 ../src/view/palettes.py:120
+#: ../src/journal/journaltoolbox.py:335 ../src/journal/palettes.py:75
msgid "Erase"
-msgstr "Cancella"
+msgstr "Elimina"
-#: ../src/view/home/HomeBox.py:118
+#: ../src/view/home/HomeBox.py:117
msgid "Software Update"
msgstr "Aggiornamento software"
-#: ../src/view/home/HomeBox.py:119
+#: ../src/view/home/HomeBox.py:118
msgid "Update your activities to ensure compatibility with your new software"
msgstr ""
"Aggiorna le tue attività perchè siano compatibili con il tuo sistema "
"aggiornato."
-#: ../src/view/home/HomeBox.py:123 ../src/controlpanel/toolbar.py:115
+#: ../src/view/home/HomeBox.py:122 ../src/controlpanel/toolbar.py:115
msgid "Cancel"
msgstr "Annulla"
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/gui.py:286
+#: ../src/view/home/HomeBox.py:124 ../src/controlpanel/gui.py:273
msgid "Later"
msgstr "Dopo"
-#: ../src/view/home/HomeBox.py:128
+#: ../src/view/home/HomeBox.py:127
msgid "Check now"
msgstr "Verifica adesso"
-#: ../src/view/home/HomeBox.py:262
+#: ../src/view/home/HomeBox.py:261
msgid "List view"
msgstr "Vista Elenco"
-#: ../src/view/home/HomeBox.py:263
+#: ../src/view/home/HomeBox.py:262
msgid "<Ctrl>2"
msgstr "<Ctrl>2"
-#: ../src/view/home/HomeBox.py:321
+#: ../src/view/home/HomeBox.py:320
msgid "Favorites view"
msgstr "Visualizza i Preferiti"
-#: ../src/view/home/HomeBox.py:322
+#: ../src/view/home/HomeBox.py:321
msgid "<Ctrl>1"
msgstr "<Ctrl>1"
@@ -173,21 +170,20 @@ msgstr "Disconnetti"
msgid "Disconnecting..."
msgstr "Disconnessione..."
-#: ../src/view/home/MeshBox.py:152
+#: ../src/view/home/MeshBox.py:159
msgid "Connecting..."
msgstr "Connessione..."
# TODO: show the channel number
#. TODO: show the channel number
-#: ../src/view/home/MeshBox.py:159
+#: ../src/view/home/MeshBox.py:166
msgid "Connected"
msgstr "Connesso"
# A complete translation in italian: "rete a maglie" becames a tautology
-#. only temporarily
-#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:51
-#: ../src/view/devices/network/mesh.py:92
-#: ../src/view/devices/network/mesh.py:96
+#: ../src/view/home/MeshBox.py:218 ../src/view/devices/network/mesh.py:41
+#: ../src/view/devices/network/mesh.py:68
+#: ../src/view/devices/network/mesh.py:72
msgid "Mesh Network"
msgstr "Rete Mesh"
@@ -195,16 +191,18 @@ msgstr "Rete Mesh"
# priority over the normal wireless device. NM doesn't have a "disconnect"
# method for a device either (for various reasons) so this doesn't
# have a good mapping
-#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:160
-#: ../src/view/devices/network/mesh.py:125
+#: ../src/view/home/MeshBox.py:221 ../src/view/devices/network/wireless.py:125
+#: ../src/view/devices/network/mesh.py:89
msgid "Disconnect..."
msgstr "Disconnessione..."
-#: ../src/view/home/MeshBox.py:302 ../src/view/palettes.py:61
+#. TRANS: Action label for resuming an activity.
+#: ../src/view/home/MeshBox.py:309 ../src/view/palettes.py:61
+#: ../src/journal/journaltoolbox.py:399 ../src/journal/palettes.py:57
msgid "Resume"
msgstr "Riprendi"
-#: ../src/view/home/MeshBox.py:307 ../src/view/frame/activitiestray.py:205
+#: ../src/view/home/MeshBox.py:314 ../src/view/frame/activitiestray.py:206
msgid "Join"
msgstr "Associa"
@@ -233,24 +231,19 @@ msgstr "Carica"
msgid "My Speakers"
msgstr "I miei Altoparlanti"
-#: ../src/view/devices/speaker.py:119
+#: ../src/view/devices/speaker.py:125
msgid "Unmute"
msgstr "riAttiva"
-#: ../src/view/devices/speaker.py:122
+#: ../src/view/devices/speaker.py:128
msgid "Mute"
msgstr "Silenzia"
-#: ../src/view/devices/network/wireless.py:37
-#, python-format
-msgid "IP address: %s"
-msgstr "indirizzo IP: %s"
-
-#: ../src/view/devices/network/wireless.py:86
+#: ../src/view/devices/network/wireless.py:67
msgid "Disconnected"
msgstr "Disconnesso"
-#: ../src/view/devices/network/wireless.py:178
+#: ../src/view/devices/network/wireless.py:143
msgid "Channel"
msgstr "Canale"
@@ -291,7 +284,9 @@ msgstr "sugar-control-panel: key=%s non è una opzione disponibile"
msgid "sugar-control-panel: %s"
msgstr "sugar-control-panel: %s"
-#: ../src/controlpanel/cmd.py:33
+#. TRANS: Translators, there's a empty line at the end of this string,
+#. which must appear in the translated string (msgstr) as well.
+#: ../src/controlpanel/cmd.py:35
msgid ""
"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
" Control for the sugar environment. \n"
@@ -314,7 +309,7 @@ msgstr ""
" -s key assegna il valore corrente alla \"key\" \n"
" "
-#: ../src/controlpanel/cmd.py:46
+#: ../src/controlpanel/cmd.py:48
msgid "To apply your changes you have to restart sugar.\n"
msgstr "Per applicare le modifiche è necessario riavviare sugar.\n"
@@ -322,144 +317,102 @@ msgstr "Per applicare le modifiche è necessario riavviare sugar.\n"
msgid "Ok"
msgstr "Ok"
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:278
+#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:265
msgid "Changes require restart"
msgstr "Le modifiche rendono necessario un riavvio"
-#: ../src/controlpanel/gui.py:277
+#: ../src/controlpanel/gui.py:264
msgid "Warning"
msgstr "Attenzione"
-#: ../src/controlpanel/gui.py:281
+#: ../src/controlpanel/gui.py:268
msgid "Cancel changes"
msgstr "Annulla modifiche"
-#: ../src/controlpanel/gui.py:290
+#: ../src/controlpanel/gui.py:277
msgid "Restart now"
msgstr "Riavvia adesso"
-#: ../src/controlpanel/model/aboutme.py:44
+#: ../src/controlpanel/aboutme/model.py:44
msgid "You must enter a name."
msgstr "Devi inserire un nome."
-#: ../src/controlpanel/model/aboutme.py:69
+#: ../src/controlpanel/aboutme/model.py:69
#, python-format
msgid "stroke: color=%s hue=%s"
msgstr "linea: colore=%s tinta=%s"
-#: ../src/controlpanel/model/aboutme.py:72
+#: ../src/controlpanel/aboutme/model.py:72
#, python-format
msgid "stroke: %s"
msgstr "linea: %s"
-#: ../src/controlpanel/model/aboutme.py:74
+#: ../src/controlpanel/aboutme/model.py:74
#, python-format
msgid "fill: color=%s hue=%s"
msgstr "riempimento: colore=%s tinta=%s"
-#: ../src/controlpanel/model/aboutme.py:76
+#: ../src/controlpanel/aboutme/model.py:76
#, python-format
msgid "fill: %s"
msgstr "riempimento: %s"
-#: ../src/controlpanel/model/aboutme.py:87
+#: ../src/controlpanel/aboutme/model.py:87
msgid "Error in specified color modifiers."
msgstr "Errore nella variazione dei colori richiesta"
-#: ../src/controlpanel/model/aboutme.py:90
+#: ../src/controlpanel/aboutme/model.py:90
msgid "Error in specified colors."
msgstr "Errore nella definizione dei colori."
-#: ../src/controlpanel/model/aboutxo.py:24
-msgid "Not available"
-msgstr "Non disponibile"
-
-#: ../src/controlpanel/model/datetime.py:89
-msgid "Error timezone does not exist."
-msgstr "Errore, timezone non esistente."
-
-#: ../src/controlpanel/model/frame.py:38 ../src/controlpanel/model/frame.py:60
-msgid "Value must be an integer."
-msgstr "Valore deve essere un intero."
-
-#: ../src/controlpanel/model/language.py:28
-msgid "Could not access ~/.i18n. Create standard settings."
-msgstr "Impossibile accedere a ~/.i18n. Creazione configurazione standard."
-
-#: ../src/controlpanel/model/language.py:114
-#, python-format
-msgid "Language for code=%s could not be determined."
-msgstr "Linguaggio con codice=%s sconosciuto."
-
-#: ../src/controlpanel/model/language.py:131
-#, python-format
-msgid "Sorry I do not speak '%s'."
-msgstr "Spiacente, ma non parlo '%s'."
-
-#: ../src/controlpanel/model/network.py:62
-msgid "State is unknown."
-msgstr "Stato sconosciuto."
-
-#: ../src/controlpanel/model/network.py:82
-msgid "Error in specified radio argument use on/off."
-msgstr "Errore nel campo specificato, utilizzare on/off."
-
-#: ../src/controlpanel/model/power.py:57
-msgid "Error in automatic pm argument, use on/off."
-msgstr ""
-"Errore nel campo Gestione Automatica Risparmio Energetico, utilizza on/off"
-
-#: ../src/controlpanel/model/power.py:86
-msgid "Error in extreme pm argument, use on/off."
-msgstr "Errore nel campo Gestione Estrema Risparmio Energetico, utilizza on/off"
-
-#: ../src/controlpanel/view/aboutme.py:32
+#: ../src/controlpanel/aboutme/view.py:32
+#: ../src/controlpanel/aboutme/__init__.py:22
msgid "About Me"
msgstr "Informazioni su"
-#: ../src/controlpanel/view/aboutme.py:134
+#: ../src/controlpanel/aboutme/view.py:134
msgid "Click to change your color:"
msgstr "Seleziona per cambiare il tuo colore:"
-#: ../src/controlpanel/view/aboutxo.py:28
-msgid "About my XO"
-msgstr "Informazioni sul mio XO"
+#: ../src/controlpanel/aboutxo/model.py:24
+msgid "Not available"
+msgstr "Non disponibile"
-#: ../src/controlpanel/view/aboutxo.py:59
+#: ../src/controlpanel/aboutxo/view.py:55
msgid "Identity"
msgstr "Identità"
-#: ../src/controlpanel/view/aboutxo.py:68
+#: ../src/controlpanel/aboutxo/view.py:64
msgid "Serial Number:"
msgstr "Numero di Serie:"
-#: ../src/controlpanel/view/aboutxo.py:91
+#: ../src/controlpanel/aboutxo/view.py:87
msgid "Software"
msgstr "Software"
-#: ../src/controlpanel/view/aboutxo.py:100
+#: ../src/controlpanel/aboutxo/view.py:96
msgid "Build:"
msgstr "Build:"
-#: ../src/controlpanel/view/aboutxo.py:115
+#: ../src/controlpanel/aboutxo/view.py:111
msgid "Sugar:"
msgstr "Sugar:"
-#: ../src/controlpanel/view/aboutxo.py:130
+#: ../src/controlpanel/aboutxo/view.py:126
msgid "Firmware:"
msgstr "Firmware:"
-#: ../src/controlpanel/view/aboutxo.py:152
+#: ../src/controlpanel/aboutxo/view.py:148
msgid "Copyright and License"
msgstr "Copyright e Licenza"
-#: ../src/controlpanel/view/aboutxo.py:160
+#: ../src/controlpanel/aboutxo/view.py:156
msgid ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
msgstr ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; e Contributori."
-#: ../src/controlpanel/view/aboutxo.py:167
+#: ../src/controlpanel/aboutxo/view.py:163
msgid ""
"Sugar is the graphical user interface that you are looking at. Sugar is free "
"software, covered by the GNU General Public License, and you are welcome to "
@@ -471,160 +424,232 @@ msgstr ""
"chiunque è il benvenuto per apportare modifiche e migliorie e/o distribuirne "
"copie, alle condizioni descritte nella licenza medesima."
-#: ../src/controlpanel/view/aboutxo.py:179
+#: ../src/controlpanel/aboutxo/view.py:175
msgid "Full license:"
msgstr "Testo della Licenza:"
-#: ../src/controlpanel/view/datetime.py:29
-msgid "Date & Time"
-msgstr "Data e Ora"
+#: ../src/controlpanel/aboutxo/__init__.py:21
+msgid "About my XO"
+msgstr "Informazioni sul mio XO"
+
+#: ../src/controlpanel/datetime/model.py:89
+msgid "Error timezone does not exist."
+msgstr "Errore, timezone non esistente."
-#: ../src/controlpanel/view/datetime.py:72
+#: ../src/controlpanel/datetime/view.py:68
msgid "Timezone"
msgstr "Timezone"
-#: ../src/controlpanel/view/frame.py:28
-msgid "Frame"
-msgstr "Cornice"
+#: ../src/controlpanel/datetime/__init__.py:21
+msgid "Date & Time"
+msgstr "Data e Ora"
+
+#: ../src/controlpanel/frame/model.py:38 ../src/controlpanel/frame/model.py:60
+msgid "Value must be an integer."
+msgstr "Valore deve essere un intero."
-#: ../src/controlpanel/view/frame.py:30
+#: ../src/controlpanel/frame/view.py:26
msgid "never"
msgstr "mai"
-#: ../src/controlpanel/view/frame.py:31
+#: ../src/controlpanel/frame/view.py:27
msgid "instantaneous"
msgstr "istantaneamente"
-#: ../src/controlpanel/view/frame.py:32
+#: ../src/controlpanel/frame/view.py:28
#, python-format
msgid "%s seconds"
-msgstr "%d secondi"
+msgstr "%s secondi"
-#: ../src/controlpanel/view/frame.py:56
+#: ../src/controlpanel/frame/view.py:52
msgid "Activation Delay"
msgstr "Ritardo attivazione"
-#: ../src/controlpanel/view/frame.py:80
+#: ../src/controlpanel/frame/view.py:76
msgid "Corner"
msgstr "Angolo"
-#: ../src/controlpanel/view/frame.py:115
+#: ../src/controlpanel/frame/view.py:111
msgid "Edge"
msgstr "Margine"
-#: ../src/controlpanel/view/language.py:29
-#: ../src/controlpanel/view/language.py:74
+#: ../src/controlpanel/frame/__init__.py:21
+msgid "Frame"
+msgstr "Cornice"
+
+#: ../src/controlpanel/language/model.py:28
+msgid "Could not access ~/.i18n. Create standard settings."
+msgstr "Impossibile accedere a ~/.i18n. Creazione configurazione standard."
+
+#: ../src/controlpanel/language/model.py:114
+#, python-format
+msgid "Language for code=%s could not be determined."
+msgstr "Linguaggio con codice=%s sconosciuto."
+
+#: ../src/controlpanel/language/model.py:131
+#, python-format
+msgid "Sorry I do not speak '%s'."
+msgstr "Spiacente, ma non parlo '%s'."
+
+#: ../src/controlpanel/language/view.py:70
+#: ../src/controlpanel/language/__init__.py:21
msgid "Language"
msgstr "Lingua"
-#: ../src/controlpanel/view/network.py:28
+#: ../src/controlpanel/network/model.py:62
+msgid "State is unknown."
+msgstr "Stato sconosciuto."
+
+#: ../src/controlpanel/network/model.py:82
+msgid "Error in specified radio argument use on/off."
+msgstr "Errore nel campo specificato, utilizzare on/off."
+
+#: ../src/controlpanel/network/view.py:28
+#: ../src/controlpanel/network/__init__.py:21
msgid "Network"
msgstr "Network"
-#: ../src/controlpanel/view/network.py:54
+#: ../src/controlpanel/network/view.py:54
msgid "Wireless"
msgstr "Wireless"
-#: ../src/controlpanel/view/network.py:62
+#: ../src/controlpanel/network/view.py:62
msgid "Turn of the wireless radio to save battery life"
-msgstr "Spegni il trasmettitore radio di rete per risparmiare la batteria"
+msgstr "Spegni il trasmettitore wireless per risparmiare energia"
-#: ../src/controlpanel/view/network.py:75
+#: ../src/controlpanel/network/view.py:75
msgid "Radio"
msgstr "Radio"
-#: ../src/controlpanel/view/network.py:91
+#: ../src/controlpanel/network/view.py:91
msgid "Discard network history if you have trouble connecting to the network"
msgstr ""
-"Elimina lo storico delle connessioni di rete se hai problemi di connessione"
+"Elimina la storia delle connessioni di rete effettuate nel caso di problemi "
+"di connessione"
-#: ../src/controlpanel/view/network.py:100
+#: ../src/controlpanel/network/view.py:100
msgid "Discard network history"
-msgstr "Elimina lo storico delle connessioni"
+msgstr "Elimina la storia delle connessioni di rete"
-#: ../src/controlpanel/view/network.py:113
+#: ../src/controlpanel/network/view.py:113
msgid "Mesh"
msgstr "Mesh"
-#: ../src/controlpanel/view/network.py:122
+#: ../src/controlpanel/network/view.py:122
msgid "Server:"
msgstr "Server:"
-#: ../src/controlpanel/view/power.py:27
-msgid "Power"
-msgstr "Energia"
+#: ../src/controlpanel/power/model.py:55
+msgid "Error in automatic pm argument, use on/off."
+msgstr ""
+"Errore nel campo Gestione Automatica Risparmio Energetico, utilizza on/off"
-#: ../src/controlpanel/view/power.py:51
+#: ../src/controlpanel/power/model.py:84
+msgid "Error in extreme pm argument, use on/off."
+msgstr "Errore nel campo Gestione Estrema Risparmio Energetico, utilizza on/off"
+
+#: ../src/controlpanel/power/view.py:47
msgid "Power management"
msgstr "Gestione Risparmio Energetico (power management)"
-#: ../src/controlpanel/view/power.py:61
+#: ../src/controlpanel/power/view.py:57
msgid "Automatic power management (increases battery life)"
msgstr ""
"Gestione Automatica Risparmio Energetico (incrementa la durata delle "
"batterie)"
-#: ../src/controlpanel/view/power.py:89
+#: ../src/controlpanel/power/view.py:85
msgid ""
-"Extreme power management (disables wireless radio, increases battery life)"
+"Extreme power management (disableswireless radio, increases battery life)"
msgstr ""
"Gestione Risparmio Energetico Estrema (spegne la connessione radio wireless, "
"incrementa la durata delle batterie)"
-#: ../src/view/devices/network/mesh.py:154
+#: ../src/controlpanel/power/__init__.py:21
+msgid "Power"
+msgstr "Energia"
+
+#: ../src/view/devices/network/mesh.py:111
msgid "Connected to a School Mesh Portal"
msgstr "Connesso ad un Portale Mesh di scuola"
-#: ../src/view/devices/network/mesh.py:156
+#: ../src/view/devices/network/mesh.py:113
msgid "Looking for a School Mesh Portal..."
msgstr "Ricerca di un Portale Mesh di scuola..."
-#: ../src/view/devices/network/mesh.py:159
+#: ../src/view/devices/network/mesh.py:116
msgid "Connected to an XO Mesh Portal"
msgstr "Connesso ad un Portale Mesh XO"
-#: ../src/view/devices/network/mesh.py:161
+#: ../src/view/devices/network/mesh.py:118
msgid "Looking for an XO Mesh Portal..."
msgstr "Sto cercando un Portale Mesh XO..."
# Diretto?
-#: ../src/view/devices/network/mesh.py:164
+#: ../src/view/devices/network/mesh.py:121
msgid "Connected to a Simple Mesh"
msgstr "Connesso ad un Mesh Semplice"
# Diretto?
-#: ../src/view/devices/network/mesh.py:166
+#: ../src/view/devices/network/mesh.py:123
msgid "Starting a Simple Mesh"
msgstr "Attivazione Mesh Semplice"
-#: ../src/view/devices/network/mesh.py:173
+#: ../src/view/devices/network/mesh.py:130
msgid "Unknown Mesh"
msgstr "Mesh sconosciuto"
-#: ../src/view/frame/activitiestray.py:210
+#: ../src/view/frame/activitiestray.py:211
msgid "Decline"
msgstr "Rinuncia"
-#: ../src/view/home/favoritesview.py:296
+# TRANS: label for the freeform layout in the favorites view
+#. TRANS: label for the freeform layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:107
+msgid "Freeform"
+msgstr "Formato libero"
+
+# TRANS: label for the ring layout in the favorites view
+#. TRANS: label for the ring layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:189
+msgid "Ring"
+msgstr "Anello"
+
+#. TRANS: label for the spiral layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:334
+msgid "Spiral"
+msgstr "Spirale"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:401
+msgid "Box"
+msgstr "Scatola"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:442
+msgid "Triangle"
+msgstr "Triangolo"
+
+#: ../src/view/home/favoritesview.py:295
msgid "Registration Failed"
msgstr "Registrazione Fallita"
-#: ../src/view/home/favoritesview.py:297
+#: ../src/view/home/favoritesview.py:296
#, python-format
msgid "%s"
msgstr "%s"
-#: ../src/view/home/favoritesview.py:299
+#: ../src/view/home/favoritesview.py:298
msgid "Registration Successful"
msgstr "Registrazione Effettuata"
-#: ../src/view/home/favoritesview.py:300
+#: ../src/view/home/favoritesview.py:299
msgid "You are now registered with your school server."
msgstr "Ora sei registrato sul tuo server di scuola"
#: ../src/view/home/favoritesview.py:420
-msgid "Control Panel"
-msgstr "Pannello di Controllo"
+msgid "Settings"
+msgstr "Configurazioni"
#: ../src/view/home/favoritesview.py:425
msgid "Restart"
@@ -646,7 +671,9 @@ msgstr "Inizio..."
msgid "Stop"
msgstr "Chiudi"
-#: ../src/view/palettes.py:104
+#. TRANS: Action label for starting an entry.
+#: ../src/view/palettes.py:104 ../src/journal/journaltoolbox.py:402
+#: ../src/journal/palettes.py:59
msgid "Start"
msgstr "Avvia"
@@ -667,17 +694,132 @@ msgstr "Mostra i contenuti"
msgid "%(free_space)d MB Free"
msgstr "%(free_space)d MB Liberi"
-# TRANS: label for the freeform layout in the favorites view
-#~ msgid "Freeform"
-#~ msgstr "Formato libero"
+#: ../src/journal/journaltoolbox.py:62
+msgid "Search"
+msgstr "Cerca"
+
+#: ../src/journal/journaltoolbox.py:119
+msgid "Anytime"
+msgstr "Sempre"
+
+#: ../src/journal/journaltoolbox.py:121
+msgid "Today"
+msgstr "Oggi"
+
+#: ../src/journal/journaltoolbox.py:123
+msgid "Since yesterday"
+msgstr "Da ieri"
+
+#. TRANS: Filter entries modified during the last 7 days.
+#: ../src/journal/journaltoolbox.py:125
+msgid "Past week"
+msgstr "Settimana scorsa"
+
+#. TRANS: Filter entries modified during the last 30 days.
+#: ../src/journal/journaltoolbox.py:127
+msgid "Past month"
+msgstr "Mese scorso"
+
+#. TRANS: Filter entries modified during the last 356 days.
+#: ../src/journal/journaltoolbox.py:129
+msgid "Past year"
+msgstr "Anno scorso"
+
+#: ../src/journal/journaltoolbox.py:136
+msgid "Anyone"
+msgstr "Tutti"
+
+#: ../src/journal/journaltoolbox.py:138
+msgid "My friends"
+msgstr "I miei amici"
+
+#: ../src/journal/journaltoolbox.py:139
+msgid "My class"
+msgstr "La mia classe"
+
+#. TRANS: Item in a combo box that filters by entry type.
+#: ../src/journal/journaltoolbox.py:255
+msgid "Anything"
+msgstr "Qualsiasi"
+
+#. TODO: Add "Start with" menu item
+#: ../src/journal/journaltoolbox.py:325 ../src/journal/palettes.py:67
+msgid "Copy"
+msgstr "Copia"
+
+#: ../src/journal/collapsedentry.py:248 ../src/journal/expandedentry.py:176
+#: ../src/journal/palettes.py:51
+msgid "Untitled"
+msgstr "Senza titolo"
+
+#: ../src/journal/journalactivity.py:119 ../src/journal/volumesmanager.py:57
+msgid "Journal"
+msgstr "Diario"
+
+#: ../src/journal/expandedentry.py:222
+msgid "No preview"
+msgstr "Nessuna anteprima"
+
+#: ../src/journal/expandedentry.py:241
+msgid "Participants:"
+msgstr "Partecipanti:"
+
+#: ../src/journal/expandedentry.py:266
+msgid "Description:"
+msgstr "Descrizione:"
+
+#: ../src/journal/expandedentry.py:292
+msgid "Tags:"
+msgstr "Etichette:"
+
+#: ../src/journal/objectchooser.py:134
+msgid "Choose an object"
+msgstr "Scegli un oggetto"
+
+#: ../src/journal/objectchooser.py:139
+msgid "Close"
+msgstr "Chiudi"
-# TRANS: label for the ring layout in the favorites view
-#~ msgid "Ring"
-#~ msgstr "Anello"
+#: ../src/journal/volumestoolbar.py:93
+msgid "Unmount"
+msgstr "Rimuovi"
+
+#: ../src/journal/misc.py:95
+msgid "No date"
+msgstr "Nessuna data"
+
+#: ../src/journal/listview.py:39
+msgid "Your Journal is empty"
+msgstr "Il tuo Diario è vuoto"
+
+#: ../src/journal/listview.py:40
+msgid "No matching entries "
+msgstr "Non ci sono dati corrispondenti "
+
+#: ../src/journal/modalalert.py:59
+msgid "Your Journal is full"
+msgstr "Il tuo Diario è pieno"
+
+#: ../src/journal/modalalert.py:63
+msgid "Please delete some old Journal entries to make space for new ones."
+msgstr ""
+"Per favore cancella alcune registrazioni vecchie dal Diario per far spazio "
+"alle nuove."
+
+#: ../src/journal/modalalert.py:75
+msgid "Show Journal"
+msgstr "Apri il Diario"
+
+#, python-format
+#~ msgid "Clipboard object: %s."
+#~ msgstr "Oggetto Clipboard: %s."
#~ msgid "You must enter a server."
#~ msgstr "Devi inserire un server."
+#~ msgid "Control Panel"
+#~ msgstr "Pannello di Controllo"
+
#~ msgid "© 2008 One Laptop per Child Assocation "
#~ msgstr "© 2008 One Laptop per Child Association "
@@ -809,9 +951,6 @@ msgstr "%(free_space)d MB Liberi"
#~ msgid "Stop download"
#~ msgstr "Sospendi il trasferimento"
-#~ msgid "Close"
-#~ msgstr "Chiudi"
-
#~ msgid "No options"
#~ msgstr "Nessuna opzione"
@@ -833,9 +972,6 @@ msgstr "%(free_space)d MB Liberi"
#~ msgid "Redo"
#~ msgstr "Ripeti"
-#~ msgid "Copy"
-#~ msgstr "Copia"
-
#~ msgid "Paste"
#~ msgstr "Incolla"
diff --git a/po/ja.po b/po/ja.po
index 54a6586..24d6787 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-19 00:30-0400\n"
-"PO-Revision-Date: 2008-09-20 01:13-0400\n"
+"POT-Creation-Date: 2008-09-25 00:30-0400\n"
+"PO-Revision-Date: 2008-10-09 11:39-0400\n"
"Last-Translator: korakurider <korakurider@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
@@ -15,23 +15,23 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Pootle 1.1.0rc2\n"
-#: ../src/intro/intro.py:65 ../src/controlpanel/view/aboutme.py:100
+#: ../src/intro/window.py:93 ../src/controlpanel/aboutme/view.py:100
msgid "Name:"
msgstr "åå‰:"
-#: ../src/intro/intro.py:97
+#: ../src/intro/window.py:125
msgid "Click to change color:"
msgstr "クリックã—ã¦è‰²ã‚’変更:"
-#: ../src/intro/intro.py:148
+#: ../src/intro/window.py:175 ../src/journal/detailview.py:119
msgid "Back"
msgstr "戻る"
-#: ../src/intro/intro.py:162 ../src/controlpanel/toolbar.py:61
+#: ../src/intro/window.py:189 ../src/controlpanel/toolbar.py:61
msgid "Done"
msgstr "完了"
-#: ../src/intro/intro.py:165
+#: ../src/intro/window.py:192
msgid "Next"
msgstr "進む"
@@ -48,11 +48,11 @@ msgstr "ãŠå‹ã ã¡ã‚’登録"
msgid "Invite to %s"
msgstr "%s ã«æ‹›å¾…ã™ã‚‹"
-#: ../src/view/clipboardmenu.py:48
+#: ../src/view/clipboardmenu.py:51
msgid "Remove"
msgstr "削除"
-#: ../src/view/clipboardmenu.py:53 ../src/view/clipboardmenu.py:79
+#: ../src/view/clipboardmenu.py:56 ../src/view/clipboardmenu.py:78
msgid "Open"
msgstr "é–‹ã"
@@ -60,22 +60,18 @@ msgstr "é–‹ã"
# TODO: Implement stopping downloads
# self._stop_item.connect('activate', self._stop_item_activate_cb)
# self.append_menu_item(self._stop_item)
-#. self._stop_item = MenuItem(_('Stop download'), 'stock-close')
-#. TODO: Implement stopping downloads
-#. self._stop_item.connect('activate', self._stop_item_activate_cb)
-#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:85
+#: ../src/view/clipboardmenu.py:61 ../src/view/home/HomeBox.py:84
msgid "Keep"
msgstr "ジャーナルã«ä¿å­˜"
-#: ../src/view/clipboardmenu.py:84
+#: ../src/view/clipboardmenu.py:83
msgid "Open with"
msgstr "次ã®ã‚‚ã®ã§é–‹ã:"
-#: ../src/view/clipboardmenu.py:216
+#: ../src/view/clipboardmenu.py:228
#, python-format
-msgid "Clipboard object: %s."
-msgstr "クリップボードã®ã‚ªãƒ–ジェクト: %s."
+msgid "%s clipping"
+msgstr "%sã®ã‚¯ãƒªãƒƒãƒ”ング"
#: ../src/hardware/keydialog.py:150
msgid "Key Type:"
@@ -105,52 +101,53 @@ msgstr "サーãƒãƒ¼ã¯è¦æ±‚ã®å‡¦ç†ã‚’完了ã§ãã¾ã›ã‚“ã§ã—ãŸ"
msgid "Screenshot"
msgstr "スクリーンショット"
-#: ../src/view/home/HomeBox.py:79
+#: ../src/view/home/HomeBox.py:78
msgid "Confirm erase"
msgstr "消去ã®ç¢ºèª"
-#: ../src/view/home/HomeBox.py:81
+#: ../src/view/home/HomeBox.py:80
#, python-format
msgid "Confirm erase: Do you want to permanently erase %s?"
msgstr "消去ã®ç¢ºèªï¼š %s を完全ã«æ¶ˆåŽ»ã—ã¾ã™ã‹ï¼Ÿ"
-#: ../src/view/home/HomeBox.py:88 ../src/view/palettes.py:120
+#: ../src/view/home/HomeBox.py:87 ../src/view/palettes.py:120
+#: ../src/journal/journaltoolbox.py:335 ../src/journal/palettes.py:75
msgid "Erase"
msgstr "消去ã™ã‚‹"
-#: ../src/view/home/HomeBox.py:118
+#: ../src/view/home/HomeBox.py:117
msgid "Software Update"
msgstr "ソフトウェアã®æ›´æ–°"
-#: ../src/view/home/HomeBox.py:119
+#: ../src/view/home/HomeBox.py:118
msgid "Update your activities to ensure compatibility with your new software"
msgstr "æ–°ã—ã„ソフトウェアã¨ã®äº’æ›æ€§ã‚’ä¿ã¤ãŸã‚ã€ã‚¢ã‚¯ãƒ†ã‚£ãƒ“ティを更新ã—ã¦ãã ã•ã„"
-#: ../src/view/home/HomeBox.py:123 ../src/controlpanel/toolbar.py:115
+#: ../src/view/home/HomeBox.py:122 ../src/controlpanel/toolbar.py:115
msgid "Cancel"
msgstr "中止"
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/gui.py:286
+#: ../src/view/home/HomeBox.py:124 ../src/controlpanel/gui.py:273
msgid "Later"
msgstr "ã‚ã¨ã§"
-#: ../src/view/home/HomeBox.py:128
+#: ../src/view/home/HomeBox.py:127
msgid "Check now"
msgstr "今ã™ã調ã¹ã‚‹"
-#: ../src/view/home/HomeBox.py:262
+#: ../src/view/home/HomeBox.py:261
msgid "List view"
msgstr "リスト表示"
-#: ../src/view/home/HomeBox.py:263
+#: ../src/view/home/HomeBox.py:262
msgid "<Ctrl>2"
msgstr "<Ctrl>2"
-#: ../src/view/home/HomeBox.py:321
+#: ../src/view/home/HomeBox.py:320
msgid "Favorites view"
msgstr "ãŠæ°—ã«å…¥ã‚Š"
-#: ../src/view/home/HomeBox.py:322
+#: ../src/view/home/HomeBox.py:321
msgid "<Ctrl>1"
msgstr "<Ctrl>1"
@@ -174,19 +171,19 @@ msgstr "切断ã—ã¦ã„ã¾ã™..."
# priority over the normal wireless device. NM doesn't have a "disconnect"
# method for a device either (for various reasons) so this doesn't
# have a good mapping
-#: ../src/view/home/MeshBox.py:152
+#: ../src/view/home/MeshBox.py:159
msgid "Connecting..."
msgstr "接続ã—ã¦ã„ã¾ã™..."
+# TODO: show the channel number
#. TODO: show the channel number
-#: ../src/view/home/MeshBox.py:159
+#: ../src/view/home/MeshBox.py:166
msgid "Connected"
msgstr "接続ã—ã¾ã—ãŸ"
-#. only temporarily
-#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:51
-#: ../src/view/devices/network/mesh.py:92
-#: ../src/view/devices/network/mesh.py:96
+#: ../src/view/home/MeshBox.py:218 ../src/view/devices/network/mesh.py:41
+#: ../src/view/devices/network/mesh.py:68
+#: ../src/view/devices/network/mesh.py:72
msgid "Mesh Network"
msgstr "メッシュãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯"
@@ -194,16 +191,18 @@ msgstr "メッシュãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯"
# priority over the normal wireless device. NM doesn't have a "disconnect"
# method for a device either (for various reasons) so this doesn't
# have a good mapping
-#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:160
-#: ../src/view/devices/network/mesh.py:125
+#: ../src/view/home/MeshBox.py:221 ../src/view/devices/network/wireless.py:125
+#: ../src/view/devices/network/mesh.py:89
msgid "Disconnect..."
msgstr "切断..."
-#: ../src/view/home/MeshBox.py:302 ../src/view/palettes.py:61
+#. TRANS: Action label for resuming an activity.
+#: ../src/view/home/MeshBox.py:309 ../src/view/palettes.py:61
+#: ../src/journal/journaltoolbox.py:399 ../src/journal/palettes.py:57
msgid "Resume"
msgstr "å†é–‹"
-#: ../src/view/home/MeshBox.py:307 ../src/view/frame/activitiestray.py:205
+#: ../src/view/home/MeshBox.py:314 ../src/view/frame/activitiestray.py:206
msgid "Join"
msgstr "å‚加"
@@ -232,24 +231,19 @@ msgstr "充電済ã¿"
msgid "My Speakers"
msgstr "ç§ã®ã‚¹ãƒ”ーカー"
-#: ../src/view/devices/speaker.py:119
+#: ../src/view/devices/speaker.py:125
msgid "Unmute"
msgstr "音を出ã™"
-#: ../src/view/devices/speaker.py:122
+#: ../src/view/devices/speaker.py:128
msgid "Mute"
msgstr "音を消ã™"
-#: ../src/view/devices/network/wireless.py:37
-#, python-format
-msgid "IP address: %s"
-msgstr "IPアドレス: %s"
-
-#: ../src/view/devices/network/wireless.py:86
+#: ../src/view/devices/network/wireless.py:67
msgid "Disconnected"
msgstr "切断ã•ã‚Œã¾ã—ãŸ"
-#: ../src/view/devices/network/wireless.py:178
+#: ../src/view/devices/network/wireless.py:143
msgid "Channel"
msgstr "ãƒãƒ£ãƒ³ãƒãƒ«"
@@ -286,7 +280,9 @@ msgstr "sugar-control-panel: key=%s ã¯æœ‰åŠ¹ãªã‚ªãƒ—ションã§ã¯ã‚ã‚Šã¾ã
msgid "sugar-control-panel: %s"
msgstr "sugar-control-panel: %s"
-#: ../src/controlpanel/cmd.py:33
+#. TRANS: Translators, there's a empty line at the end of this string,
+#. which must appear in the translated string (msgstr) as well.
+#: ../src/controlpanel/cmd.py:35
msgid ""
"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
" Control for the sugar environment. \n"
@@ -300,17 +296,17 @@ msgid ""
" "
msgstr ""
"使ã„æ–¹: sugar-control-panel [ option ] key [ args ... ] \n"
-" Sugarã®ç’°å¢ƒã‚’設定ã™ã‚‹ã€‚ \n"
-" Options: \n"
-" -h ã“ã®ãƒ˜ãƒ«ãƒ—メッセージを表示ã—ã¦çµ‚了ã™ã‚‹\n"
-" -l å…¨ã¦ã®æœ‰åŠ¹ãªã‚ªãƒ—ションを表示\n"
-" -h key ã“ã®ã‚­ãƒ¼ã«ã¤ã„ã¦ã®æƒ…報を表示\n"
-" -g key ã“ã®ã‚­ãƒ¼ã®ç¾åœ¨ã®è¨­å®šå€¤ã‚’å–å¾—\n"
-" -s key ã“ã®ã‚­ãƒ¼ã®å€¤ã‚’設定 \n"
-" -c key ã“ã®ã‚­ãƒ¼ã®è¨­å®šã‚’消去\n"
+"Sugarã®ç’°å¢ƒã‚’設定ã™ã‚‹ã€‚ \n"
+"Options: \n"
+"-h ã“ã®ãƒ˜ãƒ«ãƒ—メッセージを表示ã—ã¦çµ‚了ã™ã‚‹\n"
+"-l å…¨ã¦ã®æœ‰åŠ¹ãªã‚ªãƒ—ションを表示\n"
+"-h key ã“ã®ã‚­ãƒ¼ã«ã¤ã„ã¦ã®æƒ…報を表示\n"
+"-g key ã“ã®ã‚­ãƒ¼ã®ç¾åœ¨ã®è¨­å®šå€¤ã‚’å–å¾—\n"
+"-s key ã“ã®ã‚­ãƒ¼ã®å€¤ã‚’設定 \n"
+"-c key ã“ã®ã‚­ãƒ¼ã®è¨­å®šã‚’消去\n"
" "
-#: ../src/controlpanel/cmd.py:46
+#: ../src/controlpanel/cmd.py:48
msgid "To apply your changes you have to restart sugar.\n"
msgstr "変更をé©ç”¨ã™ã‚‹ã«ã¯sugarã‚’å†èµ·å‹•ã—ãªã‘ã‚Œã°ã„ã‘ã¾ã›ã‚“。\n"
@@ -318,144 +314,103 @@ msgstr "変更をé©ç”¨ã™ã‚‹ã«ã¯sugarã‚’å†èµ·å‹•ã—ãªã‘ã‚Œã°ã„ã‘ã¾ã›ã
msgid "Ok"
msgstr "了解"
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:278
+#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:265
msgid "Changes require restart"
msgstr "変更ã«ã¯å†èµ·å‹•ãŒå¿…è¦ã§ã™"
-#: ../src/controlpanel/gui.py:277
+#: ../src/controlpanel/gui.py:264
msgid "Warning"
msgstr "注æ„"
-#: ../src/controlpanel/gui.py:281
+#: ../src/controlpanel/gui.py:268
msgid "Cancel changes"
msgstr "変更をå–ã‚Šã‚„ã‚ã‚‹"
-#: ../src/controlpanel/gui.py:290
+#: ../src/controlpanel/gui.py:277
msgid "Restart now"
msgstr "今ã™ãå†èµ·å‹•"
-#: ../src/controlpanel/model/aboutme.py:44
+#: ../src/controlpanel/aboutme/model.py:44
msgid "You must enter a name."
msgstr "åå‰ã®å…¥åŠ›ãŒå¿…è¦ã§ã™"
-#: ../src/controlpanel/model/aboutme.py:69
+#: ../src/controlpanel/aboutme/model.py:69
#, python-format
msgid "stroke: color=%s hue=%s"
msgstr "線: 色=%s 色相=%s"
-#: ../src/controlpanel/model/aboutme.py:72
+#: ../src/controlpanel/aboutme/model.py:72
#, python-format
msgid "stroke: %s"
msgstr "ç·š: %s"
-#: ../src/controlpanel/model/aboutme.py:74
+#: ../src/controlpanel/aboutme/model.py:74
#, python-format
msgid "fill: color=%s hue=%s"
msgstr "å¡—ã‚Šã¤ã¶ã—: 色=%s 色相=%s"
-#: ../src/controlpanel/model/aboutme.py:76
+#: ../src/controlpanel/aboutme/model.py:76
#, python-format
msgid "fill: %s"
msgstr "å¡—ã‚Šã¤ã¶ã—: %s"
-#: ../src/controlpanel/model/aboutme.py:87
+#: ../src/controlpanel/aboutme/model.py:87
msgid "Error in specified color modifiers."
msgstr "カラーモディファイアã®æŒ‡å®šã§ã‚¨ãƒ©ãƒ¼"
-#: ../src/controlpanel/model/aboutme.py:90
+#: ../src/controlpanel/aboutme/model.py:90
msgid "Error in specified colors."
msgstr "色ã®æŒ‡å®šã§ã‚¨ãƒ©ãƒ¼"
-#: ../src/controlpanel/model/aboutxo.py:24
-msgid "Not available"
-msgstr "ä¸æ˜Žã§ã™"
-
-#: ../src/controlpanel/model/datetime.py:89
-msgid "Error timezone does not exist."
-msgstr "エラー:ãã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯å­˜åœ¨ã—ã¾ã›ã‚“。"
-
-#: ../src/controlpanel/model/frame.py:38 ../src/controlpanel/model/frame.py:60
-msgid "Value must be an integer."
-msgstr "値ã¯æ•´æ•°ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“"
-
-#: ../src/controlpanel/model/language.py:28
-msgid "Could not access ~/.i18n. Create standard settings."
-msgstr "~/.i18nã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚標準設定を作ã£ã¦ãã ã•ã„。"
-
-#: ../src/controlpanel/model/language.py:114
-#, python-format
-msgid "Language for code=%s could not be determined."
-msgstr "コード%sã®è¨€èªžãŒä¸æ˜Žã§ã™ã€‚"
-
-#: ../src/controlpanel/model/language.py:131
-#, python-format
-msgid "Sorry I do not speak '%s'."
-msgstr "ã”ã‚ã‚“ãªã•ã„。'%s'ã¯è©±ã›ã¾ã›ã‚“。"
-
-#: ../src/controlpanel/model/network.py:62
-msgid "State is unknown."
-msgstr "状態ãŒä¸æ˜Žã§ã™"
-
-#: ../src/controlpanel/model/network.py:82
-msgid "Error in specified radio argument use on/off."
-msgstr "radio引数指定ã§ã‚¨ãƒ©ãƒ¼ã€on/offを使ã£ã¦ãã ã•ã„。"
-
-#: ../src/controlpanel/model/power.py:57
-msgid "Error in automatic pm argument, use on/off."
-msgstr "automatic_pm 引数指定ã§ã‚¨ãƒ©ãƒ¼ã€ on/offを指定ã—ã¦ãã ã•ã„"
-
-#: ../src/controlpanel/model/power.py:86
-msgid "Error in extreme pm argument, use on/off."
-msgstr "extreme_pm 引数指定ã®ã‚¨ãƒ©ãƒ¼ã€ on/offを指定ã—ã¦ãã ã•ã„。"
-
-#: ../src/controlpanel/view/aboutme.py:32
+#: ../src/controlpanel/aboutme/view.py:32
+#: ../src/controlpanel/aboutme/__init__.py:22
msgid "About Me"
msgstr "ç§ã«ã¤ã„ã¦"
-#: ../src/controlpanel/view/aboutme.py:134
+#: ../src/controlpanel/aboutme/view.py:134
msgid "Click to change your color:"
msgstr "クリックã—ã¦è‰²ã‚’変更:"
-#: ../src/controlpanel/view/aboutxo.py:28
-msgid "About my XO"
-msgstr "ç§ã®XOã«ã¤ã„ã¦"
+#: ../src/controlpanel/aboutxo/model.py:24
+msgid "Not available"
+msgstr "ä¸æ˜Žã§ã™"
-#: ../src/controlpanel/view/aboutxo.py:59
+#: ../src/controlpanel/aboutxo/view.py:55
msgid "Identity"
msgstr "個体ã®è­˜åˆ¥"
-#: ../src/controlpanel/view/aboutxo.py:68
+#: ../src/controlpanel/aboutxo/view.py:64
msgid "Serial Number:"
msgstr "シリアル番å·:"
-#: ../src/controlpanel/view/aboutxo.py:91
+#: ../src/controlpanel/aboutxo/view.py:87
msgid "Software"
msgstr "ソフトウェア"
-#: ../src/controlpanel/view/aboutxo.py:100
+#: ../src/controlpanel/aboutxo/view.py:96
msgid "Build:"
msgstr "ビルド:"
-#: ../src/controlpanel/view/aboutxo.py:115
+#: ../src/controlpanel/aboutxo/view.py:111
msgid "Sugar:"
msgstr "Sugar:"
-#: ../src/controlpanel/view/aboutxo.py:130
+#: ../src/controlpanel/aboutxo/view.py:126
msgid "Firmware:"
msgstr "ファームウェア:"
-#: ../src/controlpanel/view/aboutxo.py:152
+#: ../src/controlpanel/aboutxo/view.py:148
msgid "Copyright and License"
msgstr "著作権ã¨ãƒ©ã‚¤ã‚»ãƒ³ã‚¹"
-#: ../src/controlpanel/view/aboutxo.py:160
+#: ../src/controlpanel/aboutxo/view.py:156
msgid ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
msgstr ""
"(C) 2008 One Laptop per Child Association Inc; Red Hat Inc; and "
"Contributors."
-#: ../src/controlpanel/view/aboutxo.py:167
+#: ../src/controlpanel/aboutxo/view.py:163
msgid ""
"Sugar is the graphical user interface that you are looking at. Sugar is free "
"software, covered by the GNU General Public License, and you are welcome to "
@@ -465,153 +420,223 @@ msgstr ""
"Sugarã¯ã€ã‚ãªãŸãŒè¦‹ã¦ã„るグラフィカルユーザインターフェースã§ã™ã€‚Sugarã¯ãƒ•ãƒªãƒ¼ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã§ã€GNU General Public Licen"
"se(一般公衆利用許諾契約書)ã«ã‚ˆã‚‹ä¿è­·å¯¾è±¡ã§ã™ã€‚ã“ã“ã«è¨˜è¼‰ã•ã‚Œã¦ã„ã‚‹æ¡ä»¶ã®ç¯„囲ã§ã€Sugarを変更ã—ãŸã‚Šã‚³ãƒ”ーをé…布ã™ã‚‹ã“ã¨ãŒè‡ªç”±ã«è¡Œãˆã¾ã™ã€‚"
-#: ../src/controlpanel/view/aboutxo.py:179
+#: ../src/controlpanel/aboutxo/view.py:175
msgid "Full license:"
msgstr "ライセンス全文:"
-#: ../src/controlpanel/view/datetime.py:29
-msgid "Date & Time"
-msgstr "日付・時刻"
+#: ../src/controlpanel/aboutxo/__init__.py:21
+msgid "About my XO"
+msgstr "ç§ã®XOã«ã¤ã„ã¦"
-#: ../src/controlpanel/view/datetime.py:72
+#: ../src/controlpanel/datetime/model.py:89
+msgid "Error timezone does not exist."
+msgstr "エラー:ãã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã¯å­˜åœ¨ã—ã¾ã›ã‚“。"
+
+#: ../src/controlpanel/datetime/view.py:68
msgid "Timezone"
msgstr "タイムゾーン"
-#: ../src/controlpanel/view/frame.py:28
-msgid "Frame"
-msgstr "フレーム"
+#: ../src/controlpanel/datetime/__init__.py:21
+msgid "Date & Time"
+msgstr "日付・時刻"
+
+#: ../src/controlpanel/frame/model.py:38 ../src/controlpanel/frame/model.py:60
+msgid "Value must be an integer."
+msgstr "値ã¯æ•´æ•°ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“"
-#: ../src/controlpanel/view/frame.py:30
+#: ../src/controlpanel/frame/view.py:26
msgid "never"
msgstr "表示ã—ãªã„"
-#: ../src/controlpanel/view/frame.py:31
+#: ../src/controlpanel/frame/view.py:27
msgid "instantaneous"
msgstr "ã™ãã«è¡¨ç¤º"
-#: ../src/controlpanel/view/frame.py:32
+#: ../src/controlpanel/frame/view.py:28
#, python-format
msgid "%s seconds"
msgstr "%s 秒"
-#: ../src/controlpanel/view/frame.py:56
+#: ../src/controlpanel/frame/view.py:52
msgid "Activation Delay"
msgstr "表示ã™ã‚‹ã¾ã§ã®æ™‚é–“"
-#: ../src/controlpanel/view/frame.py:80
+#: ../src/controlpanel/frame/view.py:76
msgid "Corner"
msgstr "ç”»é¢ã®ï¼”ã™ã¿"
-#: ../src/controlpanel/view/frame.py:115
+#: ../src/controlpanel/frame/view.py:111
msgid "Edge"
msgstr "ç”»é¢ã®ãµã¡"
-#: ../src/controlpanel/view/language.py:29
-#: ../src/controlpanel/view/language.py:74
+#: ../src/controlpanel/frame/__init__.py:21
+msgid "Frame"
+msgstr "フレーム"
+
+#: ../src/controlpanel/language/model.py:28
+msgid "Could not access ~/.i18n. Create standard settings."
+msgstr "~/.i18nã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚標準設定を作ã£ã¦ãã ã•ã„。"
+
+#: ../src/controlpanel/language/model.py:114
+#, python-format
+msgid "Language for code=%s could not be determined."
+msgstr "コード%sã®è¨€èªžãŒä¸æ˜Žã§ã™ã€‚"
+
+#: ../src/controlpanel/language/model.py:131
+#, python-format
+msgid "Sorry I do not speak '%s'."
+msgstr "ã”ã‚ã‚“ãªã•ã„。'%s'ã¯è©±ã›ã¾ã›ã‚“。"
+
+#: ../src/controlpanel/language/view.py:70
+#: ../src/controlpanel/language/__init__.py:21
msgid "Language"
msgstr "言語"
-#: ../src/controlpanel/view/network.py:28
+#: ../src/controlpanel/network/model.py:62
+msgid "State is unknown."
+msgstr "状態ãŒä¸æ˜Žã§ã™"
+
+#: ../src/controlpanel/network/model.py:82
+msgid "Error in specified radio argument use on/off."
+msgstr "radio引数指定ã§ã‚¨ãƒ©ãƒ¼ã€on/offを使ã£ã¦ãã ã•ã„。"
+
+#: ../src/controlpanel/network/view.py:28
+#: ../src/controlpanel/network/__init__.py:21
msgid "Network"
msgstr "ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯"
-#: ../src/controlpanel/view/network.py:54
+#: ../src/controlpanel/network/view.py:54
msgid "Wireless"
msgstr "ç„¡ç·š"
-#: ../src/controlpanel/view/network.py:62
+#: ../src/controlpanel/network/view.py:62
msgid "Turn of the wireless radio to save battery life"
msgstr "電池を節約ã™ã‚‹ãŸã‚ã€ç„¡ç·šã‚’æ­¢ã‚ã‚‹"
-#: ../src/controlpanel/view/network.py:75
+#: ../src/controlpanel/network/view.py:75
msgid "Radio"
msgstr "電波"
-#: ../src/controlpanel/view/network.py:91
+#: ../src/controlpanel/network/view.py:91
msgid "Discard network history if you have trouble connecting to the network"
msgstr "ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶šã§å•é¡ŒãŒã‚ã‚‹å ´åˆã€æŽ¥ç¶šå±¥æ­´ã‚’破棄ã—ã¾ã™"
-#: ../src/controlpanel/view/network.py:100
+#: ../src/controlpanel/network/view.py:100
msgid "Discard network history"
msgstr "ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶šå±¥æ­´ã‚’破棄"
-#: ../src/controlpanel/view/network.py:113
+#: ../src/controlpanel/network/view.py:113
msgid "Mesh"
msgstr "メッシュ"
-#: ../src/controlpanel/view/network.py:122
+#: ../src/controlpanel/network/view.py:122
msgid "Server:"
msgstr "サーãƒãƒ¼:"
-#: ../src/controlpanel/view/power.py:27
-msgid "Power"
-msgstr "é›»æº"
+#: ../src/controlpanel/power/model.py:55
+msgid "Error in automatic pm argument, use on/off."
+msgstr "automatic_pm 引数指定ã§ã‚¨ãƒ©ãƒ¼ã€ on/offを指定ã—ã¦ãã ã•ã„"
+
+#: ../src/controlpanel/power/model.py:84
+msgid "Error in extreme pm argument, use on/off."
+msgstr "extreme_pm 引数指定ã®ã‚¨ãƒ©ãƒ¼ã€ on/offを指定ã—ã¦ãã ã•ã„。"
-#: ../src/controlpanel/view/power.py:51
+#: ../src/controlpanel/power/view.py:47
msgid "Power management"
msgstr "é›»æºã®ç®¡ç†"
-#: ../src/controlpanel/view/power.py:61
+#: ../src/controlpanel/power/view.py:57
msgid "Automatic power management (increases battery life)"
msgstr "自動的ãªé›»æºç®¡ç†ï¼ˆé›»æ± ãŒé•·æŒã¡ã—ã¾ã™ï¼‰"
-#: ../src/controlpanel/view/power.py:89
+#: ../src/controlpanel/power/view.py:85
msgid ""
-"Extreme power management (disables wireless radio, increases battery life)"
+"Extreme power management (disableswireless radio, increases battery life)"
msgstr "最大ã®é›»æºç®¡ç†ï¼ˆç„¡ç·šã®é›»æ³¢ã‚’åœã‚ã¦ã€é›»æ± ã‚’é•·æŒã¡ã•ã›ã¾ã™ï¼‰"
-#: ../src/view/devices/network/mesh.py:154
+#: ../src/controlpanel/power/__init__.py:21
+msgid "Power"
+msgstr "é›»æº"
+
+#: ../src/view/devices/network/mesh.py:111
msgid "Connected to a School Mesh Portal"
msgstr "スクールメッシュãƒãƒ¼ã‚¿ãƒ«ã«æŽ¥ç¶šã—ã¾ã—ãŸã€‚"
-#: ../src/view/devices/network/mesh.py:156
+#: ../src/view/devices/network/mesh.py:113
msgid "Looking for a School Mesh Portal..."
msgstr "スクールメッシュãƒãƒ¼ã‚¿ãƒ«ã‚’探ã—ã¦ã„ã¾ã™..."
-#: ../src/view/devices/network/mesh.py:159
+#: ../src/view/devices/network/mesh.py:116
msgid "Connected to an XO Mesh Portal"
msgstr "XOメッシュãƒãƒ¼ã‚¿ãƒ«ã«æŽ¥ç¶šã—ã¾ã—ãŸ"
-#: ../src/view/devices/network/mesh.py:161
+#: ../src/view/devices/network/mesh.py:118
msgid "Looking for an XO Mesh Portal..."
msgstr "XOメッシュãƒãƒ¼ã‚¿ãƒ«ã‚’探ã—ã¦ã„ã¾ã™..."
-#: ../src/view/devices/network/mesh.py:164
+#: ../src/view/devices/network/mesh.py:121
msgid "Connected to a Simple Mesh"
msgstr "シンプルメッシュã«æŽ¥ç¶šã—ã¾ã—ãŸ"
-#: ../src/view/devices/network/mesh.py:166
+#: ../src/view/devices/network/mesh.py:123
msgid "Starting a Simple Mesh"
msgstr "シンプルメッシュを開始ã—ã¦ã„ã¾ã™"
-#: ../src/view/devices/network/mesh.py:173
+#: ../src/view/devices/network/mesh.py:130
msgid "Unknown Mesh"
msgstr "ä¸æ˜Žãªãƒ¡ãƒƒã‚·ãƒ¥"
-#: ../src/view/frame/activitiestray.py:210
+#: ../src/view/frame/activitiestray.py:211
msgid "Decline"
msgstr "æ–­ã‚‹"
-#: ../src/view/home/favoritesview.py:296
+# TRANS: label for the freeform layout in the favorites view
+#. TRANS: label for the freeform layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:107
+msgid "Freeform"
+msgstr "自由ã«ä¸¦ã¹ã‚‹"
+
+# TRANS: label for the ring layout in the favorites view
+#. TRANS: label for the ring layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:189
+msgid "Ring"
+msgstr "円ã«ä¸¦ã¹ã‚‹"
+
+#. TRANS: label for the spiral layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:334
+msgid "Spiral"
+msgstr "渦巻ãã«ä¸¦ã¹ã‚‹"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:401
+msgid "Box"
+msgstr "箱型ã«ä¸¦ã¹ã‚‹"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:442
+msgid "Triangle"
+msgstr "三角形ã«ä¸¦ã¹ã‚‹"
+
+#: ../src/view/home/favoritesview.py:295
msgid "Registration Failed"
msgstr "登録失敗"
-#: ../src/view/home/favoritesview.py:297
+#: ../src/view/home/favoritesview.py:296
#, python-format
msgid "%s"
msgstr "%s"
-#: ../src/view/home/favoritesview.py:299
+#: ../src/view/home/favoritesview.py:298
msgid "Registration Successful"
msgstr "登録æˆåŠŸ"
-#: ../src/view/home/favoritesview.py:300
+#: ../src/view/home/favoritesview.py:299
msgid "You are now registered with your school server."
msgstr "ã‚ãªãŸã¯ã‚¹ã‚¯ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã«ç™»éŒ²ã•ã‚Œã¾ã—ãŸ"
#: ../src/view/home/favoritesview.py:420
-msgid "Control Panel"
-msgstr "コントロールパãƒãƒ«"
+msgid "Settings"
+msgstr "設定"
#: ../src/view/home/favoritesview.py:425
msgid "Restart"
@@ -633,7 +658,9 @@ msgstr "起動中..."
msgid "Stop"
msgstr "åœæ­¢"
-#: ../src/view/palettes.py:104
+#. TRANS: Action label for starting an entry.
+#: ../src/view/palettes.py:104 ../src/journal/journaltoolbox.py:402
+#: ../src/journal/palettes.py:59
msgid "Start"
msgstr "開始"
@@ -654,17 +681,130 @@ msgstr "内容を表示"
msgid "%(free_space)d MB Free"
msgstr "%(free_space)d MB 空ã"
-# TRANS: label for the freeform layout in the favorites view
-#~ msgid "Freeform"
-#~ msgstr "自由ã«ä¸¦ã¹ã‚‹"
+#: ../src/journal/journaltoolbox.py:62
+msgid "Search"
+msgstr "検索"
+
+#: ../src/journal/journaltoolbox.py:119
+msgid "Anytime"
+msgstr "ã™ã¹ã¦ã®æœŸé–“"
+
+#: ../src/journal/journaltoolbox.py:121
+msgid "Today"
+msgstr "今日"
+
+#: ../src/journal/journaltoolbox.py:123
+msgid "Since yesterday"
+msgstr "昨日ã‹ã‚‰å¾Œ"
-# TRANS: label for the ring layout in the favorites view
-#~ msgid "Ring"
-#~ msgstr "円ã«ä¸¦ã¹ã‚‹"
+#. TRANS: Filter entries modified during the last 7 days.
+#: ../src/journal/journaltoolbox.py:125
+msgid "Past week"
+msgstr "éŽåŽ»ï¼‘週間"
+
+#. TRANS: Filter entries modified during the last 30 days.
+#: ../src/journal/journaltoolbox.py:127
+msgid "Past month"
+msgstr "éŽåŽ»ï¼‘ヶ月"
+
+#. TRANS: Filter entries modified during the last 356 days.
+#: ../src/journal/journaltoolbox.py:129
+msgid "Past year"
+msgstr "éŽåŽ»ï¼‘å¹´"
+
+#: ../src/journal/journaltoolbox.py:136
+msgid "Anyone"
+msgstr "誰ã§ã‚‚"
+
+#: ../src/journal/journaltoolbox.py:138
+msgid "My friends"
+msgstr "ç§ã®å‹ã ã¡"
+
+#: ../src/journal/journaltoolbox.py:139
+msgid "My class"
+msgstr "ç§ã®ã‚¯ãƒ©ã‚¹"
+
+#. TRANS: Item in a combo box that filters by entry type.
+#: ../src/journal/journaltoolbox.py:255
+msgid "Anything"
+msgstr "ã™ã¹ã¦ã®ç¨®é¡ž"
+
+#. TODO: Add "Start with" menu item
+#: ../src/journal/journaltoolbox.py:325 ../src/journal/palettes.py:67
+msgid "Copy"
+msgstr "コピー"
+
+#: ../src/journal/collapsedentry.py:248 ../src/journal/expandedentry.py:176
+#: ../src/journal/palettes.py:51
+msgid "Untitled"
+msgstr "タイトル無ã—"
+
+#: ../src/journal/journalactivity.py:119 ../src/journal/volumesmanager.py:57
+msgid "Journal"
+msgstr "ジャーナル"
+
+#: ../src/journal/expandedentry.py:222
+msgid "No preview"
+msgstr "プレビュー無ã—"
+
+#: ../src/journal/expandedentry.py:241
+msgid "Participants:"
+msgstr "å‚加者:"
+
+#: ../src/journal/expandedentry.py:266
+msgid "Description:"
+msgstr "説明:"
+
+#: ../src/journal/expandedentry.py:292
+msgid "Tags:"
+msgstr "ã‚¿ã‚°:"
+
+#: ../src/journal/objectchooser.py:134
+msgid "Choose an object"
+msgstr "オブジェクトをé¸ã¶"
+
+#: ../src/journal/objectchooser.py:139
+msgid "Close"
+msgstr "é–‰ã˜ã‚‹"
+
+#: ../src/journal/volumestoolbar.py:93
+msgid "Unmount"
+msgstr "å–ã‚Šã¯ãšã™"
+
+#: ../src/journal/misc.py:95
+msgid "No date"
+msgstr "日付無ã—"
+
+#: ../src/journal/listview.py:39
+msgid "Your Journal is empty"
+msgstr "ジャーナルãŒç©ºã§ã™"
+
+#: ../src/journal/listview.py:40
+msgid "No matching entries "
+msgstr "ã‚ã¦ã¯ã¾ã‚‹ã‚‚ã®ãŒç„¡ã„ã§ã™"
+
+#: ../src/journal/modalalert.py:59
+msgid "Your Journal is full"
+msgstr "ジャーナルãŒæº€æ¯ã§ã™"
+
+#: ../src/journal/modalalert.py:63
+msgid "Please delete some old Journal entries to make space for new ones."
+msgstr "æ–°ã—ã„ã‚‚ã®ãŒå…¥ã‚‹ã‚ˆã†ã€ã‚¸ãƒ£ãƒ¼ãƒŠãƒ«ã®ä¸­èº«ã®å¤ã„ã‚‚ã®ã‚’ã©ã‚Œã‹å‰Šé™¤ã—ã¦ãã ã•ã„"
+
+#: ../src/journal/modalalert.py:75
+msgid "Show Journal"
+msgstr "ジャーナルを表示"
+
+#, python-format
+#~ msgid "Clipboard object: %s."
+#~ msgstr "クリップボードã®ã‚ªãƒ–ジェクト: %s."
#~ msgid "You must enter a server."
#~ msgstr "サーãƒãƒ¼ã®æŒ‡å®šãŒå¿…è¦ã§ã™"
+#~ msgid "Control Panel"
+#~ msgstr "コントロールパãƒãƒ«"
+
#, fuzzy
#~ msgid "off"
#~ msgstr "オフ"
@@ -733,10 +873,6 @@ msgstr "%(free_space)d MB 空ã"
#~ msgstr "ã‚„ã‚Šç›´ã™"
#, fuzzy
-#~ msgid "Copy"
-#~ msgstr "コピー"
-
-#, fuzzy
#~ msgid "Paste"
#~ msgstr "ペースト"
diff --git a/po/mn.po b/po/mn.po
index 9948204..ec3dfb6 100644
--- a/po/mn.po
+++ b/po/mn.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-08-19 17:12-0400\n"
-"PO-Revision-Date: 2008-09-18 17:06-0400\n"
+"POT-Creation-Date: 2008-07-23 07:44-0400\n"
+"PO-Revision-Date: 2008-08-07 01:30-0400\n"
"Last-Translator: Odontsetseg Bat-Erdene <obat-erdene@suffolk.edu>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
@@ -19,19 +19,19 @@ msgstr ""
msgid "Name:"
msgstr "ÐÑÑ€:"
-#: ../src/intro/intro.py:97
+#: ../src/intro/intro.py:94
msgid "Click to change color:"
msgstr "Энд дарж өнгөө Ñолино уу"
-#: ../src/intro/intro.py:148
+#: ../src/intro/intro.py:145
msgid "Back"
msgstr "Буцах"
-#: ../src/intro/intro.py:162 ../src/controlpanel/toolbar.py:61
+#: ../src/intro/intro.py:159 ../src/controlpanel/toolbar.py:61
msgid "Done"
msgstr "Боллоо"
-#: ../src/intro/intro.py:165
+#: ../src/intro/intro.py:162
msgid "Next"
msgstr "Дараах"
@@ -64,7 +64,7 @@ msgstr "ÐÑÑÑ…"
#. TODO: Implement stopping downloads
#. self._stop_item.connect('activate', self._stop_item_activate_cb)
#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:87
+#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:86
msgid "Keep"
msgstr "Хадгалах"
@@ -89,80 +89,48 @@ msgstr "ÐÑвтрÑÑ… нууцлалын төрөл:"
msgid "Encryption Type:"
msgstr "Ðууцлалын төрөл:"
-#: ../src/hardware/schoolserver.py:17
-msgid "Cannot obtain data needed for registration."
-msgstr "БүртгүүлÑÑ…Ñд Ñ…ÑÑ€ÑгтÑй мÑдÑÑлÑл аваж чадахгүй."
-
-#: ../src/hardware/schoolserver.py:31
-msgid "Cannot connect to the server."
-msgstr "Серверт холбогдож чадахгүй байна."
-
-#: ../src/hardware/schoolserver.py:36
-msgid "The server could not complete the request."
-msgstr "Сервер Ñ…Ò¯ÑÑлт биÑлүүлÑж чадаагүй."
-
#: ../src/view/Shell.py:240
msgid "Screenshot"
msgstr "ДÑлгÑцний зураг"
-#: ../src/view/home/HomeBox.py:81
+#: ../src/view/home/HomeBox.py:80
msgid "Confirm erase"
msgstr "Ðрилгахыг зөвшөөрөх"
-#: ../src/view/home/HomeBox.py:83
+#: ../src/view/home/HomeBox.py:82
#, python-format
msgid "Confirm erase: Do you want to permanently erase %s?"
msgstr "Ðрилгахыг зөвшөөрөх: Та %s бүр мөÑөн арилгахыг Ñ…Ò¯Ñч байна уу?"
-#: ../src/view/home/HomeBox.py:90 ../src/view/palettes.py:120
+#: ../src/view/home/HomeBox.py:89 ../src/view/palettes.py:120
msgid "Erase"
msgstr "Ðрилгах"
-#: ../src/view/home/HomeBox.py:120
-msgid "Software Update"
-msgstr "Хангамж ШинÑчлÑÑ…"
-
-#: ../src/view/home/HomeBox.py:121
-msgid "Update your activities to ensure compatibility with your new software"
-msgstr "Ð¨Ð¸Ð½Ñ Ñ…Ð°Ð½Ð³Ð°Ð¼Ð¶Ð¸Ð´ тохируулахыг батлахын тулд үйл ажилагаануудаа шинÑчлÑÑ…"
-
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/toolbar.py:115
-msgid "Cancel"
-msgstr "Болих"
-
-#: ../src/view/home/HomeBox.py:127 ../src/controlpanel/gui.py:275
-msgid "Later"
-msgstr "Дараа"
-
-#: ../src/view/home/HomeBox.py:130
-msgid "Check now"
-msgstr "Одоо шалгах"
-
-#: ../src/view/home/HomeBox.py:266
+#: ../src/view/home/HomeBox.py:215
msgid "List view"
msgstr "ЖагÑаалтыг харах"
-#: ../src/view/home/HomeBox.py:267
+#: ../src/view/home/HomeBox.py:216
msgid "<Ctrl>2"
msgstr "<Ctrl>2"
-#: ../src/view/home/HomeBox.py:325
+#: ../src/view/home/HomeBox.py:273
msgid "Favorites view"
msgstr "Дуртай зүйлÑийг үзÑÑ…"
-#: ../src/view/home/HomeBox.py:326
+#: ../src/view/home/HomeBox.py:274
msgid "<Ctrl>1"
msgstr "<Ctrl>1"
# TRANS: label for the freeform layout in the favorites view
#. TRANS: label for the freeform layout in the favorites view
-#: ../src/view/home/HomeBox.py:334
+#: ../src/view/home/HomeBox.py:282
msgid "Freeform"
msgstr "Дурын Ñ…ÑлбÑÑ€"
# TRANS: label for the ring layout in the favorites view
#. TRANS: label for the ring layout in the favorites view
-#: ../src/view/home/HomeBox.py:341
+#: ../src/view/home/HomeBox.py:289
msgid "Ring"
msgstr "Цагираг"
@@ -233,7 +201,7 @@ msgstr "ЦÑнÑг маш бага байна"
#: ../src/view/devices/battery.py:123
#, python-format
msgid "%(hour)d:%(min).2d remaining"
-msgstr "%(hour)d:%(min).2d үлдлÑÑ"
+msgstr "%(цаг)d:%(мин).2d үлдлÑÑ"
#: ../src/view/devices/battery.py:127
msgid "Charged"
@@ -259,19 +227,19 @@ msgstr "СалгагдÑан"
msgid "Channel"
msgstr "Суваг"
-#: ../src/view/frame/zoomtoolbar.py:37
+#: ../src/view/frame/zoomtoolbar.py:34
msgid "Neighborhood"
msgstr "Хөршүүд"
-#: ../src/view/frame/zoomtoolbar.py:39
+#: ../src/view/frame/zoomtoolbar.py:36
msgid "Group"
msgstr "БүлÑг"
-#: ../src/view/frame/zoomtoolbar.py:41
+#: ../src/view/frame/zoomtoolbar.py:38
msgid "Home"
msgstr "Ðүүр хуудаÑ"
-#: ../src/view/frame/zoomtoolbar.py:43
+#: ../src/view/frame/zoomtoolbar.py:40
msgid "Activity"
msgstr "Үйл ажиллагаа"
@@ -302,40 +270,47 @@ msgid ""
" -h key show information about this key \n"
" -g key get the current value of the key \n"
" -s key set the current value for the key \n"
-" -c key clear the current value for the key \n"
" "
msgstr ""
-"Ð¥ÑÑ€ÑглÑÑ: sugar-удирдах-Ñамбар [ Ñонголт ] товч [ аргумент ... ] \r\n"
-" Sugar-ийн орчны Ñ…Ñналт. \r\n"
-" Сонголтууд: \r\n"
-" -Ñ… Ð­Ð½Ñ Ñ‚ÑƒÑламжын мÑдÑÑ Ò¯Ð·Ò¯Ò¯Ð»ÑÑ… ба гаргах\r\n"
-" -л Боломжит Ñонголтын үзүүлÑлтүүд \r\n"
-" -Ñ… товч Товчны тухай мÑдÑÑлÑл \r\n"
-" -а товч Товчны одоогийн ач холбогдлыг мÑдÑÑ… \r\n"
-" -ы товч Товчны одоогийн ач холбогдлыг тохируулах \r\n"
-" "
-
-#: ../src/controlpanel/cmd.py:46
+"Ð¥ÑÑ€ÑглÑÑ: sugar-удирдах-Ñамбар [ Ñонголт ] товч [ аргумент ... ] \n"
+"Sugar-ийн орчны Ñ…Ñналт. \n"
+"Сонголтууд: \n"
+"-Ñ… Ð­Ð½Ñ Ñ‚ÑƒÑламжын мÑдÑÑ Ò¯Ð·Ò¯Ò¯Ð»ÑÑ… ба гаргах\n"
+"-л Боломжит Ñонголтын үзүүлÑлтүүд \n"
+"-Ñ… товч Товчны тухай мÑдÑÑлÑл \n"
+"-а товч Товчны одоогийн ач холбогдлыг мÑдÑÑ… \n"
+"-ы товч Товчны одоогийн ач холбогдлыг тохируулах \n"
+" "
+
+#: ../src/controlpanel/cmd.py:45
msgid "To apply your changes you have to restart sugar.\n"
msgstr "Өөрчлөлтийг идÑвхжүүлÑхийн тулд та дахин ÑхлүүлÑÑ… шаардлагатай.\n"
-#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:296
+#: ../src/controlpanel/toolbar.py:115
+msgid "Cancel"
+msgstr "Болих"
+
+#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:294
msgid "Ok"
msgstr "Тийм"
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:267
+#: ../src/controlpanel/sectionview.py:34 ../src/controlpanel/gui.py:260
msgid "Changes require restart"
msgstr "Өөрчлөхийн тулд дахин ÑхлүүлÑÑ… Ñ…ÑÑ€ÑгтÑй"
-#: ../src/controlpanel/gui.py:266
+#: ../src/controlpanel/gui.py:259
msgid "Warning"
msgstr "Ðнхаар"
-#: ../src/controlpanel/gui.py:270
+#: ../src/controlpanel/gui.py:263
msgid "Cancel changes"
msgstr "Өөрчлөлтийг цуцлах"
-#: ../src/controlpanel/gui.py:279
+#: ../src/controlpanel/gui.py:267
+msgid "Later"
+msgstr "Дараа"
+
+#: ../src/controlpanel/gui.py:271
msgid "Restart now"
msgstr "Одоо ÑхлүүлÑÑ… Ò¯Ò¯"
@@ -561,36 +536,36 @@ msgstr "Үл мÑдÑгдÑÑ… тархалтын ÑүлжÑÑ"
msgid "Decline"
msgstr "Үл зөвшөөрөх"
-#: ../src/view/home/favoritesview.py:287
+#: ../src/view/home/favoritesview.py:285
msgid "Registration Failed"
msgstr "БүртгÑл бүтÑлгүйтлÑÑ"
-#: ../src/view/home/favoritesview.py:288
+#: ../src/view/home/favoritesview.py:286
#, python-format
msgid "%s"
msgstr "%s"
-#: ../src/view/home/favoritesview.py:290
+#: ../src/view/home/favoritesview.py:288
msgid "Registration Successful"
msgstr "БүртгÑл амжилттай"
-#: ../src/view/home/favoritesview.py:291
+#: ../src/view/home/favoritesview.py:289
msgid "You are now registered with your school server."
msgstr "Та одоо Ñургуулийн Ñерверт бүртгÑгдлÑÑ."
-#: ../src/view/home/favoritesview.py:407
+#: ../src/view/home/favoritesview.py:405
msgid "Control Panel"
msgstr "Удирдах Самбар"
-#: ../src/view/home/favoritesview.py:418
+#: ../src/view/home/favoritesview.py:416
msgid "Restart"
msgstr "Дахин ÑхлүүлÑÑ…"
-#: ../src/view/home/favoritesview.py:423
+#: ../src/view/home/favoritesview.py:421
msgid "Shutdown"
msgstr "Унтраах"
-#: ../src/view/home/favoritesview.py:429
+#: ../src/view/home/favoritesview.py:427
msgid "Register"
msgstr "БүртгүүлÑÑ…"
diff --git a/po/nl.po b/po/nl.po
index 44b423b..d1201e6 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-01 18:31-0400\n"
-"PO-Revision-Date: 2008-09-02 15:10-0400\n"
+"POT-Creation-Date: 2008-09-25 00:30-0400\n"
+"PO-Revision-Date: 2008-10-01 09:38-0400\n"
"Last-Translator: Myckel Habets <myckel@sdf.lonestar.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
@@ -15,44 +15,44 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Pootle 1.1.0rc2\n"
-#: ../src/intro/intro.py:65 ../src/controlpanel/view/aboutme.py:100
+#: ../src/intro/window.py:93 ../src/controlpanel/aboutme/view.py:100
msgid "Name:"
msgstr "Naam:"
-#: ../src/intro/intro.py:97
+#: ../src/intro/window.py:125
msgid "Click to change color:"
msgstr "Klik om de kleur te veranderen:"
-#: ../src/intro/intro.py:148
+#: ../src/intro/window.py:175 ../src/journal/detailview.py:119
msgid "Back"
msgstr "Terug"
-#: ../src/intro/intro.py:162 ../src/controlpanel/toolbar.py:61
+#: ../src/intro/window.py:189 ../src/controlpanel/toolbar.py:61
msgid "Done"
msgstr "Klaar"
-#: ../src/intro/intro.py:165
+#: ../src/intro/window.py:192
msgid "Next"
msgstr "Volgende"
-#: ../src/view/BuddyMenu.py:58
+#: ../src/view/BuddyMenu.py:60
msgid "Remove friend"
msgstr "Verwijder vriend"
-#: ../src/view/BuddyMenu.py:61
+#: ../src/view/BuddyMenu.py:63
msgid "Make friend"
msgstr "Maak vriend"
-#: ../src/view/BuddyMenu.py:90
+#: ../src/view/BuddyMenu.py:92
#, python-format
msgid "Invite to %s"
msgstr "Nodig uit voor %s"
-#: ../src/view/clipboardmenu.py:48
+#: ../src/view/clipboardmenu.py:51
msgid "Remove"
msgstr "Verwijderen"
-#: ../src/view/clipboardmenu.py:53 ../src/view/clipboardmenu.py:79
+#: ../src/view/clipboardmenu.py:56 ../src/view/clipboardmenu.py:78
msgid "Open"
msgstr "Openen"
@@ -61,22 +61,18 @@ msgstr "Openen"
# TODO: Implement stopping downloads
# self._stop_item.connect('activate', self._stop_item_activate_cb)
# self.append_menu_item(self._stop_item)
-#. self._stop_item = MenuItem(_('Stop download'), 'stock-close')
-#. TODO: Implement stopping downloads
-#. self._stop_item.connect('activate', self._stop_item_activate_cb)
-#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:87
+#: ../src/view/clipboardmenu.py:61 ../src/view/home/HomeBox.py:84
msgid "Keep"
msgstr "Bewaar"
-#: ../src/view/clipboardmenu.py:84
+#: ../src/view/clipboardmenu.py:83
msgid "Open with"
msgstr "Openen met"
-#: ../src/view/clipboardmenu.py:216
+#: ../src/view/clipboardmenu.py:228
#, python-format
-msgid "Clipboard object: %s."
-msgstr "Klembord object: %s."
+msgid "%s clipping"
+msgstr "%s in klembord zetten"
#: ../src/hardware/keydialog.py:150
msgid "Key Type:"
@@ -92,83 +88,73 @@ msgstr "Encryptie type:"
#: ../src/hardware/schoolserver.py:17
msgid "Cannot obtain data needed for registration."
-msgstr "Kan vereiste gegevens voor registratie niet verkrijgen."
+msgstr ""
+"Kan vereiste gegevens die nodig zijn voor de registratie niet verkrijgen."
#: ../src/hardware/schoolserver.py:31
msgid "Cannot connect to the server."
-msgstr "Kan niet met server verbinden."
+msgstr "Kan niet met de server verbinden."
#: ../src/hardware/schoolserver.py:36
msgid "The server could not complete the request."
msgstr "De server kon de aanvraag niet voltooien."
-#: ../src/view/Shell.py:262
+#: ../src/view/Shell.py:251
msgid "Screenshot"
msgstr "Schermafdruk"
-#: ../src/view/home/HomeBox.py:81
+#: ../src/view/home/HomeBox.py:78
msgid "Confirm erase"
msgstr "Bevestig wissen"
-#: ../src/view/home/HomeBox.py:83
+#: ../src/view/home/HomeBox.py:80
#, python-format
msgid "Confirm erase: Do you want to permanently erase %s?"
msgstr "Bevestig wissen: Wilt u permanent %s wissen?"
-#: ../src/view/home/HomeBox.py:90 ../src/view/palettes.py:120
+#: ../src/view/home/HomeBox.py:87 ../src/view/palettes.py:120
+#: ../src/journal/journaltoolbox.py:335 ../src/journal/palettes.py:75
msgid "Erase"
msgstr "Wissen"
-#: ../src/view/home/HomeBox.py:120
+#: ../src/view/home/HomeBox.py:117
msgid "Software Update"
msgstr "Software update"
-#: ../src/view/home/HomeBox.py:121
+#: ../src/view/home/HomeBox.py:118
msgid "Update your activities to ensure compatibility with your new software"
msgstr ""
-"Update je activiteiten om er zeker van te zijn dat ze met je nieuwe software "
+"Update je activiteiten om zeker ervan te zijn dat ze met je nieuwe software "
"compatibel zijn."
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/toolbar.py:115
+#: ../src/view/home/HomeBox.py:122 ../src/controlpanel/toolbar.py:115
msgid "Cancel"
msgstr "Annuleren"
-#: ../src/view/home/HomeBox.py:127 ../src/controlpanel/gui.py:276
+#: ../src/view/home/HomeBox.py:124 ../src/controlpanel/gui.py:273
msgid "Later"
msgstr "Later"
-#: ../src/view/home/HomeBox.py:130
+#: ../src/view/home/HomeBox.py:127
msgid "Check now"
msgstr "Controleer nu"
-#: ../src/view/home/HomeBox.py:266
+#: ../src/view/home/HomeBox.py:261
msgid "List view"
msgstr "Lijstweergave"
-#: ../src/view/home/HomeBox.py:267
+#: ../src/view/home/HomeBox.py:262
msgid "<Ctrl>2"
msgstr "<Ctrl>2"
-#: ../src/view/home/HomeBox.py:325
+#: ../src/view/home/HomeBox.py:320
msgid "Favorites view"
msgstr "Favorietenweergave"
-#: ../src/view/home/HomeBox.py:326
+#: ../src/view/home/HomeBox.py:321
msgid "<Ctrl>1"
msgstr "<Ctrl>1"
-# TRANS: label for the freeform layout in the favorites view
-#. TRANS: label for the freeform layout in the favorites view
-#: ../src/view/home/HomeBox.py:334
-msgid "Freeform"
-msgstr "VrijeVorm"
-
-# TRANS: label for the ring layout in the favorites view
-#. TRANS: label for the ring layout in the favorites view
-#: ../src/view/home/HomeBox.py:341
-msgid "Ring"
-msgstr "Ring"
-
#: ../src/view/home/MeshBox.py:97
msgid "Connect"
msgstr "Verbinden"
@@ -181,32 +167,34 @@ msgstr "Verbinding verbreken"
msgid "Disconnecting..."
msgstr "Verbinding verbreken..."
-#: ../src/view/home/MeshBox.py:152
+#: ../src/view/home/MeshBox.py:159
msgid "Connecting..."
msgstr "Verbinden..."
+# TODO: show the channel number
#. TODO: show the channel number
-#: ../src/view/home/MeshBox.py:159
+#: ../src/view/home/MeshBox.py:166
msgid "Connected"
msgstr "Verbonden"
-#. only temporarily
-#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:51
-#: ../src/view/devices/network/mesh.py:92
-#: ../src/view/devices/network/mesh.py:96
+#: ../src/view/home/MeshBox.py:218 ../src/view/devices/network/mesh.py:41
+#: ../src/view/devices/network/mesh.py:68
+#: ../src/view/devices/network/mesh.py:72
msgid "Mesh Network"
msgstr "Mesh netwerk"
-#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:160
-#: ../src/view/devices/network/mesh.py:125
+#: ../src/view/home/MeshBox.py:221 ../src/view/devices/network/wireless.py:125
+#: ../src/view/devices/network/mesh.py:89
msgid "Disconnect..."
msgstr "Verbinding verbreken..."
-#: ../src/view/home/MeshBox.py:302 ../src/view/palettes.py:61
+#. TRANS: Action label for resuming an activity.
+#: ../src/view/home/MeshBox.py:309 ../src/view/palettes.py:61
+#: ../src/journal/journaltoolbox.py:399 ../src/journal/palettes.py:57
msgid "Resume"
msgstr "Hervatten"
-#: ../src/view/home/MeshBox.py:307 ../src/view/frame/activitiestray.py:205
+#: ../src/view/home/MeshBox.py:314 ../src/view/frame/activitiestray.py:206
msgid "Join"
msgstr "Bijvoegen"
@@ -235,24 +223,19 @@ msgstr "Opgeladen"
msgid "My Speakers"
msgstr "Mijn Speakers"
-#: ../src/view/devices/speaker.py:119
+#: ../src/view/devices/speaker.py:125
msgid "Unmute"
msgstr "Ontdempen"
-#: ../src/view/devices/speaker.py:122
+#: ../src/view/devices/speaker.py:128
msgid "Mute"
msgstr "Dempen"
-#: ../src/view/devices/network/wireless.py:37
-#, python-format
-msgid "IP address: %s"
-msgstr "IP adres: %s"
-
-#: ../src/view/devices/network/wireless.py:86
+#: ../src/view/devices/network/wireless.py:67
msgid "Disconnected"
msgstr "Verbinding verbroken"
-#: ../src/view/devices/network/wireless.py:178
+#: ../src/view/devices/network/wireless.py:143
msgid "Channel"
msgstr "Kanaal"
@@ -291,7 +274,9 @@ msgstr "sugar-control-panel: sleutel=%s is geen beschikbare optie"
msgid "sugar-control-panel: %s"
msgstr "sugar-control-panel: %s"
-#: ../src/controlpanel/cmd.py:33
+#. TRANS: Translators, there's a empty line at the end of this string,
+#. which must appear in the translated string (msgstr) as well.
+#: ../src/controlpanel/cmd.py:35
msgid ""
"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
" Control for the sugar environment. \n"
@@ -315,156 +300,111 @@ msgstr ""
" -c sleutel wis de huidige waarde van de sleutel \n"
" "
-#: ../src/controlpanel/cmd.py:46
+#: ../src/controlpanel/cmd.py:48
msgid "To apply your changes you have to restart sugar.\n"
-msgstr "Om uw veranderingen toe te passen moet u sugar herstarten.\r\n"
+msgstr "Om je veranderingen toe te passen moet je sugar herstarten.\n"
-#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:296
+#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:305
msgid "Ok"
msgstr "Ok"
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:268
+#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:265
msgid "Changes require restart"
msgstr "Verandering vereist een herstart"
-#: ../src/controlpanel/gui.py:267
+#: ../src/controlpanel/gui.py:264
msgid "Warning"
msgstr "Waarschuwing"
-#: ../src/controlpanel/gui.py:271
+#: ../src/controlpanel/gui.py:268
msgid "Cancel changes"
msgstr "Veranderingen annuleren"
-#: ../src/controlpanel/gui.py:280
+#: ../src/controlpanel/gui.py:277
msgid "Restart now"
msgstr "Herstart nu"
-#: ../src/controlpanel/model/aboutme.py:44
+#: ../src/controlpanel/aboutme/model.py:44
msgid "You must enter a name."
-msgstr "U moet een naam invoeren."
+msgstr "Je moet een naam invoeren."
-#: ../src/controlpanel/model/aboutme.py:69
+#: ../src/controlpanel/aboutme/model.py:69
#, python-format
msgid "stroke: color=%s hue=%s"
msgstr "streep: kleur=%s tint=%s"
-#: ../src/controlpanel/model/aboutme.py:72
+#: ../src/controlpanel/aboutme/model.py:72
#, python-format
msgid "stroke: %s"
msgstr "streep: %s"
-#: ../src/controlpanel/model/aboutme.py:74
+#: ../src/controlpanel/aboutme/model.py:74
#, python-format
msgid "fill: color=%s hue=%s"
msgstr "vulling: kleur=%s tint=%s"
-#: ../src/controlpanel/model/aboutme.py:76
+#: ../src/controlpanel/aboutme/model.py:76
#, python-format
msgid "fill: %s"
msgstr "vulling: %s"
-#: ../src/controlpanel/model/aboutme.py:87
+#: ../src/controlpanel/aboutme/model.py:87
msgid "Error in specified color modifiers."
msgstr "Fout in opgegeven kleurenmodificaties."
-#: ../src/controlpanel/model/aboutme.py:90
+#: ../src/controlpanel/aboutme/model.py:90
msgid "Error in specified colors."
msgstr "Fout in opgegeven kleuren."
-#: ../src/controlpanel/model/aboutxo.py:24
-msgid "Not available"
-msgstr "Niet beschikbaar"
-
-#: ../src/controlpanel/model/datetime.py:85
-msgid "Error timezone does not exist."
-msgstr "Fout tijdzone bestaat niet."
-
-#: ../src/controlpanel/model/frame.py:38 ../src/controlpanel/model/frame.py:60
-msgid "Value must be an integer."
-msgstr "Waarde moet een geheel getal zijn."
-
-#: ../src/controlpanel/model/language.py:28
-msgid "Could not access ~/.i18n. Create standard settings."
-msgstr "Kon niet bij ~/.i18n komen. Standaard instellingen aanmaken."
-
-#: ../src/controlpanel/model/language.py:110
-#, python-format
-msgid "Language for code=%s could not be determined."
-msgstr "Taal voor code=%s kon niet bepaald worden."
-
-#: ../src/controlpanel/model/language.py:127
-#, python-format
-msgid "Sorry I do not speak '%s'."
-msgstr "Sorry, I spreek geen '%s'."
-
-#: ../src/controlpanel/model/network.py:48
-msgid "You must enter a server."
-msgstr "U moet een server opgeven."
-
-#: ../src/controlpanel/model/network.py:63
-msgid "State is unknown."
-msgstr "Status is onbekend."
-
-#: ../src/controlpanel/model/network.py:83
-msgid "Error in specified radio argument use on/off."
-msgstr "Fout in opgegeven keuze argument gebruik aan/uit."
-
-#: ../src/controlpanel/model/power.py:57
-msgid "Error in automatic pm argument, use on/off."
-msgstr "Fout in automatisch energiebeheer argument, gebruik on/off."
-
-#: ../src/controlpanel/model/power.py:86
-msgid "Error in extreme pm argument, use on/off."
-msgstr "Fout in extreem energiebeheer argument, gebruik on/off."
-
-#: ../src/controlpanel/view/aboutme.py:32
+#: ../src/controlpanel/aboutme/view.py:32
+#: ../src/controlpanel/aboutme/__init__.py:22
msgid "About Me"
msgstr "Over mij"
-#: ../src/controlpanel/view/aboutme.py:134
+#: ../src/controlpanel/aboutme/view.py:134
msgid "Click to change your color:"
msgstr "Klik om de kleur te veranderen:"
-#: ../src/controlpanel/view/aboutxo.py:28
-msgid "About my XO"
-msgstr "Over mijn XO"
+#: ../src/controlpanel/aboutxo/model.py:24
+msgid "Not available"
+msgstr "Niet beschikbaar"
-#: ../src/controlpanel/view/aboutxo.py:59
+#: ../src/controlpanel/aboutxo/view.py:55
msgid "Identity"
msgstr "Identiteit"
-#: ../src/controlpanel/view/aboutxo.py:68
+#: ../src/controlpanel/aboutxo/view.py:64
msgid "Serial Number:"
msgstr "Serienummer:"
-#: ../src/controlpanel/view/aboutxo.py:91
+#: ../src/controlpanel/aboutxo/view.py:87
msgid "Software"
msgstr "Software"
-#: ../src/controlpanel/view/aboutxo.py:100
+#: ../src/controlpanel/aboutxo/view.py:96
msgid "Build:"
msgstr "Bouw:"
-#: ../src/controlpanel/view/aboutxo.py:115
+#: ../src/controlpanel/aboutxo/view.py:111
msgid "Sugar:"
msgstr "Sugar:"
-#: ../src/controlpanel/view/aboutxo.py:130
+#: ../src/controlpanel/aboutxo/view.py:126
msgid "Firmware:"
msgstr "Firmware:"
-#: ../src/controlpanel/view/aboutxo.py:152
+#: ../src/controlpanel/aboutxo/view.py:148
msgid "Copyright and License"
msgstr "Copyright en licentie"
-#: ../src/controlpanel/view/aboutxo.py:160
+#: ../src/controlpanel/aboutxo/view.py:156
msgid ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
msgstr ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; en anderen die "
"bijgedragen hebben."
-#: ../src/controlpanel/view/aboutxo.py:166
+#: ../src/controlpanel/aboutxo/view.py:163
msgid ""
"Sugar is the graphical user interface that you are looking at. Sugar is free "
"software, covered by the GNU General Public License, and you are welcome to "
@@ -472,157 +412,241 @@ msgid ""
"therein."
msgstr ""
"Sugar is de grafische gebruikersinterface waar je momenteel naar kijkt. "
-"Sugar is vrije software, uitgegeven onder de GNU General Public License, en "
-"u mag het aanpassen en/of kopieën distribueren onder de condities vermeld "
-"in de licentie."
+"Sugar is vrije software, uitgegeven onder de GNU General Public License, en "
+"je mag het aanpassen en/of kopieën distribueren onder de condities zoals "
+"vermeld in de licentie."
-#: ../src/controlpanel/view/aboutxo.py:178
+#: ../src/controlpanel/aboutxo/view.py:175
msgid "Full license:"
msgstr "Volledige licentie:"
-#: ../src/controlpanel/view/datetime.py:29
-msgid "Date & Time"
-msgstr "Datum en Tijd"
+#: ../src/controlpanel/aboutxo/__init__.py:21
+msgid "About my XO"
+msgstr "Over mijn XO"
-#: ../src/controlpanel/view/datetime.py:72
+#: ../src/controlpanel/datetime/model.py:89
+msgid "Error timezone does not exist."
+msgstr "Fout tijdzone bestaat niet."
+
+#: ../src/controlpanel/datetime/view.py:68
msgid "Timezone"
msgstr "Tijdzone"
-#: ../src/controlpanel/view/frame.py:28
-msgid "Frame"
-msgstr "Kader"
+#: ../src/controlpanel/datetime/__init__.py:21
+msgid "Date & Time"
+msgstr "Datum en Tijd"
+
+#: ../src/controlpanel/frame/model.py:38 ../src/controlpanel/frame/model.py:60
+msgid "Value must be an integer."
+msgstr "Waarde moet een geheel getal zijn."
-#: ../src/controlpanel/view/frame.py:30
+#: ../src/controlpanel/frame/view.py:26
msgid "never"
-msgstr "Nooit"
+msgstr "nooit"
-#: ../src/controlpanel/view/frame.py:31
+#: ../src/controlpanel/frame/view.py:27
msgid "instantaneous"
msgstr "direct"
-#: ../src/controlpanel/view/frame.py:32
+#: ../src/controlpanel/frame/view.py:28
#, python-format
msgid "%s seconds"
msgstr "%s seconden"
-#: ../src/controlpanel/view/frame.py:56
+#: ../src/controlpanel/frame/view.py:52
msgid "Activation Delay"
msgstr "Activatievertraging"
-#: ../src/controlpanel/view/frame.py:80
+#: ../src/controlpanel/frame/view.py:76
msgid "Corner"
msgstr "Hoek"
-#: ../src/controlpanel/view/frame.py:115
+#: ../src/controlpanel/frame/view.py:111
msgid "Edge"
msgstr "Ribbe"
-#: ../src/controlpanel/view/language.py:29
-#: ../src/controlpanel/view/language.py:74
+#: ../src/controlpanel/frame/__init__.py:21
+msgid "Frame"
+msgstr "Kader"
+
+#: ../src/controlpanel/language/model.py:28
+msgid "Could not access ~/.i18n. Create standard settings."
+msgstr "Kon niet bij ~/.i18n komen. Standaard instellingen aanmaken."
+
+#: ../src/controlpanel/language/model.py:114
+#, python-format
+msgid "Language for code=%s could not be determined."
+msgstr "Taal voor code=%s kon niet bepaald worden."
+
+#: ../src/controlpanel/language/model.py:131
+#, python-format
+msgid "Sorry I do not speak '%s'."
+msgstr "Sorry, I spreek geen '%s'."
+
+#: ../src/controlpanel/language/view.py:70
+#: ../src/controlpanel/language/__init__.py:21
msgid "Language"
msgstr "Taal"
-#: ../src/controlpanel/view/network.py:28
+#: ../src/controlpanel/network/model.py:62
+msgid "State is unknown."
+msgstr "Status is onbekend."
+
+#: ../src/controlpanel/network/model.py:82
+msgid "Error in specified radio argument use on/off."
+msgstr "Fout in opgegeven keuze argument gebruik aan/uit."
+
+#: ../src/controlpanel/network/view.py:28
+#: ../src/controlpanel/network/__init__.py:21
msgid "Network"
msgstr "Netwerk"
-#: ../src/controlpanel/view/network.py:53
+#: ../src/controlpanel/network/view.py:54
msgid "Wireless"
msgstr "Draadloos"
-#: ../src/controlpanel/view/network.py:61
-msgid "Radio:"
-msgstr "Radio:"
+#: ../src/controlpanel/network/view.py:62
+msgid "Turn of the wireless radio to save battery life"
+msgstr "Draadloze zender uitzetten om de batterij te besparen"
-#: ../src/controlpanel/view/network.py:94
+#: ../src/controlpanel/network/view.py:75
+msgid "Radio"
+msgstr "Zender"
+
+#: ../src/controlpanel/network/view.py:91
+msgid "Discard network history if you have trouble connecting to the network"
+msgstr ""
+"Gooi de netwerkgeschiedenis weg als je problemen hebt om met het netwerk te "
+"verbinden"
+
+#: ../src/controlpanel/network/view.py:100
+msgid "Discard network history"
+msgstr "Netwerkgeschiedenis weggooien"
+
+#: ../src/controlpanel/network/view.py:113
msgid "Mesh"
msgstr "Mesh"
-#: ../src/controlpanel/view/network.py:103
+#: ../src/controlpanel/network/view.py:122
msgid "Server:"
msgstr "Server:"
-#: ../src/controlpanel/view/power.py:27
-msgid "Power"
-msgstr "Energie"
+#: ../src/controlpanel/power/model.py:55
+msgid "Error in automatic pm argument, use on/off."
+msgstr "Fout in automatisch energiebeheer argument, gebruik on/off."
+
+#: ../src/controlpanel/power/model.py:84
+msgid "Error in extreme pm argument, use on/off."
+msgstr "Fout in extreem energiebeheer argument, gebruik on/off."
-#: ../src/controlpanel/view/power.py:51
+#: ../src/controlpanel/power/view.py:47
msgid "Power management"
msgstr "Energiebeheer"
-#: ../src/controlpanel/view/power.py:61
+#: ../src/controlpanel/power/view.py:57
msgid "Automatic power management (increases battery life)"
msgstr "Automatisch energiebeheer (verhoogt gebruiksduur accu)"
-#: ../src/controlpanel/view/power.py:89
+#: ../src/controlpanel/power/view.py:85
msgid ""
-"Extreme power management (disables wireless radio, increases battery life)"
+"Extreme power management (disableswireless radio, increases battery life)"
msgstr ""
-"Extreem energiebeheer (deactiveert draadloze radio, verhoogt gebruiksduur "
+"Extreem energiebeheer (deactiveert draadloze zender, verhoogt gebruiksduur "
"accu)"
-#: ../src/view/devices/network/mesh.py:154
+#: ../src/controlpanel/power/__init__.py:21
+msgid "Power"
+msgstr "Energie"
+
+#: ../src/view/devices/network/mesh.py:111
msgid "Connected to a School Mesh Portal"
msgstr "Verbonden met een School Mesh Portaal"
-#: ../src/view/devices/network/mesh.py:156
+#: ../src/view/devices/network/mesh.py:113
msgid "Looking for a School Mesh Portal..."
msgstr "Zoeken naar een School Mesh Portaal..."
-#: ../src/view/devices/network/mesh.py:159
+#: ../src/view/devices/network/mesh.py:116
msgid "Connected to an XO Mesh Portal"
msgstr "Verbonden met een XO Mesh Portaal"
-#: ../src/view/devices/network/mesh.py:161
+#: ../src/view/devices/network/mesh.py:118
msgid "Looking for an XO Mesh Portal..."
msgstr "Zoeken naar een XO Mesh Portaal..."
-#: ../src/view/devices/network/mesh.py:164
+#: ../src/view/devices/network/mesh.py:121
msgid "Connected to a Simple Mesh"
msgstr "Verbinden met een Eenvoudige Mesh"
-#: ../src/view/devices/network/mesh.py:166
+#: ../src/view/devices/network/mesh.py:123
msgid "Starting a Simple Mesh"
msgstr "Start een Eenvoudige Mesh"
-#: ../src/view/devices/network/mesh.py:173
+#: ../src/view/devices/network/mesh.py:130
msgid "Unknown Mesh"
msgstr "Onbekende Mesh"
-#: ../src/view/frame/activitiestray.py:210
+#: ../src/view/frame/activitiestray.py:211
msgid "Decline"
msgstr "Weigeren"
-#: ../src/view/home/favoritesview.py:287
+# TRANS: label for the freeform layout in the favorites view
+#. TRANS: label for the freeform layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:107
+msgid "Freeform"
+msgstr "VrijeVorm"
+
+# TRANS: label for the ring layout in the favorites view
+#. TRANS: label for the ring layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:189
+msgid "Ring"
+msgstr "Ring"
+
+#. TRANS: label for the spiral layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:334
+msgid "Spiral"
+msgstr "Spiraal"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:401
+msgid "Box"
+msgstr "Vierkant"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:442
+msgid "Triangle"
+msgstr "Driehoek"
+
+#: ../src/view/home/favoritesview.py:295
msgid "Registration Failed"
msgstr "Registratie mislukt"
-#: ../src/view/home/favoritesview.py:288
+#: ../src/view/home/favoritesview.py:296
#, python-format
msgid "%s"
msgstr "%s"
-#: ../src/view/home/favoritesview.py:290
+#: ../src/view/home/favoritesview.py:298
msgid "Registration Successful"
msgstr "Registratie succesvol uitgevoerd"
-#: ../src/view/home/favoritesview.py:291
+#: ../src/view/home/favoritesview.py:299
msgid "You are now registered with your school server."
msgstr "Je bent nu geregistreerd bij je schoolserver."
-#: ../src/view/home/favoritesview.py:407
-msgid "Control Panel"
-msgstr "Configuratiepaneel"
+#: ../src/view/home/favoritesview.py:420
+msgid "Settings"
+msgstr "Instellingen"
-#: ../src/view/home/favoritesview.py:418
+#: ../src/view/home/favoritesview.py:425
msgid "Restart"
msgstr "Herstarten"
-#: ../src/view/home/favoritesview.py:423
+#: ../src/view/home/favoritesview.py:430
msgid "Shutdown"
msgstr "Afsluiten"
-#: ../src/view/home/favoritesview.py:429
+#: ../src/view/home/favoritesview.py:436
msgid "Register"
msgstr "Registreren"
@@ -634,27 +658,153 @@ msgstr "Beginnen..."
msgid "Stop"
msgstr "Stop"
-#: ../src/view/palettes.py:104
+#. TRANS: Action label for starting an entry.
+#: ../src/view/palettes.py:104 ../src/journal/journaltoolbox.py:402
+#: ../src/journal/palettes.py:59
msgid "Start"
msgstr "Start"
-#: ../src/view/palettes.py:132
+#: ../src/view/palettes.py:138
msgid "Remove favorite"
msgstr "Verwijder favoriet"
-#: ../src/view/palettes.py:136
+#: ../src/view/palettes.py:142
msgid "Make favorite"
msgstr "Maak favoriet"
-#: ../src/view/palettes.py:185
+#: ../src/view/palettes.py:191
msgid "Show contents"
msgstr "Inhoud weergeven"
-#: ../src/view/palettes.py:209
+#: ../src/view/palettes.py:215
#, python-format
msgid "%(free_space)d MB Free"
msgstr "%(free_space)d MB vrij"
+#: ../src/journal/journaltoolbox.py:62
+msgid "Search"
+msgstr "Zoeken"
+
+#: ../src/journal/journaltoolbox.py:119
+msgid "Anytime"
+msgstr "Ieder tijdstip"
+
+#: ../src/journal/journaltoolbox.py:121
+msgid "Today"
+msgstr "Vandaag"
+
+#: ../src/journal/journaltoolbox.py:123
+msgid "Since yesterday"
+msgstr "Sinds gisteren"
+
+#. TRANS: Filter entries modified during the last 7 days.
+#: ../src/journal/journaltoolbox.py:125
+msgid "Past week"
+msgstr "Afgelopen week"
+
+#. TRANS: Filter entries modified during the last 30 days.
+#: ../src/journal/journaltoolbox.py:127
+msgid "Past month"
+msgstr "Afgelopen maand"
+
+#. TRANS: Filter entries modified during the last 356 days.
+#: ../src/journal/journaltoolbox.py:129
+msgid "Past year"
+msgstr "Afgelopen jaar"
+
+#: ../src/journal/journaltoolbox.py:136
+msgid "Anyone"
+msgstr "Iedereen"
+
+#: ../src/journal/journaltoolbox.py:138
+msgid "My friends"
+msgstr "Mijn vrienden"
+
+#: ../src/journal/journaltoolbox.py:139
+msgid "My class"
+msgstr "Mijn klas"
+
+#. TRANS: Item in a combo box that filters by entry type.
+#: ../src/journal/journaltoolbox.py:255
+msgid "Anything"
+msgstr "Alles"
+
+#. TODO: Add "Start with" menu item
+#: ../src/journal/journaltoolbox.py:325 ../src/journal/palettes.py:67
+msgid "Copy"
+msgstr "Kopieer"
+
+#: ../src/journal/collapsedentry.py:248 ../src/journal/expandedentry.py:176
+#: ../src/journal/palettes.py:51
+msgid "Untitled"
+msgstr "Naamloos"
+
+#: ../src/journal/journalactivity.py:119 ../src/journal/volumesmanager.py:57
+msgid "Journal"
+msgstr "Dagboek"
+
+#: ../src/journal/expandedentry.py:222
+msgid "No preview"
+msgstr "Geen voorbeeld"
+
+#: ../src/journal/expandedentry.py:241
+msgid "Participants:"
+msgstr "Deelnemers:"
+
+#: ../src/journal/expandedentry.py:266
+msgid "Description:"
+msgstr "Omschrijving:"
+
+#: ../src/journal/expandedentry.py:292
+msgid "Tags:"
+msgstr "Labels:"
+
+#: ../src/journal/objectchooser.py:134
+msgid "Choose an object"
+msgstr "Kies een object"
+
+#: ../src/journal/objectchooser.py:139
+msgid "Close"
+msgstr "Sluiten"
+
+#: ../src/journal/volumestoolbar.py:93
+msgid "Unmount"
+msgstr "Loskoppelen"
+
+#: ../src/journal/misc.py:95
+msgid "No date"
+msgstr "Geen datum"
+
+#: ../src/journal/listview.py:39
+msgid "Your Journal is empty"
+msgstr "Je dagboek is leeg"
+
+#: ../src/journal/listview.py:40
+msgid "No matching entries "
+msgstr "Geen overeenkomende ingangen "
+
+#: ../src/journal/modalalert.py:59
+msgid "Your Journal is full"
+msgstr "Je dagboek is vol"
+
+#: ../src/journal/modalalert.py:63
+msgid "Please delete some old Journal entries to make space for new ones."
+msgstr "Verwijder a.u.b. oude dagboekingangen om ruimte te maken voor nieuwe."
+
+#: ../src/journal/modalalert.py:75
+msgid "Show Journal"
+msgstr "Dagboek weergeven"
+
+#, python-format
+#~ msgid "Clipboard object: %s."
+#~ msgstr "Klembord object: %s."
+
+#~ msgid "You must enter a server."
+#~ msgstr "U moet een server opgeven."
+
+#~ msgid "Control Panel"
+#~ msgstr "Configuratiepaneel"
+
#~ msgid "<Ctrl>R"
#~ msgstr "<Ctrl>R"
@@ -676,9 +826,6 @@ msgstr "%(free_space)d MB vrij"
#~ msgid "Redo"
#~ msgstr "Doe opnieuw"
-#~ msgid "Copy"
-#~ msgstr "Kopieer"
-
#~ msgid "Paste"
#~ msgstr "Plak"
diff --git a/po/pt.po b/po/pt.po
index f301db2..98808ba 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-19 00:30-0400\n"
-"PO-Revision-Date: 2008-09-19 14:58-0400\n"
+"POT-Creation-Date: 2008-09-01 18:31-0400\n"
+"PO-Revision-Date: 2008-09-02 10:35-0400\n"
"Last-Translator: Eduardo H. Silva <HoboPrimate@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
@@ -35,15 +35,15 @@ msgstr "Finalizar"
msgid "Next"
msgstr "Próximo"
-#: ../src/view/BuddyMenu.py:60
+#: ../src/view/BuddyMenu.py:58
msgid "Remove friend"
msgstr "Remover amigo"
-#: ../src/view/BuddyMenu.py:63
+#: ../src/view/BuddyMenu.py:61
msgid "Make friend"
msgstr "Fazer amigo"
-#: ../src/view/BuddyMenu.py:92
+#: ../src/view/BuddyMenu.py:90
#, python-format
msgid "Invite to %s"
msgstr "Convidar para %s"
@@ -64,7 +64,7 @@ msgstr "Abrir"
#. TODO: Implement stopping downloads
#. self._stop_item.connect('activate', self._stop_item_activate_cb)
#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:85
+#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:87
msgid "Keep"
msgstr "Guardar"
@@ -101,61 +101,71 @@ msgstr "Não foi possível ligar ao servidor."
msgid "The server could not complete the request."
msgstr "Não foi possível ao servidor completar o pedido."
-#: ../src/view/Shell.py:251
+#: ../src/view/Shell.py:262
msgid "Screenshot"
msgstr "Imagem do Ecrã"
-#: ../src/view/home/HomeBox.py:79
+#: ../src/view/home/HomeBox.py:81
msgid "Confirm erase"
msgstr "Confirmação de apagar"
-#: ../src/view/home/HomeBox.py:81
+#: ../src/view/home/HomeBox.py:83
#, python-format
msgid "Confirm erase: Do you want to permanently erase %s?"
msgstr "Confirmação de apagar: Queres apagar permanentemente %s?"
-#: ../src/view/home/HomeBox.py:88 ../src/view/palettes.py:120
+#: ../src/view/home/HomeBox.py:90 ../src/view/palettes.py:120
msgid "Erase"
msgstr "Apagar"
-#: ../src/view/home/HomeBox.py:118
+#: ../src/view/home/HomeBox.py:120
msgid "Software Update"
msgstr "Actualização do Software"
-#: ../src/view/home/HomeBox.py:119
+#: ../src/view/home/HomeBox.py:121
msgid "Update your activities to ensure compatibility with your new software"
msgstr ""
"Actualiza as tuas actividades para assegurar compatibilidade com o teu novo "
"software"
-#: ../src/view/home/HomeBox.py:123 ../src/controlpanel/toolbar.py:115
+#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/toolbar.py:115
msgid "Cancel"
msgstr "Cancelar"
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/gui.py:286
+#: ../src/view/home/HomeBox.py:127 ../src/controlpanel/gui.py:276
msgid "Later"
msgstr "Mais tarde"
-#: ../src/view/home/HomeBox.py:128
+#: ../src/view/home/HomeBox.py:130
msgid "Check now"
msgstr "Verificar agora"
-#: ../src/view/home/HomeBox.py:262
+#: ../src/view/home/HomeBox.py:266
msgid "List view"
msgstr "Vista de Lista"
-#: ../src/view/home/HomeBox.py:263
+#: ../src/view/home/HomeBox.py:267
msgid "<Ctrl>2"
msgstr "<Ctrl>2"
-#: ../src/view/home/HomeBox.py:321
+#: ../src/view/home/HomeBox.py:325
msgid "Favorites view"
msgstr "Vista de Favoritos"
-#: ../src/view/home/HomeBox.py:322
+#: ../src/view/home/HomeBox.py:326
msgid "<Ctrl>1"
msgstr "<Ctrl>1"
+#. TRANS: label for the freeform layout in the favorites view
+#: ../src/view/home/HomeBox.py:334
+msgid "Freeform"
+msgstr "Livre"
+
+#. TRANS: label for the ring layout in the favorites view
+#: ../src/view/home/HomeBox.py:341
+msgid "Ring"
+msgstr "Anel"
+
#: ../src/view/home/MeshBox.py:97
msgid "Connect"
msgstr "Ligar"
@@ -316,25 +326,25 @@ msgstr ""
#: ../src/controlpanel/cmd.py:46
msgid "To apply your changes you have to restart sugar.\n"
-msgstr "Para aplicar as alterações tens que reiniciar o sugar.\n"
+msgstr "Para aplicar as mudanças tens que reiniciar o sugar.\n"
-#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:305
+#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:296
msgid "Ok"
msgstr "Ok"
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:278
+#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:268
msgid "Changes require restart"
-msgstr "As alterações feitas necessitam que reinicies"
+msgstr "As mudanças necessitam que reinicies"
-#: ../src/controlpanel/gui.py:277
+#: ../src/controlpanel/gui.py:267
msgid "Warning"
msgstr "Aviso"
-#: ../src/controlpanel/gui.py:281
+#: ../src/controlpanel/gui.py:271
msgid "Cancel changes"
-msgstr "Cancelar alterações"
+msgstr "Cancelar mudanças"
-#: ../src/controlpanel/gui.py:290
+#: ../src/controlpanel/gui.py:280
msgid "Restart now"
msgstr "Reiniciar agora"
@@ -374,7 +384,7 @@ msgstr "Erro nas cores especificadas."
msgid "Not available"
msgstr "Não disponível"
-#: ../src/controlpanel/model/datetime.py:89
+#: ../src/controlpanel/model/datetime.py:85
msgid "Error timezone does not exist."
msgstr "Erro: fuso horário não existe."
@@ -386,21 +396,25 @@ msgstr "Valor tem que ser um número inteiro."
msgid "Could not access ~/.i18n. Create standard settings."
msgstr "Não foi possível aceder a ~/.i18n. Cria definições normais."
-#: ../src/controlpanel/model/language.py:114
+#: ../src/controlpanel/model/language.py:110
#, python-format
msgid "Language for code=%s could not be determined."
msgstr "Não foi possível determinar a linguagem para o código=%s."
-#: ../src/controlpanel/model/language.py:131
+#: ../src/controlpanel/model/language.py:127
#, python-format
msgid "Sorry I do not speak '%s'."
msgstr "Desculpa, eu não falo '%s'."
-#: ../src/controlpanel/model/network.py:62
+#: ../src/controlpanel/model/network.py:48
+msgid "You must enter a server."
+msgstr "Precisas de introduzir um servidor."
+
+#: ../src/controlpanel/model/network.py:63
msgid "State is unknown."
msgstr "O estado é desconhecido."
-#: ../src/controlpanel/model/network.py:82
+#: ../src/controlpanel/model/network.py:83
msgid "Error in specified radio argument use on/off."
msgstr "Erro no argumento de rádio especificado, utiliza on/off."
@@ -458,7 +472,7 @@ msgid ""
msgstr ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; e Contribuidores."
-#: ../src/controlpanel/view/aboutxo.py:167
+#: ../src/controlpanel/view/aboutxo.py:166
msgid ""
"Sugar is the graphical user interface that you are looking at. Sugar is free "
"software, covered by the GNU General Public License, and you are welcome to "
@@ -467,10 +481,10 @@ msgid ""
msgstr ""
"O Sugar é a interface gráfica de utilizador que estás a utilizar. O Sugar é "
"software livre, licenciado sob a GNU General Public License, e és bem vindo "
-"a fazer alterações a ele e/ou a distribuir cópias dele, segundo certas "
-"condições descritas a seguir."
+"a fazer mudanças a ele e/ou distribuir cópias dele, segundo certas condições "
+"descritas a seguir."
-#: ../src/controlpanel/view/aboutxo.py:179
+#: ../src/controlpanel/view/aboutxo.py:178
msgid "Full license:"
msgstr "Licença Completa:"
@@ -520,33 +534,19 @@ msgstr "Linguagem"
msgid "Network"
msgstr "Rede"
-#: ../src/controlpanel/view/network.py:54
+#: ../src/controlpanel/view/network.py:53
msgid "Wireless"
msgstr "Rede sem fios"
-#: ../src/controlpanel/view/network.py:62
-msgid "Turn of the wireless radio to save battery life"
-msgstr "Desliga o rádio da rede sem fios para aumentar o tempo de bateria"
-
-#: ../src/controlpanel/view/network.py:75
-msgid "Radio"
-msgstr "Rádio"
+#: ../src/controlpanel/view/network.py:61
+msgid "Radio:"
+msgstr "Rádio:"
-#: ../src/controlpanel/view/network.py:91
-msgid "Discard network history if you have trouble connecting to the network"
-msgstr ""
-"Descarta o histórico da configuração de rede se tiveres problemas em ligar-"
-"te à rede"
-
-#: ../src/controlpanel/view/network.py:100
-msgid "Discard network history"
-msgstr "Descartar histórico da configuração de rede"
-
-#: ../src/controlpanel/view/network.py:113
+#: ../src/controlpanel/view/network.py:94
msgid "Mesh"
msgstr "Mesh"
-#: ../src/controlpanel/view/network.py:122
+#: ../src/controlpanel/view/network.py:103
msgid "Server:"
msgstr "Servidor:"
@@ -601,36 +601,36 @@ msgstr "Mesh Desconhecida"
msgid "Decline"
msgstr "Recusar"
-#: ../src/view/home/favoritesview.py:296
+#: ../src/view/home/favoritesview.py:287
msgid "Registration Failed"
msgstr "O Registro Falhou"
-#: ../src/view/home/favoritesview.py:297
+#: ../src/view/home/favoritesview.py:288
#, python-format
msgid "%s"
msgstr "%s"
-#: ../src/view/home/favoritesview.py:299
+#: ../src/view/home/favoritesview.py:290
msgid "Registration Successful"
msgstr "O Registro teve Sucesso"
-#: ../src/view/home/favoritesview.py:300
+#: ../src/view/home/favoritesview.py:291
msgid "You are now registered with your school server."
msgstr "Estás agora registrado com o teu servidor de escola."
-#: ../src/view/home/favoritesview.py:420
+#: ../src/view/home/favoritesview.py:407
msgid "Control Panel"
msgstr "Painel de Controlo"
-#: ../src/view/home/favoritesview.py:425
+#: ../src/view/home/favoritesview.py:418
msgid "Restart"
msgstr "Reiniciar"
-#: ../src/view/home/favoritesview.py:430
+#: ../src/view/home/favoritesview.py:423
msgid "Shutdown"
msgstr "Desligar"
-#: ../src/view/home/favoritesview.py:436
+#: ../src/view/home/favoritesview.py:429
msgid "Register"
msgstr "Registrar"
@@ -646,32 +646,23 @@ msgstr "Parar"
msgid "Start"
msgstr "Iniciar"
-#: ../src/view/palettes.py:138
+#: ../src/view/palettes.py:132
msgid "Remove favorite"
msgstr "Remover favorito"
-#: ../src/view/palettes.py:142
+#: ../src/view/palettes.py:136
msgid "Make favorite"
msgstr "Tornar favorito"
-#: ../src/view/palettes.py:191
+#: ../src/view/palettes.py:185
msgid "Show contents"
msgstr "Mostrar os conteúdos"
-#: ../src/view/palettes.py:215
+#: ../src/view/palettes.py:209
#, python-format
msgid "%(free_space)d MB Free"
msgstr "%(free_space)d MB Livres"
-#~ msgid "Freeform"
-#~ msgstr "Livre"
-
-#~ msgid "Ring"
-#~ msgstr "Anel"
-
-#~ msgid "You must enter a server."
-#~ msgstr "Precisas de introduzir um servidor."
-
#~ msgid "© 2008 One Laptop per Child Assocation "
#~ msgstr "© 2008 One Laptop per Child Association"
diff --git a/po/si.po b/po/si.po
index 12ea28b..c86330e 100644
--- a/po/si.po
+++ b/po/si.po
@@ -1,341 +1,899 @@
-# SOME DESCRIPTIVE TITLE.
+# translation of sugar.po to Sinhala
+# Rashan Anushka <rashan.uoc@gmail.com>, 2008.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: sugar\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-18 18:19+0000\n"
-"PO-Revision-Date: 2008-02-07 08:42-0500\n"
+"POT-Creation-Date: 2008-09-25 00:30-0400\n"
+"PO-Revision-Date: 2008-09-30 07:45-0400\n"
"Last-Translator: Rashan Anushka <rashan.uoc@gmail.com>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language-Team: Sinhala <si@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Pootle 1.0.2\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Pootle 1.1.0rc2\n"
-#: ../shell/intro/intro.py:67
+#: ../src/intro/window.py:93 ../src/controlpanel/aboutme/view.py:100
msgid "Name:"
msgstr "නම:"
-#: ../shell/intro/intro.py:96
+#: ../src/intro/window.py:125
msgid "Click to change color:"
msgstr "පà·à¶§ වෙනස් කිරීමට ක්ලික් කරන්න:"
-#: ../shell/intro/intro.py:146
+#: ../src/intro/window.py:175 ../src/journal/detailview.py:119
msgid "Back"
msgstr "ආපසු"
-#: ../shell/intro/intro.py:160
+#: ../src/intro/window.py:189 ../src/controlpanel/toolbar.py:61
msgid "Done"
-msgstr ""
+msgstr "කළà·"
-#: ../shell/intro/intro.py:163
+#: ../src/intro/window.py:192
msgid "Next"
msgstr "ඊළඟ"
-#: ../shell/view/BuddyMenu.py:59
+#: ../src/view/BuddyMenu.py:60
msgid "Remove friend"
msgstr "මිතුර෠ඉවත් කරන්න"
-#: ../shell/view/BuddyMenu.py:62
+#: ../src/view/BuddyMenu.py:63
msgid "Make friend"
msgstr "මිතුරු වන්න"
-#: ../shell/view/BuddyMenu.py:84
+#: ../src/view/BuddyMenu.py:92
#, python-format
msgid "Invite to %s"
msgstr "%s ට අඬගහන්න"
-#: ../shell/view/clipboardmenu.py:58
+#: ../src/view/clipboardmenu.py:51
msgid "Remove"
msgstr "ඉවත් කරන්න"
-#: ../shell/view/clipboardmenu.py:63
+#: ../src/view/clipboardmenu.py:56 ../src/view/clipboardmenu.py:78
msgid "Open"
msgstr "විවෘත කරන්න"
-#. self._stop_item = MenuItem(_('Stop download'), 'stock-close')
-#. TODO: Implement stopping downloads
-#. self._stop_item.connect('activate', self._stop_item_activate_cb)
-#. self.append_menu_item(self._stop_item)
-#: ../shell/view/clipboardmenu.py:73
-msgid "Add to journal"
-msgstr "ජර්නලයට එක් කරන්න"
+# self._stop_item = MenuItem(_('Stop download'), 'stock-close')
+# TODO: Implement stopping downloads
+# self._stop_item.connect('activate', self._stop_item_activate_cb)
+# self.append_menu_item(self._stop_item)
+#: ../src/view/clipboardmenu.py:61 ../src/view/home/HomeBox.py:84
+msgid "Keep"
+msgstr "තබà·à¶œà¶±à·Šà¶±"
+
+#: ../src/view/clipboardmenu.py:83
+msgid "Open with"
+msgstr "විවෘත කළ යුත්තේ"
-#: ../shell/view/clipboardmenu.py:213
+#: ../src/view/clipboardmenu.py:228
#, python-format
-msgid "Clipboard object: %s."
-msgstr ""
+msgid "%s clipping"
+msgstr "කප්පà·à¶¯à·”à·€ %s"
-#: ../shell/hardware/keydialog.py:149
+#: ../src/hardware/keydialog.py:150
msgid "Key Type:"
msgstr "යතුරු වර්ගය:"
-#: ../shell/hardware/keydialog.py:169
+#: ../src/hardware/keydialog.py:170
msgid "Authentication Type:"
msgstr "සත්â€à¶ºà·à¶´à¶± වර්ගය:"
-#: ../shell/hardware/keydialog.py:250
+#: ../src/hardware/keydialog.py:251
msgid "Encryption Type:"
msgstr "සංකේතන වර්ගය:"
-#: ../shell/view/home/activitiesdonut.py:90
-msgid "Starting..."
-msgstr "ආරම්භවේ..."
+#: ../src/hardware/schoolserver.py:17
+msgid "Cannot obtain data needed for registration."
+msgstr "ලියà·à¶´à¶¯à·’ංචිය සඳහ෠අවà·à·Šâ€à¶º දත්ත ලබ෠ගත නොහà·à¶š."
-#: ../shell/view/home/activitiesdonut.py:104 ../shell/view/home/MeshBox.py:295
-msgid "Resume"
-msgstr "නà·à·€à¶­ ආරම්භ කරන්න"
+#: ../src/hardware/schoolserver.py:31
+msgid "Cannot connect to the server."
+msgstr "සේවà·à¶¯à·à¶ºà¶šà¶ºà¶§ සම්බන්ධ විය නොහà·à¶š."
-#: ../shell/view/home/activitiesdonut.py:111
-#: ../lib/sugar/activity/activity.py:132
-msgid "Stop"
-msgstr "නවත්වන්න"
+#: ../src/hardware/schoolserver.py:36
+msgid "The server could not complete the request."
+msgstr "සේවà·à¶¯à·à¶ºà¶šà¶ºà¶§ අයදුම සම්පූර්ණ කළ නොහà·à¶š."
-#: ../shell/view/Shell.py:285
+#: ../src/view/Shell.py:251
msgid "Screenshot"
-msgstr ""
+msgstr "තිරසටහන"
-#: ../shell/view/home/HomeBox.py:159
-msgid "Reboot"
-msgstr "යළි අරඹන්න"
+#: ../src/view/home/HomeBox.py:78
+msgid "Confirm erase"
+msgstr "මක෠දà·à¶¸à·“ම ස්ථීර කරන්න"
-#: ../shell/view/home/HomeBox.py:164
-msgid "Shutdown"
-msgstr "වස෠දමන්න"
+#: ../src/view/home/HomeBox.py:80
+#, python-format
+msgid "Confirm erase: Do you want to permanently erase %s?"
+msgstr "මක෠දà·à¶¸à·“ම ස්ථීරයි: ඔබට %s සදහටම මක෠දà·à¶¸à·“මට අවà·à·Šâ€à¶ºà¶ºà¶¯?"
-#: ../shell/view/home/HomeBox.py:170
-msgid "Register"
-msgstr "ලියà·à¶´à¶¯à·’ංචි කරන්න"
+#: ../src/view/home/HomeBox.py:87 ../src/view/palettes.py:120
+#: ../src/journal/journaltoolbox.py:335 ../src/journal/palettes.py:75
+msgid "Erase"
+msgstr "මකන්න"
-#: ../shell/view/home/HomeBox.py:175 ../shell/view/home/HomeBox.py:216
-msgid "About this XO"
-msgstr "මෙම XO ගà·à¶±"
+#: ../src/view/home/HomeBox.py:117
+msgid "Software Update"
+msgstr "මෘදුකà·à¶‚ග යà·à·€à¶­à·Šà¶šà·à¶½ කිරීම"
-#: ../shell/view/home/HomeBox.py:222
-msgid "Not available"
-msgstr "නොපවතී"
+#: ../src/view/home/HomeBox.py:118
+msgid "Update your activities to ensure compatibility with your new software"
+msgstr "ඔබගේ නව මෘදුකà·à¶‚ගය සමඟ අනුකූලතà·à·€ සඳහ෠ඔබගේ ක්â€à¶»à·’යà·à¶šà·à¶»à¶šà¶¸à·Š යà·à·€à¶­à·Šà¶šà·à¶½ කරන්න"
-#. Only show disconnect when there's a mesh device, because mesh takes
-#. priority over the normal wireless device. NM doesn't have a "disconnect"
-#. method for a device either (for various reasons) so this doesn't
-#. have a good mapping
-#: ../shell/view/home/MeshBox.py:90 ../shell/view/home/MeshBox.py:197
-#: ../shell/view/devices/network/wireless.py:113
-#: ../shell/view/devices/network/mesh.py:83
-msgid "Disconnect..."
-msgstr "විසන්ධි කරන්න..."
+#: ../src/view/home/HomeBox.py:122 ../src/controlpanel/toolbar.py:115
+msgid "Cancel"
+msgstr "අවලංගු කරන්න"
+
+#: ../src/view/home/HomeBox.py:124 ../src/controlpanel/gui.py:273
+msgid "Later"
+msgstr "පසුව"
+
+#: ../src/view/home/HomeBox.py:127
+msgid "Check now"
+msgstr "දà·à¶±à·Š පරික්ෂ෠කරන්න"
-#: ../shell/view/home/MeshBox.py:195 ../shell/view/devices/network/mesh.py:37
-#: ../shell/view/devices/network/mesh.py:62
-#: ../shell/view/devices/network/mesh.py:66
+#: ../src/view/home/HomeBox.py:261
+msgid "List view"
+msgstr "ලà·à¶ºà·’ස්තු දසුන"
+
+#: ../src/view/home/HomeBox.py:262
+msgid "<Ctrl>2"
+msgstr "<Ctrl>2"
+
+#: ../src/view/home/HomeBox.py:320
+msgid "Favorites view"
+msgstr "කà·à¶¸à¶­à·’ දසුන"
+
+#: ../src/view/home/HomeBox.py:321
+msgid "<Ctrl>1"
+msgstr "<Ctrl>1"
+
+#: ../src/view/home/MeshBox.py:97
+msgid "Connect"
+msgstr "සම්බන්ධ වෙන්න"
+
+#: ../src/view/home/MeshBox.py:106
+msgid "Disconnect"
+msgstr "විසන්ධි වන්න"
+
+# Only show disconnect when there's a mesh device, because mesh takes
+# priority over the normal wireless device. NM doesn't have a "disconnect"
+# method for a device either (for various reasons) so this doesn't
+# have a good mapping
+#: ../src/view/home/MeshBox.py:118
+msgid "Disconnecting..."
+msgstr "විසන්ධිවේ..."
+
+# Only show disconnect when there's a mesh device, because mesh takes
+# priority over the normal wireless device. NM doesn't have a "disconnect"
+# method for a device either (for various reasons) so this doesn't
+# have a good mapping
+#: ../src/view/home/MeshBox.py:159
+msgid "Connecting..."
+msgstr "සම්බන්ධවේ..."
+
+# TODO: show the channel number
+#. TODO: show the channel number
+#: ../src/view/home/MeshBox.py:166
+msgid "Connected"
+msgstr "සම්බන්ධ විය"
+
+#: ../src/view/home/MeshBox.py:218 ../src/view/devices/network/mesh.py:41
+#: ../src/view/devices/network/mesh.py:68
+#: ../src/view/devices/network/mesh.py:72
msgid "Mesh Network"
msgstr "දà·à¶½à·à·ƒ ජà·à¶½à¶º"
-#: ../shell/view/home/MeshBox.py:300
+# Only show disconnect when there's a mesh device, because mesh takes
+# priority over the normal wireless device. NM doesn't have a "disconnect"
+# method for a device either (for various reasons) so this doesn't
+# have a good mapping
+#: ../src/view/home/MeshBox.py:221 ../src/view/devices/network/wireless.py:125
+#: ../src/view/devices/network/mesh.py:89
+msgid "Disconnect..."
+msgstr "විසන්ධි කරන්න..."
+
+#. TRANS: Action label for resuming an activity.
+#: ../src/view/home/MeshBox.py:309 ../src/view/palettes.py:61
+#: ../src/journal/journaltoolbox.py:399 ../src/journal/palettes.py:57
+msgid "Resume"
+msgstr "නà·à·€à¶­ ආරම්භ කරන්න"
+
+#: ../src/view/home/MeshBox.py:314 ../src/view/frame/activitiestray.py:206
msgid "Join"
msgstr "සම්බන්ධ වෙන්න"
-#: ../shell/view/devices/battery.py:38
-msgid "My Battery life"
-msgstr "මගේ බà·à¶§à¶»à·’ ආයු කà·à¶½à¶º"
+#: ../src/view/devices/battery.py:45
+msgid "My Battery"
+msgstr "මගේ බà·à¶§à¶»à·’ය"
-#: ../shell/view/devices/battery.py:94
-msgid "Battery charging"
-msgstr "බà·à¶§à¶»à·’ය ආරà·à¶´à¶«à¶º වේ"
+#: ../src/view/devices/battery.py:114
+msgid "Charging"
+msgstr "ආරà·à¶´à¶±à¶º වේ"
-#: ../shell/view/devices/battery.py:96
-msgid "Battery discharging"
-msgstr "බà·à¶§à¶»à·’ය විසර්ජනය වේ"
+#: ../src/view/devices/battery.py:117
+msgid "Very little power remaining"
+msgstr "ඉත෠සුළු බලයක් පවතී"
-#: ../shell/view/devices/battery.py:98
-msgid "Battery fully charged"
-msgstr "බà·à¶§à¶»à·’ය සම්පූර්ණයෙන්ම ආරà·à¶´à·’තයි"
+#: ../src/view/devices/battery.py:123
+#, python-format
+msgid "%(hour)d:%(min).2d remaining"
+msgstr "%(hour)d:%(min).2d ඉතිරියි"
+
+#: ../src/view/devices/battery.py:127
+msgid "Charged"
+msgstr "ආරà·à¶´à·’තයි"
+
+#: ../src/view/devices/speaker.py:44
+msgid "My Speakers"
+msgstr "මගේ ස්පීකරය"
-#: ../shell/view/devices/network/wireless.py:61
+#: ../src/view/devices/speaker.py:125
+msgid "Unmute"
+msgstr "නිෂ්à·à¶¶à·Šà¶°à¶­à·à·€ නවතන්න"
+
+#: ../src/view/devices/speaker.py:128
+msgid "Mute"
+msgstr "නිà·à·Šà·à¶¶à·Šà¶¯ කරන්න"
+
+#: ../src/view/devices/network/wireless.py:67
msgid "Disconnected"
msgstr "විසන්ධිවී ඇත"
-#: ../shell/view/devices/network/wireless.py:131
+#: ../src/view/devices/network/wireless.py:143
msgid "Channel"
msgstr "නà·à¶½à·’කà·à·€"
-#: ../shell/view/frame/zoomtoolbar.py:42
+#: ../src/view/frame/zoomtoolbar.py:37
msgid "Neighborhood"
msgstr "වටපිටà·à·€"
-#: ../shell/view/frame/zoomtoolbar.py:54
+#: ../src/view/frame/zoomtoolbar.py:39
msgid "Group"
msgstr "සමූහය"
-#: ../shell/view/frame/zoomtoolbar.py:66
+#: ../src/view/frame/zoomtoolbar.py:41
msgid "Home"
msgstr "නිවස"
-#: ../shell/view/frame/zoomtoolbar.py:78
+#: ../src/view/frame/zoomtoolbar.py:43
msgid "Activity"
msgstr "ක්â€à¶»à·’යà·à¶šà·à¶»à¶šà¶¸"
-#: ../lib/sugar/activity/activity.py:115
-msgid "Share with:"
-msgstr "සමඟ බෙදà·à¶œà¶±à·Šà¶±:"
+#: ../src/controlpanel/cmd.py:26
+#, python-format
+msgid ""
+"sugar-control-panel: WARNING, found more than one option with the same name: "
+"%s module: %r"
+msgstr ""
+"sugar-control-panel: අවවà·à¶¯à¶ºà¶ºà·’, එකම නම (%s) සහිත විකල්ප කිහිපයක් හමු විය.: "
+"මොඩියුලය: %r"
-#: ../lib/sugar/activity/activity.py:117
-msgid "Private"
-msgstr "පුද්ගලික"
+#: ../src/controlpanel/cmd.py:28
+#, python-format
+msgid "sugar-control-panel: key=%s not an available option"
+msgstr "sugar-control-panel: key=%s පවතින විකල්පයක් නොවේ"
-#: ../lib/sugar/activity/activity.py:118
-msgid "My Neighborhood"
-msgstr "මගේ වටපිටà·à·€"
+#: ../src/controlpanel/cmd.py:29
+#, python-format
+msgid "sugar-control-panel: %s"
+msgstr "sugar-control-panel: %s"
-#: ../lib/sugar/activity/activity.py:126
-msgid "Keep"
-msgstr "තබà·à¶œà¶±à·Šà¶±"
+#. TRANS: Translators, there's a empty line at the end of this string,
+#. which must appear in the translated string (msgstr) as well.
+#: ../src/controlpanel/cmd.py:35
+msgid ""
+"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
+" Control for the sugar environment. \n"
+" Options: \n"
+" -h show this help message and exit \n"
+" -l list all the available options \n"
+" -h key show information about this key \n"
+" -g key get the current value of the key \n"
+" -s key set the current value for the key \n"
+" -c key clear the current value for the key \n"
+" "
+msgstr ""
+"භà·à·€à·’තà·à·€: sugar-control-panel [ විකල්පය ] key [ තර්ක ... ] \n"
+" à·à·”ගර් පරිසරය සඳහ෠පà·à¶½à¶±à¶º. \n"
+" විකල්ප: \n"
+" -h මෙම උදව් පණිවිඩය පෙන්ව෠පිටවන්න\n"
+" -l සියළු විකල්ප ලà·à¶ºà·’ස්තුගත කරන්න\n"
+" -h key key ගà·à¶± විස්තර පෙන්වන්න \n"
+" -g key key හි පවතින අගය පෙන්වන්න \n"
+" -s key key හි අගය සිටුචම් කරන්න \n"
+" "
+
+#: ../src/controlpanel/cmd.py:48
+msgid "To apply your changes you have to restart sugar.\n"
+msgstr "ඔබගේ වෙනස්කිරීම් බලපෑම සඳහ෠ෂුගර් යළි ඇරඹිය යුතුය.\n"
-#: ../lib/sugar/activity/activity.py:245
-msgid "Undo"
-msgstr "පෙර ලෙස"
+#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:305
+msgid "Ok"
+msgstr "හරි"
-#: ../lib/sugar/activity/activity.py:250
-msgid "Redo"
-msgstr "නà·à·€à¶­ කරන්න"
+#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:265
+msgid "Changes require restart"
+msgstr "වෙනස්කිරීම සඳහ෠යළි ඇරඹුමක් අවà·à·Šâ€à¶ºà·€à·š"
-#: ../lib/sugar/activity/activity.py:260
-msgid "Copy"
-msgstr "පිටපත් කරන්න"
+#: ../src/controlpanel/gui.py:264
+msgid "Warning"
+msgstr "අවවà·à¶¯à¶ºà¶ºà·’"
+
+#: ../src/controlpanel/gui.py:268
+msgid "Cancel changes"
+msgstr "වෙනස් කිරීම් අවලංගු කරන්න"
+
+#: ../src/controlpanel/gui.py:277
+msgid "Restart now"
+msgstr "දà·à¶±à·Š යළි ආරම්භ කරන්න"
-#: ../lib/sugar/activity/activity.py:265
-msgid "Paste"
-msgstr "අලවන්න"
+#: ../src/controlpanel/aboutme/model.py:44
+msgid "You must enter a name."
+msgstr "ඔබ විසින් නමක් ඇතුලත් කළ යුතුය."
-#: ../lib/sugar/activity/activity.py:454
+#: ../src/controlpanel/aboutme/model.py:69
#, python-format
-msgid "%s Activity"
-msgstr "%s ක්â€à¶»à·’යà·à¶šà·à¶»à¶šà¶¸"
+msgid "stroke: color=%s hue=%s"
+msgstr "පහර: වර්ණය=%s පà·à·„à·à¶º=%s"
-#: ../lib/sugar/activity/activity.py:824
-msgid "Keep error"
-msgstr "නබ෠ගà·à¶±à·“මේ දà·à·‚යකි"
+#: ../src/controlpanel/aboutme/model.py:72
+#, python-format
+msgid "stroke: %s"
+msgstr "පහර: %s"
-#: ../lib/sugar/activity/activity.py:825
-msgid "Keep error: all changes will be lost"
-msgstr "තබ෠ගà·à¶±à·“මේ දà·à·‚යකි: සියළු වෙනස් කිරීම් නà·à¶­à·’වනු ඇත"
+#: ../src/controlpanel/aboutme/model.py:74
+#, python-format
+msgid "fill: color=%s hue=%s"
+msgstr "පිරවුම: වර්ණය=%s පà·à·„à·à¶º=%s"
-#: ../lib/sugar/activity/activity.py:828
-msgid "Don't stop"
-msgstr "නවත්වන්න එපà·"
+#: ../src/controlpanel/aboutme/model.py:76
+#, python-format
+msgid "fill: %s"
+msgstr "පිරවුම: %s"
-#: ../lib/sugar/activity/activity.py:831
-msgid "Stop anyway"
-msgstr "කෙසේ හ෠නවත්වන්න"
+#: ../src/controlpanel/aboutme/model.py:87
+msgid "Error in specified color modifiers."
+msgstr "à·ƒà·à¶´à¶ºà·– වර්ණ විකරණකà·à¶»à¶šà¶ºà·š දà·à·‚යකි"
-#: ../lib/sugar/graphics/alert.py:164 ../lib/sugar/graphics/alert.py:206
-msgid "Cancel"
-msgstr "අවලංගු කරන්න"
+#: ../src/controlpanel/aboutme/model.py:90
+msgid "Error in specified colors."
+msgstr "à·ƒà·à¶´à¶ºà·– වර්ණවල දà·à·‚යකි"
-#: ../lib/sugar/graphics/alert.py:168
-msgid "Ok"
-msgstr "හරි"
+#: ../src/controlpanel/aboutme/view.py:32
+#: ../src/controlpanel/aboutme/__init__.py:22
+msgid "About Me"
+msgstr "මම ගà·à¶±"
-#: ../lib/sugar/graphics/alert.py:216
-msgid "Continue"
-msgstr "පවත්වà·à¶œà·™à¶± යන්න"
+#: ../src/controlpanel/aboutme/view.py:134
+msgid "Click to change your color:"
+msgstr "ඔබගේ පà·à¶§ වෙනස් කිරීමට ක්ලික් කරන්න:"
-#: ../lib/sugar/graphics/alert.py:244
-msgid "OK"
-msgstr "හරි"
+#: ../src/controlpanel/aboutxo/model.py:24
+msgid "Not available"
+msgstr "නොපවතී"
-#: ../shell/controlpanel/control.py:213
-msgid "To apply your changes you have to restart sugar.\n"
-msgstr "ඔබගේ වෙනස්කිරීම් බලපෑම සඳහ෠ෂුගර් යළි ඇරඹිය යුතුය.\n"
+#: ../src/controlpanel/aboutxo/view.py:55
+msgid "Identity"
+msgstr "අනන්â€à¶ºà¶­à·à·€"
-#: ../shell/controlpanel/control.py:267
-msgid "Error in specified color modifiers."
-msgstr "à·ƒà·à¶´à¶ºà·– වර්ණ විකරණකà·à¶»à¶šà¶ºà·š දà·à·‚යකි"
+#: ../src/controlpanel/aboutxo/view.py:64
+msgid "Serial Number:"
+msgstr "අනුක්â€à¶»à¶¸à·’ක අංකය:"
-#: ../shell/controlpanel/control.py:270
-msgid "Error in specified colors."
-msgstr "à·ƒà·à¶´à¶ºà·– වර්ණවල දà·à·‚යකි"
+#: ../src/controlpanel/aboutxo/view.py:87
+msgid "Software"
+msgstr "මෘදුකà·à¶‚ගය"
-#: ../shell/controlpanel/control.py:307
-msgid "off"
-msgstr "අක්â€à¶»à·“ය කරන්න"
+#: ../src/controlpanel/aboutxo/view.py:96
+msgid "Build:"
+msgstr "ගොඩ නà·à¶Ÿà·”ම:"
-#: ../shell/controlpanel/control.py:309
-msgid "on"
-msgstr "සක්â€à¶»à·“ය කරන්න"
+#: ../src/controlpanel/aboutxo/view.py:111
+msgid "Sugar:"
+msgstr "à·à·”ගර්:"
-#: ../shell/controlpanel/control.py:310
-msgid "State is unknown."
-msgstr "තත්ත්වය නොදනී."
+#: ../src/controlpanel/aboutxo/view.py:126
+msgid "Firmware:"
+msgstr "ස්ථීරà·à¶‚ගය:"
-#: ../shell/controlpanel/control.py:332
-msgid "Error in specified radio argument use on/off."
-msgstr "à·ƒà·à¶´à¶ºà·– විකල්ප විස්තà·à¶»à¶šà¶ºà·š දà·à·‚යකි සක්â€à¶»à·“යයි/අක්â€à¶»à·“යයි භà·à·€à·’ත෠කරන්න"
+#: ../src/controlpanel/aboutxo/view.py:148
+msgid "Copyright and License"
+msgstr "කතු හිමිකම හ෠වරපත"
-#: ../shell/controlpanel/control.py:336
-msgid "Permission denied. You need to be root to run this method."
-msgstr "අවසර දිය නොහà·à¶š. මෙම විධිය ක්â€à¶»à·’යà·à¶­à·Šà¶¸à¶š කිරීමට ඔබ root විය යුතුය."
+#: ../src/controlpanel/aboutxo/view.py:156
+msgid ""
+"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
+msgstr ""
+"© 2008 One Laptop per Child Association Inc; Red Hat Inc; හ෠සහදà·à¶ºà¶šà¶ºà·’න්."
-#: ../shell/controlpanel/control.py:366
-msgid "Error in reading timezone"
-msgstr "වේල෠කලà·à¶´à¶º කියවීමේ දà·à·‚යකි"
+#: ../src/controlpanel/aboutxo/view.py:163
+msgid ""
+"Sugar is the graphical user interface that you are looking at. Sugar is free "
+"software, covered by the GNU General Public License, and you are welcome to "
+"change it and/or distribute copies of it under certain conditions described "
+"therein."
+msgstr ""
+"à·à·”ගර් යනු ඔබ බල෠සිටින මෙම චිත්â€à¶»à¶š පරිà·à·“ලක අතුරුමුහුණතයි. à·à·”ගර් GNU à·ƒà·à¶°à·à¶»à¶« "
+"පොදු වරපත මගින් ආවරණය වන නිදහස් මෘදුකà·à¶‚ගයක් වන අතර එහි සඳහන් ඇතà·à¶¸à·Š කොන්දේසි "
+"වලට යටත්ව මෙය වෙනස් කිරීමට à·„à·/හ෠පිටපත් බෙදà·à·„à·à¶»à·“මට ඔබට à·„à·à¶šà·’ය."
-#: ../shell/controlpanel/control.py:397
-#, python-format
-msgid "Error copying timezone (from %s): %s"
-msgstr "වේල෠කලà·à¶´à¶º පිටපත් කිරීමේ දà·à·‚යකි (%s ගෙන්): %s"
+#: ../src/controlpanel/aboutxo/view.py:175
+msgid "Full license:"
+msgstr "සම්පූර්ණ වරපත:"
-#: ../shell/controlpanel/control.py:402
-#, python-format
-msgid "Changing permission of timezone: %s"
-msgstr "වේල෠කලà·à¶´à¶ºà·š අවසර වෙනස් කෙරේ: %s"
+#: ../src/controlpanel/aboutxo/__init__.py:21
+msgid "About my XO"
+msgstr "මගේ XO ගà·à¶±"
-#: ../shell/controlpanel/control.py:412
+#: ../src/controlpanel/datetime/model.py:89
msgid "Error timezone does not exist."
msgstr "දà·à·‚යකි වේලà·à¶šà¶½à·à¶´à¶º නොපවතී."
-#: ../shell/controlpanel/control.py:417 ../shell/controlpanel/control.py:436
+#: ../src/controlpanel/datetime/view.py:68
+msgid "Timezone"
+msgstr "වේල෠කලà·à¶´à¶º"
+
+#: ../src/controlpanel/datetime/__init__.py:21
+msgid "Date & Time"
+msgstr "දිනය හ෠වේලà·à·€"
+
+#: ../src/controlpanel/frame/model.py:38 ../src/controlpanel/frame/model.py:60
+msgid "Value must be an integer."
+msgstr "අගය නිඛිලයක් විය යුතුය."
+
+#: ../src/controlpanel/frame/view.py:26
+msgid "never"
+msgstr "කිසිම දිනෙක"
+
+#: ../src/controlpanel/frame/view.py:27
+msgid "instantaneous"
+msgstr "ක්ෂණිකව"
+
+#: ../src/controlpanel/frame/view.py:28
#, python-format
-msgid "Could not access %s. Create standard settings."
-msgstr "%s වෙත ප්â€à¶»à·€à·šà· විය නොහà·à¶š. සම්මත සිටුවම් à·ƒà·à¶¯à¶±à·Šà¶±."
+msgid "%s seconds"
+msgstr "තත්පර %s"
+
+#: ../src/controlpanel/frame/view.py:52
+msgid "Activation Delay"
+msgstr "සක්â€à¶»à·’යනය ප්â€à¶»à¶¸à·à¶¯à¶º"
+
+#: ../src/controlpanel/frame/view.py:76
+msgid "Corner"
+msgstr "මුල්ල"
+
+#: ../src/controlpanel/frame/view.py:111
+msgid "Edge"
+msgstr "අයින"
+
+#: ../src/controlpanel/frame/__init__.py:21
+msgid "Frame"
+msgstr "කවුළුව"
+
+#: ../src/controlpanel/language/model.py:28
+msgid "Could not access ~/.i18n. Create standard settings."
+msgstr "~/.i18n වෙත ප්â€à¶»à·€à·šà· විය නොහà·à¶š. සම්මත සිටුවම් à·ƒà·à¶¯à¶±à·Šà¶±."
-#: ../shell/controlpanel/control.py:463
+#: ../src/controlpanel/language/model.py:114
#, python-format
msgid "Language for code=%s could not be determined."
-msgstr "code=%s වන භà·à·‚à·à·€ නිර්ණය කළ නොහà·à¶š."
+msgstr "කේතය=%s වන භà·à·‚à·à·€ නිර්ණය කළ නොහà·à¶š."
-#: ../shell/controlpanel/control.py:473
+#: ../src/controlpanel/language/model.py:131
#, python-format
msgid "Sorry I do not speak '%s'."
msgstr "සමà·à·€à¶±à·Šà¶± මම '%s' කථ෠නොකරමි."
-#: ../shell/view/devices/network/mesh.py:105
+#: ../src/controlpanel/language/view.py:70
+#: ../src/controlpanel/language/__init__.py:21
+msgid "Language"
+msgstr "භà·à·‚à·à·€"
+
+#: ../src/controlpanel/network/model.py:62
+msgid "State is unknown."
+msgstr "තත්ත්වය නොදනී."
+
+#: ../src/controlpanel/network/model.py:82
+msgid "Error in specified radio argument use on/off."
+msgstr "à·ƒà·à¶´à¶ºà·– විකල්ප විස්තà·à¶»à¶šà¶ºà·š දà·à·‚යකි. සක්â€à¶»à·“යයි/අක්â€à¶»à·“යයි භà·à·€à·’ත෠කරන්න."
+
+#: ../src/controlpanel/network/view.py:28
+#: ../src/controlpanel/network/__init__.py:21
+msgid "Network"
+msgstr "ජà·à¶½à¶º"
+
+#: ../src/controlpanel/network/view.py:54
+msgid "Wireless"
+msgstr "රà·à·„à·à¶±à·Š රහිත"
+
+#: ../src/controlpanel/network/view.py:62
+msgid "Turn of the wireless radio to save battery life"
+msgstr "බà·à¶§à¶»à·’ ආයු කà·à¶½à¶º සුරà·à¶šà·“ම සඳහ෠රà·à·„à·à¶±à·Š රහිත රේඩියà·à·€ නිව෠දමන්න"
+
+#: ../src/controlpanel/network/view.py:75
+msgid "Radio"
+msgstr "රේඩියà·à·€"
+
+#: ../src/controlpanel/network/view.py:91
+msgid "Discard network history if you have trouble connecting to the network"
+msgstr "ොබට ජà·à¶½à¶ºà¶§ සම්බන්ධ වීමේ ගà·à¶§à·…à·” ඇතිනම් ජà·à¶½ ඉතිහà·à·ƒà¶º ඉවතලන්න"
+
+#: ../src/controlpanel/network/view.py:100
+msgid "Discard network history"
+msgstr "ජà·à¶½ ඉතිහà·à·ƒà¶º ඉවතලන්න"
+
+#: ../src/controlpanel/network/view.py:113
+msgid "Mesh"
+msgstr "දà·à¶½à·à·ƒ"
+
+#: ../src/controlpanel/network/view.py:122
+msgid "Server:"
+msgstr "සේවà·à¶¯à·à¶ºà¶šà¶º:"
+
+#: ../src/controlpanel/power/model.py:55
+msgid "Error in automatic pm argument, use on/off."
+msgstr "ස්වයංක්â€à¶»à·“ය pm විස්තà·à¶»à¶šà¶ºà·š දà·à·‚යකි, සක්â€à¶»à·“යයි/අක්â€à¶»à·“යයි භà·à·€à·’ත෠කරන්න."
+
+#: ../src/controlpanel/power/model.py:84
+msgid "Error in extreme pm argument, use on/off."
+msgstr "ආන්තික pm විස්තà·à¶»à¶šà¶ºà·š දà·à·‚යකි, සක්â€à¶»à·“යයි/අක්â€à¶»à·“යයි භà·à·€à·’ත෠කරන්න."
+
+#: ../src/controlpanel/power/view.py:47
+msgid "Power management"
+msgstr "බල කළමණà·à¶šà¶»à¶±à¶º"
+
+#: ../src/controlpanel/power/view.py:57
+msgid "Automatic power management (increases battery life)"
+msgstr "ස්වයංක්â€à¶»à·“ය බල කළමණà·à¶šà¶»à¶±à¶º (බà·à¶§à¶»à·’ ආයු කà·à¶½à¶º à·€à·à¶©à·’ කරයි)"
+
+#: ../src/controlpanel/power/view.py:85
+msgid ""
+"Extreme power management (disableswireless radio, increases battery life)"
+msgstr ""
+"උපරිම බල කළමණà·à¶šà¶»à¶±à¶º ( රà·à·„à·à¶±à·Š රහිත රේඩියà·à·€ අක්â€à¶»à·’ය කරයි, බà·à¶§à¶»à·’ ආයු කà·à¶½à¶º à·€à·à¶©à·’ "
+"කරයි)"
+
+#: ../src/controlpanel/power/__init__.py:21
+msgid "Power"
+msgstr "à·à¶šà·Šà¶­à·’ය"
+
+#: ../src/view/devices/network/mesh.py:111
msgid "Connected to a School Mesh Portal"
msgstr "පà·à·ƒà¶½à·Š දà·à¶½à·à·ƒà·Š බිහිදොරකට සම්බන්ධ විය"
-#: ../shell/view/devices/network/mesh.py:107
+#: ../src/view/devices/network/mesh.py:113
msgid "Looking for a School Mesh Portal..."
msgstr "පà·à·ƒà¶½à·Š දà·à¶½à·à·ƒà·Š බිහිදොරක් සොයයි..."
-#: ../shell/view/devices/network/mesh.py:110
+#: ../src/view/devices/network/mesh.py:116
msgid "Connected to an XO Mesh Portal"
msgstr "XO දà·à¶½à·à·ƒà·Š බිහිදොරකට සම්බන්ධ විය"
-#: ../shell/view/devices/network/mesh.py:112
+#: ../src/view/devices/network/mesh.py:118
msgid "Looking for an XO Mesh Portal..."
msgstr "XO දà·à¶½à·à·ƒà·Š බිහිදොරක් සොයයි..."
-#: ../shell/view/devices/network/mesh.py:115
+#: ../src/view/devices/network/mesh.py:121
msgid "Connected to a Simple Mesh"
msgstr "සරල දà·à¶½à·à·ƒà·Š බිහිදොරකට සම්බන්ධ විය"
-#: ../shell/view/devices/network/mesh.py:117
+#: ../src/view/devices/network/mesh.py:123
msgid "Starting a Simple Mesh"
msgstr "සරල දà·à¶½à·à·ƒà·Š බිහිදොරක් ආරම්භ කෙරේ"
-#: ../shell/view/devices/network/mesh.py:124
+#: ../src/view/devices/network/mesh.py:130
msgid "Unknown Mesh"
msgstr "නොදන්න෠දà·à¶½à·à·ƒà¶šà·’"
+
+#: ../src/view/frame/activitiestray.py:211
+msgid "Decline"
+msgstr "ක්â€à¶»à¶¸à¶ºà·™à¶±à·Š පිරිහෙනවà·"
+
+# TRANS: label for the freeform layout in the favorites view
+#. TRANS: label for the freeform layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:107
+msgid "Freeform"
+msgstr "නිදහස් පà·à¶»à·Šà¶¸à¶º"
+
+# TRANS: label for the ring layout in the favorites view
+#. TRANS: label for the ring layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:189
+msgid "Ring"
+msgstr "කවය"
+
+#. TRANS: label for the spiral layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:334
+msgid "Spiral"
+msgstr "සර්පිලය"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:401
+msgid "Box"
+msgstr "පෙට්ටිය"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:442
+msgid "Triangle"
+msgstr "ත්â€à¶»à·’කà·à¶«à¶º"
+
+#: ../src/view/home/favoritesview.py:295
+msgid "Registration Failed"
+msgstr "ලියà·à¶´à¶¯à·’ංචිය අසමත් විය"
+
+#: ../src/view/home/favoritesview.py:296
+#, python-format
+msgid "%s"
+msgstr "%s"
+
+#: ../src/view/home/favoritesview.py:298
+msgid "Registration Successful"
+msgstr "ලියà·à¶´à¶¯à·’ංචිය à·ƒà·à¶»à·Šà¶®à¶š විය"
+
+#: ../src/view/home/favoritesview.py:299
+msgid "You are now registered with your school server."
+msgstr "ඔබ දà·à¶±à·Š ඔබගේ පà·à·ƒà¶½à·Š සේවà·à¶¯à·à¶ºà¶šà¶º සමඟ ලියà·à¶´à¶¯à·’ංචි වී ඇත."
+
+#: ../src/view/home/favoritesview.py:420
+msgid "Settings"
+msgstr "සිටුවම්"
+
+#: ../src/view/home/favoritesview.py:425
+msgid "Restart"
+msgstr "යළි ආරම්භ කරන්න"
+
+#: ../src/view/home/favoritesview.py:430
+msgid "Shutdown"
+msgstr "වස෠දමන්න"
+
+#: ../src/view/home/favoritesview.py:436
+msgid "Register"
+msgstr "ලියà·à¶´à¶¯à·’ංචි කරන්න"
+
+#: ../src/view/palettes.py:42
+msgid "Starting..."
+msgstr "ආරම්භවේ..."
+
+#: ../src/view/palettes.py:72
+msgid "Stop"
+msgstr "නවත්වන්න"
+
+#. TRANS: Action label for starting an entry.
+#: ../src/view/palettes.py:104 ../src/journal/journaltoolbox.py:402
+#: ../src/journal/palettes.py:59
+msgid "Start"
+msgstr "ආරම්භ කරන්න"
+
+#: ../src/view/palettes.py:138
+msgid "Remove favorite"
+msgstr "අභිරුචිය ඉවත් කරන්න"
+
+#: ../src/view/palettes.py:142
+msgid "Make favorite"
+msgstr "අභිරුචියක් කරන්න"
+
+#: ../src/view/palettes.py:191
+msgid "Show contents"
+msgstr "අන්තර්ගතය පෙන්වන්න"
+
+#: ../src/view/palettes.py:215
+#, python-format
+msgid "%(free_space)d MB Free"
+msgstr "%(free_space)d MB ඉතිරියි"
+
+#: ../src/journal/journaltoolbox.py:62
+msgid "Search"
+msgstr "සෙවිමට"
+
+#: ../src/journal/journaltoolbox.py:119
+msgid "Anytime"
+msgstr "ඕනෑම වෙලà·à·€à¶š"
+
+#: ../src/journal/journaltoolbox.py:121
+msgid "Today"
+msgstr "අද"
+
+#: ../src/journal/journaltoolbox.py:123
+msgid "Since yesterday"
+msgstr "ඊයේ සිට"
+
+#. TRANS: Filter entries modified during the last 7 days.
+#: ../src/journal/journaltoolbox.py:125
+msgid "Past week"
+msgstr "පසුගිය සතිය"
+
+#. TRANS: Filter entries modified during the last 30 days.
+#: ../src/journal/journaltoolbox.py:127
+msgid "Past month"
+msgstr "පසුගිය මà·à·ƒà¶º"
+
+#. TRANS: Filter entries modified during the last 356 days.
+#: ../src/journal/journaltoolbox.py:129
+msgid "Past year"
+msgstr "පසුගිය වසර"
+
+#: ../src/journal/journaltoolbox.py:136
+msgid "Anyone"
+msgstr "ඕනෑම අයෙක්"
+
+#: ../src/journal/journaltoolbox.py:138
+msgid "My friends"
+msgstr "මà·à¶œà·š මිතුරන්"
+
+#: ../src/journal/journaltoolbox.py:139
+msgid "My class"
+msgstr "මà·à¶œà·š පන්තිය"
+
+#. TRANS: Item in a combo box that filters by entry type.
+#: ../src/journal/journaltoolbox.py:255
+msgid "Anything"
+msgstr "ඕනෑ දෙයක්"
+
+#. TODO: Add "Start with" menu item
+#: ../src/journal/journaltoolbox.py:325 ../src/journal/palettes.py:67
+msgid "Copy"
+msgstr "පිටපත් කරන්න"
+
+#: ../src/journal/collapsedentry.py:248 ../src/journal/expandedentry.py:176
+#: ../src/journal/palettes.py:51
+msgid "Untitled"
+msgstr "à·à·“ර්ෂ පà·à¶¨ නොමà·à¶­à·’"
+
+#: ../src/journal/journalactivity.py:119 ../src/journal/volumesmanager.py:57
+msgid "Journal"
+msgstr "ජ'නලය"
+
+#: ../src/journal/expandedentry.py:222
+msgid "No preview"
+msgstr "පූර්වදර්à·à¶±à¶ºà¶šà·Š නà·à¶­"
+
+#: ../src/journal/expandedentry.py:241
+msgid "Participants:"
+msgstr "සහභà·à¶œà·’වන්නන්:"
+
+#: ../src/journal/expandedentry.py:266
+msgid "Description:"
+msgstr "විස්තරය:"
+
+#: ../src/journal/expandedentry.py:292
+msgid "Tags:"
+msgstr "à·„à·à¶³à·”නුම් වදන්:"
+
+#: ../src/journal/objectchooser.py:134
+msgid "Choose an object"
+msgstr "වස්තුවක් තà·à¶»à¶±à·Šà¶±"
+
+#: ../src/journal/objectchooser.py:139
+msgid "Close"
+msgstr "චසà·à¶¯à¶¸à¶±à·Šà¶±"
+
+#: ../src/journal/volumestoolbar.py:93
+msgid "Unmount"
+msgstr "ගලවන්න"
+
+#: ../src/journal/misc.py:95
+msgid "No date"
+msgstr "දිනයක් නà·à¶­"
+
+#: ../src/journal/listview.py:39
+msgid "Your Journal is empty"
+msgstr "ඔබගේ ජර්නලය හිස්ය"
+
+#: ../src/journal/listview.py:40
+msgid "No matching entries "
+msgstr "ගà·à·…පෙන නිවේà·à¶± නොමà·à¶­ "
+
+#: ../src/journal/modalalert.py:59
+msgid "Your Journal is full"
+msgstr "ඔබගේ ජර්නලය සම්පූර්ණයෙන් පිරී ඇත"
+
+#: ../src/journal/modalalert.py:63
+msgid "Please delete some old Journal entries to make space for new ones."
+msgstr ""
+"කරුණà·à¶šà¶» නව නිවේà·à¶± සඳහ෠ඉඩ ලබ෠ගà·à¶±à·“මට පà·à¶»à¶«à·’ ජර්නල නිවේà·à¶± කිහිපයක් මක෠දමන්න."
+
+#: ../src/journal/modalalert.py:75
+msgid "Show Journal"
+msgstr "ජර්නලය පෙන්වන්න"
+
+#, python-format
+#~ msgid "Clipboard object: %s."
+#~ msgstr "පසුරු පුවරු වස්තුව: %s."
+
+#~ msgid "You must enter a server."
+#~ msgstr "ඔබ විසින් සේවà·à¶¯à·à¶ºà¶šà¶ºà¶šà·Š ඇතුලත් කළ යුතුය."
+
+#~ msgid "Control Panel"
+#~ msgstr "පà·à¶½à¶š පුවරුව"
+
+#~ msgid "<Ctrl>R"
+#~ msgstr "<Ctrl>R"
+
+#~ msgid "off"
+#~ msgstr "අක්â€à¶»à·“ය කරන්න"
+
+#~ msgid "on"
+#~ msgstr "සක්â€à¶»à·“ය කරන්න"
+
+#~ msgid "Permission denied. You need to be root to run this method."
+#~ msgstr "අවසර දිය නොහà·à¶š. මෙම විධිය ක්â€à¶»à·’යà·à¶­à·Šà¶¸à¶š කිරීමට ඔබ root විය යුතුය."
+
+#~ msgid "Error in reading timezone"
+#~ msgstr "වේල෠කලà·à¶´à¶º කියවීමේ දà·à·‚යකි"
+
+#, python-format
+#~ msgid "Error copying timezone (from %s): %s"
+#~ msgstr "වේල෠කලà·à¶´à¶º පිටපත් කිරීමේ දà·à·‚යකි (%s ගෙන්): %s"
+
+#, python-format
+#~ msgid "Changing permission of timezone: %s"
+#~ msgstr "වේල෠කලà·à¶´à¶ºà·š අවසර වෙනස් කෙරේ: %s"
+
+#~ msgid "About this XO"
+#~ msgstr "මෙම XO ගà·à¶±"
+
+# self._stop_item = MenuItem(_('Stop download'), 'stock-close')
+# TODO: Implement stopping downloads
+# self._stop_item.connect('activate', self._stop_item_activate_cb)
+# self.append_menu_item(self._stop_item)
+#~ msgid "Add to journal"
+#~ msgstr "ජර්නලයට එක් කරන්න"
+
+#~ msgid "Reboot"
+#~ msgstr "යළි අරඹන්න"
+
+#~ msgid "My Battery life"
+#~ msgstr "මගේ බà·à¶§à¶»à·’ ආයු කà·à¶½à¶º"
+
+#~ msgid "Battery charging"
+#~ msgstr "බà·à¶§à¶»à·’ය ආරà·à¶´à¶«à¶º වේ"
+
+#~ msgid "Battery discharging"
+#~ msgstr "බà·à¶§à¶»à·’ය විසර්ජනය වේ"
+
+#~ msgid "Battery fully charged"
+#~ msgstr "බà·à¶§à¶»à·’ය සම්පූර්ණයෙන්ම ආරà·à¶´à·’තයි"
+
+#~ msgid "Share with:"
+#~ msgstr "සමඟ බෙදà·à¶œà¶±à·Šà¶±:"
+
+#~ msgid "Private"
+#~ msgstr "පුද්ගලික"
+
+#~ msgid "My Neighborhood"
+#~ msgstr "මගේ වටපිටà·à·€"
+
+#~ msgid "Undo"
+#~ msgstr "පෙර ලෙස"
+
+#~ msgid "Redo"
+#~ msgstr "නà·à·€à¶­ කරන්න"
+
+#~ msgid "Paste"
+#~ msgstr "අලවන්න"
+
+#, python-format
+#~ msgid "%s Activity"
+#~ msgstr "%s ක්â€à¶»à·’යà·à¶šà·à¶»à¶šà¶¸"
+
+#~ msgid "Keep error"
+#~ msgstr "නබ෠ගà·à¶±à·“මේ දà·à·‚යකි"
+
+#~ msgid "Keep error: all changes will be lost"
+#~ msgstr "තබ෠ගà·à¶±à·“මේ දà·à·‚යකි: සියළු වෙනස් කිරීම් නà·à¶­à·’වනු ඇත"
+
+#~ msgid "Don't stop"
+#~ msgstr "නවත්වන්න එපà·"
+
+#~ msgid "Stop anyway"
+#~ msgstr "කෙසේ හ෠නවත්වන්න"
+
+#~ msgid "Continue"
+#~ msgstr "පවත්වà·à¶œà·™à¶± යන්න"
+
+#~ msgid "OK"
+#~ msgstr "හරි"
diff --git a/po/sl.po b/po/sl.po
index c3fca85..c4e8334 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-01 18:31-0400\n"
-"PO-Revision-Date: 2008-09-11 03:30-0400\n"
+"POT-Creation-Date: 2008-09-25 00:30-0400\n"
+"PO-Revision-Date: 2008-12-08 09:34-0500\n"
"Last-Translator: Denis OÅ¡tir <denis.ostir@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
@@ -15,7 +15,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Pootle 1.1.0rc2\n"
-#: ../src/intro/window.py:93 ../src/controlpanel/view/aboutme.py:100
+#: ../src/intro/window.py:93 ../src/controlpanel/aboutme/view.py:100
msgid "Name:"
msgstr "Ime:"
@@ -23,7 +23,7 @@ msgstr "Ime:"
msgid "Click to change color:"
msgstr "Klikni za spremembo barve:"
-#: ../src/intro/window.py:175
+#: ../src/intro/window.py:175 ../src/journal/detailview.py:119
msgid "Back"
msgstr "Nazaj"
@@ -35,43 +35,39 @@ msgstr "KonÄano"
msgid "Next"
msgstr "Naslednji"
-#: ../src/view/BuddyMenu.py:58
+#: ../src/view/BuddyMenu.py:60
msgid "Remove friend"
msgstr "Odstrani prijatelja"
-#: ../src/view/BuddyMenu.py:61
+#: ../src/view/BuddyMenu.py:63
msgid "Make friend"
msgstr "Dodaj prijatelja"
-#: ../src/view/BuddyMenu.py:90
+#: ../src/view/BuddyMenu.py:92
#, python-format
msgid "Invite to %s"
msgstr "Povabi na %s"
-#: ../src/view/clipboardmenu.py:48
+#: ../src/view/clipboardmenu.py:51
msgid "Remove"
msgstr "Odstrani"
-#: ../src/view/clipboardmenu.py:53 ../src/view/clipboardmenu.py:79
+#: ../src/view/clipboardmenu.py:56 ../src/view/clipboardmenu.py:78
msgid "Open"
msgstr "Odpri"
-#. self._stop_item = MenuItem(_('Stop download'), 'stock-close')
-#. TODO: Implement stopping downloads
-#. self._stop_item.connect('activate', self._stop_item_activate_cb)
-#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:63 ../src/view/home/HomeBox.py:87
+#: ../src/view/clipboardmenu.py:61 ../src/view/home/HomeBox.py:84
msgid "Keep"
msgstr "Obdrži"
-#: ../src/view/clipboardmenu.py:84
+#: ../src/view/clipboardmenu.py:83
msgid "Open with"
msgstr "Odpri z"
-#: ../src/view/clipboardmenu.py:216
+#: ../src/view/clipboardmenu.py:228
#, python-format
-msgid "Clipboard object: %s."
-msgstr "Predmet na odložiÅ¡Äu: %s."
+msgid "%s clipping"
+msgstr "%s strižem"
#: ../src/hardware/keydialog.py:150
msgid "Key Type:"
@@ -97,72 +93,61 @@ msgstr "Povezava s strežnikom ni mogoÄa."
msgid "The server could not complete the request."
msgstr "Strežnik ne more izpolniti zahteve."
-#: ../src/view/Shell.py:261
+#: ../src/view/Shell.py:251
msgid "Screenshot"
msgstr "Slika zaslona"
-#: ../src/view/home/HomeBox.py:81
+#: ../src/view/home/HomeBox.py:78
msgid "Confirm erase"
msgstr "Potrdi brisanje"
-#: ../src/view/home/HomeBox.py:83
+#: ../src/view/home/HomeBox.py:80
#, python-format
msgid "Confirm erase: Do you want to permanently erase %s?"
msgstr "Potrdi brisanje: ŽeliÅ¡ dokoÄno izbrisati %s?"
-#: ../src/view/home/HomeBox.py:90 ../src/view/palettes.py:120
+#: ../src/view/home/HomeBox.py:87 ../src/view/palettes.py:120
+#: ../src/journal/journaltoolbox.py:335 ../src/journal/palettes.py:75
msgid "Erase"
msgstr "Izbriši"
-#: ../src/view/home/HomeBox.py:120
+#: ../src/view/home/HomeBox.py:117
msgid "Software Update"
msgstr "Nadgradnja programa"
-#: ../src/view/home/HomeBox.py:121
+#: ../src/view/home/HomeBox.py:118
msgid "Update your activities to ensure compatibility with your new software"
msgstr ""
"Nadgradite aktivnosti, da zagotovite ustreznost z novo programsko opremo."
-#: ../src/view/home/HomeBox.py:125 ../src/controlpanel/toolbar.py:115
+#: ../src/view/home/HomeBox.py:122 ../src/controlpanel/toolbar.py:115
msgid "Cancel"
msgstr "PrekliÄi"
-#: ../src/view/home/HomeBox.py:127 ../src/controlpanel/gui.py:276
+#: ../src/view/home/HomeBox.py:124 ../src/controlpanel/gui.py:273
msgid "Later"
msgstr "Kasneje"
-#: ../src/view/home/HomeBox.py:130
+#: ../src/view/home/HomeBox.py:127
msgid "Check now"
msgstr "Preveri zdaj"
-#: ../src/view/home/HomeBox.py:266
+#: ../src/view/home/HomeBox.py:261
msgid "List view"
msgstr "Seznam"
-#: ../src/view/home/HomeBox.py:267
+#: ../src/view/home/HomeBox.py:262
msgid "<Ctrl>2"
msgstr "<Ctrl>2"
-#: ../src/view/home/HomeBox.py:325
+#: ../src/view/home/HomeBox.py:320
msgid "Favorites view"
msgstr "Priljubljene"
-#: ../src/view/home/HomeBox.py:326
+#: ../src/view/home/HomeBox.py:321
msgid "<Ctrl>1"
msgstr "<Ctrl>1"
-# TRANS: label for the freeform layout in the favorites view
-#. TRANS: label for the freeform layout in the favorites view
-#: ../src/view/home/HomeBox.py:334
-msgid "Freeform"
-msgstr "ProstoroÄno"
-
-# TRANS: label for the ring layout in the favorites view
-#. TRANS: label for the ring layout in the favorites view
-#: ../src/view/home/HomeBox.py:341
-msgid "Ring"
-msgstr "ObroÄ"
-
#: ../src/view/home/MeshBox.py:97
msgid "Connect"
msgstr "Poveži"
@@ -175,31 +160,34 @@ msgstr "Prekini"
msgid "Disconnecting..."
msgstr "Prekinjam ..."
-#: ../src/view/home/MeshBox.py:152
+#: ../src/view/home/MeshBox.py:159
msgid "Connecting..."
msgstr "Povezujem ..."
+# TODO: show the channel number
#. TODO: show the channel number
-#: ../src/view/home/MeshBox.py:159
+#: ../src/view/home/MeshBox.py:166
msgid "Connected"
msgstr "Povezan"
-#: ../src/view/home/MeshBox.py:211 ../src/view/devices/network/mesh.py:41
+#: ../src/view/home/MeshBox.py:218 ../src/view/devices/network/mesh.py:41
#: ../src/view/devices/network/mesh.py:68
#: ../src/view/devices/network/mesh.py:72
msgid "Mesh Network"
msgstr "Omrežje Mesh"
-#: ../src/view/home/MeshBox.py:214 ../src/view/devices/network/wireless.py:119
+#: ../src/view/home/MeshBox.py:221 ../src/view/devices/network/wireless.py:125
#: ../src/view/devices/network/mesh.py:89
msgid "Disconnect..."
msgstr "Prekini ... "
-#: ../src/view/home/MeshBox.py:302 ../src/view/palettes.py:61
+#. TRANS: Action label for resuming an activity.
+#: ../src/view/home/MeshBox.py:309 ../src/view/palettes.py:61
+#: ../src/journal/journaltoolbox.py:399 ../src/journal/palettes.py:57
msgid "Resume"
msgstr "Nadaljuj"
-#: ../src/view/home/MeshBox.py:307 ../src/view/frame/activitiestray.py:205
+#: ../src/view/home/MeshBox.py:314 ../src/view/frame/activitiestray.py:206
msgid "Join"
msgstr "Pridruži se"
@@ -241,7 +229,7 @@ msgstr "Tiho"
msgid "Disconnected"
msgstr "Odklopljen"
-#: ../src/view/devices/network/wireless.py:137
+#: ../src/view/devices/network/wireless.py:143
msgid "Channel"
msgstr "Kanal"
@@ -310,150 +298,105 @@ msgstr ""
msgid "To apply your changes you have to restart sugar.\n"
msgstr "Za uveljavitev sprememb je potreben ponovni zagon programa sugar.\n"
-#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:296
+#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:305
msgid "Ok"
msgstr "V redu"
-#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:268
+#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:265
msgid "Changes require restart"
msgstr "Sprembe zahtevajo ponovni zagon"
-#: ../src/controlpanel/gui.py:267
+#: ../src/controlpanel/gui.py:264
msgid "Warning"
msgstr "Opozorilo"
-#: ../src/controlpanel/gui.py:271
+#: ../src/controlpanel/gui.py:268
msgid "Cancel changes"
msgstr "PrekliÄi spremembe"
-#: ../src/controlpanel/gui.py:280
+#: ../src/controlpanel/gui.py:277
msgid "Restart now"
msgstr "Ponovni zagon"
-#: ../src/controlpanel/model/aboutme.py:44
+#: ../src/controlpanel/aboutme/model.py:44
msgid "You must enter a name."
msgstr "Vpisati morat ime."
-#: ../src/controlpanel/model/aboutme.py:69
+#: ../src/controlpanel/aboutme/model.py:69
#, python-format
msgid "stroke: color=%s hue=%s"
msgstr "pisalo: barva=%s odtenek=%s"
-#: ../src/controlpanel/model/aboutme.py:72
+#: ../src/controlpanel/aboutme/model.py:72
#, python-format
msgid "stroke: %s"
msgstr "pisalo: %s"
-#: ../src/controlpanel/model/aboutme.py:74
+#: ../src/controlpanel/aboutme/model.py:74
#, python-format
msgid "fill: color=%s hue=%s"
msgstr "zapolni: barva=%s odtenek=%s"
-#: ../src/controlpanel/model/aboutme.py:76
+#: ../src/controlpanel/aboutme/model.py:76
#, python-format
msgid "fill: %s"
msgstr "zapolni: %s"
-#: ../src/controlpanel/model/aboutme.py:87
+#: ../src/controlpanel/aboutme/model.py:87
msgid "Error in specified color modifiers."
msgstr "NapaÄno doloÄena sprememba barve"
-#: ../src/controlpanel/model/aboutme.py:90
+#: ../src/controlpanel/aboutme/model.py:90
msgid "Error in specified colors."
msgstr "NapaÄno doloÄena barva"
-#: ../src/controlpanel/model/aboutxo.py:24
-msgid "Not available"
-msgstr "Ni na voljo"
-
-#: ../src/controlpanel/model/datetime.py:85
-msgid "Error timezone does not exist."
-msgstr "Napaka: Äasovno obmoÄje ne obstaja."
-
-#: ../src/controlpanel/model/frame.py:38 ../src/controlpanel/model/frame.py:60
-msgid "Value must be an integer."
-msgstr "Vrednost mora biti Å¡tevilka."
-
-#: ../src/controlpanel/model/language.py:28
-msgid "Could not access ~/.i18n. Create standard settings."
-msgstr "Dostop do ~/.i18n ni mogoÄe. Ustvari standardne nastavitve."
-
-#: ../src/controlpanel/model/language.py:110
-#, python-format
-msgid "Language for code=%s could not be determined."
-msgstr "Jezika za kodo=%s ni bilo mogoÄe doloÄiti."
-
-#: ../src/controlpanel/model/language.py:127
-#, python-format
-msgid "Sorry I do not speak '%s'."
-msgstr "Oprosti, ne govorim '%s'."
-
-#: ../src/controlpanel/model/network.py:48
-msgid "You must enter a server."
-msgstr "Vpisati moraš strežnik."
-
-#: ../src/controlpanel/model/network.py:63
-msgid "State is unknown."
-msgstr "Neznana država."
-
-#: ../src/controlpanel/model/network.py:83
-msgid "Error in specified radio argument use on/off."
-msgstr "Napaka pri doloÄanju stanja radijske povezave (vkljuÄen/izkljuÄen)."
-
-#: ../src/controlpanel/model/power.py:57
-msgid "Error in automatic pm argument, use on/off."
-msgstr "Napaka pri samodejni rabi ukaza pm, uporabi izklop/vklop."
-
-#: ../src/controlpanel/model/power.py:86
-msgid "Error in extreme pm argument, use on/off."
-msgstr "Napaka pri ekstremni vrednosti ukaza pm, uporabi izklop/vklop."
-
-#: ../src/controlpanel/view/aboutme.py:32
+#: ../src/controlpanel/aboutme/view.py:32
+#: ../src/controlpanel/aboutme/__init__.py:22
msgid "About Me"
msgstr "O meni"
-#: ../src/controlpanel/view/aboutme.py:134
+#: ../src/controlpanel/aboutme/view.py:134
msgid "Click to change your color:"
msgstr "Klikni za spremembo barve:"
-#: ../src/controlpanel/view/aboutxo.py:28
-msgid "About my XO"
-msgstr "O mojem XO"
+#: ../src/controlpanel/aboutxo/model.py:24
+msgid "Not available"
+msgstr "Ni na voljo"
-#: ../src/controlpanel/view/aboutxo.py:59
+#: ../src/controlpanel/aboutxo/view.py:55
msgid "Identity"
msgstr "Identiteta"
-#: ../src/controlpanel/view/aboutxo.py:68
+#: ../src/controlpanel/aboutxo/view.py:64
msgid "Serial Number:"
msgstr "Serijska Å¡tevilka:"
-#: ../src/controlpanel/view/aboutxo.py:91
+#: ../src/controlpanel/aboutxo/view.py:87
msgid "Software"
msgstr "Program"
-#: ../src/controlpanel/view/aboutxo.py:100
+#: ../src/controlpanel/aboutxo/view.py:96
msgid "Build:"
msgstr "RazliÄica:"
-#: ../src/controlpanel/view/aboutxo.py:115
+#: ../src/controlpanel/aboutxo/view.py:111
msgid "Sugar:"
msgstr "Sugar:"
-#: ../src/controlpanel/view/aboutxo.py:130
+#: ../src/controlpanel/aboutxo/view.py:126
msgid "Firmware:"
msgstr "Firmware:"
-#: ../src/controlpanel/view/aboutxo.py:152
+#: ../src/controlpanel/aboutxo/view.py:148
msgid "Copyright and License"
msgstr "Lastnik pravic"
-#: ../src/controlpanel/view/aboutxo.py:160
+#: ../src/controlpanel/aboutxo/view.py:156
msgid ""
"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
msgstr "© 2008 One Laptop per Child Association Inc, Red Hat Inc in sodelavci."
-#: ../src/controlpanel/view/aboutxo.py:166
+#: ../src/controlpanel/aboutxo/view.py:163
msgid ""
"Sugar is the graphical user interface that you are looking at. Sugar is free "
"software, covered by the GNU General Public License, and you are welcome to "
@@ -465,93 +408,149 @@ msgstr ""
"lahko spreminjate in/ali distribuirate, a pod nekaterimi pogoji, zapisanimi "
"v omenjeni licenci."
-#: ../src/controlpanel/view/aboutxo.py:178
+#: ../src/controlpanel/aboutxo/view.py:175
msgid "Full license:"
msgstr "LicenÄne pravice:"
-#: ../src/controlpanel/view/datetime.py:29
-msgid "Date & Time"
-msgstr "Datum in ura"
+#: ../src/controlpanel/aboutxo/__init__.py:21
+msgid "About my XO"
+msgstr "O mojem XO"
-#: ../src/controlpanel/view/datetime.py:72
+#: ../src/controlpanel/datetime/model.py:89
+msgid "Error timezone does not exist."
+msgstr "Napaka: Äasovno obmoÄje ne obstaja."
+
+#: ../src/controlpanel/datetime/view.py:68
msgid "Timezone"
msgstr "ÄŒasovno obmoÄje"
-#: ../src/controlpanel/view/frame.py:28
-msgid "Frame"
-msgstr "Okvir"
+#: ../src/controlpanel/datetime/__init__.py:21
+msgid "Date & Time"
+msgstr "Datum in ura"
-#: ../src/controlpanel/view/frame.py:30
+#: ../src/controlpanel/frame/model.py:38 ../src/controlpanel/frame/model.py:60
+msgid "Value must be an integer."
+msgstr "Vrednost mora biti Å¡tevilka."
+
+#: ../src/controlpanel/frame/view.py:26
msgid "never"
msgstr "nikoli"
-#: ../src/controlpanel/view/frame.py:31
+#: ../src/controlpanel/frame/view.py:27
msgid "instantaneous"
msgstr "takojšnji"
-#: ../src/controlpanel/view/frame.py:32
+#: ../src/controlpanel/frame/view.py:28
#, python-format
msgid "%s seconds"
msgstr "%s sekund"
-#: ../src/controlpanel/view/frame.py:56
+#: ../src/controlpanel/frame/view.py:52
msgid "Activation Delay"
msgstr "Zamik aktivacije"
-#: ../src/controlpanel/view/frame.py:80
+#: ../src/controlpanel/frame/view.py:76
msgid "Corner"
msgstr "Kot"
-#: ../src/controlpanel/view/frame.py:115
+#: ../src/controlpanel/frame/view.py:111
msgid "Edge"
msgstr "Rob"
-#: ../src/controlpanel/view/language.py:29
-#: ../src/controlpanel/view/language.py:74
+#: ../src/controlpanel/frame/__init__.py:21
+msgid "Frame"
+msgstr "Okvir"
+
+#: ../src/controlpanel/language/model.py:28
+msgid "Could not access ~/.i18n. Create standard settings."
+msgstr "Dostop do ~/.i18n ni mogoÄe. Ustvari standardne nastavitve."
+
+#: ../src/controlpanel/language/model.py:114
+#, python-format
+msgid "Language for code=%s could not be determined."
+msgstr "Jezika za kodo=%s ni bilo mogoÄe doloÄiti."
+
+#: ../src/controlpanel/language/model.py:131
+#, python-format
+msgid "Sorry I do not speak '%s'."
+msgstr "Oprosti, ne govorim '%s'."
+
+#: ../src/controlpanel/language/view.py:70
+#: ../src/controlpanel/language/__init__.py:21
msgid "Language"
msgstr "Jezik"
-#: ../src/controlpanel/view/network.py:28
+#: ../src/controlpanel/network/model.py:62
+msgid "State is unknown."
+msgstr "Neznana država."
+
+#: ../src/controlpanel/network/model.py:82
+msgid "Error in specified radio argument use on/off."
+msgstr "Napaka pri doloÄanju stanja radijske povezave (vkljuÄen/izkljuÄen)."
+
+#: ../src/controlpanel/network/view.py:28
+#: ../src/controlpanel/network/__init__.py:21
msgid "Network"
msgstr "Omrežje"
-#: ../src/controlpanel/view/network.py:53
+#: ../src/controlpanel/network/view.py:54
msgid "Wireless"
msgstr "BrezžiÄno"
-#: ../src/controlpanel/view/network.py:61
-msgid "Radio:"
+#: ../src/controlpanel/network/view.py:62
+msgid "Turn of the wireless radio to save battery life"
+msgstr ""
+"Izklopi brezžiÄno radijsko povezavo za podaljÅ¡anje življenjske dobe baterije"
+
+#: ../src/controlpanel/network/view.py:75
+msgid "Radio"
msgstr "Radijska povezava:"
-#: ../src/controlpanel/view/network.py:94
+#: ../src/controlpanel/network/view.py:91
+msgid "Discard network history if you have trouble connecting to the network"
+msgstr "Zavrži zgodovino mreže, Äe imate težave pri povezavi z mrežo"
+
+#: ../src/controlpanel/network/view.py:100
+msgid "Discard network history"
+msgstr "Zavrži zgodovino mreže"
+
+#: ../src/controlpanel/network/view.py:113
msgid "Mesh"
msgstr "Mesh"
-#: ../src/controlpanel/view/network.py:103
+#: ../src/controlpanel/network/view.py:122
msgid "Server:"
msgstr "Strežnik:"
-#: ../src/controlpanel/view/power.py:27
-msgid "Power"
-msgstr "Energija"
+#: ../src/controlpanel/power/model.py:55
+msgid "Error in automatic pm argument, use on/off."
+msgstr "Napaka pri samodejni rabi ukaza pm, uporabi izklop/vklop."
-#: ../src/controlpanel/view/power.py:51
+#: ../src/controlpanel/power/model.py:84
+msgid "Error in extreme pm argument, use on/off."
+msgstr "Napaka pri ekstremni vrednosti ukaza pm, uporabi izklop/vklop."
+
+#: ../src/controlpanel/power/view.py:47
msgid "Power management"
msgstr "Nazdor porabe elektriÄne energije"
-#: ../src/controlpanel/view/power.py:61
+#: ../src/controlpanel/power/view.py:57
msgid "Automatic power management (increases battery life)"
msgstr ""
"Samodejni nadzor porabe elektriÄne energije (podalÅ¡uje življenjsko dobo "
"baterije)"
-#: ../src/controlpanel/view/power.py:89
+#: ../src/controlpanel/power/view.py:85
msgid ""
"Extreme power management (disableswireless radio, increases battery life)"
msgstr ""
"Ekstremni nadzor porabe elektriÄne energije (ugasnjen radijski del, podaljÅ¡a "
"življenjsko dobo baterije)"
+#: ../src/controlpanel/power/__init__.py:21
+msgid "Power"
+msgstr "Energija"
+
#: ../src/view/devices/network/mesh.py:111
msgid "Connected to a School Mesh Portal"
msgstr "Povezan na Å¡olski Mesh portal"
@@ -580,40 +579,67 @@ msgstr "Ustvarjam enostavno Mesh omrežje"
msgid "Unknown Mesh"
msgstr "Neznano Mesh omrežje"
-#: ../src/view/frame/activitiestray.py:210
+#: ../src/view/frame/activitiestray.py:211
msgid "Decline"
msgstr "Zavrni"
-#: ../src/view/home/favoritesview.py:286
+# TRANS: label for the freeform layout in the favorites view
+#. TRANS: label for the freeform layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:107
+msgid "Freeform"
+msgstr "ProstoroÄno"
+
+# TRANS: label for the ring layout in the favorites view
+#. TRANS: label for the ring layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:189
+msgid "Ring"
+msgstr "ObroÄ"
+
+#. TRANS: label for the spiral layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:334
+msgid "Spiral"
+msgstr "Spirala"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:401
+msgid "Box"
+msgstr "Okvir"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:442
+msgid "Triangle"
+msgstr "Trikotnik"
+
+#: ../src/view/home/favoritesview.py:295
msgid "Registration Failed"
msgstr "Registracija ni uspela"
-#: ../src/view/home/favoritesview.py:287
+#: ../src/view/home/favoritesview.py:296
#, python-format
msgid "%s"
msgstr "%s"
-#: ../src/view/home/favoritesview.py:289
+#: ../src/view/home/favoritesview.py:298
msgid "Registration Successful"
msgstr "Uspešna registracija"
-#: ../src/view/home/favoritesview.py:290
+#: ../src/view/home/favoritesview.py:299
msgid "You are now registered with your school server."
msgstr "Vpisan si v šolski strežnik."
-#: ../src/view/home/favoritesview.py:407
-msgid "Control Panel"
-msgstr "Nadzorna ploÅ¡Äa"
+#: ../src/view/home/favoritesview.py:420
+msgid "Settings"
+msgstr "Nastavitve"
-#: ../src/view/home/favoritesview.py:418
+#: ../src/view/home/favoritesview.py:425
msgid "Restart"
msgstr "Ponovni zagon"
-#: ../src/view/home/favoritesview.py:423
+#: ../src/view/home/favoritesview.py:430
msgid "Shutdown"
msgstr "Zaustavitev"
-#: ../src/view/home/favoritesview.py:429
+#: ../src/view/home/favoritesview.py:436
msgid "Register"
msgstr "Registracija"
@@ -625,26 +651,152 @@ msgstr "Zaganjam ..."
msgid "Stop"
msgstr "Ustavi"
-#: ../src/view/palettes.py:104
+#. TRANS: Action label for starting an entry.
+#: ../src/view/palettes.py:104 ../src/journal/journaltoolbox.py:402
+#: ../src/journal/palettes.py:59
msgid "Start"
msgstr "Zaženi"
-#: ../src/view/palettes.py:132
+#: ../src/view/palettes.py:138
msgid "Remove favorite"
msgstr "Odstrani priljubljeno"
-#: ../src/view/palettes.py:136
+#: ../src/view/palettes.py:142
msgid "Make favorite"
msgstr "Nastavi priljubljeno"
-#: ../src/view/palettes.py:185
+#: ../src/view/palettes.py:191
msgid "Show contents"
msgstr "Prikaži vsebino"
-#: ../src/view/palettes.py:209
+#: ../src/view/palettes.py:215
#, python-format
msgid "%(free_space)d MB Free"
msgstr "%(free_space)d MB prosto"
+#: ../src/journal/journaltoolbox.py:62
+msgid "Search"
+msgstr "IÅ¡Äi"
+
+#: ../src/journal/journaltoolbox.py:119
+msgid "Anytime"
+msgstr "Kadarkoli"
+
+#: ../src/journal/journaltoolbox.py:121
+msgid "Today"
+msgstr "Danes"
+
+#: ../src/journal/journaltoolbox.py:123
+msgid "Since yesterday"
+msgstr "Od vÄeraj"
+
+#. TRANS: Filter entries modified during the last 7 days.
+#: ../src/journal/journaltoolbox.py:125
+msgid "Past week"
+msgstr "V zadnjem tednu"
+
+#. TRANS: Filter entries modified during the last 30 days.
+#: ../src/journal/journaltoolbox.py:127
+msgid "Past month"
+msgstr "V zadnjem mesecu"
+
+#. TRANS: Filter entries modified during the last 356 days.
+#: ../src/journal/journaltoolbox.py:129
+msgid "Past year"
+msgstr "V zadnjem letu"
+
+#: ../src/journal/journaltoolbox.py:136
+msgid "Anyone"
+msgstr "Kdorkoli"
+
+#: ../src/journal/journaltoolbox.py:138
+msgid "My friends"
+msgstr "Moji prijatelji"
+
+#: ../src/journal/journaltoolbox.py:139
+msgid "My class"
+msgstr "Moj razred"
+
+#. TRANS: Item in a combo box that filters by entry type.
+#: ../src/journal/journaltoolbox.py:255
+msgid "Anything"
+msgstr "Karkoli"
+
+#. TODO: Add "Start with" menu item
+#: ../src/journal/journaltoolbox.py:325 ../src/journal/palettes.py:67
+msgid "Copy"
+msgstr "Kopiraj"
+
+#: ../src/journal/collapsedentry.py:248 ../src/journal/expandedentry.py:176
+#: ../src/journal/palettes.py:51
+msgid "Untitled"
+msgstr "Neimenovan"
+
+#: ../src/journal/journalactivity.py:119 ../src/journal/volumesmanager.py:57
+msgid "Journal"
+msgstr "Beležka"
+
+#: ../src/journal/expandedentry.py:222
+msgid "No preview"
+msgstr "Predogled ni na voljo"
+
+#: ../src/journal/expandedentry.py:241
+msgid "Participants:"
+msgstr "Udeleženci:"
+
+#: ../src/journal/expandedentry.py:266
+msgid "Description:"
+msgstr "Opis:"
+
+#: ../src/journal/expandedentry.py:292
+msgid "Tags:"
+msgstr "Oznake:"
+
+#: ../src/journal/objectchooser.py:134
+msgid "Choose an object"
+msgstr "Izberi predmet"
+
+#: ../src/journal/objectchooser.py:139
+msgid "Close"
+msgstr "Zapri"
+
+#: ../src/journal/volumestoolbar.py:93
+msgid "Unmount"
+msgstr "Odstrani"
+
+#: ../src/journal/misc.py:95
+msgid "No date"
+msgstr "Brez datuma"
+
+#: ../src/journal/listview.py:39
+msgid "Your Journal is empty"
+msgstr "Tvoja beležka je prazna"
+
+#: ../src/journal/listview.py:40
+msgid "No matching entries "
+msgstr "Ne najdem vsebine za "
+
+#: ../src/journal/modalalert.py:59
+msgid "Your Journal is full"
+msgstr "Tvoja beležka je polna"
+
+#: ../src/journal/modalalert.py:63
+msgid "Please delete some old Journal entries to make space for new ones."
+msgstr "Izbriši starejše vpise v beležko, da narediš prostor za nove."
+
+#: ../src/journal/modalalert.py:75
+msgid "Show Journal"
+msgstr "Prikaži beležko"
+
+#, python-format
+#~ msgid "Clipboard object: %s."
+#~ msgstr "Predmet na odložiÅ¡Äu: %s."
+
+#~ msgid "You must enter a server."
+#~ msgstr "Vpisati moraš strežnik."
+
+#~ msgid "Control Panel"
+#~ msgstr "Nadzorna ploÅ¡Äa"
+
#~ msgid "<Ctrl>R"
#~ msgstr "<Ctrl>R"
diff --git a/po/tr.po b/po/tr.po
index fdaf037..696a3c0 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -6,292 +6,834 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-02-09 00:30-0500\n"
-"PO-Revision-Date: 2008-02-22 23:10-0500\n"
-"Last-Translator: Serkan Cabi <serkancabi@gmail.com>\n"
+"POT-Creation-Date: 2008-09-25 00:30-0400\n"
+"PO-Revision-Date: 2008-09-26 09:38-0400\n"
+"Last-Translator: abdullah kocabas <abdullah.kocabas@abcdizustu.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Pootle 1.0.2\n"
+"X-Generator: Pootle 1.1.0rc2\n"
-#: ../src/intro/intro.py:67
+#: ../src/intro/window.py:93 ../src/controlpanel/aboutme/view.py:100
msgid "Name:"
msgstr "Ä°sim:"
-#: ../src/intro/intro.py:96
+#: ../src/intro/window.py:125
msgid "Click to change color:"
msgstr "Renk değiştirmek için tıkla:"
-#: ../src/intro/intro.py:146
+#: ../src/intro/window.py:175 ../src/journal/detailview.py:119
msgid "Back"
msgstr "Geri"
-#: ../src/intro/intro.py:160
+#: ../src/intro/window.py:189 ../src/controlpanel/toolbar.py:61
msgid "Done"
-msgstr "Bitti"
+msgstr "Kapat"
-#: ../src/intro/intro.py:163
+#: ../src/intro/window.py:192
msgid "Next"
msgstr "Ä°leri"
-#: ../src/view/BuddyMenu.py:59
+#: ../src/view/BuddyMenu.py:60
msgid "Remove friend"
-msgstr "Arkadaşı sil"
+msgstr "Arkadaşı Kaldır"
-#: ../src/view/BuddyMenu.py:62
+#: ../src/view/BuddyMenu.py:63
msgid "Make friend"
-msgstr "ArkadaÅŸ ol"
+msgstr "ArkadaÅŸ Ekle"
-#: ../src/view/BuddyMenu.py:84
+#: ../src/view/BuddyMenu.py:92
#, python-format
msgid "Invite to %s"
-msgstr "%s için davet et"
+msgstr "Davet et %s"
-#: ../src/view/clipboardmenu.py:58
+#: ../src/view/clipboardmenu.py:51
msgid "Remove"
msgstr "Kaldır"
-#: ../src/view/clipboardmenu.py:63
+#: ../src/view/clipboardmenu.py:56 ../src/view/clipboardmenu.py:78
msgid "Open"
msgstr "Aç"
-#. self._stop_item = MenuItem(_('Stop download'), 'stock-close')
-#. TODO: Implement stopping downloads
-#. self._stop_item.connect('activate', self._stop_item_activate_cb)
-#. self.append_menu_item(self._stop_item)
-#: ../src/view/clipboardmenu.py:73
-msgid "Add to journal"
-msgstr "Günlüğe ekle"
+#: ../src/view/clipboardmenu.py:61 ../src/view/home/HomeBox.py:84
+msgid "Keep"
+msgstr "Kaydet"
+
+#: ../src/view/clipboardmenu.py:83
+msgid "Open with"
+msgstr "Birlikte Aç"
-#: ../src/view/clipboardmenu.py:213
+#: ../src/view/clipboardmenu.py:228
#, python-format
-msgid "Clipboard object: %s."
-msgstr "Pano nesnesi: %s"
+msgid "%s clipping"
+msgstr "%s Kırp"
-#: ../src/hardware/keydialog.py:149
+#: ../src/hardware/keydialog.py:150
msgid "Key Type:"
-msgstr "Tuş çeşidi:"
+msgstr "Tuş Çeşidi:"
-#: ../src/hardware/keydialog.py:169
+#: ../src/hardware/keydialog.py:170
msgid "Authentication Type:"
-msgstr "Kimlik denetleme çeşidi:"
+msgstr "Kimlik Denetleme Çeşidi:"
-#: ../src/hardware/keydialog.py:250
+#: ../src/hardware/keydialog.py:251
msgid "Encryption Type:"
-msgstr "Şifreleme çeşidi:"
+msgstr "Şifreleme Çeşidi:"
-#: ../src/view/home/activitiesdonut.py:90
-msgid "Starting..."
-msgstr "Başlıyor..."
+#: ../src/hardware/schoolserver.py:17
+msgid "Cannot obtain data needed for registration."
+msgstr "Kayıt İçin Gerekli Bilgileri Sağlayamıyor"
-#: ../src/view/home/activitiesdonut.py:104 ../src/view/home/MeshBox.py:295
-msgid "Resume"
-msgstr "Devam et"
+#: ../src/hardware/schoolserver.py:31
+msgid "Cannot connect to the server."
+msgstr "Sunucuya Bağlanamıyor"
-#: ../src/view/home/activitiesdonut.py:111
-msgid "Stop"
-msgstr "Dur"
+#: ../src/hardware/schoolserver.py:36
+msgid "The server could not complete the request."
+msgstr "Sunucu İsteği Tamamlayamıyor"
-#: ../src/view/Shell.py:285
+#: ../src/view/Shell.py:251
msgid "Screenshot"
msgstr "Ekran Resmi"
-#: ../src/view/home/HomeBox.py:159
-msgid "Reboot"
-msgstr "Yeniden BaÅŸlat"
-
-#: ../src/view/home/HomeBox.py:164
-msgid "Shutdown"
-msgstr "Kapat"
-
-#: ../src/view/home/HomeBox.py:170
-#, fuzzy
-msgid "Register"
-msgstr "Kayıt"
-
-#: ../src/view/home/HomeBox.py:175 ../src/view/home/HomeBox.py:216
-msgid "About this XO"
-msgstr "Bu XO hakkında"
+#: ../src/view/home/HomeBox.py:78
+msgid "Confirm erase"
+msgstr "Silmeyi Onayla"
-#: ../src/view/home/HomeBox.py:222
-#, fuzzy
-msgid "Not available"
-msgstr "Uygun deÄŸil"
-
-#. Only show disconnect when there's a mesh device, because mesh takes
-#. priority over the normal wireless device. NM doesn't have a "disconnect"
-#. method for a device either (for various reasons) so this doesn't
-#. have a good mapping
-#: ../src/view/home/MeshBox.py:90 ../src/view/home/MeshBox.py:197
-#: ../src/view/devices/network/wireless.py:113
-#: ../src/view/devices/network/mesh.py:83
+#: ../src/view/home/HomeBox.py:80
+#, python-format
+msgid "Confirm erase: Do you want to permanently erase %s?"
+msgstr "Silme Onayı: %s i tamamen silmek mi istiyorsunuz?"
+
+#: ../src/view/home/HomeBox.py:87 ../src/view/palettes.py:120
+#: ../src/journal/journaltoolbox.py:335 ../src/journal/palettes.py:75
+msgid "Erase"
+msgstr "Silme"
+
+#: ../src/view/home/HomeBox.py:117
+msgid "Software Update"
+msgstr "Yazılım Güncelleme"
+
+#: ../src/view/home/HomeBox.py:118
+msgid "Update your activities to ensure compatibility with your new software"
+msgstr "Aktivitelerinizi yeni yazılıma uygun hale getirmek için güncelleyiniz"
+
+#: ../src/view/home/HomeBox.py:122 ../src/controlpanel/toolbar.py:115
+msgid "Cancel"
+msgstr "Ä°ptal"
+
+#: ../src/view/home/HomeBox.py:124 ../src/controlpanel/gui.py:273
+msgid "Later"
+msgstr "Daha Sonra"
+
+#: ../src/view/home/HomeBox.py:127
+msgid "Check now"
+msgstr "Åžimdi Kontrol Et"
+
+#: ../src/view/home/HomeBox.py:261
+msgid "List view"
+msgstr "Liste Görünümü"
+
+#: ../src/view/home/HomeBox.py:262
+msgid "<Ctrl>2"
+msgstr "<Ctrl>2"
+
+#: ../src/view/home/HomeBox.py:320
+msgid "Favorites view"
+msgstr "Favoriler Görünümü"
+
+#: ../src/view/home/HomeBox.py:321
+msgid "<Ctrl>1"
+msgstr "<Ctrl>1"
+
+#: ../src/view/home/MeshBox.py:97
+msgid "Connect"
+msgstr "BaÄŸlan"
+
+#: ../src/view/home/MeshBox.py:106
+msgid "Disconnect"
+msgstr "Bağlantıyı kes"
+
+# Only show disconnect when there's a mesh device, because mesh takes
+# priority over the normal wireless device. NM doesn't have a "disconnect"
+# method for a device either (for various reasons) so this doesn't
+# have a good mapping
+#: ../src/view/home/MeshBox.py:118
+msgid "Disconnecting..."
+msgstr "Bağlantı kesiliyor..."
+
+#: ../src/view/home/MeshBox.py:159
+msgid "Connecting..."
+msgstr "Bağlanıyor..."
+
+# TODO: show the channel number
+#. TODO: show the channel number
+#: ../src/view/home/MeshBox.py:166
+msgid "Connected"
+msgstr "Bağlı"
+
+#: ../src/view/home/MeshBox.py:218 ../src/view/devices/network/mesh.py:41
+#: ../src/view/devices/network/mesh.py:68
+#: ../src/view/devices/network/mesh.py:72
+msgid "Mesh Network"
+msgstr "Mesh Ağı"
+
+# Only show disconnect when there's a mesh device, because mesh takes
+# priority over the normal wireless device. NM doesn't have a "disconnect"
+# method for a device either (for various reasons) so this doesn't
+# have a good mapping
+#: ../src/view/home/MeshBox.py:221 ../src/view/devices/network/wireless.py:125
+#: ../src/view/devices/network/mesh.py:89
msgid "Disconnect..."
msgstr "Bağlantıyı kes..."
-#: ../src/view/home/MeshBox.py:195 ../src/view/devices/network/mesh.py:37
-#: ../src/view/devices/network/mesh.py:62
-#: ../src/view/devices/network/mesh.py:66
-msgid "Mesh Network"
-msgstr "Örgüsel Ağ"
+#. TRANS: Action label for resuming an activity.
+#: ../src/view/home/MeshBox.py:309 ../src/view/palettes.py:61
+#: ../src/journal/journaltoolbox.py:399 ../src/journal/palettes.py:57
+msgid "Resume"
+msgstr "Devam Et"
-#: ../src/view/home/MeshBox.py:300
+#: ../src/view/home/MeshBox.py:314 ../src/view/frame/activitiestray.py:206
msgid "Join"
msgstr "Katıl"
-#: ../src/view/devices/battery.py:38
-msgid "My Battery life"
-msgstr "Pil ömrüm"
+#: ../src/view/devices/battery.py:45
+msgid "My Battery"
+msgstr "Pil Durumu"
+
+#: ../src/view/devices/battery.py:114
+msgid "Charging"
+msgstr "Åžarj"
+
+#: ../src/view/devices/battery.py:117
+msgid "Very little power remaining"
+msgstr "Çok az şarj kaldı"
+
+#: ../src/view/devices/battery.py:123
+#, python-format
+msgid "%(hour)d:%(min).2d remaining"
+msgstr "%(hour)d:%(min).2d kaldı"
+
+#: ../src/view/devices/battery.py:127
+msgid "Charged"
+msgstr "Åžarj edildi"
-#: ../src/view/devices/battery.py:94
-msgid "Battery charging"
-msgstr "Pil doluyor"
+#: ../src/view/devices/speaker.py:44
+msgid "My Speakers"
+msgstr "Hoparlör"
-#: ../src/view/devices/battery.py:96
-msgid "Battery discharging"
-msgstr "Pil boşalıyor"
+#: ../src/view/devices/speaker.py:125
+msgid "Unmute"
+msgstr "Sesi açık"
-#: ../src/view/devices/battery.py:98
-msgid "Battery fully charged"
-msgstr "Pil tam dolu"
+#: ../src/view/devices/speaker.py:128
+msgid "Mute"
+msgstr "Sessiz"
-#: ../src/view/devices/network/wireless.py:61
+#: ../src/view/devices/network/wireless.py:67
msgid "Disconnected"
msgstr "Bağlantı kesildi"
-#: ../src/view/devices/network/wireless.py:131
+#: ../src/view/devices/network/wireless.py:143
msgid "Channel"
msgstr "Kanal"
-#: ../src/view/frame/zoomtoolbar.py:42
+#: ../src/view/frame/zoomtoolbar.py:37
msgid "Neighborhood"
-msgstr "KomÅŸuluk"
+msgstr "KomÅŸular"
-#: ../src/view/frame/zoomtoolbar.py:54
+#: ../src/view/frame/zoomtoolbar.py:39
msgid "Group"
msgstr "Grup"
-#: ../src/view/frame/zoomtoolbar.py:66
+#: ../src/view/frame/zoomtoolbar.py:41
msgid "Home"
msgstr "Ana ekran"
-#: ../src/view/frame/zoomtoolbar.py:78
+#: ../src/view/frame/zoomtoolbar.py:43
msgid "Activity"
-msgstr "Etkinlik"
+msgstr "Aktivite"
+
+#: ../src/controlpanel/cmd.py:26
+#, python-format
+msgid ""
+"sugar-control-panel: WARNING, found more than one option with the same name: "
+"%s module: %r"
+msgstr ""
+"sugar-kontrol-paneli: UYARI, aynı isimle birden fazla seçenek buldu: %s "
+"birim: %r"
+
+#: ../src/controlpanel/cmd.py:28
+#, python-format
+msgid "sugar-control-panel: key=%s not an available option"
+msgstr "sugar-kontrol-panel: anahtar=%s geçerli bir seçenek değil"
+
+#: ../src/controlpanel/cmd.py:29
+#, python-format
+msgid "sugar-control-panel: %s"
+msgstr "sugar-kontrol-panel: %s"
-#: ../src/controlpanel/control.py:219
+#. TRANS: Translators, there's a empty line at the end of this string,
+#. which must appear in the translated string (msgstr) as well.
+#: ../src/controlpanel/cmd.py:35
+msgid ""
+"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
+" Control for the sugar environment. \n"
+" Options: \n"
+" -h show this help message and exit \n"
+" -l list all the available options \n"
+" -h key show information about this key \n"
+" -g key get the current value of the key \n"
+" -s key set the current value for the key \n"
+" -c key clear the current value for the key \n"
+" "
+msgstr ""
+"Kullanım: sugar-kontrol-paneli [ seçenek ] anahtar [ args ... ] \n"
+"Sugar ortamı için kontrol \n"
+"Seçenekler:\n"
+"-h Bu yardım mesajını göster ve çık \n"
+"-l Tüm uygun seçenekleri listele \n"
+"-h anahtarı Bu anahtar hakkındaki bilgileri göster \n"
+"-g anahtarı Bu anahtarın son değerini al \n"
+"-s anahtarı Bu anahtarın son değerini kur \n"
+"\t"
+
+#: ../src/controlpanel/cmd.py:48
msgid "To apply your changes you have to restart sugar.\n"
-msgstr "Değişikliklerin etkinleşmesi için yeniden başlatın.\n"
+msgstr "Değişikliklerinizin etkinleşmesi için bilgisayarı tekrar başlatmanız "
+"gerekiyor\n"
-#: ../src/controlpanel/control.py:273
+#: ../src/controlpanel/toolbar.py:121 ../src/view/home/favoritesview.py:305
+msgid "Ok"
+msgstr "Tamam"
+
+#: ../src/controlpanel/sectionview.py:42 ../src/controlpanel/gui.py:265
+msgid "Changes require restart"
+msgstr "Değişiklikler bilgisayarın tekrar başlatılmasını gerektiriyor"
+
+#: ../src/controlpanel/gui.py:264
+msgid "Warning"
+msgstr "Uyarı"
+
+#: ../src/controlpanel/gui.py:268
+msgid "Cancel changes"
+msgstr "DeÄŸiÅŸiklikleri Ä°ptal Et"
+
+#: ../src/controlpanel/gui.py:277
+msgid "Restart now"
+msgstr "Åžimdi Tekrar BaÅŸlat"
+
+#: ../src/controlpanel/aboutme/model.py:44
+msgid "You must enter a name."
+msgstr "Bir isim girmeniz gerekiyor"
+
+#: ../src/controlpanel/aboutme/model.py:69
+#, python-format
+msgid "stroke: color=%s hue=%s"
+msgstr "fırça darbesi:_ renk=%s renk=%s"
+
+#: ../src/controlpanel/aboutme/model.py:72
+#, python-format
+msgid "stroke: %s"
+msgstr "fırça darbesi:_ %s"
+
+#: ../src/controlpanel/aboutme/model.py:74
+#, python-format
+msgid "fill: color=%s hue=%s"
+msgstr "doldurma:_ renk=%s renk=%s"
+
+#: ../src/controlpanel/aboutme/model.py:76
+#, python-format
+msgid "fill: %s"
+msgstr "doldurma:_ %s"
+
+#: ../src/controlpanel/aboutme/model.py:87
msgid "Error in specified color modifiers."
-msgstr "Belirtilen renk deÄŸiÅŸtiricilerinde hata."
+msgstr "Belirtilen renk deÄŸiÅŸtiricilerinde hata"
-#: ../src/controlpanel/control.py:276
+#: ../src/controlpanel/aboutme/model.py:90
msgid "Error in specified colors."
-msgstr "Belirtilen renklerde hata."
+msgstr "Belirtilen renklerde hata"
-#: ../src/controlpanel/control.py:312
-msgid "off"
-msgstr "kapalı"
+#: ../src/controlpanel/aboutme/view.py:32
+#: ../src/controlpanel/aboutme/__init__.py:22
+msgid "About Me"
+msgstr "Benim Hakkımda"
-#: ../src/controlpanel/control.py:314
-msgid "on"
-msgstr "açık"
+#: ../src/controlpanel/aboutme/view.py:134
+msgid "Click to change your color:"
+msgstr "Renk değiştirmek için tıklayınız:"
-#: ../src/controlpanel/control.py:316
-msgid "State is unknown."
-msgstr "Durum bilinmiyor."
+#: ../src/controlpanel/aboutxo/model.py:24
+msgid "Not available"
+msgstr "Mevcut deÄŸil"
-#: ../src/controlpanel/control.py:336
-msgid "Error in specified radio argument use on/off."
-msgstr ""
+#: ../src/controlpanel/aboutxo/view.py:55
+msgid "Identity"
+msgstr "Kimlik"
-#: ../src/controlpanel/control.py:340
-msgid "Permission denied. You need to be root to run this method."
-msgstr ""
+#: ../src/controlpanel/aboutxo/view.py:64
+msgid "Serial Number:"
+msgstr "Seri Numarası:"
-#: ../src/controlpanel/control.py:370
-msgid "Error in reading timezone"
-msgstr ""
+#: ../src/controlpanel/aboutxo/view.py:87
+msgid "Software"
+msgstr "Yazılım"
-#: ../src/controlpanel/control.py:401
-#, python-format
-msgid "Error copying timezone (from %s): %s"
+#: ../src/controlpanel/aboutxo/view.py:96
+msgid "Build:"
+msgstr "Yapı:"
+
+#: ../src/controlpanel/aboutxo/view.py:111
+msgid "Sugar:"
+msgstr "Sugar:"
+
+#: ../src/controlpanel/aboutxo/view.py:126
+msgid "Firmware:"
+msgstr "Aygıt Yazılımı:"
+
+#: ../src/controlpanel/aboutxo/view.py:148
+msgid "Copyright and License"
+msgstr "Telif Hakkı ve Lisans"
+
+#: ../src/controlpanel/aboutxo/view.py:156
+msgid ""
+"© 2008 One Laptop per Child Association Inc; Red Hat Inc; and Contributors."
msgstr ""
+"© 2008 One Laptop per Child Association Inc; Red Hat Inc; ve Destekçiler"
-#: ../src/controlpanel/control.py:406
-#, python-format
-msgid "Changing permission of timezone: %s"
+#: ../src/controlpanel/aboutxo/view.py:163
+msgid ""
+"Sugar is the graphical user interface that you are looking at. Sugar is free "
+"software, covered by the GNU General Public License, and you are welcome to "
+"change it and/or distribute copies of it under certain conditions described "
+"therein."
msgstr ""
+"Sugar gördüğünüz grafiksel kullanıcı arayüzüdür. Sugar, GNU General Public "
+"Lisansı'na sahip, ücretsiz bir yazılımdır. İstediğiniz takdirde yazılımı "
+"değiştirebilir ve/veya burada açıklanan belli koşullar altında kopyasını "
+"dağıtabilirsiniz."
-#: ../src/controlpanel/control.py:416
+#: ../src/controlpanel/aboutxo/view.py:175
+msgid "Full license:"
+msgstr "Tam Lisans:"
+
+#: ../src/controlpanel/aboutxo/__init__.py:21
+msgid "About my XO"
+msgstr "XO Bilgisayarım Hakkında"
+
+#: ../src/controlpanel/datetime/model.py:89
msgid "Error timezone does not exist."
-msgstr ""
+msgstr "Hatalı zaman dilimi yok"
+
+#: ../src/controlpanel/datetime/view.py:68
+msgid "Timezone"
+msgstr "Saat Dilimi"
+
+#: ../src/controlpanel/datetime/__init__.py:21
+msgid "Date & Time"
+msgstr "Tarih ve Zaman"
-#: ../src/controlpanel/control.py:421 ../src/controlpanel/control.py:440
+#: ../src/controlpanel/frame/model.py:38 ../src/controlpanel/frame/model.py:60
+msgid "Value must be an integer."
+msgstr "Değer bir tamsayı olmalı"
+
+#: ../src/controlpanel/frame/view.py:26
+msgid "never"
+msgstr "asla"
+
+#: ../src/controlpanel/frame/view.py:27
+msgid "instantaneous"
+msgstr "anlık"
+
+#: ../src/controlpanel/frame/view.py:28
#, python-format
-msgid "Could not access %s. Create standard settings."
-msgstr ""
+msgid "%s seconds"
+msgstr "%s saniyeler"
+
+#: ../src/controlpanel/frame/view.py:52
+msgid "Activation Delay"
+msgstr "Aktivasyon Gecikmesi"
-#: ../src/controlpanel/control.py:467
+#: ../src/controlpanel/frame/view.py:76
+msgid "Corner"
+msgstr "Köşe"
+
+#: ../src/controlpanel/frame/view.py:111
+msgid "Edge"
+msgstr "Kenar"
+
+#: ../src/controlpanel/frame/__init__.py:21
+msgid "Frame"
+msgstr "Çerçeve"
+
+#: ../src/controlpanel/language/model.py:28
+msgid "Could not access ~/.i18n. Create standard settings."
+msgstr "~/.i18n e girilemiyor. Standart ayarları oluşturunuz"
+
+#: ../src/controlpanel/language/model.py:114
#, python-format
msgid "Language for code=%s could not be determined."
-msgstr ""
+msgstr "kod=%s için dil tanımlanamadı"
-#: ../src/controlpanel/control.py:477
+#: ../src/controlpanel/language/model.py:131
#, python-format
msgid "Sorry I do not speak '%s'."
-msgstr ""
+msgstr "Üzgünüm, %s konuşmuyorum"
-#: ../src/controlpanel/cmd.py:27
-msgid ""
-"Usage: sugar-control-panel [ option ] key [ args ... ] \n"
-" Control for the sugar environment. \n"
-" Options: \n"
-" -h show this help message and exit \n"
-" -l list all the available options \n"
-" -h key show information about this key \n"
-" -g key get the current value of the key \n"
-" -s key set the current value for the key \n"
-" "
-msgstr ""
+#: ../src/controlpanel/language/view.py:70
+#: ../src/controlpanel/language/__init__.py:21
+msgid "Language"
+msgstr "Dil"
-#: ../src/controlpanel/cmd.py:55 ../src/controlpanel/cmd.py:67
-#: ../src/controlpanel/cmd.py:74
-#, python-format
-msgid "sugar-control-panel: key=%s not an available option"
-msgstr ""
+#: ../src/controlpanel/network/model.py:62
+msgid "State is unknown."
+msgstr "Durum bilinmiyor"
-#: ../src/controlpanel/cmd.py:80
-#, python-format
-msgid "sugar-control-panel: %s"
+#: ../src/controlpanel/network/model.py:82
+msgid "Error in specified radio argument use on/off."
+msgstr "Belirtilen bağlantı noktasında hata vardır, açma kapama yapınız"
+
+#: ../src/controlpanel/network/view.py:28
+#: ../src/controlpanel/network/__init__.py:21
+msgid "Network"
+msgstr "AÄŸ"
+
+#: ../src/controlpanel/network/view.py:54
+msgid "Wireless"
+msgstr "Kablosuz Bağlantı"
+
+#: ../src/controlpanel/network/view.py:62
+msgid "Turn of the wireless radio to save battery life"
+msgstr "Pil ömrünü arttırmak için kablosuz bağlantı özelliğini kapatınız."
+
+#: ../src/controlpanel/network/view.py:75
+msgid "Radio"
+msgstr "Bağlantı "
+
+#: ../src/controlpanel/network/view.py:91
+msgid "Discard network history if you have trouble connecting to the network"
+msgstr "Ağa bağlanmada sorun yaşıyorsanız ağ geçmişini silebilirsiniz."
+
+#: ../src/controlpanel/network/view.py:100
+msgid "Discard network history"
+msgstr "Ağ geçmişini siliniz."
+
+#: ../src/controlpanel/network/view.py:113
+msgid "Mesh"
+msgstr "Mesh"
+
+#: ../src/controlpanel/network/view.py:122
+msgid "Server:"
+msgstr "Sunucu:"
+
+#: ../src/controlpanel/power/model.py:55
+msgid "Error in automatic pm argument, use on/off."
+msgstr "Otomatik pm değişkeninde hata vardır, açma kapama yapınız"
+
+#: ../src/controlpanel/power/model.py:84
+msgid "Error in extreme pm argument, use on/off."
+msgstr "En uçtaki pm değişkeninde hata vardır, açma kapama yapınız"
+
+#: ../src/controlpanel/power/view.py:47
+msgid "Power management"
+msgstr "Güç Kontrolü"
+
+#: ../src/controlpanel/power/view.py:57
+msgid "Automatic power management (increases battery life)"
+msgstr "Otomatik güç kontrolü (pil ömrünü uzatır)"
+
+#: ../src/controlpanel/power/view.py:85
+msgid ""
+"Extreme power management (disableswireless radio, increases battery life)"
msgstr ""
+"Aşırı güç kontrolü (kablosuz bağlantı özelliğini etkisiz kılar, şarj ömrünü "
+"uzatır)"
-#: ../src/view/devices/network/mesh.py:105
+#: ../src/controlpanel/power/__init__.py:21
+msgid "Power"
+msgstr "Güç"
+
+#: ../src/view/devices/network/mesh.py:111
msgid "Connected to a School Mesh Portal"
-msgstr ""
+msgstr "Okul Mesh Ağı Portalı'na bağlandı."
-#: ../src/view/devices/network/mesh.py:107
+#: ../src/view/devices/network/mesh.py:113
msgid "Looking for a School Mesh Portal..."
-msgstr ""
+msgstr "Okul Mesh Ağı Portalı arıyor..."
-#: ../src/view/devices/network/mesh.py:110
+#: ../src/view/devices/network/mesh.py:116
msgid "Connected to an XO Mesh Portal"
-msgstr ""
+msgstr "XO Mesh Ağı Portalı'na bağlandı."
-#: ../src/view/devices/network/mesh.py:112
+#: ../src/view/devices/network/mesh.py:118
msgid "Looking for an XO Mesh Portal..."
-msgstr ""
+msgstr "XO Mesh Ağ Portalı arıyor..."
-#: ../src/view/devices/network/mesh.py:115
+#: ../src/view/devices/network/mesh.py:121
msgid "Connected to a Simple Mesh"
-msgstr ""
+msgstr "Sadece Mesh Ağına bağlandı."
-#: ../src/view/devices/network/mesh.py:117
+#: ../src/view/devices/network/mesh.py:123
msgid "Starting a Simple Mesh"
-msgstr ""
+msgstr "Sadece Mesh Ağı başlatıyor."
-#: ../src/view/devices/network/mesh.py:124
+#: ../src/view/devices/network/mesh.py:130
msgid "Unknown Mesh"
+msgstr "Bilinmeyen Mesh Ağı"
+
+#: ../src/view/frame/activitiestray.py:211
+msgid "Decline"
+msgstr "Azalmak"
+
+#. TRANS: label for the freeform layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:107
+msgid "Freeform"
+msgstr "dağınık görünüm"
+
+#. TRANS: label for the ring layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:189
+msgid "Ring"
+msgstr "çember görünümü"
+
+#. TRANS: label for the spiral layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:334
+msgid "Spiral"
+msgstr "sarmal"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:401
+msgid "Box"
+msgstr "kutu"
+
+#. TRANS: label for the box layout in the favorites view
+#: ../src/view/home/favoriteslayout.py:442
+msgid "Triangle"
+msgstr "üçgen"
+
+#: ../src/view/home/favoritesview.py:295
+msgid "Registration Failed"
+msgstr "Kayıt Başarısız"
+
+#: ../src/view/home/favoritesview.py:296
+#, python-format
+msgid "%s"
+msgstr "%s"
+
+#: ../src/view/home/favoritesview.py:298
+msgid "Registration Successful"
+msgstr "Kayıt Başarılı"
+
+#: ../src/view/home/favoritesview.py:299
+msgid "You are now registered with your school server."
+msgstr "Şu an okul sunucunuza kayıt oldunuz"
+
+#: ../src/view/home/favoritesview.py:420
+msgid "Settings"
+msgstr "Ayarlar"
+
+#: ../src/view/home/favoritesview.py:425
+msgid "Restart"
+msgstr "Yeniden BaÅŸlat"
+
+#: ../src/view/home/favoritesview.py:430
+msgid "Shutdown"
+msgstr "Kapat"
+
+#: ../src/view/home/favoritesview.py:436
+msgid "Register"
+msgstr "Kaydol"
+
+#: ../src/view/palettes.py:42
+msgid "Starting..."
+msgstr "Başlıyor..."
+
+#: ../src/view/palettes.py:72
+msgid "Stop"
+msgstr "Durdur"
+
+#. TRANS: Action label for starting an entry.
+#: ../src/view/palettes.py:104 ../src/journal/journaltoolbox.py:402
+#: ../src/journal/palettes.py:59
+msgid "Start"
+msgstr "BaÅŸlat"
+
+#: ../src/view/palettes.py:138
+msgid "Remove favorite"
+msgstr "Favorilerimden kaldır"
+
+#: ../src/view/palettes.py:142
+msgid "Make favorite"
+msgstr "Favorilerime ekle"
+
+#: ../src/view/palettes.py:191
+msgid "Show contents"
+msgstr "İçeriklerini göster"
+
+#: ../src/view/palettes.py:215
+#, python-format
+msgid "%(free_space)d MB Free"
+msgstr "%(free_space)d MB boÅŸ"
+
+#: ../src/journal/journaltoolbox.py:62
+msgid "Search"
+msgstr "Arama"
+
+#: ../src/journal/journaltoolbox.py:119
+msgid "Anytime"
+msgstr "Herhangi bir zaman"
+
+#: ../src/journal/journaltoolbox.py:121
+msgid "Today"
+msgstr "Bugün"
+
+#: ../src/journal/journaltoolbox.py:123
+msgid "Since yesterday"
+msgstr "Dünden itibaren"
+
+#. TRANS: Filter entries modified during the last 7 days.
+#: ../src/journal/journaltoolbox.py:125
+msgid "Past week"
+msgstr "Geçen hafta"
+
+#. TRANS: Filter entries modified during the last 30 days.
+#: ../src/journal/journaltoolbox.py:127
+msgid "Past month"
+msgstr "Geçen ay"
+
+#. TRANS: Filter entries modified during the last 356 days.
+#: ../src/journal/journaltoolbox.py:129
+msgid "Past year"
+msgstr "Geçen yıl"
+
+#: ../src/journal/journaltoolbox.py:136
+msgid "Anyone"
+msgstr "Herhangi biri"
+
+#: ../src/journal/journaltoolbox.py:138
+msgid "My friends"
+msgstr "Arkadaşlarım"
+
+#: ../src/journal/journaltoolbox.py:139
+msgid "My class"
+msgstr "Sınıfım"
+
+#. TRANS: Item in a combo box that filters by entry type.
+#: ../src/journal/journaltoolbox.py:255
+msgid "Anything"
+msgstr "Herhangi bir ÅŸey"
+
+#. TODO: Add "Start with" menu item
+#: ../src/journal/journaltoolbox.py:325 ../src/journal/palettes.py:67
+msgid "Copy"
+msgstr "Kopyala"
+
+#: ../src/journal/collapsedentry.py:248 ../src/journal/expandedentry.py:176
+#: ../src/journal/palettes.py:51
+msgid "Untitled"
+msgstr "Ä°simsiz"
+
+#: ../src/journal/journalactivity.py:119 ../src/journal/volumesmanager.py:57
+msgid "Journal"
+msgstr "Günlük"
+
+#: ../src/journal/expandedentry.py:222
+msgid "No preview"
+msgstr "Ön izleme yok"
+
+#: ../src/journal/expandedentry.py:241
+msgid "Participants:"
+msgstr "Katılımcılar:"
+
+#: ../src/journal/expandedentry.py:266
+msgid "Description:"
+msgstr "Tanım:"
+
+#: ../src/journal/expandedentry.py:292
+msgid "Tags:"
+msgstr "Etiketler:"
+
+#: ../src/journal/objectchooser.py:134
+msgid "Choose an object"
+msgstr "Bir nesne seçiniz"
+
+#: ../src/journal/objectchooser.py:139
+msgid "Close"
+msgstr "Kapat"
+
+#: ../src/journal/volumestoolbar.py:93
+msgid "Unmount"
+msgstr "Bağlantıyı kaldır"
+
+#: ../src/journal/misc.py:95
+msgid "No date"
+msgstr "Tarih yok"
+
+#: ../src/journal/listview.py:39
+msgid "Your Journal is empty"
+msgstr "Günlüğünüz boş"
+
+#: ../src/journal/listview.py:40
+msgid "No matching entries "
+msgstr "EÅŸleÅŸen bir giriÅŸ yok_"
+
+#: ../src/journal/modalalert.py:59
+msgid "Your Journal is full"
+msgstr "Günlüğünüz dolu"
+
+#: ../src/journal/modalalert.py:63
+msgid "Please delete some old Journal entries to make space for new ones."
msgstr ""
+"Yeni girişler yapabilmek için lütfen günlükteki eski kayıtlardan bir kısmını "
+"siliniz"
+
+#: ../src/journal/modalalert.py:75
+msgid "Show Journal"
+msgstr "Günlüğü göster"
+
+#~ msgid "Add to journal"
+#~ msgstr "Günlüğe ekleyiniz."
+
+#, python-format
+#~ msgid "Clipboard object: %s."
+#~ msgstr "Pano nesnesi: %s"
+
+#~ msgid "Reboot"
+#~ msgstr "Yeniden başlatınız."
+
+#~ msgid "About this XO"
+#~ msgstr "Bu XO hakkında"
+
+#~ msgid "My Battery life"
+#~ msgstr "Pil ömrüm"
+
+#~ msgid "Battery charging"
+#~ msgstr "Pil doluyor."
+
+#~ msgid "Battery discharging"
+#~ msgstr "Pil boşalıyor."
+
+#~ msgid "Battery fully charged"
+#~ msgstr "Pil tam dolu"
+
+#~ msgid "off"
+#~ msgstr "kapalı"
+
+#~ msgid "on"
+#~ msgstr "açık"
+
+#~ msgid "Permission denied. You need to be root to run this method."
+#~ msgstr ""
+#~ "İzin reddedildi. Bu metodu çalıştırmak için merkezden olmanız gerekmektedir."
+
+#~ msgid "Error in reading timezone"
+#~ msgstr "Saat diliminde hata vardır."
+
+#, python-format
+#~ msgid "Error copying timezone (from %s): %s"
+#~ msgstr "Saat dilimini %s'ten kopyalarken hata oluÅŸmuÅŸtur: %s"
+
+#, python-format
+#~ msgid "Changing permission of timezone: %s"
+#~ msgstr "Saat dilimini deÄŸiÅŸtirme izni: %s"
diff --git a/service/Makefile.am b/service/Makefile.am
deleted file mode 100644
index fa8e66f..0000000
--- a/service/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-servicedir = $(datadir)/dbus-1/services
-
-service_in_files = \
- org.laptop.ActivityRegistry.service.in \
- org.laptop.Clipboard.service.in
-
-service_DATA = \
- org.laptop.ActivityRegistry.service \
- org.laptop.Clipboard.service
-
-org.laptop.ActivityRegistry.service: org.laptop.ActivityRegistry.service.in Makefile
- @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
-
-org.laptop.Clipboard.service: org.laptop.Clipboard.service.in Makefile
- @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
-
-org.laptop.ObjectTypeRegistry.service: org.laptop.ObjectTypeRegistry.service.in Makefile
- @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
-
-sugardir = $(pkgdatadir)/service
-
-sugar_PYTHON = \
- __init__.py \
- activityregistryservice.py \
- bundleregistry.py \
- clipboardobject.py \
- clipboardservice.py \
- config.py \
- main.py
-
-DISTCLEANFILES = $(service_DATA)
-
-EXTRA_DIST = $(service_in_files)
diff --git a/service/Makefile.in b/service/Makefile.in
deleted file mode 100644
index 7c95d05..0000000
--- a/service/Makefile.in
+++ /dev/null
@@ -1,439 +0,0 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-subdir = service
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config.py.in $(sugar_PYTHON)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES = config.py
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(sugardir)" "$(DESTDIR)$(servicedir)"
-sugarPYTHON_INSTALL = $(INSTALL_DATA)
-py_compile = $(top_srcdir)/py-compile
-serviceDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(service_DATA)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ALL_LINGUAS = @ALL_LINGUAS@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLLIBS = @INTLLIBS@
-INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
-INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
-INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
-INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
-INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
-INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
-INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
-INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
-INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
-INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
-INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
-INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
-INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
-INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
-MSGMERGE = @MSGMERGE@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-POFILES = @POFILES@
-POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
-PYTHON = @PYTHON@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_VERSION = @PYTHON_VERSION@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SHELL_CFLAGS = @SHELL_CFLAGS@
-SHELL_LIBS = @SHELL_LIBS@
-STRIP = @STRIP@
-SUCROSE_VERSION = @SUCROSE_VERSION@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-XGETTEXT = @XGETTEXT@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host_alias = @host_alias@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-servicedir = $(datadir)/dbus-1/services
-service_in_files = \
- org.laptop.ActivityRegistry.service.in \
- org.laptop.Clipboard.service.in
-
-service_DATA = \
- org.laptop.ActivityRegistry.service \
- org.laptop.Clipboard.service
-
-sugardir = $(pkgdatadir)/service
-sugar_PYTHON = \
- __init__.py \
- activityregistryservice.py \
- bundleregistry.py \
- clipboardobject.py \
- clipboardservice.py \
- config.py \
- main.py
-
-DISTCLEANFILES = $(service_DATA)
-EXTRA_DIST = $(service_in_files)
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign service/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign service/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-config.py: $(top_builddir)/config.status $(srcdir)/config.py.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-install-sugarPYTHON: $(sugar_PYTHON)
- @$(NORMAL_INSTALL)
- test -z "$(sugardir)" || $(MKDIR_P) "$(DESTDIR)$(sugardir)"
- @list='$(sugar_PYTHON)'; dlist=''; for p in $$list; do\
- if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
- if test -f $$b$$p; then \
- f=$(am__strip_dir) \
- dlist="$$dlist $$f"; \
- echo " $(sugarPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(sugardir)/$$f'"; \
- $(sugarPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(sugardir)/$$f"; \
- else :; fi; \
- done; \
- if test -n "$$dlist"; then \
- if test -z "$(DESTDIR)"; then \
- PYTHON=$(PYTHON) $(py_compile) --basedir "$(sugardir)" $$dlist; \
- else \
- PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(sugardir)" $$dlist; \
- fi; \
- else :; fi
-
-uninstall-sugarPYTHON:
- @$(NORMAL_UNINSTALL)
- @list='$(sugar_PYTHON)'; dlist=''; for p in $$list; do\
- f=$(am__strip_dir) \
- rm -f "$(DESTDIR)$(sugardir)/$$f"; \
- rm -f "$(DESTDIR)$(sugardir)/$${f}c"; \
- rm -f "$(DESTDIR)$(sugardir)/$${f}o"; \
- done
-install-serviceDATA: $(service_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)"
- @list='$(service_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(serviceDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(servicedir)/$$f'"; \
- $(serviceDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(servicedir)/$$f"; \
- done
-
-uninstall-serviceDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(service_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(servicedir)/$$f'"; \
- rm -f "$(DESTDIR)$(servicedir)/$$f"; \
- done
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
- for dir in "$(DESTDIR)$(sugardir)" "$(DESTDIR)$(servicedir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-serviceDATA install-sugarPYTHON
-
-install-dvi: install-dvi-am
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-info: install-info-am
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-ps: install-ps-am
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-serviceDATA uninstall-sugarPYTHON
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-serviceDATA install-strip install-sugarPYTHON \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am uninstall uninstall-am uninstall-serviceDATA \
- uninstall-sugarPYTHON
-
-
-org.laptop.ActivityRegistry.service: org.laptop.ActivityRegistry.service.in Makefile
- @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
-
-org.laptop.Clipboard.service: org.laptop.Clipboard.service.in Makefile
- @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
-
-org.laptop.ObjectTypeRegistry.service: org.laptop.ObjectTypeRegistry.service.in Makefile
- @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/service/activityregistryservice.py b/service/activityregistryservice.py
deleted file mode 100644
index c8a8efa..0000000
--- a/service/activityregistryservice.py
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-# 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
-
-import dbus
-import dbus.service
-
-import bundleregistry
-
-_ACTIVITY_REGISTRY_SERVICE_NAME = 'org.laptop.ActivityRegistry'
-_ACTIVITY_REGISTRY_IFACE = 'org.laptop.ActivityRegistry'
-_ACTIVITY_REGISTRY_PATH = '/org/laptop/ActivityRegistry'
-
-class ActivityRegistry(dbus.service.Object):
- def __init__(self):
- bus = dbus.SessionBus()
- bus_name = dbus.service.BusName(_ACTIVITY_REGISTRY_SERVICE_NAME,
- bus=bus)
- dbus.service.Object.__init__(self, bus_name, _ACTIVITY_REGISTRY_PATH)
-
- bundle_registry = bundleregistry.get_registry()
- bundle_registry.connect('bundle-added', self._bundle_added_cb)
- bundle_registry.connect('bundle-removed', self._bundle_removed_cb)
- bundle_registry.connect('bundle-changed', self._bundle_changed_cb)
-
- @dbus.service.method(_ACTIVITY_REGISTRY_IFACE,
- in_signature='s', out_signature='b',
- utf8_strings=True)
- def AddBundle(self, bundle_path):
- '''Register the activity bundle with the global registry
-
- bundle_path -- path to the root directory of the activity bundle,
- that is, the directory with activity/activity.info as a
- child of the directory.
-
- The bundleregistry.BundleRegistry is responsible for setting
- up a set of d-bus service mappings for each available activity.
- '''
- registry = bundleregistry.get_registry()
- return registry.add_bundle(bundle_path)
-
- @dbus.service.method(_ACTIVITY_REGISTRY_IFACE,
- in_signature='s', out_signature='b',
- utf8_strings=True)
- def RemoveBundle(self, bundle_path):
- '''Unregister the activity bundle with the global registry
-
- bundle_path -- path to the activity bundle root directory
- '''
- registry = bundleregistry.get_registry()
- return registry.remove_bundle(bundle_path)
-
- @dbus.service.method(_ACTIVITY_REGISTRY_IFACE,
- in_signature='', out_signature='aa{sv}')
- def GetActivities(self):
- result = []
- registry = bundleregistry.get_registry()
- for bundle in registry:
- result.append(self._bundle_to_dict(bundle))
- return result
-
- @dbus.service.method(_ACTIVITY_REGISTRY_IFACE,
- in_signature='s', out_signature='a{sv}')
- def GetActivity(self, bundle_id):
- registry = bundleregistry.get_registry()
- bundle = registry.get_bundle(bundle_id)
- if not bundle:
- return {}
-
- return self._bundle_to_dict(bundle)
-
- @dbus.service.method(_ACTIVITY_REGISTRY_IFACE,
- in_signature='s', out_signature='aa{sv}')
- def FindActivity(self, name):
- result = []
- key = name.lower()
-
- for bundle in bundleregistry.get_registry():
- name = bundle.get_name().lower()
- bundle_id = bundle.get_bundle_id().lower()
- if name.find(key) != -1 or bundle_id.find(key) != -1:
- result.append(self._bundle_to_dict(bundle))
-
- return result
-
- @dbus.service.method(_ACTIVITY_REGISTRY_IFACE,
- in_signature='s', out_signature='aa{sv}')
- def GetActivitiesForType(self, mime_type):
- result = []
- registry = bundleregistry.get_registry()
- for bundle in registry.get_activities_for_type(mime_type):
- result.append(self._bundle_to_dict(bundle))
- return result
-
- @dbus.service.method(_ACTIVITY_REGISTRY_IFACE,
- in_signature='sib', out_signature='')
- def SetActivityFavorite(self, bundle_id, version, favorite):
- registry = bundleregistry.get_registry()
- registry.set_bundle_favorite(bundle_id, version, favorite)
-
- @dbus.service.method(_ACTIVITY_REGISTRY_IFACE,
- in_signature='sidd', out_signature='')
- def SetActivityPosition(self, bundle_id, version, x, y):
- registry = bundleregistry.get_registry()
- registry.set_bundle_position(bundle_id, version, float(x), float(y))
-
- @dbus.service.signal(_ACTIVITY_REGISTRY_IFACE, signature='a{sv}')
- def ActivityAdded(self, activity_info):
- pass
-
- @dbus.service.signal(_ACTIVITY_REGISTRY_IFACE, signature='a{sv}')
- def ActivityRemoved(self, activity_info):
- pass
-
- @dbus.service.signal(_ACTIVITY_REGISTRY_IFACE, signature='a{sv}')
- def ActivityChanged(self, activity_info):
- pass
-
- def _bundle_to_dict(self, bundle):
- registry = bundleregistry.get_registry()
- favorite = registry.is_bundle_favorite(bundle.get_bundle_id(),
- bundle.get_activity_version())
- x, y = registry.get_bundle_position(bundle.get_bundle_id(),
- bundle.get_activity_version())
- return {'name': bundle.get_name(),
- 'icon': bundle.get_icon(),
- 'bundle_id': bundle.get_bundle_id(),
- 'version': bundle.get_activity_version(),
- 'path': bundle.get_path(),
- 'command': bundle.get_command(),
- 'show_launcher': bundle.get_show_launcher(),
- 'favorite': favorite,
- 'installation_time': bundle.get_installation_time(),
- 'position_x': x,
- 'position_y': y}
-
- def _bundle_added_cb(self, bundle_registry, bundle):
- self.ActivityAdded(self._bundle_to_dict(bundle))
-
- def _bundle_removed_cb(self, bundle_registry, bundle):
- self.ActivityRemoved(self._bundle_to_dict(bundle))
-
- def _bundle_changed_cb(self, bundle_registry, bundle):
- self.ActivityChanged(self._bundle_to_dict(bundle))
-
-_instance = None
-
-def get_instance():
- global _instance
- if not _instance:
- _instance = ActivityRegistry()
- return _instance
-
diff --git a/service/clipboardservice.py b/service/clipboardservice.py
deleted file mode 100644
index 4378db0..0000000
--- a/service/clipboardservice.py
+++ /dev/null
@@ -1,212 +0,0 @@
-# Copyright (C) 2006, Red Hat, Inc.
-#
-# 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 logging
-import os
-import shutil
-import urlparse
-import tempfile
-
-import dbus
-import dbus.service
-
-from sugar import mime
-
-from clipboardobject import ClipboardObject, Format
-
-NAME_KEY = 'NAME'
-PERCENT_KEY = 'PERCENT'
-ICON_KEY = 'ICON'
-PREVIEW_KEY = 'PREVIEW'
-ACTIVITIES_KEY = 'ACTIVITIES'
-FORMATS_KEY = 'FORMATS'
-
-TYPE_KEY = 'TYPE'
-DATA_KEY = 'DATA'
-ON_DISK_KEY = 'ON_DISK'
-
-_CLIPBOARD_DBUS_INTERFACE = "org.laptop.Clipboard"
-_CLIPBOARD_OBJECT_PATH = "/org/laptop/Clipboard"
-_CLIPBOARD_OBJECTS_PATH = _CLIPBOARD_OBJECT_PATH + "/Objects/"
-
-class ClipboardService(dbus.service.Object):
-
- def __init__(self):
- self._objects = {}
- self._next_id = 0
-
- bus = dbus.SessionBus()
- bus_name = dbus.service.BusName(_CLIPBOARD_DBUS_INTERFACE, bus=bus)
- dbus.service.Object.__init__(self, bus_name,
- _CLIPBOARD_OBJECT_PATH)
-
- def _get_next_object_id(self):
- self._next_id += 1
- return self._next_id
-
- # dbus methods
- @dbus.service.method(_CLIPBOARD_DBUS_INTERFACE,
- in_signature="s", out_signature="o")
- def add_object(self, name):
- logging.debug('ClipboardService.add_object')
- op = _CLIPBOARD_OBJECTS_PATH + "%d" % self._get_next_object_id()
- self._objects[op] = ClipboardObject(op, name)
- self.object_added(dbus.ObjectPath(op), name)
- logging.debug('Added object ' + op + ' with name ' + name)
- return dbus.ObjectPath(op)
-
- @dbus.service.method(_CLIPBOARD_DBUS_INTERFACE,
- in_signature="ssayb", out_signature="",
- byte_arrays=True)
- def add_object_format(self, object_path, format_type, data, on_disk):
- logging.debug('ClipboardService.add_object_format')
- cb_object = self._objects[str(object_path)]
-
- if format_type == 'XdndDirectSave0':
- format = Format('text/uri-list', data + '\r\n', on_disk)
- format.owns_disk_data = True
- cb_object.add_format(format)
- elif on_disk and cb_object.get_percent() == 100:
- new_uri = self._copy_file(data)
- cb_object.add_format(Format(format_type, new_uri, on_disk))
- logging.debug('Added format of type ' + format_type
- + ' with path at ' + new_uri)
- else:
- cb_object.add_format(Format(format_type, data, on_disk))
- logging.debug('Added in-memory format of type ' + format_type + '.')
-
- self.object_state_changed(object_path, {NAME_KEY: cb_object.get_name(),
- PERCENT_KEY: cb_object.get_percent(),
- ICON_KEY: cb_object.get_icon(),
- PREVIEW_KEY: cb_object.get_preview(),
- ACTIVITIES_KEY: cb_object.get_activities()})
-
- @dbus.service.method(_CLIPBOARD_DBUS_INTERFACE,
- in_signature="o", out_signature="")
- def delete_object(self, object_path):
- cb_object = self._objects.pop(str(object_path))
- cb_object.destroy()
- self.object_deleted(object_path)
- logging.debug('Deleted object with object_id ' + object_path)
-
- @dbus.service.method(_CLIPBOARD_DBUS_INTERFACE,
- in_signature="oi", out_signature="")
- def set_object_percent(self, object_path, percent):
- cb_object = self._objects[str(object_path)]
- if percent < 0 or percent > 100:
- raise ValueError("invalid percentage")
- if cb_object.get_percent() > percent:
- raise ValueError("invalid percentage; less than current percent")
- if cb_object.get_percent() == percent:
- # ignore setting same percentage
- return
-
- cb_object.set_percent(percent)
-
- if percent == 100:
- formats = cb_object.get_formats()
- for format_name, format in formats.iteritems():
- if format.is_on_disk() and not format.owns_disk_data:
- new_uri = self._copy_file(format.get_data())
- format.set_data(new_uri)
-
- # Add a text/plain format to objects that are text but lack it
- if 'text/plain' not in formats.keys():
- if 'UTF8_STRING' in formats.keys():
- self.add_object_format(
- object_path, 'text/plain',
- data=formats['UTF8_STRING'].get_data(), on_disk=False)
- elif 'text/unicode' in formats.keys():
- self.add_object_format(
- object_path, 'text/plain',
- data=formats['UTF8_STRING'].get_data(), on_disk=False)
-
- self.object_state_changed(object_path, {NAME_KEY: cb_object.get_name(),
- PERCENT_KEY: percent,
- ICON_KEY: cb_object.get_icon(),
- PREVIEW_KEY: cb_object.get_preview(),
- ACTIVITIES_KEY: cb_object.get_activities()})
-
- @dbus.service.method(_CLIPBOARD_DBUS_INTERFACE,
- in_signature="o", out_signature="a{sv}")
- def get_object(self, object_path):
- logging.debug('ClipboardService.get_object')
-
- if not self._objects.has_key(str(object_path)):
- return dbus.Dictionary({}, signature='sv')
-
- cb_object = self._objects[str(object_path)]
- formats = cb_object.get_formats()
- format_types = dbus.Array([], signature='s')
-
- for key in formats.keys():
- format_types.append(key)
-
- result_dict = {NAME_KEY: cb_object.get_name(),
- PERCENT_KEY: cb_object.get_percent(),
- ICON_KEY: cb_object.get_icon(),
- PREVIEW_KEY: cb_object.get_preview(),
- ACTIVITIES_KEY: cb_object.get_activities(),
- FORMATS_KEY: format_types}
- return dbus.Dictionary(result_dict)
-
- @dbus.service.method(_CLIPBOARD_DBUS_INTERFACE,
- in_signature="os", out_signature="a{sv}")
- def get_object_data(self, object_path, format_type):
- logging.debug('ClipboardService.get_object_data')
- cb_object = self._objects[str(object_path)]
- format = cb_object.get_formats()[format_type]
- result_dict = {TYPE_KEY: format.get_type(),
- DATA_KEY: dbus.ByteArray(format.get_data()),
- ON_DISK_KEY: format.is_on_disk()}
- return dbus.Dictionary(result_dict)
-
- # dbus signals
- @dbus.service.signal(_CLIPBOARD_DBUS_INTERFACE, signature="os")
- def object_added(self, object_path, name):
- pass
-
- @dbus.service.signal(_CLIPBOARD_DBUS_INTERFACE, signature="o")
- def object_deleted(self, object_path):
- pass
-
- @dbus.service.signal(_CLIPBOARD_DBUS_INTERFACE, signature="oa{sv}")
- def object_state_changed(self, object_path, values):
- pass
-
- def _copy_file(self, original_uri):
- uri = urlparse.urlparse(original_uri)
- path, file_name = os.path.split(uri.path)
-
- root, ext = os.path.splitext(file_name)
- if not ext or ext == '.':
- mime_type = mime.get_for_file(uri.path)
- ext = '.' + mime.get_primary_extension(mime_type)
-
- f, new_file_path = tempfile.mkstemp(ext, root)
- del f
- shutil.copyfile(uri.path, new_file_path)
- os.chmod(new_file_path, 0644)
-
- return 'file://' + new_file_path
-
-_instance = None
-
-def get_instance():
- global _instance
- if not _instance:
- _instance = ClipboardService()
- return _instance
diff --git a/service/config.py b/service/config.py
deleted file mode 100644
index 1ebe7ff..0000000
--- a/service/config.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2008 Red Hat, Inc.
-#
-# 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
-
-data_path = '/home/marco/sucrose-0.82/install/share/sugar/data'
diff --git a/service/config.py.in b/service/config.py.in
deleted file mode 100644
index c617d7e..0000000
--- a/service/config.py.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2008 Red Hat, Inc.
-#
-# 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
-
-data_path = '@prefix@/share/sugar/data'
diff --git a/service/main.py b/service/main.py
deleted file mode 100755
index 4883f82..0000000
--- a/service/main.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (C) 2006, Red Hat, Inc.
-# 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
-
-import logging
-
-import gobject
-import dbus.glib
-
-from sugar import logger
-
-import activityregistryservice
-import clipboardservice
-
-def main():
- logger.start('shellservice')
- logging.info('Starting shell service.')
-
- gobject.threads_init()
- dbus.glib.threads_init()
-
- clipboardservice.get_instance()
- activityregistryservice.get_instance()
-
- loop = gobject.MainLoop()
- try:
- loop.run()
- except KeyboardInterrupt:
- print 'Ctrl+C pressed, exiting...'
-
diff --git a/service/org.laptop.ActivityRegistry.service.in b/service/org.laptop.ActivityRegistry.service.in
deleted file mode 100644
index ab6647c..0000000
--- a/service/org.laptop.ActivityRegistry.service.in
+++ /dev/null
@@ -1,4 +0,0 @@
-[D-BUS Service]
-Name = org.laptop.ActivityRegistry
-Exec = @bindir@/sugar-shell-service
-
diff --git a/service/org.laptop.Clipboard.service.in b/service/org.laptop.Clipboard.service.in
deleted file mode 100644
index 7ce3f6e..0000000
--- a/service/org.laptop.Clipboard.service.in
+++ /dev/null
@@ -1,4 +0,0 @@
-[D-BUS Service]
-Name = org.laptop.Clipboard
-Exec = @bindir@/sugar-shell-service
-
diff --git a/src/Makefile.am b/src/Makefile.am
index daf31ae..83571a4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,12 +1 @@
-SUBDIRS = controlpanel hardware model view intro
-
-sugardir = $(pkgdatadir)/shell
-sugar_PYTHON = \
- config.py \
- emulator.py \
- logsmanager.py \
- main.py \
- session.py \
- shellservice.py
-
-EXTRA_DIST = $(bin_SCRIPTS) $(conf_DATA)
+SUBDIRS = jarabe
diff --git a/src/Makefile.in b/src/Makefile.in
index 7227b90..43c0349 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -30,14 +30,13 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = src
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config.py.in $(sugar_PYTHON)
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES = config.py
+CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -47,15 +46,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(sugardir)"
-sugarPYTHON_INSTALL = $(INSTALL_DATA)
-py_compile = $(top_srcdir)/py-compile
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
@@ -85,6 +75,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -199,19 +192,10 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = controlpanel hardware model view intro
-sugardir = $(pkgdatadir)/shell
-sugar_PYTHON = \
- config.py \
- emulator.py \
- logsmanager.py \
- main.py \
- session.py \
- shellservice.py
-
-EXTRA_DIST = $(bin_SCRIPTS) $(conf_DATA)
+SUBDIRS = jarabe
all: all-recursive
.SUFFIXES:
@@ -244,36 +228,6 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-config.py: $(top_builddir)/config.status $(srcdir)/config.py.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-install-sugarPYTHON: $(sugar_PYTHON)
- @$(NORMAL_INSTALL)
- test -z "$(sugardir)" || $(MKDIR_P) "$(DESTDIR)$(sugardir)"
- @list='$(sugar_PYTHON)'; dlist=''; for p in $$list; do\
- if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
- if test -f $$b$$p; then \
- f=$(am__strip_dir) \
- dlist="$$dlist $$f"; \
- echo " $(sugarPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(sugardir)/$$f'"; \
- $(sugarPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(sugardir)/$$f"; \
- else :; fi; \
- done; \
- if test -n "$$dlist"; then \
- if test -z "$(DESTDIR)"; then \
- PYTHON=$(PYTHON) $(py_compile) --basedir "$(sugardir)" $$dlist; \
- else \
- PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(sugardir)" $$dlist; \
- fi; \
- else :; fi
-
-uninstall-sugarPYTHON:
- @$(NORMAL_UNINSTALL)
- @list='$(sugar_PYTHON)'; dlist=''; for p in $$list; do\
- f=$(am__strip_dir) \
- rm -f "$(DESTDIR)$(sugardir)/$$f"; \
- rm -f "$(DESTDIR)$(sugardir)/$${f}c"; \
- rm -f "$(DESTDIR)$(sugardir)/$${f}o"; \
- done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -453,9 +407,6 @@ check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(sugardir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
@@ -498,7 +449,7 @@ info: info-recursive
info-am:
-install-data-am: install-sugarPYTHON
+install-data-am:
install-dvi: install-dvi-recursive
@@ -532,7 +483,7 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-sugarPYTHON
+uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
@@ -545,11 +496,10 @@ uninstall-am: uninstall-sugarPYTHON
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
- install-strip install-sugarPYTHON installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-sugarPYTHON
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+ tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/src/controlpanel/model/Makefile.am b/src/controlpanel/model/Makefile.am
deleted file mode 100644
index 20c27a9..0000000
--- a/src/controlpanel/model/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-sugardir = $(pkgdatadir)/shell/controlpanel/model
-sugar_PYTHON = \
- __init__.py \
- aboutme.py \
- aboutxo.py \
- datetime.py \
- frame.py \
- language.py \
- network.py \
- power.py
diff --git a/src/controlpanel/model/network.py b/src/controlpanel/model/network.py
deleted file mode 100644
index cbe0473..0000000
--- a/src/controlpanel/model/network.py
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright (C) 2008 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
-#
-
-import dbus
-from gettext import gettext as _
-
-from sugar import profile
-from hardware import hardwaremanager
-
-NM_SERVICE_NAME = 'org.freedesktop.NetworkManager'
-NM_SERVICE_PATH = '/org/freedesktop/NetworkManager'
-NM_SERVICE_IFACE = 'org.freedesktop.NetworkManager'
-NM_ASLEEP = 1
-
-KEYWORDS = ['network', 'jabber', 'radio', 'server']
-
-class ReadError(Exception):
- def __init__(self, value):
- self.value = value
- def __str__(self):
- return repr(self.value)
-
-def get_jabber():
- pro = profile.get_profile()
- return pro.jabber_server
-
-def print_jabber():
- print get_jabber()
-
-def set_jabber(server):
- """Set the jabber server
- server : e.g. 'olpc.collabora.co.uk'
- """
- pro = profile.get_profile()
- pro.jabber_server = server
- pro.jabber_registered = False
- pro.save()
- return 1
-
-def get_radio():
- bus = dbus.SystemBus()
- proxy = bus.get_object(NM_SERVICE_NAME, NM_SERVICE_PATH)
- nm = dbus.Interface(proxy, NM_SERVICE_IFACE)
- state = nm.getWirelessEnabled()
- if state in (0, 1):
- return state
- else:
- raise ReadError(_('State is unknown.'))
-
-def print_radio():
- print ('off', 'on')[get_radio()]
-
-def set_radio(state):
- """Turn Radio 'on' or 'off'
- state : 'on/off'
- """
- if state == 'on' or state == 1:
- bus = dbus.SystemBus()
- proxy = bus.get_object(NM_SERVICE_NAME, NM_SERVICE_PATH)
- nm = dbus.Interface(proxy, NM_SERVICE_IFACE)
- nm.setWirelessEnabled(True)
- elif state == 'off' or state == 0:
- bus = dbus.SystemBus()
- proxy = bus.get_object(NM_SERVICE_NAME, NM_SERVICE_PATH)
- nm = dbus.Interface(proxy, NM_SERVICE_IFACE)
- nm.setWirelessEnabled(False)
- else:
- raise ValueError(_("Error in specified radio argument use on/off."))
-
- return 0
-
-def clear_registration():
- """Clear the registration with the schoolserver
- """
- pro = profile.get_profile()
- pro.backup1 = None
- pro.save()
- return 1
-
-def clear_networks():
- """Clear saved passwords and network configurations.
- """
- network_manager = hardwaremanager.get_network_manager()
- if not network_manager:
- return
- network_manager.nminfo.delete_all_networks()
- return 1
diff --git a/src/controlpanel/view/Makefile.am b/src/controlpanel/view/Makefile.am
deleted file mode 100644
index a4d2a53..0000000
--- a/src/controlpanel/view/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-sugardir = $(pkgdatadir)/shell/controlpanel/view
-sugar_PYTHON = \
- __init__.py \
- aboutme.py \
- aboutxo.py \
- datetime.py \
- frame.py \
- language.py \
- network.py \
- power.py
-
-
-
-
-
-
diff --git a/src/controlpanel/view/language.py b/src/controlpanel/view/language.py
deleted file mode 100644
index db2042e..0000000
--- a/src/controlpanel/view/language.py
+++ /dev/null
@@ -1,146 +0,0 @@
-# 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
-
-import gtk
-import gobject
-from gettext import gettext as _
-
-from sugar.graphics import style
-from sugar.graphics import iconentry
-
-from controlpanel.sectionview import SectionView
-from controlpanel.inlinealert import InlineAlert
-
-CLASS = 'Language'
-ICON = 'module-language'
-TITLE = _('Language')
-
-class Language(SectionView):
- def __init__(self, model, alerts):
- SectionView.__init__(self)
-
- self._model = model
- self.restart_alerts = alerts
- self._lang_sid = 0
- self._cursor_change_handler = None
-
- self.set_border_width(style.DEFAULT_SPACING * 2)
- self.set_spacing(style.DEFAULT_SPACING)
-
- self.connect("realize", self.__realize_cb)
-
- self._entry = iconentry.IconEntry()
- self._entry.set_icon_from_name(iconentry.ICON_ENTRY_PRIMARY,
- 'system-search')
- self._entry.add_clear_button()
- self._entry.modify_bg(gtk.STATE_INSENSITIVE,
- style.COLOR_WHITE.get_gdk_color())
- self._entry.modify_base(gtk.STATE_INSENSITIVE,
- style.COLOR_WHITE.get_gdk_color())
- self.pack_start(self._entry, False)
- self._entry.show()
-
- self._scrolled_window = gtk.ScrolledWindow()
- self._scrolled_window.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
- self._scrolled_window.set_shadow_type(gtk.SHADOW_IN)
-
- self._store = gtk.ListStore(gobject.TYPE_STRING,
- gobject.TYPE_STRING)
- locales = model.read_all_languages()
- for locale in locales:
- self._store.append([locale[2], '%s (%s)' %
- (locale[0], locale[1])])
-
- self._treeview = gtk.TreeView(self._store)
- self._treeview.set_search_entry(self._entry)
- self._treeview.set_search_equal_func(self._search)
- self._treeview.set_search_column(1)
- self._scrolled_window.add(self._treeview)
- self._treeview.show()
-
- self._language_column = gtk.TreeViewColumn(_('Language'))
- self._cell = gtk.CellRendererText()
- self._language_column.pack_start(self._cell, True)
- self._language_column.add_attribute(self._cell, 'text', 1)
- self._language_column.set_sort_column_id(1)
- self._treeview.append_column(self._language_column)
-
- self.pack_start(self._scrolled_window)
- self._scrolled_window.show()
-
- self._lang_alert_box = gtk.HBox(spacing=style.DEFAULT_SPACING)
- self.pack_start(self._lang_alert_box, False)
-
- self._lang_alert = InlineAlert()
- self._lang_alert_box.pack_start(self._lang_alert)
- if 'lang' in self.restart_alerts:
- self._lang_alert.props.msg = self.restart_msg
- self._lang_alert.show()
- self._lang_alert_box.show()
-
- self.setup()
-
- def setup(self):
- lang_code = self._model.get_language()
- for row in self._store:
- lang = lang_code.split('.')[0]
- lang_column = row[0].split('.')[0]
- if lang in lang_column:
- self._treeview.set_cursor(row.path, self._language_column,
- False)
- self._treeview.scroll_to_cell(row.path, self._language_column,
- True, 0.5, 0.5)
- break
-
- self.needs_restart = False
- self._cursor_change_handler = self._treeview.connect( \
- "cursor-changed", self.__lang_changed_cd)
-
- def undo(self):
- self._treeview.disconnect(self._cursor_change_handler)
- self._model.undo()
- self._lang_alert.hide()
-
- def __realize_cb(self, widget):
- self._entry.grab_focus()
-
- def _search(self, model, column, key, iterator, data=None):
- value = model.get_value(iterator, column)
- if key.lower() in value.lower():
- return False
- return True
-
- def __lang_changed_cd(self, treeview, data=None):
- row = treeview.get_selection().get_selected()
- if not row[1]:
- return False
- if self._model.get_language() == self._store.get_value(row[1], 0):
- return False
-
- if self._lang_sid:
- gobject.source_remove(self._lang_sid)
- self._lang_sid = gobject.timeout_add(self._APPLY_TIMEOUT,
- self.__lang_timeout_cb,
- self._store.get_value(row[1], 0))
-
- def __lang_timeout_cb(self, code):
- self._lang_sid = 0
- self._model.set_language(code)
- self.restart_alerts.append('lang')
- self.needs_restart = True
- self._lang_alert.props.msg = self.restart_msg
- self._lang_alert.show()
- return False
diff --git a/src/emulator.py b/src/emulator.py
deleted file mode 100755
index 39acd2b..0000000
--- a/src/emulator.py
+++ /dev/null
@@ -1,147 +0,0 @@
-# Copyright (C) 2006, Red Hat, Inc.
-#
-# 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 os
-import sys
-import socket
-import logging
-from optparse import OptionParser
-
-log = logging.getLogger( 'sugar-emulator' )
-log.setLevel( logging.DEBUG )
-
-import pygtk
-pygtk.require('2.0')
-import gtk
-import gobject
-
-from sugar import env
-
-def _get_display_number():
- """Find a free display number trying to connect to 6000+ ports"""
- log.info("Attempting to find free port for X11 (Xephyr)")
- retries = 20
- display_number = 1
- display_is_free = False
-
- while not display_is_free and retries > 0:
- lockstr = "/tmp/.X%d-lock" % display_number
- if not os.path.exists(lockstr):
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- try:
- s.connect(('127.0.0.1', 6000 + display_number))
- s.close()
- except socket.error:
- display_is_free = True
- break
-
- display_number += 1
- retries -= 1
-
- if display_is_free:
- log.info(
- ' Found free port: #%s (%s)',
- display_number, display_number+6000
- )
- return display_number
- else:
- logging.error('Cannot find a free display.')
- sys.exit(0)
-
-def _start_xephyr(dpi=None):
- display = _get_display_number()
- log.info('Starting the Xephyr nested X display on display %s', display)
-
- cmd = [ 'Xephyr' ]
- cmd.append(':%d' % display)
- cmd.append('-ac')
-
- if gtk.gdk.screen_width() < 1200 or gtk.gdk.screen_height() < 900:
- cmd.append('-fullscreen')
- else:
- cmd.append('-screen')
- cmd.append('%dx%d' % (1200, 900))
-
- if not dpi:
- dpi = gtk.settings_get_default().get_property('gtk-xft-dpi') / 1024
- if dpi > 0:
- cmd.append('-dpi')
- cmd.append('%d' % dpi)
-
- log.debug('Xephyr command: %s', " ".join( cmd ))
- result = gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH)
- pid = result[0]
-
- os.environ['DISPLAY'] = ":%d" % (display)
- os.environ['SUGAR_EMULATOR_PID'] = str(pid)
-
-def _start_matchbox():
- log.info('Starting the matchbox window manager')
- cmd = ['matchbox-window-manager']
-
- cmd.extend(['-use_titlebar', 'no'])
- cmd.extend(['-theme', 'sugar'])
-
- log.debug('Matchbox command: %s', " ".join( cmd))
- gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH)
-
-def _setup_env():
- os.environ['SUGAR_EMULATOR'] = 'yes'
- os.environ['GABBLE_LOGFILE'] = os.path.join(
- env.get_profile_path(), 'logs', 'telepathy-gabble.log')
- os.environ['SALUT_LOGFILE'] = os.path.join(
- env.get_profile_path(), 'logs', 'telepathy-salut.log')
- os.environ['STREAM_ENGINE_LOGFILE'] = os.path.join(
- env.get_profile_path(), 'logs', 'telepathy-stream-engine.log')
-
-def main():
- """Script-level operations"""
-
- parser = OptionParser()
- parser.add_option('-x', '--xo-style', dest='xo_style',
- action='store_true', help='use the XO style')
- (options, args) = parser.parse_args()
-
- logging.basicConfig()
-
- _setup_env()
-
- if options.xo_style:
- _start_xephyr(dpi=201)
- else:
- _start_xephyr()
-
- if options.xo_style:
- os.environ['SUGAR_THEME'] = 'sugar-xo'
- os.environ['SUGAR_XO_STYLE'] = 'yes'
- else:
- os.environ['SUGAR_XO_STYLE'] = 'no'
-
- command = ['dbus-launch', 'dbus-launch', '--exit-with-session']
-
- if not args:
- command.append('sugar-shell')
- else:
- _start_matchbox()
-
- if args[0].endswith('.py'):
- command.append('python')
-
- command.append(args[0])
-
- log.info("Attempting to launch sugar to replace this process: %s"
- % " ".join(command))
- os.execlp( *command )
diff --git a/src/hardware/Makefile.am b/src/hardware/Makefile.am
deleted file mode 100644
index 8cd9c77..0000000
--- a/src/hardware/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-sugardir = $(pkgdatadir)/shell/hardware
-sugar_PYTHON = \
- __init__.py \
- hardwaremanager.py \
- keydialog.py \
- nmclient.py \
- nminfo.py \
- schoolserver.py
-
-dbusservicedir = $(sysconfdir)/dbus-1/system.d/
-dbusservice_DATA = NetworkManagerInfo.conf
-
-EXTRA_DIST = $(dbusservice_DATA)
diff --git a/src/hardware/Makefile.in b/src/hardware/Makefile.in
deleted file mode 100644
index df3dc24..0000000
--- a/src/hardware/Makefile.in
+++ /dev/null
@@ -1,419 +0,0 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-subdir = src/hardware
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(sugar_PYTHON)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(sugardir)" \
- "$(DESTDIR)$(dbusservicedir)"
-sugarPYTHON_INSTALL = $(INSTALL_DATA)
-py_compile = $(top_srcdir)/py-compile
-dbusserviceDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dbusservice_DATA)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ALL_LINGUAS = @ALL_LINGUAS@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLLIBS = @INTLLIBS@
-INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
-INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
-INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
-INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
-INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
-INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
-INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
-INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
-INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
-INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
-INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
-INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
-INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
-INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
-MSGMERGE = @MSGMERGE@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-POFILES = @POFILES@
-POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
-PYTHON = @PYTHON@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_VERSION = @PYTHON_VERSION@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SHELL_CFLAGS = @SHELL_CFLAGS@
-SHELL_LIBS = @SHELL_LIBS@
-STRIP = @STRIP@
-SUCROSE_VERSION = @SUCROSE_VERSION@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-XGETTEXT = @XGETTEXT@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host_alias = @host_alias@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/hardware
-sugar_PYTHON = \
- __init__.py \
- hardwaremanager.py \
- keydialog.py \
- nmclient.py \
- nminfo.py \
- schoolserver.py
-
-dbusservicedir = $(sysconfdir)/dbus-1/system.d/
-dbusservice_DATA = NetworkManagerInfo.conf
-EXTRA_DIST = $(dbusservice_DATA)
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/hardware/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/hardware/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-sugarPYTHON: $(sugar_PYTHON)
- @$(NORMAL_INSTALL)
- test -z "$(sugardir)" || $(MKDIR_P) "$(DESTDIR)$(sugardir)"
- @list='$(sugar_PYTHON)'; dlist=''; for p in $$list; do\
- if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
- if test -f $$b$$p; then \
- f=$(am__strip_dir) \
- dlist="$$dlist $$f"; \
- echo " $(sugarPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(sugardir)/$$f'"; \
- $(sugarPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(sugardir)/$$f"; \
- else :; fi; \
- done; \
- if test -n "$$dlist"; then \
- if test -z "$(DESTDIR)"; then \
- PYTHON=$(PYTHON) $(py_compile) --basedir "$(sugardir)" $$dlist; \
- else \
- PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(sugardir)" $$dlist; \
- fi; \
- else :; fi
-
-uninstall-sugarPYTHON:
- @$(NORMAL_UNINSTALL)
- @list='$(sugar_PYTHON)'; dlist=''; for p in $$list; do\
- f=$(am__strip_dir) \
- rm -f "$(DESTDIR)$(sugardir)/$$f"; \
- rm -f "$(DESTDIR)$(sugardir)/$${f}c"; \
- rm -f "$(DESTDIR)$(sugardir)/$${f}o"; \
- done
-install-dbusserviceDATA: $(dbusservice_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(dbusservicedir)" || $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)"
- @list='$(dbusservice_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(dbusserviceDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(dbusservicedir)/$$f'"; \
- $(dbusserviceDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(dbusservicedir)/$$f"; \
- done
-
-uninstall-dbusserviceDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(dbusservice_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(dbusservicedir)/$$f'"; \
- rm -f "$(DESTDIR)$(dbusservicedir)/$$f"; \
- done
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
- for dir in "$(DESTDIR)$(sugardir)" "$(DESTDIR)$(dbusservicedir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-dbusserviceDATA install-sugarPYTHON
-
-install-dvi: install-dvi-am
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-info: install-info-am
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-ps: install-ps-am
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-dbusserviceDATA uninstall-sugarPYTHON
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am \
- install-dbusserviceDATA install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- install-sugarPYTHON installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-dbusserviceDATA uninstall-sugarPYTHON
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/hardware/NetworkManagerInfo.conf b/src/hardware/NetworkManagerInfo.conf
deleted file mode 100644
index 4fb8270..0000000
--- a/src/hardware/NetworkManagerInfo.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE busconfig PUBLIC
- "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
- <policy user="root">
- <allow own="org.freedesktop.NetworkManagerInfo"/>
-
- <allow send_destination="org.freedesktop.NetworkManagerInfo"/>
- <allow send_interface="org.freedesktop.NetworkManagerInfo"/>
- </policy>
- <policy at_console="true">
- <allow own="org.freedesktop.NetworkManagerInfo"/>
-
- <allow send_destination="org.freedesktop.NetworkManagerInfo"/>
- <allow send_interface="org.freedesktop.NetworkManagerInfo"/>
- </policy>
- <policy context="default">
- <deny own="org.freedesktop.NetworkManagerInfo"/>
-
- <deny send_destination="org.freedesktop.NetworkManagerInfo"/>
- <deny send_interface="org.freedesktop.NetworkManagerInfo"/>
- </policy>
-
- <limit name="max_replies_per_connection">512</limit>
-</busconfig>
-
diff --git a/src/hardware/hardwaremanager.py b/src/hardware/hardwaremanager.py
deleted file mode 100644
index c4f9f75..0000000
--- a/src/hardware/hardwaremanager.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 logging
-
-import dbus
-import gobject
-
-from hardware.nmclient import NMClient
-from sugar.profile import get_profile
-from sugar import env
-from sugar import _sugarext
-
-_HARDWARE_MANAGER_INTERFACE = 'org.freedesktop.ohm.Keystore'
-_HARDWARE_MANAGER_SERVICE = 'org.freedesktop.ohm'
-_HARDWARE_MANAGER_OBJECT_PATH = '/org/freedesktop/ohm/Keystore'
-
-COLOR_MODE = 0
-B_AND_W_MODE = 1
-
-VOL_CHANGE_INCREMENT_RECOMMENDATION = 10
-
-class HardwareManager(gobject.GObject):
- __gsignals__ = {
- 'muted-changed' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_BOOLEAN, gobject.TYPE_BOOLEAN])),
- 'volume-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_INT, gobject.TYPE_INT])),
- }
-
- def __init__(self):
- gobject.GObject.__init__(self)
-
- bus = dbus.SystemBus()
- proxy = bus.get_object(_HARDWARE_MANAGER_SERVICE,
- _HARDWARE_MANAGER_OBJECT_PATH,
- follow_name_owner_changes=True)
- self._service = dbus.Interface(proxy, _HARDWARE_MANAGER_INTERFACE)
-
- self._volume = _sugarext.VolumeAlsa()
-
- def get_muted(self):
- return self._volume.get_mute()
-
- def get_volume(self):
- return self._volume.get_volume()
-
- def set_volume(self, new_volume):
- old_volume = self._volume.get_volume()
- self._volume.set_volume(new_volume)
-
- self.emit('volume-changed', old_volume, new_volume)
-
- def set_muted(self, new_state):
- old_state = self._volume.get_mute()
- self._volume.set_mute(new_state)
-
- self.emit('muted-changed', old_state, new_state)
-
- def startup(self):
- if env.is_emulator() is False:
- profile = get_profile()
- self.set_volume(profile.sound_volume)
-
- def shutdown(self):
- if env.is_emulator() is False:
- profile = get_profile()
- profile.sound_volume = self.get_volume()
- profile.save()
-
- def set_dcon_freeze(self, frozen):
- try:
- self._service.SetKey("display.dcon_freeze", frozen)
- except dbus.DBusException:
- logging.error('Cannot unfreeze the DCON')
-
- def set_display_mode(self, mode):
- try:
- self._service.SetKey("display.dcon_mode", mode)
- except dbus.DBusException:
- logging.error('Cannot change DCON mode')
-
- def set_display_brightness(self, level):
- try:
- self._service.SetKey("backlight.hardware_brightness", level)
- except dbus.DBusException:
- logging.error('Cannot set display brightness')
-
- def get_display_brightness(self):
- try:
- return self._service.GetKey("backlight.hardware_brightness")
- except dbus.DBusException:
- logging.error('Cannot get display brightness')
- return 0
-
-def get_manager():
- return _manager
-
-def get_network_manager():
- return _network_manager
-
-_manager = HardwareManager()
-
-try:
- _network_manager = NMClient()
-except dbus.DBusException, e:
- _network_manager = None
- logging.info('Network manager service not found.')
diff --git a/src/hardware/nmclient.py b/src/hardware/nmclient.py
deleted file mode 100644
index c517391..0000000
--- a/src/hardware/nmclient.py
+++ /dev/null
@@ -1,795 +0,0 @@
-#
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 logging
-
-import dbus
-import dbus.glib
-import dbus.decorators
-import gobject
-
-from hardware import nminfo
-from sugar.graphics import xocolor
-
-IW_AUTH_ALG_OPEN_SYSTEM = 0x00000001
-IW_AUTH_ALG_SHARED_KEY = 0x00000002
-
-NM_DEVICE_STAGE_STRINGS = ("Unknown",
- "Prepare",
- "Config",
- "Need Users Key",
- "IP Config",
- "IP Config Get",
- "IP Config Commit",
- "Activated",
- "Failed",
- "Canceled"
- )
-
-NM_SERVICE = 'org.freedesktop.NetworkManager'
-NM_IFACE = 'org.freedesktop.NetworkManager'
-NM_IFACE_DEVICES = 'org.freedesktop.NetworkManager.Devices'
-NM_PATH = '/org/freedesktop/NetworkManager'
-
-DEVICE_TYPE_UNKNOWN = 0
-DEVICE_TYPE_802_3_ETHERNET = 1
-DEVICE_TYPE_802_11_WIRELESS = 2
-DEVICE_TYPE_802_11_MESH_OLPC = 3
-
-NM_DEVICE_CAP_NONE = 0x00000000
-NM_DEVICE_CAP_NM_SUPPORTED = 0x00000001
-NM_DEVICE_CAP_CARRIER_DETECT = 0x00000002
-NM_DEVICE_CAP_WIRELESS_SCAN = 0x00000004
-
-sys_bus = dbus.SystemBus()
-
-NM_802_11_CAP_NONE = 0x00000000
-NM_802_11_CAP_PROTO_NONE = 0x00000001
-NM_802_11_CAP_PROTO_WEP = 0x00000002
-NM_802_11_CAP_PROTO_WPA = 0x00000004
-NM_802_11_CAP_PROTO_WPA2 = 0x00000008
-NM_802_11_CAP_KEY_MGMT_PSK = 0x00000040
-NM_802_11_CAP_KEY_MGMT_802_1X = 0x00000080
-NM_802_11_CAP_CIPHER_WEP40 = 0x00001000
-NM_802_11_CAP_CIPHER_WEP104 = 0x00002000
-NM_802_11_CAP_CIPHER_TKIP = 0x00004000
-NM_802_11_CAP_CIPHER_CCMP = 0x00008000
-
-NETWORK_STATE_CONNECTING = 0
-NETWORK_STATE_CONNECTED = 1
-NETWORK_STATE_NOTCONNECTED = 2
-
-DEVICE_STATE_ACTIVATING = 0
-DEVICE_STATE_ACTIVATED = 1
-DEVICE_STATE_INACTIVE = 2
-
-IW_MODE_ADHOC = 1
-IW_MODE_INFRA = 2
-
-class Network(gobject.GObject):
- __gsignals__ = {
- 'initialized' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([gobject.TYPE_BOOLEAN])),
- 'strength-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
- 'state-changed' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([]))
- }
-
- def __init__(self, client, op):
- gobject.GObject.__init__(self)
- self._client = client
- self._op = op
- self._ssid = None
- self._mode = None
- self._strength = 0
- self._caps = 0
- self._valid = False
- self._favorite = False
- self._state = NETWORK_STATE_NOTCONNECTED
-
- obj = sys_bus.get_object(NM_SERVICE, self._op)
- net = dbus.Interface(obj, NM_IFACE_DEVICES)
- net.getProperties(reply_handler=self._update_reply_cb,
- error_handler=self._update_error_cb)
-
- def _update_reply_cb(self, *props):
- self._ssid = props[1]
- self._strength = props[3]
- self._mode = props[6]
- self._caps = props[7]
- if self._caps & NM_802_11_CAP_PROTO_WPA or \
- self._caps & NM_802_11_CAP_PROTO_WPA2:
- if not (self._caps & NM_802_11_CAP_KEY_MGMT_PSK):
- # 802.1x is not supported at this time
- logging.debug("Net(%s): ssid '%s' dropping because 802.1x" \
- "is unsupported" % (self._op, self._ssid))
- self._valid = False
- self.emit('initialized', self._valid)
- return
- if self._mode != IW_MODE_INFRA:
- # Don't show Ad-Hoc networks; they usually don't DHCP and therefore
- # won't work well here. This also works around the bug where
- # we show our own mesh SSID on the Mesh view when in mesh mode
- logging.debug("Net(%s): ssid '%s' is adhoc; not showing" %
- (self._op, self._ssid))
- self._valid = False
- self.emit('initialized', self._valid)
- return
-
- fav_nets = []
- if self._client.nminfo:
- fav_nets = self._client.nminfo.get_networks(
- nminfo.NETWORK_TYPE_ALLOWED)
- if self._ssid in fav_nets:
- self._favorite = True
-
- self._valid = True
- logging.debug("Net(%s): caps 0x%X" % (self._ssid, self._caps))
- self.emit('initialized', self._valid)
-
- def _update_error_cb(self, err):
- logging.debug("Net(%s): failed to update. (%s)" % (self._op, err))
- self._valid = False
- self.emit('initialized', self._valid)
-
- def get_colors(self):
- import sha
- sh = sha.new()
- data = self._ssid + hex(self._caps) + hex(self._mode)
- sh.update(data)
- h = hash(sh.digest())
- idx = h % len(xocolor.colors)
- # stroke, fill
- return (xocolor.colors[idx][0], xocolor.colors[idx][1])
-
- def get_ssid(self):
- return self._ssid
-
- def get_caps(self):
- return self._caps
-
- def get_mode(self):
- return self._mode
-
- def get_state(self):
- return self._state
-
- def set_state(self, state):
- if state == self._state:
- return
- self._state = state
- if self._valid:
- self.emit('state-changed')
-
- def get_op(self):
- return self._op
-
- def get_strength(self):
- return self._strength
-
- def set_strength(self, strength):
- if strength == self._strength:
- return
- self._strength = strength
- if self._valid:
- self.emit('strength-changed')
-
- def is_valid(self):
- return self._valid
-
- def is_favorite(self):
- return self._favorite
-
-class Device(gobject.GObject):
- __gsignals__ = {
- 'initialized': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
- 'init-failed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
- 'ssid-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
- 'strength-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
- 'state-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
- 'activation-stage-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
- 'network-appeared': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'network-disappeared': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'ip-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
- }
-
- def __init__(self, client, op):
- gobject.GObject.__init__(self)
- self._client = client
- self._op = op
- self._iface = None
- self._type = DEVICE_TYPE_UNKNOWN
- self._udi = None
- self._active = False
- self._act_stage = 0
- self._strength = 0
- self._freq = 0.0
- self._link = False
- self._valid = False
- self._networks = {}
- self._caps = 0
- self._state = DEVICE_STATE_INACTIVE
- self._active_network = None
- self._active_net_sigid = 0
- self._ip_address = None
-
- obj = sys_bus.get_object(NM_SERVICE, self._op)
- self.dev = dbus.Interface(obj, NM_IFACE_DEVICES)
- self.dev.getProperties(reply_handler=self._update_reply_cb,
- error_handler=self._update_error_cb)
-
- def _is_activating(self):
- if self._active and self._act_stage >= 1 and self._act_stage <= 6:
- return True
- return False
-
- def _is_activated(self):
- if self._active and self._act_stage == 7:
- return True
- return False
-
- # 6248: remove for NM0.7; http://dev.laptop.org/ticket/6248#comment:2
- def _getproperties_for_ip_only_reply_cb(self, *props):
- current_ip = props[6]
- if current_ip != self._ip_address:
- self._ip_address = current_ip
- if self._valid:
- self.emit('ip-changed')
-
- # 6248: remove for NM0.7; http://dev.laptop.org/ticket/6248#comment:2
- def _getproperties_for_ip_only_error_cb(self, err):
- logging.warning("Device(%s): failed to update. (%s)" % (self._op, err))
-
- def _update_reply_cb(self, *props):
- self._iface = props[1]
- self._type = props[2]
- self._udi = props[3]
- self._active = props[4]
- self._act_stage = props[5]
- self._link = props[15]
- self._caps = props[17]
-
- if self._type == DEVICE_TYPE_802_11_WIRELESS:
- old_strength = self._strength
- self._strength = props[14]
- if self._strength != old_strength:
- if self._valid:
- self.emit('strength-changed')
- self._update_networks(props[20], props[19])
- elif self._type == DEVICE_TYPE_802_11_MESH_OLPC:
- old_strength = self._strength
- self._strength = props[14]
- if self._strength != old_strength:
- if self._valid:
- self.emit('strength-changed')
-
- self._valid = True
-
- # 6248: remove for NM0.7; http://dev.laptop.org/ticket/6248#comment:2
- if props[6] != self._ip_address:
- self._ip_address = props[6]
- self.emit('ip-changed')
-
- if self._is_activating():
- self.set_state(DEVICE_STATE_ACTIVATING)
- elif self._is_activated():
- self.set_state(DEVICE_STATE_ACTIVATED)
- else:
- self.set_state(DEVICE_STATE_INACTIVE)
-
- self.emit('initialized')
-
- def _update_networks(self, net_ops, active_op):
- for op in net_ops:
- net = Network(self._client, op)
- self._networks[op] = net
- net.connect('initialized', lambda *args:
- self._net_initialized_cb(active_op, *args))
-
- def _update_error_cb(self, err):
- logging.debug("Device(%s): failed to update. (%s)" % (self._op, err))
- self._valid = False
- self.emit('init-failed')
-
- def _net_initialized_cb(self, active_op, net, valid):
- net_op = net.get_op()
- if not self._networks.has_key(net_op):
- return
-
- if not valid:
- # init failure
- del self._networks[net_op]
- return
-
- # init success
- if self._valid:
- self.emit('network-appeared', net)
- if active_op and net_op == active_op:
- self.set_active_network(net)
-
- def get_op(self):
- return self._op
-
- def get_networks(self):
- ret = []
- for net in self._networks.values():
- if net.is_valid():
- ret.append(net)
- return ret
-
- def get_network(self, op):
- if self._networks.has_key(op) and self._networks[op].is_valid():
- return self._networks[op]
- return None
-
- def get_network_ops(self):
- ret = []
- for net in self._networks.values():
- if net.is_valid():
- ret.append(net.get_op())
- return ret
-
- def get_mesh_step(self):
- if self._type != DEVICE_TYPE_802_11_MESH_OLPC:
- raise RuntimeError("Only valid for mesh devices")
- try:
- step = self.dev.getMeshStep(timeout=3)
- except dbus.DBusException:
- step = 0
- return step
-
- def get_frequency(self):
- try:
- freq = self.dev.getFrequency(timeout=3)
- except dbus.DBusException:
- freq = 0.0
- # Hz -> GHz
- self._freq = freq / 1000000000.0
- return self._freq
-
- def get_ip_address(self):
- return self._ip_address
-
- def get_strength(self):
- return self._strength
-
- def set_strength(self, strength):
- if strength == self._strength:
- return False
-
- if strength >= 0 and strength <= 100:
- self._strength = strength
- else:
- self._strength = 0
-
- if self._valid:
- self.emit('strength-changed')
-
- def network_appeared(self, network):
- # NM may emit NetworkAppeared messages before the initialization-time
- # getProperties call completes. This means that we are in danger of
- # instantiating the "appeared" network here, and then instantiating
- # the same network later on when getProperties completes
- # (_update_reply_cb calls _update_networks).
- # We avoid this race by confirming that getProperties has completed
- # before listening to any NetworkAppeared messages. We assume that
- # any networks that get reported as appeared in this race window
- # will be included in the getProperties response.
- if not self._valid:
- return
-
- if self._networks.has_key(network):
- return
- net = Network(self._client, network)
- self._networks[network] = net
- net.connect('initialized', lambda *args:
- self._net_initialized_cb(None, *args))
-
- def network_disappeared(self, network):
- if not self._networks.has_key(network):
- return
-
- if self._valid:
- self.emit('network-disappeared', self._networks[network])
-
- del self._networks[network]
-
- def set_active_network(self, network):
- if self._active_network == network:
- return
-
- # Make sure the old one doesn't get a stuck state
- if self._active_network:
- self._active_network.set_state(NETWORK_STATE_NOTCONNECTED)
- self._active_network.disconnect(self._active_net_sigid)
-
- self._active_network = network
-
- if self._active_network:
- self._active_net_sigid = self._active_network.connect(
- "initialized", self._active_net_initialized)
-
- # don't emit ssid-changed for networks that are not yet valid
- if self._valid:
- if self._active_network and self._active_network.is_valid():
- self.emit('ssid-changed')
- elif not self._active_network:
- self.emit('ssid-changed')
-
- def _active_net_initialized(self, net, user_data=None):
- if self._active_network and self._active_network.is_valid():
- self.emit('ssid-changed')
-
- def _get_active_net_cb(self, state, net_op):
- if not self._networks.has_key(net_op):
- self.set_active_network(None)
- return
-
- self.set_active_network(self._networks[net_op])
-
- _device_to_network_state = {
- DEVICE_STATE_ACTIVATING : NETWORK_STATE_CONNECTING,
- DEVICE_STATE_ACTIVATED : NETWORK_STATE_CONNECTED,
- DEVICE_STATE_INACTIVE : NETWORK_STATE_NOTCONNECTED
- }
-
- network_state = _device_to_network_state[state]
- self._active_network.set_state(network_state)
-
- def _get_active_net_error_cb(self, err):
- logging.debug("Couldn't get active network: %s" % err)
- self.set_active_network(None)
-
- def get_state(self):
- return self._state
-
- def set_state(self, state):
- if state == self._state:
- return
-
- if state == DEVICE_STATE_INACTIVE:
- self._act_stage = 0
-
- self._state = state
- if self._valid:
- self.emit('state-changed')
-
- if self._type == DEVICE_TYPE_802_11_WIRELESS:
- if state == DEVICE_STATE_INACTIVE:
- self.set_active_network(None)
- else:
- self.dev.getActiveNetwork(
- reply_handler=lambda *args:
- self._get_active_net_cb(state, *args),
- error_handler=self._get_active_net_error_cb)
-
- if state == DEVICE_STATE_ACTIVATED:
- # 6248: reimplement for NM0.7
- # see http://dev.laptop.org/ticket/6248#comment:2
- self.dev.getProperties(
- reply_handler=self._getproperties_for_ip_only_reply_cb,
- error_handler=self._getproperties_for_ip_only_error_cb)
-
- def set_activation_stage(self, stage):
- if stage == self._act_stage:
- return
- self._act_stage = stage
- if self._valid:
- self.emit('activation-stage-changed')
-
- # 6248: reimplement for NM0.7
- # see http://dev.laptop.org/ticket/6248#comment:2
- self.dev.getProperties(
- reply_handler=self._getproperties_for_ip_only_reply_cb,
- error_handler=self._getproperties_for_ip_only_error_cb)
-
- def get_activation_stage(self):
- return self._act_stage
-
- def get_ssid(self):
- if self._active_network and self._active_network.is_valid():
- return self._active_network.get_ssid()
- elif not self._active_network:
- return None
-
- def get_active_network(self):
- return self._active_network
-
- def get_type(self):
- return self._type
-
- def is_valid(self):
- return self._valid
-
- def set_carrier(self, on):
- self._link = on
-
- def get_capabilities(self):
- return self._caps
-
-class NMClient(gobject.GObject):
- __gsignals__ = {
- 'device-added' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'device-activated' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'device-activating': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'device-removed' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
- }
-
- def __init__(self):
- gobject.GObject.__init__(self)
-
- self.nminfo = None
- self._nm_present = False
- self._nm_proxy = None
- self._nm_obj = None
- self._sig_handlers = None
- self._update_timer = 0
- self._devices = {}
-
- self.nminfo = nminfo.NMInfo(self)
-
- self._setup_dbus()
- if self._nm_present:
- self._get_initial_devices()
-
- def get_devices(self):
- return self._devices.values()
-
- def _get_initial_devices_reply_cb(self, ops):
- for op in ops:
- self._add_device(op)
-
- def _dev_initialized_cb(self, dev):
- self.emit('device-added', dev)
-
- def _dev_init_failed_cb(self, dev):
- # Device failed to initialize, likely due to dbus errors or something
- op = dev.get_op()
- self._remove_device(op)
-
- def _get_initial_devices_error_cb(self, err):
- logging.debug("Error updating devices (%s)" % err)
-
- def _get_initial_devices(self):
- self._nm_obj.getDevices(
- reply_handler=self._get_initial_devices_reply_cb,
- error_handler=self._get_initial_devices_error_cb)
-
- def _add_device(self, dev_op):
- if self._devices.has_key(dev_op):
- return
- dev = Device(self, dev_op)
- self._devices[dev_op] = dev
- dev.connect('init-failed', self._dev_init_failed_cb)
- dev.connect('initialized', self._dev_initialized_cb)
- dev.connect('state-changed', self._dev_state_changed_cb)
-
- def _remove_device(self, dev_op):
- if not self._devices.has_key(dev_op):
- return
- dev = self._devices[dev_op]
- if dev.is_valid():
- self.emit('device-removed', dev)
- del self._devices[dev_op]
-
- def _dev_state_changed_cb(self, dev):
- op = dev.get_op()
- if not self._devices.has_key(op) or not dev.is_valid():
- return
- if dev.get_state() == DEVICE_STATE_ACTIVATING:
- self.emit('device-activating', dev)
- elif dev.get_state() == DEVICE_STATE_ACTIVATED:
- self.emit('device-activated', dev)
-
- def get_device(self, dev_op):
- if not self._devices.has_key(dev_op):
- return None
- return self._devices[dev_op]
-
- def _setup_dbus(self):
- self._sig_handlers = {
- 'StateChange': self.state_changed_sig_handler,
- 'DeviceAdded': self.device_added_sig_handler,
- 'DeviceRemoved': self.device_removed_sig_handler,
- 'DeviceActivationStage': self.device_activation_stage_sig_handler,
- 'DeviceActivating': self.device_activating_sig_handler,
- 'DeviceNowActive': self.device_now_active_sig_handler,
- 'DeviceNoLongerActive': self.device_no_longer_active_sig_handler,
- 'DeviceActivationFailed': \
- self.device_activation_failed_sig_handler,
- 'DeviceCarrierOn': self.device_carrier_on_sig_handler,
- 'DeviceCarrierOff': self.device_carrier_off_sig_handler,
- 'DeviceStrengthChanged': \
- self.wireless_device_strength_changed_sig_handler,
- 'WirelessNetworkAppeared': \
- self.wireless_network_appeared_sig_handler,
- 'WirelessNetworkDisappeared': \
- self.wireless_network_disappeared_sig_handler,
- 'WirelessNetworkStrengthChanged': \
- self.wireless_network_strength_changed_sig_handler
- }
-
- try:
- self._nm_proxy = sys_bus.get_object(NM_SERVICE, NM_PATH,
- follow_name_owner_changes=True)
- self._nm_obj = dbus.Interface(self._nm_proxy, NM_IFACE)
- except dbus.DBusException, e:
- logging.debug("Could not connect to NetworkManager: %s" % e)
- self._nm_present = False
- return
-
- sys_bus.add_signal_receiver(self.name_owner_changed_sig_handler,
- signal_name="NameOwnerChanged",
- dbus_interface="org.freedesktop.DBus")
-
- for (signal, handler) in self._sig_handlers.items():
- sys_bus.add_signal_receiver(handler, signal_name=signal,
- dbus_interface=NM_IFACE)
-
- # Find out whether or not NMI is running
- try:
- bus_object = sys_bus.get_object('org.freedesktop.DBus',
- '/org/freedesktop/DBus')
- name_ = bus_object.GetNameOwner( \
- "org.freedesktop.NetworkManagerInfo",
- dbus_interface='org.freedesktop.DBus')
- self._nm_present = True
- except dbus.DBusException:
- self._nm_present = False
-
- def set_active_device(self, device, network=None,
- mesh_freq=None, mesh_start=None):
- ssid = ""
- if network:
- ssid = network.get_ssid()
- if device.get_type() == DEVICE_TYPE_802_11_MESH_OLPC:
- if mesh_freq or mesh_start:
- if mesh_freq and not mesh_start:
- self._nm_obj.setActiveDevice(device.get_op(),
- dbus.Double(mesh_freq))
- elif mesh_start and not mesh_freq:
- self._nm_obj.setActiveDevice(device.get_op(),
- dbus.Double(0.0),
- dbus.UInt32(mesh_start))
- else:
- self._nm_obj.setActiveDevice(device.get_op(),
- dbus.Double(mesh_freq),
- dbus.UInt32(mesh_start))
- else:
- self._nm_obj.setActiveDevice(device.get_op())
- else:
- self._nm_obj.setActiveDevice(device.get_op(), ssid)
-
- def state_changed_sig_handler(self, new_state):
- logging.debug('NM State Changed to %d' % new_state)
-
- def device_activation_stage_sig_handler(self, device, stage):
- logging.debug('Device Activation Stage "%s" for device %s'
- % (NM_DEVICE_STAGE_STRINGS[stage], device))
- if not self._devices.has_key(device):
- logging.debug('DeviceActivationStage, device %s does not exist'
- % (device))
- return
- self._devices[device].set_activation_stage(stage)
-
- def device_activating_sig_handler(self, device):
- logging.debug('DeviceActivating for %s' % (device))
- if not self._devices.has_key(device):
- logging.debug('DeviceActivating, device %s does not exist'
- % (device))
- return
- self._devices[device].set_state(DEVICE_STATE_ACTIVATING)
-
- def device_now_active_sig_handler(self, device, ssid=None):
- logging.debug('DeviceNowActive for %s' % (device))
- if not self._devices.has_key(device):
- logging.debug('DeviceNowActive, device %s does not exist'
- % (device))
- return
- self._devices[device].set_state(DEVICE_STATE_ACTIVATED)
-
- def device_no_longer_active_sig_handler(self, device):
- logging.debug('DeviceNoLongerActive for %s' % (device))
- if not self._devices.has_key(device):
- logging.debug('DeviceNoLongerActive, device %s does not exist'
- % (device))
- return
- self._devices[device].set_state(DEVICE_STATE_INACTIVE)
-
- def device_activation_failed_sig_handler(self, device, ssid=None):
- logging.debug('DeviceActivationFailed for %s' % (device))
- if not self._devices.has_key(device):
- logging.debug('DeviceActivationFailed, device %s does not exist'
- % (device))
- return
- self._devices[device].set_state(DEVICE_STATE_INACTIVE)
-
- def name_owner_changed_sig_handler(self, name, old, new):
- if name != NM_SERVICE:
- return
- if (old and len(old)) and (not new and not len(new)):
- # NM went away
- self._nm_present = False
- devs = self._devices.keys()
- for op in devs:
- self._remove_device(op)
- self._devices = {}
- elif (not old and not len(old)) and (new and len(new)):
- # NM started up
- self._nm_present = True
- self._get_initial_devices()
-
- def device_added_sig_handler(self, device):
- logging.debug('DeviceAdded for %s' % (device))
- self._add_device(device)
-
- def device_removed_sig_handler(self, device):
- logging.debug('DeviceRemoved for %s' % (device))
- self._remove_device(device)
-
- def wireless_network_appeared_sig_handler(self, device, network):
- if not self._devices.has_key(device):
- return
- self._devices[device].network_appeared(network)
-
- def wireless_network_disappeared_sig_handler(self, device, network):
- if not self._devices.has_key(device):
- return
- self._devices[device].network_disappeared(network)
-
- def wireless_device_strength_changed_sig_handler(self, device, strength):
- if not self._devices.has_key(device):
- return
- self._devices[device].set_strength(strength)
-
- def wireless_network_strength_changed_sig_handler(self, device,
- network, strength):
- if not self._devices.has_key(device):
- return
- net = self._devices[device].get_network(network)
- if net:
- net.set_strength(strength)
-
- def device_carrier_on_sig_handler(self, device):
- if not self._devices.has_key(device):
- return
- self._devices[device].set_carrier(True)
-
- def device_carrier_off_sig_handler(self, device):
- if not self._devices.has_key(device):
- return
- self._devices[device].set_carrier(False)
diff --git a/src/hardware/nminfo.py b/src/hardware/nminfo.py
deleted file mode 100644
index 9f427e0..0000000
--- a/src/hardware/nminfo.py
+++ /dev/null
@@ -1,556 +0,0 @@
-# vi: ts=4 ai noet
-#
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 dbus
-import dbus.service
-import time
-import os
-import binascii
-import ConfigParser
-import logging
-
-import nmclient
-import keydialog
-import gtk
-from sugar import env
-
-IW_AUTH_KEY_MGMT_802_1X = 0x1
-IW_AUTH_KEY_MGMT_PSK = 0x2
-
-IW_AUTH_WPA_VERSION_DISABLED = 0x00000001
-IW_AUTH_WPA_VERSION_WPA = 0x00000002
-IW_AUTH_WPA_VERSION_WPA2 = 0x00000004
-
-NM_AUTH_TYPE_WPA_PSK_AUTO = 0x00000000
-IW_AUTH_CIPHER_NONE = 0x00000001
-IW_AUTH_CIPHER_WEP40 = 0x00000002
-IW_AUTH_CIPHER_TKIP = 0x00000004
-IW_AUTH_CIPHER_CCMP = 0x00000008
-IW_AUTH_CIPHER_WEP104 = 0x00000010
-
-IW_AUTH_ALG_OPEN_SYSTEM = 0x00000001
-IW_AUTH_ALG_SHARED_KEY = 0x00000002
-
-NM_INFO_IFACE = 'org.freedesktop.NetworkManagerInfo'
-NM_INFO_PATH = '/org/freedesktop/NetworkManagerInfo'
-
-
-class NoNetworks(dbus.DBusException):
- def __init__(self):
- dbus.DBusException.__init__(self)
- self._dbus_error_name = NM_INFO_IFACE + '.NoNetworks'
-
-class CanceledKeyRequestError(dbus.DBusException):
- def __init__(self):
- dbus.DBusException.__init__(self)
- self._dbus_error_name = NM_INFO_IFACE + '.CanceledError'
-
-
-class NetworkInvalidError(Exception):
- pass
-
-
-class NMConfig(ConfigParser.ConfigParser):
- def get_bool(self, section, name):
- opt = self.get(section, name)
- if type(opt) == str:
- if opt.lower() == 'yes' or opt.lower() == 'true':
- return True
- elif opt.lower() == 'no' or opt.lower() == 'false':
- return False
- raise ValueError("Invalid format for %s/%s. Should be one of" \
- " [yes, no, true, false]." % (section, name))
-
- def get_list(self, section, name):
- opt = self.get(section, name)
- if type(opt) != str or not len(opt):
- return []
- try:
- return opt.split()
- except Exception:
- raise ValueError("Invalid format for %s/%s. Should be a" \
- " space-separate list." % (section, name))
-
- def get_int(self, section, name):
- opt = self.get(section, name)
- try:
- return int(opt)
- except ValueError:
- raise ValueError("Invalid format for %s/%s. Should be a" \
- " valid integer." % (section, name))
-
- def get_float(self, section, name):
- opt = self.get(section, name)
- try:
- return float(opt)
- except ValueError:
- raise ValueError("Invalid format for %s/%s. Should be a" \
- " valid float." % (section, name))
-
-
-NETWORK_TYPE_UNKNOWN = 0
-NETWORK_TYPE_ALLOWED = 1
-NETWORK_TYPE_INVALID = 2
-
-
-class Security(object):
- def __init__(self, we_cipher):
- self._we_cipher = we_cipher
- self._key = None
- self._auth_alg = None
-
- def read_from_config(self, cfg, name):
- pass
-
- def read_from_args(self, args):
- pass
-
- def new_from_config(cfg, name):
- security = None
- we_cipher = cfg.get_int(name, "we_cipher")
- if we_cipher == IW_AUTH_CIPHER_NONE:
- security = Security(we_cipher)
- elif we_cipher == IW_AUTH_CIPHER_WEP40 or \
- we_cipher == IW_AUTH_CIPHER_WEP104:
- security = WEPSecurity(we_cipher)
- elif we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO or \
- we_cipher == IW_AUTH_CIPHER_CCMP or \
- we_cipher == IW_AUTH_CIPHER_TKIP:
- security = WPASecurity(we_cipher)
- else:
- raise ValueError("Unsupported security combo")
- security.read_from_config(cfg, name)
- return security
- new_from_config = staticmethod(new_from_config)
-
- def new_from_args(we_cipher, args):
- security = None
- try:
- if we_cipher == IW_AUTH_CIPHER_NONE:
- security = Security(we_cipher)
- elif we_cipher == IW_AUTH_CIPHER_WEP40 or \
- we_cipher == IW_AUTH_CIPHER_WEP104:
- security = WEPSecurity(we_cipher)
- elif we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO or \
- we_cipher == IW_AUTH_CIPHER_CCMP or \
- we_cipher == IW_AUTH_CIPHER_TKIP:
- security = WPASecurity(we_cipher)
- else:
- raise ValueError("Unsupported security combo")
- security.read_from_args(args)
- except ValueError, e:
- logging.debug("Error reading security information: %s" % e)
- del security
- return None
- return security
- new_from_args = staticmethod(new_from_args)
-
- def get_properties(self):
- return [dbus.Int32(self._we_cipher)]
-
- def write_to_config(self, section, config):
- config.set(section, "we_cipher", self._we_cipher)
-
-
-class WEPSecurity(Security):
- def read_from_args(self, args):
- if len(args) != 2:
- raise ValueError("not enough arguments")
- key = args[0]
- auth_alg = args[1]
- if isinstance(key, unicode):
- key = key.encode()
- if not isinstance(key, str):
- raise ValueError("wrong argument type for key")
- if not isinstance(auth_alg, int):
- raise ValueError("wrong argument type for auth_alg")
- self._key = key
- self._auth_alg = auth_alg
-
- def read_from_config(self, cfg, name):
- # Key should be a hex encoded string
- self._key = cfg.get(name, "key")
- if self._we_cipher == IW_AUTH_CIPHER_WEP40 and len(self._key) != 10:
- raise ValueError("Key length not right for 40-bit WEP")
- if self._we_cipher == IW_AUTH_CIPHER_WEP104 and len(self._key) != 26:
- raise ValueError("Key length not right for 104-bit WEP")
-
- try:
- binascii.a2b_hex(self._key)
- except TypeError:
- raise ValueError("Key was not a hexadecimal string.")
-
- self._auth_alg = cfg.get_int(name, "auth_alg")
- if self._auth_alg != IW_AUTH_ALG_OPEN_SYSTEM and \
- self._auth_alg != IW_AUTH_ALG_SHARED_KEY:
- raise ValueError("Invalid authentication algorithm %d"
- % self._auth_alg)
-
- def get_properties(self):
- args = Security.get_properties(self)
- args.append(dbus.String(self._key))
- args.append(dbus.Int32(self._auth_alg))
- return args
-
- def write_to_config(self, section, config):
- Security.write_to_config(self, section, config)
- config.set(section, "key", self._key)
- config.set(section, "auth_alg", self._auth_alg)
-
-class WPASecurity(Security):
- def __init__(self, we_cipher):
- Security.__init__(self, we_cipher)
- self._wpa_ver = None
- self._key_mgmt = None
-
- def read_from_args(self, args):
- if len(args) != 3:
- raise ValueError("not enough arguments")
- key = args[0]
- if isinstance(key, unicode):
- key = key.encode()
- if not isinstance(key, str):
- raise ValueError("wrong argument type for key")
-
- wpa_ver = args[1]
- if not isinstance(wpa_ver, int):
- raise ValueError("wrong argument type for WPA version")
-
- key_mgmt = args[2]
- if not isinstance(key_mgmt, int):
- raise ValueError("wrong argument type for WPA key management")
- if not key_mgmt & IW_AUTH_KEY_MGMT_PSK:
- raise ValueError("Key management types other than" \
- " PSK are not supported")
-
- self._key = key
- self._wpa_ver = wpa_ver
- self._key_mgmt = key_mgmt
-
- def read_from_config(self, cfg, name):
- # Key should be a hex encoded string
- self._key = cfg.get(name, "key")
- if len(self._key) != 64:
- raise ValueError("Key length not right for WPA-PSK")
-
- try:
- binascii.a2b_hex(self._key)
- except TypeError:
- raise ValueError("Key was not a hexadecimal string.")
-
- self._wpa_ver = cfg.get_int(name, "wpa_ver")
- if self._wpa_ver != IW_AUTH_WPA_VERSION_WPA and \
- self._wpa_ver != IW_AUTH_WPA_VERSION_WPA2:
- raise ValueError("Invalid WPA version %d" % self._wpa_ver)
-
- self._key_mgmt = cfg.get_int(name, "key_mgmt")
- if not self._key_mgmt & IW_AUTH_KEY_MGMT_PSK:
- raise ValueError("Invalid WPA key management option %d"
- % self._key_mgmt)
-
- def get_properties(self):
- args = Security.get_properties(self)
- args.append(dbus.String(self._key))
- args.append(dbus.Int32(self._wpa_ver))
- args.append(dbus.Int32(self._key_mgmt))
- return args
-
- def write_to_config(self, section, config):
- Security.write_to_config(self, section, config)
- config.set(section, "key", self._key)
- config.set(section, "wpa_ver", self._wpa_ver)
- config.set(section, "key_mgmt", self._key_mgmt)
-
-
-class Network:
- def __init__(self, ssid):
- self.ssid = ssid
- self.timestamp = int(time.time())
- self.bssids = []
- self.we_cipher = 0
- self._security = None
-
- def get_properties(self):
- bssid_list = dbus.Array([], signature="s")
- for item in self.bssids:
- bssid_list.append(dbus.String(item))
- args = [dbus.String(self.ssid), dbus.Int32(self.timestamp),
- dbus.Boolean(True), bssid_list]
- args += self._security.get_properties()
- return tuple(args)
-
- def get_security(self):
- return self._security.get_properties()
-
- def set_security(self, security):
- self._security = security
-
- def read_from_args(self, auto, bssid, we_cipher, args):
- if auto == False:
- self.timestamp = int(time.time())
- if not bssid in self.bssids:
- self.bssids.append(bssid)
-
- self._security = Security.new_from_args(we_cipher, args)
- if not self._security:
- raise NetworkInvalidError("Invalid security information")
-
- def read_from_config(self, config):
- try:
- self.timestamp = config.get_int(self.ssid, "timestamp")
- except (ConfigParser.NoOptionError, ValueError), e:
- raise NetworkInvalidError(e)
-
- try:
- self._security = Security.new_from_config(config, self.ssid)
- except Exception, e:
- raise NetworkInvalidError(e)
-
- # The following don't need to be present
- try:
- self.bssids = config.get_list(self.ssid, "bssids")
- except (ConfigParser.NoOptionError, ValueError), e:
- logging.debug("Error reading bssids: %s" % e)
-
- def write_to_config(self, config):
- try:
- config.add_section(self.ssid)
- config.set(self.ssid, "timestamp", self.timestamp)
- if len(self.bssids) > 0:
- opt = " "
- opt = opt.join(self.bssids)
- config.set(self.ssid, "bssids", opt)
- self._security.write_to_config(self.ssid, config)
- except Exception, e:
- logging.debug("Error writing '%s': %s" % (self.ssid, e))
-
-
-class NotFoundError(dbus.DBusException):
- pass
-class UnsupportedError(dbus.DBusException):
- pass
-
-class NMInfoDBusServiceHelper(dbus.service.Object):
- def __init__(self, parent):
- self._parent = parent
- bus = dbus.SystemBus()
-
- # If NMI is already around, don't grab the NMI service
- bus_object = bus.get_object('org.freedesktop.DBus',
- '/org/freedesktop/DBus')
- name = None
- try:
- name = bus_object.GetNameOwner( \
- "org.freedesktop.NetworkManagerInfo",
- dbus_interface='org.freedesktop.DBus')
- except dbus.DBusException:
- logging.debug("Error getting owner of NMI")
- if name:
- logging.info("NMI service already owned by %s, won't claim it."
- % name)
-
- bus_name = dbus.service.BusName(NM_INFO_IFACE, bus=bus)
- dbus.service.Object.__init__(self, bus_name, NM_INFO_PATH)
-
- @dbus.service.method(NM_INFO_IFACE, in_signature='i', out_signature='as')
- def getNetworks(self, net_type):
- ssids = self._parent.get_networks(net_type)
- if len(ssids) > 0:
- return dbus.Array(ssids)
-
- raise NoNetworks()
-
- @dbus.service.method(NM_INFO_IFACE, in_signature='si',
- async_callbacks=('async_cb', 'async_err_cb'))
- def getNetworkProperties(self, ssid, net_type, async_cb, async_err_cb):
- self._parent.get_network_properties(ssid, net_type,
- async_cb, async_err_cb)
-
- @dbus.service.method(NM_INFO_IFACE)
- def updateNetworkInfo(self, ssid, bauto, bssid, cipher, *args):
- self._parent.update_network_info(ssid, bauto, bssid, cipher, args)
-
- @dbus.service.method(NM_INFO_IFACE,
- async_callbacks=('async_cb', 'async_err_cb'))
- def getKeyForNetwork(self, dev_path, net_path, ssid, attempt,
- new_key, async_cb, async_err_cb):
- self._parent.get_key_for_network(dev_path, net_path, ssid,
- attempt, new_key, async_cb, async_err_cb)
-
- @dbus.service.method(NM_INFO_IFACE)
- def cancelGetKeyForNetwork(self):
- self._parent.cancel_get_key_for_network()
-
-class NMInfo(object):
- def __init__(self, client):
- profile_path = env.get_profile_path()
- self._cfg_file = os.path.join(profile_path, "nm", "networks.cfg")
- self._nmclient = client
- self._allowed_networks = self._read_config()
- self._dbus_helper = NMInfoDBusServiceHelper(self)
- self._key_dialog = None
-
- def save_config(self):
- self._write_config(self._allowed_networks)
-
- def _read_config(self):
- if not os.path.exists(os.path.dirname(self._cfg_file)):
- os.makedirs(os.path.dirname(self._cfg_file), 0755)
- if not os.path.exists(self._cfg_file):
- self._write_config({})
- return {}
-
- config = NMConfig()
- config.read(self._cfg_file)
- networks = {}
- for name in config.sections():
- try:
- net = Network(name)
- net.read_from_config(config)
- networks[name] = net
- except Exception, e:
- logging.error("Error when processing config for" \
- " the network %s: %r" % (name, e))
-
- del config
- return networks
-
- def _write_config(self, networks):
- fp = open(self._cfg_file, 'w')
- config = NMConfig()
- for net in networks.values():
- net.write_to_config(config)
- config.write(fp)
- fp.close()
- del config
-
- def get_networks(self, net_type):
- if net_type != NETWORK_TYPE_ALLOWED:
- raise ValueError("Bad network type")
- nets = []
- for net in self._allowed_networks.values():
- nets.append(net.ssid)
- logging.debug("Returning networks: %s" % nets)
- return nets
-
- def get_network_properties(self, ssid, net_type, async_cb, async_err_cb):
- if not isinstance(ssid, unicode):
- async_err_cb(ValueError("Invalid arguments; ssid must be unicode."))
- if net_type != NETWORK_TYPE_ALLOWED:
- async_err_cb(ValueError("Bad network type"))
- if not self._allowed_networks.has_key(ssid):
- async_err_cb(NotFoundError("Network '%s' not found." % ssid))
- network = self._allowed_networks[ssid]
- props = network.get_properties()
-
- # DBus workaround: the normal method return handler wraps
- # the returned arguments in a tuple and then converts that to a
- # struct, but NetworkManager expects a plain list of arguments.
- # It turns out that the async callback method return code _doesn't_
- # wrap the returned arguments in a tuple, so as a workaround use
- # the async callback stuff here even though we're not doing it
- # asynchronously.
- async_cb(*props)
-
- def update_network_info(self, ssid, auto, bssid, we_cipher, args):
- if not isinstance(ssid, unicode):
- raise ValueError("Invalid arguments; ssid must be unicode.")
- if self._allowed_networks.has_key(ssid):
- del self._allowed_networks[ssid]
- net = Network(ssid)
- try:
- net.read_from_args(auto, bssid, we_cipher, args)
- logging.debug("Updated network information for '%s'." % ssid)
- self._allowed_networks[ssid] = net
- self.save_config()
- except NetworkInvalidError, e:
- logging.debug("Error updating network information: %s" % e)
- del net
-
- def get_key_for_network(self, dev_op, net_op, ssid, attempt,
- new_key, async_cb, async_err_cb):
- if not isinstance(ssid, unicode):
- raise ValueError("Invalid arguments; ssid must be unicode.")
- if self._allowed_networks.has_key(ssid) and not new_key:
- # We've got the info already
- net = self._allowed_networks[ssid]
- async_cb(tuple(net.get_security()))
- return
-
- # Otherwise, ask the user for it
- net = None
- dev = self._nmclient.get_device(dev_op)
- if not dev:
- async_err_cb(NotFoundError("Device was unknown."))
- return
-
- if dev.get_type() == nmclient.DEVICE_TYPE_802_3_ETHERNET:
- # We don't support wired 802.1x yet...
- async_err_cb(UnsupportedError("Device type is unsupported by NMI."))
- return
-
- net = dev.get_network(net_op)
- if not net:
- async_err_cb(NotFoundError("Network was unknown."))
- return
-
- self._key_dialog = keydialog.new_key_dialog(net, async_cb, async_err_cb)
- self._key_dialog.connect("response", self._key_dialog_response_cb)
- self._key_dialog.connect("destroy", self._key_dialog_destroy_cb)
- self._key_dialog.show_all()
-
- def _key_dialog_destroy_cb(self, widget, data=None):
- if widget != self._key_dialog:
- return
- self._key_dialog_response_cb(widget, gtk.RESPONSE_CANCEL)
-
- def _key_dialog_response_cb(self, widget, response_id):
- if widget != self._key_dialog:
- return
-
- (async_cb, async_err_cb) = self._key_dialog.get_callbacks()
- security = None
- if response_id == gtk.RESPONSE_OK:
- security = self._key_dialog.create_security()
- self._key_dialog = None
- widget.destroy()
-
- if response_id in [gtk.RESPONSE_CANCEL, gtk.RESPONSE_NONE]:
- # key dialog dialog was canceled; send the error back to NM
- async_err_cb(CanceledKeyRequestError())
- elif response_id == gtk.RESPONSE_OK:
- if not security:
- raise RuntimeError("Invalid security arguments.")
- props = security.get_properties()
- a = tuple(props)
- async_cb(*a)
- else:
- raise RuntimeError("Unhandled key dialog response %d" % response_id)
-
- def cancel_get_key_for_network(self):
- # Close the wireless key dialog and just have it return
- # with the 'canceled' argument set to true
- if not self._key_dialog:
- return
- self._key_dialog_destroy_cb(self._key_dialog)
-
- # this method is invoked directly in-process (not by DBus).
- def delete_all_networks(self):
- self._allowed_networks = {}
- self.save_config()
-
diff --git a/src/intro/Makefile.am b/src/intro/Makefile.am
deleted file mode 100644
index 3b92ea0..0000000
--- a/src/intro/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-imagedir = $(pkgdatadir)/shell/intro
-image_DATA = default-picture.png
-
-EXTRA_DIST = $(conf_DATA) $(image_DATA)
-sugardir = $(pkgdatadir)/shell/intro
-sugar_PYTHON = \
- __init__.py \
- colorpicker.py \
- intro.py \
- glive.py
diff --git a/src/intro/glive.py b/src/intro/glive.py
deleted file mode 100644
index a2ddbae..0000000
--- a/src/intro/glive.py
+++ /dev/null
@@ -1,200 +0,0 @@
-# -*- Mode: Python -*-
-# vi:si:et:sw=4:sts=4:ts=4
-
-import gtk
-import pygtk
-pygtk.require('2.0')
-
-import pygst
-pygst.require('0.10')
-import gst
-import gst.interfaces
-
-import gobject
-gobject.threads_init()
-
-class Glive(gobject.GObject):
- __gsignals__ = {
- 'new-picture': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'sink' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
- }
-
- def __init__(self, parent, width, height):
- gobject.GObject.__init__(self)
- self._parent = parent
-
- #check out the halfpipe, d00d.
- self.pipeline = gst.Pipeline()
-
- self.v4l2src = gst.element_factory_make("v4l2src", "v4l2src")
- self.t = gst.element_factory_make("tee", "tee")
- self.t_src_pad = self.t.get_request_pad( "src%d" )
- self.vscale = gst.element_factory_make("videoscale", "videoscale")
- self.ximagesink = gst.element_factory_make("ximagesink", "ximagesink")
-
- self.pipeline.add(self.v4l2src)
- self.pipeline.add(self.t)
- self.pipeline.add(self.vscale)
- self.pipeline.add(self.ximagesink)
-
- self.v4l2src.link(self.t)
-
- videoscale_structure = gst.Structure("video/x-raw-rgb")
- videoscale_structure['width'] = width
- videoscale_structure['height'] = height
- videoscale_structure['bpp'] = 16
- videoscale_structure['depth'] = 16
- videoscale_caps = gst.Caps(videoscale_structure)
- self.t_src_pad.link(self.vscale.get_pad("sink"))
- self.vscale.link(self.ximagesink, videoscale_caps)
- #self.vscale.link(self.ximagesink)
-
- self.queue = gst.element_factory_make("queue", "queue")
- self.queue.set_property("leaky", True)
- self.queue.set_property("max-size-buffers", 1)
- self.qsrc = self.queue.get_pad( "src" )
- self.qsink = self.queue.get_pad("sink")
- self.ffmpeg = gst.element_factory_make( \
- "ffmpegcolorspace", "ffmpegcolorspace")
- self.jpgenc = gst.element_factory_make("jpegenc", "jpegenc")
- self.filesink = gst.element_factory_make("fakesink", "fakesink")
- self.filesink.connect( "handoff", self.copyframe )
- self.filesink.set_property("signal-handoffs", True)
- self.pipeline.add(self.queue, self.ffmpeg, self.jpgenc, self.filesink)
-
- #only link at snapshot time
- #self.t.link(self.queue)
- self.queue.link(self.ffmpeg)
- self.ffmpeg.link(self.jpgenc)
- self.jpgenc.link(self.filesink)
- self.exposureOpen = False
-
- self._bus = self.pipeline.get_bus()
- self._CONNECT_SYNC = -1
- self._CONNECT_MSG = -1
- self.doPostBusStuff()
-
- def copyframe(self, fsink, buf, pad, user_data=None):
- #for some reason, we get two back to back buffers, even though we
- #ask for only one.
- if (self.exposureOpen):
- self.exposureOpen = False
- piccy = gtk.gdk.pixbuf_loader_new_with_mime_type("image/jpeg")
- piccy.write(buf)
- piccy.close()
- pixbuf = piccy.get_pixbuf()
- del piccy
-
- self.t.unlink(self.queue)
- self.queue.set_property("leaky", True)
-
- gobject.idle_add(self.loadPic, pixbuf)
-
- def loadPic( self, pixbuf ):
- self.emit('new-picture', pixbuf)
-
- def takeSnapshot( self ):
- if (self.exposureOpen):
- return
- else:
- self.exposureOpen = True
- self.t.link(self.queue)
-
- def doPostBusStuff(self):
- self._bus.enable_sync_message_emission()
- self._bus.add_signal_watch()
- self._CONNECT_SYNC = self._bus.connect('sync-message::element',
- self.on_sync_message)
- self._CONNECT_MSG = self._bus.connect('message', self.on_message)
-
- def on_sync_message(self, bus, message):
- if message.structure is None:
- return
- if message.structure.get_name() == 'prepare-xwindow-id':
- self.emit('sink', message.src)
- message.src.set_property('force-aspect-ratio', True)
-
- def on_message(self, bus, message):
- t = message.type
- if (t == gst.MESSAGE_ERROR):
- if (self.on_eos):
- self.on_eos()
- elif (t == gst.MESSAGE_EOS):
- if (self.on_eos):
- self.on_eos()
-
- def on_eos( self ):
- pass
-
- def stop(self):
- self.pipeline.set_state(gst.STATE_NULL)
-
- def play(self):
- self.pipeline.set_state(gst.STATE_PLAYING)
-
- def pause(self):
- self.pipeline.set_state(gst.STATE_PAUSED)
-
-
-class LiveVideoSlot(gtk.EventBox):
- __gsignals__ = {
- 'pixbuf': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
- }
-
- def __init__(self, width, height):
- gtk.EventBox.__init__(self)
-
- self.imagesink = None
- self.playa = None
- self._width = width
- self._height = height
-
- self.unset_flags(gtk.DOUBLE_BUFFERED)
- self.connect('focus-in-event', self.focus_in)
- self.connect('focus-out-event', self.focus_out)
- self.connect("button-press-event", self._button_press_event_cb)
- self.connect("expose-event", self._expose_event_cb)
-
- def _expose_event_cb(self, widget, event):
- if not self.playa:
- self.playa = Glive(self, self._width, self._height)
- self.playa.connect('new-picture', self._new_picture_cb)
- self.playa.connect('sink', self._new_sink_cb)
-
- def _new_picture_cb(self, playa, pixbuf):
- self.emit('pixbuf', pixbuf)
-
- def _new_sink_cb(self, playa, sink):
- if (self.imagesink != None):
- assert self.window.xid
- self.imagesink = None
- del self.imagesink
- self.imagesink = sink
- self.imagesink.set_xwindow_id(self.window.xid)
-
- def _button_press_event_cb(self, widget, event):
- self.takeSnapshot()
-
- def focus_in(self, widget, event, args=None):
- self.play()
-
- def focus_out(self, widget, event, args=None):
- self.stop()
-
- def play( self ):
- self.playa.play()
-
- def pause( self ):
- self.playa.pause()
-
- def stop( self ):
- self.playa.stop()
-
- def takeSnapshot( self ):
- self.playa.takeSnapshot()
diff --git a/src/jarabe/Makefile.am b/src/jarabe/Makefile.am
new file mode 100644
index 0000000..42bf075
--- /dev/null
+++ b/src/jarabe/Makefile.am
@@ -0,0 +1,14 @@
+SUBDIRS = \
+ controlpanel \
+ desktop \
+ frame \
+ journal \
+ model \
+ view \
+ intro \
+ util
+
+sugardir = $(pythondir)/jarabe
+sugar_PYTHON = \
+ __init__.py \
+ config.py
diff --git a/src/view/Makefile.in b/src/jarabe/Makefile.in
index 0525c9b..e99cb95 100644
--- a/src/view/Makefile.in
+++ b/src/jarabe/Makefile.in
@@ -29,15 +29,15 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/view
+subdir = src/jarabe
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(sugar_PYTHON)
+ $(srcdir)/config.py.in $(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = config.py
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -85,6 +85,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -199,24 +202,23 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = devices frame home
-sugardir = $(pkgdatadir)/shell/view
+SUBDIRS = \
+ controlpanel \
+ desktop \
+ frame \
+ journal \
+ model \
+ view \
+ intro \
+ util
+
+sugardir = $(pythondir)/jarabe
sugar_PYTHON = \
- __init__.py \
- ActivityHost.py \
- BuddyIcon.py \
- BuddyMenu.py \
- clipboardicon.py \
- clipboardmenu.py \
- keyhandler.py \
- launchwindow.py \
- pulsingicon.py \
- tabbinghandler.py \
- OverlayWindow.py \
- palettes.py \
- Shell.py
+ __init__.py \
+ config.py
all: all-recursive
@@ -230,9 +232,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/view/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/jarabe/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/view/Makefile
+ $(AUTOMAKE) --foreign src/jarabe/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -250,6 +252,8 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+config.py: $(top_builddir)/config.status $(srcdir)/config.py.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-sugarPYTHON: $(sugar_PYTHON)
@$(NORMAL_INSTALL)
test -z "$(sugardir)" || $(MKDIR_P) "$(DESTDIR)$(sugardir)"
diff --git a/src/view/devices/deviceview.py b/src/jarabe/__init__.py
index 90ebbf5..41b4b1c 100644
--- a/src/view/devices/deviceview.py
+++ b/src/jarabe/__init__.py
@@ -1,3 +1,13 @@
+"""OLPC Sugar Graphical "Shell" Interface
+
+Provides the shell-level operations for managing
+the OLPC laptop computers. It interacts heavily
+with (and depends upon) the Sugar UI libraries.
+
+This is a "graphical" shell, the name does not
+refer to a command-line "shell" interface.
+"""
+
# Copyright (C) 2006-2007, Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -14,13 +24,3 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-def create(model):
- name = 'view.devices.' + model.get_type()
-
- mod = __import__(name)
- components = name.split('.')
- for comp in components[1:]:
- mod = getattr(mod, comp)
-
- return mod.DeviceView(model)
-
diff --git a/src/config.py b/src/jarabe/config.py
index 3b3a8a6..8abfcb1 100644
--- a/src/config.py
+++ b/src/jarabe/config.py
@@ -14,8 +14,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-prefix = '/home/marco/sucrose-0.82/install'
-data_path = '/home/marco/sucrose-0.82/install/share/sugar/data'
-shell_path = '/home/marco/sucrose-0.82/install/share/sugar/shell'
-version = '0.82.1'
+# pylint: disable-msg=C0301
+
+prefix = '/home/erikos/sugar-jhbuild/install'
+data_path = '/home/erikos/sugar-jhbuild/install/share/sugar/data'
+shell_path = '/home/erikos/sugar-jhbuild/install/share/sugar/shell'
+locale_path = '/home/erikos/sugar-jhbuild/install/share/locale'
+ext_path = '/home/erikos/sugar-jhbuild/install/share/sugar/extensions'
+activities_path = "/home/erikos/sugar-jhbuild/install/share/sugar/activities"
+version = '0.83.x'
diff --git a/src/config.py.in b/src/jarabe/config.py.in
index f8e776f..6c418e9 100644
--- a/src/config.py.in
+++ b/src/jarabe/config.py.in
@@ -14,8 +14,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+# pylint: disable-msg=C0301
+
prefix = '@prefix@'
data_path = '@prefix@/share/sugar/data'
shell_path = '@prefix@/share/sugar/shell'
+locale_path = '@prefix@/share/locale'
+ext_path = '@prefix@/share/sugar/extensions'
+activities_path = "@prefix@/share/sugar/activities"
version = '@SUCROSE_VERSION@'
diff --git a/src/controlpanel/Makefile.am b/src/jarabe/controlpanel/Makefile.am
index 5acd9a1..fb796d7 100644
--- a/src/controlpanel/Makefile.am
+++ b/src/jarabe/controlpanel/Makefile.am
@@ -1,6 +1,4 @@
-SUBDIRS = model view
-
-sugardir = $(pkgdatadir)/shell/controlpanel
+sugardir = $(pythondir)/jarabe/controlpanel
sugar_PYTHON = \
__init__.py \
cmd.py \
diff --git a/src/view/devices/network/Makefile.in b/src/jarabe/controlpanel/Makefile.in
index 388045d..dc7746a 100644
--- a/src/view/devices/network/Makefile.in
+++ b/src/jarabe/controlpanel/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/view/devices/network
+subdir = src/jarabe/controlpanel
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,14 +190,17 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/view/devices/network
+sugardir = $(pythondir)/jarabe/controlpanel
sugar_PYTHON = \
__init__.py \
- mesh.py \
- wired.py \
- wireless.py
+ cmd.py \
+ gui.py \
+ inlinealert.py \
+ sectionview.py \
+ toolbar.py
all: all-am
@@ -208,9 +214,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/view/devices/network/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/jarabe/controlpanel/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/view/devices/network/Makefile
+ $(AUTOMAKE) --foreign src/jarabe/controlpanel/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/controlpanel/__init__.py b/src/jarabe/controlpanel/__init__.py
index a9dd95a..a9dd95a 100644
--- a/src/controlpanel/__init__.py
+++ b/src/jarabe/controlpanel/__init__.py
diff --git a/src/controlpanel/cmd.py b/src/jarabe/controlpanel/cmd.py
index ae5d298..12de1e2 100644
--- a/src/controlpanel/cmd.py
+++ b/src/jarabe/controlpanel/cmd.py
@@ -18,8 +18,10 @@ import sys
import getopt
import os
from gettext import gettext as _
+import traceback
+import logging
-import config
+from jarabe import config
_RESTART = 1
@@ -30,6 +32,8 @@ _general_error = _("sugar-control-panel: %s")
def cmd_help():
'''Print the help to the screen'''
+ # TRANS: Translators, there's a empty line at the end of this string,
+ # which must appear in the translated string (msgstr) as well.
print _('Usage: sugar-control-panel [ option ] key [ args ... ] \n\
Control for the sugar environment. \n\
Options: \n\
@@ -47,20 +51,25 @@ def note_restart():
'Hit ctrl+alt+erase on the keyboard to trigger a restart.')
def load_modules():
- '''Build a list of pointers to available modules in the model directory
- and load them.
+ '''Build a list of pointers to available modules and import them.
'''
- subpath = ['controlpanel', 'model']
- file_names = os.listdir(os.path.join(config.shell_path, '/'.join(subpath)))
-
modules = []
- for file_name in file_names:
- if file_name.endswith('.py') and file_name != '__init__.py':
- module_name = os.path.splitext(file_name)[0]
- module = __import__('.'.join(subpath) + '.' +
- module_name, globals(), locals(),
- [module_name])
- modules.append(module)
+
+ path = os.path.join(config.ext_path, 'cpsection')
+ folder = os.listdir(path)
+
+ for item in folder:
+ if os.path.isdir(os.path.join(path, item)) and \
+ os.path.exists(os.path.join(path, item, 'model.py')):
+ try:
+ module = __import__('.'.join(('cpsection', item, 'model')),
+ globals(), locals(), ['model'])
+ except Exception:
+ logging.error('Exception while loading extension:\n' + \
+ ''.join(traceback.format_exception(*sys.exc_info())))
+ else:
+ modules.append(module)
+
return modules
def main():
@@ -92,7 +101,7 @@ def main():
if option in ("-l"):
for module in modules:
methods = dir(module)
- print '%s:' % module.__name__.split('.')[-1]
+ print '%s:' % module.__name__.split('.')[1]
for method in methods:
if method.startswith('get_'):
print ' %s' % method[4:]
diff --git a/src/controlpanel/gui.py b/src/jarabe/controlpanel/gui.py
index 527f3b7..2f8da51 100644
--- a/src/controlpanel/gui.py
+++ b/src/jarabe/controlpanel/gui.py
@@ -14,20 +14,23 @@
# 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 os
-import gobject
import logging
from gettext import gettext as _
+import sys
+import traceback
+
+import gobject
+import gtk
from sugar.graphics.icon import Icon
from sugar.graphics import style
from sugar.graphics.alert import Alert
-import config
-from session import get_session_manager
-from controlpanel.toolbar import MainToolbar
-from controlpanel.toolbar import SectionToolbar
+from jarabe.model.session import get_session_manager
+from jarabe.controlpanel.toolbar import MainToolbar
+from jarabe.controlpanel.toolbar import SectionToolbar
+from jarabe import config
_logger = logging.getLogger('ControlPanel')
_MAX_COLUMNS = 5
@@ -194,10 +197,18 @@ class ControlPanel(gtk.Window):
self._section_toolbar.show()
self._current_option = option
- view_class = self._options[option]['view']
- model = self._options[option]['model']
+
+ mod = __import__('.'.join(('cpsection', option, 'view')),
+ globals(), locals(), ['view'])
+ view_class = getattr(mod, self._options[option]['view'], None)
+
+ mod = __import__('.'.join(('cpsection', option, 'model')),
+ globals(), locals(), ['model'])
+ model = ModelWrapper(mod)
+
self._section_view = view_class(model,
- self._options[option]['alerts'])
+ self._options[option]['alerts'])
+
self._set_canvas(self._section_view)
self._section_view.show()
self._section_view.connect('notify::is-valid',
@@ -213,55 +224,39 @@ class ControlPanel(gtk.Window):
self._section_view.auto_close = True
def _get_options(self):
- '''Get the available option information from the subfolders
- model and view.
+ '''Get the available option information from the extensions
'''
options = {}
- subpath = ['controlpanel', 'view']
- names = os.listdir(os.path.join(config.shell_path, '/'.join(subpath)))
-
- for name in names:
- if name.endswith('.py') and name != '__init__.py':
- tmp = os.path.splitext(name)[0]
- mod = __import__('.'.join(subpath) + '.' + tmp, globals(),
- locals(), [tmp])
- view_class_str = getattr(mod, 'CLASS', None)
- if view_class_str:
- view_class = getattr(mod, view_class_str, None)
- if not view_class:
- _logger.error('The CLASS constant \'%s\' does not ' \
- 'match a class name.' % view_class)
- else:
- options[tmp] = {}
- options[tmp]['alerts'] = []
- options[tmp]['view'] = view_class
- options[tmp]['icon'] = getattr(mod, 'ICON', tmp)
- options[tmp]['title'] = getattr(mod, 'TITLE',
- tmp)
- options[tmp]['color'] = getattr(mod, 'COLOR',
- None)
- else:
- _logger.error('There is no CLASS constant specified in ' \
- 'the view file \'%s\'.' % tmp)
-
- subpath = ['controlpanel', 'model']
- names = os.listdir(os.path.join(config.shell_path, '/'.join(subpath)))
-
- for name in names:
- if name.endswith('.py') and name != '__init__.py':
- tmp = os.path.splitext(name)[0]
- if tmp in options:
- mod = __import__('.'.join(subpath) + '.' + tmp,
- globals(), locals(), [tmp])
- keywords = getattr(mod, 'KEYWORDS', [])
- keywords.append(options[tmp]['title'].lower())
- if tmp not in keywords:
- keywords.append(tmp)
- options[tmp]['model'] = ModelWrapper(mod)
- options[tmp]['keywords'] = keywords
-
- return options
+ path = os.path.join(config.ext_path, 'cpsection')
+ folder = os.listdir(path)
+
+ for item in folder:
+ if os.path.isdir(os.path.join(path, item)) and \
+ os.path.exists(os.path.join(path, item, '__init__.py')):
+ try:
+ mod = __import__('.'.join(('cpsection', item)),
+ globals(), locals(), [item])
+ view_class = getattr(mod, 'CLASS', None)
+ if view_class is not None:
+ options[item] = {}
+ options[item]['alerts'] = []
+ options[item]['view'] = view_class
+ options[item]['icon'] = getattr(mod, 'ICON', item)
+ options[item]['title'] = getattr(mod, 'TITLE', item)
+ options[item]['color'] = getattr(mod, 'COLOR', None)
+ keywords = getattr(mod, 'KEYWORDS', [])
+ keywords.append(options[item]['title'].lower())
+ if item not in keywords:
+ keywords.append(item)
+ else:
+ _logger.error('There is no CLASS constant specifieds ' \
+ 'in the view file \'%s\'.' % item)
+ except Exception:
+ logging.error('Exception while loading extension:\n' + \
+ ''.join(traceback.format_exception(*sys.exc_info())))
+
+ return options
def __cancel_clicked_cb(self, widget):
self._section_view.undo()
diff --git a/src/controlpanel/inlinealert.py b/src/jarabe/controlpanel/inlinealert.py
index 619a379..619a379 100644
--- a/src/controlpanel/inlinealert.py
+++ b/src/jarabe/controlpanel/inlinealert.py
diff --git a/src/controlpanel/sectionview.py b/src/jarabe/controlpanel/sectionview.py
index 7b76aa1..7b76aa1 100644
--- a/src/controlpanel/sectionview.py
+++ b/src/jarabe/controlpanel/sectionview.py
diff --git a/src/controlpanel/toolbar.py b/src/jarabe/controlpanel/toolbar.py
index 6bb8328..6bb8328 100644
--- a/src/controlpanel/toolbar.py
+++ b/src/jarabe/controlpanel/toolbar.py
diff --git a/src/view/home/Makefile.am b/src/jarabe/desktop/Makefile.am
index b323589..94d8ab9 100644
--- a/src/view/home/Makefile.am
+++ b/src/jarabe/desktop/Makefile.am
@@ -1,17 +1,19 @@
-sugardir = $(pkgdatadir)/shell/view/home
+sugardir = $(pythondir)/jarabe/desktop
sugar_PYTHON = \
__init__.py \
activitieslist.py \
favoritesview.py \
favoriteslayout.py \
+ friendview.py \
grid.py \
- FriendView.py \
- FriendsBox.py \
- HomeBox.py \
- HomeWindow.py \
- MeshBox.py \
- MyIcon.py \
+ groupbox.py \
+ homebox.py \
+ homewindow.py \
+ keydialog.py \
+ meshbox.py \
+ myicon.py \
proc_smaps.py \
+ schoolserver.py \
snowflakelayout.py \
spreadlayout.py \
transitionbox.py
diff --git a/src/view/home/Makefile.in b/src/jarabe/desktop/Makefile.in
index 75c0d6c..22d865c 100644
--- a/src/view/home/Makefile.in
+++ b/src/jarabe/desktop/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/view/home
+subdir = src/jarabe/desktop
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,22 +190,25 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/view/home
+sugardir = $(pythondir)/jarabe/desktop
sugar_PYTHON = \
__init__.py \
activitieslist.py \
favoritesview.py \
favoriteslayout.py \
+ friendview.py \
grid.py \
- FriendView.py \
- FriendsBox.py \
- HomeBox.py \
- HomeWindow.py \
- MeshBox.py \
- MyIcon.py \
+ groupbox.py \
+ homebox.py \
+ homewindow.py \
+ keydialog.py \
+ meshbox.py \
+ myicon.py \
proc_smaps.py \
+ schoolserver.py \
snowflakelayout.py \
spreadlayout.py \
transitionbox.py
@@ -219,9 +225,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/view/home/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/jarabe/desktop/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/view/home/Makefile
+ $(AUTOMAKE) --foreign src/jarabe/desktop/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/hardware/__init__.py b/src/jarabe/desktop/__init__.py
index a9dd95a..a9dd95a 100644
--- a/src/hardware/__init__.py
+++ b/src/jarabe/desktop/__init__.py
diff --git a/src/view/home/activitieslist.py b/src/jarabe/desktop/activitieslist.py
index 4222d38..5b19331 100644
--- a/src/view/home/activitieslist.py
+++ b/src/jarabe/desktop/activitieslist.py
@@ -14,28 +14,33 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import logging
+
import gobject
import gtk
import hippo
+import gconf
-from sugar import profile
-from sugar import activity
from sugar import util
from sugar.graphics import style
from sugar.graphics.icon import CanvasIcon
+from sugar.graphics.xocolor import XoColor
+from sugar.activity import activityfactory
-import view.Shell
-from view.palettes import ActivityPalette
+from jarabe.model import bundleregistry
+from jarabe.view.palettes import ActivityPalette
class ActivitiesList(gtk.VBox):
__gtype_name__ = 'SugarActivitiesList'
__gsignals__ = {
'erase-activated' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([str])),
+ gobject.TYPE_NONE, ([str]))
}
def __init__(self):
+ logging.debug('STARTUP: Loading the activities list')
+
gobject.GObject.__init__(self)
scrolled_window = gtk.ScrolledWindow()
@@ -56,27 +61,22 @@ class ActivitiesList(gtk.VBox):
self._box.props.background_color = style.COLOR_WHITE.get_int()
canvas.set_root(self._box)
- registry = activity.get_registry()
- registry.get_activities_async(reply_handler=self._get_activities_cb)
- registry.connect('activity-added', self.__activity_added_cb)
- registry.connect('activity-removed', self.__activity_removed_cb)
-
- def _get_activities_cb(self, activity_list):
- gobject.idle_add(self._add_activity_list, activity_list)
+ gobject.idle_add(self.__connect_to_bundle_registry_cb)
- def _add_activity_list(self, activity_list):
- info = activity_list.pop()
- if info.bundle_id != 'org.laptop.JournalActivity':
+ def __connect_to_bundle_registry_cb(self):
+ registry = bundleregistry.get_registry()
+ for info in registry:
self._add_activity(info)
- return len(activity_list) > 0
+ registry.connect('bundle-added', self.__activity_added_cb)
+ registry.connect('bundle-removed', self.__activity_removed_cb)
def __activity_added_cb(self, activity_registry, activity_info):
self._add_activity(activity_info)
def __activity_removed_cb(self, activity_registry, activity_info):
for entry in self._box.get_children():
- if entry.get_bundle_id() == activity_info.bundle_id and \
- entry.get_version() == activity_info.version:
+ if entry.get_bundle_id() == activity_info.get_bundle_id() and \
+ entry.get_version() == activity_info.get_activity_version():
self._box.remove(entry)
return
@@ -97,10 +97,10 @@ class ActivitiesList(gtk.VBox):
for entry in self._box.get_children():
entry.set_visible(entry.matches(query))
- def __key_press_event_cb(self, widget, event):
+ def __key_press_event_cb(self, scrolled_window, event):
keyname = gtk.gdk.keyval_name(event.keyval)
- vadjustment = self.props.vadjustment
+ vadjustment = scrolled_window.props.vadjustment
if keyname == 'Up':
if vadjustment.props.value > vadjustment.props.lower:
vadjustment.props.value -= vadjustment.props.step_increment
@@ -131,27 +131,30 @@ class ActivityIcon(CanvasIcon):
__gsignals__ = {
'erase-activated' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([str])),
+ gobject.TYPE_NONE, ([str]))
}
def __init__(self, activity_info):
CanvasIcon.__init__(self, size=style.STANDARD_ICON_SIZE, cache=True,
- file_name=activity_info.icon)
+ file_name=activity_info.get_icon())
self._activity_info = activity_info
self._uncolor()
self.connect('hovering-changed', self.__hovering_changed_event_cb)
self.connect('button-release-event', self.__button_release_event_cb)
+ client = gconf.client_get_default()
+ self._xocolor = XoColor(client.get_string("/desktop/sugar/user/color"))
+
def create_palette(self):
palette = ActivityPalette(self._activity_info)
palette.connect('erase-activated', self.__erase_activated_cb)
return palette
def __erase_activated_cb(self, palette):
- self.emit('erase-activated', self._activity_info.bundle_id)
+ self.emit('erase-activated', self._activity_info.get_bundle_id())
def _color(self):
- self.props.xo_color = profile.get_color()
+ self.props.xo_color = self._xocolor
def _uncolor(self):
self.props.stroke_color = style.COLOR_BUTTON_GREY.get_svg()
@@ -167,7 +170,6 @@ class ActivityIcon(CanvasIcon):
self.palette.popdown(immediate=True)
self._uncolor()
-
class ActivityEntry(hippo.CanvasBox, hippo.CanvasItem):
__gtype_name__ = 'SugarActivityEntry'
@@ -184,14 +186,16 @@ class ActivityEntry(hippo.CanvasBox, hippo.CanvasItem):
box_height=style.GRID_CELL_SIZE,
orientation=hippo.ORIENTATION_HORIZONTAL)
- registry = activity.get_registry()
- registry.connect('activity-changed', self.__activity_changed_cb)
+ registry = bundleregistry.get_registry()
+ registry.connect('bundle-changed', self.__activity_changed_cb)
- self._bundle_id = activity_info.bundle_id
- self._version = activity_info.version
- self._favorite = activity_info.favorite
- self._title = activity_info.name
- self._installation_time = activity_info.installation_time
+ self._bundle = activity_info
+ self._bundle_id = activity_info.get_bundle_id()
+ self._version = activity_info.get_activity_version()
+ self._favorite = registry.is_bundle_favorite(self._bundle_id,
+ self._version)
+ self._title = activity_info.get_name()
+ self._installation_time = activity_info.get_installation_time()
self._favorite_icon = FavoriteIcon(self._favorite)
self._favorite_icon.connect('notify::favorite',
@@ -204,17 +208,17 @@ class ActivityEntry(hippo.CanvasBox, hippo.CanvasItem):
self.append(self.icon)
if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
- align = hippo.ALIGNMENT_END
+ align = hippo.ALIGNMENT_END
else:
- align = hippo.ALIGNMENT_START
+ align = hippo.ALIGNMENT_START
- title = hippo.CanvasText(text=activity_info.name,
+ title = hippo.CanvasText(text=activity_info.get_name(),
xalign=align,
font_desc=style.FONT_BOLD.get_pango_desc(),
box_width=ActivityEntry._TITLE_COL_WIDTH)
self.append(title)
- version = hippo.CanvasText(text=activity_info.version,
+ version = hippo.CanvasText(text=activity_info.get_activity_version(),
xalign=hippo.ALIGNMENT_END,
font_desc=style.FONT_NORMAL.get_pango_desc(),
box_width=ActivityEntry._VERSION_COL_WIDTH)
@@ -223,7 +227,7 @@ class ActivityEntry(hippo.CanvasBox, hippo.CanvasItem):
expander = hippo.CanvasBox()
self.append(expander, hippo.PACK_EXPAND)
- timestamp = activity_info.installation_time
+ timestamp = activity_info.get_installation_time()
date = hippo.CanvasText(
text=util.timestamp_to_elapsed_string(timestamp),
xalign=align,
@@ -235,19 +239,23 @@ class ActivityEntry(hippo.CanvasBox, hippo.CanvasItem):
self.reverse()
def __favorite_changed_cb(self, favorite_icon, pspec):
- registry = activity.get_registry()
- registry.set_activity_favorite(self._bundle_id, self._version,
+ registry = bundleregistry.get_registry()
+ registry.set_bundle_favorite(self._bundle_id, self._version,
favorite_icon.props.favorite)
def __activity_changed_cb(self, activity_registry, activity_info):
- if self._bundle_id == activity_info.bundle_id and \
- self._version == activity_info.version:
- self._title = activity_info.name
- self._favorite = activity_info.favorite
+ if self._bundle_id == activity_info.get_bundle_id() and \
+ self._version == activity_info.get_activity_version():
+ self._title = activity_info.get_name()
+
+ registry = bundleregistry.get_registry()
+ self._favorite = registry.is_bundle_favorite(self._bundle_id,
+ self._version)
+
self._favorite_icon.props.favorite = self._favorite
def __icon_button_release_event_cb(self, icon, event):
- view.Shell.get_instance().start_activity(self._bundle_id)
+ activityfactory.create(self._bundle)
def get_bundle_id(self):
return self._bundle_id
@@ -264,42 +272,33 @@ class ActivityEntry(hippo.CanvasBox, hippo.CanvasItem):
return self._title.lower().find(query) > -1
class FavoriteIcon(CanvasIcon):
- __gproperties__ = {
- 'favorite' : (bool, None, None, False,
- gobject.PARAM_READWRITE)
- }
-
def __init__(self, favorite):
CanvasIcon.__init__(self, icon_name='emblem-favorite',
box_width=style.GRID_CELL_SIZE*3/5,
size=style.SMALL_ICON_SIZE)
self._favorite = None
- self._set_favorite(favorite)
+ self.set_favorite(favorite)
self.connect('button-release-event', self.__release_event_cb)
self.connect('motion-notify-event', self.__motion_notify_event_cb)
- def _set_favorite(self, favorite):
+ def set_favorite(self, favorite):
if favorite == self._favorite:
return
self._favorite = favorite
if favorite:
- self.props.xo_color = profile.get_color()
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string('/desktop/sugar/user/color'))
+ self.props.xo_color = color
else:
self.props.stroke_color = style.COLOR_BUTTON_GREY.get_svg()
self.props.fill_color = style.COLOR_WHITE.get_svg()
- def do_set_property(self, pspec, value):
- if pspec.name == 'favorite':
- self._set_favorite(value)
- else:
- CanvasIcon.do_set_property(self, pspec, value)
+ def get_favorite(self):
+ return self._favorite
- def do_get_property(self, pspec):
- if pspec.name == 'favorite':
- return self._favorite
- else:
- return CanvasIcon.do_get_property(self, pspec)
+ favorite = gobject.property(
+ type=bool, default=False, getter=get_favorite, setter=set_favorite)
def __release_event_cb(self, icon, event):
self.props.favorite = not self.props.favorite
diff --git a/src/view/home/favoriteslayout.py b/src/jarabe/desktop/favoriteslayout.py
index 937f370..b286126 100644
--- a/src/view/home/favoriteslayout.py
+++ b/src/jarabe/desktop/favoriteslayout.py
@@ -24,9 +24,9 @@ import gtk
import hippo
from sugar.graphics import style
-from sugar import activity
-from view.home.grid import Grid
+from jarabe.model import bundleregistry
+from jarabe.desktop.grid import Grid
_logger = logging.getLogger('FavoritesLayout')
@@ -56,7 +56,6 @@ class FavoritesLayout(gobject.GObject, hippo.CanvasLayout):
return 0
def append(self, icon, locked=False):
- self.box.insert_sorted(icon, 0, self.compare_activities)
if hasattr(icon, 'fixed_position'):
relative_x, relative_y = icon.fixed_position
if relative_x >= 0 and relative_y >= 0:
@@ -69,7 +68,6 @@ class FavoritesLayout(gobject.GObject, hippo.CanvasLayout):
def remove(self, icon):
if icon in self.fixed_positions:
del self.fixed_positions[icon]
- self.box.remove(icon)
def move_icon(self, icon, x, y, locked=False):
if icon not in self.box.get_children():
@@ -78,7 +76,7 @@ class FavoritesLayout(gobject.GObject, hippo.CanvasLayout):
if hasattr(icon, 'get_bundle_id') and hasattr(icon, 'get_version'):
min_width_, width = self.box.get_width_request()
min_height_, height = self.box.get_height_request(width)
- registry = activity.get_registry()
+ registry = bundleregistry.get_registry()
registry.set_activity_position(
icon.get_bundle_id(), icon.get_version(),
x * width / float(_BASE_SCALE),
@@ -103,6 +101,10 @@ class RandomLayout(FavoritesLayout):
profile_key = 'random-layout'
"""String used in profile to represent this view."""
+ # TRANS: label for the freeform layout in the favorites view
+ palette_name = _('Freeform')
+ """String used to identify this layout in home view dropdown palette."""
+
def __init__(self):
FavoritesLayout.__init__(self)
@@ -181,6 +183,9 @@ class RingLayout(FavoritesLayout):
"""Name of icon used in home view dropdown palette."""
profile_key = 'ring-layout'
"""String used in profile to represent this view."""
+ # TRANS: label for the ring layout in the favorites view
+ palette_name = _('Ring')
+ """String used to identify this layout in home view dropdown palette."""
def __init__(self):
FavoritesLayout.__init__(self)
@@ -323,6 +328,10 @@ class SunflowerLayout(RingLayout):
profile_key = 'spiral-layout'
"""String used in profile to represent this view."""
+ # TRANS: label for the spiral layout in the favorites view
+ palette_name = _('Spiral')
+ """String used to identify this layout in home view dropdown palette."""
+
def __init__(self):
RingLayout.__init__(self)
self.skipped_indices = []
@@ -334,11 +343,13 @@ class SunflowerLayout(RingLayout):
def adjust_index(self, i):
"""Skip floret indices which end up outside the desired bounding box."""
for idx in self.skipped_indices:
- if i < idx: break
+ if i < idx:
+ break
i += 1
return i
- def _calculate_position(self, radius, icon_size, oindex, children_count):
+ def _calculate_position(self, radius, icon_size, oindex, children_count,
+ sin=math.sin, cos=math.cos):
"""Calculate the position of sunflower floret number 'oindex'.
If the result is outside the bounding box, use the next index which
is inside the bounding box."""
@@ -359,9 +370,9 @@ class SunflowerLayout(RingLayout):
# x,y are the top-left corner of the icon, so remove icon_size
# from width/height to compensate. y has an extra GRID_CELL_SIZE/2
# removed to make room for the "active activity" icon.
- x = r * math.cos(phi) + (width - icon_size) / 2
- y = r * math.sin(phi) + (height - icon_size - \
- (style.GRID_CELL_SIZE / 2) ) / 2
+ x = r * cos(phi) + (width - icon_size) / 2
+ y = r * sin(phi) + (height - icon_size - \
+ (style.GRID_CELL_SIZE / 2) ) / 2
# skip allocations outside the allocation box.
# give up once we can't fit
@@ -384,19 +395,27 @@ class BoxLayout(RingLayout):
profile_key = 'box-layout'
"""String used in profile to represent this view."""
+ # TRANS: label for the box layout in the favorites view
+ palette_name = _('Box')
+ """String used to identify this layout in home view dropdown palette."""
+
def __init__(self):
RingLayout.__init__(self)
- def _calculate_position(self, radius, icon_size, index, children_count):
+ def _calculate_position(self, radius, icon_size, index, children_count,
+ sin=None, cos=None):
# use "orthogonal" versions of cos and sin in order to square the
# circle and turn the 'ring view' into a 'box view'
def cos_d(d):
while d < 0:
d += 360
- if d < 45: return 1
- if d < 135: return (90 - d) / 45.
- if d < 225: return -1
+ if d < 45:
+ return 1
+ if d < 135:
+ return (90 - d) / 45.
+ if d < 225:
+ return -1
return cos_d(360 - d) # mirror around 180
cos = lambda r: cos_d(math.degrees(r))
@@ -417,6 +436,10 @@ class TriangleLayout(RingLayout):
profile_key = 'triangle-layout'
"""String used in profile to represent this view."""
+ # TRANS: label for the box layout in the favorites view
+ palette_name = _('Triangle')
+ """String used to identify this layout in home view dropdown palette."""
+
def __init__(self):
RingLayout.__init__(self)
@@ -427,15 +450,18 @@ class TriangleLayout(RingLayout):
RingLayout._calculate_radius_and_icon_size(self, children_count)
return max(radius, _MINIMUM_RADIUS + style.MEDIUM_ICON_SIZE), icon_size
- def _calculate_position(self, radius, icon_size, index, children_count):
+ def _calculate_position(self, radius, icon_size, index, children_count,
+ sin=math.sin, cos=math.cos):
# tweak cos and sin in order to make the 'ring' into an equilateral
# triangle.
def cos_d(d):
while d < -90:
d += 360
- if d <= 30: return (d + 90) / 120.
- if d <= 90: return (90 - d) / 60.
+ if d <= 30:
+ return (d + 90) / 120.
+ if d <= 90:
+ return (90 - d) / 60.
return -cos_d(180 - d) # mirror around 90
sqrt_3 = math.sqrt(3)
@@ -443,8 +469,10 @@ class TriangleLayout(RingLayout):
def sin_d(d):
while d < -90:
d += 360
- if d <= 30: return ((d + 90) / 120.) * sqrt_3 - 1
- if d <= 90: return sqrt_3 - 1
+ if d <= 30:
+ return ((d + 90) / 120.) * sqrt_3 - 1
+ if d <= 90:
+ return sqrt_3 - 1
return sin_d(180 - d) # mirror around 90
cos = lambda r: cos_d(math.degrees(r))
diff --git a/src/view/home/favoritesview.py b/src/jarabe/desktop/favoritesview.py
index c1fce27..3af8d51 100644
--- a/src/view/home/favoritesview.py
+++ b/src/jarabe/desktop/favoritesview.py
@@ -17,6 +17,7 @@
import logging
from gettext import gettext as _
+import gconf
import gobject
import gtk
@@ -27,36 +28,36 @@ from sugar.graphics.palette import Palette
from sugar.graphics.icon import Icon, CanvasIcon
from sugar.graphics.menuitem import MenuItem
from sugar.graphics.alert import Alert
-from sugar.profile import get_profile
-from sugar import activity
-
-import view.Shell
-from view.palettes import JournalPalette
-from view.palettes import CurrentActivityPalette, ActivityPalette
-from view.home.MyIcon import MyIcon
-from view.home import favoriteslayout
-from model import shellmodel
-from model.shellmodel import ShellModel
-from hardware import schoolserver
-from hardware.schoolserver import RegisterError
-from controlpanel.gui import ControlPanel
-from session import get_session_manager
+from sugar.graphics.xocolor import XoColor
+from sugar.activity import activityfactory
+
+from jarabe.view.palettes import JournalPalette
+from jarabe.view.palettes import CurrentActivityPalette, ActivityPalette
+from jarabe.model import shell
+from jarabe.model import bundleregistry
+from jarabe.controlpanel.gui import ControlPanel
+from jarabe.model.session import get_session_manager
+
+from jarabe.desktop import schoolserver
+from jarabe.desktop.schoolserver import RegisterError
+from jarabe.desktop.myicon import MyIcon
+from jarabe.desktop import favoriteslayout
_logger = logging.getLogger('FavoritesView')
_ICON_DND_TARGET = ('activity-icon', gtk.TARGET_SAME_WIDGET, 0)
# enumerate the various layout types we will display in the dropdown palette.
-# add a constant for your layout here, and add it to the _LAYOUT_MAP to get
+# add a constant for your layout here, and add it to the LAYOUT_MAP to get
# it to appear in the palette.
RING_LAYOUT, BOX_LAYOUT, TRIANGLE_LAYOUT, SUNFLOWER_LAYOUT, RANDOM_LAYOUT = \
xrange(5)
-_LAYOUT_MAP = {RING_LAYOUT: favoriteslayout.RingLayout,
- #BOX_LAYOUT: favoriteslayout.BoxLayout,
- #TRIANGLE_LAYOUT: favoriteslayout.TriangleLayout,
- #SUNFLOWER_LAYOUT: favoriteslayout.SunflowerLayout,
- RANDOM_LAYOUT: favoriteslayout.RandomLayout}
+LAYOUT_MAP = {RING_LAYOUT: favoriteslayout.RingLayout,
+ #BOX_LAYOUT: favoriteslayout.BoxLayout,
+ #TRIANGLE_LAYOUT: favoriteslayout.TriangleLayout,
+ #SUNFLOWER_LAYOUT: favoriteslayout.SunflowerLayout,
+ RANDOM_LAYOUT: favoriteslayout.RandomLayout}
"""Map numeric layout identifiers to uninstantiated subclasses of
`FavoritesLayout` which implement the layouts. Additional information
about the layout can be accessed with fields of the class."""
@@ -66,32 +67,36 @@ class FavoritesView(hippo.Canvas):
__gsignals__ = {
'erase-activated' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([str])),
+ gobject.TYPE_NONE, ([str]))
}
def __init__(self, **kwargs):
+ logging.debug('STARTUP: Loading the favorites view')
+
gobject.GObject.__init__(self, **kwargs)
# DND stuff
self._pressed_button = None
self._press_start_x = None
self._press_start_y = None
+ self._hot_x = None
+ self._hot_y = None
self._last_clicked_icon = None
self._box = hippo.CanvasBox()
self._box.props.background_color = style.COLOR_WHITE.get_int()
self.set_root(self._box)
- self._my_icon = None
- self._current_activity = None
+ self._my_icon = _MyIcon(style.XLARGE_ICON_SIZE)
+ self._my_icon.connect('register-activate', self.__register_activate_cb)
+ self._box.append(self._my_icon)
+
+ self._current_activity = CurrentActivityIcon()
+ self._box.append(self._current_activity)
+
self._layout = None
self._alert = None
- registry = activity.get_registry()
- registry.connect('activity-added', self.__activity_added_cb)
- registry.connect('activity-removed', self.__activity_removed_cb)
- registry.connect('activity-changed', self.__activity_changed_cb)
-
# More DND stuff
self.add_events(gtk.gdk.BUTTON_PRESS_MASK |
gtk.gdk.POINTER_MOTION_HINT_MASK)
@@ -102,23 +107,34 @@ class FavoritesView(hippo.Canvas):
self.connect('drag-drop', self.__drag_drop_cb)
self.connect('drag-data-received', self.__drag_data_received_cb)
+ gobject.idle_add(self.__connect_to_bundle_registry_cb)
+
+ def __connect_to_bundle_registry_cb(self):
+ registry = bundleregistry.get_registry()
+
+ for info in registry:
+ if registry.is_bundle_favorite(info.get_bundle_id(),
+ info.get_activity_version()):
+ self._add_activity(info)
+
+ registry.connect('bundle-added', self.__activity_added_cb)
+ registry.connect('bundle-removed', self.__activity_removed_cb)
+ registry.connect('bundle-changed', self.__activity_changed_cb)
+
def _add_activity(self, activity_info):
icon = ActivityIcon(activity_info)
icon.connect('erase-activated', self.__erase_activated_cb)
icon.props.size = style.STANDARD_ICON_SIZE
+ self._box.insert_sorted(icon, 0, self._layout.compare_activities)
self._layout.append(icon)
def __erase_activated_cb(self, activity_icon, bundle_id):
self.emit('erase-activated', bundle_id)
- def _get_activities_cb(self, activity_list):
- for info in activity_list:
- if info.favorite and info.bundle_id != "org.laptop.JournalActivity":
- self._add_activity(info)
-
def __activity_added_cb(self, activity_registry, activity_info):
- if activity_info.favorite and \
- activity_info.bundle_id != "org.laptop.JournalActivity":
+ registry = bundleregistry.get_registry()
+ if registry.is_bundle_favorite(activity_info.get_bundle_id(),
+ activity_info.get_activity_version()):
self._add_activity(activity_info)
def _find_activity_icon(self, bundle_id, version):
@@ -129,19 +145,23 @@ class FavoritesView(hippo.Canvas):
return None
def __activity_removed_cb(self, activity_registry, activity_info):
- icon = self._find_activity_icon(activity_info.bundle_id,
- activity_info.version)
+ icon = self._find_activity_icon(activity_info.get_bundle_id(),
+ activity_info.get_activity_version())
if icon is not None:
self._layout.remove(icon)
+ self._box.remove(icon)
def __activity_changed_cb(self, activity_registry, activity_info):
- if activity_info.bundle_id == 'org.laptop.JournalActivity':
+ if activity_info.get_bundle_id() == 'org.laptop.JournalActivity':
return
- icon = self._find_activity_icon(activity_info.bundle_id,
- activity_info.version)
+ icon = self._find_activity_icon(activity_info.get_bundle_id(),
+ activity_info.get_activity_version())
if icon is not None:
self._box.remove(icon)
- if activity_info.favorite:
+
+ registry = bundleregistry.get_registry()
+ if registry.is_bundle_favorite(activity_info.get_bundle_id(),
+ activity_info.get_activity_version()):
self._add_activity(activity_info)
def do_size_allocate(self, allocation):
@@ -164,12 +184,6 @@ class FavoritesView(hippo.Canvas):
hippo.Canvas.do_size_allocate(self, allocation)
- def enable_xo_palette(self):
- self._my_icon.enable_palette()
- if self._my_icon.register_menu is not None:
- self._my_icon.register_menu.connect('activate',
- self.__register_activate_cb)
-
# TODO: Dnd methods. This should be merged somehow inside hippo-canvas.
def __button_press_event_cb(self, widget, event):
if event.button == 1 and event.type == gtk.gdk.BUTTON_PRESS:
@@ -222,8 +236,9 @@ class FavoritesView(hippo.Canvas):
# TODO: we should get the pixbuf from the widget, so it has colors, etc
pixbuf = gtk.gdk.pixbuf_new_from_file(icon_file_name)
- hot_spot = style.zoom(10)
- context.set_icon_pixbuf(pixbuf, hot_spot, hot_spot)
+ self._hot_x = pixbuf.props.width / 2
+ self._hot_y = pixbuf.props.height / 2
+ context.set_icon_pixbuf(pixbuf, self._hot_x, self._hot_y)
def __drag_motion_cb(self, widget, context, x, y, time):
if self._last_clicked_icon is not None:
@@ -236,11 +251,14 @@ class FavoritesView(hippo.Canvas):
if self._last_clicked_icon is not None:
self.drag_get_data(context, _ICON_DND_TARGET[0])
- self._layout.move_icon(self._last_clicked_icon, x, y)
+ self._layout.move_icon(self._last_clicked_icon,
+ x - self._hot_x, y - self._hot_y)
self._pressed_button = None
self._press_start_x = None
self._press_start_y = None
+ self._hot_x = None
+ self._hot_y = None
self._last_clicked_icon = None
return True
@@ -252,28 +270,33 @@ class FavoritesView(hippo.Canvas):
context.drop_finish(success=True, time=time)
def _set_layout(self, layout):
- if layout not in _LAYOUT_MAP:
+ if layout not in LAYOUT_MAP:
raise ValueError('Unknown favorites layout: %r' % layout)
- if type(self._layout) != _LAYOUT_MAP[layout]:
- self._box.clear()
- self._layout = _LAYOUT_MAP[layout]()
- self._box.set_layout(self._layout)
- self._my_icon = _MyIcon(style.XLARGE_ICON_SIZE)
- self._layout.append(self._my_icon, locked=True)
+ if type(self._layout) == LAYOUT_MAP[layout]:
+ return
- self._current_activity = CurrentActivityIcon()
- self._layout.append(self._current_activity, locked=True)
+ self._layout = LAYOUT_MAP[layout]()
+ self._box.set_layout(self._layout)
- registry = activity.get_registry()
- registry.get_activities_async(reply_handler=self._get_activities_cb)
+ #TODO: compatibility hack while sort() gets added to the hippo python
+ # bindings
+ if hasattr(self._box, 'sort'):
+ self._box.sort(self._layout.compare_activities)
- if self._layout.allow_dnd():
- self.drag_source_set(0, [], 0)
- self.drag_dest_set(0, [], 0)
- else:
- self.drag_source_unset()
- self.drag_dest_unset()
+ for icon in self._box.get_children():
+ if icon not in [self._my_icon, self._current_activity]:
+ self._layout.append(icon)
+
+ self._layout.append(self._my_icon, locked=True)
+ self._layout.append(self._current_activity, locked=True)
+
+ if self._layout.allow_dnd():
+ self.drag_source_set(0, [], 0)
+ self.drag_dest_set(0, [], 0)
+ else:
+ self.drag_source_unset()
+ self.drag_dest_unset()
layout = property(None, _set_layout)
@@ -288,7 +311,7 @@ class FavoritesView(hippo.Canvas):
self._box.remove(self._alert)
self._alert = None
- def __register_activate_cb(self, menuitem):
+ def __register_activate_cb(self, icon):
alert = Alert()
try:
schoolserver.register_laptop()
@@ -297,9 +320,9 @@ class FavoritesView(hippo.Canvas):
alert.props.msg = _('%s') % e
else:
alert.props.title = _('Registration Successful')
- alert.props.msg = _('You are now registered with your school server.')
- palette = self._my_icon.get_palette()
- palette.menu.remove(menuitem)
+ alert.props.msg = _('You are now registered ' \
+ 'with your school server.')
+ self._my_icon.remove_register_menu()
ok_icon = Icon(icon_name='dialog-ok')
alert.add_button(gtk.RESPONSE_OK, _('Ok'), ok_icon)
@@ -315,26 +338,31 @@ class ActivityIcon(CanvasIcon):
__gsignals__ = {
'erase-activated' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([str])),
+ gobject.TYPE_NONE, ([str]))
}
def __init__(self, activity_info):
- CanvasIcon.__init__(self, cache=True, file_name=activity_info.icon)
+ CanvasIcon.__init__(self, cache=True,
+ file_name=activity_info.get_icon())
+
self._activity_info = activity_info
self._uncolor()
self.connect('hovering-changed', self.__hovering_changed_event_cb)
self.connect('button-release-event', self.__button_release_event_cb)
+ client = gconf.client_get_default()
+ self._xocolor = XoColor(client.get_string("/desktop/sugar/user/color"))
+
def create_palette(self):
palette = ActivityPalette(self._activity_info)
palette.connect('erase-activated', self.__erase_activated_cb)
return palette
def __erase_activated_cb(self, palette):
- self.emit('erase-activated', self._activity_info.bundle_id)
+ self.emit('erase-activated', self._activity_info.get_bundle_id())
def _color(self):
- self.props.xo_color = get_profile().color
+ self.props.xo_color = self._xocolor
def _uncolor(self):
self.props.stroke_color = style.COLOR_BUTTON_GREY.get_svg()
@@ -349,14 +377,15 @@ class ActivityIcon(CanvasIcon):
def __button_release_event_cb(self, icon, event):
self.palette.popdown(immediate=True)
self._uncolor()
- view.Shell.get_instance().start_activity(self._activity_info.bundle_id)
+
+ activityfactory.create(self._activity_info)
def get_bundle_id(self):
- return self._activity_info.bundle_id
+ return self._activity_info.get_bundle_id()
bundle_id = property(get_bundle_id, None)
def get_version(self):
- return self._activity_info.version
+ return self._activity_info.get_activity_version()
version = property(get_version, None)
def _get_installation_time(self):
@@ -370,10 +399,11 @@ class ActivityIcon(CanvasIcon):
class CurrentActivityIcon(CanvasIcon, hippo.CanvasItem):
def __init__(self):
CanvasIcon.__init__(self, cache=True)
- self._home_model = shellmodel.get_instance().get_home()
+ self._home_model = shell.get_model()
+ self._home_activity = self._home_model.get_active_activity()
- if self._home_model.get_active_activity() is not None:
- self._update(self._home_model.get_active_activity())
+ if self._home_activity is not None:
+ self._update()
self._home_model.connect('active-activity-changed',
self.__active_activity_changed_cb)
@@ -383,41 +413,55 @@ class CurrentActivityIcon(CanvasIcon, hippo.CanvasItem):
def __button_release_event_cb(self, icon, event):
self._home_model.get_active_activity().get_window().activate(1)
- def _update(self, home_activity):
- self.props.file_name = home_activity.get_icon_path()
- self.props.xo_color = home_activity.get_icon_color()
+ def _update(self):
+ self.props.file_name = self._home_activity.get_icon_path()
+ self.props.xo_color = self._home_activity.get_icon_color()
self.props.size = style.STANDARD_ICON_SIZE
if self.palette is not None:
self.palette.destroy()
self.palette = None
- if home_activity.is_journal():
- palette = JournalPalette(home_activity)
+ def create_palette(self):
+ if self._home_activity.is_journal():
+ palette = JournalPalette(self._home_activity)
else:
- palette = CurrentActivityPalette(home_activity)
- self.set_palette(palette)
+ palette = CurrentActivityPalette(self._home_activity)
+ return palette
def __active_activity_changed_cb(self, home_model, home_activity):
- self._update(home_activity)
+ self._home_activity = home_activity
+ self._update()
class _MyIcon(MyIcon):
+ __gtype_name__ = 'SugarFavoritesMyIcon'
+
+ __gsignals__ = {
+ 'register-activate' : (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE, ([]))
+ }
def __init__(self, scale):
MyIcon.__init__(self, scale)
self._power_manager = None
- self._profile = get_profile()
- self.register_menu = None
+ self._palette_enabled = False
+ self._register_menu = None
+
+ def create_palette(self):
+ if not self._palette_enabled:
+ self._palette_enabled = True
+ return
+
+ client = gconf.client_get_default()
+ nick = client.get_string("/desktop/sugar/user/nick")
+ color = XoColor(client.get_string("/desktop/sugar/user/color"))
- def enable_palette(self):
palette_icon = Icon(icon_name='computer-xo',
icon_size=gtk.ICON_SIZE_LARGE_TOOLBAR,
- xo_color=self._profile.color)
- palette = Palette(self._profile.nick_name,
- #secondary_text='Sample secondary label',
- icon=palette_icon)
+ xo_color=color)
+ palette = Palette(nick, icon=palette_icon)
- item = MenuItem(_('Control Panel'), 'preferences-system')
+ item = MenuItem(_('Settings'), 'preferences-system')
item.connect('activate', self.__controlpanel_activate_cb)
palette.menu.append(item)
item.show()
@@ -432,12 +476,14 @@ class _MyIcon(MyIcon):
palette.menu.append(item)
item.show()
- if not self._profile.is_registered():
- self.register_menu = MenuItem(_('Register'), 'media-record')
- palette.menu.append(self.register_menu)
- self.register_menu.show()
-
- self.set_palette(palette)
+ backup_url = client.get_string('/desktop/sugar/backup_url')
+ if not backup_url:
+ self._register_menu = MenuItem(_('Register'), 'media-record')
+ self._register_menu.connect('activate', self.__register_activate_cb)
+ palette.menu.append(self._register_menu)
+ self._register_menu.show()
+
+ return palette
def _reboot_activate_cb(self, menuitem):
session_manager = get_session_manager()
@@ -454,3 +500,10 @@ class _MyIcon(MyIcon):
panel = ControlPanel()
panel.set_transient_for(self.get_toplevel())
panel.show()
+
+ def __register_activate_cb(self, menuitem):
+ self.emit('register-activate')
+
+ def remove_register_menu(self):
+ self.palette.remove(self._register_menu)
+
diff --git a/src/view/home/FriendView.py b/src/jarabe/desktop/friendview.py
index be2f46f..4c5f1c8 100644
--- a/src/view/home/FriendView.py
+++ b/src/jarabe/desktop/friendview.py
@@ -19,9 +19,9 @@ import hippo
from sugar.graphics.icon import CanvasIcon
from sugar.graphics import style
from sugar.presence import presenceservice
-from sugar import activity
-from view.BuddyIcon import BuddyIcon
+from jarabe.view.buddyicon import BuddyIcon
+from jarabe.model import bundleregistry
class FriendView(hippo.CanvasBox):
def __init__(self, buddy, **kwargs):
@@ -47,10 +47,10 @@ class FriendView(hippo.CanvasBox):
self._buddy.connect('color-changed', self._buddy_color_changed_cb)
def _get_new_icon_name(self, ps_activity):
- registry = activity.get_registry()
- activity_info = registry.get_activity(ps_activity.props.type)
+ registry = bundleregistry.get_registry()
+ activity_info = registry.get_bundle(ps_activity.props.type)
if activity_info:
- return activity_info.icon
+ return activity_info.get_icon()
return None
def _remove_activity_icon(self):
diff --git a/src/view/home/grid.py b/src/jarabe/desktop/grid.py
index 97f9229..eb7fabc 100644
--- a/src/view/home/grid.py
+++ b/src/jarabe/desktop/grid.py
@@ -156,7 +156,7 @@ class Grid(_sugarext.Grid):
return weight
def __solve_collisions_cb(self):
- for i in range(_MAX_COLLISIONS_PER_REFRESH):
+ for i_ in range(_MAX_COLLISIONS_PER_REFRESH):
collision = self._collisions.pop(0)
old_rect = self._child_rects[collision]
diff --git a/src/view/home/FriendsBox.py b/src/jarabe/desktop/groupbox.py
index c45c1c6..b77ae6e 100644
--- a/src/view/home/FriendsBox.py
+++ b/src/jarabe/desktop/groupbox.py
@@ -14,22 +14,27 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import logging
+
import gobject
import gtk
import hippo
+import gconf
-from sugar import profile
from sugar.graphics import style
from sugar.graphics.icon import CanvasIcon, Icon
from sugar.graphics.palette import Palette
+from sugar.graphics.xocolor import XoColor
-from model import shellmodel
-from view.home.FriendView import FriendView
-from view.home.spreadlayout import SpreadLayout
+from jarabe.model import friends
+from jarabe.desktop.friendview import FriendView
+from jarabe.desktop.spreadlayout import SpreadLayout
-class FriendsBox(hippo.Canvas):
- __gtype_name__ = 'SugarFriendsBox'
+class GroupBox(hippo.Canvas):
+ __gtype_name__ = 'SugarGroupBox'
def __init__(self):
+ logging.debug("STARTUP: Loading the group view")
+
gobject.GObject.__init__(self)
self._box = hippo.CanvasBox()
@@ -41,24 +46,29 @@ class FriendsBox(hippo.Canvas):
self._layout = SpreadLayout()
self._box.set_layout(self._layout)
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string("/desktop/sugar/user/color"))
+
self._owner_icon = CanvasIcon(icon_name='computer-xo', cache=True,
- xo_color=profile.get_color())
+ xo_color=color)
self._owner_icon.props.size = style.LARGE_ICON_SIZE
palette_icon = Icon(icon_name='computer-xo',
- xo_color=profile.get_color())
+ xo_color=color)
palette_icon.props.icon_size = gtk.ICON_SIZE_LARGE_TOOLBAR
- palette = Palette(None, primary_text=profile.get_nick_name(),
- icon=palette_icon)
+
+ nick = client.get_string("/desktop/sugar/user/nick")
+ palette = Palette(None, primary_text=nick, icon=palette_icon)
+
self._owner_icon.set_palette(palette)
self._layout.add(self._owner_icon)
- friends = shellmodel.get_instance().get_friends()
+ friends_model = friends.get_model()
- for friend in friends:
+ for friend in friends_model:
self.add_friend(friend)
- friends.connect('friend-added', self._friend_added_cb)
- friends.connect('friend-removed', self._friend_removed_cb)
+ friends_model.connect('friend-added', self._friend_added_cb)
+ friends_model.connect('friend-removed', self._friend_removed_cb)
def add_friend(self, buddy_info):
icon = FriendView(buddy_info)
@@ -86,4 +96,3 @@ class FriendsBox(hippo.Canvas):
self._layout.move(self._owner_icon, x, y)
hippo.Canvas.do_size_allocate(self, allocation)
-
diff --git a/src/view/home/HomeBox.py b/src/jarabe/desktop/homebox.py
index 0655253..2ffda09 100644
--- a/src/view/home/HomeBox.py
+++ b/src/jarabe/desktop/homebox.py
@@ -17,30 +17,29 @@
from gettext import gettext as _
import logging
import os
+import gconf
import gobject
import gtk
from sugar.graphics import style
from sugar.graphics import iconentry
-from sugar.graphics.menuitem import MenuItem
from sugar.graphics.radiotoolbutton import RadioToolButton
from sugar.graphics.alert import Alert
from sugar.graphics.icon import Icon
-from sugar import profile
-from sugar import activity
-from sugar.bundle.activitybundle import ActivityBundle
-from view.home import favoritesview
-from view.home.activitieslist import ActivitiesList
+from jarabe.model import bundleregistry
+from jarabe.desktop import favoritesview
+from jarabe.desktop.activitieslist import ActivitiesList
_FAVORITES_VIEW = 0
_LIST_VIEW = 1
+_FAVORITES_KEY = "/desktop/sugar/desktop/favorites_layout"
_AUTOSEARCH_TIMEOUT = 1000
def _convert_layout_constant(profile_constant):
- for layoutid, layoutclass in favoritesview._LAYOUT_MAP.items():
+ for layoutid, layoutclass in favoritesview.LAYOUT_MAP.items():
if profile_constant == layoutclass.profile_key:
return layoutid
logging.warning('Incorrect favorites_layout value: %r' % \
@@ -51,11 +50,12 @@ class HomeBox(gtk.VBox):
__gtype_name__ = 'SugarHomeBox'
def __init__(self):
+ logging.debug("STARTUP: Loading the home view")
+
gobject.GObject.__init__(self)
self._favorites_view = favoritesview.FavoritesView()
self._list_view = ActivitiesList()
- self._enable_xo_palette = False
self._favorites_view.connect('erase-activated',
self.__erase_activated_cb)
@@ -67,19 +67,20 @@ class HomeBox(gtk.VBox):
self.pack_start(self._toolbar, expand=False)
self._toolbar.show()
- profile_layout_constant = profile.get_profile().favorites_layout
- layout = _convert_layout_constant(profile_layout_constant)
+ client = gconf.client_get_default()
+ layout_constant = client.get_string(_FAVORITES_KEY)
+ layout = _convert_layout_constant(layout_constant)
self._set_view(_FAVORITES_VIEW, layout)
def __erase_activated_cb(self, view, bundle_id):
- registry = activity.get_registry()
- activity_info = registry.get_activity(bundle_id)
+ registry = bundleregistry.get_registry()
+ activity_info = registry.get_bundle(bundle_id)
alert = Alert()
alert.props.title = _('Confirm erase')
alert.props.msg = \
_('Confirm erase: Do you want to permanently erase %s?') \
- % activity_info.name
+ % activity_info.get_name()
cancel_icon = Icon(icon_name='dialog-cancel')
alert.add_button(gtk.RESPONSE_CANCEL, _('Keep'), cancel_icon)
@@ -105,9 +106,9 @@ class HomeBox(gtk.VBox):
else:
self._favorites_view.remove_alert()
if response_id == gtk.RESPONSE_OK:
- registry = activity.get_registry()
- activity_info = registry.get_activity(bundle_id)
- ActivityBundle(activity_info.path).uninstall()
+ registry = bundleregistry.get_registry()
+ bundle = registry.get_bundle(bundle_id)
+ registry.uninstall(bundle)
def show_software_updates_alert(self):
alert = Alert()
@@ -148,7 +149,7 @@ class HomeBox(gtk.VBox):
update_trigger_file)
if response_id == gtk.RESPONSE_OK:
- from controlpanel.gui import ControlPanel
+ from jarabe.controlpanel.gui import ControlPanel
panel = ControlPanel()
panel.set_transient_for(self.get_toplevel())
panel.show()
@@ -162,11 +163,12 @@ class HomeBox(gtk.VBox):
def __toolbar_view_changed_cb(self, toolbar, view, layout):
self._set_view(view, layout)
if layout is not None:
- current_profile = profile.get_profile()
- profile_key = favoritesview._LAYOUT_MAP[layout].profile_key
- if profile_key != current_profile.favorites_layout:
- current_profile.favorites_layout = profile_key
- current_profile.save()
+ client = gconf.client_get_default()
+ layout_profile = client.get_string(_FAVORITES_KEY)
+ layout = _convert_layout_constant(layout_profile)
+ profile_key = favoritesview.LAYOUT_MAP[layout].profile_key
+ if profile_key != layout:
+ client.set_string(_FAVORITES_KEY, profile_key)
else:
logging.warning('Incorrect layout requested: %r' % layout)
@@ -177,9 +179,6 @@ class HomeBox(gtk.VBox):
self._favorites_view.layout = layout
- if self._enable_xo_palette:
- self._favorites_view.enable_xo_palette()
-
if self._favorites_view not in self.get_children():
self.add(self._favorites_view)
self._favorites_view.show()
@@ -206,11 +205,6 @@ class HomeBox(gtk.VBox):
#return self._donut.has_activities()
return False
- def enable_xo_palette(self):
- self._enable_xo_palette = True
- if self._favorites_view is not None:
- self._favorites_view.enable_xo_palette()
-
def focus_search_entry(self):
self._toolbar.search_entry.grab_focus()
@@ -247,6 +241,7 @@ class HomeToolbar(gtk.Toolbar):
self.search_entry.connect('activate', self.__entry_activated_cb)
self.search_entry.connect('changed', self.__entry_changed_cb)
tool_item.add(self.search_entry)
+ self.search_entry.set_sensitive(False)
self.search_entry.show()
self._add_separator(expand=True)
@@ -271,8 +266,12 @@ class HomeToolbar(gtk.Toolbar):
def __view_button_toggled_cb(self, button, view):
if button.props.active:
if view == _FAVORITES_VIEW:
+ self.search_entry.set_text('')
+ self.search_entry.set_sensitive(False)
self.emit('view-changed', view, button.layout)
else:
+ self.search_entry.set_sensitive(True)
+ self.search_entry.grab_focus()
self.emit('view-changed', view, None)
def _add_separator(self, expand=False):
@@ -322,25 +321,24 @@ class FavoritesButton(RadioToolButton):
self.props.accelerator = _('<Ctrl>1')
self.props.group = None
- profile_layout_constant = profile.get_profile().favorites_layout
- self._layout = _convert_layout_constant(profile_layout_constant)
+ client = gconf.client_get_default()
+ layout_constant = client.get_string(_FAVORITES_KEY)
+ self._layout = _convert_layout_constant(layout_constant)
self._update_icon()
# someday, this will be a gtk.Table()
layouts_grid = gtk.HBox()
layout_item = None
- for layoutid, layoutclass in sorted(favoritesview._LAYOUT_MAP.items()):
+ for layoutid, layoutclass in sorted(favoritesview.LAYOUT_MAP.items()):
layout_item = RadioToolButton(icon_name=layoutclass.icon_name,
group=layout_item, active=False)
if layoutid == self._layout:
layout_item.set_active(True)
- layouts_grid.add(layout_item)
+ layouts_grid.pack_start(layout_item, fill=False)
layout_item.connect('toggled', self.__layout_activate_cb,
layoutid)
layouts_grid.show_all()
self.props.palette.set_content(layouts_grid)
- self.props.palette._update_separators()
-
def __layout_activate_cb(self, menu_item, layout):
if not menu_item.get_active():
@@ -356,7 +354,7 @@ class FavoritesButton(RadioToolButton):
self.emit('toggled')
def _update_icon(self):
- self.props.named_icon = favoritesview._LAYOUT_MAP[self._layout]\
+ self.props.named_icon = favoritesview.LAYOUT_MAP[self._layout]\
.icon_name
def _get_layout(self):
diff --git a/src/jarabe/desktop/homewindow.py b/src/jarabe/desktop/homewindow.py
new file mode 100644
index 0000000..bbb0db1
--- /dev/null
+++ b/src/jarabe/desktop/homewindow.py
@@ -0,0 +1,143 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# 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 logging
+
+import gtk
+
+from sugar.graphics import style
+from sugar.graphics import palettegroup
+
+from jarabe.desktop.meshbox import MeshBox
+from jarabe.desktop.homebox import HomeBox
+from jarabe.desktop.groupbox import GroupBox
+from jarabe.desktop.transitionbox import TransitionBox
+from jarabe.model.shell import ShellModel
+from jarabe.model import shell
+
+_HOME_PAGE = 0
+_GROUP_PAGE = 1
+_MESH_PAGE = 2
+_TRANSITION_PAGE = 3
+
+class HomeWindow(gtk.Window):
+ def __init__(self):
+ logging.debug('STARTUP: Loading the desktop window')
+ gtk.Window.__init__(self)
+
+ accel_group = gtk.AccelGroup()
+ self.set_data('sugar-accel-group', accel_group)
+ self.add_accel_group(accel_group)
+
+ self._active = False
+
+ self.set_default_size(gtk.gdk.screen_width(),
+ gtk.gdk.screen_height())
+
+ self.realize()
+ self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DESKTOP)
+ self.connect('visibility-notify-event',
+ self._visibility_notify_event_cb)
+
+ self._home_box = HomeBox()
+ self._group_box = GroupBox()
+ self._mesh_box = MeshBox()
+ self._transition_box = TransitionBox()
+
+ self.add(self._home_box)
+ self._home_box.show()
+
+ self._transition_box.connect('completed',
+ self._transition_completed_cb)
+
+ shell.get_model().zoom_level_changed.connect(
+ self.__zoom_level_changed_cb)
+
+ def _deactivate_view(self, level):
+ group = palettegroup.get_group("default")
+ group.popdown()
+ if level == ShellModel.ZOOM_HOME:
+ self._home_box.suspend()
+ elif level == ShellModel.ZOOM_MESH:
+ self._mesh_box.suspend()
+
+ def _activate_view(self, level):
+ if level == ShellModel.ZOOM_HOME:
+ self._home_box.resume()
+ elif level == ShellModel.ZOOM_MESH:
+ self._mesh_box.resume()
+
+ def _visibility_notify_event_cb(self, window, event):
+ if event.state == gtk.gdk.VISIBILITY_FULLY_OBSCURED:
+ self._deactivate_view()
+ else:
+ self._activate_view()
+
+ def __zoom_level_changed_cb(self, **kwargs):
+ old_level = kwargs['old_level']
+ new_level = kwargs['new_level']
+
+ self._deactivate_view(old_level)
+ self._activate_view(new_level)
+
+ if old_level != ShellModel.ZOOM_ACTIVITY and \
+ new_level != ShellModel.ZOOM_ACTIVITY:
+ self.remove(self.get_child())
+ self.add(self._transition_box)
+ self._transition_box.show()
+
+ if new_level == ShellModel.ZOOM_HOME:
+ end_size = style.XLARGE_ICON_SIZE
+ elif new_level == ShellModel.ZOOM_GROUP:
+ end_size = style.LARGE_ICON_SIZE
+ elif new_level == ShellModel.ZOOM_MESH:
+ end_size = style.STANDARD_ICON_SIZE
+
+ if old_level == ShellModel.ZOOM_HOME:
+ start_size = style.XLARGE_ICON_SIZE
+ elif old_level == ShellModel.ZOOM_GROUP:
+ start_size = style.LARGE_ICON_SIZE
+ elif old_level == ShellModel.ZOOM_MESH:
+ start_size = style.STANDARD_ICON_SIZE
+
+ self._transition_box.start_transition(start_size, end_size)
+ else:
+ self._update_view(new_level)
+
+ def _transition_completed_cb(self, transition_box):
+ self._update_view(shell.get_model().zoom_level)
+
+ def _update_view(self, level):
+ if level == ShellModel.ZOOM_ACTIVITY:
+ return
+
+ current_child = self.get_child()
+ self.remove(current_child)
+
+ if level == ShellModel.ZOOM_HOME:
+ self.add(self._home_box)
+ self._home_box.show()
+ self._home_box.focus_search_entry()
+ elif level == ShellModel.ZOOM_GROUP:
+ self.add(self._group_box)
+ self._group_box.show()
+ elif level == ShellModel.ZOOM_MESH:
+ self.add(self._mesh_box)
+ self._mesh_box.show()
+ self._mesh_box.focus_search_entry()
+
+ def get_home_box(self):
+ return self._home_box
diff --git a/src/hardware/keydialog.py b/src/jarabe/desktop/keydialog.py
index 92f6776..f5995e6 100644
--- a/src/hardware/keydialog.py
+++ b/src/jarabe/desktop/keydialog.py
@@ -1,5 +1,3 @@
-# vi: ts=4 ai noet
-#
# Copyright (C) 2006-2007 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -20,35 +18,13 @@ import md5
from gettext import gettext as _
import gtk
+import dbus
+
+from jarabe.model import network
+from jarabe.model.network import Secrets
-IW_AUTH_ALG_OPEN_SYSTEM = 0x00000001
-IW_AUTH_ALG_SHARED_KEY = 0x00000002
-
-IW_AUTH_WPA_VERSION_DISABLED = 0x00000001
-IW_AUTH_WPA_VERSION_WPA = 0x00000002
-IW_AUTH_WPA_VERSION_WPA2 = 0x00000004
-
-NM_802_11_CAP_NONE = 0x00000000
-NM_802_11_CAP_PROTO_NONE = 0x00000001
-NM_802_11_CAP_PROTO_WEP = 0x00000002
-NM_802_11_CAP_PROTO_WPA = 0x00000004
-NM_802_11_CAP_PROTO_WPA2 = 0x00000008
-NM_802_11_CAP_KEY_MGMT_PSK = 0x00000040
-NM_802_11_CAP_KEY_MGMT_802_1X = 0x00000080
-NM_802_11_CAP_CIPHER_WEP40 = 0x00001000
-NM_802_11_CAP_CIPHER_WEP104 = 0x00002000
-NM_802_11_CAP_CIPHER_TKIP = 0x00004000
-NM_802_11_CAP_CIPHER_CCMP = 0x00008000
-
-NM_AUTH_TYPE_WPA_PSK_AUTO = 0x00000000
-IW_AUTH_CIPHER_NONE = 0x00000001
-IW_AUTH_CIPHER_WEP40 = 0x00000002
-IW_AUTH_CIPHER_TKIP = 0x00000004
-IW_AUTH_CIPHER_CCMP = 0x00000008
-IW_AUTH_CIPHER_WEP104 = 0x00000010
-
-IW_AUTH_KEY_MGMT_802_1X = 0x1
-IW_AUTH_KEY_MGMT_PSK = 0x2
+IW_AUTH_ALG_OPEN_SYSTEM = 'open'
+IW_AUTH_ALG_SHARED_KEY = 'shared'
def string_is_hex(key):
is_hex = True
@@ -80,20 +56,28 @@ def hash_passphrase(passphrase):
passphrase = md5.new(passphrase).digest()
return string_to_hex(passphrase)[:26]
+class CanceledKeyRequestError(dbus.DBusException):
+ def __init__(self):
+ dbus.DBusException.__init__(self)
+ self._dbus_error_name = network.NM_SETTINGS_IFACE + '.CanceledError'
+
class KeyDialog(gtk.Dialog):
- def __init__(self, net, async_cb, async_err_cb):
+ def __init__(self, ssid, flags, wpa_flags, rsn_flags, dev_caps, response):
gtk.Dialog.__init__(self, flags=gtk.DIALOG_MODAL)
self.set_title("Wireless Key Required")
- self._net = net
- self._async_cb = async_cb
- self._async_err_cb = async_err_cb
+ self._response = response
self._entry = None
+ self._ssid = ssid
+ self._flags = flags
+ self._wpa_flags = wpa_flags
+ self._rsn_flags = rsn_flags
+ self._dev_caps = dev_caps
self.set_has_separator(False)
label = gtk.Label("A wireless encryption key is required for\n" \
- " the wireless network '%s'." % net.get_ssid())
+ " the wireless network '%s'." % self._ssid)
self.vbox.pack_start(label)
self.add_buttons(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
@@ -103,7 +87,6 @@ class KeyDialog(gtk.Dialog):
def add_key_entry(self):
self._entry = gtk.Entry()
- #self._entry.props.visibility = False
self._entry.connect('changed', self._update_response_sensitivity)
self._entry.connect('activate', self._entry_activate_cb)
self.vbox.pack_start(self._entry)
@@ -119,19 +102,17 @@ class KeyDialog(gtk.Dialog):
def create_security(self):
raise NotImplementedError
- def get_network(self):
- return self._net
-
- def get_callbacks(self):
- return (self._async_cb, self._async_err_cb)
+ def get_response_object(self):
+ return self._response
WEP_PASSPHRASE = 1
WEP_HEX = 2
WEP_ASCII = 3
class WEPKeyDialog(KeyDialog):
- def __init__(self, net, async_cb, async_err_cb):
- KeyDialog.__init__(self, net, async_cb, async_err_cb)
+ def __init__(self, ssid, flags, wpa_flags, rsn_flags, dev_caps, response):
+ KeyDialog.__init__(self, ssid, flags, wpa_flags, rsn_flags,
+ dev_caps, response)
# WEP key type
self.key_store = gtk.ListStore(str, int)
@@ -156,7 +137,7 @@ class WEPKeyDialog(KeyDialog):
self.add_key_entry()
# WEP authentication mode
- self.auth_store = gtk.ListStore(str, int)
+ self.auth_store = gtk.ListStore(str, str)
self.auth_store.append(["Open System", IW_AUTH_ALG_OPEN_SYSTEM])
self.auth_store.append(["Shared Key", IW_AUTH_ALG_SHARED_KEY])
@@ -190,24 +171,19 @@ class WEPKeyDialog(KeyDialog):
it = self.auth_combo.get_active_iter()
(auth_alg, ) = self.auth_store.get(it, 1)
- we_cipher = None
- if len(key) == 26:
- we_cipher = IW_AUTH_CIPHER_WEP104
- elif len(key) == 10:
- we_cipher = IW_AUTH_CIPHER_WEP40
-
- return (we_cipher, key, auth_alg)
+ return (key, auth_alg)
def print_security(self):
- (we_cipher, key, auth_alg) = self._get_security()
- print "Cipher: %d" % we_cipher
+ (key, auth_alg) = self._get_security()
print "Key: %s" % key
print "Auth: %d" % auth_alg
def create_security(self):
- (we_cipher, key, auth_alg) = self._get_security()
- from nminfo import Security
- return Security.new_from_args(we_cipher, (key, auth_alg))
+ (key, auth_alg) = self._get_security()
+ secrets = Secrets()
+ secrets.wep_key = key
+ secrets.auth_alg = auth_alg
+ return secrets
def _update_response_sensitivity(self, ignored=None):
key = self._entry.get_text()
@@ -230,16 +206,13 @@ class WEPKeyDialog(KeyDialog):
self.set_response_sensitive(gtk.RESPONSE_OK, valid)
class WPAKeyDialog(KeyDialog):
- def __init__(self, net, async_cb, async_err_cb):
- KeyDialog.__init__(self, net, async_cb, async_err_cb)
+ def __init__(self, ssid, flags, wpa_flags, rsn_flags, dev_caps, response):
+ KeyDialog.__init__(self, ssid, flags, wpa_flags, rsn_flags,
+ dev_caps, response)
self.add_key_entry()
- self.store = gtk.ListStore(str, int)
- self.store.append(["Automatic", NM_AUTH_TYPE_WPA_PSK_AUTO])
- if net.get_caps() & NM_802_11_CAP_CIPHER_CCMP:
- self.store.append(["AES-CCMP", IW_AUTH_CIPHER_CCMP])
- if net.get_caps() & NM_802_11_CAP_CIPHER_TKIP:
- self.store.append(["TKIP", IW_AUTH_CIPHER_TKIP])
+ self.store = gtk.ListStore(str)
+ self.store.append([_("WPA & WPA2 Personal")])
self.combo = gtk.ComboBox(self.store)
cell = gtk.CellRendererText()
@@ -248,14 +221,14 @@ class WPAKeyDialog(KeyDialog):
self.combo.set_active(0)
self.hbox = gtk.HBox()
- self.hbox.pack_start(gtk.Label(_("Encryption Type:")))
+ self.hbox.pack_start(gtk.Label(_("Wireless Security:")))
self.hbox.pack_start(self.combo)
self.hbox.show_all()
self.vbox.pack_start(self.hbox)
def _get_security(self):
- ssid = self.get_network().get_ssid()
+ ssid = self._ssid
key = self._entry.get_text()
is_hex = string_is_hex(key)
@@ -265,42 +238,29 @@ class WPAKeyDialog(KeyDialog):
real_key = key
elif len(key) >= 8 and len(key) <= 63:
# passphrase
- import commands
- command = "/usr/sbin/wpa_passphrase '%s' '%s'" % (ssid, key)
- (s, o) = commands.getstatusoutput(command)
- if s != 0:
- raise RuntimeError("Error hashing passphrase: %s" % o)
- lines = o.split("\n")
- for line in lines:
+ from subprocess import Popen, PIPE
+ p = Popen(['/usr/sbin/wpa_passphrase', ssid, key], stdout=PIPE)
+ for line in p.stdout:
if line.strip().startswith("psk="):
real_key = line.strip()[4:]
+ if p.wait() != 0:
+ raise RuntimeError("Error hashing passphrase")
if real_key and len(real_key) != 64:
real_key = None
if not real_key:
raise RuntimeError("Invalid key")
- it = self.combo.get_active_iter()
- (we_cipher, ) = self.store.get(it, 1)
-
- wpa_ver = IW_AUTH_WPA_VERSION_WPA
- caps = self.get_network().get_caps()
- if caps & NM_802_11_CAP_PROTO_WPA2:
- wpa_ver = IW_AUTH_WPA_VERSION_WPA2
-
- return (we_cipher, real_key, wpa_ver)
+ return real_key
def print_security(self):
- (we_cipher, key, wpa_ver) = self._get_security()
- print "Cipher: %d" % we_cipher
+ key = self._get_security()
print "Key: %s" % key
- print "WPA Ver: %d" % wpa_ver
def create_security(self):
- (we_cipher, key, wpa_ver) = self._get_security()
- from nminfo import Security
- return Security.new_from_args(we_cipher,
- (key, wpa_ver, IW_AUTH_KEY_MGMT_PSK))
+ secrets = Secrets()
+ secrets.psk = self._get_security()
+ return secrets
def _update_response_sensitivity(self, ignored=None):
key = self._entry.get_text()
@@ -316,41 +276,37 @@ class WPAKeyDialog(KeyDialog):
self.set_response_sensitive(gtk.RESPONSE_OK, valid)
return False
-def new_key_dialog(net, async_cb, async_err_cb):
- caps = net.get_caps()
- if (caps & NM_802_11_CAP_CIPHER_TKIP or caps & NM_802_11_CAP_CIPHER_CCMP) \
- and (caps & NM_802_11_CAP_PROTO_WPA or \
- caps & NM_802_11_CAP_PROTO_WPA2):
- return WPAKeyDialog(net, async_cb, async_err_cb)
- elif (caps & NM_802_11_CAP_CIPHER_WEP40 or \
- caps & NM_802_11_CAP_CIPHER_WEP104) and \
- (caps & NM_802_11_CAP_PROTO_WEP):
- return WEPKeyDialog(net, async_cb, async_err_cb)
+def create(ssid, flags, wpa_flags, rsn_flags, dev_caps, response):
+ if wpa_flags == network.NM_802_11_AP_SEC_NONE and \
+ rsn_flags == network.NM_802_11_AP_SEC_NONE:
+ key_dialog = WEPKeyDialog(ssid, flags, wpa_flags, rsn_flags,
+ dev_caps, response)
else:
- raise RuntimeError("Unhandled network capabilities %x" % caps)
-
+ key_dialog = WPAKeyDialog(ssid, flags, wpa_flags, rsn_flags,
+ dev_caps, response)
+ key_dialog.connect("response", _key_dialog_response_cb)
+ key_dialog.connect("destroy", _key_dialog_destroy_cb)
+ key_dialog.show_all()
-class FakeNet(object):
- def get_ssid(self):
- return "olpcwpa"
+def _key_dialog_destroy_cb(key_dialog, data=None):
+ _key_dialog_response_cb(key_dialog, gtk.RESPONSE_CANCEL)
- def get_caps(self):
- return NM_802_11_CAP_CIPHER_CCMP | NM_802_11_CAP_CIPHER_TKIP | \
- NM_802_11_CAP_PROTO_WPA
-
-def response_cb(widget, response_id):
+def _key_dialog_response_cb(key_dialog, response_id):
+ response = key_dialog.get_response_object()
+ secrets = None
if response_id == gtk.RESPONSE_OK:
- print dialog.print_security()
+ secrets = key_dialog.create_security()
+
+ if response_id in [gtk.RESPONSE_CANCEL, gtk.RESPONSE_NONE]:
+ # key dialog dialog was canceled; send the error back to NM
+ response.set_error(CanceledKeyRequestError())
+ elif response_id == gtk.RESPONSE_OK:
+ if not secrets:
+ raise RuntimeError("Invalid security arguments.")
+ response.set_secrets(secrets)
else:
- print "canceled"
- widget.hide()
- widget.destroy()
-
+ raise RuntimeError("Unhandled key dialog response %d" % response_id)
-if __name__ == "__main__":
- fake_net = FakeNet()
- dialog = new_key_dialog(fake_net, None, None)
- dialog.connect("response", response_cb)
- dialog.run()
+ key_dialog.destroy()
diff --git a/src/jarabe/desktop/meshbox.py b/src/jarabe/desktop/meshbox.py
new file mode 100644
index 0000000..e650ba7
--- /dev/null
+++ b/src/jarabe/desktop/meshbox.py
@@ -0,0 +1,860 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# 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 logging
+import sha
+
+import dbus
+import hippo
+import gobject
+import gtk
+
+from sugar.graphics.icon import CanvasIcon, Icon
+from sugar.graphics.xocolor import XoColor
+from sugar.graphics import xocolor
+from sugar.graphics import style
+from sugar.graphics.icon import get_icon_state
+from sugar.graphics import palette
+from sugar.graphics import iconentry
+from sugar.graphics.menuitem import MenuItem
+from sugar.activity.activityhandle import ActivityHandle
+from sugar.activity import activityfactory
+from sugar.util import unique_id
+
+from jarabe.model import neighborhood
+from jarabe.view.buddyicon import BuddyIcon
+from jarabe.view.pulsingicon import CanvasPulsingIcon
+from jarabe.desktop.snowflakelayout import SnowflakeLayout
+from jarabe.desktop.spreadlayout import SpreadLayout
+from jarabe.desktop import keydialog
+from jarabe.model import bundleregistry
+from jarabe.model import network
+from jarabe.model.network import Settings
+from jarabe.model.network import WirelessSecurity
+
+_NM_SERVICE = 'org.freedesktop.NetworkManager'
+_NM_IFACE = 'org.freedesktop.NetworkManager'
+_NM_PATH = '/org/freedesktop/NetworkManager'
+_NM_DEVICE_IFACE = 'org.freedesktop.NetworkManager.Device'
+_NM_WIRELESS_IFACE = 'org.freedesktop.NetworkManager.Device.Wireless'
+_NM_ACCESSPOINT_IFACE = 'org.freedesktop.NetworkManager.AccessPoint'
+_NM_ACTIVE_CONN_IFACE = 'org.freedesktop.NetworkManager.Connection.Active'
+
+_ICON_NAME = 'network-wireless'
+
+class AccessPointView(CanvasPulsingIcon):
+ def __init__(self, device, model):
+ CanvasPulsingIcon.__init__(self, size=style.STANDARD_ICON_SIZE,
+ cache=True)
+ self._bus = dbus.SystemBus()
+ self._device = device
+ self._model = model
+ self._palette_icon = None
+ self._disconnect_item = None
+ self._connect_item = None
+ self._greyed_out = False
+ self._name = ''
+ self._strength = 0
+ self._flags = 0
+ self._wpa_flags = 0
+ self._rsn_flags = 0
+ self._mode = 0
+ self._device_caps = 0
+ self._device_state = None
+ self._connection = None
+ self._active = True
+ self._color = None
+
+ self.connect('activated', self._activate_cb)
+
+ pulse_color = XoColor('%s,%s' % (style.COLOR_BUTTON_GREY.get_svg(),
+ style.COLOR_TRANSPARENT.get_svg()))
+ self.props.pulse_color = pulse_color
+
+ self._palette = self._create_palette()
+ self.set_palette(self._palette)
+
+ model_props = dbus.Interface(model, 'org.freedesktop.DBus.Properties')
+ model_props.GetAll(_NM_ACCESSPOINT_IFACE, byte_arrays=True,
+ reply_handler=self.__get_all_props_reply_cb,
+ error_handler=self.__get_all_props_error_cb)
+
+ self._bus.add_signal_receiver(self.__ap_properties_changed_cb,
+ signal_name='PropertiesChanged',
+ path=model.object_path,
+ dbus_interface=_NM_ACCESSPOINT_IFACE,
+ byte_arrays=True)
+
+ self._device.Get(_NM_DEVICE_IFACE, 'State',
+ reply_handler=self.__get_device_state_reply_cb,
+ error_handler=self.__get_device_state_error_cb)
+ self._device.Get(_NM_WIRELESS_IFACE, 'WirelessCapabilities',
+ reply_handler=self.__get_device_caps_reply_cb,
+ error_handler=self.__get_device_caps_error_cb)
+ self._device.Get(_NM_WIRELESS_IFACE, 'ActiveAccessPoint',
+ reply_handler=self.__get_active_ap_reply_cb,
+ error_handler=self.__get_active_ap_error_cb)
+
+ self._bus.add_signal_receiver(self.__device_state_changed_cb,
+ signal_name='StateChanged',
+ path=device.object_path,
+ dbus_interface=_NM_DEVICE_IFACE)
+ self._bus.add_signal_receiver(self.__wireless_properties_changed_cb,
+ signal_name='PropertiesChanged',
+ path=device.object_path,
+ dbus_interface=_NM_WIRELESS_IFACE)
+
+ def _create_palette(self):
+ icon_name = get_icon_state(_ICON_NAME, self._strength)
+ self._palette_icon = Icon(icon_name=icon_name,
+ icon_size=style.STANDARD_ICON_SIZE,
+ badge_name=self.props.badge_name)
+
+ p = palette.Palette(primary_text=self._name,
+ icon=self._palette_icon)
+
+ self._connect_item = MenuItem(_('Connect'), 'dialog-ok')
+ self._connect_item.connect('activate', self._activate_cb)
+ p.menu.append(self._connect_item)
+
+ self._disconnect_item = MenuItem(_('Disconnect'), 'media-eject')
+ self._disconnect_item.connect('activate',
+ self._disconnect_activate_cb)
+ p.menu.append(self._disconnect_item)
+
+ return p
+
+ def __device_state_changed_cb(self, new_state, old_state, reason):
+ self._device_state = new_state
+ self._update_state()
+
+ def __ap_properties_changed_cb(self, properties):
+ self._update_properties(properties)
+
+ def __wireless_properties_changed_cb(self, properties):
+ if 'ActiveAccessPoint' in properties:
+ ap = properties['ActiveAccessPoint']
+ self._active = (ap == self._model.object_path)
+ self._update_state()
+
+ def _update_properties(self, properties):
+ if 'Ssid' in properties:
+ self._name = properties['Ssid']
+ if 'Strength' in properties:
+ self._strength = properties['Strength']
+ if 'Flags' in properties:
+ self._flags = properties['Flags']
+ if 'WpaFlags' in properties:
+ self._wpa_flags = properties['WpaFlags']
+ if 'RsnFlags' in properties:
+ self._rsn_flags = properties['RsnFlags']
+ if 'Mode' in properties:
+ self._mode = properties['Mode']
+
+ sh = sha.new()
+ data = self._name + hex(self._flags)
+ sh.update(data)
+ h = hash(sh.digest())
+ idx = h % len(xocolor.colors)
+
+ self._color = XoColor('%s,%s' % (xocolor.colors[idx][0],
+ xocolor.colors[idx][1]))
+
+ self._update()
+
+ def __get_active_ap_reply_cb(self, ap):
+ self._active = (ap == self._model.object_path)
+ self._update_state()
+
+ def __get_active_ap_error_cb(self, err):
+ logging.debug('Error getting the active access point: %s', err)
+
+ def __get_device_caps_reply_cb(self, caps):
+ self._device_caps = caps
+
+ def __get_device_caps_error_cb(self, err):
+ logging.debug('Error getting the wireless device properties: %s', err)
+
+ def __get_device_state_reply_cb(self, state):
+ self._device_state = state
+ self._update()
+
+ def __get_device_state_error_cb(self, err):
+ logging.debug('Error getting the access point properties: %s', err)
+
+ def __get_all_props_reply_cb(self, properties):
+ self._update_properties(properties)
+
+ def __get_all_props_error_cb(self, err):
+ logging.debug('Error getting the access point properties: %s', err)
+
+ def _update(self):
+ if self._flags == network.NM_802_11_AP_FLAGS_PRIVACY:
+ self.props.badge_name = "emblem-locked"
+ self._palette_icon.props.badge_name = "emblem-locked"
+ else:
+ self.props.badge_name = None
+ self._palette_icon.props.badge_name = None
+
+ self._palette.props.primary_text = self._name
+
+ self._update_state()
+ self._update_color()
+
+ def _update_state(self):
+ if self._active:
+ state = self._device_state
+ else:
+ state = network.DEVICE_STATE_UNKNOWN
+
+ if state == network.DEVICE_STATE_ACTIVATED:
+ icon_name = '%s-connected' % _ICON_NAME
+ else:
+ icon_name = _ICON_NAME
+
+ icon_name = get_icon_state(icon_name, self._strength)
+ if icon_name:
+ self.props.icon_name = icon_name
+ icon = self._palette.props.icon
+ icon.props.icon_name = icon_name
+
+ if state == network.DEVICE_STATE_PREPARE or \
+ state == network.DEVICE_STATE_CONFIG or \
+ state == network.DEVICE_STATE_NEED_AUTH or \
+ state == network.DEVICE_STATE_IP_CONFIG:
+ if self._disconnect_item:
+ self._disconnect_item.show()
+ self._connect_item.hide()
+ self._palette.props.secondary_text = _('Connecting...')
+ self.props.pulsing = True
+ elif state == network.DEVICE_STATE_ACTIVATED:
+ if self._disconnect_item:
+ self._disconnect_item.show()
+ self._connect_item.hide()
+ self._palette.props.secondary_text = _('Connected')
+ self.props.pulsing = False
+ else:
+ if self._disconnect_item:
+ self._disconnect_item.hide()
+ self._connect_item.show()
+ self._palette.props.secondary_text = None
+ self.props.pulsing = False
+
+ def _update_color(self):
+ if self._greyed_out:
+ self.props.pulsing = False
+ self.props.base_color = XoColor('#D5D5D5,#D5D5D5')
+ else:
+ self.props.base_color = self._color
+
+ self._palette_icon.props.xo_color = self._color
+
+ def _disconnect_activate_cb(self, item):
+ pass
+
+
+ def _add_ciphers_from_flags(self, flags, pairwise):
+ ciphers = []
+ if pairwise:
+ if flags & network.NM_802_11_AP_SEC_PAIR_TKIP:
+ ciphers.append("tkip")
+ if flags & network.NM_802_11_AP_SEC_PAIR_CCMP:
+ ciphers.append("ccmp")
+ else:
+ if flags & network.NM_802_11_AP_SEC_GROUP_WEP40:
+ ciphers.append("wep40")
+ if flags & network.NM_802_11_AP_SEC_GROUP_WEP104:
+ ciphers.append("wep104")
+ if flags & network.NM_802_11_AP_SEC_GROUP_TKIP:
+ ciphers.append("tkip")
+ if flags & network.NM_802_11_AP_SEC_GROUP_CCMP:
+ ciphers.append("ccmp")
+ return ciphers
+
+ def _get_security(self):
+ if not (self._flags & network.NM_802_11_AP_FLAGS_PRIVACY) and \
+ (self._wpa_flags == network.NM_802_11_AP_SEC_NONE) and \
+ (self._rsn_flags == network.NM_802_11_AP_SEC_NONE):
+ # No security
+ return None
+
+ if (self._flags & network.NM_802_11_AP_FLAGS_PRIVACY) and \
+ (self._wpa_flags == network.NM_802_11_AP_SEC_NONE) and \
+ (self._rsn_flags == network.NM_802_11_AP_SEC_NONE):
+ # Static WEP, Dynamic WEP, or LEAP
+ wireless_security = WirelessSecurity()
+ wireless_security.key_mgmt = 'none'
+ return wireless_security
+
+ if (self._mode != network.NM_802_11_MODE_INFRA):
+ # Stuff after this point requires infrastructure
+ logging.error('The infrastructure mode is not supoorted'
+ ' by your wireless device.')
+ return None
+
+ if (self._rsn_flags & network.NM_802_11_AP_SEC_KEY_MGMT_PSK) and \
+ (self._device_caps & network.NM_802_11_DEVICE_CAP_RSN):
+ # WPA2 PSK first
+ pairwise = self._add_ciphers_from_flags(self._rsn_flags, True)
+ group = self._add_ciphers_from_flags(self._rsn_flags, False)
+ wireless_security = WirelessSecurity()
+ wireless_security.key_mgmt = 'wpa-psk'
+ wireless_security.proto = 'rsn'
+ wireless_security.pairwise = pairwise
+ wireless_security.group = group
+ return wireless_security
+
+ if (self._wpa_flags & network.NM_802_11_AP_SEC_KEY_MGMT_PSK) and \
+ (self._device_caps & network.NM_802_11_DEVICE_CAP_WPA):
+ # WPA PSK
+ pairwise = self._add_ciphers_from_flags(self._wpa_flags, True)
+ group = self._add_ciphers_from_flags(self._wpa_flags, False)
+ wireless_security = WirelessSecurity()
+ wireless_security.key_mgmt = 'wpa-psk'
+ wireless_security.proto = 'wpa'
+ wireless_security.pairwise = pairwise
+ wireless_security.group = group
+ return wireless_security
+
+ def _activate_cb(self, icon):
+ connection = network.find_connection(self._name)
+ if connection is None:
+ settings = Settings()
+ settings.connection.id = 'Auto ' + self._name
+ settings.connection.uuid = unique_id()
+ settings.connection.type = '802-11-wireless'
+ settings.wireless.ssid = self._name
+
+ wireless_security = self._get_security()
+ settings.wireless_security = wireless_security
+
+ connection = network.add_connection(self._name, settings)
+
+ if wireless_security is None:
+ self._connection = connection
+
+ obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
+ netmgr = dbus.Interface(obj, _NM_IFACE)
+
+ netmgr.ActivateConnection(network.SETTINGS_SERVICE, connection.path,
+ self._device.object_path,
+ self._model.object_path,
+ reply_handler=self.__activate_reply_cb,
+ error_handler=self.__activate_error_cb)
+
+ def __activate_reply_cb(self, connection):
+ if self._connection:
+ self._connection.save()
+ logging.debug('Connection activated: %s', connection)
+
+ def __activate_error_cb(self, err):
+ logging.debug('Failed to activate connection: %s', err)
+
+ def set_filter(self, query):
+ self._greyed_out = self._name.lower().find(query) == -1
+ self._update_state()
+ self._update_color()
+
+ def create_keydialog(self, response):
+ keydialog.create(self._name, self._flags, self._wpa_flags,
+ self._rsn_flags, self._device_caps, response)
+
+ def disconnect(self):
+ self._bus.remove_signal_receiver(self.__ap_properties_changed_cb,
+ signal_name='PropertiesChanged',
+ path=self._model.object_path,
+ dbus_interface=_NM_ACCESSPOINT_IFACE)
+
+ self._bus.remove_signal_receiver(self.__device_state_changed_cb,
+ signal_name='StateChanged',
+ path=self._device.object_path,
+ dbus_interface=_NM_DEVICE_IFACE)
+ self._bus.remove_signal_receiver(self.__wireless_properties_changed_cb,
+ signal_name='PropertiesChanged',
+ path=self._device.object_path,
+ dbus_interface=_NM_WIRELESS_IFACE)
+
+class ActivityView(hippo.CanvasBox):
+ def __init__(self, model):
+ hippo.CanvasBox.__init__(self)
+
+ self._model = model
+ self._icons = {}
+ self._palette = None
+
+ self._layout = SnowflakeLayout()
+ self.set_layout(self._layout)
+
+ self._icon = self._create_icon()
+ self._layout.add(self._icon, center=True)
+
+ self._update_palette()
+
+ activity = self._model.activity
+ activity.connect('notify::name', self._name_changed_cb)
+ activity.connect('notify::color', self._color_changed_cb)
+ activity.connect('notify::private', self._private_changed_cb)
+ activity.connect('joined', self._joined_changed_cb)
+ #FIXME: 'joined' signal not working, see #5032
+
+ def _create_icon(self):
+ icon = CanvasIcon(file_name=self._model.get_icon_name(),
+ xo_color=self._model.get_color(), cache=True,
+ size=style.STANDARD_ICON_SIZE)
+ icon.connect('activated', self._clicked_cb)
+ return icon
+
+ def _create_palette(self):
+ p_icon = Icon(file=self._model.get_icon_name(),
+ xo_color=self._model.get_color())
+ p_icon.props.icon_size = gtk.ICON_SIZE_LARGE_TOOLBAR
+ p = palette.Palette(None, primary_text=self._model.activity.props.name,
+ icon=p_icon)
+
+ private = self._model.activity.props.private
+ joined = self._model.activity.props.joined
+
+ if joined:
+ item = MenuItem(_('Resume'), 'activity-start')
+ item.connect('activate', self._clicked_cb)
+ item.show()
+ p.menu.append(item)
+ elif not private:
+ item = MenuItem(_('Join'), 'activity-start')
+ item.connect('activate', self._clicked_cb)
+ item.show()
+ p.menu.append(item)
+
+ return p
+
+ def _update_palette(self):
+ self._palette = self._create_palette()
+ self._icon.set_palette(self._palette)
+
+ def has_buddy_icon(self, key):
+ return self._icons.has_key(key)
+
+ def add_buddy_icon(self, key, icon):
+ self._icons[key] = icon
+ self._layout.add(icon)
+
+ def remove_buddy_icon(self, key):
+ icon = self._icons[key]
+ del self._icons[key]
+ icon.destroy()
+
+ def _clicked_cb(self, item):
+ bundle_id = self._model.get_bundle_id()
+
+ handle = ActivityHandle(self._model.get_id())
+
+ bundle = bundleregistry.get_registry().get_bundle(bundle_id)
+ activityfactory.create(bundle, handle)
+
+ def set_filter(self, query):
+ text_to_check = self._model.activity.props.name.lower() + \
+ self._model.activity.props.type.lower()
+ if text_to_check.find(query) == -1:
+ self._icon.props.stroke_color = '#D5D5D5'
+ self._icon.props.fill_color = style.COLOR_TRANSPARENT.get_svg()
+ else:
+ self._icon.props.xo_color = self._model.get_color()
+
+ for icon in self._icons.itervalues():
+ if hasattr(icon, 'set_filter'):
+ icon.set_filter(query)
+
+ def _name_changed_cb(self, activity, pspec):
+ self._update_palette()
+
+ def _color_changed_cb(self, activity, pspec):
+ self._layout.remove(self._icon)
+ self._icon = self._create_icon()
+ self._layout.add(self._icon, center=True)
+ self._icon.set_palette(self._palette)
+
+ def _private_changed_cb(self, activity, pspec):
+ self._update_palette()
+
+ def _joined_changed_cb(self, widget, event):
+ logging.debug('ActivityView._joined_changed_cb')
+
+_AUTOSEARCH_TIMEOUT = 1000
+
+class MeshToolbar(gtk.Toolbar):
+ __gtype_name__ = 'MeshToolbar'
+
+ __gsignals__ = {
+ 'query-changed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([str]))
+ }
+
+ def __init__(self):
+ gtk.Toolbar.__init__(self)
+
+ self._query = None
+ self._autosearch_timer = None
+
+ self._add_separator()
+
+ tool_item = gtk.ToolItem()
+ self.insert(tool_item, -1)
+ tool_item.show()
+
+ self.search_entry = iconentry.IconEntry()
+ self.search_entry.set_icon_from_name(iconentry.ICON_ENTRY_PRIMARY,
+ 'system-search')
+ self.search_entry.add_clear_button()
+ self.search_entry.set_width_chars(25)
+ self.search_entry.connect('activate', self._entry_activated_cb)
+ self.search_entry.connect('changed', self._entry_changed_cb)
+ tool_item.add(self.search_entry)
+ self.search_entry.show()
+
+ self._add_separator(expand=True)
+
+ def _add_separator(self, expand=False):
+ separator = gtk.SeparatorToolItem()
+ separator.props.draw = False
+ if expand:
+ separator.set_expand(True)
+ else:
+ separator.set_size_request(style.GRID_CELL_SIZE,
+ style.GRID_CELL_SIZE)
+ self.insert(separator, -1)
+ separator.show()
+
+ def _entry_activated_cb(self, entry):
+ if self._autosearch_timer:
+ gobject.source_remove(self._autosearch_timer)
+ new_query = entry.props.text
+ if self._query != new_query:
+ self._query = new_query
+ self.emit('query-changed', self._query)
+
+ def _entry_changed_cb(self, entry):
+ if not entry.props.text:
+ entry.activate()
+ return
+
+ if self._autosearch_timer:
+ gobject.source_remove(self._autosearch_timer)
+ self._autosearch_timer = gobject.timeout_add(_AUTOSEARCH_TIMEOUT,
+ self._autosearch_timer_cb)
+
+ def _autosearch_timer_cb(self):
+ logging.debug('_autosearch_timer_cb')
+ self._autosearch_timer = None
+ self.search_entry.activate()
+ return False
+
+class DeviceObserver(object):
+ def __init__(self, box, device):
+ self._box = box
+ self._bus = dbus.SystemBus()
+ self._device = device
+
+ wireless = dbus.Interface(self._device, _NM_WIRELESS_IFACE)
+ wireless.GetAccessPoints(reply_handler=self._get_access_points_reply_cb,
+ error_handler=self._get_access_points_error_cb)
+
+ self._bus.add_signal_receiver(self.__access_point_added_cb,
+ signal_name='AccessPointAdded',
+ path=device.object_path,
+ dbus_interface=_NM_WIRELESS_IFACE)
+ self._bus.add_signal_receiver(self.__access_point_removed_cb,
+ signal_name='AccessPointRemoved',
+ path=device.object_path,
+ dbus_interface=_NM_WIRELESS_IFACE)
+
+ def _get_access_points_reply_cb(self, access_points_o):
+ for ap_o in access_points_o:
+ ap = self._bus.get_object(_NM_SERVICE, ap_o)
+ self._box.add_access_point(self._device, ap)
+
+ def _get_access_points_error_cb(self, err):
+ logging.error('Failed to get access points: %s', err)
+
+ def __access_point_added_cb(self, access_point_o):
+ ap = self._bus.get_object(_NM_SERVICE, access_point_o)
+ self._box.add_access_point(self._device, ap)
+
+ def __access_point_removed_cb(self, access_point_o):
+ self._box.remove_access_point(access_point_o)
+
+ def disconnect(self):
+ self._bus.remove_signal_receiver(self.__access_point_added_cb,
+ signal_name='AccessPointAdded',
+ path=self._device.object_path,
+ dbus_interface=_NM_WIRELESS_IFACE)
+ self._bus.remove_signal_receiver(self.__access_point_removed_cb,
+ signal_name='AccessPointRemoved',
+ path=self._device.object_path,
+ dbus_interface=_NM_WIRELESS_IFACE)
+
+class NetworkManagerObserver(object):
+ def __init__(self, box):
+ self._box = box
+ self._bus = dbus.SystemBus()
+ self._devices = {}
+ self._netmgr = None
+
+ def listen(self):
+ try:
+ obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
+ self._netmgr = dbus.Interface(obj, _NM_IFACE)
+ except dbus.DBusException:
+ logging.debug('%s service not available', _NM_SERVICE)
+ return
+
+ self._netmgr.GetDevices(reply_handler=self.__get_devices_reply_cb,
+ error_handler=self.__get_devices_error_cb)
+
+ self._bus.add_signal_receiver(self.__device_added_cb,
+ signal_name='DeviceAdded',
+ dbus_interface=_NM_IFACE)
+ self._bus.add_signal_receiver(self.__device_removed_cb,
+ signal_name='DeviceRemoved',
+ dbus_interface=_NM_IFACE)
+
+ settings = network.get_settings()
+ if settings is not None:
+ settings.secrets_request.connect(self.__secrets_request_cb)
+
+ def __secrets_request_cb(self, **kwargs):
+ # FIXME It would be better to do all of this async, but I cannot think
+ # of a good way to. NM could really use some love here.
+
+ netmgr_props = dbus.Interface(
+ self._netmgr, 'org.freedesktop.DBus.Properties')
+ active_connections_o = netmgr_props.Get(_NM_IFACE, 'ActiveConnections')
+
+ for conn_o in active_connections_o:
+ obj = self._bus.get_object(_NM_IFACE, conn_o)
+ props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
+ state = props.Get(_NM_ACTIVE_CONN_IFACE, 'State')
+ if state == network.NM_ACTIVE_CONNECTION_STATE_ACTIVATING:
+ ap_o = props.Get(_NM_ACTIVE_CONN_IFACE, 'SpecificObject')
+ if ap_o != '/':
+ ap_view = self._box.access_points[ap_o]
+ ap_view.create_keydialog(kwargs['response'])
+ else:
+ logging.error('Could not determine AP for'
+ ' specific object %s' % conn_o)
+
+ def __get_devices_reply_cb(self, devices_o):
+ for dev_o in devices_o:
+ self._check_device(dev_o)
+
+ def __get_devices_error_cb(self, err):
+ logging.error('Failed to get devices: %s', err)
+
+ def _check_device(self, device_o):
+ device = self._bus.get_object(_NM_SERVICE, device_o)
+ props = dbus.Interface(device, 'org.freedesktop.DBus.Properties')
+
+ device_type = props.Get(_NM_DEVICE_IFACE, 'DeviceType')
+ if device_type == network.DEVICE_TYPE_802_11_WIRELESS:
+ self._devices[device_o] = DeviceObserver(self._box, device)
+
+ def _get_device_path_error_cb(self, err):
+ logging.error('Failed to get device type: %s', err)
+
+ def __device_added_cb(self, device_o):
+ self._check_device(device_o)
+
+ def __device_removed_cb(self, device_o):
+ if device_o in self._devices:
+ observer = self._devices[device_o]
+ observer.disconnect()
+ del self._devices[device_o]
+
+class MeshBox(gtk.VBox):
+ __gtype_name__ = 'SugarMeshBox'
+
+ def __init__(self):
+ logging.debug("STARTUP: Loading the mesh view")
+
+ gobject.GObject.__init__(self)
+
+ self.access_points = {}
+
+ self._model = neighborhood.get_model()
+ self._buddies = {}
+ self._activities = {}
+ self._mesh = {}
+ self._buddy_to_activity = {}
+ self._suspended = True
+ self._query = ''
+ self._owner_icon = None
+
+ self._toolbar = MeshToolbar()
+ self._toolbar.connect('query-changed', self._toolbar_query_changed_cb)
+ self.pack_start(self._toolbar, expand=False)
+ self._toolbar.show()
+
+ canvas = hippo.Canvas()
+ self.add(canvas)
+ canvas.show()
+
+ self._layout_box = hippo.CanvasBox( \
+ background_color=style.COLOR_WHITE.get_int())
+ canvas.set_root(self._layout_box)
+
+ self._layout = SpreadLayout()
+ self._layout_box.set_layout(self._layout)
+
+ for buddy_model in self._model.get_buddies():
+ self._add_alone_buddy(buddy_model)
+
+ self._model.connect('buddy-added', self._buddy_added_cb)
+ self._model.connect('buddy-removed', self._buddy_removed_cb)
+ self._model.connect('buddy-moved', self._buddy_moved_cb)
+
+ for activity_model in self._model.get_activities():
+ self._add_activity(activity_model)
+
+ self._model.connect('activity-added', self._activity_added_cb)
+ self._model.connect('activity-removed', self._activity_removed_cb)
+
+ netmgr_observer = NetworkManagerObserver(self)
+ netmgr_observer.listen()
+
+ def do_size_allocate(self, allocation):
+ width = allocation.width
+ height = allocation.height
+
+ min_w_, icon_width = self._owner_icon.get_width_request()
+ min_h_, icon_height = self._owner_icon.get_height_request(icon_width)
+ x = (width - icon_width) / 2
+ y = (height - icon_height) / 2 - style.GRID_CELL_SIZE
+ self._layout.move(self._owner_icon, x, y)
+
+ gtk.VBox.do_size_allocate(self, allocation)
+
+ def _buddy_added_cb(self, model, buddy_model):
+ self._add_alone_buddy(buddy_model)
+
+ def _buddy_removed_cb(self, model, buddy_model):
+ self._remove_buddy(buddy_model)
+
+ def _buddy_moved_cb(self, model, buddy_model, activity_model):
+ # Owner doesn't move from the center
+ if buddy_model.is_owner():
+ return
+ self._move_buddy(buddy_model, activity_model)
+
+ def _activity_added_cb(self, model, activity_model):
+ self._add_activity(activity_model)
+
+ def _activity_removed_cb(self, model, activity_model):
+ self._remove_activity(activity_model)
+
+ def _add_alone_buddy(self, buddy_model):
+ icon = BuddyIcon(buddy_model)
+ if buddy_model.is_owner():
+ self._owner_icon = icon
+ self._layout.add(icon)
+
+ if hasattr(icon, 'set_filter'):
+ icon.set_filter(self._query)
+
+ self._buddies[buddy_model.get_buddy().object_path()] = icon
+
+ def _remove_alone_buddy(self, buddy_model):
+ icon = self._buddies[buddy_model.get_buddy().object_path()]
+ self._layout.remove(icon)
+ del self._buddies[buddy_model.get_buddy().object_path()]
+ icon.destroy()
+
+ def _remove_buddy(self, buddy_model):
+ object_path = buddy_model.get_buddy().object_path()
+ if self._buddies.has_key(object_path):
+ self._remove_alone_buddy(buddy_model)
+ else:
+ for activity in self._activities.values():
+ if activity.has_buddy_icon(object_path):
+ activity.remove_buddy_icon(object_path)
+
+ def _move_buddy(self, buddy_model, activity_model):
+ self._remove_buddy(buddy_model)
+
+ if activity_model == None:
+ self._add_alone_buddy(buddy_model)
+ elif activity_model.get_id() in self._activities:
+ activity = self._activities[activity_model.get_id()]
+
+ icon = BuddyIcon(buddy_model, style.STANDARD_ICON_SIZE)
+ activity.add_buddy_icon(buddy_model.get_buddy().object_path(), icon)
+
+ if hasattr(icon, 'set_filter'):
+ icon.set_filter(self._query)
+
+ def _add_activity(self, activity_model):
+ icon = ActivityView(activity_model)
+ self._layout.add(icon)
+
+ if hasattr(icon, 'set_filter'):
+ icon.set_filter(self._query)
+
+ self._activities[activity_model.get_id()] = icon
+
+ def _remove_activity(self, activity_model):
+ icon = self._activities[activity_model.get_id()]
+ self._layout.remove(icon)
+ del self._activities[activity_model.get_id()]
+ icon.destroy()
+
+ def add_access_point(self, device, ap):
+ icon = AccessPointView(device, ap)
+ self._layout.add(icon)
+
+ if hasattr(icon, 'set_filter'):
+ icon.set_filter(self._query)
+
+ self.access_points[ap.object_path] = icon
+
+ def remove_access_point(self, ap_o):
+ if ap_o in self.access_points:
+ icon = self.access_points[ap_o]
+ icon.disconnect()
+ self._layout.remove(icon)
+ del self.access_points[ap_o]
+ else:
+ logging.error('Can not remove access point %s' % ap_o)
+
+ def suspend(self):
+ if not self._suspended:
+ self._suspended = True
+ for ap in self.access_points.values():
+ ap.props.paused = True
+
+ def resume(self):
+ if self._suspended:
+ self._suspended = False
+ for ap in self.access_points.values():
+ ap.props.paused = False
+
+ def _toolbar_query_changed_cb(self, toolbar, query):
+ self._query = query.lower()
+ for icon in self._layout_box.get_children():
+ if hasattr(icon, 'set_filter'):
+ icon.set_filter(self._query)
+
+ def focus_search_entry(self):
+ self._toolbar.search_entry.grab_focus()
diff --git a/src/view/home/MyIcon.py b/src/jarabe/desktop/myicon.py
index af0f6ce..4a4ad95 100644
--- a/src/view/home/MyIcon.py
+++ b/src/jarabe/desktop/myicon.py
@@ -14,11 +14,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import gconf
+
from sugar.graphics.icon import CanvasIcon
-from sugar import profile
+from sugar.graphics.xocolor import XoColor
class MyIcon(CanvasIcon):
def __init__(self, size):
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string("/desktop/sugar/user/color"))
CanvasIcon.__init__(self, size=size,
icon_name='computer-xo',
- xo_color=profile.get_color())
+ xo_color=color)
diff --git a/src/view/home/proc_smaps.py b/src/jarabe/desktop/proc_smaps.py
index 090a4cf..090a4cf 100755
--- a/src/view/home/proc_smaps.py
+++ b/src/jarabe/desktop/proc_smaps.py
diff --git a/src/hardware/schoolserver.py b/src/jarabe/desktop/schoolserver.py
index a9ed60b..f5e5db4 100644
--- a/src/hardware/schoolserver.py
+++ b/src/jarabe/desktop/schoolserver.py
@@ -3,6 +3,7 @@ from gettext import gettext as _
from xmlrpclib import ServerProxy, Error
import socket
import os
+import gconf
from sugar.profile import get_profile
@@ -23,9 +24,12 @@ def register_laptop(url=REGISTER_URL):
profile = get_profile()
+ client = gconf.client_get_default()
+ nick = client.get_string('/desktop/sugar/user/nick')
+
server = ServerProxy(url)
try:
- data = server.register(sn, profile.nick_name, uuid, profile.pubkey)
+ data = server.register(sn, nick, uuid, profile.pubkey)
except (Error, socket.error), e:
logging.error('Registration: cannot connect to server: %s' % e)
raise RegisterError(_('Cannot connect to the server.'))
@@ -35,9 +39,9 @@ def register_laptop(url=REGISTER_URL):
data['error'])
raise RegisterError(_('The server could not complete the request.'))
- profile.jabber_server = data['jabberserver']
- profile.backup1 = data['backupurl']
- profile.save()
+ client.set_string('/desktop/sugar/collaboration/jabber_server',
+ data['jabberserver'])
+ client.set_string('/desktop/sugar/backup_url', data['backupurl'])
return True
diff --git a/src/view/home/snowflakelayout.py b/src/jarabe/desktop/snowflakelayout.py
index 5782cff..5782cff 100644
--- a/src/view/home/snowflakelayout.py
+++ b/src/jarabe/desktop/snowflakelayout.py
diff --git a/src/view/home/spreadlayout.py b/src/jarabe/desktop/spreadlayout.py
index 0faabca..ffc5bc7 100644
--- a/src/view/home/spreadlayout.py
+++ b/src/jarabe/desktop/spreadlayout.py
@@ -20,7 +20,7 @@ import gtk
from sugar.graphics import style
-from view.home.grid import Grid
+from jarabe.desktop.grid import Grid
_CELL_SIZE = 4.0
diff --git a/src/view/home/transitionbox.py b/src/jarabe/desktop/transitionbox.py
index fb351f8..a554415 100644
--- a/src/view/home/transitionbox.py
+++ b/src/jarabe/desktop/transitionbox.py
@@ -20,7 +20,7 @@ import gobject
from sugar.graphics import style
from sugar.graphics import animator
-from view.home.MyIcon import MyIcon
+from jarabe.desktop.myicon import MyIcon
class _Animation(animator.Animation):
def __init__(self, icon, start_size, end_size):
@@ -74,12 +74,10 @@ class TransitionBox(hippo.Canvas):
self._box.props.background_color = style.COLOR_WHITE.get_int()
self.set_root(self._box)
- self._size = style.XLARGE_ICON_SIZE
-
self._layout = _Layout()
self._box.set_layout(self._layout)
- self._my_icon = MyIcon(self._size)
+ self._my_icon = MyIcon(style.XLARGE_ICON_SIZE)
self._box.append(self._my_icon)
self._animator = animator.Animator(0.3)
@@ -88,10 +86,9 @@ class TransitionBox(hippo.Canvas):
def _animation_completed_cb(self, anim):
self.emit('completed')
- def set_size(self, size):
+ def start_transition(self, start_size, end_size):
+ self._my_icon.props.size = start_size
+
self._animator.remove_all()
- self._animator.add(_Animation(self._my_icon, self._size, size))
+ self._animator.add(_Animation(self._my_icon, start_size, end_size))
self._animator.start()
-
- self._size = size
-
diff --git a/src/view/frame/Makefile.am b/src/jarabe/frame/Makefile.am
index 4d5b96b..e5c445f 100644
--- a/src/view/frame/Makefile.am
+++ b/src/jarabe/frame/Makefile.am
@@ -1,7 +1,11 @@
-sugardir = $(pkgdatadir)/shell/view/frame
+sugardir = $(pythondir)/jarabe/frame
sugar_PYTHON = \
__init__.py \
activitiestray.py \
+ clipboard.py \
+ clipboardicon.py \
+ clipboardmenu.py \
+ clipboardobject.py \
clipboardpanelwindow.py \
clipboardtray.py \
devicestray.py \
diff --git a/src/view/frame/Makefile.in b/src/jarabe/frame/Makefile.in
index f0c7ddc..9ee3595 100644
--- a/src/view/frame/Makefile.in
+++ b/src/jarabe/frame/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/view/frame
+subdir = src/jarabe/frame
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,12 +190,17 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/view/frame
+sugardir = $(pythondir)/jarabe/frame
sugar_PYTHON = \
__init__.py \
activitiestray.py \
+ clipboard.py \
+ clipboardicon.py \
+ clipboardmenu.py \
+ clipboardobject.py \
clipboardpanelwindow.py \
clipboardtray.py \
devicestray.py \
@@ -216,9 +224,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/view/frame/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/jarabe/frame/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/view/frame/Makefile
+ $(AUTOMAKE) --foreign src/jarabe/frame/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/controlpanel/__init__.py b/src/jarabe/frame/__init__.py
index a9dd95a..d7aec3d 100644
--- a/src/controlpanel/__init__.py
+++ b/src/jarabe/frame/__init__.py
@@ -14,3 +14,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+from jarabe.frame.frame import Frame
+
+_view = None
+
+def get_view():
+ global _view
+ if not _view:
+ _view = Frame()
+ return _view
diff --git a/src/jarabe/frame/activitiestray.py b/src/jarabe/frame/activitiestray.py
new file mode 100644
index 0000000..197ae65
--- /dev/null
+++ b/src/jarabe/frame/activitiestray.py
@@ -0,0 +1,815 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+# Copyright (C) 2008 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
+
+import logging
+from gettext import gettext as _
+import tempfile
+import os
+
+import gconf
+import dbus
+import gtk
+
+from sugar.graphics import style
+from sugar.graphics.tray import HTray
+from sugar.graphics.xocolor import XoColor
+from sugar.graphics.radiotoolbutton import RadioToolButton
+from sugar.graphics.toolbutton import ToolButton
+from sugar.graphics.icon import Icon
+from sugar.graphics.palette import Palette, WidgetInvoker
+from sugar.graphics.menuitem import MenuItem
+from sugar.activity.activityhandle import ActivityHandle
+from sugar.activity import activityfactory
+from sugar import mime
+
+from jarabe.model import shell
+from jarabe.model import neighborhood
+from jarabe.model import owner
+from jarabe.model import bundleregistry
+from jarabe.model import filetransfer
+from jarabe.view.palettes import JournalPalette, CurrentActivityPalette
+from jarabe.view.pulsingicon import PulsingIcon
+from jarabe.frame.frameinvoker import FrameWidgetInvoker
+from jarabe.frame.notification import NotificationIcon
+import jarabe.frame
+
+DS_DBUS_SERVICE = "org.laptop.sugar.DataStore"
+DS_DBUS_INTERFACE = "org.laptop.sugar.DataStore"
+DS_DBUS_PATH = "/org/laptop/sugar/DataStore"
+
+class ActivityButton(RadioToolButton):
+ def __init__(self, home_activity, group):
+ RadioToolButton.__init__(self, group=group)
+
+ self.set_palette_invoker(FrameWidgetInvoker(self))
+
+ self._home_activity = home_activity
+
+ self._icon = PulsingIcon()
+ self._icon.props.base_color = home_activity.get_icon_color()
+ self._icon.props.pulse_color = \
+ XoColor('%s,%s' % (style.COLOR_BUTTON_GREY.get_svg(),
+ style.COLOR_TOOLBAR_GREY.get_svg()))
+ if home_activity.get_icon_path():
+ self._icon.props.file = home_activity.get_icon_path()
+ else:
+ self._icon.props.icon_name = 'image-missing'
+ self.set_icon_widget(self._icon)
+ self._icon.show()
+
+ if home_activity.props.launching:
+ self._icon.props.pulsing = True
+ self._notify_launching_hid = home_activity.connect( \
+ 'notify::launching', self.__notify_launching_cb)
+ else:
+ self._notify_launching_hid = None
+ self._notif_icon = None
+
+ def create_palette(self):
+ if self._home_activity.is_journal():
+ palette = JournalPalette(self._home_activity)
+ else:
+ palette = CurrentActivityPalette(self._home_activity)
+ palette.set_group_id('frame')
+ self.set_palette(palette)
+
+ def __notify_launching_cb(self, home_activity, pspec):
+ if not home_activity.props.launching:
+ self._icon.props.pulsing = False
+ home_activity.disconnect(self._notify_launching_hid)
+
+class BaseInviteButton(ToolButton):
+ def __init__(self, invite):
+ ToolButton.__init__(self)
+ self._invite = invite
+
+ self._icon = Icon()
+ self.set_icon_widget(self._icon)
+ self._icon.show()
+
+ self.connect('clicked', self.__clicked_cb)
+ self.connect('destroy', self.__destroy_cb)
+ self._notif_icon = NotificationIcon()
+ self._notif_icon.connect('button-release-event',
+ self.__button_release_event_cb)
+
+ def __button_release_event_cb(self, icon, event):
+ self.emit('clicked')
+
+ def __clicked_cb(self, button):
+ if self._notif_icon is not None:
+ frame = jarabe.frame.get_view()
+ frame.remove_notification(self._notif_icon)
+ self._notif_icon = None
+ self._launch()
+
+ def _launch(self):
+ """Launch the target of the invite"""
+ raise NotImplementedError
+
+ def __destroy_cb(self, button):
+ frame = jarabe.frame.get_view()
+ frame.remove_notification(self._notif_icon)
+
+class ActivityInviteButton(BaseInviteButton):
+ """Invite to shared activity"""
+ def __init__(self, invite):
+ BaseInviteButton.__init__(self, invite)
+ mesh = neighborhood.get_model()
+ activity_model = mesh.get_activity(invite.get_activity_id())
+ self._activity_model = activity_model
+ self._bundle_id = activity_model.get_bundle_id()
+
+ self._icon.props.xo_color = activity_model.get_color()
+ if activity_model.get_icon_name():
+ self._icon.props.file = activity_model.get_icon_name()
+ else:
+ self._icon.props.icon_name = 'image-missing'
+
+ palette = ActivityInvitePalette(invite)
+ palette.props.invoker = FrameWidgetInvoker(self)
+ palette.set_group_id('frame')
+ self.set_palette(palette)
+
+ self._notif_icon.props.xo_color = activity_model.get_color()
+ if activity_model.get_icon_name():
+ icon_name = activity_model.get_icon_name()
+ self._notif_icon.props.icon_filename = icon_name
+ else:
+ self._notif_icon.props.icon_name = 'image-missing'
+
+ palette = ActivityInvitePalette(invite)
+ palette.props.invoker = WidgetInvoker(self._notif_icon)
+ palette.set_group_id('frame')
+ self._notif_icon.palette = palette
+
+ frame = jarabe.frame.get_view()
+ frame.add_notification(self._notif_icon,
+ gtk.CORNER_TOP_LEFT)
+
+ def _launch(self):
+ """Join the activity in the invite."""
+ registry = bundleregistry.get_registry()
+ bundle = registry.get_bundle(self._bundle_id)
+
+ handle = ActivityHandle(self._activity_model.get_id())
+ activityfactory.create(bundle, handle)
+
+class PrivateInviteButton(BaseInviteButton):
+ """Invite to a private one to one channel"""
+ def __init__(self, invite):
+ BaseInviteButton.__init__(self, invite)
+ self._private_channel = invite.get_private_channel()
+ self._bundle_id = invite.get_bundle_id()
+
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string('/desktop/sugar/user/color'))
+
+ self._icon.props.xo_color = color
+ registry = bundleregistry.get_registry()
+ self._bundle = registry.get_bundle(self._bundle_id)
+
+ if self._bundle:
+ self._icon.props.file = self._bundle.get_icon()
+ else:
+ self._icon.props.icon_name = 'image-missing'
+
+ palette = PrivateInvitePalette(invite)
+ palette.props.invoker = FrameWidgetInvoker(self)
+ palette.set_group_id('frame')
+ self.set_palette(palette)
+
+ self._notif_icon.props.xo_color = color
+
+ if self._bundle:
+ self._notif_icon.props.icon_filename = self._bundle.get_icon()
+ else:
+ self._notif_icon.props.icon_name = 'image-missing'
+
+ palette = PrivateInvitePalette(invite)
+ palette.props.invoker = WidgetInvoker(self._notif_icon)
+ palette.set_group_id('frame')
+ self._notif_icon.palette = palette
+
+ frame = jarabe.frame.get_view()
+ frame.add_notification(self._notif_icon,
+ gtk.CORNER_TOP_LEFT)
+
+ def _launch(self):
+ """Start the activity with private channel."""
+ activityfactory.create_with_uri(self._bundle, self._private_channel)
+
+class BaseInvitePalette(Palette):
+ """Palette for frame or notification icon for invites."""
+ def __init__(self):
+ Palette.__init__(self, '')
+
+ menu_item = MenuItem(_('Join'), icon_name='dialog-ok')
+ menu_item.connect('activate', self.__join_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ menu_item = MenuItem(_('Decline'), icon_name='dialog-cancel')
+ menu_item.connect('activate', self.__decline_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ def __join_activate_cb(self, menu_item):
+ self._join()
+
+ def __decline_activate_cb(self, menu_item):
+ self._decline()
+
+ def _join(self):
+ raise NotImplementedError
+
+ def _decline(self):
+ raise NotImplementedError
+
+
+class ActivityInvitePalette(BaseInvitePalette):
+ """Palette for shared activity invites."""
+
+ def __init__(self, invite):
+ BaseInvitePalette.__init__(self)
+
+ mesh = neighborhood.get_model()
+ activity_model = mesh.get_activity(invite.get_activity_id())
+ self._activity_model = activity_model
+ self._bundle_id = activity_model.get_bundle_id()
+
+ registry = bundleregistry.get_registry()
+ self._bundle = registry.get_bundle(self._bundle_id)
+ if self._bundle:
+ self.set_primary_text(self._bundle.get_name())
+ else:
+ self.set_primary_text(self._bundle_id)
+
+ def _join(self):
+ handle = ActivityHandle(self._activity_model.get_id())
+ activityfactory.create(self._bundle, handle)
+
+ def _decline(self):
+ invites = owner.get_model().get_invites()
+ activity_id = self._activity_model.get_id()
+ invites.remove_activity(activity_id)
+
+
+class PrivateInvitePalette(BaseInvitePalette):
+ """Palette for private channel invites."""
+
+ def __init__(self, invite):
+ BaseInvitePalette.__init__(self)
+
+ self._private_channel = invite.get_private_channel()
+ self._bundle_id = invite.get_bundle_id()
+
+ registry = bundleregistry.get_registry()
+ self._bundle = registry.get_bundle(self._bundle_id)
+ if self._bundle:
+ self.set_primary_text(self._bundle.get_name())
+ else:
+ self.set_primary_text(self._bundle_id)
+
+ def _join(self):
+ activityfactory.create_with_uri(self._bundle, self._private_channel)
+
+ invites = owner.get_model().get_invites()
+ invites.remove_private_channel(self._private_channel)
+
+ def _decline(self):
+ invites = owner.get_model().get_invites()
+ invites.remove_private_channel(self._private_channel)
+
+
+class ActivitiesTray(HTray):
+ def __init__(self):
+ HTray.__init__(self)
+
+ self._buttons = {}
+ self._invite_to_item = {}
+ self._freeze_button_clicks = False
+
+ self._home_model = shell.get_model()
+ self._home_model.connect('activity-added', self.__activity_added_cb)
+ self._home_model.connect('activity-removed', self.__activity_removed_cb)
+ self._home_model.connect('active-activity-changed',
+ self.__activity_changed_cb)
+ self._home_model.connect('tabbing-activity-changed',
+ self.__tabbing_activity_changed_cb)
+
+ self._invites = owner.get_model().get_invites()
+ for invite in self._invites:
+ self._add_invite(invite)
+ self._invites.connect('invite-added', self.__invite_added_cb)
+ self._invites.connect('invite-removed', self.__invite_removed_cb)
+
+ filetransfer.new_file_transfer.connect(self.__new_file_transfer_cb)
+
+ def __activity_added_cb(self, home_model, home_activity):
+ logging.debug('__activity_added_cb: %r' % home_activity)
+ if self.get_children():
+ group = self.get_children()[0]
+ else:
+ group = None
+
+ button = ActivityButton(home_activity, group)
+ self.add_item(button)
+ self._buttons[home_activity.get_activity_id()] = button
+ button.connect('clicked', self.__activity_clicked_cb, home_activity)
+ button.show()
+
+ def __activity_removed_cb(self, home_model, home_activity):
+ logging.debug('__activity_removed_cb: %r' % home_activity)
+ button = self._buttons[home_activity.get_activity_id()]
+ self.remove_item(button)
+ del self._buttons[home_activity.get_activity_id()]
+
+ def _activate_activity(self, home_activity):
+ button = self._buttons[home_activity.get_activity_id()]
+ self._freeze_button_clicks = True
+ button.props.active = True
+ self._freeze_button_clicks = False
+
+ self.scroll_to_item(button)
+ # Redraw immediately.
+ # The widget may not be realized yet, and then there is no window.
+ if self.window:
+ self.window.process_updates(True)
+
+ def __activity_changed_cb(self, home_model, home_activity):
+ logging.debug('__activity_changed_cb: %r' % home_activity)
+
+ # Only select the new activity, if there is no tabbing activity.
+ if home_model.get_tabbing_activity() is None:
+ self._activate_activity(home_activity)
+
+ def __tabbing_activity_changed_cb(self, home_model, home_activity):
+ logging.debug('__tabbing_activity_changed_cb: %r' % home_activity)
+ # If the tabbing_activity is set to None just do nothing.
+ # The active activity will be updated a bit later (and it will
+ # be set to the activity that is currently selected).
+ if home_activity is None:
+ return
+
+ self._activate_activity(home_activity)
+
+ def __activity_clicked_cb(self, button, home_activity):
+ if not self._freeze_button_clicks and button.props.active:
+ logging.debug('ActivitiesTray.__activity_clicked_cb')
+ window = home_activity.get_window()
+ if window:
+ window.activate(gtk.get_current_event_time())
+
+ def __invite_clicked_cb(self, icon, invite):
+ if hasattr(invite, 'get_activity_id'):
+ self._invites.remove_invite(invite)
+ else:
+ self._invites.remove_private_invite(invite)
+
+ def __invite_added_cb(self, invites, invite):
+ self._add_invite(invite)
+
+ def __invite_removed_cb(self, invites, invite):
+ self._remove_invite(invite)
+
+ def _add_invite(self, invite):
+ """Add an invite (SugarInvite or PrivateInvite)"""
+ item = None
+ if hasattr(invite, 'get_activity_id'):
+ mesh = neighborhood.get_model()
+ activity_model = mesh.get_activity(invite.get_activity_id())
+ if activity_model is not None:
+ item = ActivityInviteButton(invite)
+ else:
+ item = PrivateInviteButton(invite)
+ if item is not None:
+ item.connect('clicked', self.__invite_clicked_cb, invite)
+ self.add_item(item)
+ item.show()
+ self._invite_to_item[invite] = item
+
+ def _remove_invite(self, invite):
+ self.remove_item(self._invite_to_item[invite])
+ self._invite_to_item[invite].destroy()
+ del self._invite_to_item[invite]
+
+ def __new_file_transfer_cb(self, **kwargs):
+ file_transfer = kwargs['file_transfer']
+ logging.debug('__new_file_transfer_cb %r' % file_transfer)
+
+ if isinstance(file_transfer, filetransfer.IncomingFileTransfer):
+ button = IncomingTransferButton(file_transfer)
+ elif isinstance(file_transfer, filetransfer.OutgoingFileTransfer):
+ button = OutgoingTransferButton(file_transfer)
+
+ self.add_item(button)
+ button.show()
+
+class BaseTransferButton(ToolButton):
+ """Button with a notification attached
+ """
+ def __init__(self):
+ ToolButton.__init__(self)
+ icon = Icon()
+ self.props.icon_widget = icon
+ icon.show()
+
+ self.notif_icon = NotificationIcon()
+ self.notif_icon.connect('button-release-event',
+ self.__button_release_event_cb)
+
+ def __button_release_event_cb(self, icon, event):
+ if self.notif_icon is not None:
+ frame = jarabe.frame.get_view()
+ frame.remove_notification(self.notif_icon)
+ self.notif_icon = None
+
+class IncomingTransferButton(BaseTransferButton):
+ """UI element representing an ongoing incoming file transfer
+ """
+ def __init__(self, file_transfer):
+ BaseTransferButton.__init__(self)
+
+ self._object_id = None
+ self._metadata = {}
+ self._file_transfer = file_transfer
+ self._file_transfer.connect('notify::state', self.__notify_state_cb)
+ self._file_transfer.connect('notify::transferred-bytes',
+ self.__notify_transferred_bytes_cb)
+
+ icon_name = mime.get_mime_icon(file_transfer.mime_type)
+ icon_theme = gtk.icon_theme_get_default()
+ info = icon_theme.lookup_icon(icon_name, gtk.ICON_SIZE_LARGE_TOOLBAR, 0)
+ if not info:
+ # display standard icon when icon for mime type is not found
+ icon_name = 'application-octet-stream'
+
+ icon_color = XoColor(file_transfer.buddy.props.color)
+
+ self.props.icon_widget.props.icon_name = icon_name
+ self.props.icon_widget.props.xo_color = icon_color
+
+ self.notif_icon.props.icon_name = icon_name
+ self.notif_icon.props.xo_color = icon_color
+
+ frame = jarabe.frame.get_view()
+ frame.add_notification(self.notif_icon,
+ gtk.CORNER_TOP_LEFT)
+
+ def create_palette(self):
+ palette = IncomingTransferPalette(self._file_transfer)
+ palette.props.invoker = FrameWidgetInvoker(self)
+ palette.set_group_id('frame')
+ return palette
+
+ def __notify_state_cb(self, file_transfer, pspec):
+ if file_transfer.props.state == filetransfer.FT_STATE_OPEN:
+ logging.debug('__notify_state_cb OPEN')
+ self._metadata['title'] = file_transfer.title
+ self._metadata['description'] = file_transfer.description
+ self._metadata['progress'] = '0'
+ self._metadata['keep'] = '0'
+ self._metadata['buddies'] = ''
+ self._metadata['preview'] = ''
+ self._metadata['icon-color'] = file_transfer.buddy.props.color
+ self._metadata['mime_type'] = file_transfer.mime_type
+
+ datastore = self._get_datastore()
+ file_path = ''
+ transfer_ownership = True
+ self._object_id = datastore.create(self._metadata, file_path,
+ transfer_ownership)
+
+ elif file_transfer.props.state == filetransfer.FT_STATE_COMPLETED:
+ logging.debug('__notify_state_cb COMPLETED')
+ self._metadata['progress'] = '100'
+
+ datastore = self._get_datastore()
+ file_path = file_transfer.destination_path
+ transfer_ownership = True
+ datastore.update(self._object_id, self._metadata, file_path,
+ transfer_ownership,
+ reply_handler=self.__reply_handler_cb,
+ error_handler=self.__error_handler_cb)
+
+ elif file_transfer.props.state == filetransfer.FT_STATE_CANCELLED:
+ logging.debug('__notify_state_cb CANCELLED')
+ if self._object_id is not None:
+ datastore.delete(self._object_id,
+ reply_handler=self.__reply_handler_cb,
+ error_handler=self.__error_handler_cb)
+ self._object_id = None
+
+ def __notify_transferred_bytes_cb(self, file_transfer, pspec):
+ progress = file_transfer.props.transferred_bytes / \
+ file_transfer.file_size
+ self._metadata['progress'] = str(progress * 100)
+
+ datastore = self._get_datastore()
+ file_path = ''
+ transfer_ownership = True
+ datastore.update(self._object_id, self._metadata, file_path,
+ transfer_ownership,
+ reply_handler=self.__reply_handler_cb,
+ error_handler=self.__error_handler_cb)
+
+ def _get_datastore(self):
+ bus = dbus.SessionBus()
+ remote_object = bus.get_object(DS_DBUS_SERVICE, DS_DBUS_PATH)
+ return dbus.Interface(remote_object, DS_DBUS_INTERFACE)
+
+ def __reply_handler_cb(self):
+ logging.debug('__reply_handler_cb %r' % self._object_id)
+
+ def __error_handler_cb(self, error):
+ logging.debug('__error_handler_cb %r %s' % (self._object_id, error))
+
+class OutgoingTransferButton(BaseTransferButton):
+ """UI element representing an ongoing outgoing file transfer
+ """
+ def __init__(self, file_transfer):
+ BaseTransferButton.__init__(self)
+
+ self._file_transfer = file_transfer
+
+ icon_name = mime.get_mime_icon(file_transfer.mime_type)
+ icon_theme = gtk.icon_theme_get_default()
+ info = icon_theme.lookup_icon(icon_name, gtk.ICON_SIZE_LARGE_TOOLBAR, 0)
+ if not info:
+ # display standard icon when icon for mime type is not found
+ icon_name = 'application-octet-stream'
+
+ client = gconf.client_get_default()
+ icon_color = XoColor(client.get_string("/desktop/sugar/user/color"))
+
+ self.props.icon_widget.props.icon_name = icon_name
+ self.props.icon_widget.props.xo_color = icon_color
+
+ self.notif_icon.props.icon_name = icon_name
+ self.notif_icon.props.xo_color = icon_color
+
+ frame = jarabe.frame.get_view()
+ frame.add_notification(self.notif_icon,
+ gtk.CORNER_TOP_LEFT)
+
+ def create_palette(self):
+ palette = OutgoingTransferPalette(self._file_transfer)
+ palette.props.invoker = FrameWidgetInvoker(self)
+ palette.set_group_id('frame')
+ return palette
+
+class BaseTransferPalette(Palette):
+ """Base palette class for frame or notification icon for file transfers
+ """
+ def __init__(self, file_transfer):
+ Palette.__init__(self, file_transfer.title)
+
+ self.file_transfer = file_transfer
+
+ self.progress_bar = None
+ self.progress_label = None
+ self._notify_transferred_bytes_handler = None
+
+ self.connect('popup', self.__popup_cb)
+ self.connect('popdown', self.__popdown_cb)
+
+ def __popup_cb(self, palette):
+ self.update_progress()
+ self._notify_transferred_bytes_handler = \
+ self.file_transfer.connect('notify::transferred_bytes',
+ self.__notify_transferred_bytes_cb)
+
+ def __popdown_cb(self, palette):
+ if self._notify_transferred_bytes_handler is not None:
+ self.file_transfer.disconnect(
+ self._notify_transferred_bytes_handler)
+ self._notify_transferred_bytes_handler = None
+
+ def __notify_transferred_bytes_cb(self, file_transfer, pspec):
+ self.update_progress()
+
+ def _format_size(self, size):
+ if size < 1024:
+ return _('%dB') % size
+ elif size < 1048576:
+ return _('%dKB') % (size / 1024)
+ else:
+ return _('%dMB') % (size / 1048576)
+
+ def update_progress(self):
+ logging.debug('update_progress: %r' %
+ self.file_transfer.props.transferred_bytes)
+
+ if self.progress_bar is None:
+ return
+
+ self.progress_bar.props.fraction = \
+ self.file_transfer.props.transferred_bytes / \
+ float(self.file_transfer.file_size)
+ logging.debug('update_progress: %r' % self.progress_bar.props.fraction)
+
+ transferred = self._format_size(
+ self.file_transfer.props.transferred_bytes)
+ total = self._format_size(self.file_transfer.file_size)
+ self.progress_label.props.label = _('%s of %s') % (transferred, total)
+
+class IncomingTransferPalette(BaseTransferPalette):
+ """Palette for frame or notification icon for incoming file transfers
+ """
+ def __init__(self, file_transfer):
+ BaseTransferPalette.__init__(self, file_transfer)
+
+ self.file_transfer.connect('notify::state', self.__notify_state_cb)
+
+ nick = self.file_transfer.buddy.props.nick
+ self.props.secondary_text = _('Transfer from %r') % nick
+
+ self._update()
+
+ def __notify_state_cb(self, file_transfer, pspec):
+ self._update()
+
+ def _update(self):
+ logging.debug('_update state: %r' % self.file_transfer.props.state)
+ if self.file_transfer.props.state == filetransfer.FT_STATE_PENDING:
+ menu_item = MenuItem(_('Accept'), icon_name='dialog-ok')
+ menu_item.connect('activate', self.__accept_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ menu_item = MenuItem(_('Decline'), icon_name='dialog-cancel')
+ menu_item.connect('activate', self.__decline_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ vbox = gtk.VBox()
+ self.set_content(vbox)
+ vbox.show()
+
+ if self.file_transfer.description:
+ label = gtk.Label(self.file_transfer.description)
+ vbox.add(label)
+ label.show()
+
+ mime_type = self.file_transfer.mime_type
+ type_description = mime.get_mime_description(mime_type)
+
+ size = self._format_size(self.file_transfer.file_size)
+ label = gtk.Label(_('%s (%s)') % (size, type_description))
+ vbox.add(label)
+ label.show()
+
+ elif self.file_transfer.props.state in \
+ [filetransfer.FT_STATE_ACCEPTED, filetransfer.FT_STATE_OPEN]:
+
+ for item in self.menu.get_children():
+ self.menu.remove(item)
+
+ menu_item = MenuItem(_('Cancel'), icon_name='dialog-cancel')
+ menu_item.connect('activate', self.__cancel_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ vbox = gtk.VBox()
+ self.set_content(vbox)
+ vbox.show()
+
+ self.progress_bar = gtk.ProgressBar()
+ vbox.add(self.progress_bar)
+ self.progress_bar.show()
+
+ self.progress_label = gtk.Label('')
+ vbox.add(self.progress_label)
+ self.progress_label.show()
+
+ self.update_progress()
+
+ elif self.file_transfer.props.state == filetransfer.FT_STATE_COMPLETED:
+ # TODO: What to do here?
+ self.update_progress()
+ elif self.file_transfer.props.state == filetransfer.FT_STATE_CANCELLED:
+ # TODO: What to do here?
+ self.update_progress()
+
+ def __accept_activate_cb(self, menu_item):
+ #TODO: figure out the best place to get rid of that temp file
+ extension = mime.get_primary_extension(self.file_transfer.mime_type)
+ fd, file_path = tempfile.mkstemp(suffix=extension,
+ prefix=self._sanitize(self.file_transfer.title))
+ os.close(fd)
+ os.unlink(file_path)
+
+ self.file_transfer.accept(file_path)
+
+ def _sanitize(self, file_name):
+ file_name = file_name.replace('/', '_')
+ file_name = file_name.replace('.', '_')
+ file_name = file_name.replace('?', '_')
+ return file_name
+
+ def __decline_activate_cb(self, menu_item):
+ self.file_transfer.decline()
+
+ def __cancel_activate_cb(self, menu_item):
+ self.file_transfer.cancel()
+
+class OutgoingTransferPalette(Palette):
+ """Palette for frame or notification icon for outgoing file transfers
+ """
+ def __init__(self, file_transfer):
+ BaseTransferPalette.__init__(self, file_transfer)
+
+ self.progress_bar = None
+ self.progress_label = None
+
+ self.file_transfer.connect('notify::state', self.__notify_state_cb)
+
+ nick = file_transfer.buddy.props.nick
+ self.props.secondary_text = _('Transfer to %r') % nick
+
+ menu_item = MenuItem(_('Cancel'), icon_name='dialog-cancel')
+ menu_item.connect('activate', self.__cancel_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ self._update()
+
+ def __notify_state_cb(self, file_transfer, pspec):
+ self._update()
+
+ def _update(self):
+ logging.debug('_update state: %r' % self.file_transfer.props.state)
+ if self.file_transfer.props.state == filetransfer.FT_STATE_PENDING:
+
+ menu_item = MenuItem(_('Cancel'), icon_name='dialog-cancel')
+ menu_item.connect('activate', self.__cancel_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ vbox = gtk.VBox()
+ self.set_content(vbox)
+ vbox.show()
+
+ if self.file_transfer.description:
+ label = gtk.Label(self.file_transfer.description)
+ vbox.add(label)
+ label.show()
+
+ mime_type = self.file_transfer.mime_type
+ type_description = mime.get_mime_description(mime_type)
+
+ size = self._format_size(self.file_transfer.file_size)
+ label = gtk.Label(_('%s (%s)') % (size, type_description))
+ vbox.add(label)
+ label.show()
+
+ elif self.file_transfer.props.state in \
+ [filetransfer.FT_STATE_ACCEPTED, filetransfer.FT_STATE_OPEN]:
+
+ for item in self.menu.get_children():
+ self.menu.remove(item)
+
+ menu_item = MenuItem(_('Cancel'), icon_name='dialog-cancel')
+ menu_item.connect('activate', self.__cancel_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ vbox = gtk.VBox()
+ self.set_content(vbox)
+ vbox.show()
+
+ self.progress_bar = gtk.ProgressBar()
+ vbox.add(self.progress_bar)
+ self.progress_bar.show()
+
+ self.progress_label = gtk.Label('')
+ vbox.add(self.progress_label)
+ self.progress_label.show()
+
+ self.update_progress()
+
+ elif self.file_transfer.props.state == filetransfer.FT_STATE_COMPLETED:
+ # TODO: What to do here?
+ self.update_progress()
+ elif self.file_transfer.props.state == filetransfer.FT_STATE_CANCELLED:
+ # TODO: What to do here?
+ self.update_progress()
+
+ def __cancel_activate_cb(self, menu_item):
+ self.file_transfer.cancel()
+
diff --git a/src/jarabe/frame/clipboard.py b/src/jarabe/frame/clipboard.py
new file mode 100644
index 0000000..0e3e125
--- /dev/null
+++ b/src/jarabe/frame/clipboard.py
@@ -0,0 +1,149 @@
+# Copyright (C) 2006, Red Hat, Inc.
+#
+# 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 logging
+import os
+import shutil
+import urlparse
+import tempfile
+
+import gobject
+
+from sugar import mime
+
+from jarabe.frame.clipboardobject import ClipboardObject, Format
+
+class Clipboard(gobject.GObject):
+
+ __gsignals__ = {
+ 'object-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'object-deleted': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([int])),
+ 'object-state-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object]))
+ }
+
+ def __init__(self):
+ gobject.GObject.__init__(self)
+
+ self._objects = {}
+ self._next_id = 0
+
+ def _get_next_object_id(self):
+ self._next_id += 1
+ return self._next_id
+
+ def add_object(self, name):
+ logging.debug('Clipboard.add_object')
+ object_id = self._get_next_object_id()
+ self._objects[object_id] = ClipboardObject(object_id, name)
+ self.emit('object-added', self._objects[object_id])
+ return object_id
+
+ def add_object_format(self, object_id, format_type, data, on_disk):
+ logging.debug('Clipboard.add_object_format')
+ cb_object = self._objects[object_id]
+
+ if format_type == 'XdndDirectSave0':
+ format = Format('text/uri-list', data + '\r\n', on_disk)
+ format.owns_disk_data = True
+ cb_object.add_format(format)
+ elif on_disk and cb_object.get_percent() == 100:
+ new_uri = self._copy_file(data)
+ cb_object.add_format(Format(format_type, new_uri, on_disk))
+ logging.debug('Added format of type ' + format_type
+ + ' with path at ' + new_uri)
+ else:
+ cb_object.add_format(Format(format_type, data, on_disk))
+ logging.debug('Added in-memory format of type ' + format_type + '.')
+
+ self.emit('object-state-changed', cb_object)
+
+ def delete_object(self, object_id):
+ cb_object = self._objects.pop(object_id)
+ cb_object.destroy()
+ self.emit('object-deleted', object_id)
+ logging.debug('Deleted object with object_id %r' % object_id)
+
+ def set_object_percent(self, object_id, percent):
+ cb_object = self._objects[object_id]
+ if percent < 0 or percent > 100:
+ raise ValueError("invalid percentage")
+ if cb_object.get_percent() > percent:
+ raise ValueError("invalid percentage; less than current percent")
+ if cb_object.get_percent() == percent:
+ # ignore setting same percentage
+ return
+
+ cb_object.set_percent(percent)
+
+ if percent == 100:
+ self._process_object(cb_object)
+
+ self.emit('object-state-changed', cb_object)
+
+ def _process_object(self, cb_object):
+ formats = cb_object.get_formats()
+ for format_name, format in formats.iteritems():
+ if format.is_on_disk() and not format.owns_disk_data:
+ new_uri = self._copy_file(format.get_data())
+ format.set_data(new_uri)
+
+ # Add a text/plain format to objects that are text but lack it
+ if 'text/plain' not in formats.keys():
+ if 'UTF8_STRING' in formats.keys():
+ self.add_object_format(
+ cb_object.get_id(), 'text/plain',
+ data=formats['UTF8_STRING'].get_data(), on_disk=False)
+ elif 'text/unicode' in formats.keys():
+ self.add_object_format(
+ cb_object.get_id(), 'text/plain',
+ data=formats['UTF8_STRING'].get_data(), on_disk=False)
+
+ def get_object(self, object_id):
+ logging.debug('Clipboard.get_object')
+ return self._objects[object_id]
+
+ def get_object_data(self, object_id, format_type):
+ logging.debug('Clipboard.get_object_data')
+ cb_object = self._objects[object_id]
+ format = cb_object.get_formats()[format_type]
+ return format
+
+ def _copy_file(self, original_uri):
+ uri = urlparse.urlparse(original_uri)
+ path_, file_name = os.path.split(uri.path)
+
+ root, ext = os.path.splitext(file_name)
+ if not ext or ext == '.':
+ mime_type = mime.get_for_file(uri.path)
+ ext = '.' + mime.get_primary_extension(mime_type)
+
+ f_, new_file_path = tempfile.mkstemp(ext, root)
+ del f_
+ shutil.copyfile(uri.path, new_file_path)
+ os.chmod(new_file_path, 0644)
+
+ return 'file://' + new_file_path
+
+_instance = None
+
+def get_instance():
+ global _instance
+ if not _instance:
+ _instance = Clipboard()
+ return _instance
diff --git a/src/view/clipboardicon.py b/src/jarabe/frame/clipboardicon.py
index bd99b3a..ff63ad9 100644
--- a/src/view/clipboardicon.py
+++ b/src/jarabe/frame/clipboardicon.py
@@ -16,83 +16,76 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import logging
+import gconf
+
import gtk
from sugar.graphics.radiotoolbutton import RadioToolButton
from sugar.graphics.icon import Icon
from sugar.graphics.xocolor import XoColor
-from sugar.clipboard import clipboardservice
-from sugar.bundle.activitybundle import ActivityBundle
-from sugar import profile
+from sugar.graphics import style
-from view.clipboardmenu import ClipboardMenu
-from view.frame.frameinvoker import FrameWidgetInvoker
-from view.frame.notification import NotificationIcon
-import view.frame.frame
+from jarabe.frame import clipboard
+from jarabe.frame.clipboardmenu import ClipboardMenu
+from jarabe.frame.frameinvoker import FrameWidgetInvoker
+from jarabe.frame.notification import NotificationIcon
+import jarabe.frame
class ClipboardIcon(RadioToolButton):
__gtype_name__ = 'SugarClipboardIcon'
- def __init__(self, object_id, name, group):
+ def __init__(self, cb_object, group):
RadioToolButton.__init__(self, group=group)
- self._object_id = object_id
- self._name = name
- self._percent = 0
- self._preview = None
- self._activity = None
+
+ self.props.palette_invoker = FrameWidgetInvoker(self)
+
+ self._cb_object = cb_object
self.owns_clipboard = False
self.props.sensitive = False
self.props.active = False
self._notif_icon = None
+ self._current_percent = None
self._icon = Icon()
- self._icon.props.xo_color = profile.get_color()
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string('/desktop/sugar/user/color'))
+ self._icon.props.xo_color = color
self.set_icon_widget(self._icon)
self._icon.show()
- cb_service = clipboardservice.get_instance()
+ cb_service = clipboard.get_instance()
cb_service.connect('object-state-changed',
self._object_state_changed_cb)
- obj = cb_service.get_object(self._object_id)
-
- self.palette = ClipboardMenu(self._object_id, self._name, self._percent,
- self._preview, self._activity,
- self._is_bundle(obj['FORMATS']))
- self.palette.props.invoker = FrameWidgetInvoker(self)
child = self.get_child()
child.connect('drag_data_get', self._drag_data_get_cb)
self.connect('notify::active', self._notify_active_cb)
- def _is_bundle(self, formats):
- # A bundle will have only one format.
- return formats and formats[0] in [ActivityBundle.MIME_TYPE,
- ActivityBundle.DEPRECATED_MIME_TYPE]
+ def create_palette(self):
+ palette = ClipboardMenu(self._cb_object)
+ palette.set_group_id('frame')
+ return palette
def get_object_id(self):
- return self._object_id
+ return self._cb_object.get_id()
- def _drag_data_get_cb(self, widget, context, selection,
- targetType, eventTime):
+ def _drag_data_get_cb(self, widget, context, selection, target_type,
+ event_time):
logging.debug('_drag_data_get_cb: requested target ' + selection.target)
-
- cb_service = clipboardservice.get_instance()
- data = cb_service.get_object_data(self._object_id,
- selection.target)['DATA']
-
+ data = self._cb_object.get_formats()[selection.target].get_data()
selection.set(selection.target, 8, data)
def _put_in_clipboard(self):
logging.debug('ClipboardIcon._put_in_clipboard')
- if self._percent < 100:
+ if self._cb_object.get_percent() < 100:
raise ValueError('Object is not complete,' \
' cannot be put into the clipboard.')
targets = self._get_targets()
if targets:
- clipboard = gtk.Clipboard()
- if not clipboard.set_with_data(targets,
+ x_clipboard = gtk.Clipboard()
+ if not x_clipboard.set_with_data(targets,
self._clipboard_data_get_cb,
self._clipboard_clear_cb,
targets):
@@ -100,54 +93,38 @@ class ClipboardIcon(RadioToolButton):
else:
self.owns_clipboard = True
- def _clipboard_data_get_cb(self, clipboard, selection, info, targets):
+ def _clipboard_data_get_cb(self, x_clipboard, selection, info, targets):
if not selection.target in [target[0] for target in targets]:
logging.warning('ClipboardIcon._clipboard_data_get_cb: asked %s' \
' but only have %r.' % (selection.target, targets))
return
- cb_service = clipboardservice.get_instance()
- data = cb_service.get_object_data(self._object_id,
- selection.target)['DATA']
-
+ data = self._cb_object.get_formats()[selection.target].get_data()
selection.set(selection.target, 8, data)
- def _clipboard_clear_cb(self, clipboard, targets):
+ def _clipboard_clear_cb(self, x_clipboard, targets):
logging.debug('ClipboardIcon._clipboard_clear_cb')
self.owns_clipboard = False
- def _object_state_changed_cb(self, cb_service, object_id, name, percent,
- icon_name, preview, activity):
-
- if object_id != self._object_id:
+ def _object_state_changed_cb(self, cb_service, cb_object):
+ if cb_object != self._cb_object:
return
- cb_service = clipboardservice.get_instance()
- obj = cb_service.get_object(self._object_id)
-
- if icon_name:
- self._icon.props.icon_name = icon_name
+ if cb_object.get_icon():
+ self._icon.props.icon_name = cb_object.get_icon()
else:
self._icon.props.icon_name = 'application-octet-stream'
child = self.get_child()
+ child.connect('drag-begin', self._drag_begin_cb)
child.drag_source_set(gtk.gdk.BUTTON1_MASK,
self._get_targets(),
gtk.gdk.ACTION_COPY)
- child.drag_source_set_icon_name(self._icon.props.icon_name)
-
- self._name = name
- self._preview = preview
- self._activity = activity
- self.palette.set_state(name, percent, preview, activity,
- self._is_bundle(obj['FORMATS']))
- old_percent = self._percent
- self._percent = percent
- if self._percent == 100:
+ if cb_object.get_percent() == 100:
self.props.sensitive = True
# Clipboard object became complete. Make it the active one.
- if old_percent < 100 and self._percent == 100:
+ if self._current_percent < 100 and cb_object.get_percent() == 100:
self.props.active = True
self._notif_icon = NotificationIcon()
@@ -155,9 +132,18 @@ class ClipboardIcon(RadioToolButton):
self._notif_icon.props.xo_color = \
XoColor('%s,%s' % (self._icon.props.stroke_color,
self._icon.props.fill_color))
- frame = view.frame.frame.get_instance()
+ frame = jarabe.frame.get_view()
frame.add_notification(self._notif_icon,
- view.frame.frame.BOTTOM_LEFT)
+ gtk.CORNER_BOTTOM_LEFT)
+ self._current_percent = cb_object.get_percent()
+
+ def _drag_begin_cb(self, widget, context):
+ # TODO: We should get the pixbuf from the icon, with colors, etc.
+ icon_theme = gtk.icon_theme_get_default()
+ pixbuf = icon_theme.load_icon(self._icon.props.icon_name,
+ style.STANDARD_ICON_SIZE, 0)
+ context.set_icon_pixbuf(pixbuf, hot_x=pixbuf.props.width / 2,
+ hot_y=pixbuf.props.height / 2)
def _notify_active_cb(self, widget, pspec):
if self.props.active:
@@ -166,14 +152,7 @@ class ClipboardIcon(RadioToolButton):
self.owns_clipboard = False
def _get_targets(self):
- cb_service = clipboardservice.get_instance()
-
- attrs = cb_service.get_object(self._object_id)
- format_types = attrs[clipboardservice.FORMATS_KEY]
-
targets = []
- for format_type in format_types:
+ for format_type in self._cb_object.get_formats().keys():
targets.append((format_type, 0, 0))
-
return targets
-
diff --git a/src/view/clipboardmenu.py b/src/jarabe/frame/clipboardmenu.py
index 3ffe111..0a5e615 100644
--- a/src/view/clipboardmenu.py
+++ b/src/jarabe/frame/clipboardmenu.py
@@ -19,30 +19,34 @@ import tempfile
import urlparse
import os
import logging
+import gconf
import gtk
from sugar.graphics.palette import Palette
from sugar.graphics.menuitem import MenuItem
from sugar.graphics.icon import Icon
-from sugar.clipboard import clipboardservice
+from sugar.graphics.xocolor import XoColor
from sugar.datastore import datastore
from sugar import mime
-from sugar import profile
-from sugar import activity
+
+from jarabe.frame import clipboard
+from jarabe.journal import misc
+from jarabe.model import bundleregistry
class ClipboardMenu(Palette):
- def __init__(self, object_id, name, percent, preview,
- activities, installable):
- Palette.__init__(self, name)
+ def __init__(self, cb_object):
+ Palette.__init__(self, text_maxlen=100)
- self._object_id = object_id
- self._percent = percent
- self._activities = activities
+ self._cb_object = cb_object
self.set_group_id('frame')
+ cb_service = clipboard.get_instance()
+ cb_service.connect('object-state-changed',
+ self._object_state_changed_cb)
+
self._progress_bar = None
self._remove_item = MenuItem(_('Remove'), 'list-remove')
@@ -55,27 +59,24 @@ class ClipboardMenu(Palette):
self.menu.append(self._open_item)
self._open_item.show()
- #self._stop_item = MenuItem(_('Stop download'), 'stock-close')
- # TODO: Implement stopping downloads
- #self._stop_item.connect('activate', self._stop_item_activate_cb)
- #self.append_menu_item(self._stop_item)
-
self._journal_item = MenuItem(_('Keep'))
- icon = Icon(icon_name='document-save', icon_size=gtk.ICON_SIZE_MENU,
- xo_color=profile.get_color())
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string('/desktop/sugar/user/color'))
+ icon = Icon(icon_name='document-save', icon_size=gtk.ICON_SIZE_MENU,
+ xo_color=color)
self._journal_item.set_image(icon)
self._journal_item.connect('activate', self._journal_item_activate_cb)
self.menu.append(self._journal_item)
self._journal_item.show()
- self._update_items_visibility(installable)
- self._update_open_submenu()
+ self._update()
def _update_open_submenu(self):
- logging.debug('_update_open_submenu: %r' % self._activities)
+ activities = self._get_activities()
+ logging.debug('_update_open_submenu: %r' % activities)
child = self._open_item.get_child()
- if self._activities is None or len(self._activities) <= 1:
+ if activities is None or len(activities) <= 1:
child.set_text(_('Open'))
if self._open_item.get_submenu() is not None:
self._open_item.remove_submenu()
@@ -91,42 +92,54 @@ class ClipboardMenu(Palette):
for item in submenu.get_children():
submenu.remove(item)
- for service_name in self._activities:
- registry = activity.get_registry()
- activity_info = registry.get_activity(service_name)
+ for service_name in activities:
+ registry = bundleregistry.get_registry()
+ activity_info = registry.get_bundle(service_name)
if not activity_info:
logging.warning('Activity %s is unknown.' % service_name)
- item = gtk.MenuItem(activity_info.name)
+ item = gtk.MenuItem(activity_info.get_name())
item.connect('activate', self._open_submenu_item_activate_cb,
service_name)
submenu.append(item)
item.show()
- def _update_items_visibility(self, installable):
- if self._percent == 100 and (self._activities or installable):
+ def _update_items_visibility(self):
+ activities = self._get_activities()
+ installable = self._cb_object.is_bundle()
+ percent = self._cb_object.get_percent()
+
+ if percent == 100 and (activities or installable):
self._remove_item.props.sensitive = True
self._open_item.props.sensitive = True
- #self._stop_item.props.sensitive = False
self._journal_item.props.sensitive = True
- elif self._percent == 100 and \
- (not self._activities and not installable):
+ elif percent == 100 and (not activities and not installable):
self._remove_item.props.sensitive = True
self._open_item.props.sensitive = False
- #self._stop_item.props.sensitive = False
self._journal_item.props.sensitive = True
else:
self._remove_item.props.sensitive = True
self._open_item.props.sensitive = False
- # TODO: reenable the stop item when we implement stoping downloads.
- #self._stop_item.props.sensitive = True
self._journal_item.props.sensitive = False
self._update_progress_bar()
+ def _get_activities(self):
+ mime_type = self._cb_object.get_mime_type()
+ if not mime_type:
+ return ''
+
+ registry = bundleregistry.get_registry()
+ activities = registry.get_activities_for_type(mime_type)
+ if activities:
+ return [info.get_bundle_id() for info in activities]
+ else:
+ return ''
+
def _update_progress_bar(self):
- if self._percent == 100.0:
+ percent = self._cb_object.get_percent()
+ if percent == 100.0:
if self._progress_bar:
self._progress_bar = None
self.set_content(None)
@@ -136,36 +149,44 @@ class ClipboardMenu(Palette):
self._progress_bar.show()
self.set_content(self._progress_bar)
- self._progress_bar.props.fraction = self._percent / 100.0
- self._progress_bar.props.text = '%.2f %%' % self._percent
+ self._progress_bar.props.fraction = percent / 100.0
+ self._progress_bar.props.text = '%.2f %%' % percent
+
+ def _object_state_changed_cb(self, cb_service, cb_object):
+ if cb_object != self._cb_object:
+ return
+ self._update()
- def set_state(self, name, percent, preview, activities, installable):
- self.set_primary_text(name)
- self._percent = percent
- self._activities = activities
+ def _update(self):
+ self.props.primary_text = self._cb_object.get_name()
+ preview = self._cb_object.get_preview()
+ if preview:
+ self.props.secondary_text = preview
self._update_progress_bar()
- self._update_items_visibility(installable)
+ self._update_items_visibility()
self._update_open_submenu()
def _open_item_activate_cb(self, menu_item):
logging.debug('_open_item_activate_cb')
- if self._percent < 100 or menu_item.get_submenu() is not None:
+ percent = self._cb_object.get_percent()
+ if percent < 100 or menu_item.get_submenu() is not None:
return
jobject = self._copy_to_journal()
- jobject.resume(self._activities[0])
+ misc.resume(jobject, self._activities[0])
jobject.destroy()
def _open_submenu_item_activate_cb(self, menu_item, service_name):
logging.debug('_open_submenu_item_activate_cb')
- if self._percent < 100:
+ percent = self._cb_object.get_percent()
+ if percent < 100:
return
jobject = self._copy_to_journal()
- jobject.resume(service_name)
+ misc.resume(jobject, service_name)
jobject.destroy()
def _remove_item_activate_cb(self, menu_item):
- cb_service = clipboardservice.get_instance()
- cb_service.delete_object(self._object_id)
+ cb_service = clipboard.get_instance()
+ cb_service.delete_object(self._cb_object.get_id())
def _journal_item_activate_cb(self, menu_item):
logging.debug('_journal_item_activate_cb')
@@ -181,46 +202,46 @@ class ClipboardMenu(Palette):
return file_path
def _copy_to_journal(self):
- cb_service = clipboardservice.get_instance()
- obj = cb_service.get_object(self._object_id)
-
- format = mime.choose_most_significant(obj['FORMATS'])
- data = cb_service.get_object_data(self._object_id, format)
+ formats = self._cb_object.get_formats().keys()
+ most_significant_mime_type = mime.choose_most_significant(formats)
+ format = self._cb_object.get_formats()[most_significant_mime_type]
transfer_ownership = False
- if format == 'text/uri-list':
- uris = mime.split_uri_list(data['DATA'])
+ if most_significant_mime_type == 'text/uri-list':
+ uris = mime.split_uri_list(format.get_data())
if len(uris) == 1 and uris[0].startswith('file://'):
file_path = urlparse.urlparse(uris[0]).path
transfer_ownership = False
mime_type = mime.get_for_file(file_path)
else:
- file_path = self._write_to_temp_file(data['DATA'])
+ file_path = self._write_to_temp_file(format.get_data())
transfer_ownership = True
mime_type = 'text/uri-list'
else:
- if data['ON_DISK']:
- file_path = urlparse.urlparse(data['DATA']).path
+ if format.is_on_disk():
+ file_path = urlparse.urlparse(format.get_data()).path
transfer_ownership = False
mime_type = mime.get_for_file(file_path)
else:
- file_path = self._write_to_temp_file(data['DATA'])
+ file_path = self._write_to_temp_file(format.get_data())
transfer_ownership = True
sniffed_mime_type = mime.get_for_file(file_path)
if sniffed_mime_type == 'application/octet-stream':
- mime_type = format
+ mime_type = most_significant_mime_type
else:
mime_type = sniffed_mime_type
+ name = self._cb_object.get_name()
jobject = datastore.create()
- jobject.metadata['title'] = _('Clipboard object: %s.') % obj['NAME']
+ jobject.metadata['title'] = _('%s clipping') % name
jobject.metadata['keep'] = '0'
jobject.metadata['buddies'] = ''
jobject.metadata['preview'] = ''
- jobject.metadata['icon-color'] = profile.get_color().to_string()
+ client = gconf.client_get_default()
+ color = client.get_string('/desktop/sugar/user/color')
+ jobject.metadata['icon-color'] = color
jobject.metadata['mime_type'] = mime_type
jobject.file_path = file_path
datastore.write(jobject, transfer_ownership=transfer_ownership)
return jobject
-
diff --git a/service/clipboardobject.py b/src/jarabe/frame/clipboardobject.py
index 06b606c..0a595d0 100644
--- a/service/clipboardobject.py
+++ b/src/jarabe/frame/clipboardobject.py
@@ -18,11 +18,11 @@ import os
import logging
import urlparse
+from gettext import gettext as _
from sugar import mime
+from sugar.bundle.activitybundle import ActivityBundle
-import bundleregistry
-
-class ClipboardObject:
+class ClipboardObject(object):
def __init__(self, object_path, name):
self._id = object_path
@@ -40,30 +40,30 @@ class ClipboardObject:
def get_name(self):
name = self._name
if not name:
- name = mime.get_mime_description(self.get_mime_type())
- if not name:
- name = ''
+ mime_type = mime.get_mime_description(self.get_mime_type())
+
+ if not mime_type:
+ mime_type = 'Data'
+ name = _('%s clipping') % mime_type
+
return name
def get_icon(self):
return mime.get_mime_icon(self.get_mime_type())
def get_preview(self):
- # TODO: should previews really be here?
- #return self._get_type_info().get_preview()
+ for mime_type in ['text/plain']:
+ if mime_type in self._formats:
+ return self._formats[mime_type].get_data()
return ''
- def get_activities(self):
- mime_type = self.get_mime_type()
- if not mime_type:
- return ''
-
- registry = bundleregistry.get_registry()
- activities = registry.get_activities_for_type(self.get_mime_type())
- if activities:
- return [activity.get_bundle_id() for activity in activities]
+ def is_bundle(self):
+ # A bundle will have only one format.
+ if not self._formats:
+ return False
else:
- return ''
+ return self._formats.keys()[0] in [ActivityBundle.MIME_TYPE,
+ ActivityBundle.DEPRECATED_MIME_TYPE]
def get_percent(self):
return self._percent
@@ -94,7 +94,7 @@ class ClipboardObject:
return format
-class Format:
+class Format(object):
def __init__(self, mime_type, data, on_disk):
self.owns_disk_data = False
diff --git a/src/view/frame/clipboardpanelwindow.py b/src/jarabe/frame/clipboardpanelwindow.py
index 10b234b..7093199 100644
--- a/src/view/frame/clipboardpanelwindow.py
+++ b/src/jarabe/frame/clipboardpanelwindow.py
@@ -20,9 +20,10 @@ from urlparse import urlparse
import gtk
import hippo
-from view.frame.framewindow import FrameWindow
-from view.frame.clipboardtray import ClipboardTray
-from sugar.clipboard import clipboardservice
+from jarabe.frame.framewindow import FrameWindow
+from jarabe.frame.clipboardtray import ClipboardTray
+
+from jarabe.frame import clipboard
class ClipboardPanelWindow(FrameWindow):
def __init__(self, frame, orientation):
@@ -43,26 +44,27 @@ class ClipboardPanelWindow(FrameWindow):
# Receiving dnd drops
self.drag_dest_set(0, [], 0)
self.connect("drag_motion", self._clipboard_tray.drag_motion_cb)
+ self.connect("drag_leave", self._clipboard_tray.drag_leave_cb)
self.connect("drag_drop", self._clipboard_tray.drag_drop_cb)
self.connect("drag_data_received",
self._clipboard_tray.drag_data_received_cb)
- def _owner_change_cb(self, clipboard, event):
+ def _owner_change_cb(self, x_clipboard, event):
logging.debug("owner_change_cb")
if self._clipboard_tray.owns_clipboard():
return
- cb_service = clipboardservice.get_instance()
+ cb_service = clipboard.get_instance()
key = cb_service.add_object(name="")
cb_service.set_object_percent(key, percent=0)
- targets = clipboard.wait_for_targets()
+ targets = x_clipboard.wait_for_targets()
for target in targets:
if target not in ('TIMESTAMP', 'TARGETS',
'MULTIPLE', 'SAVE_TARGETS'):
logging.debug('Asking for target %s.' % target)
- selection = clipboard.wait_for_contents(target)
+ selection = x_clipboard.wait_for_contents(target)
if not selection:
logging.warning('no data for selection target %s.' % target)
continue
@@ -77,7 +79,7 @@ class ClipboardPanelWindow(FrameWindow):
logging.debug('adding type ' + selection.type + '.')
- cb_service = clipboardservice.get_instance()
+ cb_service = clipboard.get_instance()
if selection.type == 'text/uri-list':
uris = selection.get_uris()
diff --git a/src/view/frame/clipboardtray.py b/src/jarabe/frame/clipboardtray.py
index b5ba093..40f0a32 100644
--- a/src/view/frame/clipboardtray.py
+++ b/src/jarabe/frame/clipboardtray.py
@@ -21,13 +21,13 @@ import tempfile
import gtk
from sugar import util
-from sugar.clipboard import clipboardservice
from sugar.graphics import tray
from sugar.graphics import style
-from view.clipboardicon import ClipboardIcon
+from jarabe.frame import clipboard
+from jarabe.frame.clipboardicon import ClipboardIcon
-class _ContextMap:
+class _ContextMap(object):
"""Maps a drag context to the clipboard object involved in the dragging."""
def __init__(self):
self._context_map = {}
@@ -65,7 +65,7 @@ class ClipboardTray(tray.VTray):
self._icons = {}
self._context_map = _ContextMap()
- cb_service = clipboardservice.get_instance()
+ cb_service = clipboard.get_instance()
cb_service.connect('object-added', self._object_added_cb)
cb_service.connect('object-deleted', self._object_deleted_cb)
@@ -79,9 +79,9 @@ class ClipboardTray(tray.VTray):
if not selection.data:
return
- logging.debug('ClipboardTray: adding type ' + selection.type)
+ logging.debug('ClipboardTray: adding type %r' % selection.type)
- cb_service = clipboardservice.get_instance()
+ cb_service = clipboard.get_instance()
if selection.type == 'text/uri-list':
uris = selection.data.split('\n')
if len(uris) > 1:
@@ -98,39 +98,55 @@ class ClipboardTray(tray.VTray):
selection.data,
on_disk=False)
- def _object_added_cb(self, cb_service, object_id, name):
+ def _object_added_cb(self, cb_service, cb_object):
if self._icons:
group = self._icons.values()[0]
else:
group = None
- icon = ClipboardIcon(object_id, name, group)
+ icon = ClipboardIcon(cb_object, group)
self.add_item(icon)
icon.show()
- self._icons[object_id] = icon
+ self._icons[cb_object.get_id()] = icon
objects_to_delete = self.get_children()[:-self.MAX_ITEMS]
for icon in objects_to_delete:
logging.debug('ClipboardTray: deleting surplus object')
- cb_service = clipboardservice.get_instance()
+ cb_service = clipboard.get_instance()
cb_service.delete_object(icon.get_object_id())
- logging.debug('ClipboardTray: ' + object_id + ' was added.')
+ logging.debug('ClipboardTray: %r was added' % cb_object.get_id())
def _object_deleted_cb(self, cb_service, object_id):
icon = self._icons[object_id]
self.remove_item(icon)
del self._icons[object_id]
- logging.debug('ClipboardTray: ' + object_id + ' was deleted.')
+ logging.debug('ClipboardTray: %r was deleted' % object_id)
def drag_motion_cb(self, widget, context, x, y, time):
logging.debug('ClipboardTray._drag_motion_cb')
- context.drag_status(gtk.gdk.ACTION_COPY, time)
+
+ if self._internal_drag(context):
+ context.drag_status(gtk.gdk.ACTION_MOVE, time)
+ else:
+ context.drag_status(gtk.gdk.ACTION_COPY, time)
+ self.props.drag_active = True
+
return True
+ def drag_leave_cb(self, widget, context, time):
+ self.props.drag_active = False
+
def drag_drop_cb(self, widget, context, x, y, time):
logging.debug('ClipboardTray._drag_drop_cb')
- cb_service = clipboardservice.get_instance()
+
+ if self._internal_drag(context):
+ # TODO: We should move the object within the clipboard here
+ if not self._context_map.has_context(context):
+ context.drop_finish(False, gtk.get_current_event_time())
+ return False
+
+ cb_service = clipboard.get_instance()
object_id = cb_service.add_object(name="")
self._context_map.add_context(context, object_id, len(context.targets))
@@ -179,8 +195,8 @@ class ClipboardTray(tray.VTray):
prop_type, format_, dest = \
window.property_get('XdndDirectSave0', 'text/plain')
- clipboard = clipboardservice.get_instance()
- clipboard.add_object_format( \
+ clipboardservice = clipboard.get_instance()
+ clipboardservice.add_object_format( \
object_id, 'XdndDirectSave0', dest, on_disk=True)
else:
self._add_selection(object_id, selection)
@@ -191,3 +207,10 @@ class ClipboardTray(tray.VTray):
if not self._context_map.has_context(context):
context.drop_finish(True, gtk.get_current_event_time())
+ def _internal_drag(self, context):
+ view_ancestor = context.get_source_widget().get_ancestor(gtk.Viewport)
+ if view_ancestor is self._viewport:
+ return True
+ else:
+ return False
+
diff --git a/src/jarabe/frame/devicestray.py b/src/jarabe/frame/devicestray.py
new file mode 100644
index 0000000..72affe3
--- /dev/null
+++ b/src/jarabe/frame/devicestray.py
@@ -0,0 +1,54 @@
+# Copyright (C) 2008 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
+
+import os
+import sys
+import traceback
+import logging
+
+from sugar.graphics import tray
+
+from jarabe import config
+
+class DevicesTray(tray.HTray):
+ def __init__(self):
+ tray.HTray.__init__(self, align=tray.ALIGN_TO_END)
+
+ for f in os.listdir(os.path.join(config.ext_path, 'deviceicon')):
+ if f.endswith('.py') and not f.startswith('__'):
+ module_name = f[:-3]
+ try:
+ mod = __import__('deviceicon.' + module_name, globals(),
+ locals(), [module_name])
+ mod.setup(self)
+ except Exception:
+ logging.error('Exception while loading extension:\n' + \
+ ''.join(traceback.format_exception(*sys.exc_info())))
+
+ def add_device(self, view):
+ index = 0
+ relative_index = getattr(view, "FRAME_POSITION_RELATIVE", -1)
+ for item in self.get_children():
+ current_relative_index = getattr(item, "FRAME_POSITION_RELATIVE", 0)
+ if current_relative_index >= relative_index:
+ index += 1
+ else:
+ break
+ self.add_item(view, index=index)
+ view.show()
+
+ def remove_device(self, view):
+ self.remove_item(view)
diff --git a/src/view/frame/eventarea.py b/src/jarabe/frame/eventarea.py
index 0eba150..5b31b24 100644
--- a/src/view/frame/eventarea.py
+++ b/src/jarabe/frame/eventarea.py
@@ -17,8 +17,7 @@
import gtk
import gobject
import wnck
-
-from sugar import profile
+import gconf
_MAX_DELAY = 1000
@@ -36,43 +35,47 @@ class EventArea(gobject.GObject):
self._windows = []
self._hover = False
self._sids = {}
- pro = profile.get_profile()
- self._hot_delay = int(pro.hot_corners_delay)
- self._warm_delay = int(pro.warm_edges_delay)
+ client = gconf.client_get_default()
+ self._edge_delay = client.get_int('/desktop/sugar/frame/edge_delay')
+ self._corner_delay = client.get_int('/desktop/sugar/frame/corner_delay')
right = gtk.gdk.screen_width() - 1
bottom = gtk.gdk.screen_height() -1
width = gtk.gdk.screen_width() - 2
height = gtk.gdk.screen_height() - 2
- if self._warm_delay != _MAX_DELAY:
- invisible = self._create_invisible(1, 0, width, 1, self._warm_delay)
+ if self._edge_delay != _MAX_DELAY:
+ invisible = self._create_invisible(1, 0, width, 1,
+ self._edge_delay)
self._windows.append(invisible)
invisible = self._create_invisible(1, bottom, width, 1,
- self._warm_delay)
+ self._edge_delay)
self._windows.append(invisible)
invisible = self._create_invisible(0, 1, 1, height,
- self._warm_delay)
+ self._edge_delay)
self._windows.append(invisible)
invisible = self._create_invisible(right, 1, 1, height,
- self._warm_delay)
+ self._edge_delay)
self._windows.append(invisible)
- if self._hot_delay != _MAX_DELAY:
- invisible = self._create_invisible(0, 0, 1, 1, self._hot_delay)
+ if self._corner_delay != _MAX_DELAY:
+ invisible = self._create_invisible(0, 0, 1, 1,
+ self._corner_delay)
self._windows.append(invisible)
- invisible = self._create_invisible(right, 0, 1, 1, self._hot_delay)
+ invisible = self._create_invisible(right, 0, 1, 1,
+ self._corner_delay)
self._windows.append(invisible)
- invisible = self._create_invisible(0, bottom, 1, 1, self._hot_delay)
+ invisible = self._create_invisible(0, bottom, 1, 1,
+ self._corner_delay)
self._windows.append(invisible)
invisible = self._create_invisible(right, bottom, 1, 1,
- self._hot_delay)
+ self._corner_delay)
self._windows.append(invisible)
screen = wnck.screen_get_default()
diff --git a/src/view/frame/frame.py b/src/jarabe/frame/frame.py
index c3f0de9..6ba8814 100644
--- a/src/view/frame/frame.py
+++ b/src/jarabe/frame/frame.py
@@ -23,16 +23,17 @@ import hippo
from sugar.graphics import animator
from sugar.graphics import style
from sugar.graphics import palettegroup
-
-import view.Shell
-from view.frame.eventarea import EventArea
-from view.frame.activitiestray import ActivitiesTray
-from view.frame.zoomtoolbar import ZoomToolbar
-from view.frame.friendstray import FriendsTray
-from view.frame.devicestray import DevicesTray
-from view.frame.framewindow import FrameWindow
-from view.frame.clipboardpanelwindow import ClipboardPanelWindow
-from view.frame.notification import NotificationIcon, NotificationWindow
+from sugar import profile
+
+from jarabe.frame.eventarea import EventArea
+from jarabe.frame.activitiestray import ActivitiesTray
+from jarabe.frame.zoomtoolbar import ZoomToolbar
+from jarabe.frame.friendstray import FriendsTray
+from jarabe.frame.devicestray import DevicesTray
+from jarabe.frame.framewindow import FrameWindow
+from jarabe.frame.clipboardpanelwindow import ClipboardPanelWindow
+from jarabe.frame.notification import NotificationIcon, NotificationWindow
+from jarabe.model import notifications
TOP_RIGHT = 0
TOP_LEFT = 1
@@ -95,6 +96,7 @@ class Frame(object):
MODE_NON_INTERACTIVE = 2
def __init__(self):
+ logging.debug("STARTUP: Loading the frame")
self.mode = None
self._palette_group = palettegroup.get_group('frame')
@@ -125,9 +127,17 @@ class Frame(object):
self._notif_by_icon = {}
+ notification_service = notifications.get_service()
+ notification_service.notification_received.connect(
+ self.__notification_received_cb)
+ notification_service.notification_cancelled.connect(
+ self.__notification_cancelled_cb)
+
def is_visible(self):
return self.current_position != 0.0
+ visible = property(is_visible, None)
+
def hide(self):
if self._animator:
self._animator.stop()
@@ -276,20 +286,22 @@ class Frame(object):
def notify_key_press(self):
self._key_listener.key_press()
- def add_notification(self, icon, corner=TOP_LEFT):
+ def add_notification(self, icon, corner=gtk.CORNER_TOP_LEFT,
+ duration=_NOTIFICATION_DURATION):
+
if not isinstance(icon, NotificationIcon):
raise TypeError('icon must be a NotificationIcon.')
window = NotificationWindow()
screen = gtk.gdk.screen_get_default()
- if corner == TOP_LEFT:
+ if corner == gtk.CORNER_TOP_LEFT:
window.move(0, 0)
- elif corner == TOP_RIGHT:
+ elif corner == gtk.CORNER_TOP_RIGHT:
window.move(screen.get_width() - style.GRID_CELL_SIZE, 0)
- elif corner == BOTTOM_LEFT:
+ elif corner == gtk.CORNER_BOTTOM_LEFT:
window.move(0, screen.get_height() - style.GRID_CELL_SIZE)
- elif corner == BOTTOM_RIGHT:
+ elif corner == gtk.CORNER_BOTTOM_RIGHT:
window.move(screen.get_width() - style.GRID_CELL_SIZE,
screen.get_height() - style.GRID_CELL_SIZE)
else:
@@ -301,7 +313,7 @@ class Frame(object):
self._notif_by_icon[icon] = window
- gobject.timeout_add(_NOTIFICATION_DURATION,
+ gobject.timeout_add(duration,
lambda: self.remove_notification(icon))
def remove_notification(self, icon):
@@ -316,13 +328,31 @@ class Frame(object):
window.destroy()
del self._notif_by_icon[icon]
- visible = property(is_visible, None)
+ def __notification_received_cb(self, **kwargs):
+ logging.debug('__notification_received_cb %r' % kwargs)
+ icon = NotificationIcon()
+
+ hints = kwargs['hints']
+
+ icon_file_name = hints.get('x-sugar-icon-file-name', '')
+ if icon_file_name:
+ icon.props.icon_filename = icon_file_name
+ else:
+ icon.props.icon_name = 'application-octet-stream'
+
+ icon_colors = hints.get('x-sugar-icon-colors', '')
+ if not icon_colors:
+ icon_colors = profile.get_color()
+ icon.props.xo_color = icon_colors
+
+ duration = kwargs.get('expire_timeout', -1)
+ if duration == -1:
+ duration = _NOTIFICATION_DURATION
-_instance = None
+ self.add_notification(icon, gtk.CORNER_TOP_RIGHT, duration)
-def get_instance():
- global _instance
- if not _instance:
- _instance = Frame()
- return _instance
+ def __notification_cancelled_cb(self, **kwargs):
+ # Do nothing for now. Our notification UI is so simple, there's no
+ # point yet.
+ pass
diff --git a/src/view/frame/frameinvoker.py b/src/jarabe/frame/frameinvoker.py
index e4a13e1..e4a13e1 100644
--- a/src/view/frame/frameinvoker.py
+++ b/src/jarabe/frame/frameinvoker.py
diff --git a/src/view/frame/framewindow.py b/src/jarabe/frame/framewindow.py
index 623d162..623d162 100644
--- a/src/view/frame/framewindow.py
+++ b/src/jarabe/frame/framewindow.py
diff --git a/src/view/frame/friendstray.py b/src/jarabe/frame/friendstray.py
index 7236d75..7e15f14 100644
--- a/src/view/frame/friendstray.py
+++ b/src/jarabe/frame/friendstray.py
@@ -17,11 +17,10 @@
from sugar.presence import presenceservice
from sugar.graphics.tray import VTray, TrayIcon
-import view.Shell
-from view.BuddyMenu import BuddyMenu
-from view.frame.frameinvoker import FrameWidgetInvoker
-from model import shellmodel
-from model.BuddyModel import BuddyModel
+from jarabe.view.buddymenu import BuddyMenu
+from jarabe.frame.frameinvoker import FrameWidgetInvoker
+from jarabe.model import shell
+from jarabe.model.buddy import BuddyModel
class FriendIcon(TrayIcon):
def __init__(self, buddy):
@@ -48,14 +47,13 @@ class FriendsTray(VTray):
self.__activity_appeared_cb)
self._owner = self._pservice.get_owner()
-
+
# Add initial activities the PS knows about
self._pservice.get_activities_async( \
reply_handler=self._get_activities_cb)
- home_model = shellmodel.get_instance().get_home()
- home_model.connect('active-activity-changed',
- self._active_activity_changed_cb)
+ shell.get_model().connect('active-activity-changed',
+ self._active_activity_changed_cb)
def _get_activities_cb(self, activities_list):
for act in activities_list:
@@ -87,8 +85,8 @@ class FriendsTray(VTray):
self._buddies = {}
def __activity_appeared_cb(self, pservice, activity_ps):
- activity = view.Shell.get_instance().get_current_activity()
- if activity and activity_ps.props.id == activity.get_id():
+ activity = shell.get_model().get_active_activity()
+ if activity and activity_ps.props.id == activity.get_activity_id():
self._set_activity_ps(activity_ps, True)
def _set_activity_ps(self, activity_ps, shared_activity):
diff --git a/src/view/frame/notification.py b/src/jarabe/frame/notification.py
index 8a779f3..61a84e9 100644
--- a/src/view/frame/notification.py
+++ b/src/jarabe/frame/notification.py
@@ -20,7 +20,7 @@ import gtk
from sugar.graphics import style
from sugar.graphics.xocolor import XoColor
-from view.pulsingicon import PulsingIcon
+from jarabe.view.pulsingicon import PulsingIcon
class NotificationIcon(gtk.EventBox):
__gtype_name__ = 'SugarNotificationIcon'
@@ -31,7 +31,7 @@ class NotificationIcon(gtk.EventBox):
'icon-filename' : (str, None, None, None, gobject.PARAM_READWRITE)
}
- _PULSE_TIMEOUT = 3000
+ _PULSE_TIMEOUT = 3
def __init__(self, **kwargs):
self._icon = PulsingIcon(pixel_size=style.STANDARD_ICON_SIZE)
@@ -45,7 +45,7 @@ class NotificationIcon(gtk.EventBox):
self.add(self._icon)
self._icon.show()
- gobject.timeout_add(self._PULSE_TIMEOUT, self.__stop_pulsing_cb)
+ gobject.timeout_add_seconds(self._PULSE_TIMEOUT, self.__stop_pulsing_cb)
self.set_size_request(style.GRID_CELL_SIZE, style.GRID_CELL_SIZE)
diff --git a/src/view/frame/zoomtoolbar.py b/src/jarabe/frame/zoomtoolbar.py
index ed8d048..43cc358 100644
--- a/src/view/frame/zoomtoolbar.py
+++ b/src/jarabe/frame/zoomtoolbar.py
@@ -22,9 +22,8 @@ import gtk
from sugar.graphics.palette import Palette
from sugar.graphics.radiotoolbutton import RadioToolButton
-import view.Shell
-from view.frame.frameinvoker import FrameWidgetInvoker
-from model import shellmodel
+from jarabe.frame.frameinvoker import FrameWidgetInvoker
+from jarabe.model import shell
class ZoomToolbar(gtk.Toolbar):
def __init__(self):
@@ -34,17 +33,17 @@ class ZoomToolbar(gtk.Toolbar):
self.set_direction(gtk.TEXT_DIR_LTR)
self._mesh_button = self._add_button('zoom-neighborhood',
- _('Neighborhood'), shellmodel.ShellModel.ZOOM_MESH)
+ _('Neighborhood'), shell.ShellModel.ZOOM_MESH)
self._groups_button = self._add_button('zoom-groups',
- _('Group'), shellmodel.ShellModel.ZOOM_FRIENDS)
+ _('Group'), shell.ShellModel.ZOOM_GROUP)
self._home_button = self._add_button('zoom-home',
- _('Home'), shellmodel.ShellModel.ZOOM_HOME)
+ _('Home'), shell.ShellModel.ZOOM_HOME)
self._activity_button = self._add_button('zoom-activity',
- _('Activity'), shellmodel.ShellModel.ZOOM_ACTIVITY)
+ _('Activity'), shell.ShellModel.ZOOM_ACTIVITY)
- shell_model = shellmodel.get_instance()
- self._set_zoom_level(shell_model.props.zoom_level)
- shell_model.connect('notify::zoom-level', self.__notify_zoom_level_cb)
+ shell_model = shell.get_model()
+ self._set_zoom_level(shell_model.zoom_level)
+ shell_model.zoom_level_changed.connect(self.__zoom_level_changed_cb)
def _add_button(self, icon_name, label, zoom_level):
if self.get_children():
@@ -67,21 +66,21 @@ class ZoomToolbar(gtk.Toolbar):
def __level_clicked_cb(self, button, level):
if not button.get_active():
return
- if shellmodel.get_instance().props.zoom_level != level:
- view.Shell.get_instance().set_zoom_level(level)
- def __notify_zoom_level_cb(self, model, pspec):
- self._set_zoom_level(model.props.zoom_level)
+ shell.get_model().zoom_level = level
+
+ def __zoom_level_changed_cb(self, **kwargs):
+ self._set_zoom_level(kwargs['new_level'])
def _set_zoom_level(self, new_level):
logging.debug('new zoom level: %r' % new_level)
- if new_level == shellmodel.ShellModel.ZOOM_MESH:
+ if new_level == shell.ShellModel.ZOOM_MESH:
self._mesh_button.props.active = True
- elif new_level == shellmodel.ShellModel.ZOOM_FRIENDS:
+ elif new_level == shell.ShellModel.ZOOM_GROUP:
self._groups_button.props.active = True
- elif new_level == shellmodel.ShellModel.ZOOM_HOME:
+ elif new_level == shell.ShellModel.ZOOM_HOME:
self._home_button.props.active = True
- elif new_level == shellmodel.ShellModel.ZOOM_ACTIVITY:
+ elif new_level == shell.ShellModel.ZOOM_ACTIVITY:
self._activity_button.props.active = True
else:
raise ValueError('Invalid zoom level: %r' % (new_level))
diff --git a/src/jarabe/intro/Makefile.am b/src/jarabe/intro/Makefile.am
new file mode 100644
index 0000000..a9fb96b
--- /dev/null
+++ b/src/jarabe/intro/Makefile.am
@@ -0,0 +1,9 @@
+imagedir = $(pythondir)/jarabe/intro
+image_DATA = default-picture.png
+
+EXTRA_DIST = $(conf_DATA) $(image_DATA)
+sugardir = $(pythondir)/jarabe/intro
+sugar_PYTHON = \
+ __init__.py \
+ colorpicker.py \
+ window.py
diff --git a/src/intro/Makefile.in b/src/jarabe/intro/Makefile.in
index f8ad7d1..473d6cd 100644
--- a/src/intro/Makefile.in
+++ b/src/jarabe/intro/Makefile.in
@@ -30,7 +30,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/intro
+subdir = src/jarabe/intro
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -76,6 +76,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -190,17 +193,17 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-imagedir = $(pkgdatadir)/shell/intro
+imagedir = $(pythondir)/jarabe/intro
image_DATA = default-picture.png
EXTRA_DIST = $(conf_DATA) $(image_DATA)
-sugardir = $(pkgdatadir)/shell/intro
+sugardir = $(pythondir)/jarabe/intro
sugar_PYTHON = \
- __init__.py \
- colorpicker.py \
- intro.py \
- glive.py
+ __init__.py \
+ colorpicker.py \
+ window.py
all: all-am
@@ -214,9 +217,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/intro/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/jarabe/intro/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/intro/Makefile
+ $(AUTOMAKE) --foreign src/jarabe/intro/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/jarabe/intro/__init__.py b/src/jarabe/intro/__init__.py
new file mode 100644
index 0000000..204f686
--- /dev/null
+++ b/src/jarabe/intro/__init__.py
@@ -0,0 +1,21 @@
+import os
+
+import gtk
+
+from sugar import env
+from sugar.profile import get_profile
+
+from jarabe.intro.window import IntroWindow
+from jarabe.intro.window import create_profile
+
+def check_profile():
+ profile = get_profile()
+
+ path = os.path.join(env.get_profile_path(), 'config')
+ if os.path.exists(path):
+ profile.convert_profile()
+
+ if not profile.is_valid():
+ win = IntroWindow()
+ win.show_all()
+ gtk.main()
diff --git a/src/intro/colorpicker.py b/src/jarabe/intro/colorpicker.py
index a939857..a939857 100644
--- a/src/intro/colorpicker.py
+++ b/src/jarabe/intro/colorpicker.py
diff --git a/src/intro/default-picture.png b/src/jarabe/intro/default-picture.png
index e26b9b0..e26b9b0 100644
--- a/src/intro/default-picture.png
+++ b/src/jarabe/intro/default-picture.png
Binary files differ
diff --git a/src/intro/intro.py b/src/jarabe/intro/window.py
index 342ce1d..3975900 100644
--- a/src/intro/intro.py
+++ b/src/jarabe/intro/window.py
@@ -15,23 +15,50 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import os
+import logging
from gettext import gettext as _
+import gconf
import gtk
import gobject
import hippo
-import logging
from sugar import env
from sugar.graphics import style
from sugar.graphics.icon import Icon
from sugar.graphics.entry import CanvasEntry
-from sugar.profile import get_profile
+from sugar.graphics.xocolor import XoColor
-import colorpicker
+from jarabe.intro import colorpicker
_BACKGROUND_COLOR = style.COLOR_WHITE
+def create_profile(name, color=None, pixbuf=None):
+ if not pixbuf:
+ path = os.path.join(os.path.dirname(__file__), 'default-picture.png')
+ pixbuf = gtk.gdk.pixbuf_new_from_file(path)
+
+ if not color:
+ color = XoColor()
+
+ icon_path = os.path.join(env.get_profile_path(), "buddy-icon.jpg")
+ pixbuf.save(icon_path, "jpeg", {"quality":"85"})
+
+ client = gconf.client_get_default()
+ client.set_string("/desktop/sugar/user/nick", name)
+ client.set_string("/desktop/sugar/user/color", color.to_string())
+
+ # Generate keypair
+ import commands
+ keypath = os.path.join(env.get_profile_path(), "owner.key")
+ if not os.path.isfile(keypath):
+ cmd = "ssh-keygen -q -t dsa -f %s -C '' -N ''" % keypath
+ (s, o) = commands.getstatusoutput(cmd)
+ if s != 0:
+ logging.error("Could not generate key pair: %d %s" % (s, o))
+ else:
+ logging.error("Keypair exists, skip generation.")
+
class _Page(hippo.CanvasBox):
__gproperties__ = {
'valid' : (bool, None, None, False,
@@ -110,8 +137,7 @@ class _ColorPage(_Page):
class _IntroBox(hippo.CanvasBox):
__gsignals__ = {
'done': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT,
- gobject.TYPE_PYOBJECT]))
+ ([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT]))
}
PAGE_NAME = 0
@@ -206,12 +232,10 @@ class _IntroBox(hippo.CanvasBox):
self.done()
def done(self):
- path = os.path.join(os.path.dirname(__file__), 'default-picture.png')
- pixbuf = gtk.gdk.pixbuf_new_from_file(path)
name = self._name_page.get_name()
color = self._color_page.get_color()
- self.emit('done', pixbuf, name, color)
+ self.emit('done', name, color)
class IntroWindow(gtk.Window):
def __init__(self):
@@ -226,32 +250,14 @@ class IntroWindow(gtk.Window):
self._canvas.show()
self.connect('key-press-event', self.__key_press_cb)
- def _done_cb(self, box, pixbuf, name, color):
+ def _done_cb(self, box, name, color):
self.hide()
- gobject.idle_add(self._create_profile, pixbuf, name, color)
-
- def _create_profile(self, pixbuf, name, color):
- # Save the buddy icon
- icon_path = os.path.join(env.get_profile_path(), "buddy-icon.jpg")
- pixbuf.save(icon_path, "jpeg", {"quality":"85"})
-
- profile = get_profile()
- profile.nick_name = name
- profile.color = color
- profile.save()
-
- # Generate keypair
- import commands
- keypath = os.path.join(env.get_profile_path(), "owner.key")
- if not os.path.isfile(keypath):
- cmd = "ssh-keygen -q -t dsa -f %s -C '' -N ''" % keypath
- (s, o) = commands.getstatusoutput(cmd)
- if s != 0:
- logging.error("Could not generate key pair: %d %s" % (s, o))
- else:
- logging.error("Keypair exists, skip generation.")
+ gobject.idle_add(self._create_profile_cb, name, color)
+ def _create_profile_cb(self, name, color):
+ create_profile(name, color)
gtk.main_quit()
+
return False
def __key_press_cb(self, widget, event):
diff --git a/src/jarabe/journal/Makefile.am b/src/jarabe/journal/Makefile.am
new file mode 100644
index 0000000..5f66480
--- /dev/null
+++ b/src/jarabe/journal/Makefile.am
@@ -0,0 +1,17 @@
+sugardir = $(pythondir)/jarabe/journal
+sugar_PYTHON = \
+ __init__.py \
+ collapsedentry.py \
+ detailview.py \
+ expandedentry.py \
+ journalactivity.py \
+ journalentrybundle.py \
+ journaltoolbox.py \
+ keepicon.py \
+ listview.py \
+ misc.py \
+ modalalert.py \
+ model.py \
+ objectchooser.py \
+ palettes.py \
+ volumestoolbar.py
diff --git a/src/view/devices/network/Makefile.in b/src/jarabe/journal/Makefile.in
index 388045d..7755eaf 100644
--- a/src/view/devices/network/Makefile.in
+++ b/src/jarabe/journal/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/view/devices/network
+subdir = src/jarabe/journal
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,14 +190,26 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/view/devices/network
+sugardir = $(pythondir)/jarabe/journal
sugar_PYTHON = \
__init__.py \
- mesh.py \
- wired.py \
- wireless.py
+ collapsedentry.py \
+ detailview.py \
+ expandedentry.py \
+ journalactivity.py \
+ journalentrybundle.py \
+ journaltoolbox.py \
+ keepicon.py \
+ listview.py \
+ misc.py \
+ modalalert.py \
+ model.py \
+ objectchooser.py \
+ palettes.py \
+ volumestoolbar.py
all: all-am
@@ -208,9 +223,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/view/devices/network/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/jarabe/journal/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/view/devices/network/Makefile
+ $(AUTOMAKE) --foreign src/jarabe/journal/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/intro/__init__.py b/src/jarabe/journal/__init__.py
index e69de29..e69de29 100644
--- a/src/intro/__init__.py
+++ b/src/jarabe/journal/__init__.py
diff --git a/src/jarabe/journal/collapsedentry.py b/src/jarabe/journal/collapsedentry.py
new file mode 100644
index 0000000..bf29199
--- /dev/null
+++ b/src/jarabe/journal/collapsedentry.py
@@ -0,0 +1,372 @@
+# 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
+
+import logging
+from gettext import gettext as _
+
+import gobject
+import gtk
+import hippo
+import cjson
+
+from sugar.graphics.icon import CanvasIcon
+from sugar.graphics.xocolor import XoColor
+from sugar.graphics import style
+from sugar.graphics.entry import CanvasEntry
+
+from jarabe.journal.keepicon import KeepIcon
+from jarabe.journal.palettes import ObjectPalette, BuddyPalette
+from jarabe.journal import misc
+from jarabe.journal import model
+
+class BuddyIcon(CanvasIcon):
+ def __init__(self, buddy, **kwargs):
+ CanvasIcon.__init__(self, **kwargs)
+ self._buddy = buddy
+
+ def create_palette(self):
+ return BuddyPalette(self._buddy)
+
+class BuddyList(hippo.CanvasBox):
+ def __init__(self, buddies, width):
+ hippo.CanvasBox.__init__(self,
+ orientation=hippo.ORIENTATION_HORIZONTAL,
+ box_width=width,
+ xalign=hippo.ALIGNMENT_START)
+ self.set_buddies(buddies)
+
+ def set_buddies(self, buddies):
+ for item in self.get_children():
+ self.remove(item)
+
+ for buddy in buddies[0:3]:
+ nick_, color = buddy
+ icon = BuddyIcon(buddy,
+ icon_name='computer-xo',
+ xo_color=XoColor(color),
+ cache=True)
+ self.append(icon)
+
+class EntryIcon(CanvasIcon):
+ def __init__(self, **kwargs):
+ CanvasIcon.__init__(self, **kwargs)
+ self._metadata = None
+
+ def set_metadata(self, metadata):
+ self._metadata = metadata
+ self.props.file_name = misc.get_icon_name(metadata)
+ self.palette = None
+
+ def create_palette(self):
+ if self.show_palette:
+ return ObjectPalette(self._metadata)
+ else:
+ return None
+
+ show_palette = gobject.property(type=bool, default=False)
+
+class BaseCollapsedEntry(hippo.CanvasBox):
+ __gtype_name__ = 'BaseCollapsedEntry'
+
+ _DATE_COL_WIDTH = style.GRID_CELL_SIZE * 3
+ _BUDDIES_COL_WIDTH = style.GRID_CELL_SIZE * 3
+ _PROGRESS_COL_WIDTH = style.GRID_CELL_SIZE * 5
+
+ def __init__(self):
+ hippo.CanvasBox.__init__(self,
+ spacing=style.DEFAULT_SPACING,
+ padding_top=style.DEFAULT_PADDING,
+ padding_bottom=style.DEFAULT_PADDING,
+ padding_left=style.DEFAULT_PADDING * 2,
+ padding_right=style.DEFAULT_PADDING * 2,
+ box_height=style.GRID_CELL_SIZE,
+ orientation=hippo.ORIENTATION_HORIZONTAL)
+
+ self._metadata = None
+ self._is_selected = False
+
+ self.keep_icon = self._create_keep_icon()
+ self.append(self.keep_icon)
+
+ self.icon = self._create_icon()
+ self.append(self.icon)
+
+ self.title = self._create_title()
+ self.append(self.title, hippo.PACK_EXPAND)
+
+ self.buddies_list = self._create_buddies_list()
+ self.append(self.buddies_list)
+
+ self.date = self._create_date()
+ self.append(self.date)
+
+ # Progress controls
+ self.progress_bar = self._create_progress_bar()
+ self.append(self.progress_bar)
+
+ self.cancel_button = self._create_cancel_button()
+ self.append(self.cancel_button)
+
+ def _create_keep_icon(self):
+ keep_icon = KeepIcon(False)
+ keep_icon.connect('button-release-event',
+ self.__keep_icon_button_release_event_cb)
+ return keep_icon
+
+ def _create_date(self):
+ date = hippo.CanvasText(text='',
+ xalign=hippo.ALIGNMENT_START,
+ font_desc=style.FONT_NORMAL.get_pango_desc(),
+ box_width=self._DATE_COL_WIDTH)
+ return date
+
+ def _create_icon(self):
+ icon = EntryIcon(size=style.STANDARD_ICON_SIZE, cache=True)
+ return icon
+
+ def _create_title(self):
+ # TODO: We'd prefer to ellipsize in the middle
+ title = hippo.CanvasText(text='',
+ xalign=hippo.ALIGNMENT_START,
+ font_desc=style.FONT_BOLD.get_pango_desc(),
+ size_mode=hippo.CANVAS_SIZE_ELLIPSIZE_END)
+ return title
+
+ def _create_buddies_list(self):
+ return BuddyList([], self._BUDDIES_COL_WIDTH)
+
+ def _create_progress_bar(self):
+ progress_bar = gtk.ProgressBar()
+ return hippo.CanvasWidget(widget=progress_bar,
+ yalign=hippo.ALIGNMENT_CENTER,
+ box_width=self._PROGRESS_COL_WIDTH)
+
+ def _create_cancel_button(self):
+ button = CanvasIcon(icon_name='activity-stop',
+ size=style.SMALL_ICON_SIZE,
+ box_width=style.GRID_CELL_SIZE)
+ button.connect('button-release-event',
+ self._cancel_button_release_event_cb)
+ return button
+
+ def _decode_buddies(self):
+ if self.metadata.has_key('buddies') and \
+ self.metadata['buddies']:
+ buddies = cjson.decode(self.metadata['buddies']).values()
+ else:
+ buddies = []
+ return buddies
+
+ def update_visibility(self):
+ in_process = self.is_in_progress()
+
+ self.buddies_list.set_visible(not in_process)
+ self.date.set_visible(not in_process)
+
+ self.progress_bar.set_visible(in_process)
+ self.cancel_button.set_visible(in_process)
+
+ # TODO: determine the appearance of in-progress entries
+ def _update_color(self):
+ if self.is_in_progress():
+ self.props.background_color = style.COLOR_WHITE.get_int()
+ else:
+ self.props.background_color = style.COLOR_WHITE.get_int()
+
+ def is_in_progress(self):
+ return self.metadata.has_key('progress') and \
+ int(self.metadata['progress']) < 100
+
+ def get_keep(self):
+ keep = int(self.metadata.get('keep', 0))
+ return keep == 1
+
+ def __keep_icon_button_release_event_cb(self, button, event):
+ logging.debug('__keep_icon_button_release_event_cb')
+ metadata = model.get(self._metadata['uid'])
+ if self.get_keep():
+ metadata['keep'] = 0
+ else:
+ metadata['keep'] = 1
+ model.write(metadata, update_mtime=False)
+
+ self.keep_icon.props.keep = self.get_keep()
+ self._update_color()
+
+ return True
+
+ def _cancel_button_release_event_cb(self, button, event):
+ logging.debug('_cancel_button_release_event_cb')
+ model.delete(self._metadata['uid'])
+ return True
+
+ def set_selected(self, is_selected):
+ self._is_selected = is_selected
+ self._update_color()
+
+ def set_metadata(self, metadata):
+ self._metadata = metadata
+ self._is_selected = False
+
+ self.keep_icon.props.keep = self.get_keep()
+
+ self.date.props.text = misc.get_date(metadata)
+
+ self.icon.set_metadata(metadata)
+ if misc.is_activity_bundle(metadata):
+ self.icon.props.fill_color = style.COLOR_TRANSPARENT.get_svg()
+ self.icon.props.stroke_color = style.COLOR_BUTTON_GREY.get_svg()
+ else:
+ if metadata.has_key('icon-color') and \
+ metadata['icon-color']:
+ self.icon.props.xo_color = XoColor( \
+ metadata['icon-color'])
+ else:
+ self.icon.props.xo_color = None
+
+ if metadata.get('title', ''):
+ title_text = metadata['title']
+ else:
+ title_text = _('Untitled')
+ self.title.props.text = title_text
+
+ self.buddies_list.set_buddies(self._decode_buddies())
+
+ if metadata.has_key('progress'):
+ self.progress_bar.props.widget.props.fraction = \
+ int(metadata['progress']) / 100.0
+
+ self.update_visibility()
+ self._update_color()
+
+ def get_metadata(self):
+ return self._metadata
+
+ metadata = property(get_metadata, set_metadata)
+
+ def update_date(self):
+ self.date.props.text = misc.get_date(self._metadata)
+
+class CollapsedEntry(BaseCollapsedEntry):
+ __gtype_name__ = 'CollapsedEntry'
+
+ __gsignals__ = {
+ 'detail-clicked': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([]))
+ }
+
+ def __init__(self):
+ BaseCollapsedEntry.__init__(self)
+
+ self.icon.props.show_palette = True
+ self.icon.connect('button-release-event',
+ self.__icon_button_release_event_cb)
+
+ self.title.connect('button_release_event',
+ self.__title_button_release_event_cb)
+
+ self._title_entry = self._create_title_entry()
+ self.insert_after(self._title_entry, self.title, hippo.PACK_EXPAND)
+ self._title_entry.set_visible(False)
+
+ self._detail_button = self._create_detail_button()
+ self._detail_button.connect('motion-notify-event',
+ self.__detail_button_motion_notify_event_cb)
+ self.append(self._detail_button)
+
+ if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
+ self.reverse()
+
+ def _create_title_entry(self):
+ title_entry = CanvasEntry()
+ title_entry.set_background(style.COLOR_WHITE.get_html())
+ title_entry.props.widget.connect('focus-out-event',
+ self.__title_entry_focus_out_event_cb)
+ title_entry.props.widget.connect('activate',
+ self.__title_entry_activate_cb)
+ title_entry.connect('key-press-event',
+ self.__title_entry_key_press_event_cb)
+ return title_entry
+
+ def _create_detail_button(self):
+ button = CanvasIcon(icon_name='go-right',
+ size=style.SMALL_ICON_SIZE,
+ box_width=style.GRID_CELL_SIZE * 3 / 5,
+ fill_color=style.COLOR_BUTTON_GREY.get_svg())
+ button.connect('button-release-event',
+ self.__detail_button_release_event_cb)
+ return button
+
+ def update_visibility(self):
+ BaseCollapsedEntry.update_visibility(self)
+ self._detail_button.set_visible(not self.is_in_progress())
+
+ def set_metadata(self, metadata):
+ BaseCollapsedEntry.set_metadata(self, metadata)
+ self._title_entry.props.text = self.title.props.text
+
+ metadata = property(BaseCollapsedEntry.get_metadata, set_metadata)
+
+ def __detail_button_release_event_cb(self, button, event):
+ logging.debug('_detail_button_release_event_cb')
+ if not self.is_in_progress():
+ self.emit('detail-clicked')
+ return True
+
+ def __detail_button_motion_notify_event_cb(self, button, event):
+ if event.detail == hippo.MOTION_DETAIL_ENTER:
+ button.props.fill_color = style.COLOR_TOOLBAR_GREY.get_svg()
+ elif event.detail == hippo.MOTION_DETAIL_LEAVE:
+ button.props.fill_color = style.COLOR_BUTTON_GREY.get_svg()
+
+ def __icon_button_release_event_cb(self, button, event):
+ logging.debug('__icon_button_release_event_cb')
+ misc.resume(self.metadata)
+ return True
+
+ def __title_button_release_event_cb(self, button, event):
+ self.title.set_visible(False)
+ self._title_entry.set_visible(True)
+ self._title_entry.props.widget.grab_focus()
+
+ def __title_entry_focus_out_event_cb(self, entry, event):
+ self._apply_title_change(entry.props.text)
+
+ def __title_entry_activate_cb(self, entry):
+ self._apply_title_change(entry.props.text)
+
+ def __title_entry_key_press_event_cb(self, entry, event):
+ if event.key == hippo.KEY_ESCAPE:
+ self._cancel_title_change()
+
+ def _apply_title_change(self, title):
+ self._title_entry.set_visible(False)
+ self.title.set_visible(True)
+
+ if title == '':
+ self._cancel_title_change()
+ elif self.title.props.text != title:
+ self.title.props.text = title
+ self._metadata['title'] = title
+ self._metadata['title_set_by_user'] = '1'
+ model.write(self._metadata, update_mtime=False)
+
+ def _cancel_title_change(self):
+ self._title_entry.props.text = self.title.props.text
+ self._title_entry.set_visible(False)
+ self.title.set_visible(True)
+
diff --git a/src/jarabe/journal/detailview.py b/src/jarabe/journal/detailview.py
new file mode 100644
index 0000000..363e152
--- /dev/null
+++ b/src/jarabe/journal/detailview.py
@@ -0,0 +1,122 @@
+# 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
+
+import logging
+from gettext import gettext as _
+
+import gobject
+import gtk
+import hippo
+
+from sugar.graphics import style
+from sugar.graphics.icon import CanvasIcon
+
+from jarabe.journal.expandedentry import ExpandedEntry
+from jarabe.journal import model
+
+class DetailView(gtk.VBox):
+ __gtype_name__ = 'DetailView'
+
+ __gsignals__ = {
+ 'go-back-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([]))
+ }
+
+ def __init__(self, **kwargs):
+ self._metadata = None
+ self._expanded_entry = None
+
+ canvas = hippo.Canvas()
+
+ self._root = hippo.CanvasBox()
+ self._root.props.background_color = style.COLOR_PANEL_GREY.get_int()
+ canvas.set_root(self._root)
+
+ back_bar = BackBar()
+ back_bar.connect('button-release-event',
+ self.__back_bar_release_event_cb)
+ self._root.append(back_bar)
+
+ gobject.GObject.__init__(self, **kwargs)
+
+ self.pack_start(canvas)
+ canvas.show()
+
+ def _fav_icon_activated_cb(self, fav_icon):
+ keep = not self._expanded_entry.get_keep()
+ self._expanded_entry.set_keep(keep)
+ fav_icon.props.keep = keep
+
+ def __back_bar_release_event_cb(self, back_bar, event):
+ self.emit('go-back-clicked')
+ return False
+
+ def _update_view(self):
+ if self._expanded_entry:
+ self._root.remove(self._expanded_entry)
+
+ # Work around pygobject bug #479227
+ self._expanded_entry.remove_all()
+ import gc
+ gc.collect()
+ self._expanded_entry = ExpandedEntry(self._metadata)
+ self._root.append(self._expanded_entry, hippo.PACK_EXPAND)
+
+ def refresh(self):
+ logging.debug('DetailView.refresh')
+ self._metadata = model.get(self._metadata['uid'])
+ self._update_view()
+
+ def get_metadata(self):
+ return self._metadata
+
+ def set_metadata(self, metadata):
+ self._metadata = metadata
+ self._update_view()
+
+ metadata = gobject.property(
+ type=object, getter=get_metadata, setter=set_metadata)
+
+class BackBar(hippo.CanvasBox):
+ def __init__(self):
+ hippo.CanvasBox.__init__(self,
+ orientation=hippo.ORIENTATION_HORIZONTAL,
+ border=style.LINE_WIDTH,
+ background_color=style.COLOR_PANEL_GREY.get_int(),
+ border_color=style.COLOR_SELECTION_GREY.get_int(),
+ padding=style.DEFAULT_PADDING,
+ padding_left=style.DEFAULT_SPACING,
+ spacing=style.DEFAULT_SPACING)
+
+ icon = CanvasIcon(icon_name='go-previous',
+ size=style.SMALL_ICON_SIZE,
+ fill_color=style.COLOR_TOOLBAR_GREY.get_svg())
+ self.append(icon)
+
+ label = hippo.CanvasText(text=_('Back'),
+ font_desc=style.FONT_NORMAL.get_pango_desc())
+ self.append(label)
+
+ if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
+ self.reverse()
+
+ self.connect('motion-notify-event', self.__motion_notify_event_cb)
+
+ def __motion_notify_event_cb(self, box, event):
+ if event.detail == hippo.MOTION_DETAIL_ENTER:
+ box.props.background_color = style.COLOR_SELECTION_GREY.get_int()
+ elif event.detail == hippo.MOTION_DETAIL_LEAVE:
+ box.props.background_color = style.COLOR_PANEL_GREY.get_int()
+ return False
diff --git a/src/jarabe/journal/expandedentry.py b/src/jarabe/journal/expandedentry.py
new file mode 100644
index 0000000..5b0d0f4
--- /dev/null
+++ b/src/jarabe/journal/expandedentry.py
@@ -0,0 +1,375 @@
+# 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
+
+import logging
+from gettext import gettext as _
+import StringIO
+
+import hippo
+import cairo
+import gobject
+import gtk
+import cjson
+
+from sugar.graphics import style
+from sugar.graphics.icon import CanvasIcon
+from sugar.graphics.xocolor import XoColor
+from sugar.graphics.entry import CanvasEntry
+
+from jarabe.journal.keepicon import KeepIcon
+from jarabe.journal.palettes import ObjectPalette, BuddyPalette
+from jarabe.journal import misc
+from jarabe.journal import model
+
+class Separator(hippo.CanvasBox, hippo.CanvasItem):
+ def __init__(self, orientation):
+ hippo.CanvasBox.__init__(self,
+ background_color=style.COLOR_PANEL_GREY.get_int())
+
+ if orientation == hippo.ORIENTATION_VERTICAL:
+ self.props.box_width = style.LINE_WIDTH
+ else:
+ self.props.box_height = style.LINE_WIDTH
+
+class CanvasTextView(hippo.CanvasWidget):
+ def __init__(self, text, **kwargs):
+ hippo.CanvasWidget.__init__(self, **kwargs)
+ self.text_view_widget = gtk.TextView()
+ self.text_view_widget.props.buffer.props.text = text
+ self.text_view_widget.props.left_margin = style.DEFAULT_SPACING
+ self.text_view_widget.props.right_margin = style.DEFAULT_SPACING
+ self.text_view_widget.props.wrap_mode = gtk.WRAP_WORD
+ self.text_view_widget.show()
+
+ # TODO: These fields should expand vertically instead of scrolling
+ scrolled_window = gtk.ScrolledWindow()
+ scrolled_window.set_shadow_type(gtk.SHADOW_OUT)
+ scrolled_window.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
+ scrolled_window.add(self.text_view_widget)
+
+ self.props.widget = scrolled_window
+
+class BuddyList(hippo.CanvasBox):
+ def __init__(self, buddies):
+ hippo.CanvasBox.__init__(self, xalign=hippo.ALIGNMENT_START,
+ orientation=hippo.ORIENTATION_HORIZONTAL)
+
+ for buddy in buddies:
+ nick_, color = buddy
+ hbox = hippo.CanvasBox(orientation=hippo.ORIENTATION_HORIZONTAL)
+ icon = CanvasIcon(icon_name='computer-xo',
+ xo_color=XoColor(color),
+ size=style.STANDARD_ICON_SIZE)
+ icon.set_palette(BuddyPalette(buddy))
+ hbox.append(icon)
+ self.append(hbox)
+
+class ExpandedEntry(hippo.CanvasBox):
+ def __init__(self, metadata):
+ hippo.CanvasBox.__init__(self)
+ self.props.orientation = hippo.ORIENTATION_VERTICAL
+ self.props.background_color = style.COLOR_WHITE.get_int()
+ self.props.padding_top = style.DEFAULT_SPACING * 3
+
+ self._metadata = metadata
+ self._update_title_sid = None
+
+ # Create header
+ header = hippo.CanvasBox(orientation=hippo.ORIENTATION_HORIZONTAL,
+ padding=style.DEFAULT_PADDING,
+ padding_right=style.GRID_CELL_SIZE,
+ spacing=style.DEFAULT_SPACING)
+ self.append(header)
+
+ # Create two column body
+
+ body = hippo.CanvasBox(orientation=hippo.ORIENTATION_HORIZONTAL,
+ spacing=style.DEFAULT_SPACING * 3,
+ padding_left=style.GRID_CELL_SIZE,
+ padding_right=style.GRID_CELL_SIZE,
+ padding_top=style.DEFAULT_SPACING * 3)
+
+ self.append(body, hippo.PACK_EXPAND)
+
+ first_column = hippo.CanvasBox(orientation=hippo.ORIENTATION_VERTICAL,
+ spacing=style.DEFAULT_SPACING)
+ body.append(first_column)
+
+ second_column = hippo.CanvasBox(orientation=hippo.ORIENTATION_VERTICAL,
+ spacing=style.DEFAULT_SPACING)
+ body.append(second_column, hippo.PACK_EXPAND)
+
+ # Header
+
+ self._keep_icon = self._create_keep_icon()
+ header.append(self._keep_icon)
+
+ self._icon = self._create_icon()
+ header.append(self._icon)
+
+ self._title = self._create_title()
+ header.append(self._title, hippo.PACK_EXPAND)
+
+ # TODO: create a version list popup instead of a date label
+ self._date = self._create_date()
+ header.append(self._date)
+
+ if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
+ header.reverse()
+
+ # First column
+
+ self._preview = self._create_preview()
+ first_column.append(self._preview)
+
+ # Second column
+
+ description_box, self._description = self._create_description()
+ second_column.append(description_box)
+
+ tags_box, self._tags = self._create_tags()
+ second_column.append(tags_box)
+
+ self._buddy_list = self._create_buddy_list()
+ second_column.append(self._buddy_list)
+
+ def _create_keep_icon(self):
+ keep = int(self._metadata.get('keep', 0)) == 1
+ keep_icon = KeepIcon(keep)
+ keep_icon.connect('activated', self._keep_icon_activated_cb)
+ return keep_icon
+
+ def _create_icon(self):
+ icon = CanvasIcon(file_name=misc.get_icon_name(self._metadata))
+ icon.connect_after('button-release-event',
+ self._icon_button_release_event_cb)
+
+ if misc.is_activity_bundle(self._metadata):
+ icon.props.fill_color = style.COLOR_TRANSPARENT.get_svg()
+ icon.props.stroke_color = style.COLOR_BUTTON_GREY.get_svg()
+ else:
+ if self._metadata.has_key('icon-color') and \
+ self._metadata['icon-color']:
+ icon.props.xo_color = XoColor( \
+ self._metadata['icon-color'])
+
+ icon.set_palette(ObjectPalette(self._metadata))
+
+ return icon
+
+ def _create_title(self):
+ title = CanvasEntry()
+ title.set_background(style.COLOR_WHITE.get_html())
+ title.props.text = self._metadata.get('title', _('Untitled'))
+ title.props.widget.connect('focus-out-event',
+ self._title_focus_out_event_cb)
+ return title
+
+ def _create_date(self):
+ date = hippo.CanvasText(xalign=hippo.ALIGNMENT_START,
+ font_desc=style.FONT_NORMAL.get_pango_desc(),
+ text = misc.get_date(self._metadata))
+ return date
+
+ def _create_preview(self):
+ width = style.zoom(320)
+ height = style.zoom(240)
+ box = hippo.CanvasBox()
+
+ if self._metadata.has_key('preview') and \
+ len(self._metadata['preview']) > 4:
+
+ if self._metadata['preview'][1:4] == 'PNG':
+ preview_data = self._metadata['preview']
+ else:
+ # TODO: We are close to be able to drop this.
+ import base64
+ preview_data = base64.b64decode(
+ self._metadata['preview'])
+
+ png_file = StringIO.StringIO(preview_data)
+ try:
+ surface = cairo.ImageSurface.create_from_png(png_file)
+ has_preview = True
+ except Exception, e:
+ logging.error('Error while loading the preview: %r' % e)
+ has_preview = False
+ else:
+ has_preview = False
+
+ if has_preview:
+ preview_box = hippo.CanvasImage(image=surface,
+ border=style.LINE_WIDTH,
+ border_color=style.COLOR_BUTTON_GREY.get_int(),
+ xalign=hippo.ALIGNMENT_CENTER,
+ yalign=hippo.ALIGNMENT_CENTER,
+ scale_width=width,
+ scale_height=height)
+ else:
+ preview_box = hippo.CanvasText(text=_('No preview'),
+ font_desc=style.FONT_NORMAL.get_pango_desc(),
+ xalign=hippo.ALIGNMENT_CENTER,
+ yalign=hippo.ALIGNMENT_CENTER,
+ border=style.LINE_WIDTH,
+ border_color=style.COLOR_BUTTON_GREY.get_int(),
+ color=style.COLOR_BUTTON_GREY.get_int(),
+ box_width=width,
+ box_height=height)
+ preview_box.connect_after('button-release-event',
+ self._preview_box_button_release_event_cb)
+ box.append(preview_box)
+ return box
+
+ def _create_buddy_list(self):
+
+ vbox = hippo.CanvasBox()
+ vbox.props.spacing = style.DEFAULT_SPACING
+
+ text = hippo.CanvasText(text=_('Participants:'),
+ font_desc=style.FONT_NORMAL.get_pango_desc())
+ text.props.color = style.COLOR_BUTTON_GREY.get_int()
+
+ if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
+ text.props.xalign = hippo.ALIGNMENT_END
+ else:
+ text.props.xalign = hippo.ALIGNMENT_START
+
+ vbox.append(text)
+
+ if self._metadata.has_key('buddies') and \
+ self._metadata['buddies']:
+ buddies = cjson.decode(self._metadata['buddies']).values()
+ vbox.append(BuddyList(buddies))
+ return vbox
+ else:
+ return vbox
+
+ def _create_description(self):
+ vbox = hippo.CanvasBox()
+ vbox.props.spacing = style.DEFAULT_SPACING
+
+ text = hippo.CanvasText(text=_('Description:'),
+ font_desc=style.FONT_NORMAL.get_pango_desc())
+ text.props.color = style.COLOR_BUTTON_GREY.get_int()
+
+ if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
+ text.props.xalign = hippo.ALIGNMENT_END
+ else:
+ text.props.xalign = hippo.ALIGNMENT_START
+
+ vbox.append(text)
+
+ description = self._metadata.get('description', '')
+ text_view = CanvasTextView(description,
+ box_height=style.GRID_CELL_SIZE * 2)
+ vbox.append(text_view, hippo.PACK_EXPAND)
+
+ text_view.text_view_widget.props.accepts_tab = False
+ text_view.text_view_widget.connect('focus-out-event',
+ self._description_focus_out_event_cb)
+
+ return vbox, text_view
+
+ def _create_tags(self):
+ vbox = hippo.CanvasBox()
+ vbox.props.spacing = style.DEFAULT_SPACING
+
+ text = hippo.CanvasText(text=_('Tags:'),
+ font_desc=style.FONT_NORMAL.get_pango_desc())
+ text.props.color = style.COLOR_BUTTON_GREY.get_int()
+
+ if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
+ text.props.xalign = hippo.ALIGNMENT_END
+ else:
+ text.props.xalign = hippo.ALIGNMENT_START
+
+ vbox.append(text)
+
+ tags = self._metadata.get('tags', '')
+ text_view = CanvasTextView(tags, box_height=style.GRID_CELL_SIZE * 2)
+ vbox.append(text_view, hippo.PACK_EXPAND)
+
+ text_view.text_view_widget.props.accepts_tab = False
+ text_view.text_view_widget.connect('focus-out-event',
+ self._tags_focus_out_event_cb)
+
+ return vbox, text_view
+
+ def _title_notify_text_cb(self, entry, pspec):
+ if not self._update_title_sid:
+ self._update_title_sid = gobject.timeout_add_seconds(1,
+ self._update_title_cb)
+
+ def _title_focus_out_event_cb(self, entry, event):
+ self._update_entry()
+
+ def _description_focus_out_event_cb(self, text_view, event):
+ self._update_entry()
+
+ def _tags_focus_out_event_cb(self, text_view, event):
+ self._update_entry()
+
+ def _update_entry(self):
+ needs_update = False
+
+ old_title = self._metadata.get('title', None)
+ if old_title != self._title.props.text:
+ self._icon.palette.props.primary_text = self._title.props.text
+ self._metadata['title'] = self._title.props.text
+ self._metadata['title_set_by_user'] = '1'
+ needs_update = True
+
+ old_tags = self._metadata.get('tags', None)
+ new_tags = self._tags.text_view_widget.props.buffer.props.text
+ if old_tags != new_tags:
+ self._metadata['tags'] = new_tags
+ needs_update = True
+
+ old_description = self._metadata.get('description', None)
+ new_description = \
+ self._description.text_view_widget.props.buffer.props.text
+ if old_description != new_description:
+ self._metadata['description'] = new_description
+ needs_update = True
+
+ if needs_update:
+ model.write(self._metadata, update_mtime=False)
+
+ self._update_title_sid = None
+
+ def get_keep(self):
+ return self._metadata.has_key('keep') and \
+ self._metadata['keep'] == 1
+
+ def _keep_icon_activated_cb(self, keep_icon):
+ if self.get_keep():
+ self._metadata['keep'] = 0
+ else:
+ self._metadata['keep'] = 1
+ model.write(self._metadata, update_mtime=False)
+
+ keep_icon.props.keep = self.get_keep()
+
+ def _icon_button_release_event_cb(self, button, event):
+ logging.debug('_icon_button_release_event_cb')
+ misc.resume(self._metadata)
+ return True
+
+ def _preview_box_button_release_event_cb(self, button, event):
+ logging.debug('_preview_box_button_release_event_cb')
+ misc.resume(self._metadata)
+ return True
+
diff --git a/src/jarabe/journal/journalactivity.py b/src/jarabe/journal/journalactivity.py
new file mode 100644
index 0000000..e948162
--- /dev/null
+++ b/src/jarabe/journal/journalactivity.py
@@ -0,0 +1,337 @@
+# Copyright (C) 2006, Red Hat, Inc.
+# 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
+
+import logging
+from gettext import gettext as _
+import sys
+import traceback
+import uuid
+
+import gtk
+import dbus
+import statvfs
+import os
+
+from sugar.graphics.window import Window
+from sugar.bundle.bundle import ZipExtractException, RegistrationException
+from sugar import env
+from sugar.activity import activityfactory
+from sugar import wm
+
+from jarabe.model import bundleregistry
+from jarabe.journal.journaltoolbox import MainToolbox, DetailToolbox
+from jarabe.journal.listview import ListView
+from jarabe.journal.detailview import DetailView
+from jarabe.journal.volumestoolbar import VolumesToolbar
+from jarabe.journal import misc
+from jarabe.journal.journalentrybundle import JournalEntryBundle
+from jarabe.journal.objectchooser import ObjectChooser
+from jarabe.journal.modalalert import ModalAlert
+from jarabe.journal import model
+
+J_DBUS_SERVICE = 'org.laptop.Journal'
+J_DBUS_INTERFACE = 'org.laptop.Journal'
+J_DBUS_PATH = '/org/laptop/Journal'
+
+_SPACE_TRESHOLD = 52428800
+_BUNDLE_ID = 'org.laptop.JournalActivity'
+
+class JournalActivityDBusService(dbus.service.Object):
+ def __init__(self, parent):
+ self._parent = parent
+ session_bus = dbus.SessionBus()
+ bus_name = dbus.service.BusName(J_DBUS_SERVICE,
+ bus=session_bus, replace_existing=False, allow_replacement=False)
+ logging.debug('bus_name: %r', bus_name)
+ dbus.service.Object.__init__(self, bus_name, J_DBUS_PATH)
+
+ @dbus.service.method(J_DBUS_INTERFACE,
+ in_signature='', out_signature='')
+ def FocusSearch(self):
+ """Become visible and give focus to the search entry
+ """
+ self._parent.present()
+ self._parent.show_main_view()
+ self._parent.search_grab_focus()
+
+ @dbus.service.method(J_DBUS_INTERFACE,
+ in_signature='s', out_signature='')
+ def ShowObject(self, object_id):
+ """Pop-up journal and show object with object_id"""
+
+ logging.debug('Trying to show object %s', object_id)
+
+ if self._parent.show_object(object_id):
+ self._parent.present()
+
+ def _chooser_response_cb(self, chooser, response_id, chooser_id):
+ logging.debug('JournalActivityDBusService._chooser_response_cb')
+ if response_id == gtk.RESPONSE_ACCEPT:
+ object_id = chooser.get_selected_object_id()
+ self.ObjectChooserResponse(chooser_id, object_id)
+ else:
+ self.ObjectChooserCancelled(chooser_id)
+ chooser.destroy()
+ del chooser
+
+ @dbus.service.method(J_DBUS_INTERFACE, in_signature='i', out_signature='s')
+ def ChooseObject(self, parent_xid):
+ chooser_id = uuid.uuid4().hex
+ if parent_xid > 0:
+ parent = gtk.gdk.window_foreign_new(parent_xid)
+ else:
+ parent = None
+ chooser = ObjectChooser(parent)
+ chooser.connect('response', self._chooser_response_cb, chooser_id)
+ chooser.show()
+
+ return chooser_id
+
+ @dbus.service.signal(J_DBUS_INTERFACE, signature="ss")
+ def ObjectChooserResponse(self, chooser_id, object_id):
+ pass
+
+ @dbus.service.signal(J_DBUS_INTERFACE, signature="s")
+ def ObjectChooserCancelled(self, chooser_id):
+ pass
+
+class JournalActivity(Window):
+ def __init__(self):
+ logging.debug("STARTUP: Loading the journal")
+ Window.__init__(self)
+
+ self.set_title(_('Journal'))
+
+ self._main_view = None
+ self._secondary_view = None
+ self._list_view = None
+ self._detail_view = None
+ self._main_toolbox = None
+ self._detail_toolbox = None
+ self._volumes_toolbar = None
+
+ self._setup_main_view()
+ self._setup_secondary_view()
+
+ self.add_events(gtk.gdk.ALL_EVENTS_MASK |
+ gtk.gdk.VISIBILITY_NOTIFY_MASK)
+ self._realized_sid = self.connect('realize', self.__realize_cb)
+ self.connect('visibility-notify-event',
+ self.__visibility_notify_event_cb)
+ self.connect('window-state-event', self.__window_state_event_cb)
+ self.connect('key-press-event', self._key_press_event_cb)
+ self.connect('focus-in-event', self._focus_in_event_cb)
+
+ model.created.connect(self.__model_created_cb)
+ model.updated.connect(self.__model_updated_cb)
+ model.deleted.connect(self.__model_deleted_cb)
+
+ self._dbus_service = JournalActivityDBusService(self)
+
+ self.iconify()
+
+ self._critical_space_alert = None
+ self._check_available_space()
+
+ def __realize_cb(self, window):
+ wm.set_bundle_id(window.window, _BUNDLE_ID)
+ activity_id = activityfactory.create_activity_id()
+ wm.set_activity_id(window.window, str(activity_id))
+ self.disconnect(self._realized_sid)
+ self._realized_sid = None
+
+ def can_close(self):
+ return False
+
+ def _setup_main_view(self):
+ self._main_toolbox = MainToolbox()
+ self._main_view = gtk.VBox()
+
+ self._list_view = ListView()
+ self._list_view.connect('detail-clicked', self.__detail_clicked_cb)
+ self._main_view.pack_start(self._list_view)
+ self._list_view.show()
+
+ self._volumes_toolbar = VolumesToolbar()
+ self._volumes_toolbar.connect('volume-changed',
+ self.__volume_changed_cb)
+ self._main_view.pack_start(self._volumes_toolbar, expand=False)
+
+ search_toolbar = self._main_toolbox.search_toolbar
+ search_toolbar.connect('query-changed', self._query_changed_cb)
+ search_toolbar.set_mount_point('/')
+
+ def _setup_secondary_view(self):
+ self._secondary_view = gtk.VBox()
+
+ self._detail_toolbox = DetailToolbox()
+ entry_toolbar = self._detail_toolbox.entry_toolbar
+
+ self._detail_view = DetailView()
+ self._detail_view.connect('go-back-clicked', self.__go_back_clicked_cb)
+ self._secondary_view.pack_end(self._detail_view)
+ self._detail_view.show()
+
+ def _key_press_event_cb(self, widget, event):
+ keyname = gtk.gdk.keyval_name(event.keyval)
+ logging.info(keyname)
+ logging.info(event.state)
+ if keyname == 'Escape':
+ self.show_main_view()
+
+ def __detail_clicked_cb(self, list_view, entry):
+ self._show_secondary_view(entry.metadata)
+
+ def __go_back_clicked_cb(self, detail_view):
+ self.show_main_view()
+
+ def _query_changed_cb(self, toolbar, query):
+ self._list_view.update_with_query(query)
+ self.show_main_view()
+
+ def show_main_view(self):
+ if self.toolbox != self._main_toolbox:
+ self.set_toolbox(self._main_toolbox)
+ self._main_toolbox.show()
+
+ if self.canvas != self._main_view:
+ self.set_canvas(self._main_view)
+ self._main_view.show()
+
+ def _show_secondary_view(self, metadata):
+ try:
+ self._detail_toolbox.entry_toolbar.set_metadata(metadata)
+ except Exception:
+ logging.error('Exception while displaying entry:\n' + \
+ ''.join(traceback.format_exception(*sys.exc_info())))
+
+ self.set_toolbox(self._detail_toolbox)
+ self._detail_toolbox.show()
+
+ try:
+ self._detail_view.props.metadata = metadata
+ except Exception:
+ logging.error('Exception while displaying entry:\n' + \
+ ''.join(traceback.format_exception(*sys.exc_info())))
+
+ self.set_canvas(self._secondary_view)
+ self._secondary_view.show()
+
+ def show_object(self, object_id):
+ metadata = model.get(object_id)
+ if metadata is None:
+ return False
+ else:
+ self._show_secondary_view(metadata)
+ return True
+
+ def __volume_changed_cb(self, volume_toolbar, mount_point):
+ logging.debug('Selected volume: %r.' % mount_point)
+ self._main_toolbox.search_toolbar.set_mount_point(mount_point)
+ self._main_toolbox.set_current_toolbar(0)
+
+ def __model_created_cb(self, object_id):
+ self._check_for_bundle(object_id)
+ self._main_toolbox.search_toolbar.refresh_filters()
+ self._check_available_space()
+
+ def __model_updated_cb(self, object_id):
+ self._check_for_bundle(object_id)
+ self._check_available_space()
+
+ def __model_deleted_cb(self, object_id):
+ if self.canvas == self._secondary_view and \
+ object_id == self._detail_view.props.metadata['uid']:
+ self.show_main_view()
+
+ def _focus_in_event_cb(self, window, event):
+ self.search_grab_focus()
+ self._list_view.update_dates()
+
+ def _check_for_bundle(self, object_id):
+ registry = bundleregistry.get_registry()
+
+ bundle = misc.get_bundle(object_id)
+ if bundle is None:
+ return
+
+ if registry.is_installed(bundle):
+ return
+ try:
+ registry.install(bundle)
+ except (ZipExtractException, RegistrationException), e:
+ logging.warning('Could not install bundle %s: %r' %
+ (bundle.get_path(), e))
+ return
+
+ metadata = model.get(object_id)
+ if metadata['mime_type'] == JournalEntryBundle.MIME_TYPE:
+ model.delete(object_id)
+
+ def search_grab_focus(self):
+ search_toolbar = self._main_toolbox.search_toolbar
+ search_toolbar.give_entry_focus()
+
+ def __window_state_event_cb(self, window, event):
+ logging.debug('window_state_event_cb %r' % self)
+ if event.changed_mask & gtk.gdk.WINDOW_STATE_ICONIFIED:
+ state = event.new_window_state
+ visible = not state & gtk.gdk.WINDOW_STATE_ICONIFIED
+ self._list_view.set_is_visible(visible)
+
+ def __visibility_notify_event_cb(self, window, event):
+ logging.debug('visibility_notify_event_cb %r' % self)
+ visible = event.state != gtk.gdk.VISIBILITY_FULLY_OBSCURED
+ self._list_view.set_is_visible(visible)
+
+ def _check_available_space(self):
+ ''' Check available space on device
+
+ If the available space is below 50MB an alert will be
+ shown which encourages to delete old journal entries.
+ '''
+
+ if self._critical_space_alert:
+ return
+ stat = os.statvfs(env.get_profile_path())
+ free_space = stat[statvfs.F_BSIZE] * stat[statvfs.F_BAVAIL]
+ if free_space < _SPACE_TRESHOLD:
+ self._critical_space_alert = ModalAlert()
+ self._critical_space_alert.connect('destroy',
+ self.__alert_closed_cb)
+ self._critical_space_alert.show()
+
+ def __alert_closed_cb(self, data):
+ self.show_main_view()
+ self.present()
+ self._critical_space_alert = None
+
+ def set_active_volume(self, mount):
+ self._volumes_toolbar.set_active_volume(mount)
+
+_journal = None
+
+def get_journal():
+ global _journal
+ if _journal is None:
+ _journal = JournalActivity()
+ _journal.show()
+ return _journal
+
+def start():
+ get_journal()
+
diff --git a/src/jarabe/journal/journalentrybundle.py b/src/jarabe/journal/journalentrybundle.py
new file mode 100644
index 0000000..5d4086c
--- /dev/null
+++ b/src/jarabe/journal/journalentrybundle.py
@@ -0,0 +1,86 @@
+# 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
+
+import os
+import tempfile
+import shutil
+
+import cjson
+import dbus
+
+from sugar.bundle.bundle import Bundle, MalformedBundleException
+
+from jarabe.journal import model
+
+class JournalEntryBundle(Bundle):
+ """A Journal entry bundle
+
+ See http://wiki.laptop.org/go/Journal_entry_bundles for details
+ """
+
+ MIME_TYPE = 'application/vnd.olpc-journal-entry'
+
+ _zipped_extension = '.xoj'
+ _unzipped_extension = None
+ _infodir = None
+
+ def __init__(self, path):
+ Bundle.__init__(self, path)
+
+ def install(self):
+ if os.environ.has_key('SUGAR_ACTIVITY_ROOT'):
+ install_dir = os.path.join(os.environ['SUGAR_ACTIVITY_ROOT'],
+ 'data')
+ else:
+ install_dir = tempfile.gettempdir()
+ bundle_dir = os.path.join(install_dir, self._zip_root_dir)
+ uid = self._zip_root_dir
+ self._unzip(install_dir)
+ try:
+ metadata = self._read_metadata(bundle_dir)
+ metadata['uid'] = ''
+
+ preview = self._read_preview(uid, bundle_dir)
+ if preview is not None:
+ metadata['preview'] = dbus.ByteArray(preview)
+
+ file_path = os.path.join(bundle_dir, uid)
+ model.write(metadata, file_path)
+ finally:
+ shutil.rmtree(bundle_dir, ignore_errors=True)
+
+ def _read_metadata(self, bundle_dir):
+ metadata_path = os.path.join(bundle_dir, '_metadata.json')
+ if not os.path.exists(metadata_path):
+ raise MalformedBundleException(
+ 'Bundle must contain the file "_metadata.json"')
+ return cjson.decode(open(metadata_path, 'r').read())
+
+ def _read_preview(self, uid, bundle_dir):
+ preview_path = os.path.join(bundle_dir, 'preview', uid)
+ if not os.path.exists(preview_path):
+ return ''
+ f = open(preview_path, 'r')
+ try:
+ preview_data = f.read()
+ finally:
+ f.close()
+ return preview_data
+
+ def is_installed(self):
+ # These bundles can be reinstalled as many times as desired.
+ return False
+
diff --git a/src/jarabe/journal/journaltoolbox.py b/src/jarabe/journal/journaltoolbox.py
new file mode 100644
index 0000000..f8052eb
--- /dev/null
+++ b/src/jarabe/journal/journaltoolbox.py
@@ -0,0 +1,423 @@
+# 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 logging
+from datetime import datetime, timedelta
+import os
+import gconf
+
+import gobject
+import gio
+import gtk
+
+from sugar.graphics.toolbox import Toolbox
+from sugar.graphics.toolcombobox import ToolComboBox
+from sugar.graphics.toolbutton import ToolButton
+from sugar.graphics.combobox import ComboBox
+from sugar.graphics.menuitem import MenuItem
+from sugar.graphics.icon import Icon
+from sugar.graphics.xocolor import XoColor
+from sugar.graphics import iconentry
+from sugar.graphics import style
+from sugar import mime
+
+from jarabe.model import bundleregistry
+from jarabe.journal import misc
+from jarabe.journal import model
+
+_AUTOSEARCH_TIMEOUT = 1000
+
+_ACTION_ANYTIME = 0
+_ACTION_TODAY = 1
+_ACTION_SINCE_YESTERDAY = 2
+_ACTION_PAST_WEEK = 3
+_ACTION_PAST_MONTH = 4
+_ACTION_PAST_YEAR = 5
+
+_ACTION_ANYTHING = 0
+
+_ACTION_EVERYBODY = 0
+_ACTION_MY_FRIENDS = 1
+_ACTION_MY_CLASS = 2
+
+class MainToolbox(Toolbox):
+ def __init__(self):
+ Toolbox.__init__(self)
+
+ self.search_toolbar = SearchToolbar()
+ self.search_toolbar.set_size_request(-1, style.GRID_CELL_SIZE)
+ self.add_toolbar(_('Search'), self.search_toolbar)
+ self.search_toolbar.show()
+
+ #self.manage_toolbar = ManageToolbar()
+ #self.add_toolbar(_('Manage'), self.manage_toolbar)
+ #self.manage_toolbar.show()
+
+class SearchToolbar(gtk.Toolbar):
+ __gtype_name__ = 'SearchToolbar'
+
+ __gsignals__ = {
+ 'query-changed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([object]))
+ }
+
+ def __init__(self):
+ gtk.Toolbar.__init__(self)
+
+ self._mount_point = None
+
+ self._search_entry = iconentry.IconEntry()
+ self._search_entry.set_icon_from_name(iconentry.ICON_ENTRY_PRIMARY,
+ 'system-search')
+ self._search_entry.connect('activate', self._search_entry_activated_cb)
+ self._search_entry.connect('changed', self._search_entry_changed_cb)
+ self._search_entry.add_clear_button()
+ self._autosearch_timer = None
+ self._add_widget(self._search_entry, expand=True)
+
+ self._what_search_combo = ComboBox()
+ self._what_combo_changed_sid = self._what_search_combo.connect(
+ 'changed', self._combo_changed_cb)
+ tool_item = ToolComboBox(self._what_search_combo)
+ self.insert(tool_item, -1)
+ tool_item.show()
+
+ self._when_search_combo = self._get_when_search_combo()
+ tool_item = ToolComboBox(self._when_search_combo)
+ self.insert(tool_item, -1)
+ tool_item.show()
+
+ # TODO: enable it when the DS supports saving the buddies.
+ #self._with_search_combo = self._get_with_search_combo()
+ #tool_item = ToolComboBox(self._with_search_combo)
+ #self.insert(tool_item, -1)
+ #tool_item.show()
+
+ self._query = self._build_query()
+
+ self.refresh_filters()
+
+ def give_entry_focus(self):
+ self._search_entry.grab_focus()
+
+ def _get_when_search_combo(self):
+ when_search = ComboBox()
+ when_search.append_item(_ACTION_ANYTIME, _('Anytime'))
+ when_search.append_separator()
+ when_search.append_item(_ACTION_TODAY, _('Today'))
+ when_search.append_item(_ACTION_SINCE_YESTERDAY,
+ _('Since yesterday'))
+ # TRANS: Filter entries modified during the last 7 days.
+ when_search.append_item(_ACTION_PAST_WEEK, _('Past week'))
+ # TRANS: Filter entries modified during the last 30 days.
+ when_search.append_item(_ACTION_PAST_MONTH, _('Past month'))
+ # TRANS: Filter entries modified during the last 356 days.
+ when_search.append_item(_ACTION_PAST_YEAR, _('Past year'))
+ when_search.set_active(0)
+ when_search.connect('changed', self._combo_changed_cb)
+ return when_search
+
+ def _get_with_search_combo(self):
+ with_search = ComboBox()
+ with_search.append_item(_ACTION_EVERYBODY, _('Anyone'))
+ with_search.append_separator()
+ with_search.append_item(_ACTION_MY_FRIENDS, _('My friends'))
+ with_search.append_item(_ACTION_MY_CLASS, _('My class'))
+ with_search.append_separator()
+
+ # TODO: Ask the model for buddies.
+ with_search.append_item(3, 'Dan', 'theme:xo')
+
+ with_search.set_active(0)
+ with_search.connect('changed', self._combo_changed_cb)
+ return with_search
+
+ def _add_widget(self, widget, expand=False):
+ tool_item = gtk.ToolItem()
+ tool_item.set_expand(expand)
+
+ tool_item.add(widget)
+ widget.show()
+
+ self.insert(tool_item, -1)
+ tool_item.show()
+
+ def _build_query(self):
+ query = {}
+ if self._mount_point:
+ query['mountpoints'] = [self._mount_point]
+ if self._what_search_combo.props.value:
+ value = self._what_search_combo.props.value
+ generic_type = mime.get_generic_type(value)
+ if generic_type:
+ mime_types = generic_type.mime_types
+ query['mime_type'] = mime_types
+ else:
+ query['activity'] = self._what_search_combo.props.value
+ if self._when_search_combo.props.value:
+ date_from, date_to = self._get_date_range()
+ query['mtime'] = {'start': date_from, 'end': date_to}
+ if self._search_entry.props.text:
+ text = self._search_entry.props.text.strip()
+
+ if not text.startswith('"'):
+ query_text = ''
+ words = text.split(' ')
+ for word in words:
+ if word:
+ if query_text:
+ query_text += ' '
+ query_text += word + '*'
+ else:
+ query_text = text
+
+ if query_text:
+ query['query'] = query_text
+
+ return query
+
+ def _get_date_range(self):
+ today_start = datetime.today().replace(hour=0, minute=0, second=0)
+ right_now = datetime.today()
+ if self._when_search_combo.props.value == _ACTION_TODAY:
+ date_range = (today_start, right_now)
+ elif self._when_search_combo.props.value == _ACTION_SINCE_YESTERDAY:
+ date_range = (today_start - timedelta(1), right_now)
+ elif self._when_search_combo.props.value == _ACTION_PAST_WEEK:
+ date_range = (today_start - timedelta(7), right_now)
+ elif self._when_search_combo.props.value == _ACTION_PAST_MONTH:
+ date_range = (today_start - timedelta(30), right_now)
+ elif self._when_search_combo.props.value == _ACTION_PAST_YEAR:
+ date_range = (today_start - timedelta(356), right_now)
+
+ return (date_range[0].isoformat(),
+ date_range[1].isoformat())
+
+ def _combo_changed_cb(self, combo):
+ new_query = self._build_query()
+ if self._query != new_query:
+ self._query = new_query
+ self.emit('query-changed', self._query)
+
+ def _search_entry_activated_cb(self, search_entry):
+ if self._autosearch_timer:
+ gobject.source_remove(self._autosearch_timer)
+ new_query = self._build_query()
+ if self._query != new_query:
+ self._query = new_query
+ self.emit('query-changed', self._query)
+
+ def _search_entry_changed_cb(self, search_entry):
+ if not search_entry.props.text:
+ search_entry.activate()
+ return
+
+ if self._autosearch_timer:
+ gobject.source_remove(self._autosearch_timer)
+ self._autosearch_timer = gobject.timeout_add(_AUTOSEARCH_TIMEOUT,
+ self._autosearch_timer_cb)
+
+ def _autosearch_timer_cb(self):
+ logging.debug('_autosearch_timer_cb')
+ self._autosearch_timer = None
+ self._search_entry.activate()
+ return False
+
+ def set_mount_point(self, mount_point):
+ self._mount_point = mount_point
+ new_query = self._build_query()
+ if self._query != new_query:
+ self._query = new_query
+ self.emit('query-changed', self._query)
+
+ def refresh_filters(self):
+ current_value = self._what_search_combo.props.value
+ current_value_index = 0
+
+ self._what_search_combo.handler_block(self._what_combo_changed_sid)
+ try:
+ self._what_search_combo.remove_all()
+ # TRANS: Item in a combo box that filters by entry type.
+ self._what_search_combo.append_item(_ACTION_ANYTHING, _('Anything'))
+
+ registry = bundleregistry.get_registry()
+ appended_separator = False
+ for service_name in model.get_unique_values('activity'):
+ activity_info = registry.get_bundle(service_name)
+ if not activity_info is None:
+ if not appended_separator:
+ self._what_search_combo.append_separator()
+ appended_separator = True
+
+ if os.path.exists(activity_info.get_icon()):
+ self._what_search_combo.append_item(service_name,
+ activity_info.get_name(),
+ file_name=activity_info.get_icon())
+ else:
+ self._what_search_combo.append_item(service_name,
+ activity_info.get_name(),
+ icon_name='application-octet-stream')
+
+ if service_name == current_value:
+ current_value_index = \
+ len(self._what_search_combo.get_model()) - 1
+
+ self._what_search_combo.append_separator()
+
+ types = mime.get_all_generic_types()
+ for generic_type in types :
+ self._what_search_combo.append_item(
+ generic_type.type_id, generic_type.name, generic_type.icon)
+ if generic_type.type_id == current_value:
+ current_value_index = \
+ len(self._what_search_combo.get_model()) - 1
+
+ self._what_search_combo.set_active(current_value_index)
+ finally:
+ self._what_search_combo.handler_unblock(
+ self._what_combo_changed_sid)
+
+class ManageToolbar(gtk.Toolbar):
+ __gtype_name__ = 'ManageToolbar'
+
+ def __init__(self):
+ gtk.Toolbar.__init__(self)
+
+class DetailToolbox(Toolbox):
+ def __init__(self):
+ Toolbox.__init__(self)
+
+ self.entry_toolbar = EntryToolbar()
+ self.add_toolbar('', self.entry_toolbar)
+ self.entry_toolbar.show()
+
+class EntryToolbar(gtk.Toolbar):
+ def __init__(self):
+ gtk.Toolbar.__init__(self)
+
+ self._metadata = None
+
+ self._resume = ToolButton('activity-start')
+ self._resume.connect('clicked', self._resume_clicked_cb)
+ self.add(self._resume)
+ self._resume.show()
+
+ self._copy = ToolButton()
+
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string('/desktop/sugar/user/color'))
+ icon = Icon(icon_name='edit-copy', xo_color=color)
+ self._copy.set_icon_widget(icon)
+ icon.show()
+
+ self._copy.set_tooltip(_('Copy'))
+ self._copy.connect('clicked', self._copy_clicked_cb)
+ self.add(self._copy)
+ self._copy.show()
+
+ separator = gtk.SeparatorToolItem()
+ self.add(separator)
+ separator.show()
+
+ erase_button = ToolButton('list-remove')
+ erase_button.set_tooltip(_('Erase'))
+ erase_button.connect('clicked', self._erase_button_clicked_cb)
+ self.add(erase_button)
+ erase_button.show()
+
+ def set_metadata(self, metadata):
+ self._metadata = metadata
+ self._refresh_copy_palette()
+ self._refresh_resume_palette()
+
+ def _resume_clicked_cb(self, button):
+ misc.resume(self._metadata)
+
+ def _copy_clicked_cb(self, button):
+ clipboard = gtk.Clipboard()
+ clipboard.set_with_data([('text/uri-list', 0, 0)],
+ self.__clipboard_get_func_cb,
+ self.__clipboard_clear_func_cb)
+
+ def __clipboard_get_func_cb(self, clipboard, selection_data, info, data):
+ file_path = model.get_file(self._metadata['uid'])
+ selection_data.set_uris(['file://' + file_path])
+
+ def __clipboard_clear_func_cb(self, clipboard, data):
+ #TODO: should we remove here the temp file created before?
+ pass
+
+ def _erase_button_clicked_cb(self, button):
+ registry = bundleregistry.get_registry()
+
+ bundle = misc.get_bundle(self._metadata['uid'])
+ if bundle is not None and registry.is_installed(bundle):
+ registry.uninstall(bundle)
+ model.delete(self._metadata['uid'])
+
+ def _resume_menu_item_activate_cb(self, menu_item, service_name):
+ misc.resume(self._metadata, service_name)
+
+ def _copy_menu_item_activate_cb(self, menu_item, mount):
+ model.copy(self._metadata, mount.get_root().get_path())
+
+ def _refresh_copy_palette(self):
+ palette = self._copy.get_palette()
+
+ for menu_item in palette.menu.get_children():
+ palette.menu.remove(menu_item)
+ menu_item.destroy()
+
+ volume_monitor = gio.volume_monitor_get()
+ for mount in volume_monitor.get_mounts():
+ if self._metadata['mountpoint'] == mount.get_root().get_path():
+ continue
+ menu_item = MenuItem(mount.get_name())
+
+ # TODO: fallback to the more generic icons when needed
+ menu_item.set_image(Icon(icon_name=mount.get_icon().props.names[0],
+ icon_size=gtk.ICON_SIZE_MENU))
+
+ menu_item.connect('activate',
+ self._copy_menu_item_activate_cb,
+ mount)
+ palette.menu.append(menu_item)
+ menu_item.show()
+
+ def _refresh_resume_palette(self):
+ if self._metadata.get('activity_id', ''):
+ # TRANS: Action label for resuming an activity.
+ self._resume.set_tooltip(_('Resume'))
+ else:
+ # TRANS: Action label for starting an entry.
+ self._resume.set_tooltip(_('Start'))
+
+ palette = self._resume.get_palette()
+
+ for menu_item in palette.menu.get_children():
+ palette.menu.remove(menu_item)
+ menu_item.destroy()
+
+ for activity_info in misc.get_activities(self._metadata):
+ menu_item = MenuItem(activity_info.get_name())
+ menu_item.set_image(Icon(file=activity_info.get_icon(),
+ icon_size=gtk.ICON_SIZE_MENU))
+ menu_item.connect('activate', self._resume_menu_item_activate_cb,
+ activity_info.get_bundle_id())
+ palette.menu.append(menu_item)
+ menu_item.show()
diff --git a/src/jarabe/journal/keepicon.py b/src/jarabe/journal/keepicon.py
new file mode 100644
index 0000000..c6dc470
--- /dev/null
+++ b/src/jarabe/journal/keepicon.py
@@ -0,0 +1,59 @@
+# Copyright (C) 2006, Red Hat, Inc.
+#
+# 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 gobject
+import hippo
+import gconf
+
+from sugar.graphics.icon import CanvasIcon
+from sugar.graphics import style
+from sugar.graphics.xocolor import XoColor
+
+class KeepIcon(CanvasIcon):
+ def __init__(self, keep):
+ CanvasIcon.__init__(self, icon_name='emblem-favorite',
+ box_width=style.GRID_CELL_SIZE * 3 / 5,
+ size=style.SMALL_ICON_SIZE)
+ self.connect('motion-notify-event', self.__motion_notify_event_cb)
+
+ self._keep = None
+ self.set_keep(keep)
+
+ def set_keep(self, keep):
+ if keep == self._keep:
+ return
+
+ self._keep = keep
+ if keep:
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string('/desktop/sugar/user/color'))
+ self.props.xo_color = color
+ else:
+ self.props.stroke_color = style.COLOR_BUTTON_GREY.get_svg()
+ self.props.fill_color = style.COLOR_TRANSPARENT.get_svg()
+
+ def get_keep(self):
+ return self._keep
+
+ keep = gobject.property(type=int, default=0, getter=get_keep,
+ setter=set_keep)
+
+ def __motion_notify_event_cb(self, icon, event):
+ if not self._keep:
+ if event.detail == hippo.MOTION_DETAIL_ENTER:
+ icon.props.fill_color = style.COLOR_BUTTON_GREY.get_svg()
+ elif event.detail == hippo.MOTION_DETAIL_LEAVE:
+ icon.props.fill_color = style.COLOR_TRANSPARENT.get_svg()
diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
new file mode 100644
index 0000000..1f3281f
--- /dev/null
+++ b/src/jarabe/journal/listview.py
@@ -0,0 +1,459 @@
+# 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
+
+import logging
+import traceback
+import sys
+from gettext import gettext as _
+
+import hippo
+import gobject
+import gtk
+import dbus
+
+from sugar.graphics import style
+from sugar.graphics.icon import CanvasIcon
+
+from jarabe.journal.collapsedentry import CollapsedEntry
+from jarabe.journal import model
+
+DS_DBUS_SERVICE = 'org.laptop.sugar.DataStore'
+DS_DBUS_INTERFACE = 'org.laptop.sugar.DataStore'
+DS_DBUS_PATH = '/org/laptop/sugar/DataStore'
+
+UPDATE_INTERVAL = 300
+
+EMPTY_JOURNAL = _("Your Journal is empty")
+NO_MATCH = _("No matching entries ")
+
+class BaseListView(gtk.HBox):
+ __gtype_name__ = 'BaseListView'
+
+ def __init__(self):
+ self._query = {}
+ self._result_set = None
+ self._entries = []
+ self._page_size = 0
+ self._last_value = -1
+ self._reflow_sid = 0
+
+ gtk.HBox.__init__(self)
+ self.set_flags(gtk.HAS_FOCUS|gtk.CAN_FOCUS)
+ self.connect('key-press-event', self._key_press_event_cb)
+
+ self._box = hippo.CanvasBox(
+ orientation=hippo.ORIENTATION_VERTICAL,
+ background_color=style.COLOR_WHITE.get_int())
+
+ self._canvas = hippo.Canvas()
+ self._canvas.set_root(self._box)
+
+ self.pack_start(self._canvas)
+ self._canvas.show()
+
+ self._vadjustment = gtk.Adjustment(value=0, lower=0, upper=0,
+ step_incr=1, page_incr=0,
+ page_size=0)
+ self._vadjustment.connect('value-changed',
+ self._vadjustment_value_changed_cb)
+ self._vadjustment.connect('changed', self._vadjustment_changed_cb)
+
+ self._vscrollbar = gtk.VScrollbar(self._vadjustment)
+ self.pack_end(self._vscrollbar, expand=False, fill=False)
+ self._vscrollbar.show()
+
+ self.connect('scroll-event', self._scroll_event_cb)
+ self.connect('destroy', self.__destroy_cb)
+
+ # DND stuff
+ self._pressed_button = None
+ self._press_start_x = None
+ self._press_start_y = None
+ self._last_clicked_entry = None
+ self._canvas.drag_source_set(0, [], 0)
+ self._canvas.add_events(gtk.gdk.BUTTON_PRESS_MASK |
+ gtk.gdk.POINTER_MOTION_HINT_MASK)
+ self._canvas.connect_after("motion_notify_event",
+ self._canvas_motion_notify_event_cb)
+ self._canvas.connect("button_press_event",
+ self._canvas_button_press_event_cb)
+ self._canvas.connect("drag_end", self._drag_end_cb)
+ self._canvas.connect("drag_data_get", self._drag_data_get_cb)
+
+ # Auto-update stuff
+ self._fully_obscured = True
+ self._dirty = False
+ self._refresh_idle_handler = None
+ self._update_dates_timer = None
+
+ bus = dbus.SessionBus()
+ datastore = dbus.Interface(
+ bus.get_object(DS_DBUS_SERVICE, DS_DBUS_PATH), DS_DBUS_INTERFACE)
+ self._datastore_created_handler = \
+ datastore.connect_to_signal('Created',
+ self.__datastore_created_cb)
+ self._datastore_updated_handler = \
+ datastore.connect_to_signal('Updated',
+ self.__datastore_updated_cb)
+
+ self._datastore_deleted_handler = \
+ datastore.connect_to_signal('Deleted',
+ self.__datastore_deleted_cb)
+
+ def __destroy_cb(self, widget):
+ self._datastore_created_handler.remove()
+ self._datastore_updated_handler.remove()
+ self._datastore_deleted_handler.remove()
+
+ def _vadjustment_changed_cb(self, vadjustment):
+ if vadjustment.props.upper > self._page_size:
+ self._vscrollbar.show()
+ else:
+ self._vscrollbar.hide()
+
+ def _vadjustment_value_changed_cb(self, vadjustment):
+ gobject.idle_add(self._do_scroll)
+
+ def _do_scroll(self, force=False):
+ import time
+ t = time.time()
+
+ value = int(self._vadjustment.props.value)
+
+ if value == self._last_value and not force:
+ return
+ self._last_value = value
+
+ self._result_set.seek(value)
+ metadata_list = self._result_set.read(self._page_size)
+
+ if self._result_set.length != self._vadjustment.props.upper:
+ self._vadjustment.props.upper = self._result_set.length
+ self._vadjustment.changed()
+
+ self._refresh_view(metadata_list)
+ self._dirty = False
+
+ logging.debug('_do_scroll %r %r\n' % (value, (time.time() - t)))
+
+ return False
+
+ def _refresh_view(self, metadata_list):
+ logging.debug('ListView %r' % self)
+ # Indicate when the Journal is empty
+ if len(metadata_list) == 0:
+ self._show_message(EMPTY_JOURNAL)
+ return
+
+ # Refresh view and create the entries if they don't exist yet.
+ for i in range(0, self._page_size):
+ try:
+ if i < len(metadata_list):
+ if i >= len(self._entries):
+ entry = self.create_entry()
+ self._box.append(entry)
+ self._entries.append(entry)
+ entry.metadata = metadata_list[i]
+ else:
+ entry = self._entries[i]
+ entry.metadata = metadata_list[i]
+ entry.set_visible(True)
+ elif i < len(self._entries):
+ entry = self._entries[i]
+ entry.set_visible(False)
+ except Exception:
+ logging.error('Exception while displaying entry:\n' + \
+ ''.join(traceback.format_exception(*sys.exc_info())))
+
+ def create_entry(self):
+ """ Create a descendant of BaseCollapsedEntry
+ """
+ raise NotImplementedError
+
+ def update_with_query(self, query_dict):
+ logging.debug('ListView.update_with_query')
+ self._query = query_dict
+ if self._page_size > 0:
+ self.refresh()
+
+ def refresh(self):
+ logging.debug('ListView.refresh query %r' % self._query)
+ self._result_set = model.find(self._query)
+ self._vadjustment.props.upper = self._result_set.length
+ self._vadjustment.changed()
+
+ self._vadjustment.props.value = min(self._vadjustment.props.value,
+ self._result_set.length - self._page_size)
+ if self._result_set.length == 0:
+ if self._query.get('query', '') or \
+ self._query.get('mime_type', '') or \
+ self._query.get('mtime', ''):
+ self._show_message(NO_MATCH)
+ else:
+ self._show_message(EMPTY_JOURNAL)
+ else:
+ self._clear_message()
+ self._do_scroll(force=True)
+
+ def _scroll_event_cb(self, hbox, event):
+ if event.direction == gtk.gdk.SCROLL_UP:
+ if self._vadjustment.props.value > self._vadjustment.props.lower:
+ self._vadjustment.props.value -= 1
+ elif event.direction == gtk.gdk.SCROLL_DOWN:
+ max_value = self._result_set.length - self._page_size
+ if self._vadjustment.props.value < max_value:
+ self._vadjustment.props.value += 1
+
+ def do_focus(self, direction):
+ if not self.is_focus():
+ self.grab_focus()
+ return True
+ return False
+
+ def _key_press_event_cb(self, widget, event):
+ keyname = gtk.gdk.keyval_name(event.keyval)
+
+ if keyname == 'Up':
+ if self._vadjustment.props.value > self._vadjustment.props.lower:
+ self._vadjustment.props.value -= 1
+ elif keyname == 'Down':
+ max_value = self._result_set.length - self._page_size
+ if self._vadjustment.props.value < max_value:
+ self._vadjustment.props.value += 1
+ elif keyname == 'Page_Up' or keyname == 'KP_Page_Up':
+ new_position = max(0,
+ self._vadjustment.props.value - self._page_size)
+ if new_position != self._vadjustment.props.value:
+ self._vadjustment.props.value = new_position
+ elif keyname == 'Page_Down' or keyname == 'KP_Page_Down':
+ new_position = min(self._result_set.length - self._page_size,
+ self._vadjustment.props.value + self._page_size)
+ if new_position != self._vadjustment.props.value:
+ self._vadjustment.props.value = new_position
+ elif keyname == 'Home' or keyname == 'KP_Home':
+ new_position = 0
+ if new_position != self._vadjustment.props.value:
+ self._vadjustment.props.value = new_position
+ elif keyname == 'End' or keyname == 'KP_End':
+ new_position = max(0, self._result_set.length - self._page_size)
+ if new_position != self._vadjustment.props.value:
+ self._vadjustment.props.value = new_position
+ else:
+ return False
+
+ return True
+
+ def do_size_allocate(self, allocation):
+ gtk.HBox.do_size_allocate(self, allocation)
+ new_page_size = int(allocation.height / style.GRID_CELL_SIZE)
+
+ logging.debug("do_size_allocate: %r" % new_page_size)
+
+ if new_page_size != self._page_size:
+ self._page_size = new_page_size
+ self._queue_reflow()
+
+ def _queue_reflow(self):
+ if not self._reflow_sid:
+ self._reflow_sid = gobject.idle_add(self._reflow_idle_cb)
+
+ def _reflow_idle_cb(self):
+ self._box.clear()
+ self._entries = []
+
+ self._vadjustment.props.page_size = self._page_size
+ self._vadjustment.props.page_increment = self._page_size
+ self._vadjustment.changed()
+
+ if self._result_set is None:
+ self._result_set = model.find(self._query)
+
+ max_value = max(0, self._result_set.length - self._page_size)
+ if self._vadjustment.props.value > max_value:
+ self._vadjustment.props.value = max_value
+ else:
+ self._do_scroll(force=True)
+
+ self._reflow_sid = 0
+
+ def _show_message(self, message):
+ box = hippo.CanvasBox(orientation=hippo.ORIENTATION_VERTICAL,
+ background_color=style.COLOR_WHITE.get_int(),
+ yalign=hippo.ALIGNMENT_CENTER)
+ icon = CanvasIcon(size=style.LARGE_ICON_SIZE,
+ icon_name='activity-journal',
+ stroke_color = style.COLOR_BUTTON_GREY.get_svg(),
+ fill_color = style.COLOR_TRANSPARENT.get_svg())
+ text = hippo.CanvasText(text=message,
+ xalign=hippo.ALIGNMENT_CENTER,
+ font_desc=style.FONT_NORMAL.get_pango_desc(),
+ color = style.COLOR_BUTTON_GREY.get_int())
+
+ box.append(icon)
+ box.append(text)
+ self._canvas.set_root(box)
+
+ def _clear_message(self):
+ self._canvas.set_root(self._box)
+
+ # TODO: Dnd methods. This should be merged somehow inside hippo-canvas.
+ def _canvas_motion_notify_event_cb(self, widget, event):
+ if not self._pressed_button:
+ return True
+
+ # if the mouse button is not pressed, no drag should occurr
+ if not event.state & gtk.gdk.BUTTON1_MASK:
+ self._pressed_button = None
+ return True
+
+ logging.debug("motion_notify_event_cb")
+
+ if event.is_hint:
+ x, y, state_ = event.window.get_pointer()
+ else:
+ x = event.x
+ y = event.y
+
+ if widget.drag_check_threshold(int(self._press_start_x),
+ int(self._press_start_y),
+ int(x),
+ int(y)):
+ context_ = widget.drag_begin([('text/uri-list', 0, 0),
+ ('journal-object-id', 0, 0)],
+ gtk.gdk.ACTION_COPY,
+ 1,
+ event)
+ return True
+
+ def _drag_end_cb(self, widget, drag_context):
+ logging.debug("drag_end_cb")
+ self._pressed_button = None
+ self._press_start_x = None
+ self._press_start_y = None
+ self._last_clicked_entry = None
+
+ def _drag_data_get_cb(self, widget, context, selection, target_type,
+ event_time):
+ logging.debug("drag_data_get_cb: requested target " + selection.target)
+
+ metadata = self._last_clicked_entry.metadata
+ if selection.target == 'text/uri-list':
+ #TODO: figure out the best place to get rid of that temp file
+ file_path = model.get_file(metadata)
+ selection.set(selection.target, 8, file_path)
+ elif selection.target == 'journal-object-id':
+ selection.set(selection.target, 8, metadata['uid'])
+
+ def _canvas_button_press_event_cb(self, widget, event):
+ logging.debug("button_press_event_cb")
+
+ if event.button == 1 and event.type == gtk.gdk.BUTTON_PRESS:
+ self._last_clicked_entry = \
+ self._get_entry_at_coords(event.x, event.y)
+ if self._last_clicked_entry:
+ self._pressed_button = event.button
+ self._press_start_x = event.x
+ self._press_start_y = event.y
+
+ return False
+
+ def _get_entry_at_coords(self, x, y):
+ for entry in self._box.get_children():
+ entry_x, entry_y = entry.get_context().translate_to_widget(entry)
+ entry_width, entry_height = entry.get_allocation()
+
+ if (x >= entry_x ) and (x <= entry_x + entry_width) and \
+ (y >= entry_y ) and (y <= entry_y + entry_height):
+ return entry
+ return None
+
+ def update_dates(self):
+ logging.debug('ListView.update_dates')
+ for entry in self._entries:
+ if entry.get_visible():
+ entry.update_date()
+
+ def __datastore_created_cb(self, uid):
+ self._set_dirty()
+
+ def __datastore_updated_cb(self, uid):
+ self._set_dirty()
+
+ def __datastore_deleted_cb(self, uid):
+ self._set_dirty()
+
+ def _set_dirty(self):
+ if self._fully_obscured:
+ self._dirty = True
+ else:
+ self._schedule_refresh()
+
+ def _schedule_refresh(self):
+ if self._refresh_idle_handler is None:
+ logging.debug('Add refresh idle callback')
+ self._refresh_idle_handler = \
+ gobject.idle_add(self.__refresh_idle_cb)
+
+ def __refresh_idle_cb(self):
+ self.refresh()
+ if self._refresh_idle_handler is not None:
+ logging.debug('Remove refresh idle callback')
+ gobject.source_remove(self._refresh_idle_handler)
+ self._refresh_idle_handler = None
+ return False
+
+ def set_is_visible(self, visible):
+ logging.debug('canvas_visibility_notify_event_cb %r' % visible)
+ if visible:
+ self._fully_obscured = False
+ if self._dirty:
+ self._schedule_refresh()
+ if self._update_dates_timer is None:
+ logging.debug('Adding date updating timer')
+ self._update_dates_timer = \
+ gobject.timeout_add_seconds(UPDATE_INTERVAL,
+ self.__update_dates_timer_cb)
+ else:
+ self._fully_obscured = True
+ if self._update_dates_timer is not None:
+ logging.debug('Remove date updating timer')
+ gobject.source_remove(self._update_dates_timer)
+ self._update_dates_timer = None
+
+ def __update_dates_timer_cb(self):
+ self.update_dates()
+ return True
+
+class ListView(BaseListView):
+ __gtype_name__ = 'ListView'
+
+ __gsignals__ = {
+ 'detail-clicked': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([object]))
+ }
+
+ def __init__(self):
+ BaseListView.__init__(self)
+
+ def create_entry(self):
+ entry = CollapsedEntry()
+ entry.connect('detail-clicked', self.__entry_activated_cb)
+ return entry
+
+ def __entry_activated_cb(self, entry):
+ self.emit('detail-clicked', entry)
+
diff --git a/src/jarabe/journal/misc.py b/src/jarabe/journal/misc.py
new file mode 100644
index 0000000..16047e6
--- /dev/null
+++ b/src/jarabe/journal/misc.py
@@ -0,0 +1,224 @@
+# 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
+
+import logging
+import time
+import traceback
+import sys
+import os
+from gettext import gettext as _
+
+import gtk
+
+from sugar.activity import activityfactory
+from sugar.activity.activityhandle import ActivityHandle
+from sugar import mime
+from sugar.bundle.activitybundle import ActivityBundle
+from sugar.bundle.contentbundle import ContentBundle
+from sugar.bundle.bundle import MalformedBundleException
+from sugar import util
+
+from jarabe.model import bundleregistry
+from jarabe.journal.journalentrybundle import JournalEntryBundle
+from jarabe.journal import model
+
+def _get_icon_file_name(icon_name):
+ icon_theme = gtk.icon_theme_get_default()
+ info = icon_theme.lookup_icon(icon_name, gtk.ICON_SIZE_LARGE_TOOLBAR, 0)
+ if not info:
+ # display standard icon when icon for mime type is not found
+ info = icon_theme.lookup_icon('application-octet-stream',
+ gtk.ICON_SIZE_LARGE_TOOLBAR, 0)
+ fname = info.get_filename()
+ del info
+ return fname
+
+_icon_cache = util.LRU(50)
+
+def get_icon_name(metadata):
+ cache_key = (metadata['uid'], metadata.get('timestamp', None))
+ if cache_key in _icon_cache:
+ return _icon_cache[cache_key]
+
+ file_name = None
+
+ #TODO: figure out the best place to get rid of that temp file
+ file_path = model.get_file(metadata['uid'])
+ if is_activity_bundle(metadata) and os.path.exists(file_path):
+ try:
+ bundle = ActivityBundle(file_path)
+ file_name = bundle.get_icon()
+ except Exception:
+ logging.warning('Could not read bundle:\n' + \
+ ''.join(traceback.format_exception(*sys.exc_info())))
+ file_name = _get_icon_file_name('application-octet-stream')
+
+ if not file_name and metadata.get('activity', ''):
+ service_name = metadata['activity']
+ activity_info = bundleregistry.get_registry().get_bundle(service_name)
+ if activity_info:
+ file_name = activity_info.get_icon()
+
+ mime_type = metadata['mime_type']
+ if not file_name and mime_type:
+ icon_name = mime.get_mime_icon(mime_type)
+ if icon_name:
+ file_name = _get_icon_file_name(icon_name)
+
+ if not file_name or not os.path.exists(file_name):
+ file_name = _get_icon_file_name('application-octet-stream')
+
+ _icon_cache[cache_key] = file_name
+
+ return file_name
+
+def get_date(metadata):
+ """ Convert from a string in iso format to a more human-like format. """
+ if metadata.has_key('timestamp'):
+ timestamp = float(metadata['timestamp'])
+ return util.timestamp_to_elapsed_string(timestamp)
+ elif metadata.has_key('mtime'):
+ ti = time.strptime(metadata['mtime'], "%Y-%m-%dT%H:%M:%S")
+ return util.timestamp_to_elapsed_string(time.mktime(ti))
+ else:
+ return _('No date')
+
+def get_bundle(metadata):
+ try:
+ #TODO: figure out the best place to get rid of that temp file
+ file_path = model.get_file(metadata['uid'])
+ if is_activity_bundle(metadata) and os.path.exists(file_path):
+ return ActivityBundle(file_path)
+ elif is_content_bundle(metadata) and os.path.exists(file_path):
+ return ContentBundle(file_path)
+ elif is_journal_bundle(metadata) and os.path.exists(file_path):
+ return JournalEntryBundle(file_path)
+ else:
+ return None
+ except MalformedBundleException, e:
+ logging.warning('Incorrect bundle: %r' % e)
+ return None
+
+def _get_activities_for_mime(mime_type):
+ registry = bundleregistry.get_registry()
+ result = registry.get_activities_for_type(mime_type)
+ if not result:
+ for parent_mime in mime.get_mime_parents(mime_type):
+ result.extend(registry.get_activities_for_type(parent_mime))
+ return result
+
+def get_activities(metadata):
+ activities = []
+
+ bundle_id = metadata.get('activity', '')
+ if bundle_id:
+ activity_info = bundleregistry.get_registry().get_bundle(bundle_id)
+ if activity_info:
+ activities.append(activity_info)
+
+ mime_type = metadata.get('mime_type', '')
+ if mime_type:
+ activities_info = _get_activities_for_mime(mime_type)
+ for activity_info in activities_info:
+ if activity_info.get_bundle_id() != bundle_id:
+ activities.append(activity_info)
+
+ return activities
+
+def resume(metadata, bundle_id=None):
+ registry = bundleregistry.get_registry()
+
+ if is_activity_bundle(metadata) and bundle_id is None:
+
+ logging.debug('Creating activity bundle')
+ #TODO: figure out the best place to get rid of that temp file
+ file_path = model.get_file(metadata['uid'])
+ bundle = ActivityBundle(file_path)
+ if not registry.is_installed(bundle):
+ logging.debug('Installing activity bundle')
+ registry.install(bundle)
+ else:
+ logging.debug('Upgrading activity bundle')
+ registry.upgrade(bundle)
+
+ logging.debug('activityfactory.creating bundle with id %r',
+ bundle.get_bundle_id())
+ installed_bundle = registry.get_bundle(bundle.get_bundle_id())
+ if installed_bundle:
+ activityfactory.create(installed_bundle)
+ else:
+ logging.error('Bundle %r is not installed.',
+ bundle.get_bundle_id())
+
+ elif is_content_bundle(metadata) and bundle_id is None:
+
+ logging.debug('Creating content bundle')
+ #TODO: figure out the best place to get rid of that temp file
+ file_path = model.get_file(metadata['uid'])
+ bundle = ContentBundle(file_path)
+ if not bundle.is_installed():
+ logging.debug('Installing content bundle')
+ bundle.install()
+
+ activities = _get_activities_for_mime('text/html')
+ if len(activities) == 0:
+ logging.warning('No activity can open HTML content bundles')
+ return
+
+ uri = bundle.get_start_uri()
+ logging.debug('activityfactory.creating with uri %s', uri)
+
+ activity_bundle = registry.get_bundle(activities[0].get_bundle_id())
+ activityfactory.create_with_uri(activity_bundle, bundle.get_start_uri())
+ else:
+ if bundle_id is None:
+ activities = get_activities(metadata)
+ if not activities:
+ logging.warning('No activity can open this object, %s.' %
+ metadata.get('mime_type', None))
+ return
+ bundle_id = activities[0].get_bundle_id()
+
+ bundle = registry.get_bundle(bundle_id)
+
+ activity_id = metadata.get('activity_id', '')
+
+ if metadata['mountpoint'] == '/':
+ object_id = metadata['uid']
+ else:
+ object_id = model.copy(metadata, '/')
+
+ if activity_id:
+ handle = ActivityHandle(object_id=object_id,
+ activity_id=activity_id)
+ activityfactory.create(bundle, handle)
+ else:
+ activityfactory.create_with_object_id(bundle, object_id)
+
+def is_activity_bundle(metadata):
+ return metadata['mime_type'] in \
+ [ActivityBundle.MIME_TYPE, ActivityBundle.DEPRECATED_MIME_TYPE]
+
+def is_content_bundle(metadata):
+ return metadata['mime_type'] == ContentBundle.MIME_TYPE
+
+def is_journal_bundle(metadata):
+ return metadata['mime_type'] == JournalEntryBundle.MIME_TYPE
+
+def is_bundle(metadata):
+ return is_activity_bundle(metadata) or is_content_bundle(metadata) or \
+ is_journal_bundle(metadata)
+
diff --git a/src/jarabe/journal/modalalert.py b/src/jarabe/journal/modalalert.py
new file mode 100644
index 0000000..a5a86ab
--- /dev/null
+++ b/src/jarabe/journal/modalalert.py
@@ -0,0 +1,97 @@
+# Copyright (C) 2008 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
+
+import gtk
+from gettext import gettext as _
+import gconf
+
+from sugar.graphics.icon import Icon
+from sugar.graphics import style
+from sugar.graphics.xocolor import XoColor
+
+class ModalAlert(gtk.Window):
+
+ __gtype_name__ = 'SugarModalAlert'
+
+ def __init__(self):
+ gtk.Window.__init__(self)
+
+ self.set_border_width(style.LINE_WIDTH)
+ offset = style.GRID_CELL_SIZE
+ width = gtk.gdk.screen_width() - offset * 2
+ height = gtk.gdk.screen_height() - offset * 2
+ self.set_size_request(width, height)
+ self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
+ self.set_decorated(False)
+ self.set_resizable(False)
+ self.set_modal(True)
+
+ self._main_view = gtk.EventBox()
+ self._vbox = gtk.VBox()
+ self._vbox.set_spacing(style.DEFAULT_SPACING)
+ self._vbox.set_border_width(style.GRID_CELL_SIZE * 2)
+ self._main_view.modify_bg(gtk.STATE_NORMAL,
+ style.COLOR_BLACK.get_gdk_color())
+ self._main_view.add(self._vbox)
+ self._vbox.show()
+
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string('/desktop/sugar/user/color'))
+
+ icon = Icon(icon_name='activity-journal',
+ pixel_size=style.XLARGE_ICON_SIZE,
+ xo_color=color)
+ self._vbox.pack_start(icon, False)
+ icon.show()
+
+ self._title = gtk.Label()
+ self._title.modify_fg(gtk.STATE_NORMAL,
+ style.COLOR_WHITE.get_gdk_color())
+ self._title.set_markup('<b>%s</b>' % _('Your Journal is full'))
+ self._vbox.pack_start(self._title, False)
+ self._title.show()
+
+ self._message = gtk.Label(_('Please delete some old Journal'
+ ' entries to make space for new ones.'))
+ self._message.modify_fg(gtk.STATE_NORMAL,
+ style.COLOR_WHITE.get_gdk_color())
+ self._vbox.pack_start(self._message, False)
+ self._message.show()
+
+ alignment = gtk.Alignment(xalign=0.5, yalign=0.5)
+ self._vbox.pack_start(alignment, expand=False)
+ alignment.show()
+
+ self._show_journal = gtk.Button()
+ self._show_journal.set_label(_('Show Journal'))
+ alignment.add(self._show_journal)
+ self._show_journal.show()
+ self._show_journal.connect('clicked', self.__show_journal_cb)
+
+ self.add(self._main_view)
+ self._main_view.show()
+
+ self.connect("realize", self.__realize_cb)
+
+ def __realize_cb(self, widget):
+ self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
+ self.window.set_accept_focus(True)
+
+ def __show_journal_cb(self, button):
+ '''The opener will listen on the destroy signal
+ '''
+ self.destroy()
+
diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
new file mode 100644
index 0000000..375345a
--- /dev/null
+++ b/src/jarabe/journal/model.py
@@ -0,0 +1,362 @@
+# Copyright (C) 2007-2008, 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
+
+import logging
+import os
+from datetime import datetime
+import time
+import shutil
+
+import dbus
+import gconf
+
+from sugar import dispatch
+from sugar import mime
+
+DS_DBUS_SERVICE = 'org.laptop.sugar.DataStore'
+DS_DBUS_INTERFACE = 'org.laptop.sugar.DataStore'
+DS_DBUS_PATH = '/org/laptop/sugar/DataStore'
+
+# Properties the journal cares about.
+PROPERTIES = ['uid', 'title', 'mtime', 'timestamp', 'keep', 'buddies',
+ 'icon-color', 'mime_type', 'progress', 'activity', 'mountpoint',
+ 'activity_id']
+
+class _Cache(object):
+
+ __gtype_name__ = 'model_Cache'
+
+ def __init__(self, entries=None):
+ self._array = []
+ self._dict = {}
+ if entries is not None:
+ self.append_all(entries)
+
+ def prepend_all(self, entries):
+ for entry in entries[::-1]:
+ self._array.insert(0, entry)
+ self._dict[entry['uid']] = entry
+
+ def append_all(self, entries):
+ for entry in entries:
+ self._array.append(entry)
+ self._dict[entry['uid']] = entry
+
+ def remove_all(self, entries):
+ entries = entries[:]
+ for entry in entries:
+ obj = self._dict[entry['uid']]
+ self._array.remove(obj)
+ del self._dict[entry['uid']]
+
+ def __len__(self):
+ return len(self._array)
+
+ def __getitem__(self, key):
+ if isinstance(key, basestring):
+ return self._dict[key]
+ else:
+ return self._array[key]
+
+class ResultSet(object):
+ """Encapsulates the result of a query
+ """
+
+ _CACHE_LIMIT = 80
+
+ def __init__(self, query):
+ self._total_count = -1
+ self._position = -1
+ self._query = query
+
+ self._offset = 0
+ self._cache = _Cache()
+
+ def get_length(self):
+ if self._total_count == -1:
+ query = self._query.copy()
+ query['limit'] = ResultSet._CACHE_LIMIT
+ entries, self._total_count = self._find(query)
+ self._cache.append_all(entries)
+ self._offset = 0
+ return self._total_count
+
+ length = property(get_length)
+
+ def _get_all_files(self, dir_path):
+ files = []
+ for entry in os.listdir(dir_path):
+ full_path = os.path.join(dir_path, entry)
+ if os.path.isdir(full_path):
+ files.extend(self._get_all_files(full_path))
+ elif os.path.isfile(full_path):
+ stat = os.stat(full_path)
+ files.append((full_path, stat.st_mtime))
+ return files
+
+ def _query_mount_point(self, mount_point, query):
+ t = time.time()
+
+ files = self._get_all_files(mount_point)
+ offset = int(query.get('offset', 0))
+ limit = int(query.get('limit', len(files)))
+
+ total_count = len(files)
+ files.sort(lambda a, b: int(b[1] - a[1]))
+ files = files[offset:offset + limit]
+
+ result = []
+ for file_path, timestamp_ in files:
+ metadata = _get_file_metadata(file_path)
+ result.append(metadata)
+
+ logging.debug('_query_mount_point took %f s.' % (time.time() - t))
+
+ return result, total_count
+
+ def _find(self, query):
+ mount_points = query.get('mountpoints', ['/'])
+ if mount_points is None or len(mount_points) != 1:
+ raise ValueError('Exactly one mount point must be specified')
+
+ if mount_points[0] == '/':
+ data_store = _get_datastore()
+ entries, total_count = _get_datastore().find(query, PROPERTIES,
+ byte_arrays=True)
+ else:
+ entries, total_count = self._query_mount_point(mount_points[0],
+ query)
+
+ for entry in entries:
+ entry['mountpoint'] = mount_points[0]
+
+ return entries, total_count
+
+ def seek(self, position):
+ self._position = position
+
+ def read(self, max_count):
+ logging.debug('ResultSet.read position: %r' % self._position)
+
+ if max_count * 5 > ResultSet._CACHE_LIMIT:
+ raise RuntimeError(
+ 'max_count (%i) too big for ResultSet._CACHE_LIMIT'
+ ' (%i).' % (max_count, ResultSet._CACHE_LIMIT))
+
+ if self._position == -1:
+ self.seek(0)
+
+ if self._position < self._offset:
+ remaining_forward_entries = 0
+ else:
+ remaining_forward_entries = self._offset + len(self._cache) - \
+ self._position
+
+ if self._position > self._offset + len(self._cache):
+ remaining_backwards_entries = 0
+ else:
+ remaining_backwards_entries = self._position - self._offset
+
+ last_cached_entry = self._offset + len(self._cache)
+
+ if (remaining_forward_entries <= 0 and
+ remaining_backwards_entries <= 0) or \
+ max_count > ResultSet._CACHE_LIMIT:
+
+ # Total cache miss: remake it
+ offset = max(0, self._position - max_count)
+ logging.debug('remaking cache, offset: %r limit: %r' % \
+ (offset, max_count * 2))
+ query = self._query.copy()
+ query['limit'] = ResultSet._CACHE_LIMIT
+ query['offset'] = offset
+ entries, self._total_count = self._find(query)
+
+ self._cache.remove_all(self._cache)
+ self._cache.append_all(entries)
+ self._offset = offset
+
+ elif remaining_forward_entries < 2 * max_count and \
+ last_cached_entry < self._total_count:
+
+ # Add one page to the end of cache
+ logging.debug('appending one more page, offset: %r' % \
+ last_cached_entry)
+ query = self._query.copy()
+ query['limit'] = max_count
+ query['offset'] = last_cached_entry
+ entries, self._total_count = self._find(query)
+
+ # update cache
+ self._cache.append_all(entries)
+
+ # apply the cache limit
+ objects_excess = len(self._cache) - ResultSet._CACHE_LIMIT
+ if objects_excess > 0:
+ self._offset += objects_excess
+ self._cache.remove_all(self._cache[:objects_excess])
+
+ elif remaining_backwards_entries < 2 * max_count and self._offset > 0:
+
+ # Add one page to the beginning of cache
+ limit = min(self._offset, max_count)
+ self._offset = max(0, self._offset - max_count)
+
+ logging.debug('prepending one more page, offset: %r limit: %r' %
+ (self._offset, limit))
+ query = self._query.copy()
+ query['limit'] = limit
+ query['offset'] = self._offset
+ entries, self._total_count = self._find(query)
+
+ # update cache
+ self._cache.prepend_all(entries)
+
+ # apply the cache limit
+ objects_excess = len(self._cache) - ResultSet._CACHE_LIMIT
+ if objects_excess > 0:
+ self._cache.remove_all(self._cache[-objects_excess:])
+ else:
+ logging.debug('cache hit and no need to grow the cache')
+
+ first_pos = self._position - self._offset
+ last_pos = self._position - self._offset + max_count
+ return self._cache[first_pos:last_pos]
+
+def _get_file_metadata(path):
+ stat = os.stat(path)
+ client = gconf.client_get_default()
+ return {'uid': path,
+ 'title': os.path.basename(path),
+ 'timestamp': stat.st_mtime,
+ 'mime_type': mime.get_for_file(path),
+ 'activity': '',
+ 'activity_id': '',
+ 'icon-color': client.get_string('/desktop/sugar/user/color')}
+
+_datastore = None
+def _get_datastore():
+ global _datastore
+ if _datastore is None:
+ bus = dbus.SessionBus()
+ remote_object = bus.get_object(DS_DBUS_SERVICE, DS_DBUS_PATH)
+ _datastore = dbus.Interface(remote_object, DS_DBUS_INTERFACE)
+
+ return _datastore
+
+def find(query):
+ """Returns a ResultSet
+ """
+ if 'order_by' not in query:
+ query['order_by'] = ['-mtime']
+ return ResultSet(query)
+
+def _get_mount_point(path):
+ dir_path = os.path.dirname(path)
+ while True:
+ if os.path.ismount(dir_path):
+ return dir_path
+ else:
+ dir_path = dir_path.rsplit(os.sep, 1)[0]
+
+def get(object_id):
+ """Returns the metadata for an object
+ """
+ if os.path.exists(object_id):
+ metadata = _get_file_metadata(object_id)
+ metadata['mountpoint'] = _get_mount_point(object_id)
+ else:
+ metadata = _get_datastore().get_properties(object_id, byte_arrays=True)
+ metadata['mountpoint'] = '/'
+ return metadata
+
+def get_file(object_id):
+ """Returns the file for an object
+ """
+ if os.path.exists(object_id):
+ logging.debug('get_file asked for file with path %r' % object_id)
+ return object_id
+ else:
+ logging.debug('get_file asked for entry with id %r' % object_id)
+ return _get_datastore().get_filename(object_id)
+
+def get_unique_values(key):
+ """Returns a list with the different values a property has taken
+ """
+ empty_dict = dbus.Dictionary({}, signature='ss')
+ return _get_datastore().get_uniquevaluesfor(key, empty_dict)
+
+def delete(object_id):
+ """Removes an object from persistent storage
+ """
+ if os.path.exists(object_id):
+ os.unlink(object_id)
+ else:
+ _get_datastore().delete(object_id)
+
+def copy(metadata, mount_point):
+ """Copies an object to another mount point
+ """
+ metadata = get(metadata['uid'])
+
+ #TODO: figure out the best place to get rid of that temp file
+ file_path = get_file(metadata['uid'])
+
+ metadata['mountpoint'] = mount_point
+ del metadata['uid']
+
+ #TODO: should we transfer ownership?
+ return write(metadata, file_path)
+
+def write(metadata, file_path='', update_mtime=True):
+ """Creates or updates an entry for that id
+ """
+ logging.debug('model.write %r %r %r' % (metadata, file_path, update_mtime))
+ if update_mtime:
+ metadata['mtime'] = datetime.now().isoformat()
+ metadata['timestamp'] = int(time.time())
+
+ if metadata['mountpoint'] == '/':
+ if metadata.get('uid', ''):
+ object_id = _get_datastore().update(metadata['uid'],
+ dbus.Dictionary(metadata),
+ file_path,
+ True)
+ else:
+ object_id = _get_datastore().create(dbus.Dictionary(metadata),
+ file_path,
+ True)
+ else:
+ if not os.path.exists(file_path):
+ raise ValueError('Entries without a file cannot be copied to '
+ 'removable devices')
+ file_name = _get_file_name(metadata['title'], metadata['mime_type'])
+ destination_path = os.path.join(metadata['mountpoint'], file_name)
+ shutil.copy(file_path, destination_path)
+ object_id = destination_path
+
+ return object_id
+
+def _get_file_name(title, mime_type):
+ # TODO: sanitize title for common filesystems
+ # TODO: make as robust as possible, this function should never fail.
+ # TODO: don't append the same extension again and again
+ return '%s.%s' % (title, mime.get_primary_extension(mime_type))
+
+created = dispatch.Signal()
+updated = dispatch.Signal()
+deleted = dispatch.Signal()
+
diff --git a/src/jarabe/journal/objectchooser.py b/src/jarabe/journal/objectchooser.py
new file mode 100644
index 0000000..fcaed55
--- /dev/null
+++ b/src/jarabe/journal/objectchooser.py
@@ -0,0 +1,198 @@
+# 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 logging
+
+import gobject
+import gtk
+import hippo
+
+from sugar.graphics import style
+from sugar.graphics.toolbutton import ToolButton
+
+from jarabe.journal.listview import ListView
+from jarabe.journal.collapsedentry import BaseCollapsedEntry
+from jarabe.journal.journaltoolbox import SearchToolbar
+from jarabe.journal.volumestoolbar import VolumesToolbar
+
+class ObjectChooser(gtk.Window):
+
+ __gtype_name__ = 'ObjectChooser'
+
+ __gsignals__ = {
+ 'response': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([int]))
+ }
+
+ def __init__(self, parent=None):
+ gtk.Window.__init__(self)
+ self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
+ self.set_decorated(False)
+ self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
+ self.set_border_width(style.LINE_WIDTH)
+
+ self._selected_object_id = None
+
+ self.add_events(gtk.gdk.VISIBILITY_NOTIFY_MASK)
+ self.connect('visibility-notify-event',
+ self.__visibility_notify_event_cb)
+ self.connect('delete-event', self.__delete_event_cb)
+ self.connect('key-press-event', self.__key_press_event_cb)
+ if parent is not None:
+ self.connect('realize', self.__realize_cb, parent)
+
+ vbox = gtk.VBox()
+ self.add(vbox)
+ vbox.show()
+
+ title_box = TitleBox()
+ title_box.connect('volume-changed', self.__volume_changed_cb)
+ title_box.close_button.connect('clicked',
+ self.__close_button_clicked_cb)
+ title_box.set_size_request(-1, style.GRID_CELL_SIZE)
+ vbox.pack_start(title_box, expand=False)
+ title_box.show()
+
+ separator = gtk.HSeparator()
+ vbox.pack_start(separator, expand=False)
+ separator.show()
+
+ self._toolbar = SearchToolbar()
+ self._toolbar.connect('query-changed', self.__query_changed_cb)
+ self._toolbar.set_size_request(-1, style.GRID_CELL_SIZE)
+ vbox.pack_start(self._toolbar, expand=False)
+ self._toolbar.show()
+
+ self._list_view = ChooserListView()
+ self._list_view.connect('entry-activated', self.__entry_activated_cb)
+ vbox.pack_start(self._list_view)
+ self._list_view.show()
+
+ self._toolbar.set_mount_point('/')
+
+ width = gtk.gdk.screen_width() - style.GRID_CELL_SIZE * 2
+ height = gtk.gdk.screen_height() - style.GRID_CELL_SIZE * 2
+ self.set_size_request(width, height)
+
+ def __realize_cb(self, chooser, parent):
+ self.window.set_transient_for(parent)
+ # TODO: Should we disconnect the signal here?
+
+ def __entry_activated_cb(self, list_view, entry):
+ self._selected_object_id = entry.metadata['uid']
+ self.emit('response', gtk.RESPONSE_ACCEPT)
+
+ def __delete_event_cb(self, chooser, event):
+ self.emit('response', gtk.RESPONSE_DELETE_EVENT)
+
+ def __key_press_event_cb(self, widget, event):
+ keyname = gtk.gdk.keyval_name(event.keyval)
+ if keyname == 'Escape':
+ self.emit('response', gtk.RESPONSE_DELETE_EVENT)
+
+ def __close_button_clicked_cb(self, button):
+ self.emit('response', gtk.RESPONSE_DELETE_EVENT)
+
+ def get_selected_object_id(self):
+ return self._selected_object_id
+
+ def __query_changed_cb(self, toolbar, query):
+ self._list_view.update_with_query(query)
+
+ def __volume_changed_cb(self, volume_toolbar, volume_id):
+ logging.debug('Selected volume: %r.' % volume_id)
+ self._toolbar.set_volume_id(volume_id)
+
+ def __visibility_notify_event_cb(self, window, event):
+ logging.debug('visibility_notify_event_cb %r' % self)
+ visible = event.state == gtk.gdk.VISIBILITY_FULLY_OBSCURED
+ self._list_view.set_is_visible(visible)
+
+class TitleBox(VolumesToolbar):
+ __gtype_name__ = 'TitleBox'
+
+ def __init__(self):
+ VolumesToolbar.__init__(self)
+
+ label = gtk.Label()
+ label.set_markup('<b>%s</b>' % _('Choose an object'))
+ label.set_alignment(0, 0.5)
+ self._add_widget(label, expand=True)
+
+ self.close_button = ToolButton(icon_name='dialog-cancel')
+ self.close_button.set_tooltip(_('Close'))
+ self.insert(self.close_button, -1)
+ self.close_button.show()
+
+ def _add_widget(self, widget, expand=False):
+ tool_item = gtk.ToolItem()
+ tool_item.set_expand(expand)
+
+ tool_item.add(widget)
+ widget.show()
+
+ self.insert(tool_item, -1)
+ tool_item.show()
+
+class ChooserCollapsedEntry(BaseCollapsedEntry):
+ __gtype_name__ = 'ChooserCollapsedEntry'
+
+ __gsignals__ = {
+ 'entry-activated': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([]))
+ }
+
+ def __init__(self):
+ BaseCollapsedEntry.__init__(self)
+
+ self.connect_after('button-release-event',
+ self.__button_release_event_cb)
+ self.connect('motion-notify-event', self.__motion_notify_event_cb)
+
+ def __button_release_event_cb(self, entry, event):
+ self.emit('entry-activated')
+ return True
+
+ def __motion_notify_event_cb(self, entry, event):
+ if event.detail == hippo.MOTION_DETAIL_ENTER:
+ self.props.background_color = style.COLOR_PANEL_GREY.get_int()
+ elif event.detail == hippo.MOTION_DETAIL_LEAVE:
+ self.props.background_color = style.COLOR_WHITE.get_int()
+ return False
+
+class ChooserListView(ListView):
+ __gtype_name__ = 'ChooserListView'
+
+ __gsignals__ = {
+ 'entry-activated': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([object]))
+ }
+
+ def __init__(self):
+ ListView.__init__(self)
+
+ def create_entry(self):
+ entry = ChooserCollapsedEntry()
+ entry.connect('entry-activated', self.__entry_activated_cb)
+ return entry
+
+ def __entry_activated_cb(self, entry):
+ self.emit('entry-activated', entry)
+
diff --git a/src/jarabe/journal/palettes.py b/src/jarabe/journal/palettes.py
new file mode 100644
index 0000000..6832750
--- /dev/null
+++ b/src/jarabe/journal/palettes.py
@@ -0,0 +1,178 @@
+# Copyright (C) 2008 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 logging
+
+import gobject
+import gtk
+import gconf
+
+from sugar.graphics import style
+from sugar.graphics.palette import Palette
+from sugar.graphics.menuitem import MenuItem
+from sugar.graphics.icon import Icon
+from sugar.graphics.xocolor import XoColor
+from sugar import mime
+
+from jarabe.model import bundleregistry
+from jarabe.model import friends
+from jarabe.model import filetransfer
+from jarabe.journal import misc
+from jarabe.journal import model
+
+class ObjectPalette(Palette):
+ def __init__(self, metadata):
+
+ self._metadata = metadata
+
+ activity_icon = Icon(icon_size=gtk.ICON_SIZE_LARGE_TOOLBAR)
+ activity_icon.props.file = misc.get_icon_name(metadata)
+ if metadata.has_key('icon-color') and \
+ metadata['icon-color']:
+ activity_icon.props.xo_color = \
+ XoColor(metadata['icon-color'])
+ else:
+ activity_icon.props.xo_color = \
+ XoColor('%s,%s' % (style.COLOR_BUTTON_GREY.get_svg(),
+ style.COLOR_TRANSPARENT.get_svg()))
+
+ if metadata.has_key('title'):
+ title = metadata['title']
+ else:
+ title = _('Untitled')
+
+ Palette.__init__(self, primary_text=title,
+ icon=activity_icon)
+
+ if metadata.get('activity_id', ''):
+ resume_label = _('Resume')
+ else:
+ resume_label = _('Start')
+ menu_item = MenuItem(resume_label, 'activity-start')
+ menu_item.connect('activate', self.__start_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ # TODO: Add "Start with" menu item
+
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string('/desktop/sugar/user/color'))
+ menu_item = MenuItem(_('Copy'))
+ icon = Icon(icon_name='edit-copy', xo_color=color,
+ icon_size=gtk.ICON_SIZE_MENU)
+ menu_item.set_image(icon)
+ menu_item.connect('activate', self.__copy_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ menu_item = MenuItem(_('Send to'), 'list-remove')
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ friends_menu = FriendsMenu()
+ friends_menu.connect('friend-selected', self.__friend_selected_cb)
+ menu_item.set_submenu(friends_menu)
+
+ menu_item = MenuItem(_('Erase'), 'list-remove')
+ menu_item.connect('activate', self.__erase_activate_cb)
+ self.menu.append(menu_item)
+ menu_item.show()
+
+ def __start_activate_cb(self, menu_item):
+ misc.resume(self._metadata)
+
+ def __copy_activate_cb(self, menu_item):
+ clipboard = gtk.Clipboard()
+ clipboard.set_with_data([('text/uri-list', 0, 0)],
+ self.__clipboard_get_func_cb,
+ self.__clipboard_clear_func_cb)
+
+ def __clipboard_get_func_cb(self, clipboard, selection_data, info, data):
+ file_path = model.get_file(self._metadata['uid'])
+ logging.debug('__clipboard_get_func_cb %r' % file_path)
+ selection_data.set_uris(['file://' + file_path])
+
+ def __clipboard_clear_func_cb(self, clipboard, data):
+ #TODO: should we remove here the temp file created before?
+ pass
+
+ def __erase_activate_cb(self, menu_item):
+ registry = bundleregistry.get_registry()
+
+ bundle = misc.get_bundle(self._metadata)
+ if bundle is not None and registry.is_installed(bundle):
+ registry.uninstall(bundle)
+ model.delete(self._metadata['uid'])
+
+ def __friend_selected_cb(self, menu_item, buddy):
+ logging.debug('__friend_selected_cb')
+ #TODO: figure out the best place to get rid of that temp file
+ file_name = model.get_file(self._metadata['uid'])
+
+ title = str(self._metadata['title'])
+ description = str(self._metadata.get('description', ''))
+ mime_type = str(self._metadata['mime_type'])
+
+ if not mime_type:
+ mime_type = mime.get_for_file(file_name)
+
+ filetransfer.start_transfer(buddy, file_name, title, description,
+ mime_type)
+
+class FriendsMenu(gtk.Menu):
+ __gtype_name__ = 'JournalFriendsMenu'
+
+ __gsignals__ = {
+ 'friend-selected' : (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ }
+
+ def __init__(self):
+ gobject.GObject.__init__(self)
+
+ friends_model = friends.get_model()
+ for friend in friends_model:
+ if friend.is_present():
+ menu_item = MenuItem(text_label=friend.get_nick(),
+ icon_name='computer-xo',
+ xo_color=friend.get_color())
+ menu_item.connect('activate', self.__item_activate_cb, friend)
+ self.append(menu_item)
+ menu_item.show()
+
+ if not self.get_children():
+ menu_item = MenuItem(_('No friends present'))
+ menu_item.set_sensitive(False)
+ self.append(menu_item)
+ menu_item.show()
+
+ def __item_activate_cb(self, menu_item, friend):
+ self.emit('friend-selected', friend)
+
+class BuddyPalette(Palette):
+ def __init__(self, buddy):
+ self._buddy = buddy
+
+ nick, colors = buddy
+ buddy_icon = Icon(icon_name='computer-xo',
+ icon_size=style.STANDARD_ICON_SIZE,
+ xo_color=XoColor(colors))
+
+ Palette.__init__(self, primary_text=nick,
+ icon=buddy_icon)
+
+ # TODO: Support actions on buddies, like make friend, invite, etc.
diff --git a/src/jarabe/journal/volumestoolbar.py b/src/jarabe/journal/volumestoolbar.py
new file mode 100644
index 0000000..bb27ab7
--- /dev/null
+++ b/src/jarabe/journal/volumestoolbar.py
@@ -0,0 +1,172 @@
+# 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
+
+import logging
+from gettext import gettext as _
+
+import gobject
+import gio
+import gtk
+import gconf
+
+from sugar.graphics.radiotoolbutton import RadioToolButton
+from sugar.graphics.palette import Palette
+from sugar.graphics.xocolor import XoColor
+
+from jarabe.journal import model
+
+class VolumesToolbar(gtk.Toolbar):
+ __gtype_name__ = 'VolumesToolbar'
+
+ __gsignals__ = {
+ 'volume-changed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([str]))
+ }
+
+ def __init__(self):
+ gtk.Toolbar.__init__(self)
+ self._mount_added_hid = None
+ self._mount_removed_hid = None
+
+ button = JournalButton()
+ button.set_palette(Palette(_('Journal')))
+ button.connect('toggled', self._button_toggled_cb)
+ self.insert(button, 0)
+ button.show()
+ self._volume_buttons = [button]
+
+ self.connect('destroy', self.__destroy_cb)
+
+ gobject.idle_add(self._set_up_volumes)
+
+ def __destroy_cb(self, widget):
+ volume_monitor = gio.volume_monitor_get()
+ volume_monitor.disconnect(self._mount_added_hid)
+ volume_monitor.disconnect(self._mount_removed_hid)
+
+ def _set_up_volumes(self):
+ volume_monitor = gio.volume_monitor_get()
+ self._mount_added_hid = \
+ volume_monitor.connect('mount-added', self.__mount_added_cb)
+ self._mount_removed_hid = \
+ volume_monitor.connect('mount-removed', self.__mount_removed_cb)
+
+ for mount in volume_monitor.get_mounts():
+ self._add_button(mount)
+
+ def __mount_added_cb(self, volume_monitor, mount):
+ self._add_button(mount)
+
+ def __mount_removed_cb(self, volume_monitor, mount):
+ self._remove_button(mount)
+
+ def _add_button(self, mount):
+ logging.debug('VolumeToolbar._add_button: %r' % mount.get_name())
+
+ palette = Palette(mount.get_name())
+
+ button = VolumeButton(mount)
+ button.props.group = self._volume_buttons[0]
+ button.set_palette(palette)
+ button.connect('toggled', self._button_toggled_cb)
+ position = self.get_item_index(self._volume_buttons[-1]) + 1
+ self.insert(button, position)
+ button.show()
+
+ self._volume_buttons.append(button)
+
+ if mount.can_unmount():
+ menu_item = gtk.MenuItem(_('Unmount'))
+ menu_item.connect('activate', self._unmount_activated_cb, mount)
+ palette.menu.append(menu_item)
+ menu_item.show()
+
+ if len(self.get_children()) > 1:
+ self.show()
+
+ def _button_toggled_cb(self, button):
+ if button.props.active:
+ self.emit('volume-changed', button.mount_point)
+
+ def _unmount_activated_cb(self, menu_item, mount):
+ logging.debug('VolumesToolbar._unmount_activated_cb: %r', mount)
+ mount.unmount(self.__unmount_cb)
+
+ def __unmount_cb(self, source, result):
+ logging.debug('__unmount_cb %r %r' % (source, result))
+
+ def _get_button_for_mount(self, mount):
+ mount_point = mount.get_root().get_path()
+ for button in self.get_children():
+ if button.mount_point == mount_point:
+ return button
+ logging.error('Couldnt find button with mount_point %r' % mount_point)
+ return None
+
+ def _remove_button(self, mount):
+ button = self._get_button_for_mount(mount)
+ self._volume_buttons.remove(button)
+ self.remove(button)
+ self.get_children()[0].props.active = True
+
+ if len(self.get_children()) < 2:
+ self.hide()
+
+ def set_active_volume(self, mount):
+ button = self._get_button_for_mount(mount)
+ button.props.active = True
+
+class BaseButton(RadioToolButton):
+ def __init__(self, mount_point):
+ RadioToolButton.__init__(self)
+
+ self.mount_point = mount_point
+
+ self.drag_dest_set(gtk.DEST_DEFAULT_ALL,
+ [('journal-object-id', 0, 0)],
+ gtk.gdk.ACTION_COPY)
+ self.connect('drag-data-received', self._drag_data_received_cb)
+
+ def _drag_data_received_cb(self, widget, drag_context, x, y, selection_data,
+ info, timestamp):
+ object_id = selection_data.data
+ metadata = model.get(object_id)
+ model.copy(metadata, self.mount_point)
+
+class VolumeButton(BaseButton):
+ def __init__(self, mount):
+ mount_point = mount.get_root().get_path()
+ BaseButton.__init__(self, mount_point)
+
+ # TODO: fallback to the more generic icons when needed
+ self.props.named_icon = mount.get_icon().props.names[0]
+
+ # TODO: retrieve the colors from the owner of the device
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string('/desktop/sugar/user/color'))
+ self.props.xo_color = color
+
+class JournalButton(BaseButton):
+ def __init__(self):
+ BaseButton.__init__(self, mount_point='/')
+
+ self.props.named_icon = 'computer-xo'
+
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string('/desktop/sugar/user/color'))
+ self.props.xo_color = color
+
diff --git a/src/jarabe/model/Makefile.am b/src/jarabe/model/Makefile.am
new file mode 100644
index 0000000..399db65
--- /dev/null
+++ b/src/jarabe/model/Makefile.am
@@ -0,0 +1,16 @@
+sugardir = $(pythondir)/jarabe/model
+sugar_PYTHON = \
+ __init__.py \
+ buddy.py \
+ bundleregistry.py \
+ filetransfer.py \
+ friends.py \
+ invites.py \
+ owner.py \
+ neighborhood.py \
+ network.py \
+ notifications.py \
+ shell.py \
+ screen.py \
+ session.py \
+ sound.py
diff --git a/src/view/home/Makefile.in b/src/jarabe/model/Makefile.in
index 75c0d6c..d5ca0ae 100644
--- a/src/view/home/Makefile.in
+++ b/src/jarabe/model/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/view/home
+subdir = src/jarabe/model
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,25 +190,25 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/view/home
+sugardir = $(pythondir)/jarabe/model
sugar_PYTHON = \
__init__.py \
- activitieslist.py \
- favoritesview.py \
- favoriteslayout.py \
- grid.py \
- FriendView.py \
- FriendsBox.py \
- HomeBox.py \
- HomeWindow.py \
- MeshBox.py \
- MyIcon.py \
- proc_smaps.py \
- snowflakelayout.py \
- spreadlayout.py \
- transitionbox.py
+ buddy.py \
+ bundleregistry.py \
+ filetransfer.py \
+ friends.py \
+ invites.py \
+ owner.py \
+ neighborhood.py \
+ network.py \
+ notifications.py \
+ shell.py \
+ screen.py \
+ session.py \
+ sound.py
all: all-am
@@ -219,9 +222,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/view/home/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/jarabe/model/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/view/home/Makefile
+ $(AUTOMAKE) --foreign src/jarabe/model/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/model/__init__.py b/src/jarabe/model/__init__.py
index a9dd95a..a9dd95a 100644
--- a/src/model/__init__.py
+++ b/src/jarabe/model/__init__.py
diff --git a/src/model/BuddyModel.py b/src/jarabe/model/buddy.py
index b51b808..b51b808 100644
--- a/src/model/BuddyModel.py
+++ b/src/jarabe/model/buddy.py
diff --git a/service/bundleregistry.py b/src/jarabe/model/bundleregistry.py
index dd26f56..75b8ee4 100644
--- a/service/bundleregistry.py
+++ b/src/jarabe/model/bundleregistry.py
@@ -17,15 +17,17 @@
import os
import logging
import traceback
+import sys
import gobject
-import simplejson
+import cjson
from sugar.bundle.activitybundle import ActivityBundle
-from sugar.bundle.bundle import MalformedBundleException
+from sugar.bundle.bundle import MalformedBundleException, \
+ AlreadyInstalledException, RegistrationException
from sugar import env
-import config
+from jarabe import config
class BundleRegistry(gobject.GObject):
"""Service that tracks the available activity bundles"""
@@ -40,12 +42,14 @@ class BundleRegistry(gobject.GObject):
}
def __init__(self):
+ logging.debug('STARTUP: Loading the bundle registry')
gobject.GObject.__init__(self)
self._mime_defaults = self._load_mime_defaults()
self._bundles = []
- for activity_dir in self._get_activity_directories():
+ user_path = env.get_user_activities_path()
+ for activity_dir in [user_path, config.activities_path]:
self._scan_directory(activity_dir)
self._last_defaults_mtime = -1
@@ -53,21 +57,12 @@ class BundleRegistry(gobject.GObject):
try:
self._load_favorites()
- except Exception, e:
+ except Exception:
logging.error('Error while loading favorite_activities\n%s.' \
% traceback.format_exc())
self._merge_default_favorites()
- def _get_activity_directories(self):
- directories = []
- if os.environ.has_key('SUGAR_ACTIVITIES'):
- directories.extend(os.environ['SUGAR_ACTIVITIES'].split(':'))
-
- directories.append(env.get_user_activities_path())
-
- return directories
-
def _load_mime_defaults(self):
defaults = {}
@@ -94,7 +89,7 @@ class BundleRegistry(gobject.GObject):
def _load_favorites(self):
favorites_path = env.get_profile_path('favorite_activities')
if os.path.exists(favorites_path):
- favorites_data = simplejson.load(open(favorites_path))
+ favorites_data = cjson.decode(open(favorites_path).read())
favorite_bundles = favorites_data['favorites']
if not isinstance(favorite_bundles, dict):
@@ -105,7 +100,8 @@ class BundleRegistry(gobject.GObject):
raise ValueError('Invalid format in %s.' % favorites_path)
first_value = favorite_bundles.values()[0]
- if first_value is not None and not isinstance(first_value, dict):
+ if first_value is not None and \
+ not isinstance(first_value, dict):
raise ValueError('Invalid format in %s.' % favorites_path)
self._last_defaults_mtime = float(favorites_data['defaults-mtime'])
@@ -191,9 +187,12 @@ class BundleRegistry(gobject.GObject):
return False
def _add_bundle(self, bundle_path):
+ logging.debug('STARTUP: Adding bundle %r' % bundle_path)
try:
bundle = ActivityBundle(bundle_path)
except MalformedBundleException:
+ logging.error('Error loading bundle %r:\n%s' % (bundle_path,
+ ''.join(traceback.format_exception(*sys.exc_info()))))
return None
self._bundles.append(bundle)
@@ -287,7 +286,55 @@ class BundleRegistry(gobject.GObject):
path = env.get_profile_path('favorite_activities')
favorites_data = {'defaults-mtime': self._last_defaults_mtime,
'favorites': self._favorite_bundles}
- simplejson.dump(favorites_data, open(path, 'w'), indent=1)
+ open(path, 'w').write(cjson.encode(favorites_data))
+
+ def is_installed(self, bundle):
+ return self.get_bundle(bundle.get_bundle_id()) is not None
+
+ def install(self, bundle):
+ activities_path = env.get_user_activities_path()
+ if self.is_installed(bundle):
+ raise AlreadyInstalledException
+
+ install_dir = env.get_user_activities_path()
+ install_path = bundle.install(install_dir)
+
+ if not self.add_bundle(install_path):
+ raise RegistrationException
+
+ def uninstall(self, bundle, force=False):
+ act = self.get_bundle(bundle.get_bundle_id())
+ if not force and \
+ act.get_activity_version() != bundle.get_activity_version():
+ logging.warning('Not uninstalling, different bundle present')
+ return
+ elif not act.get_path().startswith(env.get_user_activities_path()):
+ logging.warning('Not uninstalling system activity')
+ return
+
+ install_path = act.get_path()
+
+ bundle.uninstall(install_path, force)
+
+ if not self.remove_bundle(install_path):
+ raise RegistrationException
+
+ def upgrade(self, bundle):
+ act = self.get_bundle(bundle.get_bundle_id())
+ if act is None:
+ logging.warning('Activity not installed')
+ elif act.get_path().startswith(env.get_user_activities_path()):
+ try:
+ self.uninstall(bundle, force=True)
+ except Exception:
+ logging.error('Uninstall failed, still trying to install ' \
+ 'newer bundle:\n' + \
+ ''.join(traceback.format_exception(*sys.exc_info())))
+ else:
+ logging.warning('Unable to uninstall system activity, ' \
+ 'installing upgraded version in user activities')
+
+ self.install(bundle)
_instance = None
diff --git a/src/jarabe/model/filetransfer.py b/src/jarabe/model/filetransfer.py
new file mode 100644
index 0000000..a44af75
--- /dev/null
+++ b/src/jarabe/model/filetransfer.py
@@ -0,0 +1,331 @@
+# Copyright (C) 2008 Tomeu Vizoso
+#
+# 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 os
+import logging
+import socket
+
+import gobject
+import gio
+import dbus
+from telepathy.interfaces import CONNECTION_INTERFACE_REQUESTS, CHANNEL
+from telepathy.constants import CONNECTION_HANDLE_TYPE_CONTACT, \
+ SOCKET_ADDRESS_TYPE_UNIX, \
+ SOCKET_ACCESS_CONTROL_LOCALHOST
+from telepathy.client import Connection, Channel
+
+from sugar.presence import presenceservice
+from sugar import dispatch
+
+from jarabe.util.telepathy import connection_watcher
+
+FT_STATE_NONE = 0
+FT_STATE_PENDING = 1
+FT_STATE_ACCEPTED = 2
+FT_STATE_OPEN = 3
+FT_STATE_COMPLETED = 4
+FT_STATE_CANCELLED = 5
+
+# FIXME: use constants from tp-python once the spec is undrafted
+CHANNEL_TYPE_FILE_TRANSFER = \
+ 'org.freedesktop.Telepathy.Channel.Type.FileTransfer.DRAFT'
+
+class StreamSplicer(gobject.GObject):
+ _CHUNK_SIZE = 102400 # 100K
+ __gsignals__ = {
+ 'finished': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([])),
+ }
+ def __init__(self, input_stream, output_stream):
+ gobject.GObject.__init__(self)
+
+ self._input_stream = input_stream
+ self._output_stream = output_stream
+ self._pending_buffers = []
+
+ def start(self):
+ self._input_stream.read_async(self._CHUNK_SIZE, self.__read_async_cb,
+ gobject.PRIORITY_LOW)
+
+ def __read_async_cb(self, input_stream, result):
+ data = input_stream.read_finish(result)
+ #logging.debug('__read_async_cb %r' % len(data))
+ if data:
+ self._pending_buffers.append(data)
+ if len(data) == self._CHUNK_SIZE:
+ self._input_stream.read_async(self._CHUNK_SIZE,
+ self.__read_async_cb,
+ gobject.PRIORITY_LOW)
+
+ if not data or len(data) < self._CHUNK_SIZE:
+ logging.debug('closing input stream')
+ self._input_stream.close()
+
+ self._write_next_buffer()
+
+ def __write_async_cb(self, output_stream, result, user_data):
+ count_ = output_stream.write_finish(result)
+
+ if not self._pending_buffers and \
+ not self._output_stream.has_pending() and \
+ not self._input_stream.has_pending():
+ logging.debug('closing output stream')
+ output_stream.close()
+ self.emit('finished')
+ else:
+ self._write_next_buffer()
+
+ def _write_next_buffer(self):
+ if self._pending_buffers and not self._output_stream.has_pending():
+ data = self._pending_buffers.pop(0)
+ # TODO: we pass the buffer as user_data because of
+ # http://bugzilla.gnome.org/show_bug.cgi?id=564102
+ self._output_stream.write_async(data, self.__write_async_cb,
+ gobject.PRIORITY_LOW,
+ user_data=data)
+
+class BaseFileTransfer(gobject.GObject):
+
+ def __init__(self, connection):
+ gobject.GObject.__init__(self)
+ self._connection = connection
+ self._state = FT_STATE_NONE
+ self._transferred_bytes = 0
+
+ self.channel = None
+ self.buddy = None
+ self.title = None
+ self.file_size = None
+ self.description = None
+ self.mime_type = None
+ self.initial_offset = 0
+
+ def set_channel(self, channel):
+ self.channel = channel
+ self.channel[CHANNEL_TYPE_FILE_TRANSFER].connect_to_signal(
+ 'FileTransferStateChanged', self.__state_changed_cb)
+ self.channel[CHANNEL_TYPE_FILE_TRANSFER].connect_to_signal(
+ 'TransferredBytesChanged', self.__transferred_bytes_changed_cb)
+ self.channel[CHANNEL_TYPE_FILE_TRANSFER].connect_to_signal(
+ 'InitialOffsetDefined', self.__initial_offset_defined_cb)
+
+ channel_properties = self.channel[dbus.PROPERTIES_IFACE]
+
+ props = channel_properties.GetAll(CHANNEL_TYPE_FILE_TRANSFER)
+ self._state = props['State']
+ self.title = props['Filename']
+ self.file_size = props['Size']
+ self.description = props['Description']
+ self.mime_type = props['ContentType']
+
+ handle = channel_properties.Get(CHANNEL, 'TargetHandle')
+ presence_service = presenceservice.get_instance()
+ self.buddy = presence_service.get_buddy_by_telepathy_handle(
+ self._connection.service_name,
+ self._connection.object_path,
+ handle)
+
+ def __transferred_bytes_changed_cb(self, transferred_bytes):
+ logging.debug('__transferred_bytes_changed_cb %r' % transferred_bytes)
+ self.props.transferred_bytes = transferred_bytes
+
+ def _set_transferred_bytes(self, transferred_bytes):
+ self._transferred_bytes = transferred_bytes
+
+ def _get_transferred_bytes(self):
+ return self._transferred_bytes
+
+ transferred_bytes = gobject.property(type=int, default=0,
+ getter=_get_transferred_bytes, setter=_set_transferred_bytes)
+
+ def __initial_offset_defined_cb(self, offset):
+ logging.debug('__initial_offset_defined_cb %r' % offset)
+ self.initial_offset = offset
+
+ def __state_changed_cb(self, state, reason):
+ logging.debug('__state_changed_cb %r %r' % (state, reason))
+ self.props.state = state
+
+ def _set_state(self, state):
+ self._state = state
+
+ def _get_state(self):
+ return self._state
+
+ state = gobject.property(type=int, getter=_get_state, setter=_set_state)
+
+ def cancel(self):
+ self.channel[CHANNEL].Close()
+
+class IncomingFileTransfer(BaseFileTransfer):
+ def __init__(self, connection, object_path, props):
+ BaseFileTransfer.__init__(self, connection)
+
+ channel = Channel(connection.service_name, object_path)
+ self.set_channel(channel)
+
+ self.connect('notify::state', self.__notify_state_cb)
+
+ self.destination_path = None
+ self._socket_address = None
+ self._socket = None
+ self._splicer = None
+
+ def accept(self, destination_path):
+ if os.path.exists(destination_path):
+ raise ValueError('Destination path already exists: %r' % \
+ destination_path)
+
+ self.destination_path = destination_path
+
+ channel_ft = self.channel[CHANNEL_TYPE_FILE_TRANSFER]
+ self._socket_address = channel_ft.AcceptFile(SOCKET_ADDRESS_TYPE_UNIX,
+ SOCKET_ACCESS_CONTROL_LOCALHOST, '', 0)
+
+ def decline(self):
+ self.channel[CHANNEL].Close()
+
+ def __notify_state_cb(self, file_transfer, pspec):
+ logging.debug('__notify_state_cb %r' % self.props.state)
+ if self.props.state == FT_STATE_OPEN:
+ # Need to hold a reference to the socket so that python doesn't
+ # close the fd when it goes out of scope
+ self._socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+ self._socket.connect(self._socket_address)
+ input_stream = gio.unix.InputStream(self._socket.fileno(), True)
+
+ destination_file = gio.File(self.destination_path)
+ if self.initial_offset == 0:
+ output_stream = destination_file.create()
+ else:
+ output_stream = destination_file.append_to()
+
+ # TODO: Use splice_async when it gets implemented
+ self._splicer = StreamSplicer(input_stream, output_stream)
+ self._splicer.start()
+
+class OutgoingFileTransfer(BaseFileTransfer):
+ def __init__(self, buddy, file_name, title, description, mime_type):
+
+ presence_service = presenceservice.get_instance()
+ name, path = presence_service.get_preferred_connection()
+ connection = Connection(name, path,
+ ready_handler=self.__connection_ready_cb)
+
+ BaseFileTransfer.__init__(self, connection)
+ self.connect('notify::state', self.__notify_state_cb)
+
+ self._file_name = file_name
+ self._socket_address = None
+ self._socket = None
+ self._splicer = None
+ self._output_stream = None
+
+ self.buddy = buddy.get_buddy()
+ self.title = title
+ self.file_size = os.stat(file_name).st_size
+ self.description = description
+ self.mime_type = mime_type
+
+ def __connection_ready_cb(self, connection):
+ handle = self._get_buddy_handle()
+
+ requests = connection[CONNECTION_INTERFACE_REQUESTS]
+ object_path, properties_ = requests.CreateChannel({
+ CHANNEL + '.ChannelType': CHANNEL_TYPE_FILE_TRANSFER,
+ CHANNEL + '.TargetHandleType': CONNECTION_HANDLE_TYPE_CONTACT,
+ CHANNEL + '.TargetHandle': handle,
+ CHANNEL_TYPE_FILE_TRANSFER + '.ContentType': self.mime_type,
+ CHANNEL_TYPE_FILE_TRANSFER + '.Filename': self.title,
+ CHANNEL_TYPE_FILE_TRANSFER + '.Size': self.file_size,
+ CHANNEL_TYPE_FILE_TRANSFER + '.Description': self.description,
+ CHANNEL_TYPE_FILE_TRANSFER + '.InitialOffset': 0})
+
+ self.set_channel(Channel(connection.service_name, object_path))
+
+ channel_file_transfer = self.channel[CHANNEL_TYPE_FILE_TRANSFER]
+ self._socket_address = channel_file_transfer.ProvideFile(
+ SOCKET_ADDRESS_TYPE_UNIX, SOCKET_ACCESS_CONTROL_LOCALHOST, '')
+
+ def _get_buddy_handle(self):
+ object_path = self.buddy.object_path()
+
+ bus = dbus.SessionBus()
+ remote_object = bus.get_object('org.laptop.Sugar.Presence', object_path)
+ ps_buddy = dbus.Interface(remote_object,
+ 'org.laptop.Sugar.Presence.Buddy')
+
+ handles = ps_buddy.GetTelepathyHandles()
+ logging.debug('_get_buddy_handle %r' % handles)
+
+ bus_name, object_path, handle = handles[0]
+
+ return handle
+
+ def __notify_state_cb(self, file_transfer, pspec):
+ logging.debug('__notify_state_cb %r' % self.props.state)
+ if self.props.state == FT_STATE_OPEN:
+ # Need to hold a reference to the socket so that python doesn't
+ # closes the fd when it goes out of scope
+ self._socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+ self._socket.connect(self._socket_address)
+ output_stream = gio.unix.OutputStream(self._socket.fileno(), True)
+
+ logging.debug('opening %s for reading' % self._file_name)
+ input_stream = gio.File(self._file_name).read()
+ if self.initial_offset > 0:
+ input_stream.skip(self.initial_offset)
+
+ # TODO: Use splice_async when it gets implemented
+ self._splicer = StreamSplicer(input_stream, output_stream)
+ self._splicer.start()
+
+ def cancel(self):
+ self.channel[CHANNEL].Close()
+
+def _new_channels_cb(connection, channels):
+ for object_path, props in channels:
+ if props[CHANNEL + '.ChannelType'] == CHANNEL_TYPE_FILE_TRANSFER and \
+ not props[CHANNEL + '.Requested']:
+
+ logging.debug('__new_channels_cb %r' % object_path)
+
+ incoming_file_transfer = IncomingFileTransfer(connection,
+ object_path, props)
+ new_file_transfer.send(None, file_transfer=incoming_file_transfer)
+
+def _monitor_connection(connection):
+ connection[CONNECTION_INTERFACE_REQUESTS].connect_to_signal('NewChannels',
+ lambda channels: _new_channels_cb(connection, channels))
+
+def _connection_addded_cb(conn_watcher, connection):
+ _monitor_connection(connection)
+
+def init():
+ conn_watcher = connection_watcher.ConnectionWatcher()
+ conn_watcher.connect('connection-added', _connection_addded_cb)
+
+ for connection in conn_watcher.get_connections():
+ _monitor_connection(connection)
+
+def start_transfer(buddy, file_name, title, description, mime_type):
+ outgoing_file_transfer = OutgoingFileTransfer(buddy, file_name, title,
+ description, mime_type)
+ new_file_transfer.send(None, file_transfer=outgoing_file_transfer)
+
+new_file_transfer = dispatch.Signal()
+
diff --git a/src/model/Friends.py b/src/jarabe/model/friends.py
index 6fc3e97..27a11dd 100644
--- a/src/model/Friends.py
+++ b/src/jarabe/model/friends.py
@@ -14,22 +14,22 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-import dbus
import os
+import logging
from ConfigParser import ConfigParser
import gobject
+import dbus
-from model.BuddyModel import BuddyModel
+from jarabe.model.buddy import BuddyModel
from sugar import env
-import logging
class Friends(gobject.GObject):
__gsignals__ = {
'friend-added': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE, ([object])),
'friend-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([str])),
+ gobject.TYPE_NONE, ([str]))
}
def __init__(self):
@@ -112,3 +112,11 @@ class Friends(gobject.GObject):
psi.SyncFriends(keys,
reply_handler=friends_synced,
error_handler=friends_synced_error)
+
+_model = None
+
+def get_model():
+ global _model
+ if _model is None:
+ _model = Friends()
+ return _model
diff --git a/src/model/Invites.py b/src/jarabe/model/invites.py
index 8bcffd2..5229e43 100644
--- a/src/model/Invites.py
+++ b/src/jarabe/model/invites.py
@@ -66,7 +66,7 @@ class Invites(gobject.GObject):
'invite-added': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE, ([object])),
'invite-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
+ gobject.TYPE_NONE, ([object]))
}
def __init__(self):
diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py
new file mode 100644
index 0000000..f4ef9ac
--- /dev/null
+++ b/src/jarabe/model/neighborhood.py
@@ -0,0 +1,273 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# 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 gobject
+import gconf
+import logging
+
+from sugar.graphics.xocolor import XoColor
+from sugar.presence import presenceservice
+from sugar import activity
+
+from jarabe.model.buddy import BuddyModel
+from jarabe.model import bundleregistry
+from jarabe.util.telepathy import connection_watcher
+
+from dbus import PROPERTIES_IFACE
+from telepathy.interfaces import CONNECTION_INTERFACE_REQUESTS
+from telepathy.interfaces import CHANNEL_INTERFACE
+from telepathy.client import Channel
+
+CONN_INTERFACE_GADGET = 'org.laptop.Telepathy.Gadget'
+CHAN_INTERFACE_VIEW = 'org.laptop.Telepathy.Channel.Interface.View'
+CHAN_INTERFACE_BUDBY_VIEW = 'org.laptop.Telepathy.Channel.Type.BuddyView'
+CHAN_INTERFACE_ACTIVITY_VIEW = 'org.laptop.Telepathy.Channel.Type.ActivityView'
+
+NB_RANDOM_BUDDIES = 20
+NB_RANDOM_ACTIVITIES = 40
+
+class ActivityModel:
+ def __init__(self, act, bundle):
+ self.activity = act
+ self.bundle = bundle
+
+ def get_id(self):
+ return self.activity.props.id
+
+ def get_icon_name(self):
+ return self.bundle.get_icon()
+
+ def get_color(self):
+ return XoColor(self.activity.props.color)
+
+ def get_bundle_id(self):
+ return self.bundle.get_bundle_id()
+
+class Neighborhood(gobject.GObject):
+ __gsignals__ = {
+ 'activity-added': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])),
+ 'activity-removed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])),
+ 'buddy-added': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])),
+ 'buddy-moved': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT,
+ gobject.TYPE_PYOBJECT])),
+ 'buddy-removed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT]))
+ }
+
+ def __init__(self):
+ gobject.GObject.__init__(self)
+
+ self._activities = {}
+ self._buddies = {}
+
+ self._pservice = presenceservice.get_instance()
+ self._pservice.connect("activity-appeared",
+ self._activity_appeared_cb)
+ self._pservice.connect('activity-disappeared',
+ self._activity_disappeared_cb)
+ self._pservice.connect("buddy-appeared",
+ self._buddy_appeared_cb)
+ self._pservice.connect("buddy-disappeared",
+ self._buddy_disappeared_cb)
+
+ # Add any buddies the PS knows about already
+ self._pservice.get_buddies_async(reply_handler=self._get_buddies_cb)
+
+ self._pservice.get_activities_async(
+ reply_handler=self._get_activities_cb)
+
+ self._conn_watcher = connection_watcher.ConnectionWatcher()
+ self._conn_watcher.connect('connection-added', self.__conn_addded_cb)
+
+ for conn in self._conn_watcher.get_connections():
+ self.__conn_addded_cb(self._conn_watcher, conn)
+
+ gconf_client = gconf.client_get_default()
+ gconf_client.add_dir('/desktop/sugar/collaboration',
+ gconf.CLIENT_PRELOAD_NONE)
+ gconf_client.notify_add('/desktop/sugar/collaboration/publish_gadget',
+ self.__publish_gadget_changed_cb)
+
+ def __conn_addded_cb(self, watcher, conn):
+ if CONN_INTERFACE_GADGET not in conn:
+ return
+
+ conn[CONN_INTERFACE_GADGET].connect_to_signal('GadgetDiscovered',
+ lambda: self._gadget_discovered(conn))
+
+ gadget_discovered = conn[PROPERTIES_IFACE].Get(CONN_INTERFACE_GADGET,
+ 'GadgetAvailable')
+ if gadget_discovered:
+ self._gadget_discovered(conn)
+
+ def _gadget_discovered(self, conn):
+ gconf_client = gconf.client_get_default()
+ key = '/desktop/sugar/collaboration/publish_gadget'
+ publish = gconf_client.get_bool(key)
+ logging.debug("Gadget discovered on connection %s."
+ " Publish our status: %r" %
+ (conn.service_name.split('.')[-1], publish))
+ conn[CONN_INTERFACE_GADGET].Publish(publish)
+
+ self._request_random_buddies(conn, NB_RANDOM_BUDDIES)
+ self._request_random_activities(conn, NB_RANDOM_ACTIVITIES)
+
+ def _request_random_buddies(self, conn, nb):
+ logging.debug("Request %d random buddies" % nb)
+
+ path, props_ = conn[CONNECTION_INTERFACE_REQUESTS].CreateChannel(
+ { 'org.freedesktop.Telepathy.Channel.ChannelType':
+ 'org.laptop.Telepathy.Channel.Type.BuddyView',
+ 'org.laptop.Telepathy.Channel.Interface.View.MaxSize': nb
+ })
+
+ view = Channel(conn.service_name, path)
+ view[CHANNEL_INTERFACE].connect_to_signal('Closed',
+ lambda: self.__respawnable_view_closed_cb(
+ lambda: self._request_random_buddies(conn, nb)))
+
+ def _request_random_activities(self, conn, nb):
+ logging.debug("Request %d random activities" % nb)
+
+ path, props_ = conn[CONNECTION_INTERFACE_REQUESTS].CreateChannel(
+ { 'org.freedesktop.Telepathy.Channel.ChannelType':
+ 'org.laptop.Telepathy.Channel.Type.ActivityView',
+ 'org.laptop.Telepathy.Channel.Interface.View.MaxSize': nb
+ })
+
+ view = Channel(conn.service_name, path)
+ view[CHANNEL_INTERFACE].connect_to_signal('Closed',
+ lambda: self.__respawnable_view_closed_cb(
+ lambda: self._request_random_activities(conn, nb)))
+
+ def __publish_gadget_changed_cb(self, client_, cnxn_id_, entry,
+ user_data=None):
+ if entry.value.type == gconf.VALUE_BOOL:
+ publish = entry.value.get_bool()
+
+ for conn in self._conn_watcher.get_connections():
+ if CONN_INTERFACE_GADGET not in conn:
+ continue
+
+ gadget_discovered = conn[PROPERTIES_IFACE].Get(
+ CONN_INTERFACE_GADGET, 'GadgetAvailable')
+ if gadget_discovered:
+ logging.debug("publish_gadget gconf key changed."
+ " Publish our status on %s: %r" %
+ (conn.service_name.split('.')[-1], publish))
+ conn[CONN_INTERFACE_GADGET].Publish(publish)
+
+ def __respawnable_view_closed_cb(self, request_fct):
+ # Views are closed if the Gadget component is restarted. As we always
+ # want to have the random views opened, we re-request them if they are
+ # closed.
+ logging.debug('View closed. Re-request it')
+ request_fct()
+
+ def _get_buddies_cb(self, buddy_list):
+ for buddy in buddy_list:
+ self._buddy_appeared_cb(self._pservice, buddy)
+
+ def _get_activities_cb(self, activity_list):
+ for act in activity_list:
+ self._check_activity(act)
+
+ def get_activities(self):
+ return self._activities.values()
+
+ def get_buddies(self):
+ return self._buddies.values()
+
+ def _buddy_activity_changed_cb(self, model, cur_activity):
+ if not self._buddies.has_key(model.get_buddy().object_path()):
+ return
+ if cur_activity and self._activities.has_key(cur_activity.props.id):
+ activity_model = self._activities[cur_activity.props.id]
+ self.emit('buddy-moved', model, activity_model)
+ else:
+ self.emit('buddy-moved', model, None)
+
+ def _buddy_appeared_cb(self, pservice, buddy):
+ if self._buddies.has_key(buddy.object_path()):
+ return
+
+ model = BuddyModel(buddy=buddy)
+ model.connect('current-activity-changed',
+ self._buddy_activity_changed_cb)
+ self._buddies[buddy.object_path()] = model
+ self.emit('buddy-added', model)
+
+ cur_activity = buddy.props.current_activity
+ if cur_activity:
+ self._buddy_activity_changed_cb(model, cur_activity)
+
+ def _buddy_disappeared_cb(self, pservice, buddy):
+ if not self._buddies.has_key(buddy.object_path()):
+ return
+ self.emit('buddy-removed', self._buddies[buddy.object_path()])
+ del self._buddies[buddy.object_path()]
+
+ def _activity_appeared_cb(self, pservice, act):
+ self._check_activity(act)
+
+ def _check_activity(self, presence_activity):
+ registry = bundleregistry.get_registry()
+ bundle = registry.get_bundle(presence_activity.props.type)
+ if not bundle:
+ return
+ if self.has_activity(presence_activity.props.id):
+ return
+ self.add_activity(bundle, presence_activity)
+
+ def has_activity(self, activity_id):
+ return self._activities.has_key(activity_id)
+
+ def get_activity(self, activity_id):
+ if self.has_activity(activity_id):
+ return self._activities[activity_id]
+ else:
+ return None
+
+ def add_activity(self, bundle, act):
+ model = ActivityModel(act, bundle)
+ self._activities[model.get_id()] = model
+ self.emit('activity-added', model)
+
+ for buddy in self._pservice.get_buddies():
+ cur_activity = buddy.props.current_activity
+ object_path = buddy.object_path()
+ if cur_activity == activity and object_path in self._buddies:
+ buddy_model = self._buddies[object_path]
+ self.emit('buddy-moved', buddy_model, model)
+
+ def _activity_disappeared_cb(self, pservice, act):
+ if self._activities.has_key(act.props.id):
+ activity_model = self._activities[act.props.id]
+ self.emit('activity-removed', activity_model)
+ del self._activities[act.props.id]
+
+_model = None
+
+def get_model():
+ global _model
+ if _model is None:
+ _model = Neighborhood()
+ return _model
diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py
new file mode 100644
index 0000000..3900649
--- /dev/null
+++ b/src/jarabe/model/network.py
@@ -0,0 +1,368 @@
+# Copyright (C) 2008 Red Hat, Inc.
+#
+# 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 logging
+import os
+
+import dbus
+import ConfigParser
+
+from sugar import dispatch
+from sugar import env
+
+DEVICE_TYPE_802_3_ETHERNET = 1
+DEVICE_TYPE_802_11_WIRELESS = 2
+
+DEVICE_STATE_UNKNOWN = 0
+DEVICE_STATE_UNMANAGED = 1
+DEVICE_STATE_UNAVAILABLE = 2
+DEVICE_STATE_DISCONNECTED = 3
+DEVICE_STATE_PREPARE = 4
+DEVICE_STATE_CONFIG = 5
+DEVICE_STATE_NEED_AUTH = 6
+DEVICE_STATE_IP_CONFIG = 7
+DEVICE_STATE_ACTIVATED = 8
+DEVICE_STATE_FAILED = 9
+
+NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0
+NM_ACTIVE_CONNECTION_STATE_ACTIVATING = 1
+NM_ACTIVE_CONNECTION_STATE_ACTIVATED = 2
+
+NM_802_11_AP_FLAGS_NONE = 0x00000000
+NM_802_11_AP_FLAGS_PRIVACY = 0x00000001
+
+NM_802_11_AP_SEC_NONE = 0x00000000
+NM_802_11_AP_SEC_PAIR_WEP40 = 0x00000001
+NM_802_11_AP_SEC_PAIR_WEP104 = 0x00000002
+NM_802_11_AP_SEC_PAIR_TKIP = 0x00000004
+NM_802_11_AP_SEC_PAIR_CCMP = 0x00000008
+NM_802_11_AP_SEC_GROUP_WEP40 = 0x00000010
+NM_802_11_AP_SEC_GROUP_WEP104 = 0x00000020
+NM_802_11_AP_SEC_GROUP_TKIP = 0x00000040
+NM_802_11_AP_SEC_GROUP_CCMP = 0x00000080
+NM_802_11_AP_SEC_KEY_MGMT_PSK = 0x00000100
+NM_802_11_AP_SEC_KEY_MGMT_802_1X = 0x00000200
+
+NM_802_11_MODE_UNKNOWN = 0
+NM_802_11_MODE_ADHOC = 1
+NM_802_11_MODE_INFRA = 2
+
+NM_802_11_DEVICE_CAP_NONE = 0x00000000
+NM_802_11_DEVICE_CAP_CIPHER_WEP40 = 0x00000001
+NM_802_11_DEVICE_CAP_CIPHER_WEP104 = 0x00000002
+NM_802_11_DEVICE_CAP_CIPHER_TKIP = 0x00000004
+NM_802_11_DEVICE_CAP_CIPHER_CCMP = 0x00000008
+NM_802_11_DEVICE_CAP_WPA = 0x00000010
+NM_802_11_DEVICE_CAP_RSN = 0x00000020
+
+SETTINGS_SERVICE = 'org.freedesktop.NetworkManagerUserSettings'
+
+NM_SETTINGS_PATH = '/org/freedesktop/NetworkManagerSettings'
+NM_SETTINGS_IFACE = 'org.freedesktop.NetworkManagerSettings'
+NM_CONNECTION_IFACE = 'org.freedesktop.NetworkManagerSettings.Connection'
+NM_SECRETS_IFACE = 'org.freedesktop.NetworkManagerSettings.Connection.Secrets'
+
+_nm_settings = None
+_conn_counter = 0
+
+class WirelessSecurity(object):
+ def __init__(self):
+ self.key_mgmt = None
+ self.proto = None
+ self.group = None
+ self.pairwise = None
+
+ def get_dict(self):
+ wireless_security = {}
+
+ if self.key_mgmt is not None:
+ wireless_security['key-mgmt'] = self.key_mgmt
+ if self.proto is not None:
+ wireless_security['proto'] = self.proto
+ if self.pairwise is not None:
+ wireless_security['pairwise'] = self.pairwise
+ if self.group is not None:
+ wireless_security['group'] = self.group
+
+ return wireless_security
+
+class Wireless(object):
+ def __init__(self):
+ self.ssid = None
+
+ def get_dict(self):
+ return {'ssid': self.ssid}
+
+class Connection(object):
+ def __init__(self):
+ self.id = None
+ self.uuid = None
+ self.type = None
+
+ def get_dict(self):
+ return {'id': self.id,
+ 'uuid': self.uuid,
+ 'type': self.type}
+
+class Settings(object):
+ def __init__(self):
+ self.connection = Connection()
+ self.wireless = Wireless()
+ self.wireless_security = None
+
+ def get_dict(self):
+ settings = {}
+ settings['connection'] = self.connection.get_dict()
+ settings['802-11-wireless'] = self.wireless.get_dict()
+ if self.wireless_security is not None:
+ settings['802-11-wireless-security'] = \
+ self.wireless_security.get_dict()
+ return settings
+
+class Secrets(object):
+ def __init__(self):
+ self.wep_key = None
+ self.psk = None
+ self.auth_alg = None
+
+ def get_dict(self):
+ secrets = {}
+
+ if self.wep_key is not None:
+ secrets['wep-key0'] = self.wep_key
+ if self.psk is not None:
+ secrets['psk'] = self.psk
+ if self.auth_alg is not None:
+ secrets['auth-alg'] = self.auth_alg
+
+ return {'802-11-wireless-security': secrets}
+
+class NMSettings(dbus.service.Object):
+ def __init__(self):
+ bus = dbus.SystemBus()
+ bus_name = dbus.service.BusName(SETTINGS_SERVICE, bus=bus)
+ dbus.service.Object.__init__(self, bus_name, NM_SETTINGS_PATH)
+
+ self.connections = {}
+ self.secrets_request = dispatch.Signal()
+
+ @dbus.service.method(dbus_interface=NM_SETTINGS_IFACE,
+ in_signature='', out_signature='ao')
+ def ListConnections(self):
+ return self.connections.values()
+
+ @dbus.service.signal(NM_SETTINGS_IFACE, signature='o')
+ def NewConnection(self, connection_path):
+ pass
+
+ def add_connection(self, ssid, conn):
+ self.connections[ssid] = conn
+ conn.secrets_request.connect(self.__secrets_request_cb)
+ self.NewConnection(conn.path)
+
+ def __secrets_request_cb(self, sender, **kwargs):
+ self.secrets_request.send(self, connection=sender,
+ response=kwargs['response'])
+
+class SecretsResponse(object):
+ ''' Intermediate object to report the secrets from the dialog
+ back to the connection object and which will inform NM
+ '''
+ def __init__(self, connection, reply_cb, error_cb):
+ self._connection = connection
+ self._reply_cb = reply_cb
+ self._error_cb = error_cb
+
+ def set_secrets(self, secrets):
+ self._connection.set_secrets(secrets)
+ self._reply_cb(secrets.get_dict())
+
+ def set_error(self, error):
+ self._error_cb(error)
+
+class NMSettingsConnection(dbus.service.Object):
+ def __init__(self, path, settings, secrets):
+ bus = dbus.SystemBus()
+ bus_name = dbus.service.BusName(SETTINGS_SERVICE, bus=bus)
+ dbus.service.Object.__init__(self, bus_name, path)
+
+ self.path = path
+ self.secrets_request = dispatch.Signal()
+
+ self._settings = settings
+ self._secrets = secrets
+
+ def set_secrets(self, secrets):
+ self._secrets = secrets
+ self.save()
+
+ def save(self):
+ profile_path = env.get_profile_path()
+ config_path = os.path.join(profile_path, 'nm', 'connections.cfg')
+
+ config = ConfigParser.ConfigParser()
+ try:
+ try:
+ if not config.read(config_path):
+ logging.error('Error reading the nm config file')
+ return
+ except ConfigParser.ParsingError, e:
+ logging.error('Error reading the nm config file: %s' % e)
+ return
+ identifier = self._settings.connection.id
+
+ if identifier not in config.sections():
+ config.add_section(identifier)
+ config.set(identifier, 'type', self._settings.connection.type)
+ config.set(identifier, 'ssid', self._settings.wireless.ssid)
+ config.set(identifier, 'uuid', self._settings.connection.uuid)
+
+ if self._settings.wireless_security is not None:
+ if self._settings.wireless_security.key_mgmt is not None:
+ config.set(identifier, 'key-mgmt',
+ self._settings.wireless_security.key_mgmt)
+ if self._settings.wireless_security.proto is not None:
+ config.set(identifier, 'proto',
+ self._settings.wireless_security.proto)
+ if self._settings.wireless_security.pairwise is not None:
+ config.set(identifier, 'pairwise',
+ self._settings.wireless_security.pairwise)
+ if self._settings.wireless_security.group is not None:
+ config.set(identifier, 'group',
+ self._settings.wireless_security.group)
+ if self._secrets is not None:
+ if self._settings.wireless_security.key_mgmt == 'none':
+ config.set(identifier, 'key', self._secrets.wep_key)
+ config.set(identifier, 'auth-alg', self._secrets.auth_alg)
+ elif self._settings.wireless_security.key_mgmt == 'wpa-psk':
+ config.set(identifier, 'key', self._secrets.psk)
+ except ConfigParser.Error, e:
+ logging.error('Error constructing %s: %s' % (identifier, e))
+ else:
+ f = open(config_path, 'w')
+ try:
+ config.write(f)
+ except ConfigParser.Error, e:
+ logging.error('Can not write %s error: %s' % (config_path, e))
+ f.close()
+
+ @dbus.service.method(dbus_interface=NM_CONNECTION_IFACE,
+ in_signature='', out_signature='a{sa{sv}}')
+ def GetSettings(self):
+ return self._settings.get_dict()
+
+ @dbus.service.method(dbus_interface=NM_SECRETS_IFACE,
+ async_callbacks=('reply', 'error'),
+ in_signature='sasb', out_signature='a{sa{sv}}')
+ def GetSecrets(self, setting_name, hints, request_new, reply, error):
+ logging.debug('Secrets requested for connection %s request_new=%s'
+ % (self.path, request_new))
+
+ if request_new or self._secrets is None:
+ # request_new is for example the case when the pw on the AP changes
+ response = SecretsResponse(self, reply, error)
+ try:
+ self.secrets_request.send(self, response=response)
+ except Exception, e:
+ logging.error('Error requesting the secrets via dialog: %s' % e)
+ else:
+ reply(self._secrets.get_dict())
+
+def get_settings():
+ global _nm_settings
+ if _nm_settings is None:
+ try:
+ _nm_settings = NMSettings()
+ except dbus.DBusException, e:
+ logging.error('Cannot create the UserSettings service %s.', e)
+ load_connections()
+ return _nm_settings
+
+def find_connection(ssid):
+ connections = get_settings().connections
+ if ssid in connections:
+ return connections[ssid]
+ else:
+ return None
+
+def add_connection(ssid, settings, secrets=None):
+ global _conn_counter
+
+ path = NM_SETTINGS_PATH + '/' + str(_conn_counter)
+ _conn_counter += 1
+
+ conn = NMSettingsConnection(path, settings, secrets)
+ _nm_settings.add_connection(ssid, conn)
+ return conn
+
+def load_connections():
+ profile_path = env.get_profile_path()
+ config_path = os.path.join(profile_path, 'nm', 'connections.cfg')
+
+ config = ConfigParser.ConfigParser()
+
+ if not os.path.exists(config_path):
+ if not os.path.exists(os.path.dirname(config_path)):
+ os.makedirs(os.path.dirname(config_path), 0755)
+ f = open(config_path, 'w')
+ config.write(f)
+ f.close()
+
+ try:
+ if not config.read(config_path):
+ logging.error('Error reading the nm config file')
+ return
+ except ConfigParser.ParsingError, e:
+ logging.error('Error reading the nm config file: %s' % e)
+ return
+
+ for section in config.sections():
+ try:
+ settings = Settings()
+ settings.connection.id = section
+ ssid = config.get(section, 'ssid')
+ settings.wireless.ssid = dbus.ByteArray(ssid)
+ uuid = config.get(section, 'uuid')
+ settings.connection.uuid = uuid
+ nmtype = config.get(section, 'type')
+ settings.connection.type = nmtype
+
+ secrets = None
+ if config.has_option(section, 'key-mgmt'):
+ secrets = Secrets()
+ settings.wireless_security = WirelessSecurity()
+ mgmt = config.get(section, 'key-mgmt')
+ settings.wireless_security.key_mgmt = mgmt
+ key = config.get(section, 'key')
+ if mgmt == 'none':
+ secrets.wep_key = key
+ auth_alg = config.get(section, 'auth-alg')
+ secrets.auth_alg = auth_alg
+ elif mgmt == 'wpa-psk':
+ secrets.psk = key
+ if config.has_option(section, 'proto'):
+ value = config.get(section, 'proto')
+ settings.wireless_security.proto = value
+ if config.has_option(section, 'group'):
+ value = config.get(section, 'group')
+ settings.wireless_security.group = value
+ if config.has_option(section, 'pairwise'):
+ value = config.get(section, 'pairwise')
+ settings.wireless_security.pairwise = value
+ except ConfigParser.Error, e:
+ logging.error('Error reading section: %s' % e)
+ else:
+ add_connection(ssid, settings, secrets)
diff --git a/src/jarabe/model/notifications.py b/src/jarabe/model/notifications.py
new file mode 100644
index 0000000..da5c590
--- /dev/null
+++ b/src/jarabe/model/notifications.py
@@ -0,0 +1,95 @@
+# Copyright (C) 2008 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
+
+import sys
+import logging
+
+import dbus
+
+from sugar import dispatch
+
+from jarabe import config
+
+_DBUS_SERVICE = "org.freedesktop.Notifications"
+_DBUS_IFACE = "org.freedesktop.Notifications"
+_DBUS_PATH = "/org/freedesktop/Notifications"
+
+class NotificationService(dbus.service.Object):
+ def __init__(self):
+ bus = dbus.SessionBus()
+ bus_name = dbus.service.BusName(_DBUS_SERVICE, bus=bus)
+ dbus.service.Object.__init__(self, bus_name, _DBUS_PATH)
+
+ self._notification_counter = 0
+ self.notification_received = dispatch.Signal()
+ self.notification_cancelled = dispatch.Signal()
+
+ @dbus.service.method(_DBUS_IFACE,
+ in_signature='susssava{sv}i', out_signature='u')
+ def Notify(self, app_name, replaces_id, app_icon, summary, body, actions,
+ hints, expire_timeout):
+
+ logging.debug('Received notification: %r' % ([app_name, replaces_id,
+ app_icon, summary, body, actions, hints, expire_timeout]))
+
+ if replaces_id > 0:
+ notification_id = replaces_id
+ else:
+ if self._notification_counter == sys.maxint:
+ self._notification_counter = 1
+ else:
+ self._notification_counter += 1
+ notification_id = self._notification_counter
+
+ self.notification_received.send(self, app_name=app_name,
+ replaces_id=replaces_id, app_icon=app_icon, summary=summary,
+ body=body, actions=actions, hints=hints,
+ expire_timeout=expire_timeout)
+
+ return notification_id
+
+ @dbus.service.method(_DBUS_IFACE, in_signature='u', out_signature='')
+ def CloseNotification(self, notification_id):
+ self.notification_cancelled.send(self, notification_id=notification_id)
+
+ @dbus.service.method(_DBUS_IFACE, in_signature='', out_signature='as')
+ def GetCapabilities(self):
+ return []
+
+ @dbus.service.method(_DBUS_IFACE, in_signature='', out_signature='sss')
+ def GetServerInformation(self, name, vendor, version):
+ return 'Sugar Shell', 'Sugar', config.version
+
+
+ @dbus.service.signal(_DBUS_IFACE, signature="uu")
+ def NotificationClosed(self, notification_id, reason):
+ pass
+
+ @dbus.service.signal(_DBUS_IFACE, signature="us")
+ def ActionInvoked(self, notification_id, action_key):
+ pass
+
+_instance = None
+
+def get_service():
+ global _instance
+ if not _instance:
+ _instance = NotificationService()
+ return _instance
+
+def init():
+ get_service()
+
diff --git a/src/model/Owner.py b/src/jarabe/model/owner.py
index 934a8fc..bdfd9a8 100644
--- a/src/model/Owner.py
+++ b/src/jarabe/model/owner.py
@@ -17,17 +17,17 @@
import gobject
import os
-import simplejson
+import cjson
+import gconf
from telepathy.interfaces import CHANNEL_TYPE_TEXT
from sugar import env
-from sugar import profile
from sugar.presence import presenceservice
from sugar import util
-from model.Invites import Invites
+from jarabe.model.invites import Invites
-class ShellOwner(gobject.GObject):
+class Owner(gobject.GObject):
"""Class representing the owner of this machine/instance. This class
runs in the shell and serves up the buddy icon and other stuff. It's the
server portion of the Owner, paired with the client portion in Buddy.py.
@@ -46,7 +46,8 @@ class ShellOwner(gobject.GObject):
def __init__(self):
gobject.GObject.__init__(self)
- self._nick = profile.get_nick_name()
+ client = gconf.client_get_default()
+ self._nick = client.get_string("/desktop/sugar/user/nick")
self._icon = None
self._icon_hash = ""
@@ -97,8 +98,16 @@ class ShellOwner(gobject.GObject):
bundle_id = 'org.laptop.Chat'
else:
bundle_id = 'org.laptop.VideoChat'
- tp_channel = simplejson.dumps([bus_name, connection, channel])
+ tp_channel = cjson.encode([bus_name, connection, channel])
self._invites.add_private_invite(tp_channel, bundle_id)
def _activity_disappeared_cb(self, pservice, activity):
self._invites.remove_activity(activity.props.id)
+
+_model = None
+
+def get_model():
+ global _model
+ if _model is None:
+ _model = Owner()
+ return _model
diff --git a/src/jarabe/model/screen.py b/src/jarabe/model/screen.py
new file mode 100644
index 0000000..9aadcc3
--- /dev/null
+++ b/src/jarabe/model/screen.py
@@ -0,0 +1,64 @@
+# Copyright (C) 2006-2008 Red Hat, Inc.
+#
+# 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 logging
+
+import dbus
+
+_HARDWARE_MANAGER_INTERFACE = 'org.freedesktop.ohm.Keystore'
+_HARDWARE_MANAGER_SERVICE = 'org.freedesktop.ohm'
+_HARDWARE_MANAGER_OBJECT_PATH = '/org/freedesktop/ohm/Keystore'
+
+COLOR_MODE = 0
+B_AND_W_MODE = 1
+
+_ohm_service = None
+
+def _get_ohm():
+ if _ohm_service:
+ return _ohm_service
+
+ bus = dbus.SystemBus()
+ proxy = bus.get_object(_HARDWARE_MANAGER_SERVICE,
+ _HARDWARE_MANAGER_OBJECT_PATH,
+ follow_name_owner_changes=True)
+
+ return dbus.Interface(proxy, _HARDWARE_MANAGER_INTERFACE)
+
+def set_dcon_freeze(frozen):
+ try:
+ _get_ohm().SetKey("display.dcon_freeze", frozen)
+ except dbus.DBusException:
+ logging.error('Cannot unfreeze the DCON')
+
+def set_display_mode(mode):
+ try:
+ _get_ohm().SetKey("display.dcon_mode", mode)
+ except dbus.DBusException:
+ logging.error('Cannot change DCON mode')
+
+def set_display_brightness(level):
+ try:
+ _get_ohm().SetKey("backlight.hardware_brightness", level)
+ except dbus.DBusException:
+ logging.error('Cannot set display brightness')
+
+def get_display_brightness():
+ try:
+ return _get_ohm().GetKey("backlight.hardware_brightness")
+ except dbus.DBusException:
+ logging.error('Cannot get display brightness')
+ return 0
diff --git a/src/session.py b/src/jarabe/model/session.py
index 1594fb5..8927260 100644
--- a/src/session.py
+++ b/src/jarabe/model/session.py
@@ -22,8 +22,6 @@ import signal
from sugar import session
from sugar import env
-from hardware import hardwaremanager
-
_session_manager = None
class SessionManager(session.SessionManager):
@@ -50,9 +48,6 @@ class SessionManager(session.SessionManager):
def shutdown_completed(self):
session.SessionManager.shutdown_completed(self)
- hw_manager = hardwaremanager.get_manager()
- hw_manager.shutdown()
-
bus = dbus.SystemBus()
proxy = bus.get_object('org.freedesktop.Hal',
'/org/freedesktop/Hal/devices/computer')
diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
new file mode 100644
index 0000000..9f6a51f
--- /dev/null
+++ b/src/jarabe/model/shell.py
@@ -0,0 +1,578 @@
+# Copyright (C) 2006-2007 Owen Williams.
+# Copyright (C) 2006-2008 Red Hat, Inc.
+#
+# 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 logging
+import time
+import os
+
+import gconf
+import wnck
+import gobject
+import gtk
+import dbus
+
+from sugar import wm
+from sugar import dispatch
+from sugar.graphics.xocolor import XoColor
+from sugar.presence import presenceservice
+
+from jarabe.model.bundleregistry import get_registry
+from jarabe import config
+
+_SERVICE_NAME = "org.laptop.Activity"
+_SERVICE_PATH = "/org/laptop/Activity"
+_SERVICE_INTERFACE = "org.laptop.Activity"
+
+def get_sugar_window_type(wnck_window):
+ window = gtk.gdk.window_foreign_new(wnck_window.get_xid())
+ prop_info = window.property_get('_SUGAR_WINDOW_TYPE', 'STRING')
+ if prop_info is None:
+ return None
+ else:
+ return prop_info[2]
+
+class Activity(gobject.GObject):
+ """Activity which appears in the "Home View" of the Sugar shell
+
+ This class stores the Sugar Shell's metadata regarding a
+ given activity/application in the system. It interacts with
+ the sugar.activity.* modules extensively in order to
+ accomplish its tasks.
+ """
+
+ __gtype_name__ = 'SugarHomeActivity'
+
+ __gproperties__ = {
+ 'launching' : (bool, None, None, False,
+ gobject.PARAM_READWRITE),
+ }
+
+ def __init__(self, activity_info, activity_id, window=None):
+ """Initialise the HomeActivity
+
+ activity_info -- sugar.activity.registry.ActivityInfo instance,
+ provides the information required to actually
+ create the new instance. This is, in effect,
+ the "type" of activity being created.
+ activity_id -- unique identifier for this instance
+ of the activity type
+ window -- Main WnckWindow of the activity
+ """
+ gobject.GObject.__init__(self)
+
+ self._window = None
+ self._service = None
+ self._activity_id = activity_id
+ self._activity_info = activity_info
+ self._launch_time = time.time()
+ self._launching = False
+
+ if window is not None:
+ self.set_window(window)
+
+ self._retrieve_service()
+
+ self._name_owner_changed_handler = None
+ if not self._service:
+ bus = dbus.SessionBus()
+ self._name_owner_changed_handler = bus.add_signal_receiver(
+ self._name_owner_changed_cb,
+ signal_name="NameOwnerChanged",
+ dbus_interface="org.freedesktop.DBus")
+
+ def set_window(self, window):
+ """Set the window for the activity
+
+ We allow resetting the window for an activity so that we
+ can replace the launcher once we get its real window.
+ """
+ if not window:
+ raise ValueError("window must be valid")
+ self._window = window
+
+ def get_service(self):
+ """Get the activity service
+
+ Note that non-native Sugar applications will not have
+ such a service, so the return value will be None in
+ those cases.
+ """
+
+ return self._service
+
+ def get_title(self):
+ """Retrieve the application's root window's suggested title"""
+ if self._window:
+ return self._window.get_name()
+ else:
+ return ''
+
+ def get_icon_path(self):
+ """Retrieve the activity's icon (file) name"""
+ if self.is_journal():
+ return os.path.join(config.data_path, 'icons/activity-journal.svg')
+ elif self._activity_info:
+ return self._activity_info.get_icon()
+ else:
+ return None
+
+ def get_icon_color(self):
+ """Retrieve the appropriate icon colour for this activity
+
+ Uses activity_id to index into the PresenceService's
+ set of activity colours, if the PresenceService does not
+ have an entry (implying that this is not a Sugar-shared application)
+ uses the local user's profile colour for the icon.
+ """
+ pservice = presenceservice.get_instance()
+
+ # HACK to suppress warning in logs when activity isn't found
+ # (if it's locally launched and not shared yet)
+ activity = None
+ for act in pservice.get_activities():
+ if self._activity_id == act.props.id:
+ activity = act
+ break
+
+ if activity != None:
+ return XoColor(activity.props.color)
+ else:
+ client = gconf.client_get_default()
+ return XoColor(client.get_string("/desktop/sugar/user/color"))
+
+ def get_activity_id(self):
+ """Retrieve the "activity_id" passed in to our constructor
+
+ This is a "globally likely unique" identifier generated by
+ sugar.util.unique_id
+ """
+ return self._activity_id
+
+ def get_xid(self):
+ """Retrieve the X-windows ID of our root window"""
+ return self._window.get_xid()
+
+ def get_window(self):
+ """Retrieve the X-windows root window of this application
+
+ This was stored by the set_window method, which was
+ called by HomeModel._add_activity, which was called
+ via a callback that looks for all 'window-opened'
+ events.
+
+ HomeModel currently uses a dbus service query on the
+ activity to determine to which HomeActivity the newly
+ launched window belongs.
+ """
+ return self._window
+
+ def get_type(self):
+ """Retrieve the activity bundle id for future reference"""
+ if self._window is None:
+ return None
+ else:
+ return wm.get_bundle_id(self._window)
+
+ def is_journal(self):
+ """Returns boolean if the activity is of type JournalActivity"""
+ return self.get_type() == 'org.laptop.JournalActivity'
+
+ def get_launch_time(self):
+ """Return the time at which the activity was first launched
+
+ Format is floating-point time.time() value
+ (seconds since the epoch)
+ """
+ return self._launch_time
+
+ def get_pid(self):
+ """Returns the activity's PID"""
+ return self._window.get_pid()
+
+ def get_bundle_path(self):
+ """Returns the activity's bundle directory"""
+ if self._activity_info is None:
+ return None
+ else:
+ return self._activity_info.get_path()
+
+ def equals(self, activity):
+ if self._activity_id and activity.get_activity_id():
+ return self._activity_id == activity.get_activity_id()
+ if self._window.get_xid() and activity.get_xid():
+ return self._window.get_xid() == activity.get_xid()
+ return False
+
+ def do_set_property(self, pspec, value):
+ if pspec.name == 'launching':
+ self._launching = value
+
+ def do_get_property(self, pspec):
+ if pspec.name == 'launching':
+ return self._launching
+
+ def _get_service_name(self):
+ if self._activity_id:
+ return _SERVICE_NAME + self._activity_id
+ else:
+ return None
+
+ def _retrieve_service(self):
+ if not self._activity_id:
+ return
+
+ try:
+ bus = dbus.SessionBus()
+ proxy = bus.get_object(self._get_service_name(),
+ _SERVICE_PATH + "/" + self._activity_id)
+ self._service = dbus.Interface(proxy, _SERVICE_INTERFACE)
+ except dbus.DBusException:
+ self._service = None
+
+ def _name_owner_changed_cb(self, name, old, new):
+ if name == self._get_service_name():
+ self._retrieve_service()
+ self.set_active(True)
+ self._name_owner_changed_handler.remove()
+ self._name_owner_changed_handler = None
+
+ def set_active(self, state):
+ """Propagate the current state to the activity object"""
+ if self._service is not None:
+ self._service.SetActive(state,
+ reply_handler=self._set_active_success,
+ error_handler=self._set_active_error)
+
+ def _set_active_success(self):
+ pass
+
+ def _set_active_error(self, err):
+ logging.error("set_active() failed: %s" % err)
+
+class ShellModel(gobject.GObject):
+ """Model of the shell (activity management)
+
+ The ShellModel is basically the point of registration
+ for all running activities within Sugar. It traps
+ events that tell the system there is a new activity
+ being created (generated by the activity factories),
+ or removed, as well as those which tell us that the
+ currently focussed activity has changed.
+
+ The HomeModel tracks a set of HomeActivity instances,
+ which are tracking the window to activity mappings
+ the activity factories have set up.
+ """
+
+ __gsignals__ = {
+ 'activity-added': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'activity-removed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'active-activity-changed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'tabbing-activity-changed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'launch-started': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'launch-completed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'launch-failed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT]))
+ }
+
+ ZOOM_MESH = 0
+ ZOOM_GROUP = 1
+ ZOOM_HOME = 2
+ ZOOM_ACTIVITY = 3
+
+ def __init__(self):
+ gobject.GObject.__init__(self)
+
+ self._screen = wnck.screen_get_default()
+ self._screen.connect('window-opened', self._window_opened_cb)
+ self._screen.connect('window-closed', self._window_closed_cb)
+ self._screen.connect('active-window-changed',
+ self._active_window_changed_cb)
+
+ self.zoom_level_changed = dispatch.Signal()
+
+ self._desktop_level = self.ZOOM_HOME
+ self._zoom_level = self.ZOOM_HOME
+ self._current_activity = None
+ self._activities = []
+ self._active_activity = None
+ self._tabbing_activity = None
+ self._pservice = presenceservice.get_instance()
+
+ self._screen.toggle_showing_desktop(True)
+
+ def _update_zoom_level(self, window):
+ if window.get_window_type() == wnck.WINDOW_NORMAL:
+ new_level = self.ZOOM_ACTIVITY
+ else:
+ new_level = self._desktop_level
+
+ if self._zoom_level != new_level:
+ old_level = self._zoom_level
+ self._zoom_level = new_level
+ self.zoom_level_changed.send(self, old_level=old_level,
+ new_level=new_level)
+
+ def _set_zoom_level(self, new_level):
+ old_level = self.zoom_level
+ if old_level == new_level:
+ return
+
+ self._zoom_level = new_level
+ if new_level is not self.ZOOM_ACTIVITY:
+ self._desktop_level = new_level
+
+ self.zoom_level_changed.send(self, old_level=old_level,
+ new_level=new_level)
+
+ show_desktop = new_level is not self.ZOOM_ACTIVITY
+ self._screen.toggle_showing_desktop(show_desktop)
+
+ def _get_zoom_level(self):
+ return self._zoom_level
+
+ zoom_level = property(_get_zoom_level, _set_zoom_level)
+
+ def _get_activities_with_window(self):
+ ret = []
+ for i in self._activities:
+ if i.get_window() is not None:
+ ret.append(i)
+ return ret
+
+ def get_previous_activity(self, current=None):
+ if not current:
+ current = self._active_activity
+
+ activities = self._get_activities_with_window()
+ i = activities.index(current)
+ if len(activities) == 0:
+ return None
+ elif i - 1 >= 0:
+ return activities[i - 1]
+ else:
+ return activities[len(activities) - 1]
+
+ def get_next_activity(self, current=None):
+ if not current:
+ current = self._active_activity
+
+ activities = self._get_activities_with_window()
+ i = activities.index(current)
+ if len(activities) == 0:
+ return None
+ elif i + 1 < len(activities):
+ return activities[i + 1]
+ else:
+ return activities[0]
+
+ def get_active_activity(self):
+ """Returns the activity that the user is currently working in"""
+ return self._active_activity
+
+ def get_tabbing_activity(self):
+ """Returns the activity that is currently highlighted during tabbing"""
+ return self._tabbing_activity
+
+ def set_tabbing_activity(self, activity):
+ """Sets the activity that is currently highlighted during tabbing"""
+ self._tabbing_activity = activity
+ self.emit("tabbing-activity-changed", self._tabbing_activity)
+
+ def _set_active_activity(self, home_activity):
+ if self._active_activity == home_activity:
+ return
+
+ if home_activity:
+ home_activity.set_active(True)
+
+ if self._active_activity:
+ self._active_activity.set_active(False)
+
+ self._active_activity = home_activity
+ self.emit('active-activity-changed', self._active_activity)
+
+ def __iter__(self):
+ return iter(self._activities)
+
+ def __len__(self):
+ return len(self._activities)
+
+ def __getitem__(self, i):
+ return self._activities[i]
+
+ def index(self, obj):
+ return self._activities.index(obj)
+
+ def _window_opened_cb(self, screen, window):
+ if window.get_window_type() == wnck.WINDOW_NORMAL:
+ home_activity = None
+
+ activity_id = wm.get_activity_id(window)
+
+ service_name = wm.get_bundle_id(window)
+ if service_name:
+ registry = get_registry()
+ activity_info = registry.get_bundle(service_name)
+ else:
+ activity_info = None
+
+ if activity_id:
+ home_activity = self.get_activity_by_id(activity_id)
+
+ if not home_activity:
+ home_activity = Activity(activity_info, activity_id, window)
+ self._add_activity(home_activity)
+ else:
+ home_activity.set_window(window)
+
+ if get_sugar_window_type(window) != 'launcher':
+ home_activity.props.launching = False
+ self.emit('launch-completed', home_activity)
+
+ startup_time = time.time() - home_activity.get_launch_time()
+ logging.debug('%s launched in %f seconds.' %
+ (home_activity.get_type(), startup_time))
+
+ if self._active_activity is None:
+ self._set_active_activity(home_activity)
+
+ def _window_closed_cb(self, screen, window):
+ if window.get_window_type() == wnck.WINDOW_NORMAL:
+ self._remove_activity_by_xid(window.get_xid())
+
+ def _get_activity_by_xid(self, xid):
+ for home_activity in self._activities:
+ if home_activity.get_xid() == xid:
+ return home_activity
+ return None
+
+ def get_activity_by_id(self, activity_id):
+ for home_activity in self._activities:
+ if home_activity.get_activity_id() == activity_id:
+ return home_activity
+ return None
+
+ def _active_window_changed_cb(self, screen, previous_window=None):
+ window = screen.get_active_window()
+ if window is None:
+ return
+
+ if window.get_window_type() != wnck.WINDOW_DIALOG:
+ while window.get_transient() is not None:
+ window = window.get_transient()
+
+ act = self._get_activity_by_xid(window.get_xid())
+ if act is not None:
+ self._set_active_activity(act)
+
+ self._update_zoom_level(window)
+
+ def _add_activity(self, home_activity):
+ self._activities.append(home_activity)
+ self.emit('activity-added', home_activity)
+
+ def _remove_activity(self, home_activity):
+ if home_activity == self._active_activity:
+ windows = wnck.screen_get_default().get_windows_stacked()
+ windows.reverse()
+ for window in windows:
+ new_activity = self._get_activity_by_xid(window.get_xid())
+ if new_activity is not None:
+ self._set_active_activity(new_activity)
+ break
+ else:
+ logging.error('No activities are running')
+ self._set_active_activity(None)
+
+ self.emit('activity-removed', home_activity)
+ self._activities.remove(home_activity)
+
+ def _remove_activity_by_xid(self, xid):
+ home_activity = self._get_activity_by_xid(xid)
+ if home_activity:
+ self._remove_activity(home_activity)
+ else:
+ logging.error('Model for window %d does not exist.' % xid)
+
+ def notify_launch(self, activity_id, service_name):
+ registry = get_registry()
+ activity_info = registry.get_bundle(service_name)
+ if not activity_info:
+ raise ValueError("Activity service name '%s'" \
+ " was not found in the bundle registry."
+ % service_name)
+ home_activity = Activity(activity_info, activity_id)
+ home_activity.props.launching = True
+ self._add_activity(home_activity)
+
+ self._set_active_activity(home_activity)
+
+ self.emit('launch-started', home_activity)
+
+ # FIXME: better learn about finishing processes by receiving a signal.
+ # Now just check whether an activity has a window after ~90sec
+ gobject.timeout_add_seconds(90, self._check_activity_launched,
+ activity_id)
+
+ def notify_launch_failed(self, activity_id):
+ home_activity = self.get_activity_by_id(activity_id)
+ if home_activity:
+ logging.debug("Activity %s (%s) launch failed" % \
+ (activity_id, home_activity.get_type()))
+ home_activity.props.launching = False
+ self._remove_activity(home_activity)
+ else:
+ logging.error('Model for activity id %s does not exist.'
+ % activity_id)
+
+ self.emit('launch-failed', home_activity)
+
+ def _check_activity_launched(self, activity_id):
+ home_activity = self.get_activity_by_id(activity_id)
+
+ if not home_activity:
+ logging.debug('Activity %s has been closed already.' % activity_id)
+ return False
+
+ if home_activity.props.launching:
+ logging.debug('Activity %s still launching, assuming it failed...'
+ % activity_id)
+ self.notify_launch_failed(activity_id)
+ return False
+
+_model = None
+
+def get_model():
+ global _model
+ if _model is None:
+ _model = ShellModel()
+ return _model
+
diff --git a/src/jarabe/model/sound.py b/src/jarabe/model/sound.py
new file mode 100644
index 0000000..65090a4
--- /dev/null
+++ b/src/jarabe/model/sound.py
@@ -0,0 +1,58 @@
+# Copyright (C) 2006-2008 Red Hat, Inc.
+#
+# 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 gconf
+
+from sugar import env
+from sugar import _sugarext
+from sugar import dispatch
+
+VOLUME_STEP = 10
+
+muted_changed = dispatch.Signal()
+volume_changed = dispatch.Signal()
+
+def get_muted():
+ return _volume.get_mute()
+
+def get_volume():
+ return _volume.get_volume()
+
+def set_volume(new_volume):
+ old_volume = _volume.get_volume()
+ _volume.set_volume(new_volume)
+
+ volume_changed.send(None)
+ save()
+
+def set_muted(new_state):
+ old_state = _volume.get_mute()
+ _volume.set_mute(new_state)
+
+ muted_changed.send(None)
+ save()
+
+def save():
+ if env.is_emulator() is False:
+ client = gconf.client_get_default()
+ client.set_int('/desktop/sugar/sound/volume', get_volume())
+
+def restore():
+ if env.is_emulator() is False:
+ client = gconf.client_get_default()
+ set_volume(client.get_int('/desktop/sugar/sound/volume'))
+
+_volume = _sugarext.VolumeAlsa()
diff --git a/src/jarabe/util/Makefile.am b/src/jarabe/util/Makefile.am
new file mode 100644
index 0000000..4046fe8
--- /dev/null
+++ b/src/jarabe/util/Makefile.am
@@ -0,0 +1,6 @@
+SUBDIRS = \
+ telepathy
+
+sugardir = $(pythondir)/jarabe/util
+sugar_PYTHON = \
+ __init__.py
diff --git a/src/model/Makefile.in b/src/jarabe/util/Makefile.in
index 876e3ef..57d96ba 100644
--- a/src/model/Makefile.in
+++ b/src/jarabe/util/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/model
+subdir = src/jarabe/util
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -85,6 +85,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -199,21 +202,15 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = devices
-sugardir = $(pkgdatadir)/shell/model
+SUBDIRS = \
+ telepathy
+
+sugardir = $(pythondir)/jarabe/util
sugar_PYTHON = \
- __init__.py \
- accesspointmodel.py \
- BuddyModel.py \
- Friends.py \
- Invites.py \
- Owner.py \
- MeshModel.py \
- shellmodel.py \
- homeactivity.py \
- homemodel.py
+ __init__.py
all: all-recursive
@@ -227,9 +224,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/model/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/jarabe/util/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/model/Makefile
+ $(AUTOMAKE) --foreign src/jarabe/util/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/service/__init__.py b/src/jarabe/util/__init__.py
index 52b82c8..1610dd0 100644
--- a/service/__init__.py
+++ b/src/jarabe/util/__init__.py
@@ -1,4 +1,7 @@
-# Copyright (C) 2007, One Laptop Per Child
+"""OLPC Sugar Jarabe utility modules
+"""
+
+# Copyright (C) 2008, 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
diff --git a/src/jarabe/util/telepathy/Makefile.am b/src/jarabe/util/telepathy/Makefile.am
new file mode 100644
index 0000000..d40349d
--- /dev/null
+++ b/src/jarabe/util/telepathy/Makefile.am
@@ -0,0 +1,4 @@
+sugardir = $(pythondir)/jarabe/util/telepathy
+sugar_PYTHON = \
+ __init__.py \
+ connection_watcher.py
diff --git a/src/view/devices/network/Makefile.in b/src/jarabe/util/telepathy/Makefile.in
index 388045d..35af9a8 100644
--- a/src/view/devices/network/Makefile.in
+++ b/src/jarabe/util/telepathy/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/view/devices/network
+subdir = src/jarabe/util/telepathy
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,14 +190,13 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/view/devices/network
+sugardir = $(pythondir)/jarabe/util/telepathy
sugar_PYTHON = \
- __init__.py \
- mesh.py \
- wired.py \
- wireless.py
+ __init__.py \
+ connection_watcher.py
all: all-am
@@ -208,9 +210,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/view/devices/network/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/jarabe/util/telepathy/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/view/devices/network/Makefile
+ $(AUTOMAKE) --foreign src/jarabe/util/telepathy/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/controlpanel/model/__init__.py b/src/jarabe/util/telepathy/__init__.py
index 2b0f269..387d09c 100644
--- a/src/controlpanel/model/__init__.py
+++ b/src/jarabe/util/telepathy/__init__.py
@@ -1,4 +1,7 @@
-# Copyright (C) 2008 One Laptop Per Child
+"""OLPC Sugar Jarabe utility telepathy modules
+"""
+
+# Copyright (C) 2008, 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
@@ -13,5 +16,4 @@
# 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
-#
diff --git a/src/jarabe/util/telepathy/connection_watcher.py b/src/jarabe/util/telepathy/connection_watcher.py
new file mode 100644
index 0000000..4a4c6e0
--- /dev/null
+++ b/src/jarabe/util/telepathy/connection_watcher.py
@@ -0,0 +1,110 @@
+# This should eventually land in telepathy-python, so has the same license:
+# Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# FIXME: this sould go upstream, in telepathy-python
+
+import logging
+
+import dbus
+import dbus.mainloop.glib
+import gobject
+
+from telepathy.client import Connection
+from telepathy.interfaces import CONN_INTERFACE
+from telepathy.constants import CONNECTION_STATUS_CONNECTED, \
+ CONNECTION_STATUS_DISCONNECTED
+
+class ConnectionWatcher(gobject.GObject):
+ __gsignals__ = {
+ 'connection-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'connection-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT]))
+ }
+
+ def __init__(self, bus=None):
+ gobject.GObject.__init__(self)
+
+ if bus is None:
+ self.bus = dbus.Bus()
+ else:
+ self.bus = bus
+
+ # D-Bus path -> Connection
+ self._connections = {}
+
+ self.bus.add_signal_receiver(self._status_changed_cb,
+ dbus_interface=CONN_INTERFACE, signal_name='StatusChanged',
+ path_keyword='path')
+
+ for conn in Connection.get_connections(bus):
+ conn.call_when_ready(self._conn_ready_cb)
+
+ def _status_changed_cb(self, *args, **kwargs):
+ path = kwargs['path']
+ if not path.startswith('/org/freedesktop/Telepathy/Connection/'):
+ return
+
+ status, reason_ = args
+ service_name = path.replace('/', '.')[1:]
+
+ if status == CONNECTION_STATUS_CONNECTED:
+ self._add_connection(service_name, path)
+ elif status == CONNECTION_STATUS_DISCONNECTED:
+ self._remove_connection(service_name, path)
+
+ def _conn_ready_cb(self, conn):
+ if conn.object_path in self._connections:
+ return
+
+ self._connections[conn.object_path] = conn
+ self.emit('connection-added', conn)
+
+ def _add_connection(self, service_name, path):
+ if path in self._connections:
+ return
+
+ try:
+ Connection(service_name, path, ready_handler=self._conn_ready_cb)
+ except dbus.exceptions.DBusException:
+ logging.debug('%s is propably already gone.', service_name)
+
+ def _remove_connection(self, service_name, path):
+ conn = self._connections.pop(path, None)
+ if conn is None:
+ return
+
+ self.emit('connection-removed', conn)
+
+ def get_connections(self):
+ return self._connections.values()
+
+if __name__ == '__main__':
+ dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
+ def connection_added_cb(conn_watcher, conn):
+ print "new connection", conn.service_name
+
+ def connection_removed_cb(conn_watcher, conn):
+ print "removed connection", conn.service_name
+
+ watcher = ConnectionWatcher()
+ watcher.connect('connection-added', connection_added_cb)
+ watcher.connect('connection-removed', connection_removed_cb)
+
+ loop = gobject.MainLoop()
+ loop.run()
diff --git a/src/jarabe/view/Makefile.am b/src/jarabe/view/Makefile.am
new file mode 100644
index 0000000..21e7a91
--- /dev/null
+++ b/src/jarabe/view/Makefile.am
@@ -0,0 +1,11 @@
+sugardir = $(pythondir)/jarabe/view
+sugar_PYTHON = \
+ __init__.py \
+ buddyicon.py \
+ buddymenu.py \
+ keyhandler.py \
+ launcher.py \
+ palettes.py \
+ pulsingicon.py \
+ service.py \
+ tabbinghandler.py
diff --git a/src/view/devices/network/Makefile.in b/src/jarabe/view/Makefile.in
index 388045d..084a6a8 100644
--- a/src/view/devices/network/Makefile.in
+++ b/src/jarabe/view/Makefile.in
@@ -29,7 +29,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-subdir = src/view/devices/network
+subdir = src/jarabe/view
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -73,6 +73,9 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
@@ -187,14 +190,20 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-sugardir = $(pkgdatadir)/shell/view/devices/network
+sugardir = $(pythondir)/jarabe/view
sugar_PYTHON = \
__init__.py \
- mesh.py \
- wired.py \
- wireless.py
+ buddyicon.py \
+ buddymenu.py \
+ keyhandler.py \
+ launcher.py \
+ palettes.py \
+ pulsingicon.py \
+ service.py \
+ tabbinghandler.py
all: all-am
@@ -208,9 +217,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/view/devices/network/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/jarabe/view/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/view/devices/network/Makefile
+ $(AUTOMAKE) --foreign src/jarabe/view/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/model/devices/__init__.py b/src/jarabe/view/__init__.py
index a9dd95a..a9dd95a 100644
--- a/src/model/devices/__init__.py
+++ b/src/jarabe/view/__init__.py
diff --git a/src/view/BuddyIcon.py b/src/jarabe/view/buddyicon.py
index b921fa5..13edb2c 100644
--- a/src/view/BuddyIcon.py
+++ b/src/jarabe/view/buddyicon.py
@@ -17,7 +17,7 @@
from sugar.graphics.icon import CanvasIcon
from sugar.graphics import style
-from view.BuddyMenu import BuddyMenu
+from jarabe.view.buddymenu import BuddyMenu
class BuddyIcon(CanvasIcon):
def __init__(self, buddy, size=style.STANDARD_ICON_SIZE):
diff --git a/src/view/BuddyMenu.py b/src/jarabe/view/buddymenu.py
index 427ac3d..fc1fdbe 100644
--- a/src/view/BuddyMenu.py
+++ b/src/jarabe/view/buddymenu.py
@@ -14,6 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import logging
from gettext import gettext as _
import gtk
@@ -22,8 +23,8 @@ from sugar.graphics.palette import Palette
from sugar.graphics.menuitem import MenuItem
from sugar.graphics.icon import Icon
-from model import shellmodel
-import view.Shell
+from jarabe.model import shell
+from jarabe.model import friends
class BuddyMenu(Palette):
def __init__(self, buddy):
@@ -44,19 +45,15 @@ class BuddyMenu(Palette):
if not buddy.is_owner():
self._add_items()
- def _get_home_model(self):
- return shellmodel.get_instance().get_home()
-
def __destroy_cb(self, menu):
if self._active_activity_changed_hid is not None:
- home_model = self._get_home_model()
+ home_model = shell.get_model()
home_model.disconnect(self._active_activity_changed_hid)
self._buddy.disconnect_by_func(self._buddy_icon_changed_cb)
self._buddy.disconnect_by_func(self._buddy_nick_changed_cb)
def _add_items(self):
- friends = shellmodel.get_instance().get_friends()
- if friends.has_buddy(self._buddy):
+ if friends.get_model().has_buddy(self._buddy):
menu_item = MenuItem(_('Remove friend'), 'list-remove')
menu_item.connect('activate', self._remove_friend_cb)
else:
@@ -70,7 +67,7 @@ class BuddyMenu(Palette):
self._invite_menu.connect('activate', self._invite_friend_cb)
self.menu.append(self._invite_menu)
- home_model = self._get_home_model()
+ home_model = shell.get_model()
self._active_activity_changed_hid = home_model.connect(
'active-activity-changed', self._cur_activity_changed_cb)
activity = home_model.get_active_activity()
@@ -108,14 +105,16 @@ class BuddyMenu(Palette):
self.set_primary_text(nick)
def _make_friend_cb(self, menuitem):
- friends = shellmodel.get_instance().get_friends()
- friends.make_friend(self._buddy)
+ friends.get_model().make_friend(self._buddy)
def _remove_friend_cb(self, menuitem):
- friends = shellmodel.get_instance().get_friends()
- friends.remove(self._buddy)
+ friends.get_model().remove(self._buddy)
def _invite_friend_cb(self, menuitem):
- activity = view.Shell.get_instance().get_current_activity()
- activity.invite(self._buddy)
-
+ activity = shell.get_model().get_active_activity()
+ service = activity.get_service()
+ if service:
+ buddy = self._buddy.get_buddy()
+ service.Invite(buddy.props.key)
+ else:
+ logging.error('Invite failed, activity service not ')
diff --git a/src/view/keyhandler.py b/src/jarabe/view/keyhandler.py
index 993d09d..4a50e70 100644
--- a/src/view/keyhandler.py
+++ b/src/jarabe/view/keyhandler.py
@@ -19,26 +19,30 @@ import signal
import logging
import subprocess
import errno
+import traceback
+import sys
import dbus
import gtk
from sugar._sugarext import KeyGrabber
-from hardware import hardwaremanager
-import view.Shell
-from view.tabbinghandler import TabbingHandler
-from model.shellmodel import ShellModel
+from jarabe.model import screen
+from jarabe.model import sound
+from jarabe.model import shell
+from jarabe.view.tabbinghandler import TabbingHandler
+from jarabe.model.shell import ShellModel
+from jarabe import config
_BRIGHTNESS_STEP = 2
-_VOLUME_STEP = hardwaremanager.VOL_CHANGE_INCREMENT_RECOMMENDATION
+_VOLUME_STEP = sound.VOLUME_STEP
_BRIGHTNESS_MAX = 15
_VOLUME_MAX = 100
_TABBING_MODIFIER = gtk.gdk.MOD1_MASK
_actions_table = {
'F1' : 'zoom_mesh',
- 'F2' : 'zoom_friends',
+ 'F2' : 'zoom_group',
'F3' : 'zoom_home',
'F4' : 'zoom_activity',
'F9' : 'brightness_down',
@@ -49,7 +53,6 @@ _actions_table = {
'F12' : 'volume_up',
'<alt>F11' : 'volume_min',
'<alt>F12' : 'volume_max',
- '<alt>1' : 'screenshot',
'0x93' : 'frame',
'0xEB' : 'rotate',
'<alt>Tab' : 'next_window',
@@ -73,7 +76,8 @@ SPEECH_DBUS_PATH = '/org/laptop/Speech'
SPEECH_DBUS_INTERFACE = 'org.laptop.Speech'
class KeyHandler(object):
- def __init__(self):
+ def __init__(self, frame):
+ self._frame = frame
self._screen_rotation = 0
self._key_pressed = None
self._keycode_pressed = 0
@@ -86,39 +90,49 @@ class KeyHandler(object):
self._key_grabber.connect('key-released',
self._key_released_cb)
- self._tabbing_handler = TabbingHandler(_TABBING_MODIFIER)
-
- for key in _actions_table.keys():
- self._key_grabber.grab(key)
+ self._tabbing_handler = TabbingHandler(self._frame, _TABBING_MODIFIER)
+
+ for f in os.listdir(os.path.join(config.ext_path, 'globalkey')):
+ if f.endswith('.py') and not f.startswith('__'):
+ module_name = f[:-3]
+ try:
+ logging.debug('Loading module %r' % module_name)
+ module = __import__('globalkey.' + module_name, globals(),
+ locals(), [module_name])
+ for key in module.BOUND_KEYS:
+ if key in _actions_table:
+ raise ValueError('Key %r is already bound' % key)
+ _actions_table[key] = module
+ except Exception:
+ logging.error('Exception while loading extension:\n' + \
+ ''.join(traceback.format_exception(*sys.exc_info())))
+
+ self._key_grabber.grab_keys(_actions_table.keys())
def _change_volume(self, step=None, value=None):
- hw_manager = hardwaremanager.get_manager()
-
if step is not None:
- volume = hw_manager.get_volume() + step
+ volume = sound.get_volume() + step
elif value is not None:
volume = value
volume = min(max(0, volume), _VOLUME_MAX)
- hw_manager.set_volume(volume)
- hw_manager.set_muted(volume == 0)
+ sound.set_volume(volume)
+ sound.set_muted(volume == 0)
def _change_brightness(self, step=None, value=None):
- hw_manager = hardwaremanager.get_manager()
-
if step is not None:
- level = hw_manager.get_display_brightness() + step
+ level = screen.get_display_brightness() + step
elif value is not None:
level = value
level = min(max(0, level), _BRIGHTNESS_MAX)
- hw_manager.set_display_brightness(level)
+ screen.set_display_brightness(level)
if level == 0:
- hw_manager.set_display_mode(hardwaremanager.B_AND_W_MODE)
+ screen.set_display_mode(screen.B_AND_W_MODE)
else:
- hw_manager.set_display_mode(hardwaremanager.COLOR_MODE)
+ screen.set_display_mode(screen.COLOR_MODE)
def _get_speech_proxy(self):
if self._speech_proxy is None:
@@ -149,19 +163,23 @@ class KeyHandler(object):
self._tabbing_handler.next_activity()
def handle_close_window(self):
- view.Shell.get_instance().close_current_activity()
+ active_activity = shell.get_model().get_active_activity()
+ if active_activity.is_journal():
+ return
+
+ active_activity.get_window().close()
def handle_zoom_mesh(self):
- view.Shell.get_instance().set_zoom_level(ShellModel.ZOOM_MESH)
+ shell.get_model().zoom_level = ShellModel.ZOOM_MESH
- def handle_zoom_friends(self):
- view.Shell.get_instance().set_zoom_level(ShellModel.ZOOM_FRIENDS)
+ def handle_zoom_group(self):
+ shell.get_model().zoom_level = ShellModel.ZOOM_GROUP
def handle_zoom_home(self):
- view.Shell.get_instance().set_zoom_level(ShellModel.ZOOM_HOME)
+ shell.get_model().zoom_level = ShellModel.ZOOM_HOME
def handle_zoom_activity(self):
- view.Shell.get_instance().set_zoom_level(ShellModel.ZOOM_ACTIVITY)
+ shell.get_model().zoom_level = ShellModel.ZOOM_ACTIVITY
def handle_brightness_max(self):
self._change_brightness(value=_BRIGHTNESS_MAX)
@@ -187,12 +205,8 @@ class KeyHandler(object):
def handle_volume_down(self):
self._change_volume(step=-_VOLUME_STEP)
- def handle_screenshot(self):
- view.Shell.get_instance().take_screenshot()
-
def handle_frame(self):
- view.Shell.get_instance().get_frame().notify_key_press()
-
+ self._frame.notify_key_press()
def handle_rotate(self):
"""
@@ -244,7 +258,7 @@ class KeyHandler(object):
bus = dbus.SessionBus()
obj = bus.get_object(J_DBUS_SERVICE, J_DBUS_PATH)
journal = dbus.Interface(obj, J_DBUS_INTERFACE)
- journal.FocusSearch({})
+ journal.FocusSearch()
def handle_open_search(self):
self.focus_journal_search()
@@ -265,8 +279,13 @@ class KeyHandler(object):
self._tabbing_handler.stop()
return True
- method = getattr(self, 'handle_' + action)
- method()
+ if hasattr(action, 'handle_key_press'):
+ action.handle_key_press(key)
+ elif isinstance(action, basestring):
+ method = getattr(self, 'handle_' + action)
+ method()
+ else:
+ raise TypeError('Invalid action %r' % action)
return True
else:
@@ -288,3 +307,13 @@ class KeyHandler(object):
return True
return False
+_instance = None
+
+def setup(frame):
+ global _instance
+
+ if _instance:
+ del _instance
+
+ _instance = KeyHandler(frame)
+
diff --git a/src/view/launchwindow.py b/src/jarabe/view/launcher.py
index d954abc..cc9e2a7 100644
--- a/src/view/launchwindow.py
+++ b/src/jarabe/view/launcher.py
@@ -14,6 +14,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import logging
+
import gtk
import hippo
import gobject
@@ -23,8 +25,8 @@ from sugar.graphics import style
from sugar.graphics import animator
from sugar.graphics.xocolor import XoColor
-from model import shellmodel
-from view.pulsingicon import CanvasPulsingIcon
+from jarabe.model import shell
+from jarabe.view.pulsingicon import CanvasPulsingIcon
class LaunchWindow(hippo.CanvasWindow):
def __init__(self, home_activity):
@@ -75,13 +77,14 @@ class LaunchBox(hippo.CanvasBox):
self._animator = animator.Animator(1.0)
- self._home = shellmodel.get_instance().get_home()
+ self._home = shell.get_model()
self._home.connect('active-activity-changed',
self.__active_activity_changed_cb)
self.connect('destroy', self.__destroy_cb)
def __destroy_cb(self, box):
+ self._activity_icon.props.pulsing = False
self._home.disconnect_by_func(self.__active_activity_changed_cb)
def zoom_in(self):
@@ -111,3 +114,37 @@ class _Animation(animator.Animation):
def next_frame(self, current):
d = (self.end_size - self.start_size) * current
self._icon.props.size = self.start_size + d
+
+_launchers = {}
+
+def setup():
+ model = shell.get_model()
+ model.connect('launch-started', __launch_started_cb)
+ model.connect('launch-failed', __launch_failed_cb)
+ model.connect('launch-completed', __launch_completed_cb)
+
+def __launch_started_cb(home_model, home_activity):
+ if home_activity.is_journal():
+ return
+
+ launch_window = LaunchWindow(home_activity)
+ launch_window.show()
+
+ _launchers[home_activity.get_activity_id()] = launch_window
+
+def __launch_failed_cb(home_model, home_activity):
+ if not home_activity.is_journal():
+ _destroy_launcher(home_activity)
+
+def __launch_completed_cb(home_model, home_activity):
+ if not home_activity.is_journal():
+ _destroy_launcher(home_activity)
+
+def _destroy_launcher(home_activity):
+ activity_id = home_activity.get_activity_id()
+
+ if activity_id in _launchers:
+ _launchers[activity_id].destroy()
+ del _launchers[activity_id]
+ else:
+ logging.error('Launcher for %s is missing' % activity_id)
diff --git a/src/view/palettes.py b/src/jarabe/view/palettes.py
index 416ff0f..5ba2cc2 100644
--- a/src/view/palettes.py
+++ b/src/jarabe/view/palettes.py
@@ -17,20 +17,20 @@
import os
import statvfs
from gettext import gettext as _
+import gconf
import gobject
import gtk
from sugar import env
-from sugar import profile
-from sugar import activity
from sugar.graphics.palette import Palette
from sugar.graphics.menuitem import MenuItem
from sugar.graphics.icon import Icon
from sugar.graphics import style
from sugar.graphics.xocolor import XoColor
+from sugar.activity import activityfactory
-import view.Shell
+from jarabe.model import bundleregistry
class BasePalette(Palette):
def __init__(self, home_activity):
@@ -86,20 +86,26 @@ class ActivityPalette(Palette):
__gsignals__ = {
'erase-activated' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
+ gobject.TYPE_NONE, ([]))
}
def __init__(self, activity_info):
- activity_icon = Icon(file=activity_info.icon,
- xo_color=profile.get_color(),
+ client = gconf.client_get_default()
+ color = XoColor(client.get_string("/desktop/sugar/user/color"))
+ activity_icon = Icon(file=activity_info.get_icon(),
+ xo_color=color,
icon_size=gtk.ICON_SIZE_LARGE_TOOLBAR)
- Palette.__init__(self, primary_text=activity_info.name,
+ Palette.__init__(self, primary_text=activity_info.get_name(),
icon=activity_icon)
- self._bundle_id = activity_info.bundle_id
- self._version = activity_info.version
- self._favorite = activity_info.favorite
+ registry = bundleregistry.get_registry()
+
+ self._bundle = activity_info
+ self._bundle_id = activity_info.get_bundle_id()
+ self._version = activity_info.get_activity_version()
+ self._favorite = registry.is_bundle_favorite(self._bundle_id,
+ self._version)
menu_item = MenuItem(_('Start'), 'activity-start')
menu_item.connect('activate', self.__start_activate_cb)
@@ -122,8 +128,8 @@ class ActivityPalette(Palette):
self.menu.append(menu_item)
menu_item.show()
- registry = activity.get_registry()
- self._activity_changed_sid = registry.connect('activity_changed',
+ registry = bundleregistry.get_registry()
+ self._activity_changed_sid = registry.connect('bundle_changed',
self.__activity_changed_cb)
self._update_favorite_item()
@@ -140,23 +146,26 @@ class ActivityPalette(Palette):
style.COLOR_TRANSPARENT.get_svg()))
else:
label.set_text(_('Make favorite'))
- xo_color = profile.get_color()
+ client = gconf.client_get_default()
+ xo_color = XoColor(client.get_string("/desktop/sugar/user/color"))
self._favorite_icon.props.xo_color = xo_color
def __start_activate_cb(self, menu_item):
- view.Shell.get_instance().start_activity(self._bundle_id)
+ activityfactory.create(self._bundle)
def __change_favorite_activate_cb(self, menu_item):
- registry = activity.get_registry()
- registry.set_activity_favorite(self._bundle_id,
- self._version,
- not self._favorite)
+ registry = bundleregistry.get_registry()
+ registry.set_bundle_favorite(self._bundle_id,
+ self._version,
+ not self._favorite)
def __activity_changed_cb(self, activity_registry, activity_info):
- if activity_info.bundle_id == self._bundle_id and \
- activity_info.version == self._version:
- self._favorite = activity_info.favorite
+ if activity_info.get_bundle_id() == self._bundle_id and \
+ activity_info.get_activity_version() == self._version:
+ registry = bundleregistry.get_registry()
+ self._favorite = registry.is_bundle_favorite(self._bundle_id,
+ self._version)
self._update_favorite_item()
def __erase_activate_cb(self, menu_item):
diff --git a/src/jarabe/view/pulsingicon.py b/src/jarabe/view/pulsingicon.py
new file mode 100644
index 0000000..3627f3b
--- /dev/null
+++ b/src/jarabe/view/pulsingicon.py
@@ -0,0 +1,231 @@
+# Copyright (C) 2008 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
+
+import math
+
+import gobject
+
+from sugar.graphics.icon import Icon, CanvasIcon
+from sugar.graphics.style import Color
+
+_INTERVAL = 100
+_STEP = math.pi / 10 # must be a fraction of pi, for clean caching
+
+class Pulser(object):
+ def __init__(self, icon):
+ self._pulse_hid = None
+ self._icon = icon
+ self._level = 0
+ self._phase = 0
+
+ def start(self, restart=False):
+ if restart:
+ self._phase = 0
+ if self._pulse_hid is None:
+ self._pulse_hid = gobject.timeout_add(_INTERVAL, self.__pulse_cb)
+
+ def stop(self):
+ if self._pulse_hid is not None:
+ gobject.source_remove(self._pulse_hid)
+ self._pulse_hid = None
+ self._icon.xo_color = self._icon.base_color
+
+ def update(self):
+ if self._icon.pulsing:
+ base_color = self._icon.base_color
+ pulse_color = self._icon.pulse_color
+
+ base_stroke = self._get_as_rgba(base_color.get_stroke_color())
+ pulse_stroke = self._get_as_rgba(pulse_color.get_stroke_color())
+ base_fill = self._get_as_rgba(base_color.get_fill_color())
+ pulse_fill = self._get_as_rgba(pulse_color.get_fill_color())
+
+ self._icon.stroke_color = \
+ self._get_color(base_stroke, pulse_stroke).get_svg()
+ self._icon.fill_color = \
+ self._get_color(base_fill, pulse_fill).get_svg()
+ else:
+ self._icon.xo_color = self._icon.base_color
+
+ def _get_as_rgba(self, html_color):
+ if html_color == 'none':
+ return Color('#FFFFFF', alpha=1.0).get_rgba()
+ else:
+ return Color(html_color).get_rgba()
+
+ def _get_color(self, orig_color, target_color):
+ next_point = (orig_color[0] +
+ self._level * (target_color[0] - orig_color[0]),
+ orig_color[1] +
+ self._level * (target_color[1] - orig_color[1]),
+ orig_color[2] +
+ self._level * (target_color[2] - orig_color[2]))
+
+ return Color('#%02x%02x%02x' % (int(next_point[0] * 255),
+ int(next_point[1] * 255),
+ int(next_point[2] * 255)))
+
+ def __pulse_cb(self):
+ self._phase += _STEP
+ self._level = (math.sin(self._phase) + 1) / 2
+ self.update()
+
+ return True
+
+class PulsingIcon(Icon):
+ __gtype_name__ = 'SugarPulsingIcon'
+
+ def __init__(self, **kwargs):
+ self._pulser = Pulser(self)
+ self._base_color = None
+ self._pulse_color = None
+ self._paused = False
+ self._pulsing = False
+
+ Icon.__init__(self, **kwargs)
+
+ self._palette = None
+ self.connect('destroy', self.__destroy_cb)
+
+ def set_pulse_color(self, pulse_color):
+ self._pulse_color = pulse_color
+ self._pulser.update()
+
+ def get_pulse_color(self):
+ return self._pulse_color
+
+ pulse_color = gobject.property(
+ type=object, getter=get_pulse_color, setter=set_pulse_color)
+
+ def set_base_color(self, base_color):
+ self._base_color = base_color
+ self._pulser.update()
+
+ def get_base_color(self):
+ return self._base_color
+
+ base_color = gobject.property(
+ type=object, getter=get_base_color, setter=set_base_color)
+
+ def set_paused(self, paused):
+ self._paused = paused
+
+ if self._paused:
+ self._pulser.stop()
+ else:
+ self._pulser.start(restart=False)
+
+ def get_paused(self):
+ return self._paused
+
+ paused = gobject.property(
+ type=bool, default=False, getter=get_paused, setter=set_paused)
+
+ def set_pulsing(self, pulsing):
+ self._pulsing = pulsing
+
+ if self._pulsing:
+ self._pulser.start(restart=True)
+ else:
+ self._pulser.stop()
+
+ def get_pulsing(self):
+ return self._pulsing
+
+ pulsing = gobject.property(
+ type=bool, default=False, getter=get_pulsing, setter=set_pulsing)
+
+ def _get_palette(self):
+ return self._palette
+
+ def _set_palette(self, palette):
+ if self._palette is not None:
+ self._palette.props.invoker = None
+ self._palette = palette
+
+ palette = property(_get_palette, _set_palette)
+
+ def __destroy_cb(self, icon):
+ self._pulser.stop()
+ if self._palette is not None:
+ self._palette.destroy()
+
+class CanvasPulsingIcon(CanvasIcon):
+ __gtype_name__ = 'SugarCanvasPulsingIcon'
+
+ def __init__(self, **kwargs):
+ self._pulser = Pulser(self)
+ self._base_color = None
+ self._pulse_color = None
+ self._paused = False
+ self._pulsing = False
+
+ CanvasIcon.__init__(self, **kwargs)
+
+ self.connect('destroy', self.__destroy_cb)
+
+ def __destroy_cb(self, box):
+ self._pulser.stop()
+
+ def set_pulse_color(self, pulse_color):
+ self._pulse_color = pulse_color
+ self._pulser.update()
+
+ def get_pulse_color(self):
+ return self._pulse_color
+
+ pulse_color = gobject.property(
+ type=object, getter=get_pulse_color, setter=set_pulse_color)
+
+ def set_base_color(self, base_color):
+ self._base_color = base_color
+ self._pulser.update()
+
+ def get_base_color(self):
+ return self._base_color
+
+ base_color = gobject.property(
+ type=object, getter=get_base_color, setter=set_base_color)
+
+ def set_paused(self, paused):
+ self._paused = paused
+
+ if self._paused:
+ self._pulser.stop()
+ elif self._pulsing:
+ self._pulser.start(restart=False)
+
+ def get_paused(self):
+ return self._paused
+
+ paused = gobject.property(
+ type=bool, default=False, getter=get_paused, setter=set_paused)
+
+ def set_pulsing(self, pulsing):
+ self._pulsing = pulsing
+ if self._paused:
+ return
+
+ if self._pulsing:
+ self._pulser.start(restart=True)
+ else:
+ self._pulser.stop()
+
+ def get_pulsing(self):
+ return self._pulsing
+
+ pulsing = gobject.property(
+ type=bool, default=False, getter=get_pulsing, setter=set_pulsing)
diff --git a/src/shellservice.py b/src/jarabe/view/service.py
index 706f2f2..a2439ce 100644
--- a/src/shellservice.py
+++ b/src/jarabe/view/service.py
@@ -15,11 +15,14 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""D-bus service providing access to the shell's functionality"""
-import dbus
import os
-from view import Shell
-from model import shellmodel
+import dbus
+import gtk
+
+from jarabe.model import shell
+from jarabe.model import owner
+from jarabe.model import bundleregistry
_DBUS_SERVICE = "org.laptop.Shell"
_DBUS_SHELL_IFACE = "org.laptop.Shell"
@@ -28,7 +31,7 @@ _DBUS_PATH = "/org/laptop/Shell"
_DBUS_RAINBOW_IFACE = "org.laptop.security.Rainbow"
-class ShellService(dbus.service.Object):
+class UIService(dbus.service.Object):
"""Provides d-bus service to script the shell's operations
Uses a shell_model object to observe events such as changes to:
@@ -50,28 +53,36 @@ class ShellService(dbus.service.Object):
_rainbow = None
def __init__(self):
- self._shell = Shell.get_instance()
- self._shell_model = shellmodel.get_instance()
-
- self._owner = self._shell_model.get_owner()
- self._owner.connect('nick-changed', self._owner_nick_changed_cb)
- self._owner.connect('icon-changed', self._owner_icon_changed_cb)
- self._owner.connect('color-changed', self._owner_color_changed_cb)
-
- self._home_model = self._shell_model.get_home()
- self._home_model.connect('active-activity-changed',
- self._cur_activity_changed_cb)
-
bus = dbus.SessionBus()
bus_name = dbus.service.BusName(_DBUS_SERVICE, bus=bus)
dbus.service.Object.__init__(self, bus_name, _DBUS_PATH)
+ self._shell_model = shell.get_model()
+
+ def start(self):
+ owner_model = owner.get_model()
+ owner_model.connect('nick-changed', self._owner_nick_changed_cb)
+ owner_model.connect('icon-changed', self._owner_icon_changed_cb)
+ owner_model.connect('color-changed', self._owner_color_changed_cb)
+
+ self._shell_model.connect('active-activity-changed',
+ self._cur_activity_changed_cb)
+
+ @dbus.service.method(_DBUS_SHELL_IFACE,
+ in_signature="s", out_signature="s")
+ def GetBundlePath(self, bundle_id):
+ bundle = bundleregistry.get_registry().get_bundle(bundle_id)
+ if bundle:
+ return bundle.get_path()
+ else:
+ return ''
+
@dbus.service.method(_DBUS_SHELL_IFACE,
in_signature="s", out_signature="b")
def ActivateActivity(self, activity_id):
- host = self._shell.get_activity(activity_id)
- if host:
- host.present()
+ activity = self._shell_model.get_activity_by_id(activity_id)
+ if activity:
+ activity.get_window().activate(gtk.get_current_event_time())
return True
return False
@@ -79,14 +90,12 @@ class ShellService(dbus.service.Object):
@dbus.service.method(_DBUS_SHELL_IFACE,
in_signature="ss", out_signature="")
def NotifyLaunch(self, bundle_id, activity_id):
- home = self._shell.get_model().get_home()
- home.notify_launch(activity_id, bundle_id)
+ shell.get_model().notify_launch(activity_id, bundle_id)
@dbus.service.method(_DBUS_SHELL_IFACE,
in_signature="s", out_signature="")
def NotifyLaunchFailure(self, activity_id):
- home = self._shell.get_model().get_home()
- home.notify_launch_failed(activity_id)
+ shell.get_model().notify_launch_failed(activity_id)
@dbus.service.signal(_DBUS_OWNER_IFACE, signature="s")
def ColorChanged(self, color):
@@ -126,7 +135,7 @@ class ShellService(dbus.service.Object):
activity_id,
dbus_interface=_DBUS_RAINBOW_IFACE)
- def _cur_activity_changed_cb(self, owner, new_activity):
+ def _cur_activity_changed_cb(self, shell_model, new_activity):
new_id = ""
if new_activity:
new_id = new_activity.get_activity_id()
diff --git a/src/view/tabbinghandler.py b/src/jarabe/view/tabbinghandler.py
index e3153b0..b1c85c6 100644
--- a/src/view/tabbinghandler.py
+++ b/src/jarabe/view/tabbinghandler.py
@@ -18,18 +18,16 @@ import logging
import gtk
import gobject
-import view.Shell
-from view.frame import frame
-from model import shellmodel
+from jarabe.model import shell
_RAISE_DELAY = 250
class TabbingHandler(object):
- def __init__(self, modifier):
+ def __init__(self, frame, modifier):
+ self._frame = frame
self._tabbing = False
self._modifier = modifier
self._timeout = None
- self._frame = frame.get_instance()
def _start_tabbing(self):
if not self._tabbing:
@@ -57,8 +55,6 @@ class TabbingHandler(object):
self._tabbing = False
else:
- shell = view.Shell.get_instance()
-
self._frame.show(self._frame.MODE_NON_INTERACTIVE)
def __timeout_cb(self):
@@ -76,8 +72,7 @@ class TabbingHandler(object):
self._timeout = None
def _activate_current(self):
- shell_model = shellmodel.get_instance()
- home_model = shell_model.get_home()
+ home_model = shell.get_model()
activity = home_model.get_tabbing_activity()
if activity and activity.get_window():
activity.get_window().activate(1)
@@ -90,21 +85,20 @@ class TabbingHandler(object):
first_switch = False
if self._tabbing:
- shell_model = shellmodel.get_instance()
- home_model = shell_model.get_home()
- zoom_level = shell_model.get_zoom_level()
- zoom_activity = (zoom_level == shellmodel.ShellModel.ZOOM_ACTIVITY)
+ shell_model = shell.get_model()
+ zoom_level = shell_model.zoom_level
+ zoom_activity = (zoom_level == shell.ShellModel.ZOOM_ACTIVITY)
if not zoom_activity and first_switch:
- activity = home_model.get_active_activity()
+ activity = shell_model.get_active_activity()
else:
- activity = home_model.get_tabbing_activity()
- activity = home_model.get_next_activity(current=activity)
+ activity = shell_model.get_tabbing_activity()
+ activity = shell_model.get_next_activity(current=activity)
- home_model.set_tabbing_activity(activity)
+ shell_model.set_tabbing_activity(activity)
self._start_timeout()
else:
- view.Shell.get_instance().activate_next_activity()
+ self._activate_next_activity()
def previous_activity(self):
if not self._tabbing:
@@ -114,21 +108,25 @@ class TabbingHandler(object):
first_switch = False
if self._tabbing:
- shell_model = shellmodel.get_instance()
- home_model = shell_model.get_home()
- zoom_level = shell_model.get_zoom_level()
- zoom_activity = (zoom_level == shellmodel.ShellModel.ZOOM_ACTIVITY)
+ shell_model = shell.get_model()
+ zoom_level = shell_model.zoom_level
+ zoom_activity = (zoom_level == shell.ShellModel.ZOOM_ACTIVITY)
if not zoom_activity and first_switch:
- activity = home_model.get_active_activity()
+ activity = shell_model.get_active_activity()
else:
- activity = home_model.get_tabbing_activity()
- activity = home_model.get_previous_activity(current=activity)
+ activity = shell_model.get_tabbing_activity()
+ activity = shell_model.get_previous_activity(current=activity)
- home_model.set_tabbing_activity(activity)
+ shell_model.set_tabbing_activity(activity)
self._start_timeout()
else:
- view.Shell.get_instance().activate_next_activity()
+ self._activate_next_activity()
+
+ def _activate_next_activity(self):
+ next_activity = shell.get_model().get_next_activity()
+ if next_activity:
+ next_activity.get_window().activate(gtk.get_current_event_time())
def stop(self):
gtk.gdk.keyboard_ungrab()
@@ -140,7 +138,7 @@ class TabbingHandler(object):
self._cancel_timeout()
self._activate_current()
- home_model = shellmodel.get_instance().get_home()
+ home_model = shell.get_model()
home_model.set_tabbing_activity(None)
def is_tabbing(self):
diff --git a/src/logsmanager.py b/src/logsmanager.py
deleted file mode 100644
index f0fa981..0000000
--- a/src/logsmanager.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright (C) 2007 Red Hat, Inc.
-#
-# 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 os
-import time
-
-from sugar import env
-
-_MAX_BACKUP_DIRS = 3
-"""The maximum number of "old" log directories we should keep around."""
-
-def setup():
- """Clean up the log directory, moving old logs into a numbered backup
- directory. We only keep `_MAX_BACKUP_DIRS` of these backup directories
- around; the rest are removed."""
- logs_dir = env.get_logs_path()
- if not os.path.isdir(logs_dir):
- os.makedirs(logs_dir)
-
- backup_logs = []
- backup_dirs = []
- for f in os.listdir(logs_dir):
- path = os.path.join(logs_dir, f)
- if os.path.isfile(path):
- backup_logs.append(f)
- elif os.path.isdir(path):
- backup_dirs.append(path)
-
- if len(backup_dirs) > _MAX_BACKUP_DIRS:
- backup_dirs.sort()
- root = backup_dirs[0]
- for f in os.listdir(root):
- os.remove(os.path.join(root, f))
- os.rmdir(root)
-
- if len(backup_logs) > 0:
- name = str(int(time.time()))
- backup_dir = os.path.join(logs_dir, name)
- os.mkdir(backup_dir)
- for log in backup_logs:
- source_path = os.path.join(logs_dir, log)
- dest_path = os.path.join(backup_dir, log)
- os.rename(source_path, dest_path)
diff --git a/src/main.py b/src/main.py
deleted file mode 100644
index 1bb91af..0000000
--- a/src/main.py
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright (C) 2006, Red Hat, Inc.
-#
-# 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 os
-import gettext
-
-import pygtk
-pygtk.require('2.0')
-import gtk
-import gobject
-
-gtk.gdk.threads_init()
-
-from sugar import logger
-from sugar.profile import get_profile
-
-import view.Shell
-from shellservice import ShellService
-from hardware import hardwaremanager
-from intro import intro
-from session import get_session_manager
-import logsmanager
-import config
-
-def _start_matchbox():
- cmd = ['matchbox-window-manager']
-
- cmd.extend(['-use_titlebar', 'no'])
- cmd.extend(['-theme', 'sugar'])
- cmd.extend(['-kbdconfig', os.path.join(config.data_path, 'kbdconfig')])
-
- gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH)
-
-def _setup_translations():
- locale_path = os.path.join(config.prefix, 'share', 'locale')
- domain = 'sugar'
-
- gettext.bindtextdomain(domain, locale_path)
- gettext.textdomain(domain)
-
-def check_cm(bus_name):
- try:
- import dbus
- bus = dbus.SessionBus()
- bus_object = bus.get_object('org.freedesktop.DBus',
- '/org/freedesktop/DBus')
- name_ = bus_object.GetNameOwner(bus_name,
- dbus_interface='org.freedesktop.DBus')
- except dbus.DBusException:
- return False
- return True
-
-def _shell_started_cb():
- # Unfreeze the display
- hw_manager = hardwaremanager.get_manager()
- hw_manager.set_dcon_freeze(0)
-
-def _software_update_cb():
- '''Ask the homeview to display an alert about available software updates
- '''
- shell = view.Shell.get_instance()
- home_box = shell.home_window.get_home_box()
- home_box.show_software_updates_alert()
-
-def main():
- gobject.idle_add(_shell_started_cb)
-
- try:
- logsmanager.setup()
- except Exception, e:
- # logs setup is not critical; it should not prevent sugar from
- # starting if (for example) the disk is full or read-only.
- print 'Log setup failed: %s' % e
-
- logger.start('shell')
-
- _start_matchbox()
- _setup_translations()
-
- hw_manager = hardwaremanager.get_manager()
- hw_manager.startup()
-
- icons_path = os.path.join(config.data_path, 'icons')
- gtk.icon_theme_get_default().append_search_path(icons_path)
-
- # Do initial setup if needed
- if not get_profile().is_valid():
- win = intro.IntroWindow()
- win.show_all()
- gtk.main()
-
- # set timezone
- if get_profile().timezone is not None:
- os.environ['TZ'] = get_profile().timezone
-
- if os.environ.has_key("SUGAR_TP_DEBUG"):
- # Allow the user time to start up telepathy connection managers
- # using the Sugar DBus bus address
- import time
- from telepathy.client import ManagerRegistry
-
- registry = ManagerRegistry()
- registry.LoadManagers()
-
- debug_flags = os.environ["SUGAR_TP_DEBUG"].split(',')
- for cm_name in debug_flags:
- if cm_name not in ["gabble", "salut"]:
- continue
-
- try:
- cm = registry.services[cm_name]
- except KeyError:
- print RuntimeError("%s connection manager not found!" % cm_name)
-
- while not check_cm(cm['busname']):
- print "Waiting for %s on: DBUS_SESSION_BUS_ADDRESS=%s" % \
- (cm_name, os.environ["DBUS_SESSION_BUS_ADDRESS"])
- try:
- time.sleep(5)
- except KeyboardInterrupt:
- print "Got Ctrl+C, continuing..."
- break
-
- # TODO: move initializations from the Shell constructor to a start() method
- view.Shell.get_instance()
- ShellService()
-
- session_manager = get_session_manager()
- session_manager.start()
-
- # dlo trac #7495: open 'software update' control panel after an upgrade
- # to update activities.
- update_trigger_file = os.path.expanduser('~/.sugar-update')
- if os.path.isfile(update_trigger_file):
- gobject.idle_add(_software_update_cb)
-
- try:
- gtk.main()
- except KeyboardInterrupt:
- print 'Ctrl+C pressed, exiting...'
diff --git a/src/model/Makefile.am b/src/model/Makefile.am
deleted file mode 100644
index 0b7d14c..0000000
--- a/src/model/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-SUBDIRS = devices
-
-sugardir = $(pkgdatadir)/shell/model
-sugar_PYTHON = \
- __init__.py \
- accesspointmodel.py \
- BuddyModel.py \
- Friends.py \
- Invites.py \
- Owner.py \
- MeshModel.py \
- shellmodel.py \
- homeactivity.py \
- homemodel.py
diff --git a/src/model/MeshModel.py b/src/model/MeshModel.py
deleted file mode 100644
index fa33035..0000000
--- a/src/model/MeshModel.py
+++ /dev/null
@@ -1,237 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 gobject
-
-from sugar.graphics.xocolor import XoColor
-from sugar.presence import presenceservice
-from sugar import activity
-
-from model.BuddyModel import BuddyModel
-from model.accesspointmodel import AccessPointModel
-from hardware import hardwaremanager
-from hardware import nmclient
-
-class ActivityModel:
- def __init__(self, act, bundle):
- self.activity = act
- self.bundle = bundle
-
- def get_id(self):
- return self.activity.props.id
-
- def get_icon_name(self):
- return self.bundle.icon
-
- def get_color(self):
- return XoColor(self.activity.props.color)
-
- def get_bundle_id(self):
- return self.bundle.bundle_id
-
-class MeshModel(gobject.GObject):
- __gsignals__ = {
- 'activity-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])),
- 'activity-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])),
- 'buddy-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])),
- 'buddy-moved': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT,
- gobject.TYPE_PYOBJECT])),
- 'buddy-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])),
- 'access-point-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])),
- 'access-point-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])),
- 'mesh-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])),
- 'mesh-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([]))
- }
-
- def __init__(self):
- gobject.GObject.__init__(self)
-
- self._activities = {}
- self._buddies = {}
- self._access_points = {}
- self._mesh = None
-
- self._pservice = presenceservice.get_instance()
- self._pservice.connect("activity-appeared",
- self._activity_appeared_cb)
- self._pservice.connect('activity-disappeared',
- self._activity_disappeared_cb)
- self._pservice.connect("buddy-appeared",
- self._buddy_appeared_cb)
- self._pservice.connect("buddy-disappeared",
- self._buddy_disappeared_cb)
-
- # Add any buddies the PS knows about already
- self._pservice.get_buddies_async(reply_handler=self._get_buddies_cb)
-
- self._pservice.get_activities_async(
- reply_handler=self._get_activities_cb)
-
- network_manager = hardwaremanager.get_network_manager()
- if network_manager:
- for nm_device in network_manager.get_devices():
- self._add_network_device(nm_device)
- network_manager.connect('device-added',
- self._nm_device_added_cb)
- network_manager.connect('device-removed',
- self._nm_device_removed_cb)
-
- def _get_buddies_cb(self, buddy_list):
- for buddy in buddy_list:
- self._buddy_appeared_cb(self._pservice, buddy)
-
- def _get_activities_cb(self, activity_list):
- for act in activity_list:
- self._check_activity(act)
-
- def _nm_device_added_cb(self, manager, nm_device):
- self._add_network_device(nm_device)
-
- def _nm_device_removed_cb(self, manager, nm_device):
- self._remove_network_device(nm_device)
-
- def _nm_network_appeared_cb(self, nm_device, nm_network):
- self._add_access_point(nm_device, nm_network)
-
- def _nm_network_disappeared_cb(self, nm_device, nm_network):
- if self._access_points.has_key(nm_network.get_op()):
- ap = self._access_points[nm_network.get_op()]
- self._remove_access_point(ap)
-
- def _add_network_device(self, nm_device):
- dtype = nm_device.get_type()
- if dtype == nmclient.DEVICE_TYPE_802_11_WIRELESS:
- for nm_network in nm_device.get_networks():
- self._add_access_point(nm_device, nm_network)
-
- nm_device.connect('network-appeared',
- self._nm_network_appeared_cb)
- nm_device.connect('network-disappeared',
- self._nm_network_disappeared_cb)
- elif dtype == nmclient.DEVICE_TYPE_802_11_MESH_OLPC:
- self._mesh = nm_device
- self.emit('mesh-added', self._mesh)
-
- def _remove_network_device(self, nm_device):
- if nm_device == self._mesh:
- self._mesh = None
- self.emit('mesh-removed')
- elif nm_device.get_type() == nmclient.DEVICE_TYPE_802_11_WIRELESS:
- aplist = self._access_points.values()
- for ap in aplist:
- if ap.get_nm_device() == nm_device:
- self._remove_access_point(ap)
-
- def _add_access_point(self, nm_device, nm_network):
- model = AccessPointModel(nm_device, nm_network)
- self._access_points[model.get_id()] = model
- self.emit('access-point-added', model)
-
- def _remove_access_point(self, ap):
- if not self._access_points.has_key(ap.get_id()):
- return
- self.emit('access-point-removed', ap)
- del self._access_points[ap.get_id()]
-
- def get_mesh(self):
- return self._mesh
-
- def get_access_points(self):
- return self._access_points.values()
-
- def get_activities(self):
- return self._activities.values()
-
- def get_buddies(self):
- return self._buddies.values()
-
- def _buddy_activity_changed_cb(self, model, cur_activity):
- if not self._buddies.has_key(model.get_key()):
- return
- if cur_activity and self._activities.has_key(cur_activity.props.id):
- activity_model = self._activities[cur_activity.props.id]
- self.emit('buddy-moved', model, activity_model)
- else:
- self.emit('buddy-moved', model, None)
-
- def _buddy_appeared_cb(self, pservice, buddy):
- if self._buddies.has_key(buddy.props.key):
- return
-
- model = BuddyModel(buddy=buddy)
- model.connect('current-activity-changed',
- self._buddy_activity_changed_cb)
- self._buddies[buddy.props.key] = model
- self.emit('buddy-added', model)
-
- cur_activity = buddy.props.current_activity
- if cur_activity:
- self._buddy_activity_changed_cb(model, cur_activity)
-
- def _buddy_disappeared_cb(self, pservice, buddy):
- if not self._buddies.has_key(buddy.props.key):
- return
- self.emit('buddy-removed', self._buddies[buddy.props.key])
- del self._buddies[buddy.props.key]
-
- def _activity_appeared_cb(self, pservice, act):
- self._check_activity(act)
-
- def _check_activity(self, presence_activity):
- registry = activity.get_registry()
- bundle = registry.get_activity(presence_activity.props.type)
- if not bundle:
- return
- if self.has_activity(presence_activity.props.id):
- return
- self.add_activity(bundle, presence_activity)
-
- def has_activity(self, activity_id):
- return self._activities.has_key(activity_id)
-
- def get_activity(self, activity_id):
- if self.has_activity(activity_id):
- return self._activities[activity_id]
- else:
- return None
-
- def add_activity(self, bundle, act):
- model = ActivityModel(act, bundle)
- self._activities[model.get_id()] = model
- self.emit('activity-added', model)
-
- for buddy in self._pservice.get_buddies():
- cur_activity = buddy.props.current_activity
- key = buddy.props.key
- if cur_activity == activity and self._buddies.has_key(key):
- buddy_model = self._buddies[key]
- self.emit('buddy-moved', buddy_model, model)
-
- def _activity_disappeared_cb(self, pservice, act):
- if self._activities.has_key(act.props.id):
- activity_model = self._activities[act.props.id]
- self.emit('activity-removed', activity_model)
- del self._activities[act.props.id]
diff --git a/src/model/accesspointmodel.py b/src/model/accesspointmodel.py
deleted file mode 100644
index f464f75..0000000
--- a/src/model/accesspointmodel.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 gobject
-
-from hardware import nmclient
-
-STATE_CONNECTING = 0
-STATE_CONNECTED = 1
-STATE_NOTCONNECTED = 2
-
-_nm_state_to_state = {
- nmclient.NETWORK_STATE_CONNECTED : STATE_CONNECTED,
- nmclient.NETWORK_STATE_CONNECTING : STATE_CONNECTING,
- nmclient.NETWORK_STATE_NOTCONNECTED : STATE_NOTCONNECTED
-}
-
-class AccessPointModel(gobject.GObject):
- __gproperties__ = {
- 'name' : (str, None, None, None,
- gobject.PARAM_READABLE),
- 'strength' : (int, None, None, 0, 100, 0,
- gobject.PARAM_READABLE),
- 'state' : (int, None, None, STATE_CONNECTING,
- STATE_NOTCONNECTED, 0, gobject.PARAM_READABLE),
- 'capabilities' : (int, None, None, 0, 0x7FFFFFFF, 0,
- gobject.PARAM_READABLE),
- 'mode' : (int, None, None, 0, 6, 0, gobject.PARAM_READABLE)
- }
-
- def __init__(self, nm_device, nm_network):
- gobject.GObject.__init__(self)
- self._nm_network = nm_network
- self._nm_device = nm_device
-
- self._nm_network.connect('strength-changed',
- self._strength_changed_cb)
- self._nm_network.connect('state-changed',
- self._state_changed_cb)
-
- def _strength_changed_cb(self, nm_network):
- self.notify('strength')
-
- def _state_changed_cb(self, nm_network):
- self.notify('state')
-
- def get_id(self):
- return self._nm_network.get_op()
-
- def get_nm_device(self):
- return self._nm_device
-
- def get_nm_network(self):
- return self._nm_network
-
- def do_get_property(self, pspec):
- if pspec.name == 'strength':
- return self._nm_network.get_strength()
- elif pspec.name == 'name':
- return self._nm_network.get_ssid()
- elif pspec.name == 'state':
- nm_state = self._nm_network.get_state()
- return _nm_state_to_state[nm_state]
- elif pspec.name == 'capabilities':
- return self._nm_network.get_caps()
- elif pspec.name == 'mode':
- return self._nm_network.get_mode()
diff --git a/src/model/devices/Makefile.am b/src/model/devices/Makefile.am
deleted file mode 100644
index 274f1e7..0000000
--- a/src/model/devices/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-SUBDIRS = network
-
-sugardir = $(pkgdatadir)/shell/model/devices
-sugar_PYTHON = \
- __init__.py \
- battery.py \
- device.py \
- devicesmodel.py \
- speaker.py
-
diff --git a/src/model/devices/Makefile.in b/src/model/devices/Makefile.in
deleted file mode 100644
index 3537a15..0000000
--- a/src/model/devices/Makefile.in
+++ /dev/null
@@ -1,552 +0,0 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-subdir = src/model/devices
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(sugar_PYTHON)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(sugardir)"
-sugarPYTHON_INSTALL = $(INSTALL_DATA)
-py_compile = $(top_srcdir)/py-compile
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
- distclean-recursive maintainer-clean-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ALL_LINGUAS = @ALL_LINGUAS@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLLIBS = @INTLLIBS@
-INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
-INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
-INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
-INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
-INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
-INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
-INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
-INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
-INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
-INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
-INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
-INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
-INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
-INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
-MSGMERGE = @MSGMERGE@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-POFILES = @POFILES@
-POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
-PYTHON = @PYTHON@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_VERSION = @PYTHON_VERSION@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SHELL_CFLAGS = @SHELL_CFLAGS@
-SHELL_LIBS = @SHELL_LIBS@
-STRIP = @STRIP@
-SUCROSE_VERSION = @SUCROSE_VERSION@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-XGETTEXT = @XGETTEXT@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host_alias = @host_alias@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = network
-sugardir = $(pkgdatadir)/shell/model/devices
-sugar_PYTHON = \
- __init__.py \
- battery.py \
- device.py \
- devicesmodel.py \
- speaker.py
-
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/model/devices/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/model/devices/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-sugarPYTHON: $(sugar_PYTHON)
- @$(NORMAL_INSTALL)
- test -z "$(sugardir)" || $(MKDIR_P) "$(DESTDIR)$(sugardir)"
- @list='$(sugar_PYTHON)'; dlist=''; for p in $$list; do\
- if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
- if test -f $$b$$p; then \
- f=$(am__strip_dir) \
- dlist="$$dlist $$f"; \
- echo " $(sugarPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(sugardir)/$$f'"; \
- $(sugarPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(sugardir)/$$f"; \
- else :; fi; \
- done; \
- if test -n "$$dlist"; then \
- if test -z "$(DESTDIR)"; then \
- PYTHON=$(PYTHON) $(py_compile) --basedir "$(sugardir)" $$dlist; \
- else \
- PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(sugardir)" $$dlist; \
- fi; \
- else :; fi
-
-uninstall-sugarPYTHON:
- @$(NORMAL_UNINSTALL)
- @list='$(sugar_PYTHON)'; dlist=''; for p in $$list; do\
- f=$(am__strip_dir) \
- rm -f "$(DESTDIR)$(sugardir)/$$f"; \
- rm -f "$(DESTDIR)$(sugardir)/$${f}c"; \
- rm -f "$(DESTDIR)$(sugardir)/$${f}o"; \
- done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- am__remove_distdir=: \
- am__skip_length_check=: \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
- for dir in "$(DESTDIR)$(sugardir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-sugarPYTHON
-
-install-dvi: install-dvi-recursive
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-info: install-info-recursive
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-ps: install-ps-recursive
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-sugarPYTHON
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
- install-strip
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip install-sugarPYTHON installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-sugarPYTHON
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/model/devices/battery.py b/src/model/devices/battery.py
deleted file mode 100644
index 7b52d4c..0000000
--- a/src/model/devices/battery.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright (C) 2006-2007, Red Hat, Inc.
-#
-# 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 logging
-
-import gobject
-import dbus
-
-from model.devices import device
-
-_LEVEL_PROP = 'battery.charge_level.percentage'
-_CHARGING_PROP = 'battery.rechargeable.is_charging'
-_DISCHARGING_PROP = 'battery.rechargeable.is_discharging'
-
-class Device(device.Device):
- __gproperties__ = {
- 'level' : (int, None, None, 0, 100, 0,
- gobject.PARAM_READABLE),
- 'charging' : (bool, None, None, False,
- gobject.PARAM_READABLE),
- 'discharging' : (bool, None, None, False,
- gobject.PARAM_READABLE)
- }
-
- def __init__(self, udi):
- device.Device.__init__(self, udi)
-
- bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
- proxy = bus.get_object('org.freedesktop.Hal', udi,
- follow_name_owner_changes=True)
- self._battery = dbus.Interface(proxy, 'org.freedesktop.Hal.Device')
- bus.add_signal_receiver(self._battery_changed,
- 'PropertyModified',
- 'org.freedesktop.Hal.Device',
- 'org.freedesktop.Hal',
- udi)
-
- self._level = self._get_level()
- self._charging = self._get_charging()
- self._discharging = self._get_discharging()
-
- def _get_level(self):
- try:
- return self._battery.GetProperty(_LEVEL_PROP)
- except dbus.DBusException:
- logging.error('Cannot access %s' % _LEVEL_PROP)
- return 0
-
- def _get_charging(self):
- try:
- return self._battery.GetProperty(_CHARGING_PROP)
- except dbus.DBusException:
- logging.error('Cannot access %s' % _CHARGING_PROP)
- return False
-
- def _get_discharging(self):
- try:
- return self._battery.GetProperty(_DISCHARGING_PROP)
- except dbus.DBusException:
- logging.error('Cannot access %s' % _DISCHARGING_PROP)
- return False
-
- def do_get_property(self, pspec):
- if pspec.name == 'level':
- return self._level
- if pspec.name == 'charging':
- return self._charging
- if pspec.name == 'discharging':
- return self._discharging
-
- def get_type(self):
- return 'battery'
-
- def _battery_changed(self, num_changes, changes_list):
- for change in changes_list:
- if change[0] == _LEVEL_PROP:
- self._level = self._get_level()
- self.notify('level')
- elif change[0] == _CHARGING_PROP:
- self._charging = self._get_charging()
- self.notify('charging')
- elif change[0] == _DISCHARGING_PROP:
- self._discharging = self._get_discharging()
- self.notify('discharging')
diff --git a/src/model/devices/device.py b/src/model/devices/device.py
deleted file mode 100644
index 3273da9..0000000
--- a/src/model/devices/device.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (C) 2007, Red Hat, Inc.
-#
-# 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 gobject
-from hardware import nmclient
-
-from sugar import util
-
-STATE_ACTIVATING = 0
-STATE_ACTIVATED = 1
-STATE_INACTIVE = 2
-
-nm_state_to_state = {
- nmclient.DEVICE_STATE_ACTIVATING : STATE_ACTIVATING,
- nmclient.DEVICE_STATE_ACTIVATED : STATE_ACTIVATED,
- nmclient.DEVICE_STATE_INACTIVE : STATE_INACTIVE
-}
-
-class Device(gobject.GObject):
- def __init__(self, device_id=None):
- gobject.GObject.__init__(self)
- if device_id:
- self._id = device_id
- else:
- self._id = util.unique_id()
-
- def get_type(self):
- return 'unknown'
-
- def get_id(self):
- return self._id
diff --git a/src/model/devices/devicesmodel.py b/src/model/devices/devicesmodel.py
deleted file mode 100644
index f328109..0000000
--- a/src/model/devices/devicesmodel.py
+++ /dev/null
@@ -1,144 +0,0 @@
-#
-# Copyright (C) 2007, Red Hat, Inc.
-#
-# 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 logging
-import gobject
-import dbus
-
-from model.devices import device
-from model.devices.network import wireless
-from model.devices.network import mesh
-from model.devices import battery
-from model.devices import speaker
-from hardware import hardwaremanager
-from hardware import nmclient
-
-class DevicesModel(gobject.GObject):
- __gsignals__ = {
- 'device-appeared' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'device-disappeared': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
- }
-
- def __init__(self):
- gobject.GObject.__init__(self)
-
- self._devices = {}
- self._sigids = {}
-
- self._observe_hal_manager()
- self._observe_network_manager()
-
- try:
- self.add_device(speaker.Device())
- except Exception, speaker_fail_msg:
- logging.error("could not initialize speaker device: %s" %
- speaker_fail_msg)
-
- def _observe_hal_manager(self):
- bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
- proxy = bus.get_object('org.freedesktop.Hal',
- '/org/freedesktop/Hal/Manager')
- hal_manager = dbus.Interface(proxy, 'org.freedesktop.Hal.Manager')
-
- for udi in hal_manager.FindDeviceByCapability('battery'):
- self.add_device(battery.Device(udi))
-
- def _observe_network_manager(self):
- network_manager = hardwaremanager.get_network_manager()
- if not network_manager:
- return
-
- for dev in network_manager.get_devices():
- self._check_network_device(dev)
-
- network_manager.connect('device-added',
- self._network_device_added_cb)
- network_manager.connect('device-activating',
- self._network_device_activating_cb)
- network_manager.connect('device-activated',
- self._network_device_activated_cb)
- network_manager.connect('device-removed',
- self._network_device_removed_cb)
-
- def _network_device_added_cb(self, network_manager, nm_device):
- state = nm_device.get_state()
- if state == nmclient.DEVICE_STATE_ACTIVATING \
- or state == nmclient.DEVICE_STATE_ACTIVATED:
- self._check_network_device(nm_device)
-
- def _network_device_activating_cb(self, network_manager, nm_device):
- self._check_network_device(nm_device)
-
- def _network_device_activated_cb(self, network_manager, nm_device):
- pass
-
- def _network_device_removed_cb(self, network_manager, nm_device):
- if self._devices.has_key(str(nm_device.get_op())):
- self.remove_device(self._get_network_device(nm_device))
-
- def _check_network_device(self, nm_device):
- if not nm_device.is_valid():
- logging.debug("Device %s not valid" % nm_device.get_op())
- return
-
- dtype = nm_device.get_type()
- if dtype == nmclient.DEVICE_TYPE_802_11_WIRELESS \
- or dtype == nmclient.DEVICE_TYPE_802_11_MESH_OLPC:
- self._add_network_device(nm_device)
-
- def _get_network_device(self, nm_device):
- return self._devices[str(nm_device.get_op())]
-
- def _network_device_state_changed_cb(self, dev, param):
- if dev.props.state == device.STATE_INACTIVE:
- self.remove_device(dev)
-
- def _add_network_device(self, nm_device):
- if self._devices.has_key(str(nm_device.get_op())):
- logging.debug("Tried to add device %s twice" % nm_device.get_op())
- return
-
- dtype = nm_device.get_type()
- if dtype == nmclient.DEVICE_TYPE_802_11_WIRELESS:
- dev = wireless.Device(nm_device)
- self.add_device(dev)
- sigid = dev.connect('notify::state',
- self._network_device_state_changed_cb)
- self._sigids[dev] = sigid
- if dtype == nmclient.DEVICE_TYPE_802_11_MESH_OLPC:
- dev = mesh.Device(nm_device)
- self.add_device(dev)
- sigid = dev.connect('notify::state',
- self._network_device_state_changed_cb)
- self._sigids[dev] = sigid
-
- def __iter__(self):
- return iter(self._devices.values())
-
- def add_device(self, dev):
- self._devices[dev.get_id()] = dev
- self.emit('device-appeared', dev)
-
- def remove_device(self, dev):
- self.emit('device-disappeared', self._devices[dev.get_id()])
- dev.disconnect(self._sigids[dev])
- del self._sigids[dev]
- del self._devices[dev.get_id()]
diff --git a/src/model/devices/network/Makefile.am b/src/model/devices/network/Makefile.am
deleted file mode 100644
index 04074e5..0000000
--- a/src/model/devices/network/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-sugardir = $(pkgdatadir)/shell/model/devices/network
-sugar_PYTHON = \
- __init__.py \
- mesh.py \
- wired.py \
- wireless.py
diff --git a/src/model/devices/network/__init__.py b/src/model/devices/network/__init__.py
deleted file mode 100644
index a9dd95a..0000000
--- a/src/model/devices/network/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (C) 2006-2007, Red Hat, Inc.
-#
-# 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
-
diff --git a/src/model/devices/network/mesh.py b/src/model/devices/network/mesh.py
deleted file mode 100644
index ec2ca7b..0000000
--- a/src/model/devices/network/mesh.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 gobject
-
-from model.devices import device
-
-class Device(device.Device):
- __gproperties__ = {
- 'strength' : (int, None, None, 0, 100, 0,
- gobject.PARAM_READABLE),
- 'state' : (int, None, None, device.STATE_ACTIVATING,
- device.STATE_INACTIVE, 0, gobject.PARAM_READABLE),
- 'activation-stage': (int, None, None, 0, 7, 0, gobject.PARAM_READABLE),
- 'frequency': (float, None, None, 0, 2.72, 0, gobject.PARAM_READABLE),
- 'mesh-step': (int, None, None, 0, 4, 0, gobject.PARAM_READABLE),
- 'ip-address' : (str, None, None, None, gobject.PARAM_READABLE),
- }
-
- def __init__(self, nm_device):
- device.Device.__init__(self)
- self._nm_device = nm_device
- self._nm_device.connect('ip-changed', self._ip_changed_cb)
- self.notify('ip-address')
-
- self._nm_device.connect('strength-changed',
- self._strength_changed_cb)
- self._nm_device.connect('state-changed',
- self._state_changed_cb)
- self._nm_device.connect('activation-stage-changed',
- self._activation_stage_changed_cb)
-
- def _strength_changed_cb(self, nm_device):
- self.notify('strength')
-
- def _state_changed_cb(self, nm_device):
- self.notify('state')
-
- def _ip_changed_cb(self, nm_device):
- self.notify('ip-address')
-
- def _activation_stage_changed_cb(self, nm_device):
- self.notify('activation-stage')
-
- def do_get_property(self, pspec):
- if pspec.name == 'strength':
- return self._nm_device.get_strength()
- elif pspec.name == 'state':
- nm_state = self._nm_device.get_state()
- return device.nm_state_to_state[nm_state]
- elif pspec.name == 'activation-stage':
- return self._nm_device.get_activation_stage()
- elif pspec.name == 'frequency':
- return self._nm_device.get_frequency()
- elif pspec.name == 'mesh-step':
- return self._nm_device.get_mesh_step()
- elif pspec.name == 'ip-address':
- return self.get_ip_address()
-
- def get_ip_address(self):
- if self._nm_device is not None:
- return self._nm_device.get_ip_address()
-
- def get_type(self):
- return 'network.mesh'
-
- def get_id(self):
- return str(self._nm_device.get_op())
-
- def get_nm_device(self):
- return self._nm_device
-
diff --git a/src/model/devices/network/wired.py b/src/model/devices/network/wired.py
deleted file mode 100644
index aa0ba00..0000000
--- a/src/model/devices/network/wired.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2006-2007, Red Hat, Inc.
-#
-# 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 model.devices import device
-
-class Device(device.Device):
- def __init__(self, nm_device):
- device.Device.__init__(self)
- self._nm_device = nm_device
-
- def get_id(self):
- return str(self._nm_device.get_op())
-
- def get_type(self):
- return 'network.wired'
diff --git a/src/model/devices/network/wireless.py b/src/model/devices/network/wireless.py
deleted file mode 100644
index b2efb49..0000000
--- a/src/model/devices/network/wireless.py
+++ /dev/null
@@ -1,102 +0,0 @@
-#
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 gobject
-
-from model.devices import device
-
-def freq_to_channel(freq):
- ftoc = { 2.412: 1, 2.417: 2, 2.422: 3, 2.427: 4,
- 2.432: 5, 2.437: 6, 2.442: 7, 2.447: 8,
- 2.452: 9, 2.457: 10, 2.462: 11, 2.467: 12,
- 2.472: 13
- }
- return ftoc[freq]
-
-def channel_to_freq(channel):
- ctof = { 1: 2.412, 2: 2.417, 3: 2.422, 4: 2.427,
- 5: 2.432, 6: 2.437, 7: 2.442, 8: 2.447,
- 9: 2.452, 10: 2.457, 11: 2.462, 12: 2.467,
- 13: 2.472
- }
- return ctof[channel]
-
-class Device(device.Device):
- __gproperties__ = {
- 'name' : (str, None, None, None,
- gobject.PARAM_READABLE),
- 'strength' : (int, None, None, 0, 100, 0,
- gobject.PARAM_READABLE),
- 'state' : (int, None, None, device.STATE_ACTIVATING,
- device.STATE_INACTIVE, 0, gobject.PARAM_READABLE),
- 'frequency': (float, None, None, 0.0, 9999.99, 0.0,
- gobject.PARAM_READABLE),
- 'ip-address' : (str, None, None, None, gobject.PARAM_READABLE),
- }
-
- def __init__(self, nm_device):
- device.Device.__init__(self)
- self._nm_device = nm_device
-
- self._nm_device.connect('strength-changed',
- self._strength_changed_cb)
- self._nm_device.connect('ssid-changed',
- self._ssid_changed_cb)
- self._nm_device.connect('state-changed',
- self._state_changed_cb)
- self._nm_device.connect('ip-changed', self._ip_changed_cb)
-
- def _strength_changed_cb(self, nm_device):
- self.notify('strength')
-
- def _ssid_changed_cb(self, nm_device):
- self.notify('name')
-
- def _state_changed_cb(self, nm_device):
- self.notify('state')
-
- def _ip_changed_cb(self, nm_device):
- self.notify('ip-address')
-
- def do_get_property(self, pspec):
- if pspec.name == 'strength':
- return self._nm_device.get_strength()
- elif pspec.name == 'name':
- import logging
- logging.debug('wireless.Device.props.name: %s' %
- self._nm_device.get_ssid())
- return self._nm_device.get_ssid()
- elif pspec.name == 'state':
- nm_state = self._nm_device.get_state()
- return device.nm_state_to_state[nm_state]
- elif pspec.name == 'frequency':
- return self._nm_device.get_frequency()
- elif pspec.name == 'ip-address':
- return self._nm_device.get_ip_address()
-
- def get_type(self):
- return 'network.wireless'
-
- def get_id(self):
- return str(self._nm_device.get_op())
-
- def get_active_network_colors(self):
- net = self._nm_device.get_active_network()
- if not net:
- return (None, None)
- return net.get_colors()
-
diff --git a/src/model/devices/speaker.py b/src/model/devices/speaker.py
deleted file mode 100644
index c2a3a18..0000000
--- a/src/model/devices/speaker.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright (C) 2008 Martin Dengler
-#
-# 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 gobject
-
-from hardware import hardwaremanager
-from model.devices import device
-
-class Device(device.Device):
- __gproperties__ = {
- 'level' : (int, None, None, 0, 100, 0, gobject.PARAM_READWRITE),
- 'muted' : (bool, None, None, False, gobject.PARAM_READWRITE),
- }
-
- def __init__(self):
- device.Device.__init__(self)
- self._manager = hardwaremanager.get_manager()
- self._manager.connect('muted-changed', self.__muted_changed_cb)
- self._manager.connect('volume-changed', self.__volume_changed_cb)
-
- def __muted_changed_cb(self, sender_, old_state_, new_state_):
- self.notify('muted')
-
- def __volume_changed_cb(self, sender_, old_volume_, new_volume_):
- self.notify('level')
-
- def _get_level(self):
- return self._manager.get_volume()
-
- def _set_level(self, new_volume):
- self._manager.set_volume(new_volume)
-
- def _get_muted(self):
- return self._manager.get_muted()
-
- def _set_muted(self, mute):
- self._manager.set_muted(mute)
-
- def get_type(self):
- return 'speaker'
-
- def do_get_property(self, pspec):
- if pspec.name == "level":
- return self._get_level()
- elif pspec.name == "muted":
- return self._get_muted()
-
- def do_set_property(self, pspec, value):
- if pspec.name == "level":
- self._set_level(value)
- elif pspec.name == "muted":
- self._set_muted(value)
diff --git a/src/model/homeactivity.py b/src/model/homeactivity.py
deleted file mode 100644
index 6df4ddd..0000000
--- a/src/model/homeactivity.py
+++ /dev/null
@@ -1,240 +0,0 @@
-# Copyright (C) 2006-2007 Owen Williams.
-#
-# 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 time
-import logging
-
-import gobject
-import dbus
-
-from sugar.graphics.xocolor import XoColor
-from sugar.presence import presenceservice
-from sugar import profile
-
-_SERVICE_NAME = "org.laptop.Activity"
-_SERVICE_PATH = "/org/laptop/Activity"
-_SERVICE_INTERFACE = "org.laptop.Activity"
-
-class HomeActivity(gobject.GObject):
- """Activity which appears in the "Home View" of the Sugar shell
-
- This class stores the Sugar Shell's metadata regarding a
- given activity/application in the system. It interacts with
- the sugar.activity.* modules extensively in order to
- accomplish its tasks.
- """
-
- __gtype_name__ = 'SugarHomeActivity'
-
- __gproperties__ = {
- 'launching' : (bool, None, None, False,
- gobject.PARAM_READWRITE),
- }
-
- def __init__(self, activity_info, activity_id):
- """Initialise the HomeActivity
-
- activity_info -- sugar.activity.registry.ActivityInfo instance,
- provides the information required to actually
- create the new instance. This is, in effect,
- the "type" of activity being created.
- activity_id -- unique identifier for this instance
- of the activity type
- """
- gobject.GObject.__init__(self)
-
- self._window = None
- self._xid = None
- self._pid = None
- self._service = None
- self._activity_id = activity_id
- self._activity_info = activity_info
- self._launch_time = time.time()
- self._launching = False
-
- self._retrieve_service()
-
- self._name_owner_changed_handler = None
- if not self._service:
- bus = dbus.SessionBus()
- self._name_owner_changed_handler = bus.add_signal_receiver(
- self._name_owner_changed_cb,
- signal_name="NameOwnerChanged",
- dbus_interface="org.freedesktop.DBus")
-
- def set_window(self, window):
- """Set the window for the activity
-
- We allow resetting the window for an activity so that we
- can replace the launcher once we get its real window.
- """
- if not window:
- raise ValueError("window must be valid")
-
- self._window = window
- self._xid = window.get_xid()
- self._pid = window.get_pid()
-
- def get_service(self):
- """Get the activity service
-
- Note that non-native Sugar applications will not have
- such a service, so the return value will be None in
- those cases.
- """
-
- return self._service
-
- def get_title(self):
- """Retrieve the application's root window's suggested title"""
- if self._window:
- return self._window.get_name()
- else:
- return ''
-
- def get_icon_path(self):
- """Retrieve the activity's icon (file) name"""
- if self._activity_info:
- return self._activity_info.icon
- else:
- return None
-
- def get_icon_color(self):
- """Retrieve the appropriate icon colour for this activity
-
- Uses activity_id to index into the PresenceService's
- set of activity colours, if the PresenceService does not
- have an entry (implying that this is not a Sugar-shared application)
- uses the local user's profile.get_color() to determine the
- colour for the icon.
- """
- pservice = presenceservice.get_instance()
-
- # HACK to suppress warning in logs when activity isn't found
- # (if it's locally launched and not shared yet)
- activity = None
- for act in pservice.get_activities():
- if self._activity_id == act.props.id:
- activity = act
- break
-
- if activity != None:
- return XoColor(activity.props.color)
- else:
- return profile.get_color()
-
- def get_activity_id(self):
- """Retrieve the "activity_id" passed in to our constructor
-
- This is a "globally likely unique" identifier generated by
- sugar.util.unique_id
- """
- return self._activity_id
-
- def get_xid(self):
- """Retrieve the X-windows ID of our root window"""
- return self._xid
-
- def get_window(self):
- """Retrieve the X-windows root window of this application
-
- This was stored by the set_window method, which was
- called by HomeModel._add_activity, which was called
- via a callback that looks for all 'window-opened'
- events.
-
- HomeModel currently uses a dbus service query on the
- activity to determine to which HomeActivity the newly
- launched window belongs.
- """
- return self._window
-
- def get_type(self):
- """Retrieve the activity bundle id for future reference"""
- if self._activity_info:
- return self._activity_info.bundle_id
- else:
- return None
-
- def is_journal(self):
- """Returns boolean if the activity is of type JournalActivity"""
- return self.get_type() == 'org.laptop.JournalActivity'
-
- def get_launch_time(self):
- """Return the time at which the activity was first launched
-
- Format is floating-point time.time() value
- (seconds since the epoch)
- """
- return self._launch_time
-
- def get_pid(self):
- """Returns the activity's PID"""
- return self._pid
-
- def equals(self, activity):
- if self._activity_id and activity.get_activity_id():
- return self._activity_id == activity.get_activity_id()
- if self._xid and activity.get_xid():
- return self._xid == activity.get_xid()
- return False
-
- def do_set_property(self, pspec, value):
- if pspec.name == 'launching':
- self._launching = value
-
- def do_get_property(self, pspec):
- if pspec.name == 'launching':
- return self._launching
-
- def _get_service_name(self):
- if self._activity_id:
- return _SERVICE_NAME + self._activity_id
- else:
- return None
-
- def _retrieve_service(self):
- if not self._activity_id:
- return
-
- try:
- bus = dbus.SessionBus()
- proxy = bus.get_object(self._get_service_name(),
- _SERVICE_PATH + "/" + self._activity_id)
- self._service = dbus.Interface(proxy, _SERVICE_INTERFACE)
- except dbus.DBusException:
- self._service = None
-
- def _name_owner_changed_cb(self, name, old, new):
- if name == self._get_service_name():
- self._retrieve_service()
- self.set_active(True)
- self._name_owner_changed_handler.remove()
- self._name_owner_changed_handler = None
-
- def set_active(self, state):
- """Propagate the current state to the activity object"""
- if self._service is not None:
- self._service.SetActive(state,
- reply_handler=self._set_active_success,
- error_handler=self._set_active_error)
-
- def _set_active_success(self):
- pass
-
- def _set_active_error(self, err):
- logging.error("set_active() failed: %s" % err)
-
diff --git a/src/model/homemodel.py b/src/model/homemodel.py
deleted file mode 100644
index aab99c0..0000000
--- a/src/model/homemodel.py
+++ /dev/null
@@ -1,286 +0,0 @@
-# Copyright (C) 2006-2007 Owen Williams.
-#
-# 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 logging
-
-import gobject
-import wnck
-import gtk
-
-from sugar import wm
-from sugar import activity
-
-from model.homeactivity import HomeActivity
-
-def _get_sugar_window_type(wnck_window):
- window = gtk.gdk.window_foreign_new(wnck_window.get_xid())
- prop_info = window.property_get('_SUGAR_WINDOW_TYPE', 'STRING')
- if prop_info is None:
- return None
- else:
- return prop_info[2]
-
-class HomeModel(gobject.GObject):
- """Model of the "Home" view (activity management)
-
- The HomeModel is basically the point of registration
- for all running activities within Sugar. It traps
- events that tell the system there is a new activity
- being created (generated by the activity factories),
- or removed, as well as those which tell us that the
- currently focussed activity has changed.
-
- The HomeModel tracks a set of HomeActivity instances,
- which are tracking the window to activity mappings
- the activity factories have set up.
- """
- __gsignals__ = {
- 'activity-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'activity-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'active-activity-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'tabbing-activity-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'launch-started': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'launch-completed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'launch-failed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
- }
-
- def __init__(self):
- gobject.GObject.__init__(self)
-
- self._activities = []
- self._active_activity = None
- self._tabbing_activity = None
-
- screen = wnck.screen_get_default()
- screen.connect('window-opened', self._window_opened_cb)
- screen.connect('window-closed', self._window_closed_cb)
- screen.connect('active-window-changed',
- self._active_window_changed_cb)
-
- def _get_activities_with_window(self):
- ret = []
- for i in self._activities:
- if i.get_window() is not None:
- ret.append(i)
- return ret
-
- def get_previous_activity(self, current=None):
- if not current:
- current = self._active_activity
-
- activities = self._get_activities_with_window()
- i = activities.index(current)
- if len(activities) == 0:
- return None
- elif i - 1 >= 0:
- return activities[i - 1]
- else:
- return activities[len(activities) - 1]
-
- def get_next_activity(self, current=None):
- if not current:
- current = self._active_activity
-
- activities = self._get_activities_with_window()
- i = activities.index(current)
- if len(activities) == 0:
- return None
- elif i + 1 < len(activities):
- return activities[i + 1]
- else:
- return activities[0]
-
- def get_active_activity(self):
- """Returns the activity that the user is currently working in"""
- return self._active_activity
-
- def get_tabbing_activity(self):
- """Returns the activity that is currently highlighted during tabbing"""
- return self._tabbing_activity
-
- def set_tabbing_activity(self, activity):
- """Sets the activity that is currently highlighted during tabbing"""
- self._tabbing_activity = activity
- self.emit("tabbing-activity-changed", self._tabbing_activity)
-
- def _set_active_activity(self, home_activity):
- if self._active_activity == home_activity:
- return
-
- if home_activity:
- home_activity.set_active(True)
-
- if self._active_activity:
- self._active_activity.set_active(False)
-
- self._active_activity = home_activity
- self.emit('active-activity-changed', self._active_activity)
-
- def __iter__(self):
- return iter(self._activities)
-
- def __len__(self):
- return len(self._activities)
-
- def __getitem__(self, i):
- return self._activities[i]
-
- def index(self, obj):
- return self._activities.index(obj)
-
- def _window_opened_cb(self, screen, window):
- if window.get_window_type() == wnck.WINDOW_NORMAL:
- home_activity = None
-
- activity_id = wm.get_activity_id(window)
-
- service_name = wm.get_bundle_id(window)
- if service_name:
- registry = activity.get_registry()
- activity_info = registry.get_activity(service_name)
- else:
- activity_info = None
-
- if activity_id:
- home_activity = self._get_activity_by_id(activity_id)
-
- if not home_activity:
- home_activity = HomeActivity(activity_info, activity_id)
- self._add_activity(home_activity)
-
- home_activity.set_window(window)
-
- if _get_sugar_window_type(window) != 'launcher':
- home_activity.props.launching = False
- self.emit('launch-completed', home_activity)
-
- if self._active_activity is None:
- self._set_active_activity(home_activity)
-
- def _window_closed_cb(self, screen, window):
- if window.get_window_type() == wnck.WINDOW_NORMAL:
- self._remove_activity_by_xid(window.get_xid())
-
- def _get_activity_by_xid(self, xid):
- for home_activity in self._activities:
- if home_activity.get_xid() == xid:
- return home_activity
- return None
-
- def _get_activity_by_id(self, activity_id):
- for home_activity in self._activities:
- if home_activity.get_activity_id() == activity_id:
- return home_activity
- return None
-
- def _active_window_changed_cb(self, screen, previous_window=None):
- window = screen.get_active_window()
- if window is None:
- return
-
- if window.get_window_type() != wnck.WINDOW_DIALOG:
- while window.get_transient() is not None:
- window = window.get_transient()
-
- act = self._get_activity_by_xid(window.get_xid())
- if act is not None:
- self._set_active_activity(act)
-
- def _add_activity(self, home_activity):
- self._activities.append(home_activity)
- self.emit('activity-added', home_activity)
-
- def _remove_activity(self, home_activity):
- if home_activity == self._active_activity:
- windows = wnck.screen_get_default().get_windows_stacked()
- windows.reverse()
- for window in windows:
- new_activity = self._get_activity_by_xid(window.get_xid())
- if new_activity is not None:
- self._set_active_activity(new_activity)
- break
- else:
- logging.error('No activities are running')
- self._set_active_activity(None)
-
- self.emit('activity-removed', home_activity)
- self._activities.remove(home_activity)
-
- def _remove_activity_by_xid(self, xid):
- home_activity = self._get_activity_by_xid(xid)
- if home_activity:
- self._remove_activity(home_activity)
- else:
- logging.error('Model for window %d does not exist.' % xid)
-
- def notify_launch(self, activity_id, service_name):
- registry = activity.get_registry()
- activity_info = registry.get_activity(service_name)
- if not activity_info:
- raise ValueError("Activity service name '%s'" \
- " was not found in the bundle registry."
- % service_name)
- home_activity = HomeActivity(activity_info, activity_id)
- home_activity.props.launching = True
- self._add_activity(home_activity)
-
- self._set_active_activity(home_activity)
-
- self.emit('launch-started', home_activity)
-
- # FIXME: better learn about finishing processes by receiving a signal.
- # Now just check whether an activity has a window after ~90sec
- gobject.timeout_add(90000, self._check_activity_launched, activity_id)
-
- def notify_launch_failed(self, activity_id):
- home_activity = self._get_activity_by_id(activity_id)
- if home_activity:
- logging.debug("Activity %s (%s) launch failed" % \
- (activity_id, home_activity.get_type()))
- home_activity.props.launching = False
- self._remove_activity(home_activity)
- else:
- logging.error('Model for activity id %s does not exist.'
- % activity_id)
-
- self.emit('launch-failed', home_activity)
-
- def _check_activity_launched(self, activity_id):
- home_activity = self._get_activity_by_id(activity_id)
-
- if not home_activity:
- logging.debug('Activity %s has been closed already.' % activity_id)
- return False
-
- if home_activity.props.launching:
- logging.debug('Activity %s still launching, assuming it failed...'
- % activity_id)
- self.notify_launch_failed(activity_id)
- return False
diff --git a/src/model/shellmodel.py b/src/model/shellmodel.py
deleted file mode 100644
index d1d8db8..0000000
--- a/src/model/shellmodel.py
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 wnck
-import gobject
-
-from sugar.presence import presenceservice
-from model.Friends import Friends
-from model.MeshModel import MeshModel
-from model.homemodel import HomeModel
-from model.Owner import ShellOwner
-from model.devices.devicesmodel import DevicesModel
-
-class ShellModel(gobject.GObject):
- ZOOM_MESH = 0
- ZOOM_FRIENDS = 1
- ZOOM_HOME = 2
- ZOOM_ACTIVITY = 3
-
- __gproperties__ = {
- 'zoom-level' : (int, None, None,
- 0, 3, ZOOM_HOME,
- gobject.PARAM_READABLE)
- }
-
- def __init__(self):
- gobject.GObject.__init__(self)
-
- self._current_activity = None
- self._zoom_level = self.ZOOM_HOME
- self._showing_desktop = True
-
- self._pservice = presenceservice.get_instance()
-
- self._owner = ShellOwner()
-
- self._friends = Friends()
- self._mesh = MeshModel()
- self._home = HomeModel()
- self._devices = DevicesModel()
-
- self._screen = wnck.screen_get_default()
- self._screen.connect('showing-desktop-changed',
- self._showing_desktop_changed_cb)
-
- def set_zoom_level(self, level):
- self._zoom_level = level
- self.notify('zoom-level')
-
- def get_zoom_level(self):
- if self._screen.get_showing_desktop():
- return self._zoom_level
- else:
- return self.ZOOM_ACTIVITY
-
- def do_get_property(self, pspec):
- if pspec.name == 'zoom-level':
- return self.get_zoom_level()
-
- def get_mesh(self):
- return self._mesh
-
- def get_friends(self):
- return self._friends
-
- def get_invites(self):
- return self._owner.get_invites()
-
- def get_home(self):
- return self._home
-
- def get_owner(self):
- return self._owner
-
- def get_devices(self):
- return self._devices
-
- def _showing_desktop_changed_cb(self, screen):
- showing_desktop = self._screen.get_showing_desktop()
- if self._showing_desktop != showing_desktop:
- self._showing_desktop = showing_desktop
- self.notify('zoom-level')
-
-_instance = None
-
-def get_instance():
- global _instance
- if not _instance:
- _instance = ShellModel()
- return _instance
-
diff --git a/src/view/ActivityHost.py b/src/view/ActivityHost.py
deleted file mode 100644
index 9f37c96..0000000
--- a/src/view/ActivityHost.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 logging
-
-import OverlayWindow
-
-class ActivityHost:
- def __init__(self, model):
- self._model = model
- self._window = model.get_window()
- self._gdk_window = gtk.gdk.window_foreign_new(self.get_xid())
-
- try:
- self._overlay_window = OverlayWindow.OverlayWindow(self._gdk_window)
- except RuntimeError:
- self._overlay_window = None
-
- def get_id(self):
- return self._model.get_activity_id()
-
- def get_xid(self):
- return self._window.get_xid()
-
- def get_model(self):
- return self._model
-
- def invite(self, buddy_model):
- service = self._model.get_service()
- if service:
- buddy = buddy_model.get_buddy()
- service.Invite(buddy.props.key)
- else:
- logging.error('Invite failed, activity service not ')
-
- def toggle_fullscreen(self):
- fullscreen = not self._window.is_fullscreen()
- self._window.set_fullscreen(fullscreen)
-
- def present(self):
- self._window.activate(gtk.get_current_event_time())
-
- def close(self):
- # The "1" is a fake timestamp as with present()
- self._window.close(1)
-
- def show_dialog(self, dialog):
- dialog.show()
- dialog.window.set_transient_for(self._gdk_window)
diff --git a/src/view/Makefile.am b/src/view/Makefile.am
deleted file mode 100644
index d905b7a..0000000
--- a/src/view/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-SUBDIRS = devices frame home
-
-sugardir = $(pkgdatadir)/shell/view
-sugar_PYTHON = \
- __init__.py \
- ActivityHost.py \
- BuddyIcon.py \
- BuddyMenu.py \
- clipboardicon.py \
- clipboardmenu.py \
- keyhandler.py \
- launchwindow.py \
- pulsingicon.py \
- tabbinghandler.py \
- OverlayWindow.py \
- palettes.py \
- Shell.py
diff --git a/src/view/OverlayWindow.py b/src/view/OverlayWindow.py
deleted file mode 100644
index 15bcb49..0000000
--- a/src/view/OverlayWindow.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 cairo
-
-def _grab_pixbuf(window=None):
- if not window:
- screen = gtk.gdk.screen_get_default()
- window = screen.get_root_window()
- color_map = gtk.gdk.colormap_get_system()
- (x, y, w, h, bpp_) = window.get_geometry()
- return gtk.gdk.pixbuf_get_from_drawable(None, window, color_map,
- x, y, 0, 0, w, h)
-
-class OverlayWindow(gtk.Window):
- def __init__(self, lower_window):
- gtk.Window.__init__(self)
- self._lower_window = lower_window
-
- self._img = gtk.Image()
- self.add(self._img)
-
- self.realize()
-
- self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
- self.window.set_accept_focus(False)
- self.window.set_transient_for(lower_window)
-
- self.set_decorated(False)
- self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
- self.set_default_size(gtk.gdk.screen_width(), gtk.gdk.screen_height())
- self.set_app_paintable(True)
-
- # self.connect('expose-event', self._expose_cb)
-
- def appear(self):
- pbuf = _grab_pixbuf(self._lower_window)
- #pbuf.saturate_and_pixelate(pbuf, 0.5, False)
- w = pbuf.get_width()
- h = pbuf.get_height()
- pbuf2 = pbuf.composite_color_simple(w, h, gtk.gdk.INTERP_NEAREST,
- 100, 1024, 0, 0)
- self._img.set_from_pixbuf(pbuf2)
- self.show_all()
-
- def disappear(self):
- self._img.set_from_pixbuf(None)
- self.hide()
-
- def _expose_cb(self, widget, event):
- cr = widget.window.cairo_create()
- cr.set_source_rgba(0.0, 0.0, 0.0, 0.4) # Transparent
- cr.set_operator(cairo.OPERATOR_SOURCE)
- cr.paint()
- return False
-
diff --git a/src/view/Shell.py b/src/view/Shell.py
deleted file mode 100644
index 41778d0..0000000
--- a/src/view/Shell.py
+++ /dev/null
@@ -1,272 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 sets import Set
-import logging
-import tempfile
-import os
-import time
-import shutil
-
-import gobject
-import gtk
-import wnck
-import dbus
-
-from sugar.activity.activityhandle import ActivityHandle
-from sugar import activity
-from sugar.activity import activityfactory
-from sugar.datastore import datastore
-from sugar import profile
-from sugar import env
-
-from view.ActivityHost import ActivityHost
-from view.frame import frame
-from view.keyhandler import KeyHandler
-from view.home.HomeWindow import HomeWindow
-from view.launchwindow import LaunchWindow
-from model import shellmodel
-
-# #3903 - this constant can be removed and assumed to be 1 when dbus-python
-# 0.82.3 is the only version used
-if dbus.version >= (0, 82, 3):
- DBUS_PYTHON_TIMEOUT_UNITS_PER_SECOND = 1
-else:
- DBUS_PYTHON_TIMEOUT_UNITS_PER_SECOND = 1000
-
-class Shell(gobject.GObject):
- def __init__(self):
- gobject.GObject.__init__(self)
-
- self._model = shellmodel.get_instance()
- self._hosts = {}
- self._launchers = {}
- self._screen = wnck.screen_get_default()
- self._screen_rotation = 0
-
- self._key_handler = KeyHandler()
-
- self._frame = frame.get_instance()
-
- self.home_window = HomeWindow()
- self.home_window.show()
-
- home_model = self._model.get_home()
- home_model.connect('launch-started', self.__launch_started_cb)
- home_model.connect('launch-failed', self.__launch_failed_cb)
- home_model.connect('launch-completed', self.__launch_completed_cb)
- home_model.connect('activity-removed', self._activity_removed_cb)
-
- gobject.idle_add(self._start_journal_idle)
-
- def _start_journal_idle(self):
- # Mount the datastore in internal flash
- ds_path = env.get_profile_path('datastore')
- try:
- datastore.mount(ds_path, [], timeout=120 * \
- DBUS_PYTHON_TIMEOUT_UNITS_PER_SECOND)
- except Exception:
- # Don't explode if there's corruption; move the data out of the way
- # and attempt to create a store from scratch.
- shutil.move(ds_path, os.path.abspath(ds_path) + str(time.time()))
- datastore.mount(ds_path, [], timeout=120 * \
- DBUS_PYTHON_TIMEOUT_UNITS_PER_SECOND)
-
- # Checking for the bundle existence will also ensure
- # that the shell service is started up.
- registry = activity.get_registry()
- if registry.get_activity('org.laptop.JournalActivity'):
- self.start_activity('org.laptop.JournalActivity')
-
- def __launch_started_cb(self, home_model, home_activity):
- if home_activity.is_journal():
- return
-
- launch_window = LaunchWindow(home_activity)
- launch_window.show()
-
- self._launchers[home_activity.get_activity_id()] = launch_window
- self._model.set_zoom_level(shellmodel.ShellModel.ZOOM_ACTIVITY)
-
- def __launch_failed_cb(self, home_model, home_activity):
- if not home_activity.is_journal():
- self._destroy_launcher(home_activity)
-
- def __launch_completed_cb(self, home_model, home_activity):
- activity_host = ActivityHost(home_activity)
- self._hosts[activity_host.get_xid()] = activity_host
-
- if not home_activity.is_journal():
- self._destroy_launcher(home_activity)
-
- def _destroy_launcher(self, home_activity):
- activity_id = home_activity.get_activity_id()
-
- if activity_id in self._launchers:
- self._launchers[activity_id].destroy()
- del self._launchers[activity_id]
- else:
- logging.error('Launcher for %s is missing' % activity_id)
-
- def _activity_removed_cb(self, home_model, home_activity):
- xid = home_activity.get_xid()
- if self._hosts.has_key(xid):
- del self._hosts[xid]
-
- def _get_host_from_activity_model(self, activity_model):
- host = None
- if activity_model is not None:
- xid = activity_model.get_xid()
- if xid:
- host = self._hosts[activity_model.get_xid()]
- return host
-
- def get_model(self):
- return self._model
-
- def get_frame(self):
- return self._frame
-
- def join_activity(self, bundle_id, activity_id):
- activity_host = self.get_activity(activity_id)
- if activity_host:
- activity_host.present()
- return
-
- # Get the service name for this activity, if
- # we have a bundle on the system capable of handling
- # this activity type
- registry = activity.get_registry()
- bundle = registry.get_activity(bundle_id)
- if not bundle:
- logging.error("Couldn't find activity for type %s" % bundle_id)
- return
-
- handle = ActivityHandle(activity_id)
- activityfactory.create(bundle_id, handle)
-
- def start_activity(self, activity_type):
- activityfactory.create(activity_type)
-
- def start_activity_with_uri(self, activity_type, uri):
- activityfactory.create_with_uri(activity_type, uri)
-
- def take_activity_screenshot(self):
- if self._model.get_zoom_level() != shellmodel.ShellModel.ZOOM_ACTIVITY:
- return
- if self.get_frame().visible:
- return
-
- home_model = self._model.get_home()
- active_activity = home_model.get_active_activity()
- if active_activity is not None:
- service = active_activity.get_service()
- if service is not None:
- try:
- service.TakeScreenshot(timeout=2.0)
- except dbus.DBusException, e:
- logging.debug('Error raised by TakeScreenshot(): %s', e)
-
- def set_zoom_level(self, level):
- if level == self._model.get_zoom_level():
- return
-
- if level == shellmodel.ShellModel.ZOOM_ACTIVITY:
- host = self.get_current_activity()
- if host is not None:
- host.present()
- else:
- self._model.set_zoom_level(level)
- self._screen.toggle_showing_desktop(True)
-
- def toggle_activity_fullscreen(self):
- if self._model.get_zoom_level() == shellmodel.ShellModel.ZOOM_ACTIVITY:
- self.get_current_activity().toggle_fullscreen()
-
- def activate_previous_activity(self):
- home_model = self._model.get_home()
- previous_activity = home_model.get_previous_activity()
- if previous_activity:
- previous_activity.get_window().activate(
- gtk.get_current_event_time())
-
- def activate_next_activity(self):
- home_model = self._model.get_home()
- next_activity = home_model.get_next_activity()
- if next_activity:
- next_activity.get_window().activate(gtk.get_current_event_time())
-
- def close_current_activity(self):
- if self._model.get_zoom_level() != shellmodel.ShellModel.ZOOM_ACTIVITY:
- return
-
- home_model = self._model.get_home()
- active_activity = home_model.get_active_activity()
- if active_activity.is_journal():
- return
-
- self.get_current_activity().close()
-
- def get_current_activity(self):
- home_model = self._model.get_home()
- active_activity = home_model.get_active_activity()
- return self._get_host_from_activity_model(active_activity)
-
- def get_activity(self, activity_id):
- for host in self._hosts.values():
- if host.get_id() == activity_id:
- return host
- return None
-
- def take_screenshot(self):
- file_path = os.path.join(tempfile.gettempdir(), '%i' % time.time())
-
- window = gtk.gdk.get_default_root_window()
- width, height = window.get_size()
- x_orig, y_orig = window.get_origin()
-
- screenshot = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, has_alpha=False,
- bits_per_sample=8, width=width,
- height=height)
- screenshot.get_from_drawable(window, window.get_colormap(), x_orig,
- y_orig, 0, 0, width, height)
- screenshot.save(file_path, "png")
- try:
- jobject = datastore.create()
- try:
- jobject.metadata['title'] = _('Screenshot')
- jobject.metadata['keep'] = '0'
- jobject.metadata['buddies'] = ''
- jobject.metadata['preview'] = ''
- jobject.metadata['icon-color'] = profile.get_color().to_string()
- jobject.metadata['mime_type'] = 'image/png'
- jobject.file_path = file_path
- datastore.write(jobject)
- finally:
- jobject.destroy()
- del jobject
- finally:
- os.remove(file_path)
-
-_instance = None
-
-def get_instance():
- global _instance
- if not _instance:
- _instance = Shell()
- return _instance
-
diff --git a/src/view/__init__.py b/src/view/__init__.py
deleted file mode 100644
index a9dd95a..0000000
--- a/src/view/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (C) 2006-2007, Red Hat, Inc.
-#
-# 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
-
diff --git a/src/view/devices/Makefile.am b/src/view/devices/Makefile.am
deleted file mode 100644
index 2b19443..0000000
--- a/src/view/devices/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-SUBDIRS = network
-
-sugardir = $(pkgdatadir)/shell/view/devices
-sugar_PYTHON = \
- __init__.py \
- battery.py \
- deviceview.py \
- speaker.py
-
diff --git a/src/view/devices/__init__.py b/src/view/devices/__init__.py
deleted file mode 100644
index a9dd95a..0000000
--- a/src/view/devices/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (C) 2006-2007, Red Hat, Inc.
-#
-# 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
-
diff --git a/src/view/devices/battery.py b/src/view/devices/battery.py
deleted file mode 100644
index 07fe09b..0000000
--- a/src/view/devices/battery.py
+++ /dev/null
@@ -1,130 +0,0 @@
-# Copyright (C) 2006-2007, Red Hat, Inc.
-#
-# 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 import profile
-from sugar.graphics import style
-from sugar.graphics.icon import get_icon_state
-from sugar.graphics.tray import TrayIcon
-from sugar.graphics.palette import Palette
-from sugar.graphics.xocolor import XoColor
-
-from view.frame.frameinvoker import FrameWidgetInvoker
-
-_ICON_NAME = 'battery'
-
-_STATUS_CHARGING = 0
-_STATUS_DISCHARGING = 1
-_STATUS_FULLY_CHARGED = 2
-
-class DeviceView(TrayIcon):
-
- FRAME_POSITION_RELATIVE = 1000
-
- def __init__(self, model):
- TrayIcon.__init__(self, icon_name=_ICON_NAME,
- xo_color=profile.get_color())
-
- self._model = model
- self.palette = BatteryPalette(_('My Battery'))
- self.set_palette(self.palette)
- self.palette.props.invoker = FrameWidgetInvoker(self)
- self.palette.set_group_id('frame')
-
- model.connect('notify::level', self._battery_status_changed_cb)
- model.connect('notify::charging', self._battery_status_changed_cb)
- model.connect('notify::discharging', self._battery_status_changed_cb)
- self._update_info()
-
- def _update_info(self):
- name = _ICON_NAME
- current_level = self._model.props.level
- xo_color = profile.get_color()
- badge_name = None
-
- if self._model.props.charging:
- status = _STATUS_CHARGING
- name += '-charging'
- xo_color = XoColor('%s,%s' % (style.COLOR_WHITE.get_svg(),
- style.COLOR_WHITE.get_svg()))
- elif self._model.props.discharging:
- status = _STATUS_DISCHARGING
- if current_level <= 15:
- badge_name = 'emblem-warning'
- else:
- status = _STATUS_FULLY_CHARGED
-
- self.icon.props.icon_name = get_icon_state(name, current_level, step=-5)
- self.icon.props.xo_color = xo_color
- self.icon.props.badge_name = badge_name
-
- self.palette.set_level(current_level)
- self.palette.set_status(status)
-
- def _battery_status_changed_cb(self, pspec, param):
- self._update_info()
-
-class BatteryPalette(Palette):
-
- def __init__(self, primary_text):
- Palette.__init__(self, primary_text)
-
- self._level = 0
- self._progress_bar = gtk.ProgressBar()
- self._progress_bar.set_size_request(
- style.zoom(style.GRID_CELL_SIZE * 4), -1)
- self._progress_bar.show()
- self._status_label = gtk.Label()
- self._status_label.show()
-
- vbox = gtk.VBox()
- vbox.pack_start(self._progress_bar)
- vbox.pack_start(self._status_label)
- vbox.show()
-
- self.set_content(vbox)
-
- def set_level(self, percent):
- self._level = percent
- fraction = percent / 100.0
- self._progress_bar.set_fraction(fraction)
-
- def set_status(self, status):
- current_level = self._level
- secondary_text = ''
- status_text = '%s%%' % current_level
-
- if status == _STATUS_CHARGING:
- secondary_text = _('Charging')
- elif status == _STATUS_DISCHARGING:
- if current_level <= 15:
- secondary_text = _('Very little power remaining')
- else:
- #TODO: make this less of an wild/educated guess
- minutes_remaining = int(current_level / 0.59)
- remaining_hourpart = minutes_remaining / 60
- remaining_minpart = minutes_remaining % 60
- secondary_text = _('%(hour)d:%(min).2d remaining'
- % { 'hour': remaining_hourpart,
- 'min': remaining_minpart})
- else:
- secondary_text = _('Charged')
-
- self.props.secondary_text = secondary_text
- self._status_label.set_text(status_text)
diff --git a/src/view/devices/network/Makefile.am b/src/view/devices/network/Makefile.am
deleted file mode 100644
index 0d215f0..0000000
--- a/src/view/devices/network/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-sugardir = $(pkgdatadir)/shell/view/devices/network
-sugar_PYTHON = \
- __init__.py \
- mesh.py \
- wired.py \
- wireless.py
diff --git a/src/view/devices/network/__init__.py b/src/view/devices/network/__init__.py
deleted file mode 100644
index a9dd95a..0000000
--- a/src/view/devices/network/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (C) 2006-2007, Red Hat, Inc.
-#
-# 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
-
diff --git a/src/view/devices/network/mesh.py b/src/view/devices/network/mesh.py
deleted file mode 100644
index 40746ce..0000000
--- a/src/view/devices/network/mesh.py
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-# Copyright (C) 2008 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 import profile
-from sugar.graphics import style
-from sugar.graphics.palette import Palette
-from sugar.graphics.toolbutton import ToolButton
-from sugar.graphics.xocolor import XoColor
-
-from model.devices import device
-from model.devices.network import wireless
-from hardware import hardwaremanager
-from view.devices.network.wireless import IP_ADDRESS_TEXT_TEMPLATE
-from view.frame.frameinvoker import FrameWidgetInvoker
-from view.pulsingicon import PulsingIcon
-
-class DeviceView(ToolButton):
-
- FRAME_POSITION_RELATIVE = 400
-
- def __init__(self, model):
- ToolButton.__init__(self)
-
- self._model = model
-
- self._icon = PulsingIcon()
- self._icon.props.icon_name = 'network-mesh'
- pulse_color = XoColor("%s,%s" % (style.COLOR_BUTTON_GREY.get_svg(),
- style.COLOR_TRANSPARENT.get_svg()))
- self._icon.props.pulse_color = pulse_color
- self._icon.props.base_color = pulse_color # only temporarily
-
- self.palette = MeshPalette(_("Mesh Network"), model)
- self.set_palette(self.palette)
- self.palette.props.invoker = FrameWidgetInvoker(self)
- self.palette.set_group_id('frame')
-
- model.connect('notify::state', self._state_changed_cb)
- model.connect('notify::activation-stage', self._state_changed_cb)
- model.connect('notify::ip-address', self._ip_address_changed_cb)
-
- self._update_state()
- self._update_ip_address()
- self.set_icon_widget(self._icon)
- self._icon.show()
-
- def _ip_address_changed_cb(self, model, pspec):
- self._update_ip_address()
-
- def _state_changed_cb(self, model, pspec):
- self._update_state()
-
- def _update_ip_address(self):
- self.palette.set_ip_address(self._model.props.ip_address)
-
- def _update_state(self):
- # FIXME Change icon colors once we have real icons
- state = self._model.props.state
- self.palette.update_state(state)
-
- self._icon.props.pulsing = state == device.STATE_ACTIVATING
- if state == device.STATE_ACTIVATING:
- self._icon.props.base_color = \
- XoColor("%s,%s" % (style.COLOR_INACTIVE_STROKE.get_svg(),
- style.COLOR_INACTIVE_FILL.get_svg()))
- elif state == device.STATE_ACTIVATED:
- self._icon.props.base_color = profile.get_color()
- elif state == device.STATE_INACTIVE:
- self._icon.props.base_color = \
- XoColor("%s,%s" % (style.COLOR_INACTIVE_STROKE.get_svg(),
- style.COLOR_INACTIVE_FILL.get_svg()))
-
- if state == device.STATE_INACTIVE:
- self.palette.set_primary_text(_("Mesh Network"))
- else:
- chan = wireless.freq_to_channel(self._model.props.frequency)
- if chan > 0:
- self.palette.set_primary_text(_("Mesh Network") + " %d" % chan)
- self.palette.set_mesh_step(self._model.props.mesh_step, state)
-
-class MeshPalette(Palette):
- def __init__(self, primary_text, model):
- Palette.__init__(self, primary_text, menu_after_content=True)
- self._model = model
-
- self._step_label = gtk.Label()
- self._step_label.show()
-
- self._ip_address_label = gtk.Label()
- def _padded(child, xalign=0, yalign=0.5):
- padder = gtk.Alignment(xalign=xalign, yalign=yalign,
- xscale=1, yscale=0.33)
- padder.set_padding(style.DEFAULT_SPACING,
- style.DEFAULT_SPACING,
- style.DEFAULT_SPACING,
- style.DEFAULT_SPACING)
- padder.add(child)
- return padder
-
- vbox = gtk.VBox()
- vbox.pack_start(_padded(self._step_label))
- vbox.pack_start(_padded(self._ip_address_label))
- vbox.show_all()
-
- self.set_content(vbox)
-
- self._disconnect_item = gtk.MenuItem(_('Disconnect...'))
- self._disconnect_item.connect('activate', self._disconnect_activate_cb)
- self.menu.append(self._disconnect_item)
-
- def update_state(self, state):
- if state == device.STATE_ACTIVATED:
- self._disconnect_item.show()
- else:
- self._disconnect_item.hide()
-
- def _disconnect_activate_cb(self, menuitem):
- # Disconnection for an mesh means activating the default mesh device
- # again without a channel
- network_manager = hardwaremanager.get_network_manager()
- nm_device = self._model.get_nm_device()
- if network_manager and nm_device:
- network_manager.set_active_device(nm_device)
-
- def set_ip_address(self, ip_address):
- if ip_address is not None and ip_address != "0.0.0.0":
- ip_address_text = IP_ADDRESS_TEXT_TEMPLATE % ip_address
- else:
- ip_address_text = ""
- self._ip_address_label.set_text(ip_address_text)
-
- def set_mesh_step(self, step, state):
- label = ""
- if step == 1:
- if state == device.STATE_ACTIVATED:
- label = _("Connected to a School Mesh Portal")
- elif state == device.STATE_ACTIVATING:
- label = _("Looking for a School Mesh Portal...")
- elif step == 3:
- if state == device.STATE_ACTIVATED:
- label = _("Connected to an XO Mesh Portal")
- elif state == device.STATE_ACTIVATING:
- label = _("Looking for an XO Mesh Portal...")
- elif step == 4:
- if state == device.STATE_ACTIVATED:
- label = _("Connected to a Simple Mesh")
- elif state == device.STATE_ACTIVATING:
- label = _("Starting a Simple Mesh")
-
- if len(label):
- self._step_label.set_text(label)
- else:
- import logging
- logging.debug("Unhandled mesh step %d" % step)
- self._step_label.set_text(_("Unknown Mesh"))
-
diff --git a/src/view/devices/network/wired.py b/src/view/devices/network/wired.py
deleted file mode 100644
index 6843e0d..0000000
--- a/src/view/devices/network/wired.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (C) 2006-2007, Red Hat, Inc.
-#
-# 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 view.devices import deviceview
-
-class DeviceView(deviceview.DeviceView):
-
- FRAME_POSITION_RELATIVE = 300
-
- def __init__(self, model):
- deviceview.DeviceView.__init__(self, model)
- self.props.icon_name = 'network-wired'
diff --git a/src/view/devices/network/wireless.py b/src/view/devices/network/wireless.py
deleted file mode 100644
index 5bef0bb..0000000
--- a/src/view/devices/network/wireless.py
+++ /dev/null
@@ -1,191 +0,0 @@
-#
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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.icon import get_icon_state
-from sugar.graphics import style
-from sugar.graphics.palette import Palette
-from sugar.graphics.toolbutton import ToolButton
-from sugar.graphics.xocolor import XoColor
-
-from model.devices.network import wireless
-from model.devices import device
-from hardware import hardwaremanager
-from hardware import nmclient
-from view.frame.frameinvoker import FrameWidgetInvoker
-from view.pulsingicon import PulsingIcon
-
-_ICON_NAME = 'network-wireless'
-
-IP_ADDRESS_TEXT_TEMPLATE = _("IP address: %s")
-
-class DeviceView(ToolButton):
-
- FRAME_POSITION_RELATIVE = 300
-
- def __init__(self, model):
- ToolButton.__init__(self)
- self._model = model
-
- self._icon = PulsingIcon()
- self._icon.props.icon_name = _ICON_NAME
- pulse_color = XoColor("%s,%s" % (style.COLOR_BUTTON_GREY.get_svg(),
- style.COLOR_TRANSPARENT.get_svg()))
- self._icon.props.pulse_color = pulse_color
- self._icon.props.base_color = pulse_color # only temporarily
- self._inactive_color = XoColor("%s,%s" % (
- style.COLOR_INACTIVE_STROKE.get_html(),
- style.COLOR_INACTIVE_FILL.get_html()))
-
- meshdev = None
- network_manager = hardwaremanager.get_network_manager()
- for dev in network_manager.get_devices():
- if dev.get_type() == nmclient.DEVICE_TYPE_802_11_MESH_OLPC:
- meshdev = dev
- break
-
- self._counter = 0
- self.palette = WirelessPalette(self._get_palette_primary_text(),
- meshdev)
- self.set_palette(self.palette)
- self.palette.props.invoker = FrameWidgetInvoker(self)
- self.palette.set_group_id('frame')
- self.palette.set_frequency(self._model.props.frequency)
-
- model.connect('notify::name', self._name_changed_cb)
- model.connect('notify::ip-address', self._ip_address_changed_cb)
- model.connect('notify::strength', self._strength_changed_cb)
- model.connect('notify::state', self._state_changed_cb)
-
- self._update_icon()
- self._update_state()
- self._update_ip_address()
-
- self.set_icon_widget(self._icon)
- self._icon.show()
-
- def _get_palette_primary_text(self):
- if self._model.props.state == device.STATE_INACTIVE:
- return _("Disconnected")
- return self._model.props.name
-
- def _strength_changed_cb(self, model, pspec):
- self._update_icon()
- # Only update frequency periodically
- if self._counter % 4 == 0:
- self.palette.set_frequency(self._model.props.frequency)
- self._counter += 1
-
- def _ip_address_changed_cb(self, model, pspec):
- self._update_ip_address()
-
- def _name_changed_cb(self, model, pspec):
- self.palette.set_primary_text(self._get_palette_primary_text())
- self._update_state()
-
- def _state_changed_cb(self, model, pspec):
- self._update_icon()
- self._update_state()
- self.palette.set_primary_text(self._get_palette_primary_text())
-
- def _update_icon(self):
- # keep this code in sync with view/home/MeshBox.py
- strength = self._model.props.strength
- if self._model.props.state == device.STATE_INACTIVE:
- strength = 0
- if self._model.props.state == device.STATE_ACTIVATED:
- icon_name = '%s-connected' % _ICON_NAME
- else:
- icon_name = _ICON_NAME
- icon_name = get_icon_state(icon_name, strength)
- if icon_name:
- self._icon.props.icon_name = icon_name
-
- def _update_state(self):
- # FIXME Change icon colors once we have real icons
- state = self._model.props.state
- self._icon.props.pulsing = state == device.STATE_ACTIVATING
- if state == device.STATE_ACTIVATING:
- fill = style.COLOR_INACTIVE_FILL.get_svg()
- stroke = style.COLOR_INACTIVE_STROKE.get_svg()
- elif state == device.STATE_ACTIVATED:
- (stroke, fill) = self._model.get_active_network_colors()
- elif state == device.STATE_INACTIVE:
- fill = style.COLOR_INACTIVE_FILL.get_svg()
- stroke = style.COLOR_INACTIVE_STROKE.get_svg()
- self._icon.props.base_color = XoColor("%s,%s" % (stroke, fill))
-
- def _update_ip_address(self):
- self.palette.set_ip_address(self._model.props.ip_address)
-
-class WirelessPalette(Palette):
- def __init__(self, primary_text, meshdev):
- Palette.__init__(self, primary_text, menu_after_content=True)
- self._meshdev = meshdev
-
- self._chan_label = gtk.Label()
- self._chan_label.props.xalign = 0.0
- self._chan_label.show()
-
- self._ip_address_label = gtk.Label()
-
- vbox = gtk.VBox()
-
- def _padded(child, xalign=0, yalign=0.5):
- padder = gtk.Alignment(xalign=xalign, yalign=yalign,
- xscale=1, yscale=0.33)
- padder.set_padding(style.DEFAULT_SPACING,
- style.DEFAULT_SPACING,
- style.DEFAULT_SPACING,
- style.DEFAULT_SPACING)
- padder.add(child)
- return padder
-
- vbox.pack_start(_padded(self._chan_label))
- vbox.pack_start(_padded(self._ip_address_label))
- vbox.show_all()
-
- if meshdev:
- disconnect_item = gtk.MenuItem(_('Disconnect...'))
- disconnect_item.connect('activate', self._disconnect_activate_cb)
- self.menu.append(disconnect_item)
- disconnect_item.show()
-
- self.set_content(vbox)
-
- def _disconnect_activate_cb(self, menuitem):
- # Disconnection for an AP means activating the default mesh device
- network_manager = hardwaremanager.get_network_manager()
- if network_manager and self._meshdev:
- network_manager.set_active_device(self._meshdev)
-
- def set_frequency(self, freq):
- try:
- chan = wireless.freq_to_channel(freq)
- except KeyError:
- chan = 0
- self._chan_label.set_text("%s: %d" % (_("Channel"), chan))
-
- def set_ip_address(self, ip_address):
- if ip_address is not None and ip_address != "0.0.0.0":
- ip_address_text = IP_ADDRESS_TEXT_TEMPLATE % ip_address
- else:
- ip_address_text = ""
- self._ip_address_label.set_text(ip_address_text)
diff --git a/src/view/frame/__init__.py b/src/view/frame/__init__.py
deleted file mode 100644
index a9dd95a..0000000
--- a/src/view/frame/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (C) 2006-2007, Red Hat, Inc.
-#
-# 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
-
diff --git a/src/view/frame/activitiestray.py b/src/view/frame/activitiestray.py
deleted file mode 100644
index 1311f07..0000000
--- a/src/view/frame/activitiestray.py
+++ /dev/null
@@ -1,394 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-# Copyright (C) 2008 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
-
-import logging
-from gettext import gettext as _
-import gtk
-
-from sugar.graphics import style
-from sugar.graphics.tray import HTray
-from sugar.graphics.xocolor import XoColor
-from sugar.graphics.radiotoolbutton import RadioToolButton
-from sugar.graphics.toolbutton import ToolButton
-from sugar.graphics.icon import Icon
-from sugar.graphics.palette import Palette, WidgetInvoker
-from sugar.graphics.menuitem import MenuItem
-from sugar import activity
-from sugar import profile
-
-from model import shellmodel
-from view.palettes import JournalPalette, CurrentActivityPalette
-from view.pulsingicon import PulsingIcon
-from view.frame.frameinvoker import FrameWidgetInvoker
-from view.frame.notification import NotificationIcon
-import view.frame.frame
-
-class ActivityButton(RadioToolButton):
- def __init__(self, home_activity, group):
- RadioToolButton.__init__(self, group=group)
-
- self._home_activity = home_activity
-
- self._icon = PulsingIcon()
- self._icon.props.base_color = home_activity.get_icon_color()
- self._icon.props.pulse_color = \
- XoColor('%s,%s' % (style.COLOR_BUTTON_GREY.get_svg(),
- style.COLOR_TOOLBAR_GREY.get_svg()))
- if home_activity.get_icon_path():
- self._icon.props.file = home_activity.get_icon_path()
- else:
- self._icon.props.icon_name = 'image-missing'
- self.set_icon_widget(self._icon)
- self._icon.show()
-
- if self._home_activity.is_journal():
- palette = JournalPalette(self._home_activity)
- else:
- palette = CurrentActivityPalette(self._home_activity)
- palette.props.invoker = FrameWidgetInvoker(self)
- palette.set_group_id('frame')
- self.set_palette(palette)
-
- if home_activity.props.launching:
- self._icon.props.pulsing = True
- self._notify_launching_hid = home_activity.connect( \
- 'notify::launching', self.__notify_launching_cb)
- else:
- self._notify_launching_hid = None
- self._notif_icon = None
-
- def __notify_launching_cb(self, home_activity, pspec):
- if not home_activity.props.launching:
- self._icon.props.pulsing = False
- home_activity.disconnect(self._notify_launching_hid)
-
-
-class BaseInviteButton(ToolButton):
- def __init__(self, invite):
- ToolButton.__init__(self)
- self._invite = invite
- self._icon = Icon()
- self.connect('clicked', self.__clicked_cb)
- self.connect('destroy', self.__destroy_cb)
- self._notif_icon = NotificationIcon()
- self._notif_icon.connect('button-release-event',
- self.__button_release_event_cb)
-
- def __button_release_event_cb(self, icon, event):
- self.emit('clicked')
-
- def __clicked_cb(self, button):
- if self._notif_icon is not None:
- frame = view.frame.frame.get_instance()
- frame.remove_notification(self._notif_icon)
- self._notif_icon = None
- self._launch()
-
- def _launch(self):
- """Launch the target of the invite"""
- raise NotImplementedError
-
- def __destroy_cb(self, button):
- frame = view.frame.frame.get_instance()
- frame.remove_notification(self._notif_icon)
-
-class ActivityInviteButton(BaseInviteButton):
- """Invite to shared activity"""
- def __init__(self, invite):
- BaseInviteButton.__init__(self, invite)
- mesh = shellmodel.get_instance().get_mesh()
- activity_model = mesh.get_activity(invite.get_activity_id())
- self._activity_model = activity_model
- self._bundle_id = activity_model.get_bundle_id()
-
- self._icon.props.xo_color = activity_model.get_color()
- if activity_model.get_icon_name():
- self._icon.props.file = activity_model.get_icon_name()
- else:
- self._icon.props.icon_name = 'image-missing'
- self.set_icon_widget(self._icon)
- self._icon.show()
-
- palette = ActivityInvitePalette(invite)
- palette.props.invoker = FrameWidgetInvoker(self)
- palette.set_group_id('frame')
- self.set_palette(palette)
-
- self._notif_icon.props.xo_color = activity_model.get_color()
- if activity_model.get_icon_name():
- icon_name = activity_model.get_icon_name()
- self._notif_icon.props.icon_filename = icon_name
- else:
- self._notif_icon.props.icon_name = 'image-missing'
-
- palette = ActivityInvitePalette(invite)
- palette.props.invoker = WidgetInvoker(self._notif_icon)
- palette.set_group_id('frame')
- self._notif_icon.palette = palette
-
- frame = view.frame.frame.get_instance()
- frame.add_notification(self._notif_icon,
- view.frame.frame.TOP_LEFT)
-
- def _launch(self):
- """Join the activity in the invite."""
- shell = view.Shell.get_instance()
- shell.join_activity(self._activity_model.get_bundle_id(),
- self._activity_model.get_id())
-
-
-class PrivateInviteButton(BaseInviteButton):
- """Invite to a private one to one channel"""
- def __init__(self, invite):
- BaseInviteButton.__init__(self, invite)
- self._private_channel = invite.get_private_channel()
- self._bundle_id = invite.get_bundle_id()
-
- self._icon.props.xo_color = profile.get_color()
- registry = activity.get_registry()
- activity_info = registry.get_activity(self._bundle_id)
- if activity_info:
- self._icon.props.file = activity_info.icon
- else:
- self._icon.props.icon_name = 'image-missing'
- self.set_icon_widget(self._icon)
- self._icon.show()
-
- palette = PrivateInvitePalette(invite)
- palette.props.invoker = FrameWidgetInvoker(self)
- palette.set_group_id('frame')
- self.set_palette(palette)
-
- self._notif_icon.props.xo_color = profile.get_color()
- registry = activity.get_registry()
- activity_info = registry.get_activity(self._bundle_id)
- if activity_info:
- self._notif_icon.props.icon_filename = activity_info.icon
- else:
- self._notif_icon.props.icon_name = 'image-missing'
-
- palette = PrivateInvitePalette(invite)
- palette.props.invoker = WidgetInvoker(self._notif_icon)
- palette.set_group_id('frame')
- self._notif_icon.palette = palette
-
- frame = view.frame.frame.get_instance()
- frame.add_notification(self._notif_icon,
- view.frame.frame.TOP_LEFT)
-
- def _launch(self):
- """Start the activity with private channel."""
- shell = view.Shell.get_instance()
- shell.start_activity_with_uri(self._bundle_id,
- self._private_channel)
-
-
-class BaseInvitePalette(Palette):
- """Palette for frame or notification icon for invites."""
- def __init__(self):
- Palette.__init__(self, '')
-
- menu_item = MenuItem(_('Join'), icon_name='dialog-ok')
- menu_item.connect('activate', self.__join_activate_cb)
- self.menu.append(menu_item)
- menu_item.show()
-
- menu_item = MenuItem(_('Decline'), icon_name='dialog-cancel')
- menu_item.connect('activate', self.__decline_activate_cb)
- self.menu.append(menu_item)
- menu_item.show()
-
- def __join_activate_cb(self, menu_item):
- self._join()
-
- def __decline_activate_cb(self, menu_item):
- self._decline()
-
- def _join(self):
- raise NotImplementedError
-
- def _decline(self):
- raise NotImplementedError
-
-
-class ActivityInvitePalette(BaseInvitePalette):
- """Palette for shared activity invites."""
-
- def __init__(self, invite):
- BaseInvitePalette.__init__(self)
-
- mesh = shellmodel.get_instance().get_mesh()
- activity_model = mesh.get_activity(invite.get_activity_id())
- self._activity_model = activity_model
- self._bundle_id = activity_model.get_bundle_id()
-
- registry = activity.get_registry()
- activity_info = registry.get_activity(self._bundle_id)
- if activity_info:
- self.set_primary_text(activity_info.name)
- else:
- self.set_primary_text(self._bundle_id)
-
- def _join(self):
- shell = view.Shell.get_instance()
- shell.join_activity(self._activity_model.get_bundle_id(),
- self._activity_model.get_id())
-
- def _decline(self):
- invites = shellmodel.get_instance().get_invites()
- activity_id = self._activity_model.get_id()
- invites.remove_activity(activity_id)
-
-
-class PrivateInvitePalette(BaseInvitePalette):
- """Palette for private channel invites."""
-
- def __init__(self, invite):
- BaseInvitePalette.__init__(self)
-
- self._private_channel = invite.get_private_channel()
- self._bundle_id = invite.get_bundle_id()
-
- registry = activity.get_registry()
- activity_info = registry.get_activity(self._bundle_id)
- if activity_info:
- self.set_primary_text(activity_info.name)
- else:
- self.set_primary_text(self._bundle_id)
-
- def _join(self):
- shell = view.Shell.get_instance()
- shell.start_activity_with_uri(self._bundle_id,
- self._private_channel)
- invites = shellmodel.get_instance().get_invites()
- invites.remove_private_channel(self._private_channel)
-
- def _decline(self):
- invites = shellmodel.get_instance().get_invites()
- invites.remove_private_channel(self._private_channel)
-
-
-class ActivitiesTray(HTray):
- def __init__(self):
- HTray.__init__(self)
-
- self._buttons = {}
- self._invite_to_item = {}
- self._freeze_button_clicks = False
-
- self._home_model = shellmodel.get_instance().get_home()
- self._home_model.connect('activity-added', self.__activity_added_cb)
- self._home_model.connect('activity-removed', self.__activity_removed_cb)
- self._home_model.connect('active-activity-changed',
- self.__activity_changed_cb)
- self._home_model.connect('tabbing-activity-changed',
- self.__tabbing_activity_changed_cb)
-
- self._invites = shellmodel.get_instance().get_invites()
- for invite in self._invites:
- self._add_invite(invite)
- self._invites.connect('invite-added', self.__invite_added_cb)
- self._invites.connect('invite-removed', self.__invite_removed_cb)
-
- def __activity_added_cb(self, home_model, home_activity):
- logging.debug('__activity_added_cb: %r' % home_activity)
- if self.get_children():
- group = self.get_children()[0]
- else:
- group = None
-
- button = ActivityButton(home_activity, group)
- self.add_item(button)
- self._buttons[home_activity.get_activity_id()] = button
- button.connect('clicked', self.__activity_clicked_cb, home_activity)
- button.show()
-
- def __activity_removed_cb(self, home_model, home_activity):
- logging.debug('__activity_removed_cb: %r' % home_activity)
- button = self._buttons[home_activity.get_activity_id()]
- self.remove_item(button)
- del self._buttons[home_activity.get_activity_id()]
-
- def _activate_activity(self, home_activity):
- button = self._buttons[home_activity.get_activity_id()]
- self._freeze_button_clicks = True
- button.props.active = True
- self._freeze_button_clicks = False
-
- self.scroll_to_item(button)
- # Redraw immediately.
- # The widget may not be realized yet, and then there is no window.
- if self.window:
- self.window.process_updates(True)
-
- def __activity_changed_cb(self, home_model, home_activity):
- logging.debug('__activity_changed_cb: %r' % home_activity)
-
- # Only select the new activity, if there is no tabbing activity.
- if home_model.get_tabbing_activity() is None:
- self._activate_activity(home_activity)
-
- def __tabbing_activity_changed_cb(self, home_model, home_activity):
- logging.debug('__tabbing_activity_changed_cb: %r' % home_activity)
- # If the tabbing_activity is set to None just do nothing.
- # The active activity will be updated a bit later (and it will
- # be set to the activity that is currently selected).
- if home_activity is None:
- return
-
- self._activate_activity(home_activity)
-
- def __activity_clicked_cb(self, button, home_activity):
- if not self._freeze_button_clicks and button.props.active:
- logging.debug('ActivitiesTray.__activity_clicked_cb')
- window = home_activity.get_window()
- if window:
- window.activate(gtk.get_current_event_time())
-
- def __invite_clicked_cb(self, icon, invite):
- if hasattr(invite, 'get_activity_id'):
- self._invites.remove_invite(invite)
- else:
- self._invites.remove_private_invite(invite)
-
- def __invite_added_cb(self, invites, invite):
- self._add_invite(invite)
-
- def __invite_removed_cb(self, invites, invite):
- self._remove_invite(invite)
-
- def _add_invite(self, invite):
- """Add an invite (SugarInvite or PrivateInvite)"""
- item = None
- if hasattr(invite, 'get_activity_id'):
- mesh = shellmodel.get_instance().get_mesh()
- activity_model = mesh.get_activity(invite.get_activity_id())
- if activity_model is not None:
- item = ActivityInviteButton(invite)
- else:
- item = PrivateInviteButton(invite)
- if item is not None:
- item.connect('clicked', self.__invite_clicked_cb, invite)
- self.add_item(item)
- item.show()
- self._invite_to_item[invite] = item
-
- def _remove_invite(self, invite):
- self.remove_item(self._invite_to_item[invite])
- self._invite_to_item[invite].destroy()
- del self._invite_to_item[invite]
-
diff --git a/src/view/frame/devicestray.py b/src/view/frame/devicestray.py
deleted file mode 100644
index b4ec8ca..0000000
--- a/src/view/frame/devicestray.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright (C) 2008 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
-
-import logging
-
-from sugar.graphics import tray
-
-from view.devices import deviceview
-from model import shellmodel
-
-_logger = logging.getLogger('DevicesTray')
-
-class DevicesTray(tray.HTray):
- def __init__(self):
- tray.HTray.__init__(self, align=tray.ALIGN_TO_END)
- self._device_icons = {}
-
- devices_model = shellmodel.get_instance().get_devices()
-
- for device in devices_model:
- self._add_device(device)
-
- devices_model.connect('device-appeared',
- self.__device_appeared_cb)
- devices_model.connect('device-disappeared',
- self.__device_disappeared_cb)
-
- def _add_device(self, device):
- try:
- view = deviceview.create(device)
- index = 0
- for item in self.get_children():
- index = self.get_item_index(item)
- view_pos = getattr(view, "FRAME_POSITION_RELATIVE", -1)
- item_pos = getattr(item, "FRAME_POSITION_RELATIVE", 0)
- if view_pos < item_pos:
- break
- self.add_item(view, index=index)
- view.show()
- self._device_icons[device.get_id()] = view
- except Exception, message:
- _logger.warn("Not able to add icon for device [%r], because of "
- "an error (%s). Continuing." % (device, message))
-
- def _remove_device(self, device):
- self.remove_item(self._device_icons[device.get_id()])
- del self._device_icons[device.get_id()]
-
- def __device_appeared_cb(self, model, device):
- self._add_device(device)
-
- def __device_disappeared_cb(self, model, device):
- self._remove_device(device)
diff --git a/src/view/home/HomeWindow.py b/src/view/home/HomeWindow.py
deleted file mode 100644
index 316d572..0000000
--- a/src/view/home/HomeWindow.py
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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
-
-from sugar.graphics import style
-from sugar.graphics import palettegroup
-
-from view.home.MeshBox import MeshBox
-from view.home.HomeBox import HomeBox
-from view.home.FriendsBox import FriendsBox
-from view.home.transitionbox import TransitionBox
-from model.shellmodel import ShellModel
-from model import shellmodel
-
-_HOME_PAGE = 0
-_FRIENDS_PAGE = 1
-_MESH_PAGE = 2
-_TRANSITION_PAGE = 3
-
-class HomeWindow(gtk.Window):
- def __init__(self):
- gtk.Window.__init__(self)
-
- accel_group = gtk.AccelGroup()
- self.set_data('sugar-accel-group', accel_group)
- self.add_accel_group(accel_group)
-
- self._active = False
- self._level = ShellModel.ZOOM_HOME
-
- self.set_default_size(gtk.gdk.screen_width(),
- gtk.gdk.screen_height())
-
- self.realize()
- self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DESKTOP)
- self.connect('visibility-notify-event',
- self._visibility_notify_event_cb)
-
- self._enter_sid = self.connect('enter-notify-event',
- self._enter_notify_event_cb)
- self._leave_sid = self.connect('leave-notify-event',
- self._leave_notify_event_cb)
- self._motion_sid = self.connect('motion-notify-event',
- self._motion_notify_event_cb)
-
- self._home_box = HomeBox()
- self._friends_box = FriendsBox()
- self._mesh_box = MeshBox()
- self._transition_box = TransitionBox()
-
- self._activate_view()
- self.add(self._home_box)
- self._home_box.show()
-
- self._transition_box.connect('completed',
- self._transition_completed_cb)
-
- model = shellmodel.get_instance()
- model.connect('notify::zoom-level', self.__zoom_level_changed_cb)
-
- def _enter_notify_event_cb(self, window, event):
- if event.x != gtk.gdk.screen_width() / 2 or \
- event.y != gtk.gdk.screen_height() / 2:
- self._mouse_moved()
-
- def _leave_notify_event_cb(self, window, event):
- self._mouse_moved()
-
- def _motion_notify_event_cb(self, window, event):
- self._mouse_moved()
-
- # We want to enable the XO palette only when the user
- # moved away from the default mouse position (screen center).
- def _mouse_moved(self):
- self._home_box.enable_xo_palette()
- self.disconnect(self._leave_sid)
- self.disconnect(self._motion_sid)
- self.disconnect(self._enter_sid)
-
- def _deactivate_view(self):
- group = palettegroup.get_group("default")
- group.popdown()
- if self._level == ShellModel.ZOOM_HOME:
- self._home_box.suspend()
- elif self._level == ShellModel.ZOOM_MESH:
- self._mesh_box.suspend()
-
- def _activate_view(self):
- if self._level == ShellModel.ZOOM_HOME:
- self._home_box.resume()
- elif self._level == ShellModel.ZOOM_MESH:
- self._mesh_box.resume()
-
- def _visibility_notify_event_cb(self, window, event):
- if event.state == gtk.gdk.VISIBILITY_FULLY_OBSCURED:
- self._deactivate_view()
- else:
- self._activate_view()
-
- def __zoom_level_changed_cb(self, model, pspec):
- level = model.props.zoom_level
- if level == ShellModel.ZOOM_ACTIVITY:
- return
-
- self._deactivate_view()
- self._level = level
- self._activate_view()
-
- self.remove(self.get_child())
- self.add(self._transition_box)
- self._transition_box.show()
-
- if self._level == ShellModel.ZOOM_HOME:
- size = style.XLARGE_ICON_SIZE
- elif self._level == ShellModel.ZOOM_FRIENDS:
- size = style.LARGE_ICON_SIZE
- elif self._level == ShellModel.ZOOM_MESH:
- size = style.STANDARD_ICON_SIZE
-
- self._transition_box.set_size(size)
-
- def _transition_completed_cb(self, transition_box):
- current_child = self.get_child()
- self.remove(current_child)
-
- if self._level == ShellModel.ZOOM_HOME:
- self.add(self._home_box)
- self._home_box.show()
- self._home_box.focus_search_entry()
- elif self._level == ShellModel.ZOOM_FRIENDS:
- self.add(self._friends_box)
- self._friends_box.show()
- elif self._level == ShellModel.ZOOM_MESH:
- self.add(self._mesh_box)
- self._mesh_box.show()
- self._mesh_box.focus_search_entry()
-
- def get_home_box(self):
- return self._home_box
diff --git a/src/view/home/MeshBox.py b/src/view/home/MeshBox.py
deleted file mode 100644
index 8cf8af6..0000000
--- a/src/view/home/MeshBox.py
+++ /dev/null
@@ -1,646 +0,0 @@
-# Copyright (C) 2006-2007 Red Hat, Inc.
-#
-# 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 logging
-
-import hippo
-import gobject
-import gtk
-
-from sugar.graphics.icon import CanvasIcon, Icon
-from sugar.graphics.xocolor import XoColor
-from sugar.graphics import style
-from sugar.graphics.icon import get_icon_state
-from sugar.graphics import palette
-from sugar.graphics import iconentry
-from sugar.graphics.menuitem import MenuItem
-from sugar import profile
-
-from model import accesspointmodel
-from model.devices.network import wireless
-from model import shellmodel
-from hardware import hardwaremanager
-from hardware import nmclient
-from view.BuddyIcon import BuddyIcon
-from view.pulsingicon import CanvasPulsingIcon
-from view.home.snowflakelayout import SnowflakeLayout
-from view.home.spreadlayout import SpreadLayout
-import view.Shell
-
-from hardware.nmclient import NM_802_11_CAP_PROTO_WEP, \
- NM_802_11_CAP_PROTO_WPA, NM_802_11_CAP_PROTO_WPA2
-
-
-_ICON_NAME = 'network-wireless'
-
-class AccessPointView(CanvasPulsingIcon):
- def __init__(self, model, mesh_device=None):
- CanvasPulsingIcon.__init__(self, size=style.STANDARD_ICON_SIZE,
- cache=True)
- self._model = model
- self._meshdev = mesh_device
- self._disconnect_item = None
- self._connect_item = None
- self._greyed_out = False
-
- self.connect('activated', self._activate_cb)
-
- model.connect('notify::strength', self._strength_changed_cb)
- model.connect('notify::name', self._name_changed_cb)
- model.connect('notify::state', self._state_changed_cb)
-
- pulse_color = XoColor('%s,%s' % (style.COLOR_BUTTON_GREY.get_svg(),
- style.COLOR_TRANSPARENT.get_svg()))
- self.props.pulse_color = pulse_color
-
- # Update badge
- caps = model.props.capabilities
- if model.get_nm_network().is_favorite():
- self.props.badge_name = "emblem-favorite"
- elif (caps & NM_802_11_CAP_PROTO_WEP) or \
- (caps & NM_802_11_CAP_PROTO_WPA) or \
- (caps & NM_802_11_CAP_PROTO_WPA2):
- self.props.badge_name = "emblem-locked"
-
- self._palette = self._create_palette()
- self.set_palette(self._palette)
-
- self._update_icon()
- self._update_name()
- self._update_state()
-
- def _create_palette(self):
- icon_name = get_icon_state(_ICON_NAME, self._model.props.strength)
- palette_icon = Icon(icon_name=icon_name,
- icon_size=style.STANDARD_ICON_SIZE,
- badge_name=self.props.badge_name)
- ap_color = self._model.get_nm_network().get_colors()
- palette_icon.props.xo_color = XoColor('%s,%s' % ap_color)
-
- p = palette.Palette(primary_text=self._model.props.name,
- icon=palette_icon)
-
- self._connect_item = MenuItem(_('Connect'), 'dialog-ok')
- self._connect_item.connect('activate', self._activate_cb)
- p.menu.append(self._connect_item)
-
- # Only show disconnect when there's a mesh device, because mesh takes
- # priority over the normal wireless device. NM doesn't have a
- # "disconnect" method for a device either (for various reasons)
- # so this doesn't have a good mapping
- if self._meshdev:
- self._disconnect_item = MenuItem(_('Disconnect'), 'media-eject')
- self._disconnect_item.connect('activate',
- self._disconnect_activate_cb)
- p.menu.append(self._disconnect_item)
-
- return p
-
- def _disconnect_activate_cb(self, menuitem):
- # Disconnection for an AP means activating the default mesh device
- network_manager = hardwaremanager.get_network_manager()
- if network_manager and self._meshdev:
- network_manager.set_active_device(self._meshdev)
- self._palette.props.secondary_text = _('Disconnecting...')
- self.props.pulsing = False
-
- def _strength_changed_cb(self, model, pspec):
- self._update_icon()
-
- def _name_changed_cb(self, model, pspec):
- self._update_name()
-
- def _state_changed_cb(self, model, pspec):
- self._update_icon()
- self._update_state()
-
- def _activate_cb(self, icon):
- network_manager = hardwaremanager.get_network_manager()
- if network_manager:
- device = self._model.get_nm_device()
- network = self._model.get_nm_network()
- network_manager.set_active_device(device, network)
-
- def _update_name(self):
- self._palette.props.primary_text = self._model.props.name
-
- def _update_icon(self):
- # keep this code in sync with view/devices/network/wireless.py
- strength = self._model.props.strength
- if self._model.props.state == accesspointmodel.STATE_CONNECTED:
- icon_name = '%s-connected' % _ICON_NAME
- else:
- icon_name = _ICON_NAME
- icon_name = get_icon_state(icon_name, strength)
- if icon_name:
- self.props.icon_name = icon_name
- icon = self._palette.props.icon
- icon.props.icon_name = icon_name
-
- def _update_state(self):
- if self._model.props.state == accesspointmodel.STATE_CONNECTING:
- if self._disconnect_item:
- self._disconnect_item.show()
- self._connect_item.hide()
- self._palette.props.secondary_text = _('Connecting...')
- self.props.pulsing = True
- elif self._model.props.state == accesspointmodel.STATE_CONNECTED:
- if self._disconnect_item:
- self._disconnect_item.show()
- self._connect_item.hide()
- # TODO: show the channel number
- self._palette.props.secondary_text = _('Connected')
- self.props.pulsing = False
- elif self._model.props.state == accesspointmodel.STATE_NOTCONNECTED:
- if self._disconnect_item:
- self._disconnect_item.hide()
- self._connect_item.show()
- # TODO: show the channel number
- self._palette.props.secondary_text = None
- self.props.pulsing = False
-
- if self._greyed_out:
- self.props.pulsing = False
- self.props.base_color = XoColor('#D5D5D5,#D5D5D5')
- else:
- self.props.base_color = XoColor('%s,%s' % \
- self._model.get_nm_network().get_colors())
-
- def set_filter(self, query):
- self._greyed_out = self._model.props.name.lower().find(query) == -1
- self._update_state()
-
-_MESH_ICON_NAME = 'network-mesh'
-
-class MeshDeviceView(CanvasPulsingIcon):
- def __init__(self, nm_device, channel):
- if not channel in [1, 6, 11]:
- raise ValueError("Invalid channel %d" % channel)
-
- CanvasPulsingIcon.__init__(self, size=style.STANDARD_ICON_SIZE,
- icon_name=_MESH_ICON_NAME, cache=True)
-
- self._nm_device = nm_device
- self.channel = channel
- self.props.badge_name = "badge-channel-%d" % self.channel
- self._greyed_out = False
-
- self._disconnect_item = None
- self._palette = self._create_palette()
- self.set_palette(self._palette)
-
- pulse_color = XoColor('%s,%s' % (style.COLOR_BUTTON_GREY.get_svg(),
- style.COLOR_TRANSPARENT.get_svg()))
- self.props.pulse_color = pulse_color
-
- self.connect('activated', self._activate_cb)
-
- self._nm_device.connect('state-changed', self._state_changed_cb)
- self._nm_device.connect('activation-stage-changed',
- self._state_changed_cb)
- self._update_state()
-
- def _create_palette(self):
- p = palette.Palette(_("Mesh Network") + " " + str(self.channel),
- menu_after_content=True)
-
- self._disconnect_item = gtk.MenuItem(_('Disconnect...'))
- self._disconnect_item.connect('activate', self._disconnect_activate_cb)
- p.menu.append(self._disconnect_item)
-
- state = self._nm_device.get_state()
- chan = wireless.freq_to_channel(self._nm_device.get_frequency())
- if state == nmclient.DEVICE_STATE_ACTIVATED and chan == self.channel:
- self._disconnect_item.show()
- return p
-
- def _disconnect_activate_cb(self, menuitem):
- network_manager = hardwaremanager.get_network_manager()
- if network_manager:
- network_manager.set_active_device(self._nm_device)
-
- def _activate_cb(self, icon):
- network_manager = hardwaremanager.get_network_manager()
- if network_manager:
- freq = wireless.channel_to_freq(self.channel)
- network_manager.set_active_device(self._nm_device, mesh_freq=freq)
-
- def _state_changed_cb(self, model):
- self._update_state()
-
- def _update_state(self):
- state = self._nm_device.get_state()
- chan = wireless.freq_to_channel(self._nm_device.get_frequency())
- if state == nmclient.DEVICE_STATE_ACTIVATING and chan == self.channel:
- self._disconnect_item.hide()
- self.props.pulsing = True
- elif state == nmclient.DEVICE_STATE_ACTIVATED and chan == self.channel:
- self._disconnect_item.show()
- self.props.pulsing = False
- elif state == nmclient.DEVICE_STATE_INACTIVE or chan != self.channel:
- self._disconnect_item.hide()
- self.props.pulsing = False
-
- if self._greyed_out:
- self.props.pulsing = False
- self.props.base_color = XoColor('#D5D5D5,#D5D5D5')
- else:
- self.props.base_color = profile.get_color()
-
- def set_filter(self, query):
- self._greyed_out = (query != '')
- self._update_state()
-
-class ActivityView(hippo.CanvasBox):
- def __init__(self, model):
- hippo.CanvasBox.__init__(self)
-
- self._model = model
- self._icons = {}
- self._palette = None
-
- self._layout = SnowflakeLayout()
- self.set_layout(self._layout)
-
- self._icon = self._create_icon()
- self._layout.add(self._icon, center=True)
-
- self._update_palette()
-
- activity = self._model.activity
- activity.connect('notify::name', self._name_changed_cb)
- activity.connect('notify::color', self._color_changed_cb)
- activity.connect('notify::private', self._private_changed_cb)
- activity.connect('joined', self._joined_changed_cb)
- #FIXME: 'joined' signal not working, see #5032
-
- def _create_icon(self):
- icon = CanvasIcon(file_name=self._model.get_icon_name(),
- xo_color=self._model.get_color(), cache=True,
- size=style.STANDARD_ICON_SIZE)
- icon.connect('activated', self._clicked_cb)
- return icon
-
- def _create_palette(self):
- p_icon = Icon(file=self._model.get_icon_name(),
- xo_color=self._model.get_color())
- p_icon.props.icon_size = gtk.ICON_SIZE_LARGE_TOOLBAR
- p = palette.Palette(None, primary_text=self._model.activity.props.name,
- icon=p_icon)
-
- private = self._model.activity.props.private
- joined = self._model.activity.props.joined
-
- if joined:
- item = MenuItem(_('Resume'), 'activity-start')
- item.connect('activate', self._clicked_cb)
- item.show()
- p.menu.append(item)
- elif not private:
- item = MenuItem(_('Join'), 'activity-start')
- item.connect('activate', self._clicked_cb)
- item.show()
- p.menu.append(item)
-
- return p
-
- def _update_palette(self):
- self._palette = self._create_palette()
- self._icon.set_palette(self._palette)
-
- def has_buddy_icon(self, key):
- return self._icons.has_key(key)
-
- def add_buddy_icon(self, key, icon):
- self._icons[key] = icon
- self._layout.add(icon)
-
- def remove_buddy_icon(self, key):
- icon = self._icons[key]
- del self._icons[key]
- icon.destroy()
-
- def _clicked_cb(self, item):
- bundle_id = self._model.get_bundle_id()
- view.Shell.get_instance().join_activity(bundle_id, self._model.get_id())
-
- def set_filter(self, query):
- text_to_check = self._model.activity.props.name.lower() + \
- self._model.activity.props.type.lower()
- if text_to_check.find(query) == -1:
- self._icon.props.stroke_color = '#D5D5D5'
- self._icon.props.fill_color = style.COLOR_TRANSPARENT.get_svg()
- else:
- self._icon.props.xo_color = self._model.get_color()
-
- for icon in self._icons.itervalues():
- if hasattr(icon, 'set_filter'):
- icon.set_filter(query)
-
- def _name_changed_cb(self, activity, pspec):
- self._update_palette()
-
- def _color_changed_cb(self, activity, pspec):
- self._layout.remove(self._icon)
- self._icon = self._create_icon()
- self._layout.add(self._icon, center=True)
- self._icon.set_palette(self._palette)
-
- def _private_changed_cb(self, activity, pspec):
- self._update_palette()
-
- def _joined_changed_cb(self, widget, event):
- logging.debug('ActivityView._joined_changed_cb: AAAA!!!!')
-
-_AUTOSEARCH_TIMEOUT = 1000
-
-class MeshToolbar(gtk.Toolbar):
- __gtype_name__ = 'MeshToolbar'
-
- __gsignals__ = {
- 'query-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([str]))
- }
-
- def __init__(self):
- gtk.Toolbar.__init__(self)
-
- self._query = None
- self._autosearch_timer = None
-
- self._add_separator()
-
- tool_item = gtk.ToolItem()
- self.insert(tool_item, -1)
- tool_item.show()
-
- self.search_entry = iconentry.IconEntry()
- self.search_entry.set_icon_from_name(iconentry.ICON_ENTRY_PRIMARY,
- 'system-search')
- self.search_entry.add_clear_button()
- self.search_entry.set_width_chars(25)
- self.search_entry.connect('activate', self._entry_activated_cb)
- self.search_entry.connect('changed', self._entry_changed_cb)
- tool_item.add(self.search_entry)
- self.search_entry.show()
-
- self._add_separator(expand=True)
-
- def _add_separator(self, expand=False):
- separator = gtk.SeparatorToolItem()
- separator.props.draw = False
- if expand:
- separator.set_expand(True)
- else:
- separator.set_size_request(style.GRID_CELL_SIZE,
- style.GRID_CELL_SIZE)
- self.insert(separator, -1)
- separator.show()
-
- def _entry_activated_cb(self, entry):
- if self._autosearch_timer:
- gobject.source_remove(self._autosearch_timer)
- new_query = entry.props.text
- if self._query != new_query:
- self._query = new_query
- self.emit('query-changed', self._query)
-
- def _entry_changed_cb(self, entry):
- if not entry.props.text:
- entry.activate()
- return
-
- if self._autosearch_timer:
- gobject.source_remove(self._autosearch_timer)
- self._autosearch_timer = gobject.timeout_add(_AUTOSEARCH_TIMEOUT,
- self._autosearch_timer_cb)
-
- def _autosearch_timer_cb(self):
- logging.debug('_autosearch_timer_cb')
- self._autosearch_timer = None
- self.search_entry.activate()
- return False
-
-class MeshBox(gtk.VBox):
- __gtype_name__ = 'SugarMeshBox'
- def __init__(self):
- gobject.GObject.__init__(self)
-
- self._model = shellmodel.get_instance().get_mesh()
- self._buddies = {}
- self._activities = {}
- self._access_points = {}
- self._mesh = {}
- self._buddy_to_activity = {}
- self._suspended = True
- self._query = ''
- self._owner_icon = None
-
- self._toolbar = MeshToolbar()
- self._toolbar.connect('query-changed', self._toolbar_query_changed_cb)
- self.pack_start(self._toolbar, expand=False)
- self._toolbar.show()
-
- canvas = hippo.Canvas()
- self.add(canvas)
- canvas.show()
-
- self._layout_box = hippo.CanvasBox( \
- background_color=style.COLOR_WHITE.get_int())
- canvas.set_root(self._layout_box)
-
- self._layout = SpreadLayout()
- self._layout_box.set_layout(self._layout)
-
- for buddy_model in self._model.get_buddies():
- self._add_alone_buddy(buddy_model)
-
- self._model.connect('buddy-added', self._buddy_added_cb)
- self._model.connect('buddy-removed', self._buddy_removed_cb)
- self._model.connect('buddy-moved', self._buddy_moved_cb)
-
- for activity_model in self._model.get_activities():
- self._add_activity(activity_model)
-
- self._model.connect('activity-added', self._activity_added_cb)
- self._model.connect('activity-removed', self._activity_removed_cb)
-
- for ap_model in self._model.get_access_points():
- self._add_access_point(ap_model)
-
- self._model.connect('access-point-added',
- self._access_point_added_cb)
- self._model.connect('access-point-removed',
- self._access_point_removed_cb)
-
- if self._model.get_mesh():
- self.__mesh_added_cb(self._model, self._model.get_mesh())
-
- self._model.connect('mesh-added', self.__mesh_added_cb)
- self._model.connect('mesh-removed', self.__mesh_removed_cb)
-
- def __mesh_added_cb(self, model, meshdev):
- self._add_mesh_icon(meshdev, 1)
- self._add_mesh_icon(meshdev, 6)
- self._add_mesh_icon(meshdev, 11)
-
- def __mesh_removed_cb(self, model):
- self._remove_mesh_icon(1)
- self._remove_mesh_icon(6)
- self._remove_mesh_icon(11)
-
- def do_size_allocate(self, allocation):
- width = allocation.width
- height = allocation.height
-
- min_w_, icon_width = self._owner_icon.get_width_request()
- min_h_, icon_height = self._owner_icon.get_height_request(icon_width)
- x = (width - icon_width) / 2
- y = (height - icon_height) / 2 - style.GRID_CELL_SIZE
- self._layout.move(self._owner_icon, x, y)
-
- gtk.VBox.do_size_allocate(self, allocation)
-
- def _buddy_added_cb(self, model, buddy_model):
- self._add_alone_buddy(buddy_model)
-
- def _buddy_removed_cb(self, model, buddy_model):
- self._remove_buddy(buddy_model)
-
- def _buddy_moved_cb(self, model, buddy_model, activity_model):
- # Owner doesn't move from the center
- if buddy_model.is_owner():
- return
- self._move_buddy(buddy_model, activity_model)
-
- def _activity_added_cb(self, model, activity_model):
- self._add_activity(activity_model)
-
- def _activity_removed_cb(self, model, activity_model):
- self._remove_activity(activity_model)
-
- def _access_point_added_cb(self, model, ap_model):
- self._add_access_point(ap_model)
-
- def _access_point_removed_cb(self, model, ap_model):
- self._remove_access_point(ap_model)
-
- def _add_mesh_icon(self, meshdev, channel):
- if self._mesh.has_key(channel):
- self._remove_mesh_icon(channel)
- if not meshdev:
- return
- self._mesh[channel] = MeshDeviceView(meshdev, channel)
- self._layout.add(self._mesh[channel])
-
- def _remove_mesh_icon(self, channel):
- if not self._mesh.has_key(channel):
- return
- self._layout.remove(self._mesh[channel])
- del self._mesh[channel]
-
- def _add_alone_buddy(self, buddy_model):
- icon = BuddyIcon(buddy_model)
- if buddy_model.is_owner():
- self._owner_icon = icon
- self._layout.add(icon)
-
- if hasattr(icon, 'set_filter'):
- icon.set_filter(self._query)
-
- self._buddies[buddy_model.get_key()] = icon
-
- def _remove_alone_buddy(self, buddy_model):
- icon = self._buddies[buddy_model.get_key()]
- self._layout.remove(icon)
- del self._buddies[buddy_model.get_key()]
- icon.destroy()
-
- def _remove_buddy(self, buddy_model):
- key = buddy_model.get_key()
- if self._buddies.has_key(key):
- self._remove_alone_buddy(buddy_model)
- else:
- for activity in self._activities.values():
- if activity.has_buddy_icon(key):
- activity.remove_buddy_icon(key)
-
- def _move_buddy(self, buddy_model, activity_model):
- self._remove_buddy(buddy_model)
-
- if activity_model == None:
- self._add_alone_buddy(buddy_model)
- elif activity_model.get_id() in self._activities:
- activity = self._activities[activity_model.get_id()]
-
- icon = BuddyIcon(buddy_model, style.STANDARD_ICON_SIZE)
- activity.add_buddy_icon(buddy_model.get_key(), icon)
-
- if hasattr(icon, 'set_filter'):
- icon.set_filter(self._query)
-
- def _add_activity(self, activity_model):
- icon = ActivityView(activity_model)
- self._layout.add(icon)
-
- if hasattr(icon, 'set_filter'):
- icon.set_filter(self._query)
-
- self._activities[activity_model.get_id()] = icon
-
- def _remove_activity(self, activity_model):
- icon = self._activities[activity_model.get_id()]
- self._layout.remove(icon)
- del self._activities[activity_model.get_id()]
- icon.destroy()
-
- def _add_access_point(self, ap_model):
- meshdev = self._model.get_mesh()
- icon = AccessPointView(ap_model, meshdev)
- self._layout.add(icon)
-
- if hasattr(icon, 'set_filter'):
- icon.set_filter(self._query)
-
- self._access_points[ap_model.get_id()] = icon
-
- def _remove_access_point(self, ap_model):
- icon = self._access_points[ap_model.get_id()]
- self._layout.remove(icon)
- del self._access_points[ap_model.get_id()]
-
- def suspend(self):
- if not self._suspended:
- self._suspended = True
- for ap in self._access_points.values():
- ap.props.paused = True
-
- def resume(self):
- if self._suspended:
- self._suspended = False
- for ap in self._access_points.values():
- ap.props.paused = False
-
- def _toolbar_query_changed_cb(self, toolbar, query):
- self._query = query.lower()
- for icon in self._layout_box.get_children():
- if hasattr(icon, 'set_filter'):
- icon.set_filter(self._query)
-
- def focus_search_entry(self):
- self._toolbar.search_entry.grab_focus()
diff --git a/src/view/home/__init__.py b/src/view/home/__init__.py
deleted file mode 100644
index a9dd95a..0000000
--- a/src/view/home/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (C) 2006-2007, Red Hat, Inc.
-#
-# 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
-
diff --git a/src/view/pulsingicon.py b/src/view/pulsingicon.py
deleted file mode 100644
index c733043..0000000
--- a/src/view/pulsingicon.py
+++ /dev/null
@@ -1,239 +0,0 @@
-# Copyright (C) 2008 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
-
-import math
-
-import gobject
-
-from sugar.graphics.icon import Icon, CanvasIcon
-from sugar.graphics.style import Color
-
-_INTERVAL = 100
-_STEP = math.pi / 10 # must be a fraction of pi, for clean caching
-
-def _get_as_rgba(self, html_color):
- if html_color == 'none':
- return Color('#FFFFFF', alpha=1.0).get_rgba()
- else:
- return Color(html_color).get_rgba()
-
-def _update_colors(self):
- if self._pulsing:
- base_stroke = self._get_as_rgba(self._base_color.get_stroke_color())
- pulse_stroke = self._get_as_rgba(self._pulse_color.get_stroke_color())
- base_fill = self._get_as_rgba(self._base_color.get_fill_color())
- pulse_fill = self._get_as_rgba(self._pulse_color.get_fill_color())
-
- self.props.stroke_color = \
- self._get_color(base_stroke, pulse_stroke).get_svg()
- self.props.fill_color = \
- self._get_color(base_fill, pulse_fill).get_svg()
- else:
- self.props.xo_color = self._base_color
-
-def _get_color(self, orig_color, target_color):
- next_point = (orig_color[0] +
- self._level * (target_color[0] - orig_color[0]),
- orig_color[1] +
- self._level * (target_color[1] - orig_color[1]),
- orig_color[2] +
- self._level * (target_color[2] - orig_color[2]))
- return Color('#%02x%02x%02x' % (int(next_point[0] * 255),
- int(next_point[1] * 255),
- int(next_point[2] * 255)))
-
-class PulsingIcon(Icon):
- __gtype_name__ = 'SugarPulsingIcon'
-
- __gproperties__ = {
- 'base-color' : (object, None, None, gobject.PARAM_READWRITE),
- 'pulse-color' : (object, None, None, gobject.PARAM_READWRITE),
- 'pulsing' : (bool, None, None, False, gobject.PARAM_READWRITE),
- 'paused' : (bool, None, None, False, gobject.PARAM_READWRITE)
- }
-
- def __init__(self, **kwargs):
- self._base_color = None
- self._pulse_color = None
- self._pulse_hid = None
- self._paused = False
- self._pulsing = False
- self._level = 0
- self._phase = 0
-
- Icon.__init__(self, **kwargs)
-
- self._palette = None
- self.connect('destroy', self.__destroy_cb)
-
- def __destroy_cb(self, icon):
- if self._palette is not None:
- self._palette.destroy()
-
- # Hack for sharing code between CanvasPulsingIcon and PulsingIcon
- _get_as_rgba = _get_as_rgba
- _update_colors = _update_colors
- _get_color = _get_color
-
- def _start_pulsing(self, restart=False):
- if restart:
- self._phase = 0
- if self._pulse_hid is None:
- self._pulse_hid = gobject.timeout_add(_INTERVAL, self.__pulse_cb)
-
- def _stop_pulsing(self):
- if self._pulse_hid is not None:
- gobject.source_remove(self._pulse_hid)
- self._pulse_hid = None
- self.props.xo_color = self._base_color
-
- def __pulse_cb(self):
- self._phase += _STEP
- self._level = (math.sin(self._phase) + 1) / 2
- self._update_colors()
-
- return True
-
- def do_set_property(self, pspec, value):
- if pspec.name == 'base-color':
- if self._base_color != value:
- self._base_color = value
- self._update_colors()
- elif pspec.name == 'pulse-color':
- if self._pulse_color != value:
- self._pulse_color = value
- self._update_colors()
- elif pspec.name == 'pulsing':
- if self._pulsing != value:
- self._pulsing = value
- if self._pulsing:
- self._start_pulsing(restart=True)
- else:
- self._stop_pulsing()
- elif pspec.name == 'paused':
- if self._paused != value:
- self._paused = value
- if self._paused:
- self._stop_pulsing()
- else:
- self._start_pulsing(restart=False)
- else:
- Icon.do_set_property(self, pspec, value)
-
- def do_get_property(self, pspec):
- if pspec.name == 'base-color':
- return self._base_color
- elif pspec.name == 'pulse-color':
- return self._pulse_color
- elif pspec.name == 'pulsing':
- return self._pulsing
- elif pspec.name == 'paused':
- return self._paused
- else:
- return Icon.do_get_property(self, pspec)
-
- def _get_palette(self):
- return self._palette
-
- def _set_palette(self, palette):
- if self._palette is not None:
- self._palette.props.invoker = None
- self._palette = palette
-
- palette = property(_get_palette, _set_palette)
-
-class CanvasPulsingIcon(CanvasIcon):
- __gtype_name__ = 'SugarCanvasPulsingIcon'
-
- __gproperties__ = {
- 'base-color' : (object, None, None, gobject.PARAM_WRITABLE),
- 'pulse-color' : (object, None, None, gobject.PARAM_WRITABLE),
- 'pulsing' : (bool, None, None, False, gobject.PARAM_WRITABLE),
- 'paused' : (bool, None, None, False, gobject.PARAM_WRITABLE)
- }
-
- def __init__(self, **kwargs):
- self._base_color = None
- self._pulse_color = None
- self._pulse_hid = None
- self._paused = False
- self._pulsing = False
- self._level = 0
- self._phase = 0
-
- CanvasIcon.__init__(self, **kwargs)
-
- # Hack for sharing code between CanvasPulsingIcon and PulsingIcon
- _get_as_rgba = _get_as_rgba
- _update_colors = _update_colors
- _get_color = _get_color
-
- def _start_pulsing(self, restart=False):
- if restart:
- self._phase = 0
- if self._pulse_hid is None:
- self._pulse_hid = gobject.timeout_add(_INTERVAL, self.__pulse_cb)
-
- def _stop_pulsing(self):
- if self._pulse_hid is not None:
- gobject.source_remove(self._pulse_hid)
- self._pulse_hid = None
- self.props.xo_color = self._base_color
-
- def __pulse_cb(self):
- self._phase += _STEP
- self._level = (math.sin(self._phase) + 1) / 2
- self._update_colors()
-
- return True
-
- def do_set_property(self, pspec, value):
- if pspec.name == 'base-color':
- if self._base_color != value:
- self._base_color = value
- self._update_colors()
- elif pspec.name == 'pulse-color':
- if self._pulse_color != value:
- self._pulse_color = value
- self._update_colors()
- elif pspec.name == 'pulsing':
- if self._pulsing != value:
- self._pulsing = value
- if self._pulsing:
- self._start_pulsing(restart=True)
- else:
- self._stop_pulsing()
- elif pspec.name == 'paused':
- if self._paused != value:
- self._paused = value
- if self._paused:
- self._stop_pulsing()
- else:
- self._start_pulsing(restart=False)
- else:
- CanvasIcon.do_set_property(self, pspec, value)
-
- def do_get_property(self, pspec):
- if pspec.name == 'base-color':
- return self._base_color
- elif pspec.name == 'pulse-color':
- return self._pulse_color
- elif pspec.name == 'pulsing':
- return self._pulsing
- elif pspec.name == 'paused':
- return self._paused
- else:
- return CanvasIcon.do_get_property(self, pspec)