<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.5" -->
<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/"
	>

<channel>
	<title>mblsha-o-rama</title>
	<link>http://mblsha.psi-im.org</link>
	<description>Weblog about Psi, the universe, and everything</description>
	<pubDate>Sun, 18 Feb 2007 21:26:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>
	<language>en</language>
			<item>
		<title>Using Nick-completion in Psi GroupChats</title>
		<link>http://mblsha.psi-im.org/2006/03/30/nick-completion/</link>
		<comments>http://mblsha.psi-im.org/2006/03/30/nick-completion/#comments</comments>
		<pubDate>Thu, 30 Mar 2006 20:40:51 +0000</pubDate>
		<dc:creator>mblsha</dc:creator>
		
		<category>Psi</category>

		<guid isPermaLink="false">http://mblsha.psi-im.org/2006/03/30/using-nick-completion-in-psi-groupchats/</guid>
		<description><![CDATA[If you&#8217;re chatting in groupchats quite frequently, nick completion is an invaluable feature. The most useful shortcut is Tab-Tab; when used on beginning of new line or after a step it inserts the nickname of the person who last addressed you directly. You can then continue to press Tab and it will loop on the [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re chatting in groupchats quite frequently, nick completion is an invaluable feature. The most useful shortcut is <tt>Tab-Tab</tt>; when used on beginning of new line or after a step it inserts the nickname of the person who last addressed you directly. You can then continue to press <tt>Tab</tt> and it will loop on the nicks of all the people in the room.</p>

<p><a id="more-12"></a></p>

<p><img src="http://mblsha.psi-im.org/images/psi/groupchat/nick-completion.png" alt="Psi GroupChat Dialog" title="" /></p>

<p>For a more complicated scenario: <tt>mblsha</tt>, <tt>Monster</tt> and <tt>mbl-revolution</tt> are all sitting in same room. If you write <tt>m</tt> and press <tt>Tab</tt> it will not result in any noticeable action. This is because there are multiple nicks that start with <tt>m</tt>, and you can either continue to <tt>Tab</tt> to loop through all nicks that start with <tt>m</tt> or write more letters until there is a unique completion. When you press the <tt>b</tt> button, and then press <tt>Tab</tt> it would complete to <tt>mbl</tt>. The more you use this feature, the more you are likely to come to like it and rely upon it. Try nick completion on someone and you&#8217;ll realise how powerful it is.</p>
]]></content:encoded>
			<wfw:commentRss>http://mblsha.psi-im.org/2006/03/30/nick-completion/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Death to the Icons!</title>
		<link>http://mblsha.psi-im.org/2006/03/03/death-to-the-icons/</link>
		<comments>http://mblsha.psi-im.org/2006/03/03/death-to-the-icons/#comments</comments>
		<pubDate>Fri, 03 Mar 2006 22:46:52 +0000</pubDate>
		<dc:creator>mblsha</dc:creator>
		
		<category>Psi</category>

		<category>Programming</category>

		<guid isPermaLink="false">http://mblsha.psi-im.org/2006/03/03/death-to-the-icons/</guid>
		<description><![CDATA[It was a good week: public Psi 0.11-beta1 release happened recently, I was able to improve some design bits of my blog, also eliminated the long-standing insect that was hurting my eyes and stopping from using the development branch in day-to-day life. Now, the insect&#8217;s dead, and I&#8217;m happily running 0.11-beta1 now.

The ones who have [...]]]></description>
			<content:encoded><![CDATA[<p>It was a good week: <a href="http://www.kismith.co.uk/wordpress/index.php/2006/02/28/011-beta1/">public Psi 0.11-beta1 release</a> happened recently, I was able to improve some <a href="/about">design bits</a> of my blog, also eliminated the long-standing insect that was hurting my eyes and stopping from using the development branch in day-to-day life. Now, the insect&#8217;s dead, and I&#8217;m happily running 0.11-beta1 now.</p>

<p>The ones who have already tried Psi/Mac 0.11-beta1 probably noticed the sudden appearance of many little bothersome icons in all kinds of menus where they weren&#8217;t present in 0.10: icons in context menu, application menus and even in the menu bar itself! So it was decided that icons should not be able to live any longer.</p>

<p><a id="more-10"></a></p>

<p>With the help from kind engineers from <a href="http://trolltech.com">Trolltech</a> I discovered very handy one-liner that disables icons in the menu bar. I&#8217;m currently in a good mood so I will share it with you:</p>

<pre><tt>
<span style="color: #000080">#ifdef</span> Q_WS_MAC  
        <span style="color: #000000">qt_mac_set_menubar_icons</span>(<span style="color: #0000FF">false</span>);  
<span style="color: #000080">#endif</span>
</tt></pre>

<p>And the other half of the work — disabling icons in menus that are drawn by Qt — was done in a matter of minutes though overriding QMacStyle with my custom class.</p>

<p>And here is the sample screenshot from the running application:</p>

<p><img src="http://mblsha.psi-im.org/wp-content/uploads/2006/03/iconless_popup.png" alt="Look ma, no icons!" title="" /></p>

<p>Popup menus never looked this good before ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://mblsha.psi-im.org/2006/03/03/death-to-the-icons/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Improving Chat Log</title>
		<link>http://mblsha.psi-im.org/2006/02/12/improving-chat-log/</link>
		<comments>http://mblsha.psi-im.org/2006/02/12/improving-chat-log/#comments</comments>
		<pubDate>Sun, 12 Feb 2006 19:22:39 +0000</pubDate>
		<dc:creator>mblsha</dc:creator>
		
		<category>Psi</category>

		<guid isPermaLink="false">http://mblsha.psi-im.org/2006/02/12/improving-chat-log/</guid>
		<description><![CDATA[During last two weeks I&#8217;ve been secretly working on porting chat log widget to new code base. And alongside with improved code structure I&#8217;ve also been able to improve its usability.





So what&#8217;s so new and exciting? Well, several things, and I&#8217;m going to list all of them here:


Ctrl-C and Ctrl-Ins shortcuts used to copy text [...]]]></description>
			<content:encoded><![CDATA[<p>During last two weeks I&#8217;ve been secretly working on porting chat log <a href="http://en.wikipedia.org/wiki/Widget#Graphical_component_in_computing">widget</a> to new code base. And alongside with improved code structure I&#8217;ve also been able to improve its usability.</p>

<p><a id="more-7"></a></p>

<p><img src="http://mblsha.psi-im.org/images/psi/chatdlg/new_psitextview.png" alt="Psi-0.11-dev's Chat Dialog" title="" /></p>

<p>So what&#8217;s so new and exciting? Well, several things, and I&#8217;m going to list all of them here:</p>

<ol>
<li><tt>Ctrl-C</tt> and <tt>Ctrl-Ins</tt> shortcuts used to copy text are now more 
intelligent: if you have selected some text in <tt>chat log</tt>, and no text 
is selected in <tt>chat edit</tt>, and focus is in <tt>chat edit</tt> widget, 
these shortcuts will select the text from chat view. Sounds a bit complicated, 
but in reality probably you will start to use <tt>Ctrl-C</tt> shortcut more often.</li>
<li>When you select a region of text, emotions are also correctly selected, as 
shown on provided screenshot.</li>
<li>Selection is <strong>not</strong> lost when new text is appended to chat log. 
<em>Very</em> useful in Groupchats.</li>
<li>Also <strong>finally</strong> emoticons are copied correctly when you you issue Copy command. 
No more empty space instead of copying emoticon&#8217;s text.</li>
<li>Quite minor, but could also be useful: in Groupchat dialog there&#8217;s a handy 
nick completion, and now Undo command behaves correctly after you try to complete nick.</li>
</ol>

<p>P.S.: And in case you&#8217;re wondering: no, it&#8217;s not Mac OS X shown on above screenshot. It&#8217;s actually Linux with <a href="http://www.kde-look.org/content/show.php?content=8692">custom window theme</a> and unimpressive fonts. Emoticon package is called <a href="http://www.jabber.ru/Members/puz">puzazBox</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mblsha.psi-im.org/2006/02/12/improving-chat-log/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Testing the Psi world</title>
		<link>http://mblsha.psi-im.org/2006/02/03/testing-the-psi-world/</link>
		<comments>http://mblsha.psi-im.org/2006/02/03/testing-the-psi-world/#comments</comments>
		<pubDate>Fri, 03 Feb 2006 09:13:08 +0000</pubDate>
		<dc:creator>mblsha</dc:creator>
		
		<category>Psi</category>

		<guid isPermaLink="false">http://mblsha.psi-im.org/2006/02/03/testing-the-psi-world/</guid>
		<description><![CDATA[During a couple of past days I’ve been actively working on creating a small sets of helper scripts and files to aid creation of unit tests. In theory, they should help us to fight bugs aggressively and to help valgrindizing individual bits of code, which means fewer bugs and better performance.

But how to actually use [...]]]></description>
			<content:encoded><![CDATA[<p>During a couple of past days I’ve been actively working on creating a small sets of helper scripts and files to aid creation of unit tests. In theory, they should help us to fight bugs aggressively and to help <a href="http://valgrind.org">valgrindizing</a> individual bits of code, which means fewer bugs and better performance.</p>

<p>But how to <em>actually</em> use it? The rest of the post will serve as the first bits on topic and as a reminder to myself. Be careful, it contains some techie stuff.</p>

<p><a id="more-4"></a></p>

<p>There was some background thinking, and we assumed that the best structure of directories would be like this: each directory with some C++ code in it would contain subdirectory named <kbd>unittest</kbd>, and there would be a base test directory, named <kbd>unittest</kbd> too, and it contains some helper scripts and files.</p>

<p><img src="http://mblsha.psi-im.org/images/psi/unittest/directory_structure.png" alt="unittest Directory Structure" title="" /></p>

<p>In order to run all available tests simple <kbd>make check</kbd> should be enough, and you’ll instantly see if something gone wrong.</p>

<p>There’s also a <kbd>make valgrind</kbd> target in order to run <a href="http://valgrind.org">valgrind</a> on test subjects (also as an added bonus, you could <kbd>make valgrind</kbd> even the Psi itself, and it would use the usual suppression file, and other useful tracing options). And if you get too many errors (and leaks, which sadly happen quite frequently with X11), <kbd>make valgrind_supp</kbd> to the rescue! It will generate suppressions that you can put into <kbd>psi/unittest/valgrind.supp</kbd> for later reuse.</p>

<p>In my grand plan all code (even Iris) should be tested, but as I’m probably the only one who’ll be working on it, it won’t happen very soon.</p>

<p>But if someone occasionally volunteer into writing some tests, here’s a small overview of the process:</p>

<ol>
<li>Create <tt>unittest</tt> directory somewhere, and add relative path to it into <tt>psi/unittest/tests.txt</tt>, then run <tt>psi/unittest/update.rb</tt> script to update helper files (I hate duplicating efforts).</li>
<li><p>Create a qmake project file in that directory, which should follow this template:</p>

<pre><code># unittest helpers
TARGET = testname
CONFIG += unittest # this way you'll save a bunch lines of code
TESTBASEDIR = ../../unittest # relative path to the base 'psi/unittest' directory
include($$TESTBASEDIR/unittest.pri)
# test suite's source
SOURCES += testname.cpp
</code></pre></li>
<li><p>Create a .cpp source file, according to the <a href="http://doc.trolltech.com/4.1/qtestlib-tutorial1.html">QTestLib Tutorial</a>, and you’re set.</p></li>
<li>Now just run <tt>make check</tt> to compile and run the test. Simple.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mblsha.psi-im.org/2006/02/03/testing-the-psi-world/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
