OpenVanilla 專案的近況

我們最近又修改了 OpenVanilla 專案的程式碼的一些地方,包括:

1. 新的偏好設定工具

我們最近整個重寫了 Mac OS X 版本的偏好設定工具。新的偏好設定中,一方面外觀有所不同,另一方面也簡化了各項設定的操作方式。比方說,我們將原本散落在三個 tab 中的各項設定,精簡集中在同一個 tab 上;如果您移除了、或是從來沒有安裝過某些模組,例如藏文輸入法等,也便不會顯示在設定頁面中。

在設定用來切換輸入法或啟用/停用輸出轉換模組的快捷鍵時,也改用像是「系統偏好設定」中設定快速鍵的方式,只要直接按下鍵盤上的按鍵組合便可完成設定,而不用從下拉選單中慢慢選擇某組設定。

Picture 1

Picture 2

2. 程式碼的重整

我們重新整理了 Mac OS X 版本的模組載入器(Loader)以及 CocoaVanilla Framework 的程式碼,大幅改寫了原本不安全的部份。例如,我們在呼叫外部應用程式時(例如叫出偏好設定程式),我們改呼叫 Cocoa 提供的 API,而不是呼叫 system() 函式。

3. 文件工作

因為許多開發者的需求,我們也開始著手撰寫開發者文件。因為這個專案主要使用 C++ 與 Objectve-C 語言開發,所以我們使用 headerdoc 作為我們的文件工具。

我們已經在 OpenVanilla.h 這個檔案中加入了相當的註解-OpenVanilla.h 是 OpenVanilla 專案最重要的一份定義,包括撰寫一套 OpenVanilla 模組所需要使用的各種物件定義與函式。如果您使用 Mac OS X、安裝了 Xcode,也從我們的 svn repository 中取得了一份 OpenVanilla 的程式碼,便可以直接使用 headerdoc2html,從各個 header file 中,產生 HTML 格式的說明文件。

4. 開發環境與工具

接下來,我們會只使用 Mac OS X 10.5 SDK 以及 Xcode 3 或是更新版本的 Xcode,開發 OpenVanilla。我們會開始使用一些原本在 10.4 SDK 所沒有的 API 以及檔案格式,例如,前述的新版偏好設定工具,介面上就全部使用 xib 檔案,而不是使用 nib 檔案。

我們還是會繼續推出供 10.4 使用的版本,但是,如果您想要自行編譯 OpenVanilla,或是加入開發行列,您必須在 Mac OS X 10.5 Leopard 使用 Xcode 3,而無法使用 Xcode 2.5 或是其他較早版本開啟專案檔案。

沒有完成的事情還有太多太多,但是我們是會繼續努力。

Recent changes of the OpenVanilla project.

Recently we made some changes on the the source code of the OpenVanilla project. These changes include:

1. A new preference tool.

We wrote a new preference tool for Mac OS X. The new preference tool offers not only a new look and but a simplified user experience. Unlike the old one, we integrated the settings from three tabs in the old one into one tab. And if you never install or remove some input method modules such as the Tibetan keyboard and so on, the settings of these modules would not be shown in the preference tool.

BTW, you can now set the shortcut key to switch to a input method module or toggle a output filter module in the way like hot-key setting in the system preference. We can just press on the keys on your keyboard instead of selecting an option from a drop down menu.

2.Code refactoring.

We refactored the codes of the OpenVanilla loader for Mac OS X and the CocoaVanilla framework. We rewrote the unsafe codes, such as we call the Cocoa APIs instead of calling the system() function when calling an external application.

3. Documentation.

We started working on the developer documentation to satisfy the developers’ needs. We used headerdoc as our documentation tool, because we use C++ and Objective-C as our primary programming language in the project. It works great with C++ and Obj-C.

We have added comments in the most important header file, OpenVanilla.h. You can see that all the important classes and methods to write an OpenVanilla module are defined in the header file. If you are working on Mac OS X , have installed Xcode and have a copy of the source codes from our svn repository, you can use the headerdoc2html tool to generate document in HTML format from the header files.

4. Developer tools and environment

In the future, we will only use Xcode 3 or newer version and Mac OS X 10.5 SDK for the development the OpenVanilla project. We will change the project file settings, and we will start to use APIs and file formats not available in the 10.4 SDK. For example, the new preference tool uses the .xib format instead of the .nib format.

We will still release builds which run on Tiger, however, if you want to build OpenVanilla by your self, or participate the development of OpenVanilla, Leopard and Xcode 3 are minimal required, and you will not be able to open the project file with Xcode 2.5 or other previous versions.

There are still many things to do, we will keep on working.

One thought on “OpenVanilla 專案的近況

  1. Pingback: 快要被我幹掉的-香草輸入法 | 詹姆士隨想曲

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.