Hello community,

here is the log from the commit of package kadu for openSUSE:Factory checked in 
at 2012-05-09 18:09:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kadu (Old)
 and      /work/SRC/openSUSE:Factory/.kadu.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kadu", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/kadu/kadu.changes        2012-04-23 
09:14:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kadu.new/kadu.changes   2012-05-09 
18:29:08.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Apr 30 20:35:46 UTC 2012 - [email protected]
+
+- Upstream update to 0.12.3, bugfix only:
+  + import history plugin fix
+  + setting proper description on shutdown
+
+-------------------------------------------------------------------

Old:
----
  kadu-0.11.2.tar.bz2

New:
----
  kadu-0.11.3.tar.bz2

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

Other differences:
------------------
++++++ kadu.spec ++++++
--- /var/tmp/diff_new_pack.THWUju/_old  2012-05-09 18:29:10.000000000 +0200
+++ /var/tmp/diff_new_pack.THWUju/_new  2012-05-09 18:29:10.000000000 +0200
@@ -16,11 +16,11 @@
 #
 
 
-%define real    %{name}-0.11.2
+%define real    %{name}-%{version}
 %define build_penguins 0
 
 Name:           kadu
-Version:        0.11.2
+Version:        0.11.3
 Release:        0
 # Choosing GPL-3.0+ because of presence and usage of numerous GPL-3.0 files
 Summary:        Gadu-Gadu and Jabber/XMPP protocol Instant Messenger

++++++ kadu-0.11.2.tar.bz2 -> kadu-0.11.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-0.11.2/ChangeLog new/kadu-0.11.3/ChangeLog
--- old/kadu-0.11.2/ChangeLog   2012-04-02 22:23:00.000000000 +0200
+++ new/kadu-0.11.3/ChangeLog   2012-04-28 23:52:24.000000000 +0200
@@ -1,3 +1,8 @@
++++ version 0.11.3
+* history: #2539 fixed: improper import of 0.6.5 history in some cases (Vogel)
+* gui: #2335 fixed: fixed QPalette::HighlightedText and QPalette::Highlight 
Windows workaround to always work properly (beevvy)
+* gadu: #2542 fixed: setting proper description on shutdown (Vogel)
+
 +++ version 0.11.2
 * url-handlers: #2485 fixed: do not treat strings beginning with "ftp." as 
http links (beevvy)
 * gadu: fixed rare problem which have been causing inability to send any 
messages (beevvy)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-0.11.2/VERSION new/kadu-0.11.3/VERSION
--- old/kadu-0.11.2/VERSION     2012-04-02 22:23:00.000000000 +0200
+++ new/kadu-0.11.3/VERSION     2012-04-28 23:52:24.000000000 +0200
@@ -1 +1 @@
-0.11.2
\ No newline at end of file
+0.11.3
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-0.11.2/kadu-core/accounts/account-shared.cpp 
new/kadu-0.11.3/kadu-core/accounts/account-shared.cpp
--- old/kadu-0.11.2/kadu-core/accounts/account-shared.cpp       2012-04-02 
22:23:00.000000000 +0200
+++ new/kadu-0.11.3/kadu-core/accounts/account-shared.cpp       2012-04-28 
23:52:24.000000000 +0200
@@ -230,7 +230,7 @@
 {
        if (!ProtocolHandler)
                return;
-       if (!ProtocolHandler->isConnected())
+       if (!ProtocolHandler->isConnected() && 
!ProtocolHandler->isDisconnecting())
                return;
 
        bool disconnectWithCurrentDescription = 
config_file.readBoolEntry("General", "DisconnectWithCurrentDescription");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-0.11.2/kadu-core/gui/widgets/kadu-web-view.cpp 
new/kadu-0.11.3/kadu-core/gui/widgets/kadu-web-view.cpp
--- old/kadu-0.11.2/kadu-core/gui/widgets/kadu-web-view.cpp     2012-04-02 
22:23:00.000000000 +0200
+++ new/kadu-0.11.3/kadu-core/gui/widgets/kadu-web-view.cpp     2012-04-28 
23:52:24.000000000 +0200
@@ -384,11 +384,14 @@
                        pos += matchedLength;
        }
 
-       QTextDocument htmlToPlainTextConverter;
-       htmlToPlainTextConverter.setHtml(html);
+       QTextDocument document;
+       document.setHtml(html);
        QMimeData *data = new QMimeData();
        data->setHtml(html);
-       data->setText(htmlToPlainTextConverter.toPlainText());
+
+       // remove OBJECT REPLACEMENT CHARACTER
+       // see http://www.kadu.im/redmine/issues/2490
+       data->setText(document.toPlainText().remove(QChar(0xfffc)));
        QApplication::clipboard()->setMimeData(data, mode);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kadu-0.11.2/kadu-core/gui/widgets/talkable-painter.cpp 
new/kadu-0.11.3/kadu-core/gui/widgets/talkable-painter.cpp
--- old/kadu-0.11.2/kadu-core/gui/widgets/talkable-painter.cpp  2012-04-02 
22:23:00.000000000 +0200
+++ new/kadu-0.11.3/kadu-core/gui/widgets/talkable-painter.cpp  2012-04-28 
23:52:24.000000000 +0200
@@ -40,6 +40,40 @@
 
 #include "talkable-painter.h"
 
+#ifdef Q_WS_WIN
+#include <windows.h>
+#endif
+
+#ifdef Q_WS_WIN
+bool TalkablePainter::useColorsWorkaround()
+{
+       static bool checked = false;
+       static bool use = false;
+       if (checked)
+               return use;
+
+       checked = true;
+
+       // copied from QWindowsVistaStylePrivate::useVista()
+       if (QSysInfo::WindowsVersion < QSysInfo::WV_VISTA || 
!(QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))
+               return false;
+
+       // inspired by QWindowsXPStylePrivate::useXP()
+       typedef BOOL (WINAPI *PtrIsAppThemed)();
+       typedef BOOL (WINAPI *PtrIsThemeActive)();
+       HMODULE uxThemeHandle = GetModuleHandle(TEXT("UxTheme.dll"));
+       if (uxThemeHandle == NULL)
+               return false;
+       PtrIsAppThemed pIsAppThemed = (PtrIsAppThemed) 
GetProcAddress(uxThemeHandle, "IsAppThemed");
+       PtrIsThemeActive pIsThemeActive = (PtrIsThemeActive) 
GetProcAddress(uxThemeHandle, "IsThemeActive");
+       if (pIsAppThemed == NULL || pIsThemeActive == NULL)
+               return false;
+       use = (pIsThemeActive() && pIsAppThemed());
+
+       return use;
+}
+#endif
+
 TalkablePainter::TalkablePainter(const TalkableDelegateConfiguration 
&configuration, QStyleOptionViewItemV4 option, const QModelIndex &index) :
                Configuration(configuration), Option(option), Index(index),
                FontMetrics(Configuration.font()),
@@ -74,8 +108,11 @@
        // Kadu bug #1531
        // http://bugreports.qt.nokia.com/browse/QTBUG-15637
        // for windows only
-       Option.palette.setColor(QPalette::All, QPalette::HighlightedText, 
Option.palette.color(QPalette::Active, QPalette::Text));
-       Option.palette.setColor(QPalette::All, QPalette::Highlight, 
Option.palette.base().color().darker(108));
+       if (useColorsWorkaround())
+       {
+               Option.palette.setColor(QPalette::All, 
QPalette::HighlightedText, Option.palette.color(QPalette::Active, 
QPalette::Text));
+               Option.palette.setColor(QPalette::All, QPalette::Highlight, 
Option.palette.base().color().darker(108));
+       }
 #endif
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-0.11.2/kadu-core/gui/widgets/talkable-painter.h 
new/kadu-0.11.3/kadu-core/gui/widgets/talkable-painter.h
--- old/kadu-0.11.2/kadu-core/gui/widgets/talkable-painter.h    2012-04-02 
22:22:59.000000000 +0200
+++ new/kadu-0.11.3/kadu-core/gui/widgets/talkable-painter.h    2012-04-28 
23:52:24.000000000 +0200
@@ -94,6 +94,10 @@
        void paintName(QPainter *painter);
        void paintDescription(QPainter *painter);
 
+#ifdef Q_WS_WIN
+       static bool useColorsWorkaround();
+#endif
+
 public:
        TalkablePainter(const TalkableDelegateConfiguration &configuration, 
QStyleOptionViewItemV4 option, const QModelIndex &index);
        ~TalkablePainter();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kadu-0.11.2/kadu-core/protocols/protocol-state-machine.cpp 
new/kadu-0.11.3/kadu-core/protocols/protocol-state-machine.cpp
--- old/kadu-0.11.2/kadu-core/protocols/protocol-state-machine.cpp      
2012-04-02 22:23:00.000000000 +0200
+++ new/kadu-0.11.3/kadu-core/protocols/protocol-state-machine.cpp      
2012-04-28 23:52:24.000000000 +0200
@@ -170,3 +170,15 @@
 {
        return configuration().contains(LoggingInState) || 
configuration().contains(LoggingInDelayState);
 }
+
+/**
+ * @author RafaƂ 'Vogel' Malinowski
+ * @short Returns true is machine is currently in logging out state.
+ * @return true is machine is currently in logging out state
+ *
+ * Returns true is machine is currently in logging out state.
+ */
+bool ProtocolStateMachine::isLoggingOut()
+{
+       return configuration().contains(LoggingOutState);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kadu-0.11.2/kadu-core/protocols/protocol-state-machine.h 
new/kadu-0.11.3/kadu-core/protocols/protocol-state-machine.h
--- old/kadu-0.11.2/kadu-core/protocols/protocol-state-machine.h        
2012-04-02 22:22:59.000000000 +0200
+++ new/kadu-0.11.3/kadu-core/protocols/protocol-state-machine.h        
2012-04-28 23:52:24.000000000 +0200
@@ -182,6 +182,7 @@
 
        bool isLoggedIn();
        bool isLoggingIn();
+       bool isLoggingOut();
 
 signals:
        /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-0.11.2/kadu-core/protocols/protocol.cpp 
new/kadu-0.11.3/kadu-core/protocols/protocol.cpp
--- old/kadu-0.11.2/kadu-core/protocols/protocol.cpp    2012-04-02 
22:23:00.000000000 +0200
+++ new/kadu-0.11.3/kadu-core/protocols/protocol.cpp    2012-04-28 
23:52:24.000000000 +0200
@@ -128,6 +128,7 @@
 void Protocol::doSetStatus(Status status)
 {
        CurrentStatus = status;
+
        if (!CurrentStatus.isDisconnected())
        {
                emit statusChanged(CurrentAccount, CurrentStatus);
@@ -273,3 +274,8 @@
 {
        return Machine->isLoggingIn();
 }
+
+bool Protocol::isDisconnecting()
+{
+       return Machine->isLoggingOut();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-0.11.2/kadu-core/protocols/protocol.h 
new/kadu-0.11.3/kadu-core/protocols/protocol.h
--- old/kadu-0.11.2/kadu-core/protocols/protocol.h      2012-04-02 
22:23:00.000000000 +0200
+++ new/kadu-0.11.3/kadu-core/protocols/protocol.h      2012-04-28 
23:52:24.000000000 +0200
@@ -131,6 +131,7 @@
 
        bool isConnected();
        bool isConnecting();
+       bool isDisconnecting();
 
        // method called by user
        void setStatus(Status status);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-0.11.2/plugins/gadu_protocol/gadu-protocol.cpp 
new/kadu-0.11.3/plugins/gadu_protocol/gadu-protocol.cpp
--- old/kadu-0.11.2/plugins/gadu_protocol/gadu-protocol.cpp     2012-04-02 
22:23:09.000000000 +0200
+++ new/kadu-0.11.3/plugins/gadu_protocol/gadu-protocol.cpp     2012-04-28 
23:52:24.000000000 +0200
@@ -127,7 +127,7 @@
 
 void GaduProtocol::sendStatusToServer()
 {
-       if (!isConnected())
+       if (!isConnected() && !isDisconnecting())
                return;
 
        if (!GaduSession)
@@ -259,14 +259,12 @@
 
 void GaduProtocol::logout()
 {
-       kdebugf();
-
-       // we need to change status manually in gadu
+       // we need to changestatus manually in gadu
        // status is offline
        sendStatusToServer();
-       gg_logoff(GaduSession);
+       // gg_logoff(GaduSession);
 
-       loggedOut();
+       QTimer::singleShot(0, this, SLOT(loggedOut()));
 }
 
 void GaduProtocol::disconnectedCleanup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kadu-0.11.2/plugins/history_migration/history-migration-helper.cpp 
new/kadu-0.11.3/plugins/history_migration/history-migration-helper.cpp
--- old/kadu-0.11.2/plugins/history_migration/history-migration-helper.cpp      
2012-04-02 22:22:59.000000000 +0200
+++ new/kadu-0.11.3/plugins/history_migration/history-migration-helper.cpp      
2012-04-28 23:52:24.000000000 +0200
@@ -58,24 +58,9 @@
                int lines = 0;
                QString filename = getFileNameByUinsList(uins);
                QByteArray buffer;
-               QFile fidx(path + filename + ".idx"), f(path + filename);
+               QFile f(path + filename);
 
-               if (fidx.open(QIODevice::ReadOnly))
-               {
-                       int offs, lastOffs = 0;
-                       lines = fidx.size() / sizeof(int);
-
-                       // ignore garbage in index file (strange, but sometimes 
happens)
-                       while (fidx.read((char *)&offs, sizeof(int)) > 0)
-                       {
-                               if (offs < lastOffs)
-                                       --lines;
-                               else
-                                       lastOffs = offs;
-                       }
-               }
-               // apparentyly sms doesn't have an index file, so handle this
-               else if (filename == "sms" && f.open(QIODevice::ReadOnly))
+               if (f.open(QIODevice::ReadOnly))
                {
                        QTextStream stream(&f);
                        while (!stream.readLine().isNull())
@@ -89,8 +74,6 @@
                        return 0;
                }
 
-               fidx.close();
-
                kdebugmf(KDEBUG_INFO, "%d lines\n", lines);
                kdebugf2();
                return lines;
@@ -100,26 +83,28 @@
        {
                kdebugf();
                QList<UinsList> entries;
-               QDir dir(path, "*.idx");
+               QDir dir(path);
                UinsList uins;
 
+               QRegExp historyEntryRegExp("[0-9]+(_[0-9]+)*");
+
                foreach (const QString &entry, dir.entryList())
                {
+                       if (!historyEntryRegExp.exactMatch(entry))
+                               continue;
+
                        uins.clear();
-                       // ignore sms.idx file, see below
-                       if (entry != QLatin1String("sms.idx"))
+
+                       QStringList struins = entry.split('_', 
QString::SkipEmptyParts);
+                       bool ok;
+                       foreach (const QString &struin, struins)
                        {
-                               QStringList struins = entry.left(entry.length() 
- 4).split('_', QString::SkipEmptyParts);
-                               bool ok;
-                               foreach (const QString &struin, struins)
-                               {
-                                       uins.append(struin.toUInt(&ok));
-                                       if (!ok)
-                                               break;
-                               }
-                               if (ok)
-                                       entries.append(uins);
+                               uins.append(struin.toUInt(&ok));
+                               if (!ok)
+                                       break;
                        }
+                       if (ok)
+                               entries.append(uins);
                }
 
                // special case for sms: probably it won't have an index file,
@@ -140,9 +125,8 @@
 
                QList<HistoryEntry> entries;
                QStringList tokens;
-               QFile f, fidx;
+               QFile f;
                QString filename, line;
-               int offs = 0;
 
                if (!uins.isEmpty())
                        filename = getFileNameByUinsList(uins);
@@ -155,16 +139,6 @@
                        return entries;
                }
 
-               fidx.setFileName(f.fileName() + ".idx");
-               if (fidx.open(QIODevice::ReadOnly))
-                       fidx.read((char *)&offs, sizeof(int));
-               // let sms not have an index file
-               else if (filename != "sms")
-                       return entries;
-               fidx.close();
-               if (!f.seek(offs))
-                       return entries;
-
                QTextStream stream(&f);
                stream.setCodec(codec_latin2);
                while (!(line = stream.readLine()).isNull())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kadu-0.11.2/plugins/jabber_protocol/jabber-protocol.cpp 
new/kadu-0.11.3/plugins/jabber_protocol/jabber-protocol.cpp
--- old/kadu-0.11.2/plugins/jabber_protocol/jabber-protocol.cpp 2012-04-02 
22:23:09.000000000 +0200
+++ new/kadu-0.11.3/plugins/jabber_protocol/jabber-protocol.cpp 2012-04-28 
23:52:24.000000000 +0200
@@ -280,7 +280,7 @@
 
 void JabberProtocol::sendStatusToServer()
 {
-       if (!isConnected())
+       if (!isConnected() && !isDisconnecting())
                return;
 
        JabberClient->setPresence(IrisStatusAdapter::toIrisStatus(status()));

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to