rcaelers/workrave — pull request #14 by jay (2012-04-04 06:52:44+00:00)
Title: Add util functions to open a uri and unwrap text

Here are two functions that I needed for client requests. They may or may not be useful. If you don't see the need for them I'll just keep them in the client branch. I'm using unwrap_txt() and some other tricks to make the RestBreakWindow label dynamically wrap depending on its size. I'm using open_uri() to open websites. I haven't pushed the client branch to github yet but I'm going to this month.

frontend/gtkmm/src/GtkUtil.cc
frontend/gtkmm/src/GtkUtil.hh

- (GtkUtil::unwrap_txt)
Unwrap UTF-8 text. Mainly to remove line breaks from the pre-wrapped
gettext translations.

- (GtkUtil::open_uri)
This function calls gtk_show_uri() or if win32 platform ShellExecuteA().
If the function fails a modal-less error message box can be shown.