Hello community,

here is the log from the commit of package kadu for openSUSE:Factory checked in 
at 2014-12-08 16:56:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kadu (Old)
 and      /work/SRC/openSUSE:Factory/.kadu.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kadu"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kadu/kadu.changes        2014-11-04 
17:30:00.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kadu.new/kadu.changes   2014-12-08 
16:56:36.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Nov  7 00:10:12 UTC 2014 - fi...@opensuse.org
+
+- Upstream update to 1.2, bugfix only:
+  * users of old GG versions could not receive messages from Kadu
+  * after some imported configuration no contacts are displayed at all
+
+-------------------------------------------------------------------

Old:
----
  kadu-1.1.tar.bz2

New:
----
  kadu-1.2.tar.bz2

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

Other differences:
------------------
++++++ kadu.spec ++++++
--- /var/tmp/diff_new_pack.xwzL9i/_old  2014-12-08 16:56:38.000000000 +0100
+++ /var/tmp/diff_new_pack.xwzL9i/_new  2014-12-08 16:56:38.000000000 +0100
@@ -2,7 +2,7 @@
 # spec file for package kadu
 #
 # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# Copyright (c) 2012 Mariusz Fik <fi...@opensuse.org>.
+# Copyright (c) 2012-2014 Mariusz Fik <fi...@opensuse.org>.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
 %define build_penguins 0
 
 Name:           kadu
-Version:        1.1
+Version:        1.2
 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-1.1.tar.bz2 -> kadu-1.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-1.1/CMakeLists.txt new/kadu-1.2/CMakeLists.txt
--- old/kadu-1.1/CMakeLists.txt 2014-10-17 23:31:28.000000000 +0200
+++ new/kadu-1.2/CMakeLists.txt 2014-11-06 21:56:16.000000000 +0100
@@ -275,8 +275,10 @@
 add_subdirectory (kthxbye)
 
 # Now write KaduConfig for installation.
-kadu_configure_package_config_file (cmake/KaduConfig.cmake.in
-       "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/KaduConfig.cmake" 
INSTALL_TREE)
+if (UNIX)
+       kadu_configure_package_config_file (cmake/KaduConfig.cmake.in
+               "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/KaduConfig.cmake" 
INSTALL_TREE)
+endif ()
 
 if (KADU_INSTALL_SDK)
        install (FILES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-1.1/ChangeLog new/kadu-1.2/ChangeLog
--- old/kadu-1.1/ChangeLog      2014-10-17 23:31:28.000000000 +0200
+++ new/kadu-1.2/ChangeLog      2014-11-06 21:56:16.000000000 +0100
@@ -1,3 +1,8 @@
++++ version 1.2
+* gui: #2881 fixed: after some imported configuration no contacts are 
displayed at all (Vogel)
+* windows: #2880 fixed: improve hiding Kadu button on taskbar (Vogel)
+* gadu: #2857 fixed: users of old GG versions could not receive messages from 
Kadu (Vogel)
+
 +++ version 1.1
 * tabs: #2867 fixed: open in new window/tab works properly (Vogel)
 * jabber: #2861 fixed: double messages removed (Vogel)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-1.1/VERSION new/kadu-1.2/VERSION
--- old/kadu-1.1/VERSION        2014-10-17 23:31:28.000000000 +0200
+++ new/kadu-1.2/VERSION        2014-11-06 21:56:16.000000000 +0100
@@ -1 +1 @@
-1.1
+1.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kadu-1.1/kadu-core/formatted-string/CMakeLists.txt 
new/kadu-1.2/kadu-core/formatted-string/CMakeLists.txt
--- old/kadu-1.1/kadu-core/formatted-string/CMakeLists.txt      2014-10-17 
23:31:28.000000000 +0200
+++ new/kadu-1.2/kadu-core/formatted-string/CMakeLists.txt      2014-11-06 
21:56:16.000000000 +0100
@@ -6,6 +6,7 @@
        formatted-string-factory.cpp
        formatted-string-html-visitor.cpp
        formatted-string-image-block.cpp
+       formatted-string-is-plain-text-visitor.cpp
        formatted-string-plain-text-visitor.cpp
        formatted-string-text-block.cpp
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kadu-1.1/kadu-core/formatted-string/formatted-string-is-plain-text-visitor.cpp
 
new/kadu-1.2/kadu-core/formatted-string/formatted-string-is-plain-text-visitor.cpp
--- 
old/kadu-1.1/kadu-core/formatted-string/formatted-string-is-plain-text-visitor.cpp
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/kadu-1.2/kadu-core/formatted-string/formatted-string-is-plain-text-visitor.cpp
  2014-11-06 21:56:16.000000000 +0100
@@ -0,0 +1,66 @@
+/*
+ * %kadu copyright begin%
+ * Copyright 2014 Rafał Malinowski (rafal.przemyslaw.malinow...@gmail.com)
+ * %kadu copyright end%
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <QtCore/QFileInfo>
+#include <QtGui/QTextDocument>
+
+#include "formatted-string/formatted-string-image-block.h"
+#include "formatted-string/formatted-string-text-block.h"
+#include "misc/misc.h"
+
+#include "formatted-string-is-plain-text-visitor.h"
+
+FormattedStringIsPlainTextVisitor::FormattedStringIsPlainTextVisitor() :
+               m_first{true},
+               m_isPlain{true}
+{
+}
+
+FormattedStringIsPlainTextVisitor::~FormattedStringIsPlainTextVisitor()
+{
+}
+
+void FormattedStringIsPlainTextVisitor::beginVisit(const 
CompositeFormattedString * const)
+{
+}
+
+void FormattedStringIsPlainTextVisitor::endVisit(const 
CompositeFormattedString * const)
+{
+}
+
+void FormattedStringIsPlainTextVisitor::visit(const FormattedStringImageBlock 
* const)
+{
+       m_first = false;
+}
+
+void FormattedStringIsPlainTextVisitor::visit(const FormattedStringTextBlock * 
const formattedStringTextBlock)
+{
+       if (!m_first)
+               m_isPlain = false;
+       m_first = false;
+
+       // ignore colors
+       if (formattedStringTextBlock->bold() || 
formattedStringTextBlock->italic() || formattedStringTextBlock->underline())
+               m_isPlain = false;
+}
+
+bool FormattedStringIsPlainTextVisitor::isPlainText() const
+{
+       return m_isPlain;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kadu-1.1/kadu-core/formatted-string/formatted-string-is-plain-text-visitor.h
 
new/kadu-1.2/kadu-core/formatted-string/formatted-string-is-plain-text-visitor.h
--- 
old/kadu-1.1/kadu-core/formatted-string/formatted-string-is-plain-text-visitor.h
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/kadu-1.2/kadu-core/formatted-string/formatted-string-is-plain-text-visitor.h
    2014-11-06 21:56:16.000000000 +0100
@@ -0,0 +1,60 @@
+/*
+ * %kadu copyright begin%
+ * Copyright 2014 Rafał Malinowski (rafal.przemyslaw.malinow...@gmail.com)
+ * %kadu copyright end%
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <QtCore/QString>
+
+#include "formatted-string/formatted-string-visitor.h"
+#include "exports.h"
+
+/**
+ * @addtogroup FormattedString
+ * @{
+ */
+
+/**
+ * @class FormattedStringIsPlainTextVisitor
+ * @short This visitor check if formatted string is plain text number of items.
+ * @author Rafał 'Vogel' Malinowski
+ */
+class KADUAPI FormattedStringIsPlainTextVisitor : public FormattedStringVisitor
+{
+       Q_DISABLE_COPY(FormattedStringIsPlainTextVisitor);
+
+public:
+       FormattedStringIsPlainTextVisitor();
+       virtual ~FormattedStringIsPlainTextVisitor();
+
+       virtual void beginVisit(const CompositeFormattedString * const 
compositeFormattedString) override;
+       virtual void endVisit(const CompositeFormattedString * const 
compositeFormattedString) override;
+       virtual void visit(const FormattedStringImageBlock * const 
formattedStringImageBlock) override;
+       virtual void visit(const FormattedStringTextBlock * const 
formattedStringTextBlock) override;
+
+       bool isPlainText() const;
+
+private:
+       bool m_first;
+       bool m_isPlain;
+
+};
+
+/**
+ * @}
+ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kadu-1.1/kadu-core/gui/widgets/chat-widget/chat-widget-message-handler.cpp 
new/kadu-1.2/kadu-core/gui/widgets/chat-widget/chat-widget-message-handler.cpp
--- 
old/kadu-1.1/kadu-core/gui/widgets/chat-widget/chat-widget-message-handler.cpp  
    2014-10-17 23:31:28.000000000 +0200
+++ 
new/kadu-1.2/kadu-core/gui/widgets/chat-widget/chat-widget-message-handler.cpp  
    2014-11-06 21:56:16.000000000 +0100
@@ -20,6 +20,7 @@
 #include "chat-widget-message-handler.h"
 
 #include "chat/buddy-chat-manager.h"
+#include "configuration/configuration-file.h"
 #include "core/core.h"
 #include "gui/widgets/chat-widget/chat-widget.h"
 #include "gui/widgets/chat-widget/chat-widget-activation-service.h"
@@ -170,7 +171,14 @@
        if (shouldOpenChatWidget(chat))
                m_chatWidgetManager.data()->openChat(chat, 
OpenChatActivation::Activate);
        else
+       {
+#ifdef Q_OS_WIN32
+               if (!config_file.readBoolEntry("General", 
"HideMainWindowFromTaskbar"))
+                       qApp->alert(Core::instance()->kaduWindow());
+#else
                qApp->alert(Core::instance()->kaduWindow());
+#endif
+       }
 }
 
 bool ChatWidgetMessageHandler::shouldOpenChatWidget(const Chat &chat) const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kadu-1.1/kadu-core/gui/widgets/group-tab-bar/group-tab-bar.cpp 
new/kadu-1.2/kadu-core/gui/widgets/group-tab-bar/group-tab-bar.cpp
--- old/kadu-1.1/kadu-core/gui/widgets/group-tab-bar/group-tab-bar.cpp  
2014-10-17 23:31:28.000000000 +0200
+++ new/kadu-1.2/kadu-core/gui/widgets/group-tab-bar/group-tab-bar.cpp  
2014-11-06 21:56:16.000000000 +0100
@@ -147,7 +147,10 @@
 
 GroupFilter GroupTabBar::groupFilter() const
 {
-       return groupFilterAt(currentIndex());
+       if (Configuration.displayGroupTabs())
+               return groupFilterAt(currentIndex());
+       else
+               return GroupFilter{GroupFilterEverybody};
 }
 
 GroupFilter GroupTabBar::groupFilterAt(int index) const
@@ -169,7 +172,11 @@
 void GroupTabBar::currentChangedSlot(int index)
 {
        Configuration.setCurrentGroupTab(index);
-       emit currentGroupFilterChanged(groupFilterAt(index));
+       if (Configuration.displayGroupTabs())
+               emit currentGroupFilterChanged(groupFilterAt(index));
+       else
+               emit 
currentGroupFilterChanged(GroupFilter{GroupFilterEverybody});
+               
 }
 
 void GroupTabBar::contextMenuEvent(QContextMenuEvent *event)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kadu-1.1/plugins/gadu_protocol/services/gadu-chat-service.cpp 
new/kadu-1.2/plugins/gadu_protocol/services/gadu-chat-service.cpp
--- old/kadu-1.1/plugins/gadu_protocol/services/gadu-chat-service.cpp   
2014-10-17 23:31:28.000000000 +0200
+++ new/kadu-1.2/plugins/gadu_protocol/services/gadu-chat-service.cpp   
2014-11-06 21:56:16.000000000 +0100
@@ -34,6 +34,7 @@
 #include "core/core.h"
 #include "formatted-string/composite-formatted-string.h"
 #include "formatted-string/formatted-string-factory.h"
+#include "formatted-string/formatted-string-is-plain-text-visitor.h"
 #include "formatted-string/formatted-string-plain-text-visitor.h"
 #include "gui/windows/message-dialog.h"
 #include "message/raw-message.h"
@@ -95,7 +96,9 @@
        return 10000;
 }
 
-int GaduChatService::sendRawMessage(const QVector<Contact> &contacts, const 
RawMessage &rawMessage)
+// see #2857 - old GG versions do not receive messages sent with new API
+// but we can at least sent plain text messages with old API
+int GaduChatService::sendRawMessage(const QVector<Contact> &contacts, const 
RawMessage &rawMessage, bool isPlainText)
 {
        if (!Connection || !Connection.data()->hasSession())
                return -1;
@@ -105,13 +108,21 @@
        if (uinsCount > 1)
        {
                QScopedArrayPointer<UinType> uins(contactsToUins(contacts));
-               return 
gg_send_message_confer_html(writableSessionToken.rawSession(), GG_CLASS_CHAT, 
uinsCount, uins.data(),
-                               (const unsigned char *) 
rawMessage.rawContent().constData());
+               if (isPlainText)
+                       return 
gg_send_message_confer(writableSessionToken.rawSession(), GG_CLASS_CHAT, 
uinsCount, uins.data(),
+                                       (const unsigned char *) 
rawMessage.rawPlainContent().constData());
+               else
+                       return 
gg_send_message_confer_html(writableSessionToken.rawSession(), GG_CLASS_CHAT, 
uinsCount, uins.data(),
+                                       (const unsigned char *) 
rawMessage.rawContent().constData());
        }
        else if (uinsCount == 1)
        {
                UinType uin = GaduProtocolHelper::uin(contacts.at(0));
-               return gg_send_message_html(writableSessionToken.rawSession(), 
GG_CLASS_CHAT, uin, (const unsigned char *) 
rawMessage.rawContent().constData());
+
+               if (isPlainText)
+                       return 
gg_send_message(writableSessionToken.rawSession(), GG_CLASS_CHAT, uin, (const 
unsigned char *) rawMessage.rawPlainContent().constData());
+               else
+                       return 
gg_send_message_html(writableSessionToken.rawSession(), GG_CLASS_CHAT, uin, 
(const unsigned char *) rawMessage.rawContent().constData());
        }
 
        return -1;
@@ -133,6 +144,9 @@
        if (!Connection || !Connection.data()->hasSession())
                return false;
 
+       FormattedStringIsPlainTextVisitor isPlainTextVisitor;
+       message.content()->accept(&isPlainTextVisitor);
+
        FormattedStringPlainTextVisitor plainTextVisitor;
        message.content()->accept(&plainTextVisitor);
 
@@ -150,7 +164,7 @@
                return false;
        }
 
-       int messageId = 
sendRawMessage(message.messageChat().contacts().toContactVector(), rawMessage);
+       int messageId = 
sendRawMessage(message.messageChat().contacts().toContactVector(), rawMessage, 
isPlainTextVisitor.isPlainText());
 
        if (-1 == messageId)
                return false;
@@ -163,7 +177,7 @@
 
 bool GaduChatService::sendRawMessage(const Chat &chat, const QByteArray 
&rawMessage)
 {
-       int messageId = sendRawMessage(chat.contacts().toContactVector(), 
{rawMessage});
+       int messageId = sendRawMessage(chat.contacts().toContactVector(), 
{rawMessage}, true);
        return messageId != -1;
 }
 
@@ -238,7 +252,7 @@
        message.setSendDate(QDateTime::fromTime_t(e->event.msg.time));
        message.setReceiveDate(QDateTime::currentDateTime());
 
-       auto rawMessage= getRawMessage(e);
+       auto rawMessage = getRawMessage(e);
        if (rawMessageTransformerService())
                rawMessage = 
rawMessageTransformerService()->transform(rawMessage, message);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kadu-1.1/plugins/gadu_protocol/services/gadu-chat-service.h 
new/kadu-1.2/plugins/gadu_protocol/services/gadu-chat-service.h
--- old/kadu-1.1/plugins/gadu_protocol/services/gadu-chat-service.h     
2014-10-17 23:31:28.000000000 +0200
+++ new/kadu-1.2/plugins/gadu_protocol/services/gadu-chat-service.h     
2014-11-06 21:56:16.000000000 +0100
@@ -74,7 +74,7 @@
        bool ignoreRichText(Contact sender);
 
        void handleMsg(Contact sender, ContactSet recipients, MessageType type, 
struct gg_event *e);
-       int sendRawMessage(const QVector<Contact> &contacts, const RawMessage 
&rawMessage);
+       int sendRawMessage(const QVector<Contact> &contacts, const RawMessage 
&rawMessage, bool isPlainText);
        UinType * contactsToUins(const QVector<Contact> &contacts) const;
 
        QTimer *RemoveTimer;

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to