Tuesday, July 22, 2008

How to develop addons for rtl locales

The topic was initiated from url: http://www.babelzilla.org/content/view/316/. But the approach provided below doesn't work at all.

function getDirection() {
var myLocalBundleService = Components.classes ["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);
var myLocalStrings = myLocalBundleService.createBundle("chrome://global/locale/global.dtd");
return myLocalStrings.GetStringFromName("locale.dir");
}



Good thing is that we can still read the direction property from document.dir and preference bidi.direction. The definition of bidi.direction can be found in source code:
// ------------------
964 // Text Direction
965 // ------------------
966 // 1 = directionLTRBidi *
967 // 2 = directionRTLBidi
968 pref("bidi.direction", 1);
Both of them are r/o, but here we just need to read the information.

Friday, July 04, 2008

Logitech QuickCam service blocks Firefox build...

Although it's a known issue in bugzilla I was still really surprised. After reading the log I can see the "rebase" dll caused the problem.

Removing the service and keeping the driver, QuickCam still works and Firefox started building. That's funny...

This is the most helpful:
David Humphrey 2008-02-15 06:49:02 PDT
From the mingw FAQ (http://www.mingw.org/MinGWiki/index.php/FAQ):

Why does make often crash creating a sh.exe.stackdump file when I try to
compile my source code?
If you experience random crashes with make as well as with the msysinfo command
(i.e., repeating the command often allows to compile the source code
successfully), the issue might be caused by the Logitech QuickCam software.
Here is provided a solution to this issue:

* type the command services.msc from a command prompt (you will need
administrator privileges to do this), then find the "Logitech Process Monitor"
service, and change the "Startup type" from "Auto" to "Manual". Do the same
with the "LVSrvLauncher" service.
* type the command regedit from the command prompt (you will need
administrator privileges to do this), then find the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Among the
other REG_SZ keys, there should be three of them related to the Logitech
QuickCam, namely: "LogitechCommunicationsManager", "LogitechQuickCamRibbon",
"LVCOMSX". Make a backup of the registry, then remove them.
* reboot your PC

In this way the Logitech QuickCam daemon won't be available anymore.
Nonetheless, the camera will keep working just ok with 3rd party software
(e.g., Skype). If you want a less drastic solution, just kill the lvprcsrv.exe
process whenever you want to use MSYS by typing at the command prompt: pskill
-t lvprcsrv.exe (you will need PsTools and administrator privileges to do
this). However, as soon as you will plug in the USB cable of your Logitech
QuickCam, the daemon will be restarted, while with the first procedure it
won't.