Hello community,

here is the log from the commit of package mozc for openSUSE:Factory checked in 
at 2013-11-04 15:38:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mozc (Old)
 and      /work/SRC/openSUSE:Factory/.mozc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mozc"

Changes:
--------
--- /work/SRC/openSUSE:Factory/mozc/mozc.changes        2013-09-02 
15:00:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mozc.new/mozc.changes   2013-11-04 
15:38:07.000000000 +0100
@@ -1,0 +2,12 @@
+Mon Oct 28 17:53:17 UTC 2013 - [email protected]
+
+- Fix typed password is shown on GNOME lock screen bnc#847718
+  * Add support-input-purpose.patch
+- Fix config button is disabled on GNOME Control Center rh#904625
+- Change initial input mode of ibus-mozc to direct input Issue#201
+  * Add fix-initial-input-mode.patch
+- Enables keyboard layout variations for ibus-mozc
+  * Add ibus-provide-layout-variations.patch
+  * Supplements the fix above
+
+-------------------------------------------------------------------

New:
----
  fix-initial-input-mode.patch
  ibus-provide-layout-variations.patch
  ibus-setup-mozc-jp.desktop.in
  support-input-purpose.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mozc.spec ++++++
--- /var/tmp/diff_new_pack.ncb3f0/_old  2013-11-04 15:38:09.000000000 +0100
+++ /var/tmp/diff_new_pack.ncb3f0/_new  2013-11-04 15:38:09.000000000 +0100
@@ -40,19 +40,27 @@
 Source0:        %{name}-%{version}.tar.bz2
 Source1:        README.SUSE
 Source2:        fcitx-mozc-icons.tar.gz
-%if %{with_fcitx}
-# PATCH-FEATURE-UPSTREAM [email protected] - add fcitx as mozc module
-Patch0:         fcitx-mozc-1.11.1522.102.1.patch
-%endif
 # gyp is not included from 1.11.1522.102
 # License: BSD-3-Clause
 # svn export http://gyp.googlecode.com/svn/trunk/@r1665 gyp
 Source3:        gyp-r1665.tar.bz2
+Source4:        ibus-setup-mozc-jp.desktop.in
+%if %{with_fcitx}
+# PATCH-FEATURE-UPSTREAM [email protected] - add fcitx as mozc module
+Patch0:         fcitx-mozc-1.11.1522.102.1.patch
+%endif
+# PATCH-FIX-UPSTREAM [email protected] bnc#847718
+Patch1:         support-input-purpose.patch
+# PATCH-FIX-UPSTREAM [email protected]
+Patch2:         fix-initial-input-mode.patch
+# PATCH-FEATURE-OPENSUSE [email protected]
+Patch3:         ibus-provide-layout-variations.patch
 
 BuildRequires:  libopenssl-devel
 BuildRequires:  pkgconfig
 BuildRequires:  protobuf-devel
 BuildRequires:  python
+BuildRequires:  update-desktop-files
 BuildRequires:  zlib-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
@@ -119,6 +127,10 @@
 %patch0 -p2
 %endif
 
+%patch1 -p0
+%patch2 -p0
+%patch3 -p0
+
 cp %{SOURCE1} .
 
 # extract gyp
@@ -126,6 +138,8 @@
 tar xvf %{SOURCE3}
 popd
 
+sed -e 's|@libdir@|%{_libdir}|g' %{SOURCE4} > ibus-setup-mozc-jp.desktop
+
 %build
 %define target Release
 export QTDIR=%{_libdir}/qt4
@@ -169,6 +183,18 @@
 install -m644 data/images/unix/ui-alpha_half.png 
%{buildroot}%{_datadir}/ibus-mozc/alpha_half.png
 install -m644 data/images/unix/ui-alpha_full.png 
%{buildroot}%{_datadir}/ibus-mozc/alpha_full.png
 
+install -m755 -d %{buildroot}%{_datadir}/applications
+install -m644 ibus-setup-mozc-jp.desktop 
%{buildroot}%{_datadir}/applications/ibus-setup-mozc-jp.desktop
+%suse_update_desktop_file ibus-setup-mozc-jp System Utility settings
+
+# for provide-layout-variations patch
+ln -s ibus-setup-mozc-jp.desktop 
%{buildroot}%{_datadir}/applications/ibus-setup-mozc-jp-jp.desktop
+%suse_update_desktop_file ibus-setup-mozc-jp-jp System Utility settings
+ln -s ibus-setup-mozc-jp.desktop 
%{buildroot}%{_datadir}/applications/ibus-setup-mozc-us.desktop
+%suse_update_desktop_file ibus-setup-mozc-us System Utility settings
+ln -s ibus-setup-mozc-jp.desktop 
%{buildroot}%{_datadir}/applications/ibus-setup-mozc-dv.desktop
+%suse_update_desktop_file ibus-setup-mozc-dv System Utility settings
+
 %if %{with_fcitx}
 # Install Fcitx module
 for mofile in out_linux/Release/obj/gen/unix/fcitx/po/*.mo
@@ -240,6 +266,10 @@
 %defattr(-, root, root)
 %dir %{_libdir}/ibus-mozc/
 %{_libdir}/ibus-mozc/ibus-engine-mozc
+%{_datadir}/applications/ibus-setup-mozc-jp.desktop
+%{_datadir}/applications/ibus-setup-mozc-jp-jp.desktop
+%{_datadir}/applications/ibus-setup-mozc-us.desktop
+%{_datadir}/applications/ibus-setup-mozc-dv.desktop
 %dir %{_datadir}/ibus/component/
 %{_datadir}/ibus/component/mozc.xml
 %dir %{_datadir}/ibus-mozc/

++++++ fix-initial-input-mode.patch ++++++
diff -ru unix.org/ibus/property_handler.cc unix/ibus/property_handler.cc
--- unix.org/ibus/property_handler.cc   2013-10-29 02:17:24.898870371 +0900
+++ unix/ibus/property_handler.cc       2013-10-29 02:48:55.617344149 +0900
@@ -84,8 +84,27 @@
       client_(client),
       translator_(translator),
       original_composition_mode_(kMozcEngineInitialCompositionMode),
+#if IBUS_CHECK_VERSION(1, 5, 0)
+      is_activated_(false),
+#else
       is_activated_(true),
+#endif
       is_disabled_(false) {
+  commands::KeyEvent key;
+  if (is_activated_) {
+    key.set_special_key(mozc::commands::KeyEvent::ON);
+  } else {
+    key.set_special_key(mozc::commands::KeyEvent::OFF);
+  }
+  key.set_activated(is_activated_);
+  key.set_mode(original_composition_mode_);
+  commands::Output output;
+  if (client_->SendKey(key, &output)) {
+    original_composition_mode_ = output.status().mode();
+    is_activated_ = output.status().activated();
+  } else {
+    LOG(ERROR) << "SendKey failed";
+  }
 
   AppendCompositionPropertyToPanel();
 #ifndef OS_CHROMEOS
@@ -133,6 +152,9 @@
   IBusPropList *sub_prop_list = ibus_prop_list_new();
 
   // Create items for the radio menu.
+  const commands::CompositionMode initial_mode = is_activated_ ?
+      original_composition_mode_ :
+      kMozcEnginePropertyIMEOffState->composition_mode;
   string icon_path_for_panel;
   const char *mode_symbol = NULL;
   for (size_t i = 0; i < kMozcEnginePropertiesSize; ++i) {
@@ -140,7 +162,7 @@
     IBusText *label = ibus_text_new_from_string(
         translator_->MaybeTranslate(entry.label).c_str());
     IBusPropState state = PROP_STATE_UNCHECKED;
-    if (entry.composition_mode == kMozcEngineInitialCompositionMode) {
+    if (entry.composition_mode == initial_mode) {
       state = PROP_STATE_CHECKED;
       icon_path_for_panel = GetIconPath(entry.icon);
       mode_symbol = entry.label_for_panel;
Only in unix/ibus: property_handler.cc.orig
++++++ ibus-provide-layout-variations.patch ++++++
diff -ru unix.org/ibus/gen_mozc_xml.py unix/ibus/gen_mozc_xml.py
--- unix.org/ibus/gen_mozc_xml.py       2013-11-01 02:33:37.673242963 +0900
+++ unix/ibus/gen_mozc_xml.py   2013-11-01 02:35:46.918429452 +0900
@@ -69,7 +69,6 @@
     'description': '%(product_name)s (Japanese Input Method)',
     'language': 'ja',
     'icon': '%(ibus_mozc_icon_path)s',
-    'rank': '80',
     'symbol': '&#x3042;',
 }
 
@@ -86,12 +85,17 @@
     },
     # On Linux (IBus >= 1.5), we use special label 'default' for the keyboard
     # layout.
+    # openSUSE provides four engines like ChromeOS
     'Linux-IBus1.5': {
         # DO NOT change the engine name 'mozc-jp'. The names is referenced by
         # unix/ibus/mozc_engine.cc.
-        'name': ['mozc-jp'],
-        'longname': ['%(product_name)s'],
-        'layout': ['default'],
+        'name': ['mozc-jp', 'mozc-jp-jp', 'mozc-us', 'mozc-dv'],
+        'longname': ['%(product_name)s',
+                     '%(product_name)s - JP layout',
+                     '%(product_name)s - US layout',
+                     '%(product_name)s - US Dvorak layout'],
+        'layout': ['default', 'jp', 'us', 'us(dvorak)'],
+        'rank': ['80', '0', '0', '0'],
     },
     # On Chrome/Chromium OS, we provide three engines.
     'ChromeOS': {
++++++ ibus-setup-mozc-jp.desktop.in ++++++
[Desktop Entry]
Name=IBus Mozc Setup
Comment=Set up IBus Mozc engine
Exec=@libdir@/mozc/mozc_tool --mode=config_dialog
Icon=/usr/share/ibus-mozc/product_icon.png
NoDisplay=true
Type=Application
StartupNotify=true
++++++ support-input-purpose.patch ++++++
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 auto 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;
 };
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to