Sunday, August 29, 2010

Left-handed mouse support for "Seven Kingdoms: Ancient Adversaries" game on linux

Recently I’ve come upon the linux port of open-source 7kaa strategy game. Unfortunately, the game launches in fullscreen and ignores Xorg configuration settings.

Such as mouse button mapping. I use a left-handed mouse and prefer left and right button to be swapped. It is easy to achieve in X Windows, but I’ve found no obvious way to set button swapping configuration for the 7kaa game. I found it annoying to play the game with left and right mouse button set to the reverse of what I’d got used to.

It was easy enough to get the result through source code modification. The patch for linux version 2.14.0 of the "7 Kingdoms: Ancient adversaries” game could be downloaded here.

The patch should be copied to the source code directory of the game. And the following command applies the patch to the source:

patch –p1 < 7kaa-2.14.0-lefthanded-mouse.patch
The source should be then configured and recompiled according to the instructions in the README file. The compiled binary changes left and right mouse buttons behavior. Voilà!
 

Wednesday, May 12, 2010

Plasma Applet Development Walk-through

 

Episode 2: Qt Creator Steps In

Preface

This article opens (yes, with episode 2) a series of mini-howtos describing various actions related to the development of custom plasma (KDE4 desktop) components (applets/data engines) in C++. Some of the information presented could be found elsewhere; other bits are almost trivial. If you are a programmer new to KDE4 development as I am, these articles may be of some help. The main idea is to show how purely technical stuff could be accomplished in some reasonable way without heavy thinking and head-scratching. Developer should focus on the stuff that is essential for his/her project: architecture, code structure, usability, documentation etc.

I am currently using Ubuntu Lucid (10.04) distribution with KDE 4.4 and Qt Creator 1.3.1; I believe my description should need only minor modifications if any at all for other distros.

Choosing the destination

We have our plasmoid project initialized and populated with .desktop, .cpp, and CmakeLists.txt files. Now is the time for compile-run-modify interactive development cycle.

Saturday, March 13, 2010

Е-mail уведомления в Google Wave

Google недавно добавила возможность получения пользователем сервиса Google Wave Preview уведомлений о появлении новых волн в папке Входящие  по электронной почте.

Является ли такой способ нотификации удобным, можно спорить. Например, под Windows создан очень хороший нотификатор с открытым кодом для системного трея, который продолжает совершенствоваться. Но то, что каждый пользователь Wave нуждается в том или ином нотификаторе для этого сервиса, бесспорно.

Между тем, место  в интерфейсе Google Wave , где настраиваются параметры уведомлений, оказалось не самым очевидным. После неудачного посещения меню Settings, мне потребовалось несколько минут, чтобы выгуглить нужные инструкции.  Которыми и собираюсь поделиться с читателями урбилога.

Friday, February 19, 2010

Программы для работы с Google Wave под Windows

Часть первая: Установка Google Chrome

  1. Заходим браузером на http://www.google.ru/chrome

    Google Chrome - новый бесплатный веб-браузер! 
    и

Monday, January 11, 2010

Plasma applet development: adding icons micro-HOWTO

The introduction to Plasma applet development on the KDE TechBase site describes the contents of CMakeLists.txt file used for compilation  and installation of a plasmoid. The installation of corresponding icon(s) is not covered there.

Actually, the process is rather simple

  1. Create an icon, or an icon set
  2. Name icon file(s) correctly
  3. Add an icon reference to the .desktop file
  4. Put an installation line to CMakeLists.txt
  5. Run cmake && make && sudo make install

Tuesday, January 5, 2010

Inside Ruby 1.9 interpreter: Threading in Ruby 1.9.1

Ruby 1.9 implements Thread objects with native OS threads. There is always a native thread allocated behind the scenes when an instance of Thread class appears in Ruby program. But there is a twist: actually at most one Ruby thread is allowed to run at any given time during program execution.
Ruby multi-threading programs will not gain real advantage when executed on multi-core CPUs.