Posts tagged howto

Snippet: fix Screen Orientation in a Qt/S60 app

I follow the Qt/S60 Mailing list, that is turning out to be a very interesting and active ML, and the Qt Labs blog, always full of very good code, written directly by the guys of Qt Software. I thought could be nice to start to post some of the stuff I’m learning.

#include <eikenv .h>
#include <eikappui .h>
#include <aknenv .h>
#include <aknappui .h>
// ...
// lock orientation
CAknAppUi* appUi = dynamic_cast<caknappui *>( CEikonEnv::Static()->AppUi() );
if ( appUi )
{
   appUi->SetOrientationL( CAknAppUi::EAppUiOrientationPortrait );
}
// ...

Today’s source is: Nokia Forum.

Android Dev Phone 1: Official Updates

For the once of you that tried “home made ways” to update their ADP1, like my previously published how-to, this news can be interesting.

Google and HTC finally managed to push-out an official page on the HTC site, to explain step-by-step how to update firmware and baseband of the device.

I just did it, having a very pleasant and straightforward experience.
The phone seems to be way more stable, bug-free and the battery lasts for more then 50 seconds ;)

Enjoy!

Personalize your $PS1

My $PS1 Variable
Mine looks like this.
A very patriotic one, isn’t it? ;)

The code to make the Bash prompt looks like mine is (~/.bashrc):

case $TERM in
	xterm*|rxvt*)
		TITLEBAR='[\033]0;\u@\h:\w\007]'
		;;
	*)
		TITLEBAR=""
		;;
esac;

PS1="${TITLEBAR}\n[\033[0;0m][\033[0;32m]time: \
[\033[0m][\033[1;31m]\t[\033[0m][\033[0;0m]]-\
[[\033[0m][\033[0;32m]host: [\033[0m]\
[\033[1;31m]\h[\033[0m][\033[0;0m]]-\
[[\033[0m][\033[0;32m]user: [\033[0m][\033[1;31m]\u\
[\033[0m][\033[0;0m]]-[[\033[0m][\033[0;32m]bash: \
[\033[0m][\033[1;31m]\v[\033[0;0m]]\n\
[\033[0;0m][[\033[0;32m]cwd: [\033[0m][\033[1;31m]\w\
[\033[0m][\033[0;0m]]# "

Thanks to Bash Prompt HOWTO.

Speed up Mail.app

Mail.app icon
+
SQLite logo
+
vacuum
=
BRRRRRUUUUUUUUUMMMMM!

Anyone that use Mail.app (the “official” mail client on Mac OS X) knows that the greater mailboxes become, the slower Mail.app goes. I don’t know how many email I have, but the oldest is from the 2002 (I have cutted older because they became useless).

Today, I found an interesting link on TUAW: A faster way to speed up Mail.app on Hawk Wings.

Starting from that tips, I have expanded it to vacuum every table in the SQLite3 database used from Mail.app to index our emails.

Continue to see the mini-howto. More >

How to Make Mac Icons

Icon Zoom
Are you curious about “how to make icons for Mac“?
I’m.
And TUAW have something for someone interested in the same thing.

A few weeks ago, Matthew Cone showed us how Macinstruct’s beautiful icons, courtesy of the talented Gary Gehiere, came to be (http://www.macinstruct.com/node/40). In that article, you were shown the beginning stages of icon design – how the meaning of an idea is distilled down to a few carefully placed pixels. The end result, of course, is seen here – on Macinstruct – in the icons scattered throughout the website.

But what about the development stage? Unfortunately, icons don’t just spring to life after being sketched out. There are some steps involved in getting your icons from your mind to the web page or the application. This article will be a “rubber-meets-the-road” tutorial on the steps necessary to transform your ideas into reality. This tutorial will not necessarily be the way to do it, but it is one way (my way, actually). At the end of this tutorial, you will have a beautiful* icon with a transparent background suitable for a web page or application.
[...]

XCode meets Mono

Photo of a Mono
And… seems to be a nice meeting. ;)
After a lot of development, the comunity surrounding the project realeases last stable version 1.2.3.1 of Mono.

What about Mac OS X? Here is a dedicated page on the official wiki of Mono. And, in particular, I’m happy to highlight a tutorial/howto about XCode and Mono integration: CSharpPlugin.

I know that Mono is the open-source implementation of .Net (started by Novell), and that I hate M$, but… I can’t hate a framework. It’s like to hate the Plutonium because we make the Atomic_Bomb with it! ;)

Besides:

  1. I have had a little experience with Mono (a Gecko# and GTK# based browser)… and it was very good. In particular, I like delegates very much.
  2. .Net and C# specification are standardized at the ECMA: it’s one of the few times that M$ does things in the right way.

Source, TUAW.