# HG changeset patch
# User insilmaril
# Date 1223291420 0
# Node ID 7f43b93242aa53aad31c9ce2db3dc48a1c9f450d
# Parent  7ea31701156edf93d8b43d9d8614d9a36e870dc3
Various fixes, also from 1.12. branch

diff -r 7ea31701156e -r 7f43b93242aa animpoint.cpp
--- a/animpoint.cpp	Tue Aug 05 07:36:53 2008 +0000
+++ b/animpoint.cpp	Mon Oct 06 11:10:20 2008 +0000
@@ -114,8 +114,12 @@
 		setY (destPos.y() );
 		return animated;
 	}
-	setX (startPos.x() + vector.x()*sqrt(n/animTicks) );
-	setY (startPos.y() + vector.y()*sqrt(n/animTicks) );
+
+	// Some math slow down the movement
+	qreal f=1-n/animTicks;
+	qreal ff=1-f*f*f;
+	setX (startPos.x() + vector.x()*ff );
+	setY (startPos.y() + vector.y()*ff );
 
 	return animated;
 }
diff -r 7ea31701156e -r 7f43b93242aa demos/vym-projectplan.vym
Binary file demos/vym-projectplan.vym has changed
diff -r 7ea31701156e -r 7f43b93242aa lang/vym_zh_CN.ts
--- a/lang/vym_zh_CN.ts	Tue Aug 05 07:36:53 2008 +0000
+++ b/lang/vym_zh_CN.ts	Mon Oct 06 11:10:20 2008 +0000
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS><TS version="1.1" language="zh_CN">
+<defaultcodec></defaultcodec>
 <context>
     <name>AboutDialog</name>
     <message>
-        <location filename="../aboutdialog.cpp" line="205"/>
+        <location filename="../aboutdialog.cpp" line="208"/>
         <source>Ok</source>
         <comment>Ok Button</comment>
         <translation>确定</translation>
@@ -12,23 +13,23 @@
 <context>
     <name>AboutTextBrowser</name>
     <message>
-        <location filename="../aboutdialog.cpp" line="228"/>
+        <location filename="../aboutdialog.cpp" line="231"/>
         <source>Please use Settings-&gt;</source>
         <translation>请使用 &quot;设置&quot;-&gt;</translation>
     </message>
     <message>
-        <location filename="../aboutdialog.cpp" line="228"/>
+        <location filename="../aboutdialog.cpp" line="231"/>
         <source>Set application to open an URL</source>
         <translation>设置用于打开 URL 的应用程序</translation>
     </message>
     <message>
-        <location filename="../aboutdialog.cpp" line="226"/>
+        <location filename="../aboutdialog.cpp" line="229"/>
         <source>Warning</source>
         <comment>About window</comment>
         <translation>警告</translation>
     </message>
     <message>
-        <location filename="../aboutdialog.cpp" line="227"/>
+        <location filename="../aboutdialog.cpp" line="230"/>
         <source>Couldn&apos;t find a viewer to open %1.
 </source>
         <comment>About window</comment>
@@ -41,12 +42,12 @@
     <message>
         <location filename="../attributedialog.cpp" line="74"/>
         <source>AttributeDialog - Edit definitions</source>
-        <translation type="unfinished"></translation>
+        <translation>属性对话框 - 编辑定义</translation>
     </message>
     <message>
         <location filename="../attributedialog.cpp" line="76"/>
         <source>AttributeDialog - Edit %1</source>
-        <translation type="unfinished"></translation>
+        <translation>属性对话框 - 编辑 %1</translation>
     </message>
 </context>
 <context>
@@ -54,17 +55,17 @@
     <message>
         <location filename="../attributedialog.cpp" line="48"/>
         <source>Attributes</source>
-        <translation type="unfinished"></translation>
+        <translation>属性</translation>
     </message>
     <message>
         <location filename="../attributedialog.cpp" line="49"/>
         <source>Add key</source>
-        <translation type="unfinished"></translation>
+        <translation>添加键</translation>
     </message>
     <message>
         <location filename="../attributedialog.cpp" line="50"/>
         <source>Close</source>
-        <translation type="unfinished">关闭</translation>
+        <translation>关闭</translation>
     </message>
 </context>
 <context>
@@ -72,7 +73,7 @@
     <message>
         <location filename="../attributewidget.ui" line="13"/>
         <source>Form</source>
-        <translation type="unfinished"></translation>
+        <translation>表单</translation>
     </message>
 </context>
 <context>
@@ -81,125 +82,125 @@
         <location filename="../branchpropwindow.cpp" line="16"/>
         <source>Property Editor</source>
         <comment>Window caption</comment>
-        <translation type="unfinished"></translation>
+        <translation>属性编辑器</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.cpp" line="32"/>
         <source>Name</source>
         <comment>Branchprop window: Attribute name</comment>
-        <translation type="unfinished"></translation>
+        <translation>名</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.cpp" line="33"/>
         <source>Value</source>
         <comment>Branchprop window: Attribute value</comment>
-        <translation type="unfinished"></translation>
+        <translation>值</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.cpp" line="34"/>
         <source>Type</source>
         <comment>Branchprop window: Attribute type</comment>
-        <translation type="unfinished"></translation>
+        <translation>类型</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="19"/>
         <source>Branch Property Editor</source>
-        <translation type="unfinished"></translation>
+        <translation>分支属性编辑器</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="29"/>
         <source>Frame</source>
-        <translation type="unfinished"></translation>
+        <translation>边框</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="50"/>
         <source>Geometry</source>
-        <translation type="unfinished"></translation>
+        <translation>几何</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="63"/>
         <source>No Frame</source>
-        <translation type="unfinished">无边框</translation>
+        <translation>无边框</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="68"/>
         <source>Rectangle</source>
-        <translation type="unfinished">矩形</translation>
+        <translation>矩形</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="73"/>
         <source>Ellipse</source>
-        <translation type="unfinished"></translation>
+        <translation>椭圆</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="94"/>
         <source>Padding</source>
-        <translation type="unfinished"></translation>
+        <translation>填充</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="101"/>
         <source>Borderline width</source>
-        <translation type="unfinished"></translation>
+        <translation>边缘宽度</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="151"/>
         <source>Colors</source>
-        <translation type="unfinished"></translation>
+        <translation>颜色</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="194"/>
         <source>Borderline color</source>
-        <translation type="unfinished"></translation>
+        <translation>边缘颜色</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="217"/>
         <source>Background color</source>
-        <translation type="unfinished"></translation>
+        <translation>背景颜色</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="246"/>
         <source>Layout</source>
-        <translation type="unfinished"></translation>
+        <translation>布局</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="254"/>
         <source>Include images horizontally</source>
-        <translation type="unfinished">在水平方向包含图象</translation>
+        <translation>在水平方向包含图象</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="261"/>
         <source>Include images vertically</source>
-        <translation type="unfinished">在垂直方向包含图象</translation>
+        <translation>在垂直方向包含图象</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="284"/>
         <source>Link</source>
-        <translation type="unfinished"></translation>
+        <translation>链接</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="290"/>
         <source>Hide link if unselected</source>
-        <translation type="unfinished"></translation>
+        <translation>未选中时隐藏链接</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="311"/>
         <source>Attributes</source>
-        <translation type="unfinished"></translation>
+        <translation>属性</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="337"/>
         <source>+</source>
-        <translation type="unfinished"></translation>
+        <translation>+</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="344"/>
         <source>-</source>
-        <translation type="unfinished"></translation>
+        <translation>-</translation>
     </message>
     <message>
         <location filename="../branchpropwindow.ui" line="413"/>
         <source>Close</source>
-        <translation type="unfinished">关闭</translation>
+        <translation>关闭</translation>
     </message>
 </context>
 <context>
@@ -283,7 +284,6 @@
         <translation>在该导图中保存设置</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>showWarnings e.g. if directory is not empty</source>
         <translation type="obsolete">显示警告,例如当目录非空时</translation>
     </message>
@@ -353,22 +353,18 @@
         <translation>VYM - 导出 HTML 至目录</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>VYM - Path to CSS file</source>
         <translation type="obsolete">VYM - CSS 文件路径</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>VYM - Path to XSL file</source>
         <translation type="obsolete">VYM - XSL 文件路径</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>VYM - Path to pre export script</source>
         <translation type="obsolete">VYM - 预导出脚本路径</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>VYM - Path to post export script</source>
         <translation type="obsolete">VYM - 导出后脚本路径</translation>
     </message>
@@ -400,7 +396,7 @@
     <message>
         <location filename="../exportxhtmldialog.ui" line="165"/>
         <source>show warnings of xslt processor</source>
-        <translation type="unfinished"></translation>
+        <translation>显示 XSLT 处理器的警告</translation>
     </message>
 </context>
 <context>
@@ -474,7 +470,7 @@
     <message>
         <location filename="../vymmodel.cpp" line="105"/>
         <source>New map</source>
-        <translation type="unfinished">新建导图</translation>
+        <translation>新建导图</translation>
     </message>
 </context>
 <context>
@@ -490,7 +486,6 @@
         <translation>重做</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>New Row</source>
         <translation type="obsolete">新行</translation>
     </message>
@@ -582,7 +577,6 @@
         <translation>卷起分支</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Unscroll all</source>
         <translation type="obsolete">展开全部</translation>
     </message>
@@ -607,7 +601,6 @@
         <translation>使用当前选定分支的标题作为 URL</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Create URL to Bugzilla</source>
         <translation type="obsolete">创建至 Bugzilla 的 URL</translation>
     </message>
@@ -744,7 +737,6 @@
         <translation>直线链接样式</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Linkstyle Parabel</source>
         <translation type="obsolete">抛物线链接样式</translation>
     </message>
@@ -764,17 +756,14 @@
         <translation>多股抛物线</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Linkstyle Thick Parabel</source>
         <translation type="obsolete">粗抛物线链接样式</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>No Frame</source>
         <translation type="obsolete">无边框</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Rectangle</source>
         <translation type="obsolete">矩形</translation>
     </message>
@@ -819,12 +808,10 @@
         <translation>缩小</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>&amp;Next Window</source>
         <translation type="obsolete">下一窗口(&amp;N)</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>&amp;Previous Window</source>
         <translation type="obsolete">上一窗口(&amp;P)</translation>
     </message>
@@ -894,12 +881,10 @@
         <translation>新建</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Critical Load Error</source>
         <translation type="obsolete">严重载入错误</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Couldn&apos;t find a map (*.xml) in .vym archive.
 </source>
         <translation type="obsolete">无法在 .vym 存档中找到导图(*.xml)。
@@ -921,29 +906,24 @@
         <translation>导入:将选中项替换为 vym 导图</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Save Error</source>
         <translation type="obsolete">保存错误</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>
 could not be removed before saving</source>
         <translation type="obsolete">
 无法在保存前删除</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>compressed (vym default)</source>
         <translation type="obsolete">压缩(vym 默认)</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>uncompressed</source>
         <translation type="obsolete">未压缩</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Export XML to directory</source>
         <translation type="obsolete">导出 XML 至目录</translation>
     </message>
@@ -983,7 +963,6 @@
         <translation>严重错误</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Couldn&apos;t find the documentation
 vym.pdf in various places.</source>
         <translation type="obsolete">无法在任何位置找到文档 vym.pdf。</translation>
@@ -1052,7 +1031,6 @@
 您希望新建一个吗?</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>The map %1
 did not use the compressed vym file format.
 Writing it uncompressed will also write images 
@@ -1104,17 +1082,14 @@
         <translation>重做</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Create URL to FATE</source>
         <translation type="obsolete">创建至 FATE 的 URL</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Include top and bottom position of images into branch</source>
         <translation type="obsolete">将图象上下位置包括进分支</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Include left and right position of images into branch</source>
         <translation type="obsolete">将图象左右位置包括进分支</translation>
     </message>
@@ -1124,31 +1099,26 @@
         <translation>隐藏链接</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Note</source>
         <comment>Systemflag</comment>
         <translation type="obsolete">注解</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>WWW Document (external)</source>
         <comment>Systemflag</comment>
         <translation type="obsolete">WWW 文档(外部)</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Link to another vym map</source>
         <comment>Systemflag</comment>
         <translation type="obsolete">至另一 vym 导图的链接</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>subtree is scrolled</source>
         <comment>Systemflag</comment>
         <translation type="obsolete">子树已卷起</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>subtree is temporary scrolled</source>
         <comment>Systemflag</comment>
         <translation type="obsolete">子树暂时卷起</translation>
@@ -1232,7 +1202,6 @@
         <translation>我不喜欢</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>I just love... </source>
         <comment>Standardflag</comment>
         <translation type="obsolete">我就是爱……<byte value="x9"/></translation>
@@ -1265,7 +1234,6 @@
         <translation>KDE 书签</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Export as ASCII</source>
         <translation type="obsolete">导出为 ASCII</translation>
     </message>
@@ -1295,7 +1263,6 @@
         <translation>导出时隐藏对象</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Hide object in exported maps</source>
         <comment>Systemflag</comment>
         <translation type="obsolete">导出时将被隐藏的对象</translation>
@@ -1395,7 +1362,6 @@
         <translation>显示注解编辑器</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Show history window</source>
         <translation type="obsolete">显示历史窗口</translation>
     </message>
@@ -1410,7 +1376,6 @@
         <translation>无法启动 %1 以打开一个新标签。</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Export map as image</source>
         <translation type="obsolete">将导图导出为图象</translation>
     </message>
@@ -1448,14 +1413,12 @@
         <translation>打开子树中的所有链接</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Couldn&apos;t create temporary directory before load
 </source>
         <translation type="obsolete">无法在载入前创建临时目录
 </translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Couldn&apos;t create temporary directory before save
 </source>
         <translation type="obsolete">无法在保存前创建临时目录</translation>
@@ -1466,7 +1429,6 @@
         <translation>对不起,当前只有 Konqueror 和 Mozilla 支持标签浏览。</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>&amp;New...</source>
         <comment>File menu</comment>
         <translation type="obsolete">新建(&amp;N)...</translation>
@@ -1722,7 +1684,6 @@
         <translation>卷起分支</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Unscroll all scrolled branches</source>
         <comment>Edit menu</comment>
         <translation type="obsolete">展开所有卷起的分支</translation>
@@ -1764,13 +1725,11 @@
         <translation>将标题作为 URL</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Create URL to Bugzilla</source>
         <comment>Edit menu</comment>
         <translation type="obsolete">创建至 Bugzilla 的 URL</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Create URL to FATE</source>
         <comment>Edit menu</comment>
         <translation type="obsolete">创建至 FATE 的 URL</translation>
@@ -1914,24 +1873,20 @@
         <translation>着色子树(&amp;T)</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>No Frame</source>
         <comment>Branch attribute</comment>
         <translation type="obsolete">无边框</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>RectangleBranch attribute</source>
         <translation type="obsolete">举行分支属性</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Include images vertically</source>
         <comment>Branch attribute</comment>
         <translation type="obsolete">在垂直方向包含图象</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Include images horizontally</source>
         <comment>Branch attribute</comment>
         <translation type="obsolete">在水平方向包含图象</translation>
@@ -1979,19 +1934,16 @@
         <translation>显示注解编辑器</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Show history window</source>
         <comment>View action</comment>
         <translation type="obsolete">显示历史窗口</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Next Window</source>
         <comment>View action</comment>
         <translation type="obsolete">下一窗口</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>Previous Window</source>
         <comment>View action</comment>
         <translation type="obsolete">上一窗口</translation>
@@ -2099,7 +2051,6 @@
         <translation>删除</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>URLs and vymLinks</source>
         <comment>Context menu name</comment>
         <translation type="obsolete">URL 以及 vym链接</translation>
@@ -2123,7 +2074,6 @@
         <translation>保存图象</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>The directory %1 is not empty.
 Do you risk to overwrite its contents?</source>
         <comment>write directory</comment>
@@ -2134,497 +2084,499 @@
         <location filename="../mainwindow.cpp" line="301"/>
         <source>&amp;New map</source>
         <comment>File menu</comment>
-        <translation type="unfinished"></translation>
+        <translation>新建导图(&amp;N)</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="308"/>
         <source>&amp;Copy to new map</source>
         <comment>File menu</comment>
-        <translation type="unfinished"></translation>
+        <translation>复制到新导图(&amp;C)</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="309"/>
         <source>Copy selection to mapcenter of a new map</source>
         <comment>Status tip File menu</comment>
-        <translation type="unfinished"></translation>
+        <translation>复制选区到新导图的图心</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="532"/>
         <source>Add mapcenter</source>
         <comment>Canvas context menu</comment>
-        <translation type="unfinished"></translation>
+        <translation>添加图心</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="631"/>
         <source>Sort children</source>
         <comment>Edit menu</comment>
-        <translation type="unfinished"></translation>
+        <translation>子分支排序</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="661"/>
         <source>Unscroll childs</source>
         <comment>Edit menu</comment>
-        <translation type="unfinished"></translation>
+        <translation>展开子分支</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="662"/>
         <source>Unscroll all scrolled branches in selected subtree</source>
-        <translation type="unfinished"></translation>
+        <translation>在选择子树里展开所有卷起的分支</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="707"/>
         <source>Edit local URL...</source>
         <comment>Edit menu</comment>
-        <translation type="unfinished"></translation>
+        <translation>编辑本地 URL...</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="708"/>
         <source>Edit local URL</source>
-        <translation type="unfinished"></translation>
+        <translation>编辑本地 URL</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="723"/>
         <source>Create URL to Novell Bugzilla</source>
         <comment>Edit menu</comment>
-        <translation type="unfinished"></translation>
+        <translation>创建至 Novell Bugzilla 的 URL</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="724"/>
         <source>Create URL to Novell Bugzilla</source>
-        <translation type="unfinished"></translation>
+        <translation>创建至 Novell Bugzilla 的 URL</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="730"/>
         <source>Create URL to Novell FATE</source>
         <comment>Edit menu</comment>
-        <translation type="unfinished"></translation>
+        <translation>创建至 Novell FATE 的 URL</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="731"/>
         <source>Create URL to Novell FATE</source>
-        <translation type="unfinished"></translation>
+        <translation>创建至 Novell FATE 的 URL</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="874"/>
         <source>Property window</source>
         <comment>Dialog to edit properties of selection</comment>
-        <translation type="unfinished"></translation>
+        <translation>属性窗口</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="875"/>
         <source>Set properties for selection</source>
-        <translation type="unfinished"></translation>
+        <translation>设置选区属性</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="939"/>
         <source>Linkstyle Curve</source>
-        <translation type="unfinished"></translation>
+        <translation>曲线链接样式</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="951"/>
         <source>Linkstyle Thick Curve</source>
-        <translation type="unfinished"></translation>
+        <translation>粗曲线链接样式</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="974"/>
         <source>Set &amp;Link Color</source>
-        <translation type="unfinished"></translation>
+        <translation>设置链接颜色(&amp;L)</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="980"/>
         <source>Set &amp;Selection Color</source>
-        <translation type="unfinished"></translation>
+        <translation>设置选区颜色(&amp;S)</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="981"/>
         <source>Set Selection Color</source>
-        <translation type="unfinished"></translation>
+        <translation>设置选区颜色</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="992"/>
         <source>Set &amp;Background image</source>
-        <translation type="unfinished"></translation>
+        <translation>设置背景图像(&amp;B)</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="993"/>
         <source>Set Background image</source>
-        <translation type="unfinished"></translation>
+        <translation>设置背景图像</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1029"/>
         <source>Show selection</source>
         <comment>View action</comment>
-        <translation type="unfinished"></translation>
+        <translation>显示选区</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1030"/>
         <source>Show selection</source>
-        <translation type="unfinished"></translation>
+        <translation>显示选区</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1047"/>
         <source>History Window</source>
         <comment>View action</comment>
-        <translation type="unfinished"></translation>
+        <translation>历史窗口</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1048"/>
         <source>Show History Window</source>
-        <translation type="unfinished"></translation>
+        <translation>显示历史窗口</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1060"/>
         <source>Antialiasing</source>
         <comment>View action</comment>
-        <translation type="unfinished"></translation>
+        <translation>反锯齿</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1061"/>
         <source>Antialiasing</source>
-        <translation type="unfinished"></translation>
+        <translation>反锯齿</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1068"/>
         <source>Smooth pixmap transformations</source>
         <comment>View action</comment>
-        <translation type="unfinished"></translation>
+        <translation>平滑位图变形</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1076"/>
         <source>Next Map</source>
         <comment>View action</comment>
-        <translation type="unfinished"></translation>
+        <translation>下一导图</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1082"/>
         <source>Previous Map</source>
         <comment>View action</comment>
-        <translation type="unfinished"></translation>
+        <translation>上一导图</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1136"/>
         <source>Note</source>
         <comment>SystemFlag</comment>
-        <translation type="unfinished">注解</translation>
+        <translation>注解</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1139"/>
         <source>URL to Document </source>
         <comment>SystemFlag</comment>
-        <translation type="unfinished"></translation>
+        <translation>到文档的 URL</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1142"/>
         <source>Link to another vym map</source>
         <comment>SystemFlag</comment>
-        <translation type="unfinished">至另一 vym 导图的链接</translation>
+        <translation>至另一 vym 导图的链接</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1145"/>
         <source>subtree is scrolled</source>
         <comment>SystemFlag</comment>
-        <translation type="unfinished">子树已卷起</translation>
+        <translation>子树已卷起</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1148"/>
         <source>subtree is temporary scrolled</source>
         <comment>SystemFlag</comment>
-        <translation type="unfinished">子树暂时卷起</translation>
+        <translation>子树暂时卷起</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1151"/>
         <source>Hide object in exported maps</source>
         <comment>SystemFlag</comment>
-        <translation type="unfinished">导出时将被隐藏的对象</translation>
+        <translation>导出时将被隐藏的对象</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1235"/>
         <source>I just love...</source>
         <comment>Standardflag</comment>
-        <translation type="unfinished"></translation>
+        <translation>我只是喜欢 ...</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1256"/>
         <source>Important</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished">重要</translation>
+        <translation>重要</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1261"/>
         <source>Priority</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>优先级</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1265"/>
         <source>Back</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>返回</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1268"/>
         <source>Forward</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>前进</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1271"/>
         <source>Look here</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>看这里</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1274"/>
         <source>Dangerous</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished">危险</translation>
+        <translation>危险</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1277"/>
         <source>Don&apos;t forget</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>不要忘记</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1280"/>
         <source>Flag</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>标记</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1284"/>
         <source>Home</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>家</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1288"/>
         <source>Telephone</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>电话</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1291"/>
         <source>Music</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>音乐</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1294"/>
         <source>Mailbox</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>邮箱</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1297"/>
         <source>Maix</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>Maix</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1300"/>
         <source>Password</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>密码</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1303"/>
         <source>To be improved</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>将要改进</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1306"/>
         <source>Stop</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>停止</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1309"/>
         <source>Magic</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>神奇</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1312"/>
         <source>To be discussed</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>将要讨论</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1315"/>
         <source>Reminder</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>提醒</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1318"/>
         <source>Excellent</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>优异</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1321"/>
         <source>Linux</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>Linux</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1324"/>
         <source>Sweet</source>
         <comment>Freemind-Flag</comment>
-        <translation type="unfinished"></translation>
+        <translation>甜蜜</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1390"/>
         <source>Set path for macros</source>
         <comment>Settings action</comment>
-        <translation type="unfinished"></translation>
+        <translation>设置宏路径</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1391"/>
         <source>Set path for macros</source>
-        <translation type="unfinished"></translation>
+        <translation>设置宏路径</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1395"/>
         <source>Set number of undo levels</source>
         <comment>Settings action</comment>
-        <translation type="unfinished"></translation>
+        <translation>设置 undo 级</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1396"/>
         <source>Set number of undo levels</source>
-        <translation type="unfinished"></translation>
+        <translation>设置 undo 级</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1402"/>
         <source>Autosave</source>
         <comment>Settings action</comment>
-        <translation type="unfinished"></translation>
+        <translation>自动保存</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1403"/>
         <source>Autosave</source>
-        <translation type="unfinished"></translation>
+        <translation>自动保存</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1410"/>
         <source>Autosave time</source>
         <comment>Settings action</comment>
-        <translation type="unfinished"></translation>
+        <translation>自动保存时间</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1411"/>
         <source>Autosave time</source>
-        <translation type="unfinished"></translation>
+        <translation>自动保存时间</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1416"/>
         <source>Write backup file on save</source>
         <comment>Settings action</comment>
-        <translation type="unfinished"></translation>
+        <translation>保存时备份</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1417"/>
         <source>Write backup file on save</source>
-        <translation type="unfinished"></translation>
+        <translation>保存时备份</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1469"/>
         <source>Animation</source>
         <comment>Settings action</comment>
-        <translation type="unfinished"></translation>
+        <translation>动画</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1470"/>
         <source>Animation</source>
-        <translation type="unfinished"></translation>
+        <translation>动画</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1514"/>
         <source>Open VYM example maps </source>
         <comment>Help action</comment>
-        <translation type="unfinished"></translation>
+        <translation>打开  VYM 的例子导图</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1515"/>
         <source>Open VYM example maps </source>
-        <translation type="unfinished"></translation>
+        <translation>打开  VYM 的例子导图</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1569"/>
         <source>References (URLs, vymLinks, ...)</source>
         <comment>Context menu name</comment>
-        <translation type="unfinished"></translation>
+        <translation>引用 (URL, vym链接...)</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="1645"/>
         <source>&amp;%1 %2</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;%1 %2</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="2108"/>
         <source>Load Freemind map</source>
-        <translation type="unfinished"></translation>
+        <translation>导入 Freemid 导图</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="2202"/>
         <source>Export as CSV</source>
-        <translation type="unfinished"></translation>
+        <translation>导出为 CSV</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="3268"/>
         <source>Directory with vym macros:</source>
-        <translation type="unfinished"></translation>
+        <translation>vym宏的目录:</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="3300"/>
         <source>QInputDialog::getInteger()</source>
-        <translation type="unfinished"></translation>
+        <translation>QInputDialog::getInteger()</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="3281"/>
         <source>Number of undo/redo levels:</source>
-        <translation type="unfinished"></translation>
+        <translation>撤消级别 :</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="3286"/>
         <source>Settings have been changed. The next map opened will have &quot;%1&quot; undo/redo levels</source>
-        <translation type="unfinished"></translation>
+        <translation>设置已更改。下一个导图将有 %1 个撤消级别</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="3301"/>
         <source>Number of seconds before autosave:</source>
-        <translation type="unfinished"></translation>
+        <translation>自动保存的秒数:</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="3411"/>
         <source>History for %1</source>
         <comment>Window Caption</comment>
-        <translation type="unfinished"></translation>
+        <translation>%1 的历史</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="3735"/>
         <source>Couldn&apos;t find the documentation %1 in:
 %2</source>
-        <translation type="unfinished"></translation>
+        <translation>在:
+%2 中找不到%1 的文档 </translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="3771"/>
         <source>Load vym example map</source>
-        <translation type="unfinished"></translation>
+        <translation>载入 vym 例子导图</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="3820"/>
         <source>Couldn&apos;t find a macro at  %1.
 </source>
-        <translation type="unfinished"></translation>
+        <translation>在 %1 不能找到宏
+</translation>
     </message>
     <message>
         <location filename="../mainwindow.cpp" line="3821"/>
         <source>Set directory for vym macros</source>
-        <translation type="unfinished"></translation>
+        <translation>设置宏目录</translation>
     </message>
 </context>
 <context>
@@ -2660,7 +2612,6 @@
         <translation>请输入 URL:</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>vym map</source>
         <translation type="obsolete">vym 导图</translation>
     </message>
@@ -2675,7 +2626,6 @@
         <translation>严重导入错误</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>New Map</source>
         <comment>Heading of mapcenter in new map</comment>
         <translation type="obsolete">新建导图</translation>
@@ -2718,7 +2668,6 @@
         <translation>未命名</translation>
     </message>
     <message>
-        <location filename="" line="0"/>
         <source>History for </source>
         <translation type="obsolete">历史<byte value="x9"/></translation>
     </message>
@@ -2752,20 +2701,20 @@
     <message>
         <location filename="../mapeditor.cpp" line="1795"/>
         <source>Critical Load Error</source>
-        <translation type="unfinished">严重载入错误</translation>
+        <translation>严重载入错误</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="1602"/>
         <source>Couldn&apos;t create temporary directory before load
 </source>
-        <translation type="unfinished">无法在载入前创建临时目录
+        <translation>无法在载入前创建临时目录
 </translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="1645"/>
         <source>Couldn&apos;t find a map (*.xml) in .vym archive.
 </source>
-        <translation type="unfinished">无法在 .vym 存档中找到导图(*.xml)。
+        <translation>无法在 .vym 存档中找到导图(*.xml)。
 </translation>
     </message>
     <message>
@@ -2776,7 +2725,7 @@
 and flags and thus may overwrite files in the given directory
 
 Do you want to write the map</source>
-        <translation type="unfinished">导图 %1
+        <translation>导图 %1
 未使用 vym 压缩文件格式。
 如果写入的话,图象与标记都会写入,这可能导致
 指定目录中的文件被覆盖。
@@ -2786,91 +2735,93 @@
     <message>
         <location filename="../mapeditor.cpp" line="1746"/>
         <source>compressed (vym default)</source>
-        <translation type="unfinished">压缩(vym 默认)</translation>
+        <translation>压缩(vym 默认)</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="1747"/>
         <source>uncompressed</source>
-        <translation type="unfinished">未压缩</translation>
+        <translation>未压缩</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="1782"/>
         <source>Save Error</source>
-        <translation type="unfinished">保存错误</translation>
+        <translation>保存错误</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="1778"/>
         <source>%1
 could not be removed before saving</source>
-        <translation type="unfinished"></translation>
+        <translation>%1
+在保存时不能移除</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="1783"/>
         <source>%1
 could not be renamed before saving</source>
-        <translation type="unfinished"></translation>
+        <translation>%1
+在保存时不能重命名</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="1796"/>
         <source>Couldn&apos;t create temporary directory before save
 </source>
-        <translation type="unfinished">无法在保存前创建临时目录</translation>
+        <translation>无法在保存前创建临时目录</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="2033"/>
         <source>Export map as image</source>
-        <translation type="unfinished">将导图导出为图象</translation>
+        <translation>将导图导出为图象</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="2110"/>
         <source>Export XML to directory</source>
-        <translation type="unfinished">导出 XML 至目录</translation>
+        <translation>导出 XML 至目录</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="2260"/>
         <source>Autosave disabled during undo.</source>
-        <translation type="unfinished"></translation>
+        <translation>在撤消时禁用自动保存。</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="3268"/>
         <source>Load background image</source>
-        <translation type="unfinished"></translation>
+        <translation>载入背景图像</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="3489"/>
         <source>Text</source>
         <comment>Filedialog</comment>
-        <translation type="unfinished"></translation>
+        <translation>文本</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="3490"/>
         <source>Spreadsheet</source>
         <comment>Filedialog</comment>
-        <translation type="unfinished"></translation>
+        <translation>电子表格</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="3491"/>
         <source>Textdocument</source>
         <comment>Filedialog</comment>
-        <translation type="unfinished"></translation>
+        <translation>文本文档</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="3492"/>
         <source>Images</source>
         <comment>Filedialog</comment>
-        <translation type="unfinished">图象</translation>
+        <translation>图象</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="3495"/>
         <source>Set URL to a local file</source>
-        <translation type="unfinished"></translation>
+        <translation>设置到本地文档的 URL</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="3727"/>
         <source>%1 items on map
 </source>
         <comment>Info about map</comment>
-        <translation type="unfinished"></translation>
+        <translation>在导图上的 %1 条目</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="5291"/>
@@ -2879,23 +2830,27 @@
    %1
 
 Do you want to reload that map with the new file?</source>
-        <translation type="unfinished"></translation>
+        <translation>在磁盘上的导图文件发生了更改:
+
+%1
+
+您想要从新文件中重新载入吗?</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="5297"/>
         <source>Reload</source>
-        <translation type="unfinished"></translation>
+        <translation>重新载入</translation>
     </message>
     <message>
         <location filename="../mapeditor.cpp" line="5298"/>
         <source>Ignore</source>
-        <translation type="unfinished"></translation>
+        <translation>忽略</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../file.cpp" line="439"/>
+        <location filename="../file.cpp" line="447"/>
         <source>This is not an image.</source>
         <translation>这不是图象。</translation>
     </message>
@@ -2942,7 +2897,7 @@
         <translation>zip 未正常退出</translation>
     </message>
     <message>
-        <location filename="../file.cpp" line="316"/>
+        <location filename="../file.cpp" line="379"/>
         <source>Couldn&apos;t start unzip to decompress data.</source>
         <translation>无法启动 unzip 以解压数据。</translation>
     </message>
@@ -2978,7 +2933,7 @@
         <translation>取消</translation>
     </message>
     <message>
-        <location filename="../file.cpp" line="441"/>
+        <location filename="../file.cpp" line="449"/>
         <source>Sorry, no preview for
 multiple selected files.</source>
         <translation>对不起,无法预览
@@ -3022,26 +2977,27 @@
     <message>
         <location filename="../exports.cpp" line="131"/>
         <source>Export as ASCII</source>
-        <translation type="unfinished">导出为 ASCII</translation>
+        <translation>导出为 ASCII</translation>
     </message>
     <message>
         <location filename="../exports.cpp" line="131"/>
         <source>(still experimental)</source>
-        <translation type="unfinished">(仍处于试验阶段)</translation>
+        <translation>(仍处于试验阶段)</translation>
     </message>
     <message>
         <location filename="../file.cpp" line="99"/>
         <source>The directory %1 is not empty.
 Do you risk to overwrite its contents?</source>
         <comment>write directory</comment>
-        <translation type="unfinished">目录 %1 非空。
+        <translation>目录 %1 非空。
 您希望冒险覆盖其内容吗?</translation>
     </message>
     <message>
         <location filename="../main.cpp" line="193"/>
         <source>Couldn&apos;t open %1.
 </source>
-        <translation type="unfinished"></translation>
+        <translation>不能打开 %1.
+</translation>
     </message>
 </context>
 <context>
@@ -3062,7 +3018,7 @@
     <message>
         <location filename="../simplescripteditor.cpp" line="61"/>
         <source>Save script</source>
-        <translation type="unfinished"></translation>
+        <translation>保存脚本</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.cpp" line="73"/>
@@ -3070,79 +3026,81 @@
 exists already.
 Do you want to overwrite it?</source>
         <comment>dialog &apos;save as&apos;</comment>
-        <translation type="unfinished">文件 %1 已存在。
+        <translation>文件 %1 
+已存在。
 您希望覆盖它吗?</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.cpp" line="78"/>
         <source>Overwrite</source>
-        <translation type="unfinished">覆盖</translation>
+        <translation>覆盖</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.cpp" line="79"/>
         <source>Cancel</source>
-        <translation type="unfinished">取消</translation>
+        <translation>取消</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.cpp" line="105"/>
         <source>Load script</source>
-        <translation type="unfinished"></translation>
+        <translation>加载脚本</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.cpp" line="116"/>
         <source>Error</source>
-        <translation type="unfinished">错误</translation>
+        <translation>错误</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.cpp" line="117"/>
         <source>Couldn&apos;t open %1.
 </source>
-        <translation type="unfinished"></translation>
+        <translation>不能打开 %1.
+</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.ui" line="13"/>
         <source>Simple Script Editor</source>
-        <translation type="unfinished"></translation>
+        <translation>简单脚本编辑器</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.ui" line="38"/>
         <source>Save as</source>
-        <translation type="unfinished"></translation>
+        <translation>另存为</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.ui" line="48"/>
         <source>Save</source>
-        <translation type="unfinished">保存</translation>
+        <translation>保存</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.ui" line="51"/>
         <source>Qt::CTRL + Qt::Key_S</source>
-        <translation type="unfinished"></translation>
+        <translation>Qt::CTRL + Qt::Key_S</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.ui" line="58"/>
         <source>Open</source>
-        <translation type="unfinished">打开</translation>
+        <translation>打开</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.ui" line="61"/>
         <source>Qt::CTRL +Qt::Key_O</source>
-        <translation type="unfinished"></translation>
+        <translation>Qt::CTRL +Qt::Key_O</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.ui" line="68"/>
         <source>Run</source>
-        <translation type="unfinished"></translation>
+        <translation>运行</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.ui" line="71"/>
         <source>Qt::CTRL + Qt::Key_R</source>
-        <translation type="unfinished"></translation>
+        <translation>Qt::CTRL + Qt::Key_R</translation>
     </message>
     <message>
         <location filename="../simplescripteditor.ui" line="78"/>
         <source>Close</source>
-        <translation type="unfinished">关闭</translation>
+        <translation>关闭</translation>
     </message>
 </context>
 <context>
@@ -3483,7 +3441,7 @@
     <message>
         <location filename="../warningdialog.ui" line="106"/>
         <source>showAgainBox</source>
-        <translation type="unfinished">再次提醒</translation>
+        <translation>再次提醒</translation>
     </message>
     <message>
         <location filename="../warningdialog.ui" line="132"/>
@@ -3498,12 +3456,12 @@
     <message>
         <location filename="../warningdialog.cpp" line="11"/>
         <source>Proceed</source>
-        <translation type="unfinished">进行</translation>
+        <translation>进行</translation>
     </message>
     <message>
         <location filename="../warningdialog.cpp" line="15"/>
         <source>Show this message again</source>
-        <translation type="unfinished"></translation>
+        <translation>再次显示这条消息</translation>
     </message>
 </context>
 </TS>
diff -r 7ea31701156e -r 7f43b93242aa linkablemapobj.cpp
--- a/linkablemapobj.cpp	Tue Aug 05 07:36:53 2008 +0000
+++ b/linkablemapobj.cpp	Mon Oct 06 11:10:20 2008 +0000
@@ -99,6 +99,9 @@
 
 	// Reset ID
 	objID="";
+
+	// Crossreference to treemodel
+	treeItem=NULL;
 }
 
 void LinkableMapObj::copy (LinkableMapObj* other)
@@ -111,6 +114,17 @@
 	relPos=other->relPos;
 	useOrientation=other->useOrientation;
 	objID=other->objID;
+	treeItem=other->treeItem;
+}
+
+void LinkableMapObj::setTreeItem (TreeItem *ti)
+{
+	treeItem=ti;
+}
+
+TreeItem* LinkableMapObj::getTreeItem ()
+{
+	return treeItem;
 }
 
 void LinkableMapObj::setModel (VymModel *vm)
diff -r 7ea31701156e -r 7f43b93242aa linkablemapobj.h
--- a/linkablemapobj.h	Tue Aug 05 07:36:53 2008 +0000
+++ b/linkablemapobj.h	Mon Oct 06 11:10:20 2008 +0000
@@ -5,6 +5,7 @@
 #include "noteobj.h"
 #include "headingobj.h"
 #include "flagrowobj.h"
+#include "treeitem.h"
 
 #define MAX_DEPTH 999
 
@@ -57,6 +58,8 @@
     virtual void init ();
     virtual void copy (LinkableMapObj*);
 
+	virtual void setTreeItem(TreeItem *);
+	virtual TreeItem* getTreeItem();
 	virtual void setModel (VymModel *vm);
 	virtual VymModel* getModel ();
 
@@ -166,5 +169,7 @@
 	bool useOrientation;
 
 	QString objID;					// id set during load/save currently used for xLinks
+
+	TreeItem *treeItem;				// Crossrefence to treemodel
 };
 #endif
diff -r 7ea31701156e -r 7f43b93242aa mainwindow.cpp
--- a/mainwindow.cpp	Tue Aug 05 07:36:53 2008 +0000
+++ b/mainwindow.cpp	Mon Oct 06 11:10:20 2008 +0000
@@ -1719,11 +1719,14 @@
 
 VymView *Main::createView (VymModel *model)
 {
-	VymView *vm=new VymView;
-
+	VymView *vm=new VymView (model);
+
+/*
 	// Create TreeView
 	QTreeView *tv=new QTreeView;
-	tv->setModel (model->getTreeModel() );
+	tv->setModel (model);
+	tv->setMinimumWidth (350);
+	tv->setColumnWidth (0,350);
 
 	// Create good old MapEditor
 	MapEditor* me=model->getMapEditor();
@@ -1741,6 +1744,7 @@
 	sizes.append (600);
 	vm->setSizes (sizes);
 
+*/
 	return vm;
 }
 
diff -r 7ea31701156e -r 7f43b93242aa mainwindow.h
--- a/mainwindow.h	Tue Aug 05 07:36:53 2008 +0000
+++ b/mainwindow.h	Mon Oct 06 11:10:20 2008 +0000
@@ -11,10 +11,7 @@
 #include "mapeditor.h"
 #include "simplescripteditor.h"
 #include "texteditor.h"
-
-class VymView : public QSplitter 
-{
-};
+#include "vymview.h"
 
 class Main : public QMainWindow 
 {
diff -r 7ea31701156e -r 7f43b93242aa mapeditor.cpp
--- a/mapeditor.cpp	Tue Aug 05 07:36:53 2008 +0000
+++ b/mapeditor.cpp	Mon Oct 06 11:10:20 2008 +0000
@@ -267,7 +267,7 @@
 			QString("%1 (\"%2\")").arg(u).arg(f), 
 			bo,
 			QString("%1 (\"%2\")").arg(r).arg(f),
-			QString("Toggling standard flag \"%1\" of %2").arg(f).arg(getName(bo)));
+			QString("Toggling standard flag \"%1\" of %2").arg(f).arg(model->getObjectName(bo)));
 		bo->toggleStandardFlag (f,mainWindow->useFlagGroups());
 		model->updateSelection();
 	}
@@ -652,7 +652,7 @@
 						"moveRel "+pold,
 						fio,
 						"moveRel "+pnow,
-						QString("Move %1 to relative position %2").arg(getName(fio)).arg(pnow));
+						QString("Move %1 to relative position %2").arg(model->getObjectName(fio)).arg(pnow));
 					fio->getParObj()->requestReposition();
 					model->reposition();
 
@@ -774,7 +774,7 @@
 			tmpXLink->setEnd ( ((BranchObj*)(dst)) );
 			tmpXLink->updateXLink();
 			tmpXLink->activate(); //FIXME savestate missing
-			//model->saveStateComplete(QString("Activate xLink from %1 to %2").arg(getName(tmpXLink->getBegin())).arg(getName(tmpXLink->getEnd())) );	
+			//model->saveStateComplete(QString("Activate xLink from %1 to %2").arg(model->getObjectName(tmpXLink->getBegin())).arg(model->getObjectName(tmpXLink->getEnd())) );	
 		} else
 		{
 			delete(tmpXLink);
@@ -797,7 +797,7 @@
 				"moveRel "+pold,
 				fo,
 				"moveRel "+pnow,
-				QString("Move %1 to relative position %2").arg(getName(fo)).arg(pnow));
+				QString("Move %1 to relative position %2").arg(model->getObjectName(fo)).arg(pnow));
 
 			fo->getParObj()->requestReposition();
 			model->reposition();
@@ -822,7 +822,7 @@
                     "move "+pold,
                     bo,
                     "move "+pnow,
-                    QString("Move mapcenter %1 to position %2").arg(getName(bo)).arg(pnow));
+                    QString("Move mapcenter %1 to position %2").arg(model->getObjectName(bo)).arg(pnow));
             }
 		}
 	
@@ -880,7 +880,7 @@
 				model->saveState (
 					postSelStr,undoCom,
 					preSelStr, redoCom,
-					QString("Relink %1 to %2").arg(getName(bsel)).arg(getName(dst)) );
+					QString("Relink %1 to %2").arg(model->getObjectName(bsel)).arg(model->getObjectName(dst)) );
 
 				model->reposition();	// not necessary if we undo temporary move  below
 			} else
@@ -900,7 +900,7 @@
                         model->saveState(
                             model->getSelectString(lmosel), "moveRel "+qpointfToString(movingObj_orgRelPos), 
                             preSelStr, "moveRel "+ps, 
-                            QString("Move %1 to relative position %2").arg(getName(lmosel)).arg(ps));
+                            QString("Move %1 to relative position %2").arg(model->getObjectName(lmosel)).arg(ps));
                     }
 				}
 
@@ -1054,6 +1054,13 @@
 }
       
 
-// FIXME the following are not needed...
-QString MapEditor::getName(const LinkableMapObj*) {return QString();}
+void MapEditor::setSelectionModel (QItemSelectionModel *sm)
+{
+	selModel=sm;
+}
 
+QItemSelectionModel* MapEditor::selectionModel ()
+{
+	return selModel;
+}
+
diff -r 7ea31701156e -r 7f43b93242aa mapeditor.h
--- a/mapeditor.h	Tue Aug 05 07:36:53 2008 +0000
+++ b/mapeditor.h	Mon Oct 06 11:10:20 2008 +0000
@@ -2,10 +2,10 @@
 #define MAPEDITOR_H
 
 #include <QGraphicsView>
+#include <QItemSelectionModel>
 
 #include "attribute.h"
 #include "ornamentedobj.h"
-#include "selection.h"		// FIXME should not be needed
 #include "settings.h"
 #include "vymmodel.h"
 
@@ -92,8 +92,12 @@
 
 	QPoint exportOffset;		// set before export, used in save
 
-	Selection xelection;					// FIXME only here to get rid of some gcc errors...
-	QString getName(const LinkableMapObj*);	// FIXME see above, renamed to getObjectName in VymModel...
+public:
+	void setSelectionModel (QItemSelectionModel*);
+	QItemSelectionModel* selectionModel();
+private:	
+    QItemSelectionModel* selModel;	// we treat MapEditor as View here...
+
 };
 #endif
 
diff -r 7ea31701156e -r 7f43b93242aa selection.cpp
--- a/selection.cpp	Tue Aug 05 07:36:53 2008 +0000
+++ b/selection.cpp	Mon Oct 06 11:10:20 2008 +0000
@@ -3,7 +3,6 @@
 #include "selection.h"
 
 #include "mainwindow.h"
-#include "mapeditor.h"
 #include "vymmodel.h"
 
 
@@ -186,6 +185,13 @@
 		return NULL;
 }
 
+TreeItem* Selection::getBranchItem()
+{
+	BranchObj* bo=getBranch();
+	if (bo) return bo->getTreeItem();
+	return NULL;
+}
+
 FloatImageObj* Selection::getFloatImage()
 {
 	if (!selectList.isEmpty())
diff -r 7ea31701156e -r 7f43b93242aa selection.h
--- a/selection.h	Tue Aug 05 07:36:53 2008 +0000
+++ b/selection.h	Mon Oct 06 11:10:20 2008 +0000
@@ -5,6 +5,7 @@
 #include <QList>
 #include <QGraphicsScene>
 
+#include "treeitem.h"
 
 class BranchObj;
 class FloatImageObj;
@@ -38,6 +39,7 @@
 	LinkableMapObj * first();		// first in selection list
 	LinkableMapObj * single();		// NULL, if multiple selected
 	BranchObj* getBranch();
+	TreeItem* getBranchItem();		
 	FloatImageObj* getFloatImage();
 
 	QString getSelectString();
diff -r 7ea31701156e -r 7f43b93242aa tex/vym.changelog
--- a/tex/vym.changelog	Tue Aug 05 07:36:53 2008 +0000
+++ b/tex/vym.changelog	Mon Oct 06 11:10:20 2008 +0000
@@ -1,5 +1,15 @@
 -------------------------------------------------------------------
-Sun Jul 27 16:37:24 CEST 2008 - uwe
+Mon Oct  6 11:16:48 CEST 2008 - uwedr@suse.de
+
+- Bugfix: Updated chinese translation from Moligaloo
+
+-------------------------------------------------------------------
+Sun Oct  5 16:58:32 CEST 2008 - uwedr@suse.de
+
+- Bugfix: No more segfault for "delete & keep childs" on MapCenter
+
+-------------------------------------------------------------------
+Sun Jul 27 16:37:24 CEST 2008 - uwedr@suse.de
 
 - Bugfix: Animation timer didn't stop after animation was done, which
           caused high load
diff -r 7ea31701156e -r 7f43b93242aa treeitem.cpp
--- a/treeitem.cpp	Tue Aug 05 07:36:53 2008 +0000
+++ b/treeitem.cpp	Mon Oct 06 11:10:20 2008 +0000
@@ -6,6 +6,7 @@
 {
     parentItem = parent;
     itemData = data;
+	lmo=NULL;
 }
 
 TreeItem::~TreeItem()
@@ -38,9 +39,36 @@
     return itemData.value(column);
 }
 
-TreeItem *TreeItem::parent()
+void TreeItem::setHeading (const QString s)
 {
-    return parentItem;
+	itemData[0]=s;
+}
+
+QString TreeItem::getHeading ()
+{
+	return itemData[0].toString();
+}
+
+void TreeItem::setType(const Type t)
+{
+	type=t;
+	itemData[1]=getTypeName();
+}
+
+TreeItem::Type TreeItem::getType()
+{
+	return type;
+}
+
+QString TreeItem::getTypeName()
+{
+	switch (type)
+	{
+		case Undefined: return QString ("Undefined");
+		case MapCenter: return QString ("MapCenter");
+		case Branch: return QString ("Branch");
+		default: return QString ("TreeItem::getTypeName no typename defined?!");
+	}
 }
 
 int TreeItem::row() const
@@ -50,3 +78,24 @@
 
     return 0;
 }
+
+int TreeItem::column() const
+{
+    return 0;
+}
+
+TreeItem *TreeItem::parent()
+{
+    return parentItem;
+}
+
+LinkableMapObj* TreeItem::getLMO()
+{
+	return lmo;
+}
+
+void TreeItem::setLMO(LinkableMapObj *l)
+{
+	lmo=l;
+}
+
diff -r 7ea31701156e -r 7f43b93242aa treeitem.h
--- a/treeitem.h	Tue Aug 05 07:36:53 2008 +0000
+++ b/treeitem.h	Mon Oct 06 11:10:20 2008 +0000
@@ -4,9 +4,12 @@
 #include <QList>
 #include <QVariant>
 
+class LinkableMapObj;
+
 class TreeItem
 {
 public:
+	enum Type {Undefined,MapCenter,Branch};
     TreeItem(const QList<QVariant> &data, TreeItem *parent = 0);
     ~TreeItem();
 
@@ -16,13 +19,27 @@
     int childCount() const;
     int columnCount() const;
     QVariant data(int column) const;
+	void setHeading (const QString s);
+	QString getHeading();
+	void setType (const Type t);
+	Type getType ();
+	QString getTypeName ();
+	
     int row() const;
+	int column() const;
     TreeItem *parent();
 
+	// Relation to map objects in graphicsscene
+	LinkableMapObj* getLMO();
+	void setLMO (LinkableMapObj*);
+
 private:
     QList<TreeItem*> childItems;
     QList<QVariant> itemData;
     TreeItem *parentItem;
+ 
+	Type type;
+	LinkableMapObj *lmo;
 };
 
 #endif
diff -r 7ea31701156e -r 7f43b93242aa treemodel.cpp
--- a/treemodel.cpp	Tue Aug 05 07:36:53 2008 +0000
+++ b/treemodel.cpp	Mon Oct 06 11:10:20 2008 +0000
@@ -3,13 +3,16 @@
 #include "treeitem.h"
 #include "treemodel.h"
 
+TreeItem* TreeModel::itFirst=NULL;
+TreeItem* TreeModel::itCur=NULL;
+
 TreeModel::TreeModel(QObject *parent)
     : QAbstractItemModel(parent)
 {
     QList<QVariant> rootData;
     rootData << "Heading" << "Type" <<"Note";
     rootItem = new TreeItem(rootData);
-    setupModelData(rootItem);
+ //   setupModelData(rootItem);
 }
 
 TreeModel::~TreeModel()
@@ -98,7 +101,158 @@
     return parentItem->childCount();
 }
 
-void TreeModel::setupModelData(TreeItem *root)
+TreeItem* TreeModel::first()
+{
+	itCur=NULL;	
+	itFirst=rootItem;
+	return rootItem; 
+}
+	
+TreeItem* TreeModel::next()
+{
+/*
+	BranchObj *bo;
+	BranchObj *lmo;
+	BranchObj *po=(BranchObj*)parObj;
+
+	if (branch.isEmpty())
+		bo=NULL;
+	else
+		bo=branch.first();
+
+	if (!itCur)
+	{
+		// no itCur, we are just beginning
+		if (bo) 
+		{
+			// we have children, return first one
+			itCur=this;
+			return bo;
+		}	
+		else
+		{
+			// No children, so there is no next
+			itCur=this;
+			return NULL;
+		}	
+	}
+
+	// We have an itCur
+	if (itCur==po)
+	{	// We come from parent
+		if (bo)
+		{
+			// there are children, go there
+			itCur=this;
+			return bo;
+		}	
+		else
+		{	// no children, try to go up again
+			if (po)
+			{
+				// go back to parent and try to find next there
+				itCur=this;
+				lmo=po->next();
+				itCur=this;
+				return lmo;
+
+			}	
+			else
+			{
+				// can't go up, I am mapCenter, no next
+				itCur=NULL;
+				return NULL;
+			}	
+		}
+	}
+
+	// We don't come from parent, but from brother or children
+
+	// Try to find last child, where we came from, in my own children
+	bool searching=true;
+	int i=0;
+	while (i<branch.size())
+	{
+		// Try to find itCur in my own children
+		if (itCur==branch.at(i))
+		{
+			// ok, we come from my own children
+			if (i<branch.size()-1)
+				bo=branch.at(i+1);
+			 else
+				bo=NULL;
+			searching=false;
+			i=branch.size();
+		} 	
+		++i;	
+	}
+	if (!searching)
+	{	// found itCur in my children
+		if (bo)
+		{
+			// found a brother of lastLMO 
+			itCur=this;
+			return bo;
+		}	
+		else
+		{
+			if (po)
+			{
+				if (this==itFirst) return NULL;	// Stop at starting point
+				// go up
+				itCur=this;
+				lmo=po->next();
+				itCur=this;
+				return lmo;
+			}
+			else
+			{
+				// can't go up, I am mapCenter
+				itCur=NULL;
+				return NULL;
+			}	
+		}
+	}
+
+	// couldn't find last child, it must be a nephew of mine
+	if (branch.size()>0)
+	{
+		// proceed with my first child
+		itCur=this;	
+		return branch.first();
+	}	
+	else
+	{
+		// or go back to my parents
+		if (po)
+		{
+			// go up
+			itCur=this;
+			lmo=po->next();
+			itCur=this;
+			return lmo;
+		}	
+		else
+		{
+			// can't go up, I am mapCenter
+			itCur=NULL;
+			return NULL;
+		}	
+	}	
+	*/
+}
+
+QModelIndex TreeModel::index (TreeItem* ti)
+{
+	return createIndex (ti->row(),ti->column(),ti);
+}
+
+TreeItem* TreeModel::LMOToItem (LinkableMapObj *lmo)// FIXME not used so far!!!
+{
+	TreeItem *ti=rootItem;		
+}
+
+void TreeModel::setupModelData(TreeItem *root)	// FIXME not needed anymore
 {
 	QList<QVariant> cData;
 
@@ -125,6 +279,4 @@
 	cData.clear();
 	cData << "Main B"<<"Branch" <<"Data 3";
 	mco->appendChild(new TreeItem(cData, mco));
-
-	//QModelIndex ix=index (0,0,QModelIndex() );
 }
diff -r 7ea31701156e -r 7f43b93242aa treemodel.h
--- a/treemodel.h	Tue Aug 05 07:36:53 2008 +0000
+++ b/treemodel.h	Mon Oct 06 11:10:20 2008 +0000
@@ -5,7 +5,9 @@
 #include <QModelIndex>
 #include <QVariant>
 
+
 class TreeItem;
+class LinkableMapObj;
 
 class TreeModel : public QAbstractItemModel
 {
@@ -25,10 +27,17 @@
     int rowCount(const QModelIndex &parent = QModelIndex()) const;
     int columnCount(const QModelIndex &parent = QModelIndex()) const;
 
-private:
+	TreeItem *first();
+	TreeItem *next();
+
+protected:
+	QModelIndex index (TreeItem* ti);
+	TreeItem *LMOToItem(LinkableMapObj*);
     void setupModelData(TreeItem *parent);
 
     TreeItem *rootItem;
+	static TreeItem* itFirst;
+	static TreeItem* itCur;
 };
 
 #endif
diff -r 7ea31701156e -r 7f43b93242aa version.h
--- a/version.h	Tue Aug 05 07:36:53 2008 +0000
+++ b/version.h	Mon Oct 06 11:10:20 2008 +0000
@@ -7,7 +7,7 @@
 #define __VYM_VERSION "1.13.0"
 //#define __VYM_CODENAME "Codename: RC-1"
 #define __VYM_CODENAME "Codename: development version"
-#define __VYM_BUILD_DATE "2008-08-05"
+#define __VYM_BUILD_DATE "2008-09-10"
 
 
 bool checkVersion(const QString &);
diff -r 7ea31701156e -r 7f43b93242aa vym.pro
--- a/vym.pro	Tue Aug 05 07:36:53 2008 +0000
+++ b/vym.pro	Mon Oct 06 11:10:20 2008 +0000
@@ -76,6 +76,7 @@
 	settings.h \
 	treeitem.h \
 	treemodel.h \
+	vymview.h \
 	warningdialog.h
 
 SOURCES	+= \
@@ -132,6 +133,7 @@
 	xmlobj.cpp \
 	xsltproc.cpp \
 	settings.cpp \
+	vymview.cpp \
 	warningdialog.cpp
 
 FORMS = \
diff -r 7ea31701156e -r 7f43b93242aa vymmodel.cpp
--- a/vymmodel.cpp	Tue Aug 05 07:36:53 2008 +0000
+++ b/vymmodel.cpp	Mon Oct 06 11:10:20 2008 +0000
@@ -17,6 +17,7 @@
 
 #include "warningdialog.h"
 #include "xml-freemind.h"
+#include "xmlobj.h"
 #include "xml-vym.h"
 
 
@@ -118,9 +119,6 @@
 	itFind=NULL;				
 	EOFind=false;
 
-	// TreeModel
-	treeModel=new TreeModel;
-
 	// animations
 	animationUse=settings.readBoolEntry("/animation/use",false);
 	animationTicks=settings.readNumEntry("/animation/ticks",10);
@@ -164,11 +162,6 @@
 	return mapEditor;
 }
 
-TreeModel* VymModel::getTreeModel()
-{
-	return treeModel;
-}
-
 bool VymModel::isRepositionBlocked()
 {
 	return blockReposition;
@@ -190,6 +183,9 @@
 	// offset		offset of bbox of whole map in scene. 
 	//				Needed for XML export
 	
+
+	XMLObj xml;
+
 	// Save Header
 	QString ls;
 	switch (linkstyle)
@@ -211,22 +207,22 @@
 	QString s="<?xml version=\"1.0\" encoding=\"utf-8\"?><!DOCTYPE vymmap>\n";
 	QString colhint="";
 	if (linkcolorhint==LinkableMapObj::HeadingColor) 
-		colhint=attribut("linkColorHint","HeadingColor");
-
-	QString mapAttr=attribut("version",vymVersion);
+		colhint=xml.attribut("linkColorHint","HeadingColor");
+
+	QString mapAttr=xml.attribut("version",vymVersion);
 	if (!saveSel)
-		mapAttr+= attribut("author",author) +
-				  attribut("comment",comment) +
-			      attribut("date",getDate()) +
-		          attribut("backgroundColor", mapScene->backgroundBrush().color().name() ) +
-		          attribut("selectionColor", selection.getColor().name() ) +
-		          attribut("linkStyle", ls ) +
-		          attribut("linkColor", defLinkColor.name() ) +
-		          attribut("defXLinkColor", defXLinkColor.name() ) +
-		          attribut("defXLinkWidth", QString().setNum(defXLinkWidth,10) ) +
+		mapAttr+= xml.attribut("author",author) +
+				  xml.attribut("comment",comment) +
+			      xml.attribut("date",getDate()) +
+		          xml.attribut("backgroundColor", mapScene->backgroundBrush().color().name() ) +
+		          xml.attribut("selectionColor", selection.getColor().name() ) +
+		          xml.attribut("linkStyle", ls ) +
+		          xml.attribut("linkColor", defLinkColor.name() ) +
+		          xml.attribut("defXLinkColor", defXLinkColor.name() ) +
+		          xml.attribut("defXLinkWidth", QString().setNum(defXLinkWidth,10) ) +
 		          colhint; 
-	s+=beginElement("vymmap",mapAttr);
-	incIndent();
+	s+=xml.beginElement("vymmap",mapAttr);
+	xml.incIndent();
 
 	// Find the used flags while traversing the tree
 	standardFlagsDefault->resetUsedCounter();
@@ -254,10 +250,10 @@
 
 	// Save selection
 	if (!selection.isEmpty() && !saveSel ) 
-		s+=valueElement("select",selection.getSelectString());
-
-	decIndent();
-	s+=endElement("vymmap");
+		s+=xml.valueElement("select",selection.getSelectString());
+
+	xml.decIndent();
+	s+=xml.endElement("vymmap");
 
 	if (writeflags)
 		standardFlagsDefault->saveToDir (tmpdir+"/flags/","",writeflags);
@@ -1488,27 +1484,33 @@
 			"setHeading (\""+s+"\")", 
 			QString("Set heading of %1 to \"%2\"").arg(getObjectName(sel)).arg(s) );
 		sel->setHeading(s );
+		TreeItem *ti=selection.getBranchItem();
+		if (ti) ti->setHeading (s);
+		//FIXME ix is wrong ModelIndex below, ix2 is (hopefully) correct:
+		QModelIndex ix=index( ti->row(), ti->column(), index (0,0,QModelIndex()) );
+		cout <<"VM::setHeading  s="<<s.toStdString()<<"  ti="<<ti<<"  r,c=("<<ti->row()<<","<<ti->column()<<")"<<endl;
+		QModelIndex ix2=index (ti);
+		emit (dataChanged ( ix2,ix2));
+		cout <<"                (r,c)=("<<ix2.row()<<","<<ix2.column()<<")"<<endl;
+
+		// FIXME playing around with selections:
+		// but somehow not all mco are visible in tree then???
+//		if (mapEditor)
+		if (NULL)
+		{
+			
+			QItemSelectionModel *selectionModel=mapEditor->selectionModel();
+			selectionModel->clear();
+			QItemSelection sel (ix2,ix2);
+			selectionModel->select (sel, QItemSelectionModel::Select);
+		}
+
 		reposition();
 		selection.update();
 		ensureSelectionVisible();
 	}
 }
 
-/* FIXME delete this
-QString VymModel::getHeading(bool &ok, QPoint &p)
-{
-	BranchObj *bo=selection.getBranch();
-	if (bo)
-	{
-		ok=true;
-		//p=scene->mapFromScene(bo->getAbsPos());	// FIXME this is view-dependant!!!
-		return bo->getHeading();
-	}
-	ok=false;
-	return QString();
-}
-*/
-
 void VymModel::setHeadingInt(const QString &s)
 {
 	BranchObj *bo=selection.getBranch();
@@ -1962,6 +1964,36 @@
 	}
 }
 
+void VymModel::createMapCenter()
+{
+	MapCenterObj *mco=addMapCenter (QPointF (0,0) );
+	selection.select (mco);
+}
+
+void VymModel::createBranch()
+{
+	BranchObj *bo=selection.getBranch();
+	if (bo)
+	{
+		BranchObj *newbo=addNewBranchInt (-2); // FIXME Old model, merge with below
+
+		// Create TreeItem
+		QList<QVariant> cData;
+		cData << "VM:createBranch" << "undef"<<"undef";
+		TreeItem *parti=bo->getTreeItem();
+		TreeItem *ti=new TreeItem (cData,parti);
+		ti->setLMO (newbo);
+		ti->setType (TreeItem::Branch);
+		parti->appendChild (ti);
+
+		if (newbo)
+		{
+			newbo->setTreeItem (ti);
+			selection.select (newbo);
+		}
+	}
+}
+
 MapCenterObj* VymModel::addMapCenter ()
 {
 	MapCenterObj *mco=addMapCenter (contextPos);
@@ -1986,6 +2018,16 @@
 	mapCenter->setHeading (QApplication::translate("Heading of mapcenter in new map", "New map"));
 	mapCenter->setMapEditor(mapEditor);		//FIXME needed to get defLinkStyle, mapLinkColorHint ... for later added objects
 	mapCenters.append(mapCenter);
+
+	// Create TreeItem
+	QList<QVariant> cData;
+	cData << "VM:addMapCenter" << "undef"<<"undef";
+	TreeItem *ti=new TreeItem (cData,rootItem);
+	ti->setLMO (mapCenter);
+	ti->setType (TreeItem::MapCenter);
+	mapCenter->setTreeItem (ti);
+	rootItem->appendChild (ti);
+
 	return mapCenter;
 }
 
@@ -2180,6 +2222,17 @@
 	if (bo)
 	{
 		par=(BranchObj*)(bo->getParObj());
+
+		// Don't use this on mapcenter
+		if (!par) return;
+
+		// Check if we have childs at all to keep
+		if (bo->countBranches()==0) 
+		{
+			deleteSelection();
+			return;
+		}
+
 		QPointF p=bo->getRelPos();
 		saveStateChangingPart(
 			bo->getParObj(),
@@ -4704,6 +4757,21 @@
 	}		
 }
 
+void VymModel::selectParent()
+{
+	LinkableMapObj *lmo=selection.first();
+	BranchObj* par;
+	if (lmo)
+	{
+		par=(BranchObj*)(lmo->getParObj());
+		if (!par) return;
+		selection.select(par);
+		selection.update();
+		ensureSelectionVisible();
+		sendSelection();
+	}		
+}
+
 Selection::Type VymModel::selectionType()
 {
 	return selection.type();
diff -r 7ea31701156e -r 7f43b93242aa vymmodel.h
--- a/vymmodel.h	Tue Aug 05 07:36:53 2008 +0000
+++ b/vymmodel.h	Mon Oct 06 11:10:20 2008 +0000
@@ -9,14 +9,10 @@
 #include "mapeditor.h"
 #include "parser.h"
 #include "selection.h"
+#include "treeitem.h"
 #include "treemodel.h"
-#include "xmlobj.h"
 
-
-/*! \brief This will later be divided into Model/View
-*/
-
-class VymModel : public QObject,  public XMLObj {		
+class VymModel : public TreeModel {		
 	Q_OBJECT
 
 ////////////////////////////////////////////
@@ -39,11 +35,6 @@
 
 	MapEditor* getMapEditor();			// FIXME not necessary
 
-private:
-	TreeModel* treeModel;
-public:	
-	TreeModel* getTreeModel();
-
 	bool isRepositionBlocked();		//!< While load or undo there is no need to update graphicsview
 
 	void updateActions();			//!< Update buttons in mainwindow
@@ -288,6 +279,10 @@
     void moveBranchDown();	//!< Move branch down
 	void sortChildren();	//!< Sort children lexically
 
+	// The create methods are used to quickly parse a XML file
+	void createMapCenter();	//!< Create and select MapCenter
+	void createBranch();	//!< Create and select Branch
+
 	/*! \brief Add new mapcenter
 
 	    Disclaimer: Still experimental, not fully supported yet.
@@ -552,6 +547,7 @@
     void selectRightBranch();
     void selectFirstBranch();
     void selectLastBranch();
+	void selectParent();
 
 public:
 	Selection::Type selectionType();
diff -r 7ea31701156e -r 7f43b93242aa vymview.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vymview.cpp	Mon Oct 06 11:10:20 2008 +0000
@@ -0,0 +1,39 @@
+#include "vymview.h"
+
+#include "mapeditor.h"
+
+VymView::VymView(VymModel *model)
+{
+	// Create TreeView
+	QTreeView *treeview=new QTreeView;
+	treeview->setModel ((QAbstractItemModel*)model);
+	treeview->setMinimumWidth (350);
+	treeview->setColumnWidth (0,350);
+
+	// Create good old MapEditor
+	MapEditor* me=model->getMapEditor();
+	if (!me) me=new MapEditor (model);
+
+	me->setSelectionModel (treeview->selectionModel() );
+
+	//me->viewport()->setFocus();
+	//FIXME me->setAntiAlias (actionViewToggleAntiAlias->isOn());
+	//FIXME me->setSmoothPixmap(actionViewToggleSmoothPixmapTransform->isOn());
+
+	addWidget (treeview);
+	addWidget (me);
+
+	// Set geometry
+	QList <int> sizes;
+	sizes.append (150);
+	sizes.append (600);
+	setSizes (sizes);
+}
+
+QItemSelectionModel* VymView::selectionModel() 
+{
+	if (treeview) return treeview->selectionModel();
+	return NULL;
+}
+
+
diff -r 7ea31701156e -r 7f43b93242aa vymview.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vymview.h	Mon Oct 06 11:10:20 2008 +0000
@@ -0,0 +1,22 @@
+#ifndef VYMVIEW_H 
+#define VYMVIEW_H
+
+#include <QItemSelectionModel>
+#include <QSplitter>
+#include <QTreeView>
+
+class VymModel;
+
+
+class VymView : public QSplitter 
+{
+public:
+	VymView(VymModel *model);
+	QItemSelectionModel* selectionModel();
+private:
+	QTreeView *treeview;
+};
+
+
+#endif
+
diff -r 7ea31701156e -r 7f43b93242aa xml-vym.cpp
--- a/xml-vym.cpp	Tue Aug 05 07:36:53 2008 +0000
+++ b/xml-vym.cpp	Mon Oct 06 11:10:20 2008 +0000
@@ -18,15 +18,6 @@
 extern Settings settings;
 extern QString vymVersion;
 
-/*
-parseVYMHandler::parseVYMHandler() {}
-
-parseVYMHandler::~parseVYMHandler() {}
-
-QString parseVYMHandler::errorProtocol() { return errorProt; }
-
-*/
-
 bool parseVYMHandler::startDocument()
 {
     errorProt = "";
@@ -39,18 +30,6 @@
     return true;
 }
 
-
-/*
-QString parseVYMHandler::parseHREF(QString href)
-{
-	QString type=href.section(":",0,0);
-	QString path=href.section(":",1,1);
-	if (!tmpDir.endsWith("/"))
-		return tmpDir + "/" + path;
-	else	
-		return tmpDir + path;
-}
-*/
 bool parseVYMHandler::startElement  ( const QString&, const QString&,
                     const QString& eName, const QXmlAttributes& atts ) 
 {
@@ -144,7 +123,8 @@
 		{	
 			// Really use the found mapcenter as MCO in a new map
 
-			lastBranch=model->addMapCenter(); 
+			model->createMapCenter(); 
+			lastBranch=model->getSelectedBranch();
 		} else
 		{
 			// Treat the found mapcenter as a branch 
@@ -156,8 +136,8 @@
 				lastBranch=(BranchObj*)lmo;
 				if (loadMode==ImportAdd)
 				{
-					lastBranch->addBranch();
-					lastBranch=lastBranch->getLastBranch();
+					model->createBranch();
+					lastBranch=model->getSelectedBranch();
 				} else
 					lastBranch->clear();
 			} else
@@ -216,8 +196,8 @@
 				state=StateBranch;
 				if (loadMode==ImportAdd)
 				{
-					lastBranch->addBranch();
-					lastBranch=lastBranch->getLastBranch();
+					model->createBranch();
+					lastBranch=model->getSelectedBranch();
 					
 				} else
 					lastBranch->clear();
@@ -233,8 +213,8 @@
 	} else if ( eName == "branch" && state == StateMapCenter) 
 	{
 		state=StateBranch;
-		lastBranch->addBranch();
-		lastBranch=lastBranch->getLastBranch();
+		model->createBranch();
+		lastBranch=model->getSelectedBranch();
 		readBranchAttr (atts);
 	} else if ( eName == "htmlnote" && state == StateBranch) 
 	{
@@ -254,8 +234,8 @@
 		if (!readXLinkAttr (atts)) return false;
     } else if ( eName == "branch" && state == StateBranch ) 
 	{
-        lastBranch->addBranch();
-		lastBranch=lastBranch->getLastBranch();		
+		model->createBranch();
+		lastBranch=model->getSelectedBranch();
 		readBranchAttr (atts);
     } else if ( eName == "html" && state == StateHtmlNote ) 
 	{
@@ -286,7 +266,8 @@
     switch ( state ) 
 	{
         case StateBranch: 
-			lastBranch=(BranchObj*)(lastBranch->getParObj());
+			model->selectParent();
+			lastBranch=model->getSelectedBranch();
             break;
         case StateHtml: 
 			htmldata+="</"+eName+">";
@@ -335,7 +316,7 @@
 			htmldata+=ch_org;
 			break;
         case StateHeading: 
-            lastBranch->setHeading(ch_simplified);
+            model->setHeading(ch_simplified);
             break;
         default: 
 			return false;