<?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>handyfloss &#187; interface</title>
	<atom:link href="http://handyfloss.net/tag/interface/feed/" rel="self" type="application/rss+xml" />
	<link>http://handyfloss.net</link>
	<description>Because FLOSS is handy, isn&#039;t it?</description>
	<lastBuildDate>Thu, 08 Jul 2010 19:34:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Amarok WTF</title>
		<link>http://handyfloss.net/2010.01/amarok-wtf/</link>
		<comments>http://handyfloss.net/2010.01/amarok-wtf/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 09:34:38 +0000</pubDate>
		<dc:creator>isilanes</dc:creator>
				<category><![CDATA[Free software and related beasts]]></category>
		<category><![CDATA[about me]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://handyfloss.net/?p=983</guid>
		<description><![CDATA[Warning: the following rant could be caused by my idiocy, more than by Amarok&#8217;s fault. See comments. I have been using Amarok as music player even since I had first contact with it. I was really delighted with its capabilities, and everything was intuitive and useful in its UI. That was until version 1.4.x. Version [...]]]></description>
			<content:encoded><![CDATA[<p><i>Warning: the following rant could be caused by my idiocy, more than by Amarok&#8217;s fault. See comments.</i></p>
<p>I have been using <a href="http://en.wikipedia.org/wiki/Amarok (software)">Amarok</a> as music player even since I had first contact with it. I was really delighted with its capabilities, and everything was intuitive and useful in its <a href="http://en.wikipedia.org/wiki/User Interface">UI</a>. That was until version 1.4.x.</p>
<p>Version 2.0 was an almost complete rewrite of the code, and as such many things changed. The UI suffered a large redesign, in my opinion for worse&#8230; but that&#8217;s just an opinion. There are, however, other issues that are facts, not opinion. Amarok 2.0 lacked many of the features of Amarok 1.x, as the developers themselves admitted (not much room to deny). Fine, I have no problem with that. It is understandable: until version 2.x things will not settle down. The only problem is that Linux distros (at least Ubuntu) adopted Amarok 2.0 almost immediately, leaving us users with a broken toy. Not nice.</p>
<p>My latest gripe with Amarok? I run Ubuntu 9.10 at work (Amarok 2.2.0), and latest Arch at home. In the latter, I just updated Amarok 2.2.1 to 2.2.2 in the weekend (Arch is much more up to date than Ubuntu, since it&#8217;s based in almost bleeding-edge rolling releases). Well, unlike Amarok 2.2.1 before (or Amarok 2.2.0 at work), the new Amarok 2.2.2 does not have an option for <b>random play</b>. Yes, you read correctly. There is no way I know of to avoid playing all the songs in the playlist in the exact order (in principle, alphabetical) they are laid on. In older versions, you could play songs <i>or</i> albums randomly. With 2.2.2, they lost this capability. Amazing feature regression, if you ask me.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://handyfloss.net/2009.06/changing-font-style-in-pygtk-combobox/" title="Changing font style in PyGTK ComboBox (June 10, 2009)">Changing font style in PyGTK ComboBox</a> (0)</li>
	<li><a href="http://handyfloss.net/2008.10/usable-compiz-fusion-zoom-to-window/" title="Usable Compiz Fusion: zoom to window (October 1, 2008)">Usable Compiz Fusion: zoom to window</a> (0)</li>
	<li><a href="http://handyfloss.net/2009.06/ubuntu-error-the-installer-needs-to-remove-operating-system-files/" title="Ubuntu error: the installer needs to remove operating system files (June 18, 2009)">Ubuntu error: the installer needs to remove operating system files</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://handyfloss.net/2010.01/amarok-wtf/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Changing font style in PyGTK ComboBox</title>
		<link>http://handyfloss.net/2009.06/changing-font-style-in-pygtk-combobox/</link>
		<comments>http://handyfloss.net/2009.06/changing-font-style-in-pygtk-combobox/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 10:34:16 +0000</pubDate>
		<dc:creator>isilanes</dc:creator>
				<category><![CDATA[Free software and related beasts]]></category>
		<category><![CDATA[about me]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[FLOSS]]></category>
		<category><![CDATA[glade]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://handyfloss.net/?p=762</guid>
		<description><![CDATA[I am using the Glade Interface Designer to produce (very) small (and simple) graphical apps for my Neo FreeRunner. I produce the graphical layout in the form of an XML file (using Glade), then load this XML from a PyGTK program. The thing is some defaults are not really usable for a device such as [...]]]></description>
			<content:encoded><![CDATA[<p>I am using the <a href="http://en.wikipedia.org/wiki/Glade Interface Designer">Glade Interface Designer</a> to produce (very) small (and simple) graphical apps for my <a href="http://en.wikipedia.org/wiki/Neo FreeRunner">Neo FreeRunner</a>. I produce the graphical layout in the form of an <a href="http://en.wikipedia.org/wiki/XML">XML</a> file (using Glade), then load this XML from a <a href="http://en.wikipedia.org/wiki/PyGTK">PyGTK</a> program.</p>
<p>The thing is some defaults are not really usable for a device such as the NFR. For example, default fonts are in general too small for the tiny screen of the Neo, which favors apps with only a few, big and shinny buttons. In the case of Label widgets, you can use <a href="http://library.gnome.org/devel/pango/unstable/PangoMarkupFormat.html">Pango markup format</a> with the <tt>set_markup</tt> method, as follows:</p>
<div class="codeblock">
<pre>
mylabel  = self.glade.get_widget('label1')
txt  = '&lt;span font_size="80000" color="red"&gt;%s&lt;/span&gt;' % (text_string)
mylabel.set_markup(txt)
</pre>
</div>
<p>However, for other widgets it is not so evident. For example, in ComboBoxes (buttons with a drop-down list), you can&#8217;t put in the item list anything other than strings, which are displayed literally (markup is not interpreted). Moreover, CBs do not have a &#8220;<tt>set_font_style</tt>&#8221; method, or anything similar.</p>
<p>Searching the web did not provide immediate results, but I managed to find <a href="http://eccentric.cx/misc/pygtk/pygtkfaq.html#4.1">this FAQ item</a> at eccentric.cx. I quote:</p>
<blockquote><p>
<b>4.1.581 How do I change font properties on gtk.Labels and other widgets?</b><br />
Easy:</p>
<pre>
 label = gtk.Label("MyLabel")
 label.modify_font(pango.FontDescription("sans 48"))
</pre>
<p>This method applies to all widgets that use text, so you can change the text of gtk.Entry and other widgets in the same manner.</p>
<p>Note that, some widgets are only containers for others, like gtk.Button. For those you&#8217;d have to get the child widget. For a gtk.Button do this:</p>
<pre>
  if button.get_use_stock():
     label = button.child.get_children()[1]
  elif isinstance(button.child, gtk.Label):
     label = button.child
  else:
     raise ValueError("button does not have a label")
</pre>
<p>Last changed on Thu Sep 1 14:46:30 2005 by Johan Dahlin (johan-at-gnome-org)
</p></blockquote>
<p>In the case of a CB, we have to pick its child (which is the list itself), and modify it thusly:</p>
<div class="codeblock">
<pre>
cbox = self.glade.get_widget("CBlist")
cblist  = cbox.child
cblist.modify_font(pango.FontDescription("sans 32"))
</pre>
</div>
<p>In my examples above, a class has been created in the script beforehand, and it binds to the Glade XML:</p>
<div class="codeblock">
<pre>
class whatever:

  def __init__(self):

    #Set the Glade file
    self.glade    = gtk.glade.XML(<i>gladefile</i>)
    self.glade.signal_autoconnect(self)
</pre>
</div>
<p>Of course, the <tt>CBlist</tt> and <tt>MyLabel</tt> mentioned in my code are the appropriate widget names defined in that XML.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://handyfloss.net/2010.03/speed-up-pygtk-and-cairo-by-reusing-images/" title="Speed up PyGTK and Cairo by reusing images (March 18, 2010)">Speed up PyGTK and Cairo by reusing images</a> (0)</li>
	<li><a href="http://handyfloss.net/2009.07/plzma-py-a-wrapper-for-parallel-implementation-of-lzma-compression/" title="plzma.py: a wrapper for parallel implementation of LZMA compression (July 23, 2009)">plzma.py: a wrapper for parallel implementation of LZMA compression</a> (3)</li>
	<li><a href="http://handyfloss.net/2009.12/chopzip-a-parallel-implementation-of-arbitrary-compression-algorithms/" title="ChopZip: a parallel implementation of arbitrary compression algorithms (December 20, 2009)">ChopZip: a parallel implementation of arbitrary compression algorithms</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://handyfloss.net/2009.06/changing-font-style-in-pygtk-combobox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
