<?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>Dan Bishop &#187; ubuntu</title>
	<atom:link href="http://www.danbishop.org/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danbishop.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 28 May 2010 07:16:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WebLex Beta 2.0 Out Now!</title>
		<link>http://www.danbishop.org/2010/05/27/weblex-beta-2-0-out-now/</link>
		<comments>http://www.danbishop.org/2010/05/27/weblex-beta-2-0-out-now/#comments</comments>
		<pubDate>Thu, 27 May 2010 16:02:42 +0000</pubDate>
		<dc:creator>Dan Bishop</dc:creator>
				<category><![CDATA[Lex]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[weblex]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.danbishop.org/?p=235</guid>
		<description><![CDATA[There&#8217;s been significant progress made with WebLex in the last few weeks. Mainly through avoidance of revision&#8230; Anyway, there is now a beta version out for both Ubuntu and Windows. These can be found at http://www.weblex.org/ The latest version is written in Python and will hopefully be coming to Apple&#8217;s OS X shortly too. French [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s been significant progress made with <a href="http://www.weblex.org/" onclick="pageTracker._trackPageview('/outgoing/www.weblex.org/?referer=');">WebLex</a> in the last few weeks. Mainly through avoidance of revision&#8230; Anyway, there is now a beta version out for both <a href="http://www.ubuntu.com" onclick="pageTracker._trackPageview('/outgoing/www.ubuntu.com?referer=');">Ubuntu</a> and Windows. These can be found at <a href="http://www.weblex.org/" onclick="pageTracker._trackPageview('/outgoing/www.weblex.org/?referer=');">http://www.weblex.org/</a></p>
<p>The latest version is written in Python and will hopefully be coming to Apple&#8217;s OS X shortly too. French and Spanish support are still extremely limited, but this will be improved over time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danbishop.org/2010/05/27/weblex-beta-2-0-out-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming with PyGTK and Glade</title>
		<link>http://www.danbishop.org/2010/02/02/programming-with-pygtk-and-glade/</link>
		<comments>http://www.danbishop.org/2010/02/02/programming-with-pygtk-and-glade/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 16:17:19 +0000</pubDate>
		<dc:creator>Dan Bishop</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[glade]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.danbishop.org/?p=209</guid>
		<description><![CDATA[This is my translation of Florian Diesch&#8217;s guide found here: http://www.florian-diesch.de/doc/python-und-glade/online/einleitung.html I translated this guide as there doesn&#8217;t seem to be anything about using gtkbuilder and glade, rather than the older libGlade, with python. The guide is not yet complete, but I will keep working on it over the coming weeks. Dieser Werk bzw. Inhalt [...]]]></description>
			<content:encoded><![CDATA[<p>This is my translation of Florian Diesch&#8217;s guide found here: <a href="http://www.florian-diesch.de/doc/python-und-glade/online/einleitung.html" onclick="pageTracker._trackPageview('/outgoing/www.florian-diesch.de/doc/python-und-glade/online/einleitung.html?referer=');">http://www.florian-diesch.de/doc/python-und-glade/online/einleitung.html</a></p>
<p>I translated this guide as there doesn&#8217;t seem to be anything about using gtkbuilder and glade, rather than the older libGlade, with python. The guide is not yet complete, but I will keep working on it over the coming weeks.</p>
<p>Dieser Werk bzw. Inhalt ist unter einer <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/de/" onclick="pageTracker._trackPageview('/outgoing/creativecommons.org/licenses/by-nc-sa/3.0/de/?referer=');">Creative Commons-Lizenz</a> lizenziert. This work is released under a creative commons licence (cc-by-nc-sa).</p>
<p><span id="more-209"></span></p>
<h1>Introduction</h1>
<p>This guide should give you a first look at how to use the programming language Python and the interface designer Glade.</p>
<p>I will concentrate on the Python code rather than the use of Glade, which is already well documented in the Glade Interface Designer Handbook.</p>
<p>This text neither should, nor can be used as a replacement for the PyGTK Reference Manual, or the offical PyGTK Tutorial.</p>
<p>I will take it as a given that you have experience with Python and that you are working with Glade 3.6.x on Linux and that your project is saved in the GTKBuilder format for GTK 2.16.</p>
<h1>Signals and Events</h1>
<p>Like many libraries for graphical user interfaces, GTK is event driven. A central event loop waits until something happens then forwards the control onto the routines responsible for the processing of the event.</p>
<p>In order to process events, GTK uses signals: control elements and other objects react to events, which the corresponding signals trigger. Using these signals, you can control callbacks, which will then always be called, so that the corresponding signal will be triggered.</p>
<address>Note:</address>
<address>It is conventional to name callbacks &#8216;on_OBJECTNAME_SIGNALNAME&#8217; E.g. the &#8216;pressed&#8217; signal of the object bt_ok (an ok button) would be &#8216;on_bt_ok_pressed&#8217;.</address>
<p>Signals make the connection between the user interface and the program&#8217;s code such that: every action of the user triggers one or more signals, which you can connect to with callbacks, in order to react to the user&#8217;s request. In addition, signals are often used to enable different parts of the program to communicate with one another. Therefore, a GTK program often contains very many signal callback routines.</p>
<h1>Connecting to Signals</h1>
<p>Using the method gtk.Widget.connect() you can connect a callback with a signal.</p>
<p>Instead of this, you can use gtk.Builder.connect_signals() to automatically connect all callbacks with their corresponding signals.</p>
<p>Additionally, you must specify the name of the callback in the signal properties of the gui element in Glade.</p>
<p>Whilst a callback is being called, the main loop cannot process any signals. Therefore, the interface doesn&#8217;t react to the mouse, or the keyboard and also, changes to the interface elements are usually seen only after completion of the routine.</p>
<p>Therefore, in a callback which is activated by the keyboard/mouse, it is often useful to trigger a handler, for example a progress bar, using the following lines of code:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">while</span> gtk.<span style="color: black;">events_pending</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
      gtk.<span style="color: black;">main_iteration</span> <span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<h1>Important Functions</h1>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">gtk.<span style="color: black;">main</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Starts the main loop.</p>
<p>This function is normally called after you have shown the main window of your program.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">gtk.<span style="color: black;">main_quit</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>This function ends the main loop. It is usually called in the callback for the delete-even signal of your main window.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">gtk.<span style="color: black;">events_pending</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>returns:	True if an event is waiting to be processed, otherwise False</p>
<p>Checks whether there is currently an event waiting to be processed.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">gtk.<span style="color: black;">main_iteration</span><span style="color: black;">&#40;</span>block=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Parameter:	block – True, if the function should wait an event has been processed.</p>
<p>Executes a single iteration of the main loop.</p>
<p>This function is typically called together with</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">gtk.<span style="color: black;">events_pending</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p> in order to execute all queued events.</p>
<h1>Example</h1>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> on_window1_delete_event<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, <span style="color: #66cc66;">*</span>args<span style="color: black;">&#41;</span>:
     gtk.<span style="color: black;">main_quit</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>This is the on_window1_delete_event, the callback for the delete-event signal of window &#8220;window1&#8243;. Should this window be destroyed (closed), then gtk.main_quit() will be called, so as to end the main loop and with that, the program itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danbishop.org/2010/02/02/programming-with-pygtk-and-glade/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Doctor Who Uses Ubuntu!</title>
		<link>http://www.danbishop.org/2010/01/04/doctor-who-uses-ubuntu/</link>
		<comments>http://www.danbishop.org/2010/01/04/doctor-who-uses-ubuntu/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 22:13:38 +0000</pubDate>
		<dc:creator>Dan Bishop</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.danbishop.org/?p=203</guid>
		<description><![CDATA[This shot is taken from Doctor Who Confidential &#8211; Lords and Masters. It is a making of video and at 39:29 you can clearly see several computers running Ubuntu! To be more accurate, it looks like it&#8217;s probably several monitors connected to a single computer running Ubuntu, but nevertheless&#8230; quite a catch.]]></description>
			<content:encoded><![CDATA[<p>This shot is taken from Doctor Who Confidential &#8211; Lords and Masters. It is a making of video and at 39:29 you can clearly see several computers running Ubuntu! To be more accurate, it looks like it&#8217;s probably several monitors connected to a single computer running Ubuntu, but nevertheless&#8230; quite a catch.</p>
<div id="attachment_204" class="wp-caption aligncenter" style="width: 508px"><a href="http://www.danbishop.org/wp-content/uploads/2010/01/doctor-who-confidential-ubuntu.jpg"><img class="size-full wp-image-204" title="doctor-who-confidential-ubuntu" src="http://www.danbishop.org/wp-content/uploads/2010/01/doctor-who-confidential-ubuntu.jpg" alt="Ubuntu being used on the set of Doctor Who" width="498" height="298" /></a><p class="wp-caption-text">Ubuntu being used on the set of Doctor Who</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.danbishop.org/2010/01/04/doctor-who-uses-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Midisport 2&#215;2 in Ubuntu</title>
		<link>http://www.danbishop.org/2009/03/17/midisport-2x2-in-ubuntu/</link>
		<comments>http://www.danbishop.org/2009/03/17/midisport-2x2-in-ubuntu/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 14:02:01 +0000</pubDate>
		<dc:creator>Dan Bishop</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[midisport]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.danbishop.org/?p=114</guid>
		<description><![CDATA[There has been a midisport-firmware package in Ubuntu for as long as I can remember&#8230; and it&#8217;s been broken for as long as I care to remember. Today though, it has been fixed! I&#8217;m not sure if this will be backported or not, but if you&#8217;re using Jaunty Jackelope all you have to do to [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a midisport-firmware package in Ubuntu for as long as I can remember&#8230; and it&#8217;s been broken for as long as I care to remember. Today though, it has been fixed! I&#8217;m not sure if this will be backported or not, but if you&#8217;re using Jaunty Jackelope all you have to do to get your midisport to work is &#8220;sudo apt-get install midisport-firmware&#8221; then plug it in!</p>
<p>The bug report detailing why this doesn&#8217;t work in previous versions can be found here: <a href="https://bugs.launchpad.net/ubuntu/+source/lyx/+bug/301439" target="_blank" onclick="pageTracker._trackPageview('/outgoing/bugs.launchpad.net/ubuntu/+source/lyx/+bug/301439?referer=');">https://bugs.launchpad.net/ubuntu/+source/lyx/+bug/301439</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.danbishop.org/2009/03/17/midisport-2x2-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dell Mini 9 (and how to fix the keyboard!)</title>
		<link>http://www.danbishop.org/2009/01/27/dell-mini-9-and-how-to-fix-the-keyboard/</link>
		<comments>http://www.danbishop.org/2009/01/27/dell-mini-9-and-how-to-fix-the-keyboard/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 08:52:28 +0000</pubDate>
		<dc:creator>Dan Bishop</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[mini 9]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.danbishop.org/?p=92</guid>
		<description><![CDATA[I bought a Dell Mini 9 from Tesco Direct about two weeks ago now, unfortunately, the battery was dead when it arrived, but after a quick chat to Dell the laptop was collected from my house the next day and redelivered with a new battery and a new motherboard the next week. Since then I [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_97" class="wp-caption alignright" style="width: 160px"><img class="size-thumbnail wp-image-97" title="Dell Mini 9" src="http://www.danbishop.org/wp-content/uploads/2009/01/dell_inspiron_mini9-150x150.jpg" alt="Dell Mini 9" width="150" height="150" /><p class="wp-caption-text">Dell Mini 9</p></div>
<p>I bought a Dell Mini 9 from Tesco Direct about two weeks ago now, unfortunately, the battery was dead when it arrived, but after a quick chat to Dell the laptop was collected from my house the next day and redelivered with a new battery and a new motherboard the next week.</p>
<p>Since then I have been VERY impressed with it. However, the version of Ubuntu that came pre-installed is a specially customised version of Hardy Heron 8.04, I really need at least 8.10 so that I can use LyX across all my machines properly. Installing 8.10 was easy and everything except the sound worked out of the box. To fix the sound a single line had to be added to a config file (easily searchable on google).</p>
<p>The problem came, however, when I tried to use LyX and my &#8220;&#8221; kay didn&#8217;t work. I tried all the other keys on the keyboard and discovered that [ and ] were also non-functional.</p>
<p>My inital assumption was that I needed to specify some special dell keyboard layout in xorg.conf and as two of my friends also have Mini 9s running the default pre-installed version of Ubuntu I thought this would be quite easy to find&#8230; Their xorg.conf files were very standard though, nothing  Dell specific at all.</p>
<p>Finally, after much searching, I found this:<br />
Setting keyboard matrix:<br />
1. Turn off your computer.<br />
2. If your computer is connected to the ac adapter, disconnect the ac adapter from the computer.<br />
3. Press and hold &lt;Fn&gt;&lt;K&gt;.<br />
4. Connect the ac adapter to the computer (assuming that the AC adapter is already plugged into an electrical outlet).<br />
5. Release the key combination.</p>
<p>It worked! This came from someone who had replaced the keyboard and was having the same issue as me, I have not read of anyone who has instaloled 8.10 and had the same issue. I can only assume that my issue came about because either, my keyboard was also replaced when it went in for repair, or, I did upgrade the BIOS to A04 before installing 8.10,  so perhaps that had something to do with it&#8230;</p>
<p>I could definitely recommend the Mini 9, it is perfectly capable of full screen iPlayer playback, the battery life is around 4-6 hours and the keyboard, though small, is actually very pleasent to work with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danbishop.org/2009/01/27/dell-mini-9-and-how-to-fix-the-keyboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
