<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>clockwork</title>
	<atom:link href="http://clockwork.fr/feed/" rel="self" type="application/rss+xml" />
	<link>http://clockwork.fr</link>
	<description>the last sane place on the Internet</description>
	<lastBuildDate>Sat, 11 Feb 2012 13:35:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Beijing Soup</title>
		<link>http://clockwork.fr/2012/02/beijing-soup/</link>
		<comments>http://clockwork.fr/2012/02/beijing-soup/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 00:24:27 +0000</pubDate>
		<dc:creator>Jozef</dc:creator>
				<category><![CDATA[Culinary Recipes]]></category>
		<category><![CDATA[Chicken]]></category>
		<category><![CDATA[Soup]]></category>
		<category><![CDATA[Spicy]]></category>

		<guid isPermaLink="false">http://clockwork.fr/?p=247</guid>
		<description><![CDATA[<p>I&#8217;ve been searching for this recipe for quite a long time. Finally I got hold of it thanks to my brother. And due to popular demand here is the recipe complete for one of the best soups out there. So&#8230; &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been searching for this recipe for quite a long time. Finally I got hold of it thanks to my brother. And due to popular demand here is the recipe complete for one of the best soups out there. So&#8230; without further delays.</p>
<h2>Ingredients</h2>
<ol>
<li>One whole chicken</li>
<li>Shiitake mushrooms (dried)</li>
<li>Black mushrooms (dried)</li>
<li>A carrot</li>
<li>Bamboo sprouts</li>
<li>Two eggs</li>
<li>Soy sauce</li>
<li>Rice vinegar</li>
<li>Sambala sauce</li>
<li>Tapioca starch</li>
<li>Salt</li>
<li>Whole black pepper</li>
<li>Chicken bouillon cube</li>
</ol>
<h2>Preparation of ingredients</h2>
<p><em>Hint</em> : I recommend reading the whole recipe first as some of the steps can be done at the same time.</p>
<p>It is best to begin by dipping the mushrooms in warm water (shiitake and black mushrooms separately) as it takes about 30 minutes for them to soak well. The longer the better. After they have soaked cut the shiitake to small pieces.</p>
<p>Cut off the legs and breasts of the chicken, put them aside we will not be needing them for this meal.</p>
<p>Clean the carrot and cut it to small pieces. Cut the bamboo sprouts as well.</p>
<p>Crack the two eggs into a bowl and scramble them.</p>
<h2>Cooking</h2>
<p>Heat about 1.5L of water, salt it, put in a dozen of grains of the whole pepper and put the chicken inside. Cook for about 45 minutes.</p>
<p>Take the chicken out and put the bouillon cube as well as the mushrooms (both), carrots and bamboo sprouts inside.</p>
<p>Cut off all of the meat from the bones of the chicken and put it back into the soup (the meat, not the bones).</p>
<p>Cook for about ten minutes, then add two table spoons of vinegar, three table spoons of soy sauce and two spoonfuls of Sambala sauce (or more, if you wish the soup to be more spicy).</p>
<p>Cook for another 10 minutes, afterwards add in the eggs and stir well. Finally prepare two spoons of tapioca starch in a bowl &#8211; add a bit of water and mix until all of the starch has diluted. Then add the mix to the soup. Cook for about 10 minutes and you are done.</p>
<h2>Afterword</h2>
<p><a href="http://clockwork.fr/wordpress/wp-content/uploads/2012/02/SourSpicy.jpg" rel="lightbox[247]" class="lightbox" title="Sour&amp;Spicy"><img class="alignnone size-medium wp-image-249" title="Sour&amp;Spicy" src="http://clockwork.fr/wordpress/wp-content/uploads/2012/02/SourSpicy-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>The soup is to be eaten very hot. If you do not have chicken you can use more bouillon cubes instead (still, it is much better with real meat).</p>
]]></content:encoded>
			<wfw:commentRss>http://clockwork.fr/2012/02/beijing-soup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gratuitous hate and more</title>
		<link>http://clockwork.fr/2011/10/gratuitous-hate-and-more/</link>
		<comments>http://clockwork.fr/2011/10/gratuitous-hate-and-more/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 13:36:50 +0000</pubDate>
		<dc:creator>Jozef</dc:creator>
				<category><![CDATA[Slice of life]]></category>
		<category><![CDATA[Photos]]></category>

		<guid isPermaLink="false">http://clockwork.fr/?p=231</guid>
		<description><![CDATA[Photos from trip to Marseille.]]></description>
			<content:encoded><![CDATA[<p>On a recent trip to Marseille I have snapped very few pictures, most of them boring scenery as seen already thousands of times. I will not bother posting those.</p>
<p>Since I did not bring a wide-angle I had to do a little trespassing to get a shot at the cathedral. No big deal, by the amount of beer bottles on the ground it must have been a fine spot for parties.</p>
<div id="attachment_232" class="wp-caption alignleft" style="width: 310px"><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/10/Gratuitous-Hate.jpg" rel="lightbox[231]" class="lightbox" title="Gratuitous Hate"><img class="size-medium wp-image-232 " title="Gratuitous Hate" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/10/Gratuitous-Hate-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">It would seem that Hate is quite free in this part of France (translation &quot;Die Artist&quot;)</p></div>
<div id="attachment_236" class="wp-caption alignleft" style="width: 310px"><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/10/Marseille-Cathedral.jpg" rel="lightbox[231]" class="lightbox" title="Marseille Cathedral"><img class="size-medium wp-image-236 " title="Marseille Cathedral" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/10/Marseille-Cathedral-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Cathedrail in Marseille</p></div>
]]></content:encoded>
			<wfw:commentRss>http://clockwork.fr/2011/10/gratuitous-hate-and-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>House and its shadows</title>
		<link>http://clockwork.fr/2011/07/house-and-its-shadows/</link>
		<comments>http://clockwork.fr/2011/07/house-and-its-shadows/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 11:40:28 +0000</pubDate>
		<dc:creator>Jozef</dc:creator>
				<category><![CDATA[Slice of life]]></category>
		<category><![CDATA[Photos]]></category>

		<guid isPermaLink="false">http://clockwork.fr/?p=213</guid>
		<description><![CDATA[Photo of a house after dusk.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been quite a long time since I&#8217;ve updated this blog. I have quite a lot of stuff in the pipes so more will be coming.</p>
<p>I have snapped this picture while walking back home. I really enjoy the shadow play on this house&#8217;s roof, hopefuly you will too.</p>
<div id="attachment_214" class="wp-caption alignnone" style="width: 310px"><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/07/red_house.jpg" rel="lightbox[213]" class="lightbox" title="House and its shadows"><img class="size-medium wp-image-214 " title="House and its shadows" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/07/red_house-300x200.jpg" alt="Red house photo" width="300" height="200" /></a><p class="wp-caption-text">House and its shadows</p></div>
]]></content:encoded>
			<wfw:commentRss>http://clockwork.fr/2011/07/house-and-its-shadows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable system volume control for a generic USB device in Snow Leopard</title>
		<link>http://clockwork.fr/2011/06/enable-system-volume-control-for-a-generic-usb-device-in-snow-leopard/</link>
		<comments>http://clockwork.fr/2011/06/enable-system-volume-control-for-a-generic-usb-device-in-snow-leopard/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 06:00:56 +0000</pubDate>
		<dc:creator>Jozef</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Snow Leopard]]></category>
		<category><![CDATA[Soundflower]]></category>
		<category><![CDATA[X-Fi USB]]></category>

		<guid isPermaLink="false">http://clockwork.fr/?p=184</guid>
		<description><![CDATA[Use Soundflower to enable system volume control for a generic USB device in Snow Leopard]]></description>
			<content:encoded><![CDATA[<p>This post is mainly targeted at people who have used an X-Fi USB audio card with their PCs on Windows or Linux. Many of us got a bad surprise when we plugged it into our shiny new Macs and we couldn&#8217;t even control the volume of the device through the system.</p>
<p>This particular problem is due to lack of dedicated drivers made by Creative. It seems that they only make OS X drivers for cards specially targeted at Macs.</p>
<p>Luckily there is a way to work around this limitation using a piece of software called <a title="Soundflower homepage" href="http://cycling74.com/products/soundflower/">Soundflower</a>. The procedure is very simple, just follow the four steps here:</p>
<ol>
<li>Download and install SoundFlower (this might require a restart)</li>
<li>Set <strong>Soundflower (2ch)</strong> as your audio output device (hint: you can option (⌥)-click your volume control icon in the menu)</li>
<li>Launch Soundflowerbed (it was installed along with Soundflower)</li>
<li>In the 2 channel device output options select your USB card.</li>
</ol>
<p>And it is done, you can happily use your volume control buttons once again.</p>
<div id="attachment_190" class="wp-caption alignleft" style="width: 310px"><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/06/soundflower_system_output_settings.png" rel="lightbox[184]" class="lightbox" title="Set system output to Soundflower (2ch)"><img class="size-medium wp-image-198  " title="Set system output to Soundflower (2ch)" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/06/soundflower_system_output_settings-300x187.png" alt="Set system output to Soundflower (2ch)" width="300" height="187" /></a><p class="wp-caption-text">Set system output to Soundflower (2ch)</p></div>
<div id="attachment_189" class="wp-caption alignleft" style="width: 310px"><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/06/soundflower_driver_settings.png" rel="lightbox[184]" class="lightbox" title="Set Soundflower output to your USB card"><img class="size-medium wp-image-196  " title="Set Soundflower output to your USB card" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/06/soundflower_driver_settings-300x187.png" alt="Set Soundflower output to your USB card" width="300" height="187" /></a><p class="wp-caption-text">Set Soundflower output to your USB card</p></div>
]]></content:encoded>
			<wfw:commentRss>http://clockwork.fr/2011/06/enable-system-volume-control-for-a-generic-usb-device-in-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teddy bear</title>
		<link>http://clockwork.fr/2011/05/teddy-bear/</link>
		<comments>http://clockwork.fr/2011/05/teddy-bear/#comments</comments>
		<pubDate>Sun, 29 May 2011 19:09:31 +0000</pubDate>
		<dc:creator>Jozef</dc:creator>
				<category><![CDATA[Slice of life]]></category>
		<category><![CDATA[Photos]]></category>

		<guid isPermaLink="false">http://clockwork.fr/?p=174</guid>
		<description><![CDATA[Hipster teddy bear chilling it by a pole.]]></description>
			<content:encoded><![CDATA[<p>I came across an abandoned teddy bear at my workplace. He was chillin&#8217; by a pole. So I tried to do this hipster thing. I did not have a slightest idea on what text to put on it though.</p>
<p><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/05/hipster-bear.jpg" rel="lightbox[174]" class="lightbox" title="Hipster Teddy Bear"><img class="alignnone size-medium wp-image-175" title="Hipster Teddy Bear" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/05/hipster-bear-225x300.jpg" alt="Hipster Teddy Bear" width="225" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://clockwork.fr/2011/05/teddy-bear/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A nice dark color theme for QtCreator</title>
		<link>http://clockwork.fr/2011/05/a-nice-dark-color-theme-for-qtcreator/</link>
		<comments>http://clockwork.fr/2011/05/a-nice-dark-color-theme-for-qtcreator/#comments</comments>
		<pubDate>Thu, 26 May 2011 17:18:46 +0000</pubDate>
		<dc:creator>Jozef</dc:creator>
				<category><![CDATA[Knacks]]></category>
		<category><![CDATA[Qt Creator]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://clockwork.fr/?p=120</guid>
		<description><![CDATA[A nice dark color theme for QtCreator]]></description>
			<content:encoded><![CDATA[<p>Staring at long lines of code can get frustrating. Even more so if the said lines have ugly eye-hurting colors. I have been using the beautiful MacVim theme in Vim for some time now and it is quite awesome. However QtCreator, which I <a title="Using QtCreator for OpenViBE development" href="http://clockwork.fr/2011/04/using-qtcreator-for-openvibe-development/">use for OpenViBE development</a>, lacks such a theme. This problem was easily fixed though.</p>
<p>Here is a screenshot of a theme I have created and, because of the lack of creativity, named <em>Gulf</em>:</p>
<div id="attachment_159" class="wp-caption alignnone" style="width: 310px"><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/05/Gulf-Qt-Creator-Theme.png" rel="lightbox[120]" class="lightbox" title="Gulf Qt Creator Theme"><img class="size-medium wp-image-159 " title="Gulf Qt Creator Theme" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/05/Gulf-Qt-Creator-Theme-300x137.png" alt="Gulf Qt Creator Theme" width="300" height="137" /></a><p class="wp-caption-text">Gulf Qt Creator Theme</p></div>
<p>And here is the link for download:</p>
<p><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/05/gulf_qtcreator_theme.zip"><img class="alignnone size-full wp-image-43" title="button-download" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/04/button-download.png" alt="" width="250" height="40" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://clockwork.fr/2011/05/a-nice-dark-color-theme-for-qtcreator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get ID3 tags right on your Cowon S9 with Linux</title>
		<link>http://clockwork.fr/2011/05/get-id3-tags-right-on-your-cowon-s9-with-linux/</link>
		<comments>http://clockwork.fr/2011/05/get-id3-tags-right-on-your-cowon-s9-with-linux/#comments</comments>
		<pubDate>Sun, 22 May 2011 11:49:31 +0000</pubDate>
		<dc:creator>Jozef</dc:creator>
				<category><![CDATA[Knacks]]></category>
		<category><![CDATA[Cowon]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://clockwork.fr/?p=152</guid>
		<description><![CDATA[Get ID3 tags right on your Cowon S9 on Linux with EasyTAG]]></description>
			<content:encoded><![CDATA[<p>Those ID3 tags on Cowon can be pesky. Sometimes you do not see the embedded images, sometimes you see things like [11] instead of genres and if you are really unlucky you will not see any tags at all.</p>
<p>So, as a quick hint on how to get all of this right:</p>
<ol>
<li>Use <a title="EeasyTAG for Linux" href="http://easytag.sourceforge.net/">EasyTAG</a> (can be downloaded using your package manager in most distributions)</li>
<li>In Settings → Preferences go to the ID3Tag settings and do the following
<ul>
<li>Check Automatically convert old ID3v2 tag versions</li>
<li>Check Write ID3v2 tag → <strong>Version 2.3</strong></li>
<li>Uncheck Write ID3v1.x tag</li>
</ul>
</li>
<li>Edit tags of your files, be sure to re-save all files which appear in red in EasyTAG as they have probably different versions of ID3 tags</li>
</ol>
<div id="attachment_153" class="wp-caption alignnone" style="width: 310px"><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/05/EasyTAG-Cowon-settings.png" rel="lightbox[152]" title="EasyTAG Cowon settings"><img class="size-medium wp-image-153" title="EasyTAG Cowon settings" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/05/EasyTAG-Cowon-settings-300x198.png" alt="EasyTAG Cowon settings" width="300" height="198" /></a><p class="wp-caption-text">A screenshot of the EasyTAG settings window</p></div>
<p>If you want to use images from the tags instead of the per-folder cover.jpg files you can use EasyTAG to include them in the tags as well. Bear in mind though that only <strong>jpeg</strong> files will be taken into account and only in mp3 files (no love for ogg users). Also for best effects use images of 272  x 272 pixels large.</p>
]]></content:encoded>
			<wfw:commentRss>http://clockwork.fr/2011/05/get-id3-tags-right-on-your-cowon-s9-with-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick access to the last public url of a file in Dropbox</title>
		<link>http://clockwork.fr/2011/05/quick-access-to-the-last-public-url-of-a-file-in-dropbox/</link>
		<comments>http://clockwork.fr/2011/05/quick-access-to-the-last-public-url-of-a-file-in-dropbox/#comments</comments>
		<pubDate>Sun, 08 May 2011 06:00:14 +0000</pubDate>
		<dc:creator>Jozef</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Dropbox]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://clockwork.fr/?p=110</guid>
		<description><![CDATA[This shell script will put the public url of the most recent file in your Dropbox folder into your clipboard.]]></description>
			<content:encoded><![CDATA[<p>I got bored to search for the url after uploading a file to the Dropbox&#8217;s public folder. So I have hacked a quick shell script that takes the public url of the lastest file you uploaded to your public Dropbox folder and copies it to the clipboard. I thought I could share:</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh
DROPBOX=&quot;$HOME/Dropbox&quot;

dropbox puburl &quot;$DROPBOX/Public/`ls -1 -t $DROPBOX/Public | head -n 1`&quot; | xclip
</pre>
<p>Now, on OS X I have a folder action which does the same thing automatically when a new file is uploaded. I will have to tinker with inotify and get it to work on Linux as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://clockwork.fr/2011/05/quick-access-to-the-last-public-url-of-a-file-in-dropbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gtk, Glade and signal handlers in C++</title>
		<link>http://clockwork.fr/2011/05/gtk-glade-and-signal-handlers/</link>
		<comments>http://clockwork.fr/2011/05/gtk-glade-and-signal-handlers/#comments</comments>
		<pubDate>Thu, 05 May 2011 06:00:49 +0000</pubDate>
		<dc:creator>Jozef</dc:creator>
				<category><![CDATA[Knacks]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[Glade]]></category>
		<category><![CDATA[Gtk]]></category>

		<guid isPermaLink="false">http://clockwork.fr/?p=26</guid>
		<description><![CDATA[The definitive guide on signal handlers with Gtk, Glade and C++]]></description>
			<content:encoded><![CDATA[<p>Much was written about connecting signal handlers to interfaces made with Glade and imported with GtkBuilder. The problem is that everybody uses a different system and/or language. So here is a guide which explains all the magic:</p>
<h2>Glade Interface</h2>
<p>First of all create your widget in Glade and assign it a signal handler. We are going to create a very simple application which has a single button which exits it.</p>
<p>The Glade interface should look something like this. It is basically a Main Window (main_window) widget with a Button (exit_button) inside. We define a handler for the signal &#8220;clicked&#8221; for the button and call it exit_button_handler.</p>
<div id="attachment_104" class="wp-caption alignnone" style="width: 310px"><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/04/ui.glade_.png" rel="lightbox[26]" class="lightbox" title="The UI inside Glade"><img class="size-medium wp-image-104 " title="The UI inside Glade" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/04/ui.glade_-300x231.png" alt="The UI inside Glade" width="300" height="231" /></a><p class="wp-caption-text">The UI inside Glade</p></div>
<h2>C++ code</h2>
<p>Now let&#8217;s create the source file, it looks like this. As you can see our signal handler is just a basic void returning function.</p>
<pre class="brush: cpp; highlight: [3]; title: ; notranslate">
#include

extern &quot;C&quot; G_MODULE_EXPORT void exit_button_handler(GtkObject* caller, gpointer data)
{
 gtk_main_quit();
}

int main(int argc, char ** argv)
{
 gtk_init(&amp;argc, &amp;argv);
 GtkBuilder* l_BuilderInterface = gtk_builder_new();

 gtk_builder_add_from_file(l_BuilderInterface, &quot;ui.glade&quot;, NULL);
 gtk_builder_connect_signals(l_BuilderInterface, NULL);

 gtk_widget_show(GTK_WIDGET(gtk_builder_get_object(l_BuilderInterface, &quot;main_window&quot;)));

 gtk_main();

 return 0;
}
</pre>
<p>The important thing to notice is that the declaration of the callback function is preceded by <strong><code>extern "C" G_MODULE_EXPORT</code></strong>. These two bits of code ensure that the produced object will have a C-compatible table-entry for this function even though we are using a C++ compiler and that it will be accessible under Windows as well. Indeed, the <code>G_MODULE_EXPORT</code> macro expands to nothing under Linux.</p>
<h2>Compilation</h2>
<p>Now, we need to compile the whole thing. Let&#8217;s say we have called the file above <strong>main.cpp</strong>. The line to call on Linux would be :</p>
<pre>g++ `pkg-config --cflags --libs gtk+-2.0 gmodule-2.0` main.cpp -o test</pre>
<p>Let&#8217;s look at the output of the pkg-config file for a while :<br />
<code>-pthread -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1  -pthread -Wl,--export-dynamic -L/usr/lib/x86_64-linux-gnu -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lrt -lglib-2.0</code></p>
<p>That&#8217;s a lot of stuff! Depending on the system your mileage can vary, but the important bit is : <code>-Wl,--export-dynamic</code>. This piece of code ensures that you will be actually able to find the symbol once it is needed. On Windows, there is no need for the &#8211;export-dynamic flag, just be sure to load the <strong>gtk</strong> library as well as the <strong>gmodule</strong>.</p>
<p>And that&#8217;s it, done and done!</p>
]]></content:encoded>
			<wfw:commentRss>http://clockwork.fr/2011/05/gtk-glade-and-signal-handlers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Global keyboard actions in Snow Leopard without third-party software</title>
		<link>http://clockwork.fr/2011/05/global-keyboard-actions-in-snow-leopard-without-third-party-software/</link>
		<comments>http://clockwork.fr/2011/05/global-keyboard-actions-in-snow-leopard-without-third-party-software/#comments</comments>
		<pubDate>Wed, 04 May 2011 06:00:15 +0000</pubDate>
		<dc:creator>Jozef</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://clockwork.fr/?p=65</guid>
		<description><![CDATA[Assign a keyboard shortcut to any action in Snow Leopard without third party software]]></description>
			<content:encoded><![CDATA[<p>When I first got to use Mac OS X I have wondered whether it is possible to do stuff which I was used to do (more or less) easily on Linux. Among others there is the possibility to assign keyboard shortcuts to arbitrary actions (and especially shell scripts). I found several tutorials on how to do this, but they often include third party software like Quicksilver. Since I want to keep my system as vanilla as possible I was searching for a way to do it otherwise, and found it.</p>
<h2>Introducing Services</h2>
<p>Snow Leopard has this great thing called Services, which is a very simple to use way of creating very powerful actions in no time. Now, usually these are bound to a specific application or context, but they can be global.</p>
<p>Since it is much easier to explain something on an example, let us use a simple example. Following this article on how to pause iTunes for a short period of time.</p>
<h3>Step 1:</h3>
<ol>
<li>Open up the <strong>Automator</strong>.</li>
<li>Create a New Service.</li>
<li>In the &#8216;service receives selected&#8217; drop-down box select <strong>no input</strong> in <strong>any application</strong>.</li>
<li>In the left sidebar find <strong>Run AppleScript</strong> and drag it into the workflow</li>
<li>Paste the code below on the place where it says <em>(* Your script goes here *)</em></li>
<li>Save the service as &#8220;Pause iTunes for 5 minutes&#8221;</li>
</ol>
<pre class="brush: applescript; title: ; notranslate">
tell application &quot;iTunes&quot;
    pause
    delay 300
    play
end tell
</pre>
<p>In the end the whole Automator window should look like this.</p>
<div id="attachment_100" class="wp-caption alignnone" style="width: 310px"><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/04/Automator-service-example.png" rel="lightbox[65]" class="lightbox" title="Automator service example"><img class="size-medium wp-image-100 " title="Automator service example" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/04/Automator-service-example-300x220.png" alt="Automator service example" width="300" height="220" /></a><p class="wp-caption-text">Automator service example</p></div>
<p>If you go to the current application&#8217;s menu now you should see your service in the Services sub-menu.</p>
<h3>Step 2:</h3>
<p>Now the only thing that remains is to add a keyboard shortcut for this service.</p>
<p>Open up System Preferences → Keyboard → Keyboard Shortcuts. In the left panel click on Services and then click on the + button under the right panel. In the following dialog choose:</p>
<ul>
<li>Application : <strong>All Applications</strong></li>
<li>Menu Title : <strong>Pause iTunes for 5 minutes</strong></li>
<li>Keyboard Shortcut : <strong>F10</strong></li>
</ul>
<p>Following shortcut illustrates the result. Note that it is vital that the Menu Title chosen is <strong>exactly the same</strong> as the name under which you have saved the service.</p>
<div id="attachment_101" class="wp-caption alignnone" style="width: 310px"><a href="http://clockwork.fr/wordpress/wp-content/uploads/2011/04/Snow-Leopard-keyboard-shortcut-assignment.png" rel="lightbox[65]" class="lightbox" title="Snow Leopard keyboard shortcut assignment"><img class="size-medium wp-image-101 " title="Snow Leopard keyboard shortcut assignment" src="http://clockwork.fr/wordpress/wp-content/uploads/2011/04/Snow-Leopard-keyboard-shortcut-assignment-300x267.png" alt="Snow Leopard keyboard shortcut assignment" width="300" height="267" /></a><p class="wp-caption-text">Snow Leopard keyboard shortcut assignment</p></div>
<p>All done, you can now enjoy launching your script anywhere, anytime by pressing F10.</p>
]]></content:encoded>
			<wfw:commentRss>http://clockwork.fr/2011/05/global-keyboard-actions-in-snow-leopard-without-third-party-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

