2009-06-30

Do 0.8.2 Released!

Do 0.8.2 Docky

After 3 months of work, now here is the 0.8.2 release of our beloved GNOME Do!

With this release, a lot of bugs both from do-core and from plugins are fixed, the Docky interface also is enhanced, a couple of docklets are added as you can see in the screenshot above. You can now install the gnome-do-docklet package to get these docklets. (You need to enable them in the Plugin page of the Preferences dialog, and then activate them in the Appearance page — well, they only work for docky)

Here are some highlights I can think about among all the fixes/improvements:

  • Repository-less plugin system. The plugin installation is much simplified thanks to Alex’s non-repository fix. Now the plugin files will not be stored as copies in your home folder, which means in the future when the plugins package gets updated, the plugins you are using will be automatically the newest.

  • Docklets

    Docklets!. Jason has mentioned before it won’t be hard to write docklet because the framework is already there. So here we are with 5 docklets available: Battery Monitor, CPU Monitor, Switcher, Volume Control and Weather. At least 2 more are coming soon, namely the GMail and NetworkManager docklet.

  • Key bindings

    Expanded keyboard shortcut options. You can now customize almost all major operations of Do with you own taste. For me, since I use Emacs a lot, I’d like to have the Previous/Next results configured as Ctrl-P/Ctrl-N and Browse into/Step out of item as Alt-F/Alt-B, so my right hand doesn’t need to leave the home row to reach the arrow keys.

  • More “browsable” items. You can browse into the “Home Folder” item and mounted disk item (if you are using the DiskMounter plugin) with “Right Arrow” key (the default key binding for Browse into a item) now. The ~ and ~user can be correctly expanded, so you can also simply open or browse your home folder, other user’s home folder or any path containing them.

  • Enhanced Copy/Paste. Copy/Paste is consistent now whether you are using Ctrl+C or the ‘Copy to Clipboard’ action. The text getting copied will depend on the type of the item you are copying. For example, if you are copying a URL item, you will always have the URL copied to the clipboard, no matter how the item’s title and description looks like.

  • Configuration Page for Docky. Docky has a simplified menu on the Do item on the dock, and most of the configuration options have been moved to the Appearance page of the Preferences dialog.

  • Dropbox Plugin. We have a new Dropbox plugin written by Stephen Elson. We all love Dropbox for its usefulness and convenience, with the plugin, you can share or synchronize your files even more easily.

  • Improved RTM Plugin. The RTM plugin should be stable enough for most people no matter if you have like 100 tasks in your account, and a lot of features are added, for details please read my other post.

There are of course many other fixes/improvements I can not remember well, please jump to the mailing list or release announcement for more information.

As mentioned in another post in the mailing list, we will have a minor release very soon (in 1—2 weeks) to address some bugs found out during the use of this new version. A few other improvements may also be included by then (like the GMail docklets :). Stay tuned!

Note: You need to enable the Do-Core PPA to get the new 0.8.2 packages. And currently only Karmic and Jaunty platform have the gnome-do and gnome-do-plugins packages ready, the gnome-do-docklets may need some more time to get in, as well as packages for other platform (intrepid/hardy, due to their relatively old mono version).

2009-06-16

Disable gnome-screensaver while using mplayer

Just a quick post about an ignoring problem I had with Ubuntu 9.04 (Jaunty): I am a big fan of mplayer and it is the only player that can play 720p HD movie smoothly without having CPU running at top speed (2 GHz) on my 3.5 years old laptop (Thinkpad T43). However starting with 9.04, the screensaver keeps coming up while mplayer is playing — I don’t remember this uses to happen. I have stop-xscreensaver="yes" inside ~/.mplayer/config but this seems not doing the trick.

After checking the manual of mplayer, I managed to work this around by putting

heartbeat-cmd="gnome-screensaver-command -p"

into the config file. The heart beat command will run every 30 seconds, and gnome-screensaver-command -p will poke the screen saver daemon to let it know we are still up to something (not idle).

Note: maybe it is all because I’m using the latest svn version of mplayer packaged on a PPA — too lazy to test with the original version from Ubuntu’s repo for the time being, please leave a comment if you are using the latter and this doesn’t affect you, thanks.

2009-06-11

Remember The Milk plugin for GNOME Do Updates

After I finished my master thesis, I’ve been working on some changes to the RTM and Ping.FM plugin. With this post I’d like to give an simple update to the RTM plugin, by listing some of the new features that the new version will offer and a few bugs that has been/will be solved. This new version will (hopefully) be shipped with the up coming release of Do (0.8.2).

Changes behind the scene

  • Re-factored internal data structure. The data structure to store tasks/lists are much simplified which allows more features to be added relatively with less efforts.

  • Throttling Control. Added self-control inside RtmNet API to avoid server side throttling. Now we will send request to RTM server with interval no less than 1 second. Thanks to IronCow for the inspiration!

  • Improved synchronization with RTM server. Ensure synchronized content between Do universe (items indexed by Do) and your account in the cloud. If you modified any tasks elsewhere, the changes will be noticed by Do automatically. Obsolete items (deleted/completed) will not be left inside Do universe.

New features and improvements

  • Directly indexed tasks. Now the tasks are first class citizen in Do universe which means they are accessible directly by typing the name of a task.

  • New ways to navigator to tasks. There are 2 new item sources which means in addition to navigating to a task via the list it belongs to, you can also access tasks by their locations or tags.

  • Expandable task item. Each of the task can be expanded (by using “right arrow” key with default key bindings) to show some sub-items related to the task (if it has any). e.g. tags, location, estimated time.

  • Tags/Locations/Notes/Estimated Time support. You can easily add/remove tags, locations, notes and set estimated time now. They are also indexed and shown as sub-items of a task.

    • For adding tags, both hand typing (divided by a comma) and selecting from a existing tag list are supported.

    • For adding notes, you can separate the title and body of a task by either a “|” character or a new line.

    • The location associated with a task can be open in Google maps according to its latitude/longitude information

  • List actions. 3 new actions are added to provide functionality to create, rename and delete a list (except the reserved ones by RTM).

  • 4 meta lists. 4 “smart” list to offer easy access to tasks due today/tomorrow/in 1 week and overdue tasks.

  • Configurable overdue task notification interval. It was annoying before when you were seeing the notifications every 2 minutes once you had overdue tasks, so I add a configuration option in the preferences dialog to let you choose the interval between each notification, the default value is 15 minutes.

Bugs fixed

  • Bug #351564: RTM blocks startup, and crashes when internet is not available

  • Bug #324980: Remember the Milk not connecting with delayed network connection

    Though I think it is ideal that the Universe Manager in Do core will be capable of handling plugin activation depending on the network status, I let RTM try re-connecting during universe update if it has not yet established a connection to RTM server.

  • Bug #314798: after RTM plugin install: Do crashes after first character entered and Bug #370279: RTM plugin does not show the list of tasks

    These 2 bugs are actually connected — the latter is due to a temporary work around (which didn’t really fix the problem) to get rid of the crash in the former bug. The symptom is, when the tasks in an RTM account to be indexed are of large amount (40+), the XML received from RTM server is simply truncated at some random point, so you will either see Do crashes because the unfinished XML causes a parser exception (Bug #314798) or Do indexes no tasks after I only catch the exception which avoid the crash but can not help recovering the task list.

    I am not able to fix this bug for quite while simply because I cannot reproduce it in my system so I didn’t know in what way the XML became invalid, and testing with other users may expose their privacy to me, I cannot complain if no one would like to send me the problematic XML. Fortunately I recently received great help from Arnaud and Knorcedger who have been having this issue and are kindly enough to share their private info with me only to help me debugging. I would like to thank them for their support without which I don’t know when I could figure out where is wrong with the code. So I tried several different way to track down the real reason of the issue, and eventually it turns out it was the slightly-mistyped request URL in the original RtmNet API this plugin uses that causes the big trouble.

About Synchronization

One thing you may notice which behaves not as the same as the old version is that any change you have made to your RTM data (tasks, lists, tags …) will not be seen synchronized immediately inside Do universe. Normally you need to wait 2 minutes (10 minutes if you are using laptop and on battery) before any changes to be reflected inside Do. This is actually a by-product of ensuring better synchronization, because modifying data out of Do’s update cycles (what we use to do) can potentially leave obsolete data permanently inside Do. I suppose most the users can wait that 2 minutes, but in case you just need to access an item you’ve just changed, you can force Do to do a universe update by open the Preferences dialog and close it, then after a second or two, you should see the changes.

Test

You can test this new version by either compiling the code yourself or downloading a pre-compiled DLL file. Please keep in mind this is still a beta software and may still have bugs. So please feel free to let me know by emailing or leaving comments here if there is any problem.

  • Compile from source

    You can compile the source code pulled from this Launchpad branch. It is important to know you need to also have the latest Do compiled from the trunk code and installed. Please refer the wiki page on how to compile and install Do from source.

  • Pre-compiled Binary

    To save you some time, there is a pre-compiled binary DLL file you can use. The download address is: http://dl.getdropbox.com/u/110544/do-plugins/edge/RTM.dll. It has been tested with both GNOME Do 0.8.1.3 and the latest bzr code.

    To use it with Do 0.8.1.3, you need to make sure you clean the old DLL installed in you home folder, the safest steps to do that are:

    1. Open the Preferences dialog and deactivate the Remember The Milk plugin.

    2. Remove the folder “~/.local/share/gnome-do/plugins-0.8.1.3/addins/Do.RememberTheMilk.1.0/” and its content

    3. Remove the file “~/.local/share/gnome-do/plugins-0.8.1.3/addin-db-001/addin-data/global/Do.RememberTheMilk,1.0.maddin

    4. Go to the folder “~/.local/share/gnome-do/plugins-0.8.1.3/addin-db-001/addin-dir-data/” and remove the file whose name contains “Do.RememberTheMilk.1.0

    5. Then you can copy the RTM.dll file into “~/.local/share/gnome-do/plugins-0.8.1.3/”, start Do, you should now have the 1.5 version of Remember The Milk in use.

2009-05-22

Essential LaTeX packages for Producing Nice Looking Papers

Finally I’ve finished my Master thesis and presentation. — although I was required to use a PPT template for my presentation thus I couldn’t use Beamer, I finished the whole thesis using LaTeX/Metapost, and this time I become completely a fan of MetaPost and learned again a little more about LaTeX, especially the convenience brought by several useful packages. Here I note them down together with some simple examples. In case you need to write a paper or thesis, they may help you a lot to produce a decent looking document.

graphicx

This is a very common package to include images into the document. And quite often, you may need to let the package look for image files in directories not the same as where the .tex file is stored. Therefore you need this small trick at the preamble part:

 \graphicspath{{metapost/}{gnuplot/}{figures/}}

Here I just let it look for images from 3 sub-directories, you can also use absolute path.

amssymb, amsmath, amsthm

These 3 packages are essential if what you plan to write about contains lots of mathematic equations, definitions etc. They offer features to align/position the equations nicely and also allow you to define you own theorem/theorem style.

% define new theorem style and new theorem
\newtheoremstyle{example}%
{}{}{}{\parindent}{\bfseries}{:}{.5em}{}%

\theoremstyle{example}
\newtheorem{ex}{Example}[chapter]

listings

If you like me need to include some source code snippet into the text, this package can help you format the code properly according to the programming language.

By default it doesn’t use a monospaced font, which I feel a bit weird, so I changed it globally at the preamble part

\lstset{language=C,basicstyle=\ttfamily,captionpos=b,tabsize=4,showspaces=false}

You can notice I also define the default lanuage as C so it will use special font style for key words in C.

subfig

Sometimes you need to have to graphs in one figure shown as (a) and (b), this package allows you to flexibly control the sub-figures including their captions, it also provide a command to let you refer to a specific sub-figure when you need to.

\begin{figure}
  \centering
  \subfloat[][Load]{\includegraphics[scale=1]{mt-load}}%
  \qquad
  \subfloat[][Load and Store]{\includegraphics[scale=1]{mt-load-store}}
  \caption{Multi-thread Data Load/Store (Data item size: 128 Byte)}
  \label{fig:mt-load}
\end{figure}

fancyref

If you would like to save the effort of typing in all the “chapter/section/page” text before you use the \ref command, and if you would like to make them fancier, e.g. section 4.2.3 on page 14 (text in bold are added automatically by the package), you can try this package out. It just needs you to prefix all you labels according to the type of environments they point at. For example, by default chap: for chapter, fig: for figure etc.

Moreover, you can to define new prefixes for the environments fancyref doesn’t know. In my case, it doesn’t cover the lstlisting environment and example theorem. So I have them defined as

\newcommand*{\fancyreflstlabelprefix}{lst}
\frefformat{\fancyrefdefaultformat}{\fancyreflstlabelprefix}{list\fancyrefdefaultspacing#1}
\Frefformat{\fancyrefdefaultformat}{\fancyreflstlabelprefix}{List\fancyrefdefaultspacing#1}
\newcommand*{\fancyrefexlabelprefix}{ex}
\frefformat{\fancyrefdefaultformat}{\fancyrefexlabelprefix}{example\fancyrefdefaultspacing#1}
\Frefformat{\fancyrefdefaultformat}{\fancyrefexlabelprefix}{Example\fancyrefdefaultspacing#1}

booktabs, longtable

These 2 packages will help you make better looking tables, the first will provide commands for different borders (top/middle/bottom) and the width of them are adjusted to make the table look more professional. longtable, as the name suggested, will help you fit long table across pages with optionally repeated header anf footer.

Besides these packages, I also practices this time to organize the whole document more effeciently by writing each chapter in a independent file and use the \input command of LaTeX to include them in the main (master) .tex file. This will let you better control the structure of the document and easily product partial document with selected chapters. Also the AUCTeX package for Emacs has support to such multi-file arrangement. It can write some meta information inside the slave tex files (files you include), then let you jump from a slave file directly to the master one, and you can also compile the whole document right inside the slave file. (C-c C-c).

2009-03-18

RTM Plugin @ RTM

rmilk

It’s a great day today. It’s sunny (though still cold, but I have to appreciate the sunshine since I’m in Germany.), and I found out just after getting up this morning that Remember the Milk Plugin for GNOME Do is introduced at RTM’s official blog, together with the screencast. I am trilled.

I haven’t been able to work on GNOME Do/Plugins too much recently due to the fact it’s close to the deadline to submit my Master Thesis and another paper. I have planned some changes to RTM plugin, including new features suggested here and an approach to display the notes/tags/location etc. These things will probably be implemented slowly (most likely after next month). But luckily enough, Jonathan has joined the fun and started contributing some code.

Stay tuned, Do and RTM lovers!