[immodule-qt] introducing QT_IM_SWITCHER environment variable
YamaKen
yamaken at bp.iij4u.or.jp
Tue Aug 3 08:59:06 EEST 2004
Hi all, I propose a new configuration convention about
IM-switching. Please reply about my opinion and attached patch.
In our current implementation, there is a usability problem. We
can configure default IM plugin using QT_IM_MODULE env var (or
the equivalent in qtrc), but there is no way to control default
IM on QMultiInputContext because it is an ordinary plugin. The
user interface is not useful.
application <- QT_IM_MODULE="multi"
|
QMultiInputContext
|
QFooInputContext
To resolve such problem, we can introduce additional
configuration variable for QMultiInputContext. The Qt itself is
not aware of QT_IM_MODULE_FOR_SWITCHER variable.
application <- QT_IM_MODULE="multi"
|
QMultiInputContext <- QT_IM_MODULE_FOR_SWITCHER="bar"
|
QBarInputContext
Although the problem itself can be resolved as above,
unnecessary confusion is also introduced by the solution. Most
users will configure QT_IM_MODULE to choose their own favorite
IM because they always configure so in GTK+ environment. They
will be confused if the configuration QT_IM_MODULE="bar" makes
IM-switching menu vanish.
application <- QT_IM_MODULE="bar"
|
QBarInputContext
To avoid the confusion, I propose following naming
convention. The name QT_IM_SWITCHER is just a trick for users to
form appropriate mental model. Qt itself is not treat
IM-switchers specially. It is still ordinary IM plugin.
application <- QT_IM_SWITCHER="multi" (default)
|
QMultiInputContext <- QT_IM_MODULE="bar"
|
QBarInputContext
The convention is upward compatible with GTK+. In GTK+, the
equivalent of QMultiInputContext is hardcoded as default and not
replaceable. But IM-switcher should be replaceable as I said
recently, so I propose the new convention.
application <- gtk_im_multicontext_new()
|
GtkIMMulticontext <- GTK_IM_MODULE="bar"
|
GtkIMBarContext
To accomplish the new convention, I've renamed the identifier
name of QMultiInputContext "multi" as "imsw-multi". The "imsw-"
prefix prevents IM-switchers from being listed in popup menu as
input method. All other IM-switcher implementation is also
expected to follow this "imsw-" convention. I think that it
should not be API such as QInputContextPlugin::isIMSwitcher()
because Qt API should be isolated from IM-switcher issues.
If a system integrator such as RedHat want to make a specific
IM-framework the switcher, the patch offers following
configuration.
application <- QT_IM_SWITCHER="iiimqcf"
|
IIIMInputContext
|
(IIIMF's own switching framework)
-------------------------------
YamaKen yamaken at bp.iij4u.or.jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: immodule-qt-x11-trunk-r55-qt-im-switcher-20040803.diff
Type: application/octet-stream
Size: 4648 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/immodule-qt/attachments/20040803/2ff05669/attachment.obj
More information about the immodule-qt
mailing list