Add scm/tutcode-rule-custom.scm to po/POTFILES.in.

* po/POTFILES.in
  - Add scm/tutcode-rule-custom.scm to avoid a build error.
Prevent systray-gtk from becoming defunct.

* gtk2/toolbar/common-gtk.c
  - (right_click_menu_quit_activated):
    Call uim_quit() after "Quit this toolbar" is selected.
* gtk2/toolbar/systray-gtk.c
  - (systray_unrealize_cb): Remove.
  - (main): Don't call systray_unrealize_cb after "unrealize"
    to prevent systray-gtk from becoming a defunct process.
* gtk3/immodule/Makefile.am : Use --update-cache option for
  gtk-query-immodule-3.0, and fix to use correct environment
  variable.
* gtk2/immodule/uim-cand-win-horizontal-gtk.c (label_draw)
  - Redraw unselected text with normal color in GTK+3 horizontal
    candidate window.
* gtk2/candwin/horizontal-gtk.c (label_draw)
  - Ditto.
Validate arguments in uim-candwin-qt4.

* qt4/candwin/qt4.cpp
  - (CandidateWindow::activateCand): Validate arguments
    to avoid crashes.
Introduce proxy class to call uim-candwin-qt4.

* qt4/immodule/candidatewindowproxy.cpp
* qt4/immodule/candidatewindowproxy.h
  - New file.
* qt4/immodule/quiminputcontext.cpp
* qt4/immodule/quiminputcontext.h
  - Replace AbstractCandidateWindow with CandidateWindowProxy.
* qt4/immodule/quiminputcontextplugin.pro.in
  - (HEADERS): Add candidatewindowproxy.h.
  - (SOURCES): Add candidatewindowproxy.cpp.
Rename CandidateWindow to XimCandidateWindow.

* qt4/candwin/qt4.cpp
  - (CandidateWindow): Move to ximcandidatewindow.cpp.
  - Cosmetic changes.
* qt4/candwin/uim-candwin-qt4.pro.in
  - (HEADERS): Add ximcandidatewindow.h.
  - (SOURCES): Add ximcandidatewindow.cpp.
* qt4/candwin/ximcandidatewindow.cpp
  - Move from qt4.cpp.
  - Rename to XimCandidateWindow.
  - Cosmetic changes.
* qt4/candwin/ximcandidatewindow.h
  - Move from qt4.h
  - Rename to XimCandidateWindow.
  - Cosmetic changes.
Move some files from immodule to candwin.

* qt4/candwin/Makefile.am
  - (EXTRA_DIST):
    * Remove qt4.h.
    * Add qt4.cpp, abstractcandidatewindow.h, abstractcandidatewindow.cpp,
      candidatetablewindow.h, candidatetablewindow.cpp, candidatewindow.h,
      candidatewindow.cpp, subwindow.h, subwindow.cpp and qt4.cpp.
* qt4/immodule/abstractcandidatewindow.cpp
* qt4/immodule/abstractcandidatewindow.h
* qt4/immodule/candidatetablewindow.cpp
* qt4/immodule/candidatetablewindow.h
* qt4/immodule/candidatewindow.cpp
* qt4/immodule/candidatewindow.h
* qt4/immodule/subwindow.cpp
* qt4/immodule/subwindow.h
  - Move to qt4/candwin.
  - Replace uim functions with fprintf() and fflush().
  - Cosmetic changes.
* qt4/candwin/uim-candwin-qt4.pro.in
  - (HEADERS)
    * Remove qt4.h.
    * Add abstractcandidatewindow.h, candidatetablewindow.h,
      candidatewindow.h and subwindow.h.
  - (SOURCES)
    * Add abstractcandidatewindow.cpp, candidatetablewindow.cpp,
      candidatewindow.cpp and subwindow.cpp.
* qt4/candwin/ximcandidatewindow.h
  - Cosmetic changes.
* qt4/immodule/Makefile.am
  - (EXTRA_DIST):
    * Remove abstractcandidatewindow.h, candidatetablewindow.h,
      candidatewindow.h, subwindow.h, abstractcandidatewindow.cpp,
      candidatetablewindow.cpp, candidatewindow.cpp and subwindow.cpp.
Add utility function parse_messages().

* qt4/candwin/uim-candwin-qt4.pro.in
  - (HEADERS): Add util.h.
  - (SOURCES): Add util.cpp.
* qt4/candwin/util.cpp
* qt4/candwin/util.h
  - New files to define parse_messages().
* qt4/candwin/ximcandidatewindow.cpp
  - (XimCandidateWindow::slotStdinActivated): Use parse_messages().
  - (XimCandidateWindow::strParse): Remove.
* qt4/candwin/ximcandidatewindow.h
  - (XimCandidateWindow::strParse): Remove.
Add function get_messages().

* qt4/candwin/util.cpp
* qt4/candwin/util.h
  - (get_messages): New.
  - (parse_messages): Remove an argument exitOnClose.
* qt4/candwin/ximcandidatewindow.cpp
  - (XimCandidateWindow::slotStdinActivated): Use get_messages().
Add support for socket to AbstractCandidateWindow.

* qt4/candwin/abstractcandidatewindow.cpp
  - (AbstractCandidateWindow::AbstractCandidateWindow):
    Add a socket notifier.
  - (AbstractCandidateWindow::slotStdinActivated): New.
* qt4/candwin/abstractcandidatewindow.h
  - (AbstractCandidateWindow::slotStdinActivated): New.
* qt4/candwin/qt4.cpp
  - (main)
    * Support CandidateWindow and CandidateTableWindow.
    * call uim_init() to prevent crash.
* qt4/immodule/candidatewindowproxy.cpp
  - (CandidateWindowProxy::isVisible): Change return value.
  - (CandidateWindowProxy::deactivateCandwin,
     CandidateWindowProxy::clearCandidates,
     CandidateWindowProxy::popup,
     CandidateWindowProxy::layoutWindow,
     CandidateWindowProxy::candidateActivate,
     CandidateWindowProxy::candidateActivateWithDelay,
     CandidateWindowProxy::candidateSelect,
     CandidateWindowProxy::candidateShiftPage):
    Change message.
  - (CandidateWindowProxy::initializeProcess): Add "-v" argument.
  - (CandidateWindowProxy::slotReadyStandardOutput): Implement.
* qt4/immodule/quiminputcontextplugin.pro.in
  - (INCLUDEPATH): Add candwin.
  - (HEADERS): Add util.h.
  - (SOURCES): Add uitl.cpp.
Change arguments of AbstractCandidateWindow::layoutWindow().

* qt4/candwin/abstractcandidatewindow.cpp
  - (AbstractCandidateWindow::layoutWindow): Change arguments.
  - (AbstractCandidateWindow::eventFilter,
     AbstractCandidateWindow::slotStdinActivated):
    Follow change in AbstractCandidateWindow::layoutWindow().
* qt4/candwin/abstractcandidatewindow.h
  - (AbstractCandidateWindow::layoutWindow): Change arguments.
* qt4/immodule/candidatewindowproxy.cpp
* qt4/immodule/candidatewindowproxy.h
  - (CandidateWindowProxy::layoutWindow): Change arguments.
* qt4/immodule/quiminputcontext.cpp
  - (QUimInputContext::update):
    Follow change in CandidateWindowProxy::layoutWindow().
Honor settings about window style.

* qt4/immodule/candidatewindowproxy.cpp
  - (CandidateWindowProxy::candidateWindowStyle): New.
  - (CandidateWindowProxy::initializeProcess):
    Call CandidateWindowProxy::candidateWindowStyle().
* qt4/immodule/candidatewindowproxy.h
  - (CandidateWindowProxy::candidateWindowStyle): New.
* qt4/immodule/quiminputcontext.cpp
  - (QUimInputContext::createCandidateWindow):
    Remove commented-out codes.
Cosmetic changes in qt4/candwin/ximcandidatewindow.cpp.

* qt4/candwin/ximcandidatewindow.cpp
  - (XimCandidateWindow::moveCand): Remove spaces.
Replace with uim_candidate with CandData.

* qt4/candwin/abstractcandidatewindow.cpp
  - (AbstractCandidateWindow::preparePageCandidates):
    Cosmetic change.
  - (AbstractCandidateWindow::~AbstractCandidateWindow,
     AbstractCandidateWindow::clearCandidates,
     AbstractCandidateWindow::setNrCandidates,
     AbstractCandidateWindow::setCandidates,
     AbstractCandidateWindow::setPage,
     AbstractCandidateWindow::setPageCandidates):
    Replace with uim_candidate with CandData.
* qt4/candwin/abstractcandidatewindow.h
  - (AbstractCandidateWindow): Ditto.
* qt4/candwin/candidatetablewindow.cpp
  - (CandidateTableWindow::updateView): Ditto.
* qt4/candwin/candidatewindow.cpp
  - (CandidateWindow::updateView): Ditto.
* qt4/candwin/util.h
  - (CandData)
    * Move from qt4/candwin/ximcandidatewindow.h.
    * Rename from label to headingLabel.
    * Add member annotation.
* qt4/candwin/ximcandidatewindow.cpp
  - (XimCandidateWindow::activateCand,
     XimCandidateWindow::setPageCandidates,
     XimCandidateWindow::setPage): Follow change in CandData.
* qt4/candwin/ximcandidatewindow.h
  - (CandData): Move to util.h.
Define UIM_QT_USE_{NEW_PAGE_HANDLING,DELAY} in util.h.

* qt4/candwin/abstractcandidatewindow.h
  - (UIM_QT_USE_NEW_PAGE_HANDLING, UIM_QT_USE_DELAY): Don't define here.
* qt4/candwin/util.h
  - (UIM_QT_USE_NEW_PAGE_HANDLING, UIM_QT_USE_DELAY): Define here.
* qt4/immodule/candidatewindowproxy.cpp
  - Don't include "util.h" here.
* qt4/immodule/candidatewindowproxy.h
  - (UIM_QT_USE_NEW_PAGE_HANDLING, UIM_QT_USE_DELAY): Don't define here.
Change variable name from cwin to proxy.

* qt4/immodule/quiminputcontext.cpp
  - (QUimInputContext::~QUimInputContext,
     QUimInputContext::createCandidateWindow,
     QUimInputContext::setFocus,
     QUimInputContext::unsetFocus,
     QUimInputContext::reset,
     QUimInputContext::update,
     QUimInputContext::cand_activate_cb,
     QUimInputContext::cand_select_cb,
     QUimInputContext::cand_shift_page_cb,
     QUimInputContext::cand_deactivate_cb,
     QUimInputContext::switch_system_global_im_cb,
     QUimInputContext::savePreedit,
     QUimInputContext::restorePreedit,
     QString QUimInputContext::getPreeditString,
     QUimInputContext::getPreeditCursorPosition,
     QUimInputContext::switch_system_global_im,
     QUimInputContext::updatePosition):
    Change variable name from cwin to proxy
    because this variable is no longer a window instance.
* qt4/immodule/quiminputcontext.h
  - (QUimInputContext): Ditto.
Send candidate data when activating.

* qt4/candwin/abstractcandidatewindow.cpp
  - (AbstractCandidateWindow::setCandidateData):
    New function.
  - (AbstractCandidateWindow::slotStdinActivated):
    Call AbstractCandidateWindow::setCandidateData().
* qt4/candwin/abstractcandidatewindow.h
  - (AbstractCandidateWindow::setCandidateData):
    New function.
* qt4/immodule/candidatewindowproxy.cpp
  - (CandidateWindowProxy::candidateActivate):
    Send candidate data.
Remove debug codes.

* qt4/candwin/abstractcandidatewindow.cpp
  - (AbstractCandidateWindow::slotStdinActivated):
    Remove debug code.
* qt4/immodule/candidatewindowproxy.cpp
  - (CandidateWindowProxy::slotReadyStandardOutput):
    Ditto.
Don't hardcode path of uim-candwin-qt4.

* qt4/immodule/candidatewindowproxy.cpp
  - (CandidateWindowProxy::initializeProcess):
    Specify path of uim-candwin-qt4 with UIM_LIBEXECDIR.