[ibus-qt] Update to 1.3.1
Takao Fujiwara
fujiwara at fedoraproject.org
Mon Aug 23 04:22:19 UTC 2010
commit 5767d51572373c87ca7375ab5427b50c2e0d7cac
Author: Takao Fujiwara <tfujiwar at redhat.com>
Date: Mon Aug 23 13:21:24 2010 +0900
Update to 1.3.1
.gitignore | 1 +
ibus-qt-HEAD.patch | 142 ----------------------------------------------------
ibus-qt.spec | 17 ++++--
sources | 2 +-
4 files changed, 14 insertions(+), 148 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 56e351b..3ef6cb0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
ibus-qt-1.3.0-Source.tar.gz
+/ibus-qt-1.3.1-Source.tar.gz
diff --git a/ibus-qt-HEAD.patch b/ibus-qt-HEAD.patch
index ab05a68..8b13789 100644
--- a/ibus-qt-HEAD.patch
+++ b/ibus-qt-HEAD.patch
@@ -1,143 +1 @@
-From b62d2643b3654af88f456443ff18b410cf2ff092 Mon Sep 17 00:00:00 2001
-From: fujiwarat <takao.fujiwara1 at gmail.com>
-Date: Fri, 23 Jul 2010 11:32:08 +0900
-Subject: [PATCH] Fix background and foreground in preedit QTextCharFormat.
-
----
- qtim/ibus-input-context.cpp | 102 ++++++++++++++++++++++++++++++++++++++++++-
- 1 files changed, 101 insertions(+), 1 deletions(-)
-
-diff --git a/qtim/ibus-input-context.cpp b/qtim/ibus-input-context.cpp
-index f7d4f7b..c47fce6 100644
---- a/qtim/ibus-input-context.cpp
-+++ b/qtim/ibus-input-context.cpp
-@@ -563,9 +563,82 @@ IBusInputContext::slotCommitText (const TextPointer &text)
- update ();
- }
-
-+static bool
-+sortSegments (const AttributePointer &attr_a, const AttributePointer &attr_b)
-+{
-+ return attr_a->start () < attr_b->start ();
-+}
-+
-+/*
-+ * KateViewInternal::inputMethodEvent() in kdelibs doesn't support the
-+ * duplicated format ranges.
-+ * This function separates each AttributePointer with the minimum size.
-+ * E.g.
-+ * attrs[i = 0]: [0 8]
-+ * attrs[j = 1]: [6 10]
-+ * attrs[j = 2]: [4 8]
-+ * If i == 0, the default min_end == 8 == attr_i->start () + attr_i->length ()
-+ * If j == 1, the min_end becomes 6 == attr_j->start ()
-+ * but it's not the minimum min_end yet.
-+ * If j == 2, the min_end becomes 4 == attr_j->start ()
-+ * Now min_end gets the minimum min_end.
-+ * After checks the min_end between j = 0 to attrs.size(),
-+ * attr_i gets the minimum min_end.
-+ * Let's split attr_i's range [0 8] with [0 4] and [4 8]
-+ * and then
-+ * attrs[i = 0]: [0 4]
-+ * attrs[i = 1]: [4 8]
-+ * attrs[j = 2]: [6 10]
-+ * attrs[j = 3]: [4 8]
-+ * increment i = i + 1 == 1 and apply the same split.
-+ * after split all attrs with the minimum rages, sort the attrs with
-+ * the attr->start() so that same range formats can be consolidated into
-+ * one format in IBusInputContext::displayPreeditText().
-+ */
-+static inline void
-+sortAttrs (QList <AttributePointer> &attrs)
-+{
-+ for (int i = 0; i < attrs.size (); i++) {
-+ AttributePointer attr_i = attrs[i];
-+ uint min_end = attr_i->start () + attr_i->length ();
-+ for (int j = 0; j < attrs.size (); j++) {
-+ if (i == j) {
-+ continue;
-+ }
-+ AttributePointer attr_j = attrs[j];
-+ if (attr_i->start () < attr_j->start () &&
-+ attr_j->start () < min_end) {
-+ min_end = attr_j->start ();
-+ }
-+ if (attr_i->start () < attr_j->start () + attr_j->length () &&
-+ attr_j->start () + attr_j->length () < min_end) {
-+ min_end = attr_j->start () + attr_j->length ();
-+ }
-+ }
-+ if (min_end == attr_i->start () + attr_i->length ()) {
-+ continue;
-+ }
-+ attrs.removeAt (i);
-+ int n = i;
-+ AttributePointer attr1 = new Attribute (attr_i->type (),
-+ attr_i->value (),
-+ attr_i->start (),
-+ min_end);
-+ attrs.insert (n++, attr1);
-+ AttributePointer attr2 = new Attribute (attr_i->type (),
-+ attr_i->value (),
-+ min_end,
-+ attr_i->end ());
-+ attrs.insert (n++, attr2);
-+ }
-+
-+ qSort (attrs.begin (), attrs.end (), sortSegments);
-+}
-+
- void
- IBusInputContext::displayPreeditText (const TextPointer &text, uint cursor_pos, bool visible)
- {
-+ QList <AttributePointer> attrs_sortable;
- QList <QAttribute> qattrs;
- QString string;
-
-@@ -575,8 +648,26 @@ IBusInputContext::displayPreeditText (const TextPointer &text, uint cursor_pos,
-
- AttrListPointer attrs = text->attrs ();
- for (uint i = 0; i < attrs->size (); i++) {
-- QTextCharFormat format;
- AttributePointer attr = attrs->get (i);
-+ attrs_sortable.append (attr);
-+ }
-+ sortAttrs (attrs_sortable);
-+
-+ for (int i = 0; i < attrs_sortable.size (); i++) {
-+ QTextCharFormat format;
-+ AttributePointer attr = attrs_sortable[i];
-+ int size = qattrs.size ();
-+ // The first index 0 is used by QInputMethodEvent::Cursor above.
-+ const int first_index = 1;
-+
-+ if (size > first_index) {
-+ QAttribute qattr = qattrs[size - 1];
-+ if(qattr.start == (int) attr->start () &&
-+ qattr.length == (int) attr->length ()) {
-+ format = qvariant_cast<QTextFormat> (qattr.value).toCharFormat ();
-+ }
-+ }
-+
- switch (attr->type ()) {
- case Attribute::TypeUnderline:
- switch (attr->value ()) {
-@@ -605,6 +696,15 @@ IBusInputContext::displayPreeditText (const TextPointer &text, uint cursor_pos,
- << "unknow Attribute type" << attr->type ();
- continue;
- }
-+
-+ if (size > first_index) {
-+ QAttribute qattr = qattrs[size - 1];
-+ if(qattr.start == (int) attr->start () &&
-+ qattr.length == (int) attr->length()) {
-+ qattrs.removeAt (size - 1);
-+ }
-+ }
-+
- qattrs.append (QAttribute (QInputMethodEvent::TextFormat,
- attr->start (), attr->length (), QVariant (format)));
- }
---
-1.6.2.5
diff --git a/ibus-qt.spec b/ibus-qt.spec
index bee623d..7241063 100644
--- a/ibus-qt.spec
+++ b/ibus-qt.spec
@@ -1,20 +1,24 @@
+%define ibus_version 1.3.7
+
Name: ibus-qt
-Version: 1.3.0
-Release: 2%{?dist}
+Version: 1.3.1
+Release: 1%{?dist}
Summary: Qt IBus library and Qt input method plugin
License: GPLv2+
Group: System Environment/Libraries
URL: http://code.google.com/p/ibus/
Source0: http://ibus.googlecode.com/files/%{name}-%{version}-Source.tar.gz
-Patch0: ibus-qt-HEAD.patch
+
+# Patch0: ibus-qt-HEAD.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake
BuildRequires: qt-devel >= 4.5
BuildRequires: dbus-devel >= 1.2
+BuildRequires: ibus-devel >= %ibus_version
BuildRequires: libicu-devel >= 4.0
BuildRequires: doxygen >= 1.6
-Requires: ibus >= 1.3
+Requires: ibus >= %ibus_version
%description
Qt IBus library and Qt input method plugin.
@@ -37,7 +41,7 @@ The ibus-qt-docs package contains developer documentation for ibus qt library.
%prep
%setup -q -n %{name}-%{version}-Source
-%patch0 -p1
+# %patch0 -p1
%build
%cmake \
@@ -79,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT
%doc docs/html
%changelog
+* Mon Aug 23 2010 Takao Fujiwara <tfujiwar at redhat.com> - 1.3.1-1
+- Update to 1.3.1.
+
* Fri Jul 23 2010 Takao Fujiwara <tfujiwar at redhat.com> - 1.3.0-2
- Fix Bug 616277 - hangul text color is not properly set in kwrite
diff --git a/sources b/sources
index 1e7fff1..c466ffc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-31746f26ef67ab997e6a01236aa66b67 ibus-qt-1.3.0-Source.tar.gz
+769e8872ca8a59327b2073ce2f142589 ibus-qt-1.3.1-Source.tar.gz
More information about the scm-commits
mailing list