diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-11-02 21:07:25 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-11-02 21:07:25 +0000 |
commit | 27dfd272ae3be15b1017f733682211afa1c7c0f0 (patch) | |
tree | 1fe1c9ed5c5d79c63069bb8d541be075ccc3aac2 /app-i18n/mozc/files | |
parent | d950fa39dbe16d164ed0cb8e3036fd5d0d896a4c (diff) |
gentoo resync : 02.11.2017
Diffstat (limited to 'app-i18n/mozc/files')
-rw-r--r-- | app-i18n/mozc/files/mozc-1.10.1390.102-drop-Werror.patch | 12 | ||||
-rw-r--r-- | app-i18n/mozc/files/mozc-1.13.1651.102-gtk-renderer.patch | 13 | ||||
-rw-r--r-- | app-i18n/mozc/files/mozc-ibus-1.5.4.patch | 299 |
3 files changed, 0 insertions, 324 deletions
diff --git a/app-i18n/mozc/files/mozc-1.10.1390.102-drop-Werror.patch b/app-i18n/mozc/files/mozc-1.10.1390.102-drop-Werror.patch deleted file mode 100644 index e254f38b8745..000000000000 --- a/app-i18n/mozc/files/mozc-1.10.1390.102-drop-Werror.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/gyp/common.gypi b/gyp/common.gypi -index 6c176ff..3613b1b 100755 ---- a/gyp/common.gypi -+++ b/gyp/common.gypi -@@ -58,7 +58,6 @@ - # warning_cflags will be shared with Mac and Linux. - 'warning_cflags': [ - '-Wall', -- '-Werror', - '-Wno-char-subscripts', - '-Wno-sign-compare', - '-Wno-deprecated-declarations', diff --git a/app-i18n/mozc/files/mozc-1.13.1651.102-gtk-renderer.patch b/app-i18n/mozc/files/mozc-1.13.1651.102-gtk-renderer.patch deleted file mode 100644 index bff0822a602d..000000000000 --- a/app-i18n/mozc/files/mozc-1.13.1651.102-gtk-renderer.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/unix/ibus/mozc_engine.cc b/unix/ibus/mozc_engine.cc -index e256ea4..534262e 100755 ---- a/unix/ibus/mozc_engine.cc -+++ b/unix/ibus/mozc_engine.cc -@@ -250,8 +250,6 @@ MozcEngine::MozcEngine() - #ifdef ENABLE_GTK_RENDERER - gtk_candidate_window_handler_(new GtkCandidateWindowHandler( - new renderer::RendererClient())), --#else -- gtk_candidate_window_handler_(NULL), - #endif // ENABLE_GTK_RENDERER - ibus_candidate_window_handler_(new IBusCandidateWindowHandler()), - preedit_method_(config::Config::ROMAN) { diff --git a/app-i18n/mozc/files/mozc-ibus-1.5.4.patch b/app-i18n/mozc/files/mozc-ibus-1.5.4.patch deleted file mode 100644 index 619b1d251507..000000000000 --- a/app-i18n/mozc/files/mozc-ibus-1.5.4.patch +++ /dev/null @@ -1,299 +0,0 @@ -Index: engine_interface.h -=================================================================== ---- unix/ibus/engine_interface.h (revision 177) -+++ unix/ibus/engine_interface.h (working copy) -@@ -106,6 +106,11 @@ - gint y, - gint w, - gint h) = 0; -+ -+ // The interface function for the "set-content-type" signal -+ virtual void SetContentType(IBusEngine *engine, -+ guint purpose, -+ guint hints) = 0; - }; - - } // namespace ibus -Index: engine_registrar.cc -=================================================================== ---- unix/ibus/engine_registrar.cc (revision 177) -+++ unix/ibus/engine_registrar.cc (working copy) -@@ -63,7 +63,9 @@ - engine_class->reset = Reset; - engine_class->set_capabilities = SetCapabilities; - engine_class->set_cursor_location = SetCursorLocation; -- -+#if defined(MOZC_ENABLE_IBUS_INPUT_PURPOSE) -+ engine_class->set_content_type = SetContentType; -+#endif // MOZC_ENABLE_IBUS_INPUT_PURPOSE - return true; - } - -@@ -87,6 +89,9 @@ - engine_class->reset = NULL; - engine_class->set_capabilities = NULL; - engine_class->set_cursor_location = NULL; -+#if defined(MOZC_ENABLE_IBUS_INPUT_PURPOSE) -+ engine_class->set_content_type = NULL; -+#endif // MOZC_ENABLE_IBUS_INPUT_PURPOSE - - mozc::ibus::EngineInterface *previous = g_engine; - g_engine = NULL; -@@ -179,5 +184,12 @@ - g_engine->SetCursorLocation(engine, x, y, w, h); - } - -+void EngineRegistrar::SetContentType( -+ IBusEngine *engine, -+ guint purpose, -+ guint hints) { -+ g_engine->SetContentType(engine, purpose, hints); -+} -+ - } // namespace ibus - } // namespace mozc -Index: engine_registrar.h -=================================================================== ---- unix/ibus/engine_registrar.h (revision 177) -+++ unix/ibus/engine_registrar.h (working copy) -@@ -84,6 +84,9 @@ - gint y, - gint w, - gint h); -+ static void SetContentType(IBusEngine *engine, -+ guint purpose, -+ guint hints); - }; - - } // namespace ibus -Index: ibus_header.h -=================================================================== ---- unix/ibus/ibus_header.h (revision 177) -+++ unix/ibus/ibus_header.h (working copy) -@@ -36,5 +36,10 @@ - #error "ibus-mozc now requires IBus>=1.4.1" - #endif // libibus (<1.4.1) - -+#if IBUS_CHECK_VERSION(1, 5, 4) -+#if !defined(MOZC_ENABLE_IBUS_INPUT_PURPOSE) -+#define MOZC_ENABLE_IBUS_INPUT_PURPOSE -+#endif // !MOZC_ENABLE_IBUS_INPUT_PURPOSE -+#endif // libibus(>=1.5.4) - - #endif // MOZC_UNIX_IBUS_IBUS_HEADER_H_ -Index: mozc_engine.cc -=================================================================== ---- unix/ibus/mozc_engine.cc (revision 177) -+++ unix/ibus/mozc_engine.cc (working copy) -@@ -372,6 +372,7 @@ - - void MozcEngine::FocusOut(IBusEngine *engine) { - GetCandidateWindowHandler(engine)->Hide(engine); -+ property_handler_->ResetContentType(engine); - - // Do not call SubmitSession or RevertSession. Preedit string will commit on - // Focus Out event automatically by ibus_engine_update_preedit_text_with_mode -@@ -397,6 +398,11 @@ - VLOG(2) << "keyval: " << keyval - << ", keycode: " << keycode - << ", modifiers: " << modifiers; -+ if (property_handler_->IsDisabled()) { -+ // It is each enginze's responsibility for ignoreing keyevents on -+ // the password field on the locked screen since IBus 1.5.4. -+ return FALSE; -+ } - - // Send current caret location to mozc_server to manage suggest window - // position. -@@ -501,6 +507,18 @@ - // Do nothing - } - -+void MozcEngine::SetContentType(IBusEngine *engine, -+ guint purpose, -+ guint hints) { -+ const bool prev_disabled = -+ property_handler_->IsDisabled(); -+ property_handler_->UpdateContentType(engine); -+ if (!prev_disabled && property_handler_->IsDisabled()) { -+ // Make sure on-going composition is reverted. -+ RevertSession(engine); -+ } -+} -+ - GType MozcEngine::GetType() { - static GType type = 0; - -Index: mozc_engine.h -=================================================================== ---- unix/ibus/mozc_engine.h (revision 177) -+++ unix/ibus/mozc_engine.h (working copy) -@@ -99,6 +99,9 @@ - gint y, - gint w, - gint h); -+ void SetContentType(IBusEngine *engine, -+ guint purpose, -+ guint hints); - - // Returns the GType which this class represents. - static GType GetType(); -Index: property_handler.cc -=================================================================== ---- unix/ibus/property_handler.cc (revision 177) -+++ unix/ibus/property_handler.cc (working copy) -@@ -61,6 +61,19 @@ - bool IsMozcToolAvailable() { - return FileUtil::FileExists(SystemUtil::GetToolPath()); - } -+ -+bool GetDisabled(IBusEngine *engine) { -+ bool disabled = false; -+#if defined(MOZC_ENABLE_IBUS_INPUT_PURPOSE) -+ guint purpose = IBUS_INPUT_PURPOSE_FREE_FORM; -+ guint hints = IBUS_INPUT_HINT_NONE; -+ ibus_engine_get_content_type(engine, &purpose, &hints); -+ disabled = (purpose == IBUS_INPUT_PURPOSE_PASSWORD || -+ purpose == IBUS_INPUT_PURPOSE_PIN); -+#endif // MOZC_ENABLE_IBUS_INPUT_PURPOSE -+ return disabled; -+} -+ - } // namespace - - PropertyHandler::PropertyHandler(MessageTranslatorInterface *translator, -@@ -71,7 +84,8 @@ - client_(client), - translator_(translator), - original_composition_mode_(kMozcEngineInitialCompositionMode), -- is_activated_(true) { -+ is_activated_(true), -+ is_disabled_(false) { - - AppendCompositionPropertyToPanel(); - #ifndef OS_CHROMEOS -@@ -105,6 +119,7 @@ - - void PropertyHandler::Register(IBusEngine *engine) { - ibus_engine_register_properties(engine, prop_root_); -+ UpdateContentType(engine); - } - - // TODO(nona): do not use kMozcEngine*** directory. -@@ -228,8 +243,34 @@ - ibus_prop_list_append(prop_root_, prop_mozc_tool_); - } - -+void PropertyHandler::UpdateContentTypeImpl(IBusEngine *engine, -+ bool disabled) { -+ const bool prev_is_disabled = is_disabled_; -+ is_disabled_ = disabled; -+ if (prev_is_disabled == is_disabled_) { -+ return; -+ } -+ const commands::CompositionMode visible_mode = -+ (prev_is_disabled && !is_disabled_ && IsActivated()) -+ ? original_composition_mode_ : -+ kMozcEnginePropertyIMEOffState->composition_mode; -+ UpdateCompositionModeIcon(engine, visible_mode); -+} -+ -+void PropertyHandler::ResetContentType(IBusEngine *engine) { -+ UpdateContentTypeImpl(engine, false); -+} -+ -+void PropertyHandler::UpdateContentType(IBusEngine *engine) { -+ UpdateContentTypeImpl(engine, GetDisabled(engine)); -+} -+ - void PropertyHandler::Update(IBusEngine *engine, - const commands::Output &output) { -+ if (IsDisabled()) { -+ return; -+ } -+ - if (output.has_status() && - (output.status().activated() != is_activated_ || - output.status().mode() != original_composition_mode_)) { -@@ -325,6 +366,10 @@ - const gchar *property_name, - guint property_state) { - #ifndef OS_CHROMEOS -+ if (IsDisabled()) { -+ return; -+ } -+ - if (prop_mozc_tool_) { - for (guint prop_index = 0; ; ++prop_index) { - IBusProperty *prop = ibus_prop_list_get( -@@ -371,9 +416,13 @@ - } - - bool PropertyHandler::IsActivated() const { -- return is_activated_; -+ return is_activated_ && !IsDisabled(); - } - -+bool PropertyHandler::IsDisabled() const { -+ return is_disabled_; -+} -+ - commands::CompositionMode PropertyHandler::GetOriginalCompositionMode() const { - return original_composition_mode_; - } -Index: property_handler.h -=================================================================== ---- unix/ibus/property_handler.h (revision 177) -+++ unix/ibus/property_handler.h (working copy) -@@ -54,14 +54,19 @@ - virtual ~PropertyHandler(); - - virtual void Register(IBusEngine *engine); -+ virtual void ResetContentType(IBusEngine *engine); -+ virtual void UpdateContentType(IBusEngine *engine); - virtual void Update(IBusEngine *engine, const commands::Output &output); - virtual void ProcessPropertyActivate(IBusEngine *engine, - const gchar *property_name, - guint property_state); - virtual bool IsActivated() const; -+ virtual bool IsDisabled() const; - virtual commands::CompositionMode GetOriginalCompositionMode() const; - - private: -+ void UpdateContentTypeImpl(IBusEngine *engine, bool disabled); -+ - // Appends composition properties into panel - void AppendCompositionPropertyToPanel(); - // Appends tool properties into panel -@@ -79,6 +84,7 @@ - scoped_ptr<MessageTranslatorInterface> translator_; - commands::CompositionMode original_composition_mode_; - bool is_activated_; -+ bool is_disabled_; - }; - - } // namespace ibus -Index: property_handler_interface.h -=================================================================== ---- unix/ibus/property_handler_interface.h (revision 177) -+++ unix/ibus/property_handler_interface.h (working copy) -@@ -45,6 +45,9 @@ - // Registers current properties into engine. - virtual void Register(IBusEngine *engine) ABSTRACT; - -+ virtual void ResetContentType(IBusEngine *engine) ABSTRACT; -+ virtual void UpdateContentType(IBusEngine *engine) ABSTRACT; -+ - // Update properties. - virtual void Update(IBusEngine *engine, - const commands::Output &output) ABSTRACT; -@@ -55,6 +58,9 @@ - // Returns if IME is activated or not. - virtual bool IsActivated() const ABSTRACT; - -+ // Returns if IME is forcesully disabled, e.g. on a password field. -+ virtual bool IsDisabled() const ABSTRACT; -+ - // Returns original composition mode before. - virtual commands::CompositionMode GetOriginalCompositionMode() const ABSTRACT; - }; |