Skip to content

Commit

Permalink
Remove unused code and update libIME to the latest version.
Browse files Browse the repository at this point in the history
  • Loading branch information
PCMan committed Dec 17, 2016
1 parent 3ab9908 commit 1e0aea5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions PIMETextService/PIMELangBarButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class LangBarButton : public Ime::LangBarButton {
STDMETHODIMP OnClick(TfLBIClick click, POINT pt, const RECT *prcArea);
STDMETHODIMP InitMenu(ITfMenu *pMenu);

private:
~LangBarButton(); // COM object should be deleted using Rlease()
protected:
virtual ~LangBarButton(); // COM object should be deleted using Rlease()

private:
std::string id_;
Expand Down
9 changes: 1 addition & 8 deletions PIMETextService/PIMETextService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ TextService::TextService(ImeModule* module):
candPerRow_(10),
selKeys_(L"1234567890"),
candUseCursor_(false),
candFontSize_(12),
imeModeIcon_(nullptr) {
candFontSize_(12) {

// font for candidate and mesasge windows
font_ = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
Expand Down Expand Up @@ -74,9 +73,6 @@ TextService::~TextService(void) {

if(font_)
::DeleteObject(font_);

if(imeModeIcon_)
imeModeIcon_->Release();
}

// virtual
Expand Down Expand Up @@ -226,9 +222,6 @@ void TextService::onLangProfileActivated(REFIID lang) {
// create a new client connection to the input method server for the language profile
client_ = std::make_unique<Client>(this, lang);
client_->onActivate();

if (imeModeIcon_) // windows 8 IME mode icon
imeModeIcon_->setEnabled(isKeyboardOpened());
}

void TextService::onLangProfileDeactivated(REFIID lang) {
Expand Down
1 change: 0 additions & 1 deletion PIMETextService/PIMETextService.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ class TextService: public Ime::TextService {
std::wstring candFontName_;
int candFontSize_;

std::unique_ptr<Ime::LangBarButton> imeModeIcon_; // IME mode icon, a special language button (Windows 8 only)
HMENU popupMenu_;

std::unique_ptr<Client> client_; // connection client
Expand Down

0 comments on commit 1e0aea5

Please sign in to comment.