# HG changeset patch # User insilmaril # Date 1237463313 0 # Node ID 85683324f94a0e24c0acf86509babc99816a44f6 # Parent bd98be838da967098dfd83d43d45de19c7273bc5 Added traditional chinese and KDE4 support diff -r bd98be838da9 -r 85683324f94a aboutdialog.cpp --- a/aboutdialog.cpp Mon Mar 16 15:40:49 2009 +0000 +++ b/aboutdialog.cpp Thu Mar 19 11:48:33 2009 +0000 @@ -59,6 +59,8 @@ "
  • Brasilian: Amadeu Júnior
  • " "
  • Russion: Anton Olenev
  • " "
  • Simplified Chinese: Moligaloo
  • " + "
  • Traditional Chinese: Wei-Lun Chao
  • " + " " "" "
  • Patches" diff -r bd98be838da9 -r 85683324f94a exports.cpp --- a/exports.cpp Mon Mar 16 15:40:49 2009 +0000 +++ b/exports.cpp Thu Mar 19 11:48:33 2009 +0000 @@ -249,7 +249,7 @@ } //////////////////////////////////////////////////////////////////////// -void ExportKDEBookmarks::doExport() +void ExportKDE3Bookmarks::doExport() { MapEditor *me=model->getMapEditor(); if (me) @@ -257,7 +257,7 @@ WarningDialog dia; dia.showCancelButton (true); dia.setText(QObject::tr("Exporting the %1 bookmarks will overwrite\nyour existing bookmarks file.").arg("KDE")); - dia.setCaption(QObject::tr("Warning: Overwriting %1 bookmarks").arg("KDE")); + dia.setCaption(QObject::tr("Warning: Overwriting %1 bookmarks").arg("KDE 3")); dia.setShowAgainName("/exports/KDE/overwriteKDEBookmarks"); if (dia.exec()==QDialog::Accepted) { @@ -280,6 +280,40 @@ } } } +} + +//////////////////////////////////////////////////////////////////////// +void ExportKDE4Bookmarks::doExport() +{ + MapEditor *me=model->getMapEditor(); + if (me) + { + WarningDialog dia; + dia.showCancelButton (true); + dia.setText(QObject::tr("Exporting the %1 bookmarks will overwrite\nyour existing bookmarks file.").arg("KDE")); + dia.setCaption(QObject::tr("Warning: Overwriting %1 bookmarks").arg("KDE 4")); + dia.setShowAgainName("/exports/KDE/overwriteKDEBookmarks"); + if (dia.exec()==QDialog::Accepted) + { + me->exportXML(tmpDir.path(),false); + + XSLTProc p; + p.setInputFile (tmpDir.path()+"/"+me->getMapName()+".xml"); + p.setOutputFile (tmpDir.home().path()+"/.kde4/share/apps/konqueror/bookmarks.xml"); + p.setXSLFile (vymBaseDir.path()+"/styles/vym2kdebookmarks.xsl"); + p.process(); + + QString ub=vymBaseDir.path()+"/scripts/update-bookmarks"; + QProcess *proc= new QProcess ; + proc->start( ub); + if (!proc->waitForStarted()) + { + QMessageBox::warning(0, + QObject::tr("Warning"), + QObject::tr("Couldn't find script %1\nto notifiy Browsers of changed bookmarks.").arg(ub)); + } + } + } } diff -r bd98be838da9 -r 85683324f94a exports.h --- a/exports.h Mon Mar 16 15:40:49 2009 +0000 +++ b/exports.h Thu Mar 19 11:48:33 2009 +0000 @@ -6,29 +6,118 @@ #include #include "mapcenterobj.h" +#include "settings.h" +#include "vymmodel.h" -using namespace std; -///////////////////////////////////////////////////////////////////////////// -class Export +/*! \brief Base class for all exports +*/ + +/////////////////////////////////////////////////////////////////////// + +class ExportBase { public: - Export(); - bool setOutputDir (QString); - void setPath(const QString &); - void setMapCenter (MapCenterObj*); - void setIndentPerDepth (QString); - void exportMap(); - void exportAsHTML(); + ExportBase(); + virtual ~ExportBase(); + virtual void setDir(const QDir&); + virtual void setFile(const QString &); + virtual QString getFile (); + virtual void setModel (VymModel *m); + virtual void setCaption(const QString &); + virtual void addFilter (const QString &); + virtual bool execDialog(); + virtual bool canceled(); protected: - QString getSectionString (BranchObj*); - void write (QString); + VymModel *model; + virtual QString getSectionString (BranchObj*); -private: - QDir outdir; - QString filepath; - MapCenterObj *mapCenter; + QDir tmpDir; + QDir outDir; + QString outputFile; QString indentPerDepth; + QString caption; + QString filter; + bool cancelFlag; }; +/////////////////////////////////////////////////////////////////////// +class ExportASCII:public ExportBase +{ +public: + ExportASCII(); + virtual void doExport(); + virtual QString underline (const QString &text, const QString &line); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportCSV:public ExportBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportXMLBase:public ExportBase +{ +}; + +/////////////////////////////////////////////////////////////////////// +class ExportKDE3Bookmarks:public ExportXMLBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportKDE4Bookmarks:public ExportXMLBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportFirefoxBookmarks:public ExportXMLBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportTaskjuggler:public ExportXMLBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportLaTeX:public ExportBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportOO:public ExportBase +{ +public: + ExportOO(); + ~ExportOO(); + void exportPresentation(); + bool setConfigFile (const QString &); +private: + QString buildList (BranchObj*); + bool useSections; + QString configFile; + QString configDir; + QString templateDir; + QString content; + QString contentTemplate; + QString contentTemplateFile; + QString contentFile; + QString pageTemplate; + QString pageTemplateFile; + QString sectionTemplate; + QString sectionTemplateFile; +}; #endif diff -r bd98be838da9 -r 85683324f94a imports.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imports.cpp Thu Mar 19 11:48:33 2009 +0000 @@ -0,0 +1,125 @@ +#include "file.h" +#include "imports.h" +#include "linkablemapobj.h" +#include "misc.h" +#include "mainwindow.h" +#include "xsltproc.h" + +extern Main *mainWindow; +extern QDir vymBaseDir; + +ImportBase::ImportBase() +{ + bool ok; + tmpDir.setPath (makeTmpDir(ok,"vym-import")); + if (!tmpDir.exists() || !ok) + QMessageBox::critical( 0, QObject::tr( "Error" ), + QObject::tr("Couldn't access temporary directory\n")); +} + + +ImportBase::~ImportBase() +{ + // Remove tmpdir + removeDir (tmpDir); +} + +void ImportBase::setDir(const QString &p) +{ + inputDir=p; +} + +void ImportBase::setFile (const QString &p) +{ + inputFile=p; +} + +void ImportBase::setMapCenter(MapCenterObj *mc) +{ + mapCenter=mc; +} + +bool ImportBase::transform() +{ + return true; +} + +QString ImportBase::getTransformedFile() +{ + return transformedFile; +} + +///////////////////////////////////////////////// +bool ImportKDE3Bookmarks::transform() +{ + transformedFile=tmpDir.path()+"/bookmarks.xml"; + + XSLTProc p; + p.setInputFile (tmpDir.home().path()+"/.kde/share/apps/konqueror/bookmarks.xml"); + p.setOutputFile (transformedFile); + p.setXSLFile (vymBaseDir.path()+"/styles/kdebookmarks2vym.xsl"); + p.process(); + + return true; +} + +///////////////////////////////////////////////// +bool ImportKDE4Bookmarks::transform() +{ + transformedFile=tmpDir.path()+"/bookmarks.xml"; + + XSLTProc p; + p.setInputFile (tmpDir.home().path()+"/.kde4/share/apps/konqueror/bookmarks.xml"); + p.setOutputFile (transformedFile); + p.setXSLFile (vymBaseDir.path()+"/styles/kdebookmarks2vym.xsl"); + p.process(); + + return true; +} + + + +///////////////////////////////////////////////// +bool ImportFirefoxBookmarks::transform() +{ + transformedFile=tmpDir.path()+"/bookmarks.xml"; + + QStringList lines; + QFile file( inputFile ); + if ( file.open( QIODevice::ReadOnly ) ) + { + QTextStream stream( &file ); + while ( !stream.atEnd() ) + lines += stream.readLine(); // line of text excluding '\n' + file.close(); + } + // TODO Generate vym from broken bookmarks above... + + return true; +} + +///////////////////////////////////////////////// +bool ImportMM::transform() +{ + // try to unzip + if (success==unzipDir (tmpDir, inputFile)) + { + + // Set short name, too. Search from behind: + transformedFile=inputFile; + int i=transformedFile.findRev("/"); + if (i>=0) transformedFile=transformedFile.remove (0,i+1); + transformedFile.replace(".mmap",".xml"); + transformedFile=tmpDir.path()+"/"+transformedFile; + + XSLTProc p; + p.setInputFile (tmpDir.path()+"/Document.xml"); + p.setOutputFile (transformedFile); + p.setXSLFile (vymBaseDir.path()+"/styles/mmap2vym.xsl"); + p.process(); + + return true; + } else + return false; + +} diff -r bd98be838da9 -r 85683324f94a imports.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imports.h Thu Mar 19 11:48:33 2009 +0000 @@ -0,0 +1,64 @@ +#ifndef IMPORTS_H +#define IMPORTS_H + +#include +#include +#include + +#include "mapcenterobj.h" +#include "settings.h" + + +/////////////////////////////////////////////////////////////////////// + +class ImportBase +{ +public: + ImportBase(); + virtual ~ImportBase(); + virtual void setDir(const QString &); + virtual void setFile(const QString &); + virtual void setMapCenter (MapCenterObj*); + virtual bool transform(); + virtual QString getTransformedFile(); +protected: + QDir tmpDir; + QString inputDir; + QString inputFile; + MapCenterObj *mapCenter; + QString transformedFile; + +}; + +/////////////////////////////////////////////////////////////////////// +class ImportKDE3Bookmarks:public ImportBase +{ +public: + bool transform(); +}; + +class ImportKDE4Bookmarks:public ImportBase +{ +public: + bool transform(); +}; + + +/////////////////////////////////////////////////////////////////////// +class ImportFirefoxBookmarks:public ImportBase +{ +public: + bool transform(); +}; + + +/////////////////////////////////////////////////////////////////////// +class ImportMM:public ImportBase +{ +public: + bool transform(); +}; + + + +#endif diff -r bd98be838da9 -r 85683324f94a lang/vym-zh_TW.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lang/vym-zh_TW.ts Thu Mar 19 11:48:33 2009 +0000 @@ -0,0 +1,1746 @@ + + + + + AboutDialog + + Ok + 確定 + + + + EditXLinkDialog + + Edit XLink + 編輯 XLink + + + XLink width: + XLink 寬度: + + + Set color of heading + 設定標頭的顏色 + + + XLink color: + XLink 顏色: + + + Use as default: + 做為預設: + + + Delete XLink + 刪除 XLink + + + Ok + 確定 + + + + ExportXHTMLDialog + + Export XHTML + 匯出 XHTML + + + Browse + 瀏覽 + + + Options + 選項 + + + Include image + 包含圖像 + + + show output of external scripts + 顯示外部命令稿的輸出 + + + Export + 匯出 + + + Cancel + 取消 + + + VYM - Export HTML to directory + VYM - 匯出 HTML 到目錄 + + + Critical Error + 嚴重錯誤 + + + Export to directory: + 匯出至目錄: + + + Colored headings in text + 文字中著色的標頭 + + + showWarnings e.g. if directory is not empty + showWarnings 例如:如果目錄並非為空 + + + Stylesheets + 樣式表 + + + CSS: + CSS: + + + XSL: + XSL: + + + VYM - Path to CSS file + VYM - 到 CSS 檔案的路徑 + + + VYM - Path to XSL file + VYM - 到 XSL 檔案的路徑 + + + Warning + 警告 + + + Save settings in map + 在圖中儲存設定值 + + + Scripts + 命令稿 + + + Before export: + 匯出之前: + + + After Export: + 匯出之後: + + + VYM - Path to pre export script + VYM - 到匯出前命令稿的路徑 + + + VYM - Path to post export script + VYM - 到匯出後命令稿的路徑 + + + The settings saved in the map would like to run scripts: + +%1 + +Please check, if you really +want to allow this in your system! + 在圖中儲存的設定值想要執行命令稿: + +%1 + +請檢查一下,是否真的允許在您的系統中如此做! + + + Could not open %1 + 無法開啟 %1 + + + Could not write %1 + 無法寫入 %1 + + + Could not start %1 + 無法開啟 %1 + + + %1 didn't exit normally + %1 並未正常離開 + + + + ExtraInfoDialog + + VYM - Info + VYM - 資訊 + + + Map: + 圖譜: + + + Author: + 作者: + + + Comment: + 註釋: + + + Statistics: + 統計: + + + Cancel + 取消 + + + Close + 關閉 + + + + FindWindow + + Clear + 清空 + + + Cancel + 取消 + + + Find + 尋找 + + + Find Text + 尋找文字 + + + + Main + + &File + 檔案(&F) + + + &New... + 新增(&N)… + + + &Open... + 開啟(&O)… + + + Save + 儲存 + + + &Save... + 儲存(&S)… + + + Save &As... + 另存新檔(&A)… + + + Import directory structure (experimental) + 匯入目錄結構 (實驗性質) + + + Print + 列印 + + + Close Map + 關閉圖譜 + + + &Close Map + 關閉圖譜(&C) + + + &Edit + 編輯(&E) + + + Undo + 復原 + + + &Undo + 復原(&U) + + + Copy + 複製 + + + &Copy + 複製(&C) + + + Cut + 剪下 + + + Cu&t + 剪下(&T) + + + Paste + 貼上 + + + &Paste + 貼上(&P) + + + Move branch up + 向上移動分支 + + + Move up + 向上移動 + + + Move branch down + 向下移動分支 + + + Move down + 向下移動 + + + Scroll branch + 捲曲分支 + + + Unscroll all + 復原所有捲曲 + + + Unscroll all scrolled branches + 復原所有已捲曲的分支 + + + Find + 尋找 + + + Find... + 尋找… + + + Open URL + 開啟 URL + + + Edit URL + 編輯 URL + + + Edit URL... + 編輯 URL… + + + Use heading of selected branch as URL + 使用已選取分支的標頭做為 URL + + + Use heading for URL + 使用標頭做為 URL + + + Jump to another vym map, if needed load it first + 跳到另外的 vym 圖譜,如果有需要就先載入它 + + + Jump to map + 跳到圖譜 + + + Edit link to another vym map + 編輯到另外 vym 圖譜的連結 + + + edit Heading + 編輯標頭 + + + Edit heading + 編輯標頭 + + + Delete Selection + 刪除選擇 + + + Add a branch as child of selection + 加入分支做為所選子項 + + + Add branch as child + 加入分支做為子項 + + + Add a branch above selection + 在所選之上加入分支 + + + Add branch above + 在上方加入分支 + + + Add a branch below selection + 在所選之下加入分支 + + + Add branch below + 在下方加入分支 + + + Select upper branch + 選取上層分支 + + + Select lower branch + 選取下層分支 + + + Select left branch + 選取左側分支 + + + Select right branch + 選取右側分支 + + + Select child branch + 選取子分支 + + + Select first branch + 選取首項分支 + + + Select last branch + 選取末項分支 + + + Add Image + 加入圖像 + + + Set Color + 設定顏色 + + + Set &Color + 設定顏色(&C) + + + Pick color +Hint: You can pick a color from another branch and color using CTRL+Left Button + 揀取顏色 +提示:您可以使用 CTRL+Left 按鈕,從另外的分支和顏色去揀取顏色 + + + Pic&k color + 揀取顏色(&K) + + + Color branch + 顏色分支 + + + Color &branch + 顏色分支(&B) + + + Color Subtree + 顏色子樹 + + + Color sub&tree + 顏色子樹(&T) + + + Line + 直線 + + + Linkstyle Line + 連結樣式 直線 + + + Linkstyle Parabel + 連結樣式 拋物線 + + + PolyLine + 多重直線 + + + Linkstyle Thick Line + 連結樣式 粗線 + + + PolyParabel + 多重拋物線 + + + Linkstyle Thick Parabel + 連結樣式 粗拋物線 + + + No Frame + 無圖框 + + + Rectangle + 矩形 + + + Use same color for links and headings + 使用相同顏色做為連結和標頭 + + + &Use color of heading for link + 使用標頭的顏色做為連結(&U) + + + Set Link Color + 設定連結顏色 + + + Set &Link Color... + 設定連結顏色(&L)… + + + Set Background Color + 設定背景顏色 + + + Set &Background Color + 設定背景顏色(&B) + + + &View + 檢視(&V) + + + Zoom reset + 重置縮放 + + + reset Zoom + 重置縮放 + + + Zoom in + 放大 + + + Zoom out + 縮小 + + + &Next Window + 下一個視窗(&N) + + + Next Window + 下一個視窗 + + + &Previous Window + 前一個視窗(&P) + + + Previous Window + 前一個視窗 + + + &Settings + 設定值(&S) + + + Set application to open pdf files + 設定開啟 pdf 檔案的應用程式 + + + Set application to open an URL + 設定開啟 URL 的應用程式 + + + Edit branch after adding it + 加入分支之後編輯它 + + + Select branch after adding it + 加入分支之後選取它 + + + Select heading before editing + 編輯標頭之前選取它 + + + Select existing heading + 選取現有標頭 + + + &Test + 測試(&T) + + + test flag + 測試旗標 + + + &Help + 求助(&H) + + + Open VYM Documentation (pdf) + 開啟 VYM 文件 (pdf) + + + About VYM + 關於 VYM + + + Information about QT toolkit + 關於 QT 工具組的資訊 + + + About QT + 關於 QT + + + Save image + 儲存圖像 + + + Overwrite + 覆寫 + + + Cancel + 取消 + + + Couldn't save + 無法儲存 + + + Save modified map before closing it + 關閉已修改圖譜之前儲存它 + + + Discard changes + 捨棄變更 + + + This map is not saved yet. Do you want to + 此圖譜尚未儲存。您想要 + + + Save map + 儲存圖譜 + + + Critical Error + 嚴重錯誤 + + + Save &As + 另存新檔(&A) + + + Open Recent + 開啟最近使用 + + + Export + 匯出 + + + Edit Map Info + 編輯圖譜資訊 + + + Edit Map Info... + 編輯圖譜資訊… + + + Open anyway + 無論如何都開啟 + + + Export XML to directory + 匯出 XML 到目錄 + + + Critcal error + 嚴重錯誤 + + + Couldn't find the documentation +vym.pdf in various places. + 在各處都找不到文件 vym.pdf。 + + + Create + 建立 + + + Create URL to Bugzilla + 建立到 Bugzilla 的 URL + + + Delete link to another vym map + 刪除到另外 vym 圖譜的連結 + + + Edit vym link + 編輯 vym 連結 + + + Edit vym link... + 編輯 vym 連結… + + + Delete vym link + 刪除 vym 連結 + + + Critical Load Error + 嚴重的載入錯誤 + + + Couldn't find a map (*.xml) in .vym archive. + + 在 .vym 檔案夾中找不到圖譜 (*.xml)。 + + + VYM -Information: + VYM - 資訊: + + + compressed (vym default) + 已壓縮 (vym 預設) + + + uncompressed + 未壓縮 + + + Add map at selection + 於所選處加入圖譜 + + + Replace selection with map + 以圖譜置換所選 + + + Save selection + 儲存所選 + + + Load vym map + 載入 vym 圖譜 + + + Import: Add vym map to selection + 匯入:加入 vym 圖譜到所選 + + + Import: Replace selection with vym map + 匯入:以 vym 圖譜置換所選 + + + Save Error + 儲存錯誤 + + + +could not be removed before saving + 儲存之前無法移除 + + + Use modifier to color branches + 於顏色分支使用修飾鍵 + + + New map + File menu + 新圖譜 + + + Open + File menu + 開啟 + + + File Actions + 檔案動作 + + + Edit Actions + 編輯動作 + + + View Actions + 檢視動作 + + + Modes when using modifiers + 使用修飾鍵時模式 + + + Standard Flags + 標準旗標 + + + Add a branch by inserting and making selection its child + 藉由插入加入分支並選擇它的子項 + + + Add branch (insert) + 加入分支 (插入) + + + Remove only branch and keep its childs + 只移除分支並保持它的子項 + + + Remove only branch + 只移除分支 + + + Remove childs of branch + 移除分支的子項 + + + Remove childs + 移除子項 + + + Use modifier to copy + 使用修飾鍵去複製 + + + Add + 加入 + + + Remove + 移除 + + + Edit XLink + 編輯 XLink + + + Goto XLink + 前往 XLink + + + No xLink available + 沒有可用的 xLink + + + Use modifier to draw xLinks + 使用修飾鍵去繪製 xLinks + + + Use exclusive flags in flag toolbars + 在旗標工具列中使用互斥旗標 + + + Set application to open external links + 設定開啟外部連結的應用程式 + + + Pasting into new branch + 貼入新分支中 + + + pasting into new branch + 貼入新分支中 + + + Delete key for deleting branches + 用於刪除分支的刪除鍵 + + + Delete key + 刪除鍵 + + + Exclusive flags + 互斥旗標 + + + The directory %1 is not empty. +Do you risk to overwrite its contents? + 目錄 %1 並未清空。 +您要冒險覆寫它的內容嗎? + + + The map %1 +is already opened.Opening the same map in multiple editors may lead + to confusion when finishing working with vym.Do you want to + 圖譜 %1 +已經開啟。在多個編輯器中開啟相同圖譜, +也許會在 vym 完成工作時造成困惑。您想要 + + + This map does not exist: + %1 +Do you want to create a new one? + 此圖譜不存在: + %1 +您要建立一個新的嗎? + + + The map %1 +did not use the compressed vym file format. +Writing it uncompressed will also write images +and flags and thus may overwrite files in the given directory + +Do you want to write the map + 圖譜 %1 +並未使用壓縮過的 vym 檔案格式。 +以未壓縮的方式寫入它將會寫入圖像和旗標, +因而也許會覆寫給定目錄中的檔案。 + +您要寫入圖譜 + + + Saved %1 + 已儲存 %1 + + + The file %1 +exists already. Do you want to + 檔案 %1 +已經存在。您想要 + + + The map %1 has been modified but not saved yet. Do you want to + 圖譜 %1 已被修改但尚未儲存。您想要 + + + Couldn't open map %1 + 無法開啟圖譜 %1 + + + Set application to open pdf files ... + 設定開啟 pdf 檔案的應用程式… + + + Set application to open external links... + 設定開啟外部連結的應用程式… + + + Exit + 離開 + + + E&xit + 離開(&X) + + + Redo + 重做 + + + &Redo + 重做(&R) + + + Create URL to FATE + 建立到 FATE 的 URL + + + Include top and bottom position of images into branch + 在分支中含入圖像頂部和底部的位置 + + + Include images vertically + 垂直地含入圖像 + + + Include left and right position of images into branch + 在分支中含入圖像的左右位置 + + + Include images horizontally + 水平地含入圖像 + + + Hide link + 隱藏連結 + + + Hide link if object is not selected + 如果物件並未選取就隱藏連結 + + + Note + Systemflag + 註記 + + + WWW Document (external) + Systemflag + WWW 文件 (外部) + + + Link to another vym map + Systemflag + 連結到另外的 vym 圖譜 + + + subtree is scrolled + Systemflag + 子樹已捲曲 + + + subtree is temporary scrolled + Systemflag + 子樹為暫時捲曲 + + + Take care! + Standardflag + 注意! + + + Really? + Standardflag + 真的? + + + ok! + Standardflag + 確定! + + + Not ok! + Standardflag + 未定! + + + This won't work! + Standardflag + 這不可行! + + + Good + Standardflag + 良好 + + + Bad + Standardflag + 不好 + + + Time critical + Standardflag + 關鍵時間 + + + Idea! + Standardflag + 點子! + + + Important + Standardflag + 重要 + + + Unimportant + Standardflag + 不重要 + + + I like this + Standardflag + 我喜歡 + + + I do not like this + Standardflag + 我不喜歡 + + + I just love... + Standardflag + 我就是喜愛… + + + Dangerous + Standardflag + 危險 + + + This will help + Standardflag + 會有用處 + + + Call test function + 呼叫測試功能 + + + Couldn't save %1 + 無法儲存 %1 + + + Import + 匯入 + + + KDE Bookmarks + KDE 書籤 + + + Export in Open Document Format used e.g. in Open Office + 匯出例如在 OpenOffice.org 使用的開放文件格式 + + + Export as ASCII + 匯出為 ASCII + + + (still experimental) + (仍然是實驗性質) + + + Export as LaTeX + 匯出為 LaTeX + + + &Print + 列印(&P) + + + Add map (insert) + 加入圖譜 (插入) + + + Add map (replace) + 加入圖譜 (置換) + + + Export as + 匯出為 + + + Export to + 匯出至 + + + Hide object in exports + 在匯出中隱藏物件 + + + Hide in exports + 隱藏在匯出中 + + + Hide object in exported maps + Systemflag + 在匯出的圖譜中隱藏物件 + + + Use hide flag during exports + 在匯出期間使用隱藏旗標 + + + Use hide flags + 使用隱藏旗標 + + + Open URL in new tab + 在新頁標中開啟 URL + + + Warning + 警告 + + + Couldn't find a viewer to open %1. + + 找不到檢視器以開啟 %1。 + + + Please use Settings-> + 請使用 設定值-> + + + Couldn't start %1 to open a new tab in %2. + 無法啟動 %1 以在 %2 中開啟新的頁標。 + + + Set application to open PDF files + 設定開啟 PDF 檔案的應用程式 + + + Oh no! + Standardflag + 噢,不要! + + + Call... + Standardflag + 呼叫… + + + Very important! + Standardflag + 很重要! + + + Very unimportant! + Standardflag + 很不重要! + + + Rose + Standardflag + 玫瑰 + + + Surprise! + Standardflag + 驚喜! + + + Info + Standardflag + 資訊 + + + Firefox Bookmarks + Firefox 書籤 + + + F&ormat + 格式(&O) + + + Show Note Editor + 顯示註記編輯器 + + + Show history window + 顯示歷史視窗 + + + Bookmarks + 書籤 + + + Couldn't start %1 to open a new tab + 無法啟動 %1 去開啟新的頁標 + + + Couldn't find configuration for export to Open Office + + 找不到用於匯出至 OpenOffice.org 的配置 + + + No matches found for "%1" + 找不到與「%1」相符者 + + + + MapEditor + + Critical Parse Error + 嚴重的解析錯誤 + + + Overwrite + 覆寫 + + + Cancel + 取消 + + + Critical Export Error + 嚴重的匯出錯誤 + + + Critical Error + 嚴重錯誤 + + + Enter URL: + 輸入 URL: + + + vym map + vym 圖譜 + + + Images + 圖像 + + + vym - save image as + vym - 儲存圖像為 + + + Critical Import Error + 嚴重的匯入錯誤 + + + Critical Parse Error by reading backupFile + 讀取備份檔時嚴重的解析錯誤 + + + New Map + Heading of mapcenter in new map + 新圖譜 + + + The file %1 exists already. +Do you want to overwrite it? + 檔案 %1 已經存在。您要覆寫它嗎? + + + MapEditor::exportXML couldn't open %1 + MapEditor::exportXML 無法開啟 %1 + + + Temporary directory %1 used for undo is gone. +I will create a new one, but at the moment no undo is available. +Maybe you want to reload your original data. + +Sorry for any inconveniences. + 用於復原的暫存目錄 %1 已經不見。 +我將建立一個新的,但是目前沒有任何復原可用。 +您也許想要重新載入原來的資料。 + +造成您的困擾請多多包涵。 + + + Cannot find the directory %1 + 找不到目錄 %1 + + + Link to another map + 連結到另外的圖譜 + + + Load image + 載入圖像 + + + Save image as %1 + 儲存圖像為 %1 + + + Choose directory structure to import + 選擇目錄結構以匯入 + + + unnamed + 未命名 + + + Warning + 警告 + + + Couldn't find script %1 +to notifiy Browsers of changed bookmarks. + 找不到命令稿 %1 +以在瀏覽器中註記變更的書籤。 + + + + QObject + + This is not an image. + 這並非圖像。 + + + Critical Export Error + 重要匯出錯誤 + + + Could not write %1 + 無法寫入 %1 + + + Export failed. + 匯出失敗。 + + + Check "%1" in +%2 + 在 %2 中檢查「%1」 + + + Could not read %1 + 無法讀取 %1 + + + Critical Error + 嚴重錯誤 + + + Couldn't start zip to compress data. + 無法啟動 zip 去壓縮資料。 + + + zip didn't exit normally + zip 並未正常離開 + + + Couldn't start unzip to decompress data. + 無法啟動 unzip 去解壓縮資料。 + + + unzip didn't exit normally + unzip 並未正常離開 + + + Could not start %1 + 無法啟動 %1 + + + %1 didn't exit normally + %1 並未正常離開 + + + The file %1 exists already. +Do you want to overwrite it? + 檔案 %1 已經存在。 +您要覆寫它嗎? + + + Overwrite + 覆寫 + + + Cancel + 取消 + + + Sorry, no preview for +multiple selected files. + 抱歉,無法預覽多個已選檔案。 + + + Exporting the %1 bookmarks will overwrite +your existing bookmarks file. + 匯出 %1 書籤將會覆寫 +您的現有書籤檔案。 + + + Warning: Overwriting %1 bookmarks + 警告:正在覆寫 %1 項書籤 + + + Warning + 警告 + + + Couldn't find script %1 +to notifiy Browsers of changed bookmarks. + 找不到命令稿 %1 +去在瀏覽器中註記變更的書籤。 + + + + ShowTextDialog + + VYM - Info + VYM - 資訊 + + + Close + 關閉 + + + History of %1 + %1 的歷史記錄 + + + + TextEditor + + &File + 檔案(&F) + + + Import + 匯入 + + + &Import... + 匯入(&I)… + + + &Export... + 匯出(&E)… + + + Print Note + 列印註記 + + + &Print... + 列印(&P)… + + + &Edit + 編輯(&E) + + + Undo + 復原 + + + &Undo + 復原(&U) + + + Redo + 重做 + + + &Redo + 重做(&R) + + + Select and copy all + 全部選取並複製 + + + Select and copy &all + 全部選取並複製(&A) + + + Copy + 複製 + + + &Copy + 複製(&C) + + + Cut + 剪下 + + + Cu&t + 剪下(&T) + + + Paste + 貼上 + + + &Paste + 貼上(&P) + + + Delete all + 刪除全部 + + + &Delete All + 刪除全部(&D) + + + &Settings + 設定值(&S) + + + Set fixed font + 設定定寬字型 + + + Set &fixed font + 設定定寬字型(&F) + + + Set variable font + 設定變寬字型 + + + Set &variable font + 設定變寬字型(&V) + + + Used fixed font by default + 預設使用的定寬字型 + + + &fixed font is default + 定寬字型為預設(&F) + + + Export Note (HTML) + 匯出註記 (HTML) + + + Export Note As (HTML) + 匯出註記為 (HTML) + + + Export &As... (HTML) + 匯出為(HTML)(&A)… + + + Export Note As (ASCII) + 匯出註記為 (ASCII) + + + Export &As...(ASCII) + 匯出為(ASCII)(&A)… + + + &Color... + 顏色(&C)… + + + &Bold + 粗體(&B) + + + &Italic + 斜體(&I) + + + &Underline + 底線(&U) + + + &Left + 靠左(&L) + + + C&enter + 置中(&E) + + + &Right + 靠右(&R) + + + &Justify + 對齊(&J) + + + Export Note to single file + 匯出註記到單一檔案 + + + The file + 檔案 + + + exists already. Do you want to overwrite it? + 已經存在。您要覆寫它嗎? + + + Overwrite + 覆寫 + + + Cancel + 取消 + + + Couldn't export note + 無法匯出註記 + + + Export Note to single file (ASCII) + 匯出註記到單一檔案 (ASCII) + + + Convert paragraphs to linebreaks + 轉換段落為斷列 + + + &Convert Paragraphs + 轉換段落(&C) + + + Join all lines of a paragraph + 聯結段落中所有的列 + + + &Join lines + 聯結各列(&J) + + + Toggle font hint for the whole text + 切換整篇文字的字型修飾 + + + &Font hint + 字型修飾(&F) + + + Subs&cript + 下標(&C) + + + Su&perscript + 上標(&P) + + + Note Editor + 註記編輯器 + + + F&ormat + 格式(&O) + + + + WarningDialog + + VYM - Warning : Foo... + VYM - 警告:Foo… + + + textLabel + textLabel + + + showAgainBox + showAgainBox + + + Proceed + 繼續 + + + Show this message again + 再次顯示此訊息 + + + Cancel + 取消 + + + Ok + 確定 + + + diff -r bd98be838da9 -r 85683324f94a mainwindow.cpp --- a/mainwindow.cpp Mon Mar 16 15:40:49 2009 +0000 +++ b/mainwindow.cpp Thu Mar 19 11:48:33 2009 +0000 @@ -342,10 +342,15 @@ fileImportMenu = fileMenu->addMenu (tr("Import","File menu")); - a = new QAction(tr("KDE Bookmarks"), this); - a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE bookmarks"))); + a = new QAction(tr("KDE 3 Bookmarks"), this); + a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE 3 bookmarks"))); a->addTo (fileImportMenu); - connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDEBookmarks() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDE3Bookmarks() ) ); + + a = new QAction(tr("KDE 4 Bookmarks"), this); + a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE 4 bookmarks"))); + a->addTo (fileImportMenu); + connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDE4Bookmarks() ) ); if (settings.value( "/mainwindow/showTestMenu",false).toBool()) { @@ -398,9 +403,14 @@ connect( a, SIGNAL( triggered() ), this, SLOT( fileExportCSV() ) ); fileExportMenu->addAction (a); - a = new QAction( tr("KDE Bookmarks","File menu"), this); - a->setStatusTip( tr( "Export as %1").arg(tr("KDE Bookmarks" ))); - connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDEBookmarks() ) ); + a = new QAction( tr("KDE 3 Bookmarks","File menu"), this); + a->setStatusTip( tr( "Export as %1").arg(tr("KDE 3 Bookmarks" ))); + connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDE3Bookmarks() ) ); + fileExportMenu->addAction (a); + + a = new QAction( tr("KDE 4 Bookmarks","File menu"), this); + a->setStatusTip( tr( "Export as %1").arg(tr("KDE 4 Bookmarks" ))); + connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDE4Bookmarks() ) ); fileExportMenu->addAction (a); a = new QAction( "Taskjuggler...", this ); @@ -2066,11 +2076,19 @@ fileSaveAs (CompleteMap); } -void Main::fileImportKDEBookmarks() +void Main::fileImportKDE3Bookmarks() { - ImportKDEBookmarks im; + ImportKDE3Bookmarks im; im.transform(); - if (success==fileLoad (im.getTransformedFile(),NewMap) && currentMapEditor() ) + if (aborted!=fileLoad (im.getTransformedFile(),NewMap) && currentMapEditor() ) + currentMapEditor()->setFilePath (""); +} + +void Main::fileImportKDE4Bookmarks() +{ + ImportKDE4Bookmarks im; + im.transform(); + if (aborted!=fileLoad (im.getTransformedFile(),NewMap) && currentMapEditor() ) currentMapEditor()->setFilePath (""); } @@ -2092,7 +2110,7 @@ { im.setFile (*it); if (im.transform() && - success==fileLoad (im.getTransformedFile(),NewMap,FreemindMap) && + aborted!=fileLoad (im.getTransformedFile(),NewMap,FreemindMap) && currentMapEditor() ) currentMapEditor()->setFilePath (""); ++it; @@ -2232,9 +2250,20 @@ } } -void Main::fileExportKDEBookmarks() //FIXME not scriptable yet +void Main::fileExportKDE3Bookmarks() //FIXME not scriptable yet { - ExportKDEBookmarks ex; + ExportKDE3Bookmarks ex; + MapEditor *me=currentMapEditor(); + if (me) + { + ex.setModel (me->getModel()); + ex.doExport(); + } +} + +void Main::fileExportKDE4Bookmarks() //FIXME not scriptable yet +{ + ExportKDE4Bookmarks ex; MapEditor *me=currentMapEditor(); if (me) { diff -r bd98be838da9 -r 85683324f94a mainwindow.h --- a/mainwindow.h Mon Mar 16 15:40:49 2009 +0000 +++ b/mainwindow.h Thu Mar 19 11:48:33 2009 +0000 @@ -1,34 +1,38 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include -#include "xml.h" +#include "branchpropwindow.h" +#include "file.h" +#include "findwindow.h" +#include "historywindow.h" +#include "mapeditor.h" +#include "simplescripteditor.h" #include "texteditor.h" -#include "mapeditor.h" -#include "findwindow.h" + class Main : public QMainWindow { Q_OBJECT public: - Main(QWidget* parent=0, const char* name=0, WFlags f=0); + /*! Modifier modes are used when CTRL together with a mouse button is pressed */ + enum ModMode { + ModModeNone, //!< Unused + ModModeColor, //!< Pick color from object + ModModeCopy, //!< Copy object + ModModeXLink //!< Create a XLink (XLinkObj) from selected object + }; + + Main(QWidget* parent=0, const char* name=0, Qt::WFlags f=0); ~Main(); void loadCmdLine(); void statusMessage (const QString &); public slots: void fileNew(); + void fileNewCopy(); protected: void closeEvent( QCloseEvent* ); @@ -38,72 +42,107 @@ void setupEditActions(); void setupFormatActions(); void setupViewActions(); + void setupModeActions(); void setupWindowActions(); + void setupFlag(FlagObj *fo, QToolBar *tb, bool aw, const QString &name, const QString &tooltip); void setupFlagActions(); + void setupNetworkActions(); void setupSettingsActions(); void setupTestActions(); void setupHelpActions(); void setupContextMenus(); - void setupLastMapsMenu(); + void setupRecentMapsMenu(); + void setupMacros(); void hideEvent (QHideEvent * ); void showEvent (QShowEvent * ); - bool reallyWriteDirectory(const QString&); - QString browseDirectory(const QString&); MapEditor* currentMapEditor() const; private slots: - void newView(); void editorChanged(QWidget*); - void fileLoad(QString ,const LoadMode &); + ErrorCode fileLoad(QString ,const LoadMode &, const FileType & ftype=VymMap); void fileLoad(const LoadMode &); void fileLoad(); - void fileLoadLast(int); - void fileSave(const SaveMode & ); + void fileLoadRecent(); + void addRecentMap (const QString &); + void fileSave(MapEditor*, const SaveMode & ); void fileSave(); +public slots: + void fileSave(MapEditor *); // autosave from MapEditor +private slots: void fileSaveAs(const SaveMode &); void fileSaveAs(); + void fileImportKDE3Bookmarks(); + void fileImportKDE4Bookmarks(); + void fileImportFirefoxBookmarks(); + void fileImportFreemind(); + void fileImportMM(); void fileImportDir(); void fileExportXML(); - void fileExportHTML(); void fileExportXHTML(); - void fileExportImage(int); + void fileExportImage(); void fileExportASCII(); + void fileExportCSV(); + void fileExportLaTeX(); + void fileExportKDE3Bookmarks(); + void fileExportKDE4Bookmarks(); + void fileExportTaskjuggler(); + void fileExportOOPresentation(); void fileCloseMap(); void filePrint(); void fileExitVYM(); +public slots: void editUndo(); void editRedo(); + void gotoHistoryStep (int); +private slots: void editCopy(); void editPaste(); void editCut(); void editOpenFindWindow(); void editFind(QString); void editFindChanged(); +private: + void openTabs(QStringList); public slots: void editOpenURL(); + void editOpenURLTab(); private slots: + void editOpenMultipleURLTabs(); void editURL(); + void editLocalURL(); void editHeading2URL(); void editBugzilla2URL(); + void editFATE2URL(); + void openVymLinks(const QStringList &); void editVymLink(); + void editOpenMultipleVymLinks(); + void editHeadingFinished(); + void editAttributeFinished(); public slots: + void editHeading(); + void editAttribute(); void editOpenVymLink(); private slots: void editDeleteVymLink(); + void editToggleHideExport(); void editMapInfo(); void editMoveUp(); void editMoveDown(); + void editSortChildren(); void editToggleScroll(); - void editUnScrollAll(); - void editHeading(); + void editUnscrollChilds(); + void editAddMapCenter(); void editNewBranch(); + void editNewBranchBefore(); void editNewBranchAbove(); void editNewBranchBelow(); void editImportAdd(); void editImportReplace(); void editSaveBranch(); + void editDeleteKeepChilds(); + void editDeleteChilds(); void editDeleteSelection(); void editUpperBranch(); void editLowerBranch(); @@ -112,33 +151,61 @@ void editFirstBranch(); void editLastBranch(); void editLoadImage(); - void editSaveImage(int); - void editToggleFloatExport(); + void editSaveImage(); + void editFollowXLink (QAction *); + void editEditXLink (QAction *); void formatSelectColor(); void formatPickColor(); void colorChanged(QColor); - void formatColorItem(); void formatColorBranch(); + void formatColorSubtree(); void formatLinkStyleLine(); void formatLinkStyleParabel(); void formatLinkStylePolyLine(); void formatLinkStylePolyParabel(); void formatSelectBackColor(); + void formatSelectBackImage(); void formatSelectLinkColor(); + void formatSelectSelectionColor(); void formatToggleLinkColorHint(); - void formatFrameNone(); - void formatFrameRectangle(); + void formatHideLinkUnselected(); void viewZoomReset(); void viewZoomIn(); void viewZoomOut(); + void viewCenter(); public slots: + void networkStartServer(); + void networkConnect(); bool settingsPDF(); bool settingsURL(); + void settingsMacroDir(); + void settingsToggleDelKey(); + void settingsUndoLevels(); + void settingsAutosaveToggle(); + void settingsAutosaveTime(); + void settingsWriteBackupFileToggle(); + void settingsToggleAnimation(); void windowToggleNoteEditor(); + void windowToggleHistory(); + void windowToggleProperty(); + void updateHistory(SimpleSettings &); + void windowToggleAntiAlias(); + void windowToggleSmoothPixmap(); + void updateNoteFlag(); + void updateSatellites(MapEditor *); + void updateActions(); + ModMode getModMode(); + bool autoEditNewBranch(); + bool autoSelectNewBranch(); + bool useFlagGroups(); + void setScript(const QString &); + void runScript(const QString &); + void runScriptEverywhere (const QString &); + private slots: void windowNextEditor(); void windowPreviousEditor(); @@ -147,20 +214,129 @@ void standardFlagChanged(); - void testFunction(); - void testShowClipboard(); + void testFunction1(); + void testFunction2(); + void testCommand(); void helpDoc(); + void helpDemo(); void helpAbout(); void helpAboutQT(); + void callMacro (); + private: - QCanvas* canvas; QTabWidget *tabWidget; FindWindow *findWindow; - QStringList lastMaps; - int maxLastMaps; - QString lastFileDir; + QProcess *procBrowser; + + QStringList imageTypes; + + QLineEdit *lineedit; // to enter headings of branches + QString prevSelection; + + HistoryWindow *historyWindow; + + BranchPropertyWindow *branchPropertyWindow; + SimpleScriptEditor *scriptEditor; + + QList actionListBranches; + + QColor currentColor; + + int xLinkMenuWidth; + + QMenu *recentFilesMenu; + enum { MaxRecentFiles = 9 }; + QAction *recentFileActions[MaxRecentFiles]; + + QAction *macroActions[12]; + QStringList macro; + + QAction* actionFileNewCopy; + QAction* actionFileSave; + QAction* actionFilePrint; + QAction* actionEditUndo; + QAction* actionEditRedo; + QAction *actionEditCopy; + QAction *actionEditCut; + QAction *actionEditPaste; + QAction *actionEditMoveUp; + QAction *actionEditMoveDown; + QAction *actionEditSortChildren; + QAction *actionEditToggleScroll; + QAction* actionEditOpenURL; + QAction* actionEditOpenURLTab; + QAction* actionEditOpenMultipleURLTabs; + QAction* actionEditURL; + QAction* actionEditLocalURL; + QAction* actionEditHeading2URL; + QAction* actionEditBugzilla2URL; + QAction* actionEditFATE2URL; + QAction *actionEditOpenVymLink; + QAction *actionEditOpenMultipleVymLinks; + QAction *actionEditVymLink; + QAction *actionEditDeleteVymLink; + QAction *actionEditToggleHideExport; + QAction *actionEditMapInfo; + QAction *actionEditHeading; + QAction *actionEditDelete; + QAction *actionEditAddMapCenter; + QAction *actionEditAddBranch; + QAction *actionEditAddBranchBefore; + QAction *actionEditAddBranchAbove; + QAction *actionEditAddBranchBelow; + QAction *actionEditDeleteKeepChilds; + QAction *actionEditDeleteChilds; + QAction *actionEditImportAdd; + QAction *actionEditImportReplace; + QAction *actionEditSaveBranch; + QAction *actionEditSelectFirst; + QAction *actionEditSelectLast; + QAction *actionEditLoadImage; + + QAction* actionFormatColor; + QAction* actionFormatPickColor; + QAction* actionFormatColorBranch; + QAction* actionFormatColorSubtree; + QAction* actionFormatLinkColorHint; + QAction* actionFormatBackColor; + QAction* actionFormatBackImage; + QAction* actionFormatLinkColor; + QAction* actionFormatSelectionColor; + + QActionGroup* actionGroupModModes; + QAction* actionModModeColor; + QAction* actionModModeXLink; + QAction* actionModModeCopy; + + QActionGroup *actionGroupFormatFrameTypes; + + + QActionGroup *actionGroupFormatLinkStyles; + QAction *actionFormatLinkStyleLine; + QAction *actionFormatLinkStyleParabel; + QAction *actionFormatLinkStylePolyLine; + QAction *actionFormatLinkStylePolyParabel; + QAction *actionFormatHideLinkUnselected; + + QAction *actionViewToggleNoteEditor; + QAction *actionViewToggleHistoryWindow; + QAction *actionViewTogglePropertyWindow; + QAction *actionViewToggleAntiAlias; + QAction *actionViewToggleSmoothPixmapTransform; + QAction* actionViewCenter; + + QAction* actionSettingsAutoEditNewBranch; + QAction* actionSettingsAutoSelectNewBranch; + QAction* actionSettingsAutoSelectText; + QAction* actionSettingsUseDelKey; + QAction* actionSettingsUseFlagGroups; + QAction* actionSettingsUseHideExport; + QAction* actionSettingsAutosaveToggle; + QAction* actionSettingsAutosaveTime; + QAction* actionSettingsWriteBackupFile; + QAction* actionSettingsUseAnimation; }; diff -r bd98be838da9 -r 85683324f94a mapeditor.cpp --- a/mapeditor.cpp Mon Mar 16 15:40:49 2009 +0000 +++ b/mapeditor.cpp Thu Mar 19 11:48:33 2009 +0000 @@ -301,6 +301,9 @@ mapAttr+= attribut("author",model->getAuthor()) + attribut("comment",model->getComment()) + attribut("date",model->getDate()) + + attribut("date",model->getDate()) + + attribut("countBranches", QString().number(model->countBranches())) + + attribut("backgroundColor", mapScene->backgroundBrush().color().name() ) + attribut("selectionColor", xelection.getColor().name() ) + attribut("linkStyle", ls ) + @@ -1854,7 +1857,7 @@ if (!saveStringToDisk(fileDir+mapFileName,saveFile)) { err=aborted; - QMessageBox::critical (0,"Critical error in MapEditor::save",QString("could not sage %1").arg(fileDir+mapFileName)); + QMessageBox::critical (0,"Critical error in MapEditor::save",QString("could not save %1").arg(fileDir+mapFileName)); } if (zipped) @@ -5283,6 +5286,12 @@ void MapEditor::autosave() { + if (filePath=="") + { + if (debug) cout <<" ME::autosave rejected, no filepath available\n"; + return; + } + QDateTime now=QDateTime().currentDateTime(); /* FIXME debug cout << "ME::autosave checking "<0) return; diff -r bd98be838da9 -r 85683324f94a scripts/update-bookmarks --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/update-bookmarks Thu Mar 19 11:48:33 2009 +0000 @@ -0,0 +1,9 @@ +#!/bin/bash + +# Look for running konquerors and notify them of changed bookmarks file +dcop | grep konqueror- | xargs -iKONQUI dcop KONQUI KBookmarkManager-$HOME/.kde/share/apps/konqueror/bookmarks.xml notifyCompleteChange "dcop" + + +# And now the same using QDBUS in KDE 4: + +qdbus| grep konqueror- | xargs -iOBJECT qdbus OBJECT /KBookmarkManager/konqueror org.kde.KIO.KBookmarkManager.notifyCompleteChange diff -r bd98be838da9 -r 85683324f94a tex/vym.changelog --- a/tex/vym.changelog Mon Mar 16 15:40:49 2009 +0000 +++ b/tex/vym.changelog Thu Mar 19 11:48:33 2009 +0000 @@ -1,8 +1,15 @@ +------------------------------------------------------------------- +Tue Mar 17 15:30:56 CET 2009 - uwedr@suse.de + +- Version: 1.12.2f +- Bugfix: Import/Export bookmarks works now also on KDE 4 +- Feature: Added traditional chinese translation + ------------------------------------------------------------------- Tue Mar 10 13:46:12 CET 2009 - uwedr@suse.de - Version: 1.12.2e - Bugfix: Don't check for changes in file, if map was closed already +- Bugfix: Don't check for changes in file, if map was closed already ------------------------------------------------------------------- Tue Mar 10 12:23:21 CET 2009 - uwedr@suse.de diff -r bd98be838da9 -r 85683324f94a version.h --- a/version.h Mon Mar 16 15:40:49 2009 +0000 +++ b/version.h Thu Mar 19 11:48:33 2009 +0000 @@ -4,10 +4,10 @@ #include #define __VYM_NAME "VYM" -#define __VYM_VERSION "1.12.2e" +#define __VYM_VERSION "1.12.2f" #define __VYM_CODENAME "Maintenance Update " //#define __VYM_CODENAME "Codename: development version" -#define __VYM_BUILD_DATE "2009-03-10" +#define __VYM_BUILD_DATE "2009-03-18" bool checkVersion(const QString &); diff -r bd98be838da9 -r 85683324f94a vym.pro --- a/vym.pro Mon Mar 16 15:40:49 2009 +0000 +++ b/vym.pro Thu Mar 19 11:48:33 2009 +0000 @@ -1,39 +1,57 @@ -TARGET = vym -TRANSLATIONS += vym_de.ts - TEMPLATE = app LANGUAGE = C++ -CONFIG += qt warn_on release +CONFIG += qt warn_on release debug +CONFIG += x86 ppc -DESTROOT = /usr +TRANSLATIONS += lang/vym_de.ts +TRANSLATIONS += lang/vym_en.ts +TRANSLATIONS += lang/vym_es.ts +TRANSLATIONS += lang/vym_fr.ts +TRANSLATIONS += lang/vym_it.ts +TRANSLATIONS += lang/vym_pt_BR.ts +TRANSLATIONS += lang/vym_ru.ts +TRANSLATIONS += lang/vym_zh_CN.ts +TRANSLATIONS += lang/vym_zh_TW.ts -target.path = $${DESTROOT}/bin -INSTALLS += target +# Manifest embedding was suggested by Qt docs somewhere... +win32: CONFIG += embed_manifest_exe -support.files = styles/ scripts/ icons/ -support.path = $${DESTROOT}/share/vym -INSTALLS += support +# Without this, M_PI, and M_PI_2 won`t be defined. +win32:DEFINES *= _USE_MATH_DEFINES -doc.files = doc/* -doc.path = $${DESTROOT}/share/doc/packages/vym -INSTALLS += doc +ICON =icons/vym.icns -demo.files = demos/ -demo.path = $${DESTROOT}/share/vym -INSTALLS += demo +QT += qt3support +QT += network - -HEADERS += branchobj.h \ +HEADERS += \ + aboutdialog.h \ + animpoint.h \ + attribute.h \ + attributedelegate.h\ + attributedialog.h \ + attributewidget.h \ + branchobj.h \ + branchpropwindow.h\ + editxlinkdialog.h \ + exportoofiledialog.h \ + exportxhtmldialog.h\ exports.h \ + extrainfodialog.h \ + file.h \ findwindow.h \ flagobj.h \ flagrowobj.h \ floatimageobj.h \ floatobj.h \ frameobj.h \ + geometry.h \ headingobj.h \ + highlighter.h \ + historywindow.h \ imageobj.h \ + imports.h \ linkablemapobj.h \ mainwindow.h \ mapcenterobj.h \ @@ -41,24 +59,52 @@ mapobj.h \ misc.h \ noteobj.h \ + options.h \ ornamentedobj.h \ + parser.h \ process.h \ selection.h \ + showtextdialog.h\ + simplescripteditor.h\ texteditor.h \ version.h \ - xml.h \ + vymmodel.h \ + xlinkobj.h \ + xml-base.h \ + xml-vym.h \ + xml-freemind.h \ + xmlobj.h\ + xsltproc.h \ settings.h \ - options.h -SOURCES += branchobj.cpp \ + warningdialog.h + +SOURCES += \ + aboutdialog.cpp \ + animpoint.cpp \ + attribute.cpp \ + attributedelegate.cpp \ + attributedialog.cpp \ + attributewidget.cpp \ + branchobj.cpp \ + branchpropwindow.cpp \ + editxlinkdialog.cpp \ + exportoofiledialog.cpp \ exports.cpp \ + exportxhtmldialog.cpp \ + extrainfodialog.cpp \ + file.cpp \ findwindow.cpp \ flagobj.cpp \ flagrowobj.cpp \ floatimageobj.cpp \ floatobj.cpp \ frameobj.cpp \ + geometry.cpp \ headingobj.cpp \ + highlighter.cpp \ + historywindow.cpp \ imageobj.cpp \ + imports.cpp \ linkablemapobj.cpp \ main.cpp \ mainwindow.cpp \ @@ -67,15 +113,78 @@ mapobj.cpp \ misc.cpp \ noteobj.cpp \ + options.cpp \ ornamentedobj.cpp \ + parser.cpp \ process.cpp \ selection.cpp \ + showtextdialog.cpp \ + simplescripteditor.cpp \ texteditor.cpp \ - xml.cpp \ + version.cpp \ + vymmodel.cpp \ + xlinkobj.cpp \ + xml-base.cpp \ + xml-vym.cpp \ + xml-freemind.cpp \ + xmlobj.cpp \ + xsltproc.cpp \ settings.cpp \ - options.cpp -FORMS = exporthtmldialog.ui \ + warningdialog.cpp + +FORMS = \ + attributewidget.ui \ + branchpropwindow.ui \ exportxhtmldialog.ui \ + extrainfodialog.ui \ + editxlinkdialog.ui \ + historywindow.ui \ + simplescripteditor.ui \ showtextdialog.ui \ - extrainfodialog.ui + warningdialog.ui +win32 { + HEADERS += mkdtemp.h + SOURCES += mkdtemp.cpp + RC_FILE = vym.rc +} + +#The following lines were inserted by qt3to4 +QT += xml + +TARGET = vym + + +isEmpty( PREFIX ) { + PREFIX = /usr/local + count( INSTALLDIR, 1 ) { + PREFIX = $${INSTALLDIR} + message( "Please use PREFIX instead of INSTALLDIR" ) + } +} +isEmpty( BINDIR ) { + BINDIR = $${PREFIX}/bin +} +isEmpty( DATADIR ) { + DATADIR = $${PREFIX}/share +} +isEmpty( DOCDIR ) { + DOCDIR = $${DATADIR}/doc/packages/vym +} + +message( "Installation directory" ) +message( $$PREFIX ) + + +target.path = $${BINDIR} +INSTALLS += target + +support.files = styles/ scripts/ icons/ flags/ lang/ macros/ exports/ demos/ +support.path = $${DATADIR}/vym +INSTALLS += support + +doc.files = doc/vym.pdf +doc.path = $${DOCDIR} +INSTALLS += doc +DEFINES += VYM_DOCDIR=\\\"$${DOCDIR}\\\" + diff -r bd98be838da9 -r 85683324f94a vymmodel.cpp --- a/vymmodel.cpp Mon Mar 16 15:40:49 2009 +0000 +++ b/vymmodel.cpp Thu Mar 19 11:48:33 2009 +0000 @@ -123,7 +123,6 @@ MapCenterObj *VymModel::getMapCenterNum (int i) { - cout << "MCO i="<