Hello community,
here is the log from the commit of package kadu for openSUSE:Factory checked in at 2014-11-04 17:29:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2013-12-03 14:26:10.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kadu.new/kadu.changes 2014-11-04 17:30:00.000000000 +0100
@@ -1,0 +2,13 @@
+Sun Nov 2 18:03:27 UTC 2014 - fisiu@opensuse.org
+
+- Upstream update to 1.1 (changes since 0.12.3):
+ * new OTR encryption
+ * add faenza icon theme
+ * new tray tooltips
+ * image sending uses new protocol
+ * many bug fixes
+- All external plugins updated
+- New external plugin kadu-completion
+- Drop kadu-0.12.3-cmake-macro-fix.patch: fixed upstream.
+
+-------------------------------------------------------------------
Old:
----
anonymous_check-0.11.0-1.tar.bz2
globalhotkeys-0.12-32.tar.gz
import_history-0.12.0.tar.bz2
kadu-0.12.3-cmake-macro-fix.patch
kadu-0.12.3.tar.bz2
lednotify-0.12-33.tar.gz
messagessplitter-0.12-5.tar.gz
mime_tex-0.12.0-2.tar.bz2
networkping-0.12-4.tar.gz
nextinfo-0.12-9.tar.gz
panelkadu-0.12-10.tar.gz
senthistory-0.12-11.tar.gz
New:
----
anonymous_check-1.0-3.tar.bz2
globalhotkeys-1.0-33.tar.bz2
import_history-1.0-4.tar.bz2
kadu-1.1.tar.bz2
kadu_completion-1.0-4.tar.bz2
lednotify-1.0-34.tar.bz2
messagessplitter-1.0-6.tar.bz2
mime_tex-1.0-3.tar.bz2
networkping-1.0-5.tar.bz2
nextinfo-1.0-10.tar.bz2
panelkadu-1.0-11.tar.bz2
senthistory-1.0-12.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kadu.spec ++++++
--- /var/tmp/diff_new_pack.r56img/_old 2014-11-04 17:30:02.000000000 +0100
+++ /var/tmp/diff_new_pack.r56img/_new 2014-11-04 17:30:02.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package kadu
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Mariusz Fik .
#
# All modifications and additions to the file contributed by third parties
@@ -21,7 +21,7 @@
%define build_penguins 0
Name: kadu
-Version: 0.12.3
+Version: 1.1
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
@@ -31,21 +31,18 @@
Source0: http://download.kadu.im/stable/%{name}-%{version}.tar.bz2
# PATCH-FEATURE-OPENSUSE enable_external_plugins.patch fisiu@opensuse.org
Patch0: enable_external_plugins.patch
-%if %{?suse_version} > 1310
-# PATCH-FIX-UPSTREAM kadu-0.12.3-cmake-macro-fix.patch -- http://www.kadu.im/forum/viewtopic.php?f=1&t=16904#p112935
-Patch1: kadu-0.12.3-cmake-macro-fix.patch
-%endif
### 1x - External Plugins ###
-Source10: http://download.kadu.im/external-plugins/anonymous_check/anonymous_check-0.1...
-Source11: http://ultr.pl/kadu/globalhotkeys-0.12-32.tar.gz
-Source12: http://download.kadu.im/external-plugins/import_history/import_history-0.12....
-Source13: http://ultr.pl/kadu/lednotify-0.12-33.tar.gz
-Source14: http://ultr.pl/kadu/messagessplitter-0.12-5.tar.gz
-Source15: http://download.kadu.im/external-plugins/mime_tex/mime_tex-0.12.0-2.tar.bz2
-Source16: http://ultr.pl/kadu/networkping-0.12-4.tar.gz
-Source17: http://ultr.pl/kadu/nextinfo-0.12-9.tar.gz
-Source18: http://ultr.pl/kadu/panelkadu-0.12-10.tar.gz
-Source19: http://ultr.pl/kadu/senthistory-0.12-11.tar.gz
+Source09: http://download.kadu.im/external-plugins/stable/anonymous_check-1.0-3.tar.bz...
+Source10: http://download.kadu.im/external-plugins/stable/kadu_completion-1.0-4.tar.bz...
+Source11: http://download.kadu.im/external-plugins/stable/globalhotkeys-1.0-33.tar.bz2
+Source12: http://download.kadu.im/external-plugins/stable/import_history-1.0-4.tar.bz2
+Source13: http://download.kadu.im/external-plugins/stable/lednotify-1.0-34.tar.bz2
+Source14: http://download.kadu.im/external-plugins/stable/messagessplitter-1.0-6.tar.b...
+Source15: http://download.kadu.im/external-plugins/stable/mime_tex-1.0-3.tar.bz2
+Source16: http://download.kadu.im/external-plugins/stable/networkping-1.0-5.tar.bz2
+Source17: http://download.kadu.im/external-plugins/stable/nextinfo-1.0-10.tar.bz2
+Source18: http://download.kadu.im/external-plugins/stable/panelkadu-1.0-11.tar.bz2
+Source19: http://download.kadu.im/external-plugins/stable/senthistory-1.0-12.tar.bz2
### 2x - Emoticons ###
%if %{build_penguins}
Source20: kompatybilne_z_GG6.tar.gz
@@ -58,24 +55,26 @@
Source33: kadu-sound-michalsrodek.tar.bz2
Source34: kadu-sound-percussion.tar.bz2
Source35: kadu-sound-ultr.tar.bz2
-BuildRequires: cmake >= 2.6.0
+BuildRequires: cmake >= 2.8.10
BuildRequires: fdupes
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-devel
-BuildRequires: pkgconfig(QtGui) >= 4.7.0
-BuildRequires: pkgconfig(QtWebKit) >= 4.7.0
+BuildRequires: pkgconfig(QtGui) >= 4.8.0
+BuildRequires: pkgconfig(QtWebKit) >= 4.8.0
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(enchant)
-BuildRequires: pkgconfig(libgadu) >= 1.11.0
+BuildRequires: pkgconfig(libarchive) >= 2.6.0
+BuildRequires: pkgconfig(libgadu) >= 1.12.0
BuildRequires: pkgconfig(libidn)
%if %{?suse_version} < 1310
BuildRequires: pkgconfig(libntrack-qt4)
%endif
+BuildRequires: pkgconfig(libotr) >= 4.0
BuildRequires: pkgconfig(phonon)
BuildRequires: pkgconfig(qca2)
BuildRequires: pkgconfig(sndfile)
# runtime requires
-Requires: libgadu3 >= 1.11.0
+Requires: libgadu3 >= 1.12.0
# sql_history plugin needs qt4-sqlite to operate
Requires: libqt4-sql-sqlite
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -111,6 +110,15 @@
Anonymous_check is a plugin to automatic lookup who is an interlocutor
when (s)he starts talking to you.
+%package completion
+Summary: Bash completion-like module for Kadu
+License: GPL-3.0+
+Group: Productivity/Networking/Instant Messenger
+Requires: %{name} = %{version}
+
+%description completion
+Bash completion-like module for Kadu.
+
%package globalhotkeys
Summary: Global hotkeys support to Kadu
License: GPL-3.0+
@@ -286,29 +294,21 @@
%prep
%setup -q -n %{real}
# add external plugins
-%setup -qTD -a 10 -a 11 -a 12 -a 13 -a 14 -a15 -a16 -a17 -a18 -a19 -n %{real}/plugins
+%setup -qTD -a09 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -a18 -a19 -n %{real}/plugins
# add additionals emoticons
%if %{build_penguins}
-%setup -qTD -a 20 -a 21 -n %{real}/varia/themes/emoticons
+%setup -qTD -a20 -a21 -n %{real}/varia/themes/emoticons
%endif
# add additionals sound themes
-%setup -qTD -a 30 -a 31 -a 32 -a 33 -a 34 -a 35 -n %{real}/varia/themes/sounds
+%setup -qTD -a30 -a31 -a32 -a33 -a34 -a35 -n %{real}/varia/themes/sounds
#
%setup -qDTn %{real}
-# set libgadu required version >= 1.11.0
-sed -e "s:set (LIBGADU_MIN_VERSION \"1.11.1\"):set (LIBGADU_MIN_VERSION \"1.11.0\"):" -i plugins/gadu_protocol/CMakeLists.txt
-
# enable external plugins (patch0):
#
-# anonymous_check, globalhotkeys, importhistory
-# lednotify, messagessplitter, mime_tex
-# networkping, nextinfo, panelkadu, senthistory
+# anonymous_check, completion, globalhotkeys, importhistory, lednotify,
+# messagessplitter, mime_tex, networkping, nextinfo, panelkadu, senthistory
#
%patch0
-# Fix cmake macro only for > 13.1
-%if %{?suse_version} > 1310
-%patch1 -p0
-%endif
# switch state of internal plugins
# don't enable mpd since it's not in oss repository
@@ -335,15 +335,12 @@
%install
%make_install
-# remove sources from oxygen icons directory
-rm -rf %{buildroot}%{_datadir}/kadu/themes/icons/oxygen/src
-
-# remove sdk dir - useless on linux where we provide all plugins already compiled
-rm -rf %{buildroot}/usr/sdk
-
%fdupes %{buildroot}%{_prefix}
%suse_update_desktop_file -r kadu Network InstantMessaging
+# Don't check RPATH
+export NO_BRP_CHECK_RPATH=true
+
%post
# none
@@ -388,6 +385,7 @@
%dir %{_datadir}/icons/hicolor/*/apps
%{_datadir}/icons/hicolor/*/apps/kadu.png
%{_datadir}/kadu/AUTHORS
+%{_datadir}/kadu/AUTHORS.html
%{_datadir}/kadu/ChangeLog
%{_datadir}/kadu/ChangeLog.OLD-PL
%{_datadir}/kadu/COPYING
@@ -407,8 +405,10 @@
%{_datadir}/kadu/plugins/config_wizard.desc
%{_datadir}/kadu/plugins/desktop_docking.desc
%{_datadir}/kadu/plugins/docking.desc
+%{_datadir}/kadu/plugins/emoticons.desc
%{_datadir}/kadu/plugins/encryption_ng.desc
%{_datadir}/kadu/plugins/encryption_ng_simlite.desc
+%{_datadir}/kadu/plugins/encryption_otr.desc
%{_datadir}/kadu/plugins/exec_notify.desc
%{_datadir}/kadu/plugins/ext_sound.desc
%{_datadir}/kadu/plugins/falf_mediaplayer.desc
@@ -449,7 +449,8 @@
%{_datadir}/kadu/plugins/configuration/cenzor.ui
%{_datadir}/kadu/plugins/configuration/desktop_docking.ui
%{_datadir}/kadu/plugins/configuration/docking.ui
-%{_datadir}/kadu/plugins/configuration/encryption-ng.ui
+%{_datadir}/kadu/plugins/configuration/emoticons.ui
+%{_datadir}/kadu/plugins/configuration/encryption-ng-simlite.ui
%{_datadir}/kadu/plugins/configuration/ext_sound.ui
%{_datadir}/kadu/plugins/configuration/filedesc.ui
%{_datadir}/kadu/plugins/configuration/firewall.ui
@@ -481,6 +482,7 @@
%{_datadir}/kadu/plugins/data/sms/scripts/gateway*.js
%{_datadir}/kadu/plugins/data/sql_history/scripts/history-database-recovery.sh
%{_datadir}/kadu/plugins/data/word_fix/wf_default_list.data
+%{_datadir}/kadu/plugins/translations/amarok1_mediaplayer_*.qm
%{_datadir}/kadu/plugins/translations/antistring_*.qm
%{_datadir}/kadu/plugins/translations/autoaway_*.qm
%{_datadir}/kadu/plugins/translations/auto_hide_*.qm
@@ -491,23 +493,28 @@
%{_datadir}/kadu/plugins/translations/config_wizard_*.qm
%{_datadir}/kadu/plugins/translations/desktop_docking_*.qm
%{_datadir}/kadu/plugins/translations/docking_*.qm
+%{_datadir}/kadu/plugins/translations/emoticons_*.qm
%{_datadir}/kadu/plugins/translations/encryption_ng_*.qm
+%{_datadir}/kadu/plugins/translations/encryption_otr_*.qm
%{_datadir}/kadu/plugins/translations/exec_notify_*.qm
%{_datadir}/kadu/plugins/translations/ext_sound_*.qm
+%{_datadir}/kadu/plugins/translations/falf_mediaplayer_*.qm
%{_datadir}/kadu/plugins/translations/filedesc_*.qm
%{_datadir}/kadu/plugins/translations/firewall_*.qm
%{_datadir}/kadu/plugins/translations/freedesktop_notify_*.qm
%{_datadir}/kadu/plugins/translations/gadu_protocol_*.qm
%{_datadir}/kadu/plugins/translations/hints_*.qm
%{_datadir}/kadu/plugins/translations/history_*.qm
+%{_datadir}/kadu/plugins/translations/idle_*.qm
%{_datadir}/kadu/plugins/translations/imagelink_*.qm
%{_datadir}/kadu/plugins/translations/jabber_protocol_*.qm
%{_datadir}/kadu/plugins/translations/last_seen_*.qm
%{_datadir}/kadu/plugins/translations/mediaplayer_*.qm
%{_datadir}/kadu/plugins/translations/mprisplayer_mediaplayer_*.qm
%{_datadir}/kadu/plugins/translations/pcspeaker_*.qm
+%{_datadir}/kadu/plugins/translations/phonon_sound_*.qm
%{_datadir}/kadu/plugins/translations/profiles_import_*.qm
-%{_datadir}/kadu/plugins/translations/qt4_docking_notify_*.qm
+%{_datadir}/kadu/plugins/translations/qt4_docking_*.qm
%{_datadir}/kadu/plugins/translations/qt4_sound_*.qm
%{_datadir}/kadu/plugins/translations/screenshot_*.qm
%{_datadir}/kadu/plugins/translations/simpleview_*.qm
@@ -519,6 +526,7 @@
%{_datadir}/kadu/plugins/translations/sql_history_*.qm
%{_datadir}/kadu/plugins/translations/tabs_*.qm
%{_datadir}/kadu/plugins/translations/word_fix_*.qm
+%{_datadir}/kadu/qml
%{_datadir}/kadu/scripts/*.js
%{_datadir}/kadu/syntax/chat/*.syntax
%{_datadir}/kadu/syntax/chat/Default
@@ -532,10 +540,12 @@
%{_datadir}/kadu/themes/emoticons/penguins/*
%{_datadir}/kadu/themes/emoticons/tango/*
%{_datadir}/kadu/themes/icons/default
+%{_datadir}/kadu/themes/icons/faenza
%{_datadir}/kadu/themes/icons/glass
%{_datadir}/kadu/themes/icons/oxygen
%{_datadir}/kadu/themes/sounds/default
%{_datadir}/kadu/translations/*
+%{_libdir}/kadu/libkadu.so
%{_libdir}/kadu/plugins/libamarok1_mediaplayer.so
%{_libdir}/kadu/plugins/libantistring.so
%{_libdir}/kadu/plugins/libauto_hide.so
@@ -547,8 +557,10 @@
%{_libdir}/kadu/plugins/libconfig_wizard.so
%{_libdir}/kadu/plugins/libdesktop_docking.so
%{_libdir}/kadu/plugins/libdocking.so
+%{_libdir}/kadu/plugins/libemoticons.so
%{_libdir}/kadu/plugins/libencryption_ng.so
%{_libdir}/kadu/plugins/libencryption_ng_simlite.so
+%{_libdir}/kadu/plugins/libencryption_otr.so
%{_libdir}/kadu/plugins/libexec_notify.so
%{_libdir}/kadu/plugins/libext_sound.so
%{_libdir}/kadu/plugins/libfalf_mediaplayer.so
@@ -585,11 +597,10 @@
%files devel
%defattr(-,root,root)
%dir %{_includedir}/kadu
-%dir %{_datadir}/cmake
-%dir %{_datadir}/cmake/Modules
-%{_datadir}/cmake/Modules/FindKadu.cmake
%{_includedir}/kadu/kadu-core
%{_includedir}/kadu/plugins
+%{_datadir}/cmake/Kadu
+%{_datadir}/kadu/sdk
### External plugins ###
@@ -599,6 +610,13 @@
%{_datadir}/kadu/plugins/anonymous_check.desc
%{_datadir}/kadu/plugins/translations/anonymous*.qm
+%files completion
+%defattr(-,root,root)
+%dir %{_datadir}/kadu/plugins/data/kadu_completion
+%{_libdir}/kadu/plugins/libkadu_completion.so
+%{_datadir}/kadu/plugins/data/kadu_completion/list.txt
+%{_datadir}/kadu/plugins/kadu_completion.desc
+
%files globalhotkeys
%defattr(-,root,root)
%{_libdir}/kadu/plugins/libglobalhotkeys.so
++++++ anonymous_check-0.11.0-1.tar.bz2 -> anonymous_check-1.0-3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/anonymous_check/CMakeLists.txt new/anonymous_check/CMakeLists.txt
--- old/anonymous_check/CMakeLists.txt 2011-12-28 03:15:34.000000000 +0100
+++ new/anonymous_check/CMakeLists.txt 2014-07-30 23:48:02.000000000 +0200
@@ -2,11 +2,10 @@
# minimal required versions
cmake_minimum_required (VERSION 2.8)
-set (QT_MIN_VERSION "4.7.0")
+set (QT_MIN_VERSION "4.8.0")
set (CMAKE_MIN_VERSION "2.8.0")
-set (KADU_FIND_REQUIRED true)
-include (FindKadu)
+find_package (Kadu REQUIRED CONFIG)
set (SOURCES
anonymous_check.cpp
@@ -14,18 +13,6 @@
anonymous_info.cpp
)
-set (MOC_SOURCES
- anonymous_check-plugin.h
- anonymous_check.h
-)
-
-set (TRANSLATION_SOURCES
- translations/anonymous_check_pl.ts
-)
-
kadu_plugin (anonymous_check
PLUGIN_SOURCES ${SOURCES}
- PLUGIN_MOC_SOURCES ${MOC_SOURCES}
- PLUGIN_TRANSLATION_SOURCES ${TRANSLATION_SOURCES}
)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/anonymous_check/ChangeLog new/anonymous_check/ChangeLog
--- old/anonymous_check/ChangeLog 2011-12-28 03:15:34.000000000 +0100
+++ new/anonymous_check/ChangeLog 2014-07-30 23:48:02.000000000 +0200
@@ -1,3 +1,7 @@
+2014-06-30 Rafał Malinowski
+
+ * Plugin made compatible with Kadu 1.0.
+
2011-12-28 Bartosz Brachaczek
* Plugin made compatible with Kadu 0.11.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/anonymous_check/anonymous_check-plugin.cpp new/anonymous_check/anonymous_check-plugin.cpp
--- old/anonymous_check/anonymous_check-plugin.cpp 2011-12-28 03:15:34.000000000 +0100
+++ new/anonymous_check/anonymous_check-plugin.cpp 2014-07-30 23:48:02.000000000 +0200
@@ -25,17 +25,19 @@
{
}
-int AnonymousCheckPlugin::init(bool firstLoad)
+bool AnonymousCheckPlugin::init(bool firstLoad)
{
Q_UNUSED(firstLoad)
AnonymousCheckInstance = new AnonCheck::AnonymousCheck(this);
- return 0;
+ return true;
}
void AnonymousCheckPlugin::done()
{
}
+#include "moc_anonymous_check-plugin.cpp"
+
Q_EXPORT_PLUGIN2(anonymous_check, AnonymousCheckPlugin)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/anonymous_check/anonymous_check-plugin.h new/anonymous_check/anonymous_check-plugin.h
--- old/anonymous_check/anonymous_check-plugin.h 2011-12-28 03:15:34.000000000 +0100
+++ new/anonymous_check/anonymous_check-plugin.h 2014-07-30 23:48:02.000000000 +0200
@@ -20,24 +20,25 @@
#ifndef ANONYMOUS_CHECK_PLUGIN_H
#define ANONYMOUS_CHECK_PLUGIN_H
-#include "plugins/generic-plugin.h"
+#include "plugin/plugin-root-component.h"
namespace AnonCheck
{
class AnonymousCheck;
}
-class AnonymousCheckPlugin : public QObject, public GenericPlugin
+class AnonymousCheckPlugin : public QObject, public PluginRootComponent
{
Q_OBJECT
- Q_INTERFACES(GenericPlugin)
+ Q_INTERFACES(PluginRootComponent)
+ Q_PLUGIN_METADATA(IID "im.kadu.PluginRootComponent")
AnonCheck::AnonymousCheck *AnonymousCheckInstance;
public:
virtual ~AnonymousCheckPlugin();
- virtual int init(bool firstLoad);
+ virtual bool init(bool firstLoad);
virtual void done();
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/anonymous_check/anonymous_check.cpp new/anonymous_check/anonymous_check.cpp
--- old/anonymous_check/anonymous_check.cpp 2011-12-28 03:15:34.000000000 +0100
+++ new/anonymous_check/anonymous_check.cpp 2014-07-30 23:48:02.000000000 +0200
@@ -23,20 +23,21 @@
#include "debug.h"
#include "buddies/buddy-search-criteria.h"
+#include "contacts/contact-set.h"
+#include "core/core.h"
#include "message/message-render-info.h"
#include "message/message-common.h"
-#include "gui/widgets/chat-widget-manager.h"
-#include "contacts/contact-set.h"
+#include "gui/widgets/chat-widget/chat-widget-manager.h"
#include "protocols/services/contact-personal-info-service.h"
AnonCheck::AnonymousCheck::AnonymousCheck(QObject *parent)
: QObject(parent) {
- connect(ChatWidgetManager::instance(), SIGNAL(chatWidgetCreated(ChatWidget *)),
+ connect(Core::instance()->chatWidgetManager(), SIGNAL(chatWidgetCreated(ChatWidget *)),
this, SLOT(onChatWidgetCreated(ChatWidget *)));
}
AnonCheck::AnonymousCheck::~AnonymousCheck() {
- disconnect(ChatWidgetManager::instance(), SIGNAL(chatWidgetCreated(ChatWidget *)),
+ disconnect(Core::instance()->chatWidgetManager(), SIGNAL(chatWidgetCreated(ChatWidget *)),
this, SLOT(onChatWidgetCreated(ChatWidget *)));
}
@@ -150,3 +151,5 @@
return false;
}
+
+#include "moc_anonymous_check.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/anonymous_check/anonymous_check.kdev4 new/anonymous_check/anonymous_check.kdev4
--- old/anonymous_check/anonymous_check.kdev4 1970-01-01 01:00:00.000000000 +0100
+++ new/anonymous_check/anonymous_check.kdev4 2014-07-30 23:48:02.000000000 +0200
@@ -0,0 +1,3 @@
+[Project]
+Manager=KDevCMakeManager
+Name=anonymous_check
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/anonymous_check/anonymous_info.h new/anonymous_check/anonymous_info.h
--- old/anonymous_check/anonymous_info.h 2011-12-28 03:15:34.000000000 +0100
+++ new/anonymous_check/anonymous_info.h 2014-07-30 23:48:02.000000000 +0200
@@ -4,7 +4,8 @@
#include "accounts/account.h"
#include "contacts/contact.h"
#include "chat/chat.h"
-#include "gui/widgets/chat-widget.h"
+#include "gui/widgets/chat-widget/chat-widget.h"
+
class AnonymousInfo {
public:
AnonymousInfo(const Contact &contact, ChatWidget *chatWidget, const Account &account);
++++++ enable_external_plugins.patch ++++++
--- /var/tmp/diff_new_pack.r56img/_old 2014-11-04 17:30:02.000000000 +0100
+++ /var/tmp/diff_new_pack.r56img/_new 2014-11-04 17:30:02.000000000 +0100
@@ -2,31 +2,33 @@
===================================================================
--- Plugins.cmake.orig
+++ Plugins.cmake
-@@ -124,6 +124,27 @@ if (UNIX AND NOT APPLE)
+@@ -128,6 +128,29 @@ if (UNIX AND NOT APPLE)
falf_mediaplayer
# MPD mediaplayer support
mpd_mediaplayer
-+ # external (community)
-+ # lookup of an interlocutor in public directory
-+ anonymous_check
-+ # global hotkeys support
-+ globalhotkeys
-+ # support for importing history from gg 7 & 8
-+ import_history
-+ # lednotify support
-+ lednotify
-+ # split too long messages
-+ messagessplitter
-+ # mimetex support
-+ mime_tex
-+ # network ping support
-+ networkping
-+ # nextinfo
-+ nextinfo
-+ # panelkadu
-+ panelkadu
-+ # history for sent sms
-+ senthistory
++ # external (community)
++ # lookup of an interlocutor in public directory
++ anonymous_check
++ # kadu completion
++ kadu_completion
++ # global hotkeys support
++ globalhotkeys
++ # support for importing history from gg 7 & 8
++ import_history
++ # lednotify support
++ lednotify
++ # split too long messages
++ messagessplitter
++ # mimetex support
++ mime_tex
++ # network ping support
++ networkping
++ # nextinfo
++ nextinfo
++ # panelkadu
++ panelkadu
++ # history for sent sms
++ senthistory
)
- if (WITH_LIBINDICATE_QT)
+ if (KADU_WITH_LIBINDICATE_QT)
++++++ globalhotkeys-0.12-32.tar.gz -> globalhotkeys-1.0-33.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/CMakeLists.txt new/globalhotkeys/CMakeLists.txt
--- old/globalhotkeys/CMakeLists.txt 2012-05-20 00:51:23.000000000 +0200
+++ new/globalhotkeys/CMakeLists.txt 2014-08-16 00:10:49.000000000 +0200
@@ -1,14 +1,9 @@
project( globalhotkeys )
cmake_minimum_required( VERSION 2.8 )
-set( QT_MIN_VERSION "4.7.0" )
-set( CMAKE_MIN_VERSION "2.8.0" )
+set( QT_MIN_VERSION "4.8.0" )
-set( KADU_FIND_REQUIRED true )
-include( FindKadu )
-
-include_directories( ${KADU_INCLUDE_DIR} )
-include_directories( ${KADU_INCLUDE_DIR}/kadu-core )
+find_package( Kadu REQUIRED CONFIG )
set( SOURCES
globalhotkeys.cpp
@@ -25,31 +20,17 @@
wideiconmenustyle.cpp
)
-set( MOC_SOURCES
- globalhotkeys.h
- buddiesmenu.h
- conf.h
- functions.h
- globalmenu.h
- globalwidgetmanager.h
- hotkeyedit.h
- statusesmenu.h
-)
-
-set( TRANSLATION_SOURCES
- translations/globalhotkeys_en.ts
- translations/globalhotkeys_cs.ts
- translations/globalhotkeys_it.ts
- translations/globalhotkeys_pl.ts
-)
-
set( CONFIGURATION_FILES
configuration/globalhotkeys.ui
)
+include( FindPkgConfig )
+pkg_search_module (LIBX11 REQUIRED x11)
+include_directories( ${LIBX11_INCLUDE_DIRS} )
+link_directories( ${LIBX11_LIBRARY_DIRS} )
+
kadu_plugin( globalhotkeys
PLUGIN_SOURCES ${SOURCES}
- PLUGIN_MOC_SOURCES ${MOC_SOURCES}
- PLUGIN_TRANSLATION_SOURCES ${TRANSLATION_SOURCES}
PLUGIN_CONFIGURATION_FILES ${CONFIGURATION_FILES}
+ PLUGIN_LIBRARIES ${LIBX11_LIBRARIES}
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/buddiesmenu.cpp new/globalhotkeys/buddiesmenu.cpp
--- old/globalhotkeys/buddiesmenu.cpp 2012-05-28 22:08:39.000000000 +0200
+++ new/globalhotkeys/buddiesmenu.cpp 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -34,7 +34,10 @@
#include "contacts/model/contact-data-extractor.h"
#include "contacts/contact-set.h"
#include "contacts/contact-shared.h"
-#include "gui/widgets/chat-widget-manager.h"
+#include "core/core.h"
+#include "gui/widgets/chat-widget/chat-widget-activation-service.h"
+#include "gui/widgets/chat-widget/chat-widget-manager.h"
+#include "gui/widgets/chat-widget/chat-widget-repository.h"
#include "icons/icons-manager.h"
#include "icons/kadu-icon.h"
#include "status/status-container-manager.h"
@@ -125,7 +128,7 @@
ALWAYSSHOWCONTACTIDENTIFIER = false;
SORTSTATELESSBUDDIES = false;
SORTSTATELESSBUDDIESBYSTATUS = false;
- opensubmenuaction = NULL;
+ opensubmenuaction = nullptr;
int wideiconwidth =
GLOBALHOTKEYS_BUDDIESMENUICONMARGINLEFT +
GLOBALHOTKEYS_BUDDIESMENUSMALLICONSIZE +
@@ -154,14 +157,22 @@
chatstate |= ChatStateRecent;
if( chat.unreadMessagesCount() > 0 )
chatstate |= ChatStatePending;
- ChatWidget *chatwidget = ChatWidgetManager::instance()->byChat( chat, false );
- if( chatwidget != NULL )
+ ChatWidget *chatwidget = Core::instance()->chatWidgetRepository()->widgetForChat( chat );
+ if( chatwidget != nullptr )
{
chatstate |= ChatStateCurrent;
if( chat.unreadMessagesCount() > 0 )
chatstate |= ChatStatePending;
- if( _isActiveWindow( chatwidget->window() ) && ( ( chatwidget->window() == chatwidget ) || ( chatwidget->isActive() ) ) )
+ if(
+ _isActiveWindow( chatwidget->window() ) &&
+ (
+ ( chatwidget->window() == chatwidget ) ||
+ ( Core::instance()->chatWidgetActivationService()->isChatWidgetActive(chatwidget) )
+ )
+ )
+ {
chatstate |= ChatStateActive;
+ }
}
}
// data
@@ -401,9 +412,7 @@
closeTopMostMenu();
// (re)open the chat with selected user(s) and activate it
Chat chat = Api::findChatForContactOrContactSet( data.contactSet(), ActionCreateAndAdd );
- ChatWidget *chatwidget = ChatWidgetManager::instance()->byChat( chat, true );
- if( chatwidget )
- chatwidget->activate();
+ Core::instance()->chatWidgetManager()->openChat( chat, OpenChatActivation::Activate );
}
@@ -531,7 +540,7 @@
}
if( event->key() == Qt::Key_Right )
{
- if( ( MENUTYPE == BuddiesMenuTypeBuddies ) && ( activeAction() != NULL ) )
+ if( ( MENUTYPE == BuddiesMenuTypeBuddies ) && ( activeAction() != nullptr ) )
{
QAction *action = activeAction();
openSubmenu( action );
@@ -549,7 +558,7 @@
if( MENUTYPE == BuddiesMenuTypeBuddies )
{
QAction *action = actionAt( event->pos() );
- if( action != NULL )
+ if( action != nullptr )
{
// check current submenu
if( ( action == opensubmenuaction ) && ( ! SUBMENU.isNull() ) && SUBMENU->isVisible() )
@@ -572,7 +581,7 @@
void BuddiesMenu::openSubmenu( QAction *action )
{
- if( action == NULL )
+ if( action == nullptr )
return;
// data
BuddiesMenuActionData data = action->data().value<BuddiesMenuActionData>();
@@ -625,3 +634,8 @@
{
return s1.toLower() < s2.toLower();
}
+
+
+
+
+#include "moc_buddiesmenu.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/buddiesmenu.h new/globalhotkeys/buddiesmenu.h
--- old/globalhotkeys/buddiesmenu.h 2012-02-06 17:50:04.000000000 +0100
+++ new/globalhotkeys/buddiesmenu.h 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -28,7 +28,7 @@
#include "contacts/contact.h"
#include "contacts/contact-set.h"
-#include "gui/widgets/chat-widget.h"
+#include "gui/widgets/chat-widget/chat-widget.h"
#include "globalmenu.h"
#include "property.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/changelog new/globalhotkeys/changelog
--- old/globalhotkeys/changelog 2012-06-16 13:40:59.000000000 +0200
+++ new/globalhotkeys/changelog 2014-08-16 00:10:49.000000000 +0200
@@ -1,3 +1,8 @@
+0.12-32 => 1.0-33
+* Plugin dostosowany do Kadu 1.0.
+* Drobne zmiany dla C++11.
+
+
0.11-31 => 0.12-32
* Użycie zamiast WideIconsMenu ulepszonej klasy WideIconMenuStyle, która przy
rysowaniu menu dużo lepiej współpracuje ze stylami systemowymi, m.in. stylem
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/conf.cpp new/globalhotkeys/conf.cpp
--- old/globalhotkeys/conf.cpp 2012-05-28 19:30:50.000000000 +0200
+++ new/globalhotkeys/conf.cpp 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -26,6 +26,7 @@
#include "buddies/buddy-manager.h"
#include "buddies/group-manager.h"
#include "configuration/configuration-file.h"
+#include "configuration/config-file-data-manager.h"
#include "gui/widgets/configuration/configuration-widget.h"
#include "conf.h"
@@ -68,12 +69,16 @@
{
foreach( QString group, GROUPS )
{
- MainConfigurationWindow::instance()->widget()->configGroupBox(
- QT_TRANSLATE_NOOP( "@default", "Shortcuts" ),
+ ConfigGroupBox *configgroupbox = MainConfigurationWindow::instance()->widget()->configGroupBox(
+ QT_TRANSLATE_NOOP( "@default", "Behavior" ),
QT_TRANSLATE_NOOP( "@default", "Global hotkeys" ),
group,
true
);
+ if( configgroupbox == nullptr )
+ {
+ qCritical() << "GlobalHotkeys: ConfigGroupBox 'Behavior, Global hotkeys, " << group << "' not created.";
+ }
}
}
@@ -85,13 +90,15 @@
foreach( QString group, GROUPS )
{
ConfigGroupBox *configgroupbox = MainConfigurationWindow::instance()->widget()->configGroupBox(
- QT_TRANSLATE_NOOP( "@default", "Shortcuts" ),
+ QT_TRANSLATE_NOOP( "@default", "Behavior" ),
QT_TRANSLATE_NOOP( "@default", "Global hotkeys" ),
group,
false
);
- if( configgroupbox != NULL )
+ if( configgroupbox != nullptr )
+ {
delete configgroupbox;
+ }
}
}
}
@@ -143,7 +150,7 @@
if( confhotkey->name() == name )
return confhotkey;
}
- return NULL;
+ return nullptr;
}
@@ -154,22 +161,22 @@
if( confhotkey->hotKey() == hotkey )
return confhotkey;
}
- return NULL;
+ return nullptr;
}
void ConfHotKey::focus()
{
- QScrollArea *scrollarea = NULL;
+ QScrollArea *scrollarea = nullptr;
QObject *object = HOTKEYEDIT;
- while( object != NULL )
+ while( object != nullptr )
{
scrollarea = dynamic_cast( object );
- if( scrollarea != NULL )
+ if( scrollarea != nullptr )
break;
object = object->parent();
}
- if( scrollarea != NULL )
+ if( scrollarea != nullptr )
{
scrollarea->widget()->adjustSize();
scrollarea->ensureWidgetVisible( HOTKEYEDIT, 50, 50 );
@@ -189,12 +196,18 @@
if( ! HOTKEYEDIT.isNull() )
return;
ConfigGroupBox *configgroupbox = mainConfigurationWindow->widget()->configGroupBox(
- QT_TRANSLATE_NOOP( "@default", "Shortcuts" ),
+ QT_TRANSLATE_NOOP( "@default", "Behavior" ),
QT_TRANSLATE_NOOP( "@default", "Global hotkeys" ),
GROUP,
true
);
- HOTKEYEDIT = new HotkeyEdit( "GlobalHotkeys", NAME, CAPTION, "", configgroupbox, (ConfigurationWindowDataManager*)MainConfigurationWindow::instanceDataManager() );
+ if( configgroupbox == nullptr )
+ {
+ qCritical() << "GlobalHotkeys: ConfigGroupBox 'Behavior, Global hotkeys, " << GROUP << "' not found.";
+ return;
+ }
+ ConfigurationWindowDataManager* dm = MainConfigurationWindow::instanceDataManager();
+ HOTKEYEDIT = new HotkeyEdit( "GlobalHotkeys", NAME, CAPTION, "", configgroupbox, dm );
HOTKEYEDIT->setText( HOTKEY.string() );
connect( mainConfigurationWindow, SIGNAL(configurationSaved()), this, SLOT(configurationSaved()) );
}
@@ -357,22 +370,26 @@
}
// fill UI data if widgets exist
if( ! HOTKEYEDIT.isNull() )
+ {
fillUIData();
+ }
}
void ConfBuddiesShortcut::focus()
{
- QScrollArea *scrollarea = NULL;
+ QScrollArea *scrollarea = nullptr;
QObject *object = HOTKEYEDIT;
- while( object != NULL )
+ while( object != nullptr )
{
scrollarea = dynamic_cast( object );
- if( scrollarea != NULL )
+ if( scrollarea != nullptr )
+ {
break;
+ }
object = object->parent();
}
- if( scrollarea != NULL )
+ if( scrollarea != nullptr )
{
scrollarea->widget()->adjustSize();
scrollarea->ensureWidgetVisible( HOTKEYEDIT, 50, DELETEBUTTON->y() - HOTKEYEDIT->y() + 50 );
@@ -395,9 +412,11 @@
foreach( ConfBuddiesShortcut* confbuddiesshortcut, INSTANCES )
{
if( confbuddiesshortcut->hotKey() == hotkey )
+ {
return confbuddiesshortcut;
+ }
}
- return NULL;
+ return nullptr;
}
@@ -407,16 +426,21 @@
if( HOTKEYEDIT.isNull() )
{
ConfigGroupBox *configgroupbox = mainConfigurationWindow->widget()->configGroupBox(
- QT_TRANSLATE_NOOP( "@default", "Shortcuts"),
+ QT_TRANSLATE_NOOP( "@default", "Behavior"),
QT_TRANSLATE_NOOP( "@default", "Global hotkeys" ),
GROUP,
true
);
- LINESEPARATOR = new ConfigLineSeparator( configgroupbox, NULL );
- HOTKEYEDIT = new HotkeyEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Shortcut" ), "", configgroupbox, NULL );
- BUDDIESEDIT = new ConfigLineEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Buddies (comma separated)" ), "", configgroupbox, NULL );
- SHOWMENUCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "If possible, show a menu with available chats" ), "", configgroupbox, NULL );
- DELETEBUTTON = new ConfigActionButton( QT_TRANSLATE_NOOP( "@default", "Delete this shortcut" ), "", configgroupbox, NULL );
+ if( configgroupbox == nullptr )
+ {
+ qCritical() << "GlobalHotkeys: ConfigGroupBox 'Behavior, Global hotkeys, " << GROUP << "' not found.";
+ return;
+ }
+ LINESEPARATOR = new ConfigLineSeparator( configgroupbox, nullptr );
+ HOTKEYEDIT = new HotkeyEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Shortcut" ), "", configgroupbox, nullptr );
+ BUDDIESEDIT = new ConfigLineEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Buddies (comma separated)" ), "", configgroupbox, nullptr );
+ SHOWMENUCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "If possible, show a menu with available chats" ), "", configgroupbox, nullptr );
+ DELETEBUTTON = new ConfigActionButton( QT_TRANSLATE_NOOP( "@default", "Delete this shortcut" ), "", configgroupbox, nullptr );
connect( DELETEBUTTON, SIGNAL(clicked()), this, SLOT(deletebuttonClicked()) );
fillUIData();
}
@@ -448,10 +472,14 @@
GROUP = group;
DELETED = false;
if( ! ConfGroups::GROUPS.contains( GROUP ) )
+ {
ConfGroups::GROUPS.append( GROUP );
+ }
connect( GlobalHotkeys::instance(), SIGNAL(mainConfigurationWindowCreatedSignal(MainConfigurationWindow*)), this, SLOT(mainConfigurationWindowCreated(MainConfigurationWindow*)) );
if( forcecreate && MainConfigurationWindow::hasInstance() )
+ {
mainConfigurationWindowCreated( MainConfigurationWindow::instance() );
+ }
}
@@ -596,22 +624,26 @@
}
// fill UI data if widgets exist
if( ! HOTKEYEDIT.isNull() )
+ {
fillUIData();
+ }
}
void ConfBuddiesMenu::focus()
{
- QScrollArea *scrollarea = NULL;
+ QScrollArea *scrollarea = nullptr;
QObject *object = HOTKEYEDIT;
- while( object != NULL )
+ while( object != nullptr )
{
scrollarea = dynamic_cast( object );
- if( scrollarea != NULL )
+ if( scrollarea != nullptr )
+ {
break;
+ }
object = object->parent();
}
- if( scrollarea != NULL )
+ if( scrollarea != nullptr )
{
scrollarea->widget()->adjustSize();
scrollarea->ensureWidgetVisible( HOTKEYEDIT, 50, DELETEBUTTON->y() - HOTKEYEDIT->y() + 50 );
@@ -625,9 +657,11 @@
foreach( ConfBuddiesMenu* confbuddiesmenu, INSTANCES )
{
if( confbuddiesmenu->hotKey() == hotkey )
+ {
return confbuddiesmenu;
+ }
}
- return NULL;
+ return nullptr;
}
@@ -637,27 +671,32 @@
if( HOTKEYEDIT.isNull() )
{
ConfigGroupBox *configgroupbox = mainConfigurationWindow->widget()->configGroupBox(
- QT_TRANSLATE_NOOP( "@default", "Shortcuts" ),
+ QT_TRANSLATE_NOOP( "@default", "Behavior" ),
QT_TRANSLATE_NOOP( "@default", "Global hotkeys" ),
GROUP,
true
);
- LINESEPARATOR = new ConfigLineSeparator( configgroupbox, NULL );
- HOTKEYEDIT = new HotkeyEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Shortcut" ), "" , configgroupbox, NULL );
- CURRENTCHATSCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Include current chats" ), "" , configgroupbox, NULL );
- PENDINGCHATSCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Include chats with pending messages" ), "" , configgroupbox, NULL );
- RECENTCHATSCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Include recent chats" ), "" , configgroupbox, NULL );
- ONLINEBUDDIESCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Include online buddies" ), "" , configgroupbox, NULL );
- ONLINEBUDDIESGROUPSEDIT = new ConfigLineEdit( "", "", QT_TRANSLATE_NOOP( "@default", "only from these groups (comma separated)" ), "leave empty to disable this filter", configgroupbox, NULL );
- ONLINEBUDDIESINCLUDEBLOCKINGCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Treat buddies blocking me as online" ), "" , configgroupbox, NULL );
- BUDDIESEDIT = new ConfigLineEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Include these buddies (comma separated)" ), "" , configgroupbox, NULL );
- GROUPSEDIT = new ConfigLineEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Include buddies from these groups (comma separated)" ), "" , configgroupbox, NULL );
- EXCLUDEBUDDIESEDIT = new ConfigLineEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Exclude these buddies (comma separated)" ), "" , configgroupbox, NULL );
- ONEITEMPERBUDDYCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Show at most one item per buddy" ), "" , configgroupbox, NULL );
- ALWAYSSHOWCONTACTIDENTIFIERCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Always show contact's identifier" ), "" , configgroupbox, NULL );
- SORTSTATELESSBUDDIESCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Sort stateless buddies" ), "" , configgroupbox, NULL );
- SORTSTATELESSBUDDIESBYSTATUSCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Sort by status" ), "" , configgroupbox, NULL );
- DELETEBUTTON = new ConfigActionButton( QT_TRANSLATE_NOOP( "@default", "Delete this menu" ), "" , configgroupbox, NULL );
+ if( configgroupbox == nullptr )
+ {
+ qCritical() << "GlobalHotkeys: ConfigGroupBox 'Behavior, Global hotkeys, " << GROUP << "' not found.";
+ return;
+ }
+ LINESEPARATOR = new ConfigLineSeparator( configgroupbox, nullptr );
+ HOTKEYEDIT = new HotkeyEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Shortcut" ), "" , configgroupbox, nullptr );
+ CURRENTCHATSCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Include current chats" ), "" , configgroupbox, nullptr );
+ PENDINGCHATSCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Include chats with pending messages" ), "" , configgroupbox, nullptr );
+ RECENTCHATSCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Include recent chats" ), "" , configgroupbox, nullptr );
+ ONLINEBUDDIESCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Include online buddies" ), "" , configgroupbox, nullptr );
+ ONLINEBUDDIESGROUPSEDIT = new ConfigLineEdit( "", "", QT_TRANSLATE_NOOP( "@default", "only from these groups (comma separated)" ), "leave empty to disable this filter", configgroupbox, nullptr );
+ ONLINEBUDDIESINCLUDEBLOCKINGCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Treat buddies blocking me as online" ), "" , configgroupbox, nullptr );
+ BUDDIESEDIT = new ConfigLineEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Include these buddies (comma separated)" ), "" , configgroupbox, nullptr );
+ GROUPSEDIT = new ConfigLineEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Include buddies from these groups (comma separated)" ), "" , configgroupbox, nullptr );
+ EXCLUDEBUDDIESEDIT = new ConfigLineEdit( "", "", QT_TRANSLATE_NOOP( "@default", "Exclude these buddies (comma separated)" ), "" , configgroupbox, nullptr );
+ ONEITEMPERBUDDYCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Show at most one item per buddy" ), "" , configgroupbox, nullptr );
+ ALWAYSSHOWCONTACTIDENTIFIERCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Always show contact's identifier" ), "" , configgroupbox, nullptr );
+ SORTSTATELESSBUDDIESCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Sort stateless buddies" ), "" , configgroupbox, nullptr );
+ SORTSTATELESSBUDDIESBYSTATUSCHECKBOX = new ConfigCheckBox( "", "", QT_TRANSLATE_NOOP( "@default", "Sort by status" ), "" , configgroupbox, nullptr );
+ DELETEBUTTON = new ConfigActionButton( QT_TRANSLATE_NOOP( "@default", "Delete this menu" ), "" , configgroupbox, nullptr );
connect( DELETEBUTTON, SIGNAL(clicked()), this, SLOT(deletebuttonClicked()) );
connect( ONLINEBUDDIESCHECKBOX , SIGNAL(toggled(bool)), ONLINEBUDDIESGROUPSEDIT , SLOT(setEnabled(bool)) );
connect( ONLINEBUDDIESCHECKBOX , SIGNAL(toggled(bool)), ONLINEBUDDIESINCLUDEBLOCKINGCHECKBOX, SLOT(setEnabled(bool)) );
@@ -703,3 +742,8 @@
SORTSTATELESSBUDDIESBYSTATUSCHECKBOX->hide();
DELETEBUTTON->hide();
}
+
+
+
+
+#include "moc_conf.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/configuration/globalhotkeys.ui new/globalhotkeys/configuration/globalhotkeys.ui
--- old/globalhotkeys/configuration/globalhotkeys.ui 2011-06-02 21:35:18.000000000 +0200
+++ new/globalhotkeys/configuration/globalhotkeys.ui 2014-08-16 00:10:49.000000000 +0200
@@ -1,2 +1,6 @@
<configuration-ui>
+ <section name="Behavior">
+ <tab name="Global hotkeys">
+ </tab>
+ </section>
</configuration-ui>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/functions.cpp new/globalhotkeys/functions.cpp
--- old/globalhotkeys/functions.cpp 2012-04-08 00:15:21.000000000 +0200
+++ new/globalhotkeys/functions.cpp 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -33,11 +33,12 @@
#include "core/core.h"
#include "configuration/configuration-file.h"
#include "gui/widgets/configuration/configuration-widget.h"
-#include "gui/widgets/chat-widget-manager.h"
+#include "gui/widgets/chat-widget/chat-widget-activation-service.h"
+#include "gui/widgets/chat-widget/chat-widget-manager.h"
+#include "gui/widgets/chat-widget/chat-widget-repository.h"
#include "gui/widgets/status-menu.h"
#include "gui/windows/add-buddy-window.h"
#include "gui/windows/kadu-window.h"
-#include "gui/windows/plugins-window.h"
#include "gui/windows/multilogon-window.h"
#include "gui/windows/search-window.h"
#include "gui/windows/status-window.h"
@@ -45,7 +46,8 @@
#include "file-transfer/file-transfer-manager.h"
#include "icons/icons-manager.h"
#include "message/message-manager.h"
-#include "notify/notification-manager.h"
+#include "message/unread-message-repository.h"
+#include "services/notification-service.h"
#include "status/status-container-manager.h"
#include "status/status-type.h"
#include "status/status-type-manager.h"
@@ -59,7 +61,7 @@
-Functions *Functions::INSTANCE = NULL;
+Functions *Functions::INSTANCE = nullptr;
Functions::Functions( QObject *parent ) : QObject( parent )
@@ -70,14 +72,16 @@
Functions::~Functions()
{
- INSTANCE = NULL;
+ INSTANCE = nullptr;
}
Functions *Functions::instance()
{
- if( INSTANCE == NULL )
+ if( INSTANCE == nullptr )
+ {
new Functions();
+ }
return INSTANCE;
}
@@ -127,20 +131,25 @@
{
Q_UNUSED( confhotkey );
// activate opened window with new unread message(s)
- foreach( ChatWidget *chatwidget, ChatWidgetManager::instance()->chats() )
+ for(
+ ChatWidgetRepository::Iterator ichatwidget = Core::instance()->chatWidgetRepository()->begin();
+ ichatwidget != Core::instance()->chatWidgetRepository()->end();
+ ++ichatwidget
+ )
{
+ ChatWidget *chatwidget = *ichatwidget;
if( chatwidget->chat().unreadMessagesCount() > 0 )
{
- chatwidget->activate();
+ Core::instance()->chatWidgetActivationService()->tryActivateChatWidget(chatwidget);
// done - only one window
return;
}
}
// open window for unread message(s)
- if( MessageManager::instance()->hasUnreadMessages() )
+ if( Core::instance()->unreadMessageRepository()->hasUnreadMessages() )
{
- ChatWidget *chatwidget = ChatWidgetManager::instance()->byChat( MessageManager::instance()->unreadMessage().messageChat(), true );
- chatwidget->activate();
+ Chat chat = Core::instance()->unreadMessageRepository()->unreadMessage().messageChat();
+ Core::instance()->chatWidgetManager()->openChat( chat, OpenChatActivation::Activate );
}
}
@@ -149,16 +158,23 @@
{
Q_UNUSED( confhotkey );
// open all windows for unread message(s)
- while( MessageManager::instance()->hasUnreadMessages() )
+ while( Core::instance()->unreadMessageRepository()->hasUnreadMessages() )
{
- ChatWidget *chatwidget = ChatWidgetManager::instance()->byChat( MessageManager::instance()->unreadMessage().messageChat(), true );
- chatwidget->activate();
+ Chat chat = Core::instance()->unreadMessageRepository()->unreadMessage().messageChat();
+ Core::instance()->chatWidgetManager()->openChat( chat, OpenChatActivation::Activate );
}
// activate all opened windows with new unread message(s)
- foreach( ChatWidget *chatwidget, ChatWidgetManager::instance()->chats() )
+ for(
+ ChatWidgetRepository::Iterator ichatwidget = Core::instance()->chatWidgetRepository()->begin();
+ ichatwidget != Core::instance()->chatWidgetRepository()->end();
+ ++ichatwidget
+ )
{
+ ChatWidget *chatwidget = *ichatwidget;
if( chatwidget->chat().unreadMessagesCount() > 0 )
- chatwidget->activate();
+ {
+ Core::instance()->chatWidgetActivationService()->tryActivateChatWidget(chatwidget);
+ }
}
}
@@ -167,10 +183,17 @@
{
Q_UNUSED( confhotkey );
// minimize all windows (if needed)
- foreach( ChatWidget *chatwidget, ChatWidgetManager::instance()->chats() )
+ for(
+ ChatWidgetRepository::Iterator ichatwidget = Core::instance()->chatWidgetRepository()->begin();
+ ichatwidget != Core::instance()->chatWidgetRepository()->end();
+ ++ichatwidget
+ )
{
+ ChatWidget *chatwidget = *ichatwidget;
if( ! chatwidget->window()->isMinimized() )
+ {
chatwidget->window()->showMinimized();
+ }
}
}
@@ -179,10 +202,17 @@
{
Q_UNUSED( confhotkey );
// restore all windows (if needed) and activate them
- foreach( ChatWidget *chatwidget, ChatWidgetManager::instance()->chats() )
+ for(
+ ChatWidgetRepository::Iterator ichatwidget = Core::instance()->chatWidgetRepository()->begin();
+ ichatwidget != Core::instance()->chatWidgetRepository()->end();
+ ++ichatwidget
+ )
{
+ ChatWidget *chatwidget = *ichatwidget;
if( chatwidget->window()->isMinimized() )
+ {
chatwidget->window()->showNormal();
+ }
}
}
@@ -192,27 +222,48 @@
Q_UNUSED( confhotkey );
// check if all windows are minimized already
bool allwindowsminimized = true;
- foreach( ChatWidget *chatwidget, ChatWidgetManager::instance()->chats() )
+ for(
+ ChatWidgetRepository::Iterator ichatwidget = Core::instance()->chatWidgetRepository()->begin();
+ ichatwidget != Core::instance()->chatWidgetRepository()->end();
+ ++ichatwidget
+ )
{
+ ChatWidget *chatwidget = *ichatwidget;
if( ! chatwidget->window()->isMinimized() )
+ {
allwindowsminimized = false;
+ }
}
if( ! allwindowsminimized )
{
// minimize all windows (if needed)
- foreach( ChatWidget *chatwidget, ChatWidgetManager::instance()->chats() )
+ for(
+ ChatWidgetRepository::Iterator ichatwidget = Core::instance()->chatWidgetRepository()->begin();
+ ichatwidget != Core::instance()->chatWidgetRepository()->end();
+ ++ichatwidget
+ )
{
+ ChatWidget *chatwidget = *ichatwidget;
if( ! chatwidget->window()->isMinimized() )
+ {
chatwidget->window()->showMinimized();
+ }
}
}
else
{
// restore all windows (if needed) and activate them
- foreach( ChatWidget *chatwidget, ChatWidgetManager::instance()->chats() )
+ for(
+ ChatWidgetRepository::Iterator ichatwidget = Core::instance()->chatWidgetRepository()->begin();
+ ichatwidget != Core::instance()->chatWidgetRepository()->end();
+ ++ichatwidget
+ )
{
+ ChatWidget *chatwidget = *ichatwidget;
if( chatwidget->window()->isMinimized() )
+ {
chatwidget->window()->showNormal();
+ }
_activateWindow( chatwidget->window() );
}
}
@@ -224,11 +275,18 @@
Q_UNUSED( confhotkey );
// list of windows to close (needed by Tabs module - we cannot close the same window multiple times!)
QList wins;
- foreach( ChatWidget *chatwidget, ChatWidgetManager::instance()->chats() )
+ for(
+ ChatWidgetRepository::Iterator ichatwidget = Core::instance()->chatWidgetRepository()->begin();
+ ichatwidget != Core::instance()->chatWidgetRepository()->end();
+ ++ichatwidget
+ )
{
+ ChatWidget *chatwidget = *ichatwidget;
// add the window to the list
if( wins.contains( chatwidget->window() ) == 0 ) // if this window is not on the list yet
+ {
wins.append( chatwidget->window() );
+ }
}
// close the windows from the list
for( QList::Iterator I = wins.begin(); I != wins.end(); I++ )
@@ -248,7 +306,7 @@
if( confhotkey->hotKey() == GlobalHotkeys::instance()->SHOWNGLOBALWIDGETHOTKEY )
{
// last widget was this one - don't show it again
- GlobalHotkeys::instance()->SHOWNGLOBALWIDGET = NULL;
+ GlobalHotkeys::instance()->SHOWNGLOBALWIDGET = nullptr;
GlobalHotkeys::instance()->SHOWNGLOBALWIDGETHOTKEY = HotKey();
GlobalHotkeys::instance()->activateLastActiveWindow();
return;
@@ -271,21 +329,23 @@
void Functions::functionTurnSilentModeOn( ConfHotKey *confhotkey )
{
Q_UNUSED( confhotkey );
- NotificationManager::instance()->setSilentMode( true );
+ Core::instance()->notificationService()->setSilentMode( true );
}
void Functions::functionTurnSilentModeOff( ConfHotKey *confhotkey )
{
Q_UNUSED( confhotkey );
- NotificationManager::instance()->setSilentMode( false );
+ Core::instance()->notificationService()->setSilentMode( false );
}
void Functions::functionToggleSilentMode( ConfHotKey *confhotkey )
{
Q_UNUSED( confhotkey );
- NotificationManager::instance()->setSilentMode( ! NotificationManager::instance()->silentMode() );
+ Core::instance()->notificationService()->setSilentMode(
+ ! Core::instance()->notificationService()->silentMode()
+ );
}
@@ -300,7 +360,9 @@
{
// abort on no accounts
if( StatusContainerManager::instance()->statusContainers().count() == 0 )
+ {
return;
+ }
// close previous global widget, if any
GlobalHotkeys::instance()->updateLastActiveWindow();
if( ! GlobalHotkeys::instance()->SHOWNGLOBALWIDGET.isNull() )
@@ -309,7 +371,7 @@
if( confhotkey->hotKey() == GlobalHotkeys::instance()->SHOWNGLOBALWIDGETHOTKEY )
{
// last widget was this one - don't show it again
- GlobalHotkeys::instance()->SHOWNGLOBALWIDGET = NULL;
+ GlobalHotkeys::instance()->SHOWNGLOBALWIDGET = nullptr;
GlobalHotkeys::instance()->SHOWNGLOBALWIDGETHOTKEY = HotKey();
GlobalHotkeys::instance()->activateLastActiveWindow();
return;
@@ -329,7 +391,9 @@
{
// abort on no accounts
if( StatusContainerManager::instance()->statusContainers().count() == 0 )
+ {
return;
+ }
// close previous global widget, if any
GlobalHotkeys::instance()->updateLastActiveWindow();
if( ! GlobalHotkeys::instance()->SHOWNGLOBALWIDGET.isNull() )
@@ -338,7 +402,7 @@
if( confhotkey->hotKey() == GlobalHotkeys::instance()->SHOWNGLOBALWIDGETHOTKEY )
{
// last widget was this one - don't show it again
- GlobalHotkeys::instance()->SHOWNGLOBALWIDGET = NULL;
+ GlobalHotkeys::instance()->SHOWNGLOBALWIDGET = nullptr;
GlobalHotkeys::instance()->SHOWNGLOBALWIDGETHOTKEY = HotKey();
GlobalHotkeys::instance()->activateLastActiveWindow();
return;
@@ -359,7 +423,7 @@
void Functions::functionAddANewBuddy( ConfHotKey *confhotkey )
{
Q_UNUSED( confhotkey );
- AddBuddyWindow *addbuddywindow = new AddBuddyWindow( NULL );
+ AddBuddyWindow *addbuddywindow = new AddBuddyWindow( nullptr );
addbuddywindow->show();
_activateWindow( addbuddywindow );
}
@@ -368,7 +432,7 @@
void Functions::functionSearchForBuddy( ConfHotKey *confhotkey )
{
Q_UNUSED( confhotkey );
- SearchWindow *searchwindow = new SearchWindow( NULL );
+ SearchWindow *searchwindow = new SearchWindow( nullptr );
searchwindow->show();
_activateWindow( searchwindow );
}
@@ -404,8 +468,6 @@
}
-void Functions::functionPluginsWindow( ConfHotKey *confhotkey )
-{
- Q_UNUSED( confhotkey );
- PluginsWindow::show();
-}
+
+
+#include "moc_functions.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/functions.h new/globalhotkeys/functions.h
--- old/globalhotkeys/functions.h 2012-02-06 17:50:04.000000000 +0100
+++ new/globalhotkeys/functions.h 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -58,7 +58,6 @@
void functionMultilogonWindow( ConfHotKey *confhotkey );
void functionConfigurationWindow( ConfHotKey *confhotkey );
void functionAccountManagerWindow( ConfHotKey *confhotkey );
- void functionPluginsWindow( ConfHotKey *confhotkey );
private:
static Functions *INSTANCE;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/globalhotkeys.cpp new/globalhotkeys/globalhotkeys.cpp
--- old/globalhotkeys/globalhotkeys.cpp 2012-05-28 20:47:34.000000000 +0200
+++ new/globalhotkeys/globalhotkeys.cpp 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -40,18 +40,20 @@
#include "buddies/group-manager.h"
#include "chat/recent-chat-manager.h"
#include "core/core.h"
+#include "configuration/config-file-data-manager.h"
#include "configuration/configuration-file.h"
#include "configuration/main-configuration-holder.h"
#include "contacts/contact.h"
#include "contacts/contact-shared.h"
#include "gui/widgets/configuration/configuration-widget.h"
-#include "gui/widgets/chat-widget-manager.h"
+#include "gui/widgets/chat-widget/chat-widget-manager.h"
+#include "gui/widgets/chat-widget/chat-widget-repository.h"
#include "gui/widgets/status-menu.h"
#include "gui/windows/add-buddy-window.h"
#include "gui/windows/kadu-window.h"
#include "gui/windows/your-accounts.h"
#include "icons/icons-manager.h"
-#include "message/message-manager.h"
+#include "message/unread-message-repository.h"
#include "misc/kadu-paths.h"
#include "notify/notification-manager.h"
#include "status/status-container-manager.h"
@@ -76,29 +78,13 @@
-int GlobalHotkeys::init( bool firstload )
+bool GlobalHotkeys::init( bool firstload )
{
Q_UNUSED( firstload );
kdebugf();
+ // register configuration
MainConfigurationWindow::registerUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/globalhotkeys.ui" );
MainConfigurationWindow::registerUiHandler( this );
- kdebugf2();
- return 0;
-}
-
-
-void GlobalHotkeys::done()
-{
- kdebugf();
- MainConfigurationWindow::unregisterUiHandler( this );
- MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/globalhotkeys.ui" );
- kdebugf2();
-}
-
-
-GlobalHotkeys::GlobalHotkeys()
-{
- INSTANCE = this;
// create Functions
new Functions();
// import old config if needed
@@ -126,7 +112,6 @@
new ConfHotKey( this, QT_TRANSLATE_NOOP( "@default", "Windows shortcuts" ), QT_TRANSLATE_NOOP( "@default", "Multilogon window" ), "MultilogonWindow" , "functionMultilogonWindow" );
new ConfHotKey( this, QT_TRANSLATE_NOOP( "@default", "Windows shortcuts" ), QT_TRANSLATE_NOOP( "@default", "Configuration window" ), "ConfigurationWindow" , "functionConfigurationWindow" );
new ConfHotKey( this, QT_TRANSLATE_NOOP( "@default", "Windows shortcuts" ), QT_TRANSLATE_NOOP( "@default", "Account manager window" ), "AccountManagerWindow" , "functionAccountManagerWindow" );
- new ConfHotKey( this, QT_TRANSLATE_NOOP( "@default", "Windows shortcuts" ), QT_TRANSLATE_NOOP( "@default", "Plugins window" ), "PluginsWindow" , "functionPluginsWindow" );
// create config manager for BuddiesShotrcuts and BuddiesMenus
new ConfManager( this );
// create default configuration for BuddiesMenus
@@ -165,8 +150,8 @@
confbuddiesmenu->SORTSTATELESSBUDDIESBYSTATUS = true;
}
// data
- DISPLAY = NULL;
- SHOWNGLOBALWIDGET = NULL;
+ DISPLAY = nullptr;
+ SHOWNGLOBALWIDGET = nullptr;
LASTACTIVEWINDOW = None;
// create and connect() the hotkeys timer
HOTKEYSTIMER = new QTimer();
@@ -174,15 +159,19 @@
connect( HOTKEYSTIMER, SIGNAL(timeout()), this, SLOT(checkPendingHotkeys()) );
// start
configurationUpdated();
+ // done
+ kdebugf2();
+ return true;
}
-GlobalHotkeys::~GlobalHotkeys()
+void GlobalHotkeys::done()
{
+ kdebugf();
// stop the hotkeys timer
HOTKEYSTIMER->stop();
// close X11 display
- if( DISPLAY != NULL )
+ if( DISPLAY != nullptr )
{
XCloseDisplay( DISPLAY );
}
@@ -201,10 +190,26 @@
ConfGroups::deleteGroups();
// remove Functions
Functions::instance()->deleteLater();
+ // unregister configuration
+ MainConfigurationWindow::unregisterUiHandler( this );
+ MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/globalhotkeys.ui" );
+ // done
+ kdebugf2();
+}
+
+
+GlobalHotkeys::GlobalHotkeys()
+{
+ INSTANCE = this;
}
-GlobalHotkeys *GlobalHotkeys::INSTANCE = NULL;
+GlobalHotkeys::~GlobalHotkeys()
+{
+}
+
+
+GlobalHotkeys *GlobalHotkeys::INSTANCE = nullptr;
GlobalHotkeys *GlobalHotkeys::instance()
@@ -277,33 +282,34 @@
{
// create groups boxes in the right order
ConfGroups::createGroups();
+ ConfigurationWindowDataManager* dm = MainConfigurationWindow::instanceDataManager();
// add BUDDIESSHORTCUTSADDNEWBUTTON button
- if( BUDDIESSHORTCUTSADDNEWBUTTON == NULL )
+ if( BUDDIESSHORTCUTSADDNEWBUTTON == nullptr )
{
ConfigGroupBox *groupBuddiesShortcuts = mainConfigurationWindow->widget()->configGroupBox(
- QT_TRANSLATE_NOOP( "@default", "Shortcuts" ),
+ QT_TRANSLATE_NOOP( "@default", "Behavior" ),
QT_TRANSLATE_NOOP( "@default", "Global hotkeys" ),
QT_TRANSLATE_NOOP( "@default", "Buddies shortcuts" )
);
if( groupBuddiesShortcuts )
{
- BUDDIESSHORTCUTSADDNEWBUTTON = new ConfigActionButton( QT_TRANSLATE_NOOP( "@default", "Add new shortcut ..." ), "", groupBuddiesShortcuts, NULL );
+ BUDDIESSHORTCUTSADDNEWBUTTON = new ConfigActionButton( QT_TRANSLATE_NOOP( "@default", "Add new shortcut ..." ), "", groupBuddiesShortcuts, dm );
groupBuddiesShortcuts->widget()->layout()->removeWidget( BUDDIESSHORTCUTSADDNEWBUTTON );
groupBuddiesShortcuts->addWidget( BUDDIESSHORTCUTSADDNEWBUTTON, true ); // re-insert the button so that it takes full available horizontal space
connect( BUDDIESSHORTCUTSADDNEWBUTTON, SIGNAL(clicked()), this, SLOT(buddiesShortcutsAddNewButtonPressed()));
}
}
// add BUDDIESMENUSADDNEWBUTTON button
- if( BUDDIESMENUSADDNEWBUTTON == NULL )
+ if( BUDDIESMENUSADDNEWBUTTON == nullptr )
{
ConfigGroupBox *groupBuddiesMenus = mainConfigurationWindow->widget()->configGroupBox(
- QT_TRANSLATE_NOOP( "@default", "Shortcuts" ),
+ QT_TRANSLATE_NOOP( "@default", "Behavior" ),
QT_TRANSLATE_NOOP( "@default", "Global hotkeys" ),
QT_TRANSLATE_NOOP( "@default", "Buddies menus" )
);
if( groupBuddiesMenus )
{
- BUDDIESMENUSADDNEWBUTTON = new ConfigActionButton( QT_TRANSLATE_NOOP( "@default", "Add new menu ..." ), "", groupBuddiesMenus, NULL );
+ BUDDIESMENUSADDNEWBUTTON = new ConfigActionButton( QT_TRANSLATE_NOOP( "@default", "Add new menu ..." ), "", groupBuddiesMenus, dm );
groupBuddiesMenus->widget()->layout()->removeWidget( BUDDIESMENUSADDNEWBUTTON );
groupBuddiesMenus->addWidget( BUDDIESMENUSADDNEWBUTTON, true ); // re-insert the button so that it takes full available horizontal space
connect( BUDDIESMENUSADDNEWBUTTON, SIGNAL(clicked()), this, SLOT(buddiesMenusAddNewButtonPressed()) );
@@ -319,7 +325,7 @@
// stop the hotkeys timer
HOTKEYSTIMER->stop();
// new X11 display
- if( DISPLAY != NULL )
+ if( DISPLAY != nullptr )
{
XCloseDisplay( DISPLAY );
}
@@ -470,19 +476,19 @@
bool GlobalHotkeys::processHotKey( HotKey hotkey )
{
ConfHotKey *confhotkey = ConfHotKey::findByHotkey( hotkey );
- if( confhotkey != NULL )
+ if( confhotkey != nullptr )
{
QMetaObject::invokeMethod( Functions::instance(), confhotkey->function().toUtf8().data(), Q_ARG( ConfHotKey*, confhotkey ) );
return true;
}
ConfBuddiesShortcut *confbuddiesshortcut = ConfBuddiesShortcut::findByHotkey( hotkey );
- if( confbuddiesshortcut != NULL )
+ if( confbuddiesshortcut != nullptr )
{
processConfBuddiesShortcut( confbuddiesshortcut );
return true;
}
ConfBuddiesMenu *confbuddiesmenu = ConfBuddiesMenu::findByHotkey( hotkey );
- if( confbuddiesmenu != NULL )
+ if( confbuddiesmenu != nullptr )
{
processConfBuddiesMenu( confbuddiesmenu );
return true;
@@ -521,9 +527,7 @@
contactset.insert( BuddyPreferredManager::instance()->preferredContact( buddy, accounts.first() ) );
}
Chat chat = Api::findChatForContactOrContactSet( contactset, ActionCreateAndAdd );
- ChatWidget *chatwidget = ChatWidgetManager::instance()->byChat( chat, true );
- if( chatwidget )
- chatwidget->activate();
+ Core::instance()->chatWidgetManager()->openChat( chat, OpenChatActivation::Activate );
}
else
{
@@ -535,7 +539,7 @@
if( confbuddiesshortcut->hotKey() == SHOWNGLOBALWIDGETHOTKEY )
{
// last widget was this one - don't show it again
- SHOWNGLOBALWIDGET = NULL;
+ SHOWNGLOBALWIDGET = nullptr;
SHOWNGLOBALWIDGETHOTKEY = HotKey();
GlobalHotkeys::instance()->activateLastActiveWindow();
return;
@@ -580,7 +584,7 @@
if( confbuddiesmenu->hotKey() == SHOWNGLOBALWIDGETHOTKEY )
{
// last widget was this one - don't show it again
- SHOWNGLOBALWIDGET = NULL;
+ SHOWNGLOBALWIDGET = nullptr;
SHOWNGLOBALWIDGETHOTKEY = HotKey();
GlobalHotkeys::instance()->activateLastActiveWindow();
return;
@@ -590,21 +594,26 @@
BuddiesMenu *menu = new BuddiesMenu();
menu->setContactsSubmenu( true );
// add currently open chats to the menu
- if( confbuddiesmenu->currentChats() && ( ! ChatWidgetManager::instance()->chats().isEmpty() ) )
+ if( confbuddiesmenu->currentChats() )
{
// for each currently open chat
- foreach( ChatWidget *chatwidget, ChatWidgetManager::instance()->chats() )
+ for(
+ ChatWidgetRepository::Iterator ichatwidget = Core::instance()->chatWidgetRepository()->begin();
+ ichatwidget != Core::instance()->chatWidgetRepository()->end();
+ ++ichatwidget
+ )
{
+ ChatWidget *chatwidget = *ichatwidget;
QVector<Contact> contacts = chatwidget->chat().contacts().toContactVector();
menu->add( contacts );
}
}
// add chats with pending messages to the menu
- if( confbuddiesmenu->pendingChats() && ( MessageManager::instance()->hasUnreadMessages() ) )
+ if( confbuddiesmenu->pendingChats() && ( Core::instance()->unreadMessageRepository()->hasUnreadMessages() ) )
{
QList<ContactSet> contactsetlist;
// for each unread message
- foreach( Message message, MessageManager::instance()->allUnreadMessages() )
+ foreach( Message message, Core::instance()->unreadMessageRepository()->allUnreadMessages() )
{
ContactSet contactset = message.messageChat().contacts();
menu->add( contactset.toContactVector() );
@@ -698,7 +707,7 @@
void GlobalHotkeys::updateLastActiveWindow()
{
- if( SHOWNGLOBALWIDGET == NULL )
+ if( SHOWNGLOBALWIDGET == nullptr )
LASTACTIVEWINDOW = X11_getActiveWindow( DISPLAY );
}
@@ -712,4 +721,6 @@
+#include "moc_globalhotkeys.cpp"
+
Q_EXPORT_PLUGIN2( globalhotkeys, GlobalHotkeys )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/globalhotkeys.desc new/globalhotkeys/globalhotkeys.desc
--- old/globalhotkeys/globalhotkeys.desc 2012-06-24 17:48:48.000000000 +0200
+++ new/globalhotkeys/globalhotkeys.desc 2014-08-16 00:10:49.000000000 +0200
@@ -11,4 +11,4 @@
Conflicts=
Replaces=
LoadByDefault=false
-Version=0.12-32
+Version=1.0-33
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/globalhotkeys.h new/globalhotkeys/globalhotkeys.h
--- old/globalhotkeys/globalhotkeys.h 2012-05-28 19:30:52.000000000 +0200
+++ new/globalhotkeys/globalhotkeys.h 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -28,10 +28,10 @@
#include <QTimer>
#include "gui/widgets/configuration/config-action-button.h"
-#include "gui/widgets/chat-widget.h"
+#include "gui/widgets/chat-widget/chat-widget.h"
#include "gui/windows/main-configuration-window.h"
#include "gui/windows/open-chat-with/open-chat-with.h"
-#include "plugins/generic-plugin.h"
+#include "plugin/plugin-root-component.h"
#include "buddiesmenu.h"
#include "conf.h"
@@ -43,13 +43,14 @@
#include "defines.h"
-class GlobalHotkeys : public ConfigurationUiHandler, public ConfigurationAwareObject, public GenericPlugin
+class GlobalHotkeys : public ConfigurationUiHandler, public ConfigurationAwareObject, public PluginRootComponent
{
friend class Functions;
Q_OBJECT
- Q_INTERFACES( GenericPlugin )
+ Q_INTERFACES( PluginRootComponent )
+ Q_PLUGIN_METADATA( IID "im.kadu.PluginRootComponent" )
public:
- virtual int init( bool firstLoad );
+ virtual bool init( bool firstLoad );
virtual void done();
GlobalHotkeys();
~GlobalHotkeys();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/globalmenu.cpp new/globalhotkeys/globalmenu.cpp
--- old/globalhotkeys/globalmenu.cpp 2012-02-07 20:45:56.000000000 +0100
+++ new/globalhotkeys/globalmenu.cpp 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -34,7 +34,7 @@
-QTimer *GlobalMenu::INACTIVITYTIMER = NULL;
+QTimer *GlobalMenu::INACTIVITYTIMER = nullptr;
bool GlobalMenu::INACTIVITYTIMERLOCK = false;
@@ -42,16 +42,16 @@
GlobalMenu::GlobalMenu() : QMenu()
{
- if( INACTIVITYTIMER == NULL )
+ if( INACTIVITYTIMER == nullptr )
{
INACTIVITYTIMER = new QTimer();
INACTIVITYTIMER->setInterval( GLOBALHOTKEYS_GLOBALWIDGETINACTIVITYTIMERINTERVAL );
INACTIVITYTIMER->setSingleShot( true );
}
connect( INACTIVITYTIMER, SIGNAL(timeout()), this, SLOT(inactivitytimerTimeout()) );
- PARENTMENU = NULL;
- SUBMENU = NULL;
- ACTIONTOACTIVATE = NULL;
+ PARENTMENU = nullptr;
+ SUBMENU = nullptr;
+ ACTIONTOACTIVATE = nullptr;
setAttribute( Qt::WA_DeleteOnClose );
setParent( 0, Qt::Window | Qt::X11BypassWindowManagerHint );
setFocusPolicy( Qt::WheelFocus );
@@ -149,7 +149,7 @@
( qApp->desktop()->screenGeometry().width() - sizeHint().width() ) / 2,
( qApp->desktop()->screenGeometry().height() - sizeHint().height() ) / 2
) );
- if( ACTIONTOACTIVATE != NULL )
+ if( ACTIONTOACTIVATE != nullptr )
{
setActiveAction( ACTIONTOACTIVATE );
}
@@ -219,7 +219,7 @@
if( ! SUBMENU.isNull() )
return;
QAction *action = actionAt( event->pos() );
- if( action != NULL )
+ if( action != nullptr )
setActiveAction( action );
}
LASTMOUSEPOS = event->globalPos();
@@ -238,7 +238,7 @@
return;
GlobalMenu *menu = this;
bool active = false;
- while( menu != NULL )
+ while( menu != nullptr )
{
if( _isActiveWindow( menu ) )
{
@@ -264,3 +264,8 @@
}
timerStart();
}
+
+
+
+
+#include "moc_globalmenu.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/globalwidgetmanager.cpp new/globalhotkeys/globalwidgetmanager.cpp
--- old/globalhotkeys/globalwidgetmanager.cpp 2012-06-16 13:43:08.000000000 +0200
+++ new/globalhotkeys/globalwidgetmanager.cpp 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -103,6 +103,11 @@
{
stop();
disconnect( &INACTIVITYTIMER, SIGNAL(timeout()), this, SLOT(inactivitytimerTimeout()) );
- WIDGET = NULL;
+ WIDGET = nullptr;
deleteLater();
}
+
+
+
+
+#include "moc_globalwidgetmanager.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/hotkeyedit.cpp new/globalhotkeys/hotkeyedit.cpp
--- old/globalhotkeys/hotkeyedit.cpp 2012-05-20 00:51:26.000000000 +0200
+++ new/globalhotkeys/hotkeyedit.cpp 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -238,3 +238,8 @@
{
LASTVALIDVALUE = "";
}
+
+
+
+
+#include "moc_hotkeyedit.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/statusesmenu.cpp new/globalhotkeys/statusesmenu.cpp
--- old/globalhotkeys/statusesmenu.cpp 2012-04-08 22:52:57.000000000 +0200
+++ new/globalhotkeys/statusesmenu.cpp 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -37,7 +37,7 @@
StatusesMenuActionData::StatusesMenuActionData()
{
- STATUSCONTAINER = NULL;
+ STATUSCONTAINER = nullptr;
}
@@ -99,7 +99,7 @@
void StatusesMenu::popup( QPoint p )
{
// set active item
- if( ACTIONTOACTIVATE == NULL )
+ if( ACTIONTOACTIVATE == nullptr )
{
if( actions().count() > 0 )
{
@@ -125,7 +125,7 @@
if( ! SUBMENU.isNull() )
return;
QAction *action = activeAction();
- if( activeAction() != NULL )
+ if( activeAction() != nullptr )
{
QVariant variant = action->data();
if( ( ! variant.isNull() ) && ( variant.canConvert<StatusesMenuActionData>() ) )
@@ -153,7 +153,7 @@
void StatusesMenu::mousePressEvent( QMouseEvent *event )
{
QAction *action = actionAt( event->pos() );
- if( action != NULL )
+ if( action != nullptr )
{
setActiveAction( action );
QVariant variant = action->data();
@@ -201,3 +201,8 @@
// popup
submenu->popup( pos() + actionGeometry( action ).topRight() );
}
+
+
+
+
+#include "moc_statusesmenu.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/statusesmenu.h new/globalhotkeys/statusesmenu.h
--- old/globalhotkeys/statusesmenu.h 2012-02-06 17:50:04.000000000 +0100
+++ new/globalhotkeys/statusesmenu.h 2014-08-16 00:10:49.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* GlobalHotkeys plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -27,7 +27,7 @@
#include <QPointer>
#include "contacts/contact.h"
-#include "gui/widgets/chat-widget.h"
+#include "gui/widgets/chat-widget/chat-widget.h"
#include "status/status-container.h"
#include "globalmenu.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/translations/globalhotkeys_cs.ts new/globalhotkeys/translations/globalhotkeys_cs.ts
--- old/globalhotkeys/translations/globalhotkeys_cs.ts 2012-02-06 17:50:04.000000000 +0100
+++ new/globalhotkeys/translations/globalhotkeys_cs.ts 2014-08-16 00:10:49.000000000 +0200
@@ -177,10 +177,6 @@
<translation>Okno pro správu účtu</translation>
</message>
<message>
- <source>Plugins window</source>
- <translation>Okno pro přídavné moduly</translation>
- </message>
- <message>
<source>Add new shortcut ...</source>
<translation>Přidat novou zkratku...</translation>
</message>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/translations/globalhotkeys_en.ts new/globalhotkeys/translations/globalhotkeys_en.ts
--- old/globalhotkeys/translations/globalhotkeys_en.ts 2012-02-06 17:50:04.000000000 +0100
+++ new/globalhotkeys/translations/globalhotkeys_en.ts 2014-08-16 00:10:49.000000000 +0200
@@ -176,10 +176,6 @@
<translation>Account manager window</translation>
</message>
<message>
- <source>Plugins window</source>
- <translation>Plugins window</translation>
- </message>
- <message>
<source>Add new shortcut ...</source>
<translation>Add new shortcut ...</translation>
</message>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/translations/globalhotkeys_it.ts new/globalhotkeys/translations/globalhotkeys_it.ts
--- old/globalhotkeys/translations/globalhotkeys_it.ts 2012-02-06 17:50:04.000000000 +0100
+++ new/globalhotkeys/translations/globalhotkeys_it.ts 2014-08-16 00:10:49.000000000 +0200
@@ -176,10 +176,6 @@
<translation>Finestra di gestione account</translation>
</message>
<message>
- <source>Plugins window</source>
- <translation>Finestra plugins</translation>
- </message>
- <message>
<source>Add new shortcut ...</source>
<translation>Aggiungi nuova scorciatoia ...</translation>
</message>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/globalhotkeys/translations/globalhotkeys_pl.ts new/globalhotkeys/translations/globalhotkeys_pl.ts
--- old/globalhotkeys/translations/globalhotkeys_pl.ts 2012-02-06 17:50:04.000000000 +0100
+++ new/globalhotkeys/translations/globalhotkeys_pl.ts 2014-08-16 00:10:49.000000000 +0200
@@ -115,10 +115,6 @@
<source>Account manager window</source>
<translation>Okno menadżera kont</translation>
</message>
- <message>
- <source>Plugins window</source>
- <translation>Okno wtyczek</translation>
- </message>
<message numerus="yes">
<source>%n hotkey(s):
- %1
++++++ kadu-0.12.3.tar.bz2 -> kadu-1.1.tar.bz2 ++++++
++++ 463370 lines of diff (skipped)
++++++ lednotify-0.12-33.tar.gz -> lednotify-1.0-34.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lednotify/CMakeLists.txt new/lednotify/CMakeLists.txt
--- old/lednotify/CMakeLists.txt 2011-08-06 18:55:23.000000000 +0200
+++ new/lednotify/CMakeLists.txt 2014-08-16 00:11:07.000000000 +0200
@@ -1,45 +1,34 @@
project( lednotify )
cmake_minimum_required( VERSION 2.8 )
-set( QT_MIN_VERSION "4.7.0" )
-set( CMAKE_MIN_VERSION "2.8.0" )
+set( QT_MIN_VERSION "4.8.0" )
-set( KADU_FIND_REQUIRED true )
-include( FindKadu )
-
-include_directories( ${KADU_INCLUDE_DIR} )
-include_directories( ${KADU_INCLUDE_DIR}/kadu-core )
+find_package( Kadu REQUIRED CONFIG )
set( SOURCES
ledblinker.cpp
lednotify.cpp
)
-set( MOC_SOURCES
- ledblinker.h
- lednotify.h
-)
-
+set( LEDNOTIFY_LIBRARIES "" )
if( WIN32 )
list( APPEND SOURCES leddriver_win32.cpp )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
else( WIN32 )
list( APPEND SOURCES leddriver_x11.cpp )
+ include( FindPkgConfig )
+ pkg_search_module (LIBX11 REQUIRED x11)
+ include_directories( ${LIBX11_INCLUDE_DIRS} )
+ link_directories( ${LIBX11_LIBRARY_DIRS} )
+ list( APPEND LEDNOTIFY_LIBRARIES ${LIBX11_LIBRARIES} )
endif( WIN32 )
-set( TRANSLATION_SOURCES
- translations/lednotify_en.ts
- translations/lednotify_cs.ts
- translations/lednotify_pl.ts
-)
-
set( CONFIGURATION_FILES
configuration/lednotify.ui
)
kadu_plugin( lednotify
PLUGIN_SOURCES ${SOURCES}
- PLUGIN_MOC_SOURCES ${MOC_SOURCES}
- PLUGIN_TRANSLATION_SOURCES ${TRANSLATION_SOURCES}
PLUGIN_CONFIGURATION_FILES ${CONFIGURATION_FILES}
+ PLUGIN_LIBRARIES ${LEDNOTIFY_LIBRARIES}
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lednotify/changelog new/lednotify/changelog
--- old/lednotify/changelog 2012-02-14 20:02:42.000000000 +0100
+++ new/lednotify/changelog 2014-08-16 00:11:07.000000000 +0200
@@ -1,3 +1,8 @@
+0.12-33 => 1.0-34
+* Plugin dostosowany do Kadu 1.0.
+* Drobne zmiany dla C++11.
+
+
0.11-32 => 0.12-33
* Plugin dostosowany do Kadu 0.12.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lednotify/ledblinker.cpp new/lednotify/ledblinker.cpp
--- old/lednotify/ledblinker.cpp 2011-10-19 19:59:56.000000000 +0200
+++ new/lednotify/ledblinker.cpp 2014-08-16 00:11:07.000000000 +0200
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2011 *
+ * Copyright (C) 2008-2014 *
* Michał Małek michalm@jabster.pl *
* Piotr Dąbrowski ultr@ultr.pl *
* *
@@ -104,3 +104,8 @@
if( enabled_ )
timer_.start( delay_ );
}
+
+
+
+
+#include "moc_ledblinker.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lednotify/leddriver_x11.cpp new/lednotify/leddriver_x11.cpp
--- old/lednotify/leddriver_x11.cpp 2012-05-28 12:28:28.000000000 +0200
+++ new/lednotify/leddriver_x11.cpp 2014-08-16 00:11:07.000000000 +0200
@@ -94,9 +94,9 @@
ledatom = XInternAtom( display_, "Caps Lock", True );
break;
}
- if( ( ledatom != None ) && XkbGetNamedIndicator( display_, ledatom, NULL, NULL, NULL, NULL ) )
+ if( ( ledatom != None ) && XkbGetNamedIndicator( display_, ledatom, nullptr, nullptr, nullptr, nullptr ) )
{
- XkbSetNamedIndicator( display_, ledatom, True, ledState, False, NULL );
+ XkbSetNamedIndicator( display_, ledatom, True, ledState, False, nullptr );
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lednotify/lednotify.cpp new/lednotify/lednotify.cpp
--- old/lednotify/lednotify.cpp 2012-02-16 23:16:06.000000000 +0100
+++ new/lednotify/lednotify.cpp 2014-08-16 00:11:07.000000000 +0200
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2012 *
+ * Copyright (C) 2008-2014 *
* Michał Małek michalm@jabster.pl *
* Piotr Dąbrowski ultr@ultr.pl *
* *
@@ -24,12 +24,14 @@
#include "chat/chat-manager.h"
#include "configuration/configuration-file.h"
-#include "gui/widgets/chat-widget-manager.h"
+#include "core/core.h"
+#include "gui/widgets/chat-widget/chat-widget-repository.h"
#include "gui/widgets/custom-input.h"
-#include "message/message-manager.h"
+#include "message/unread-message-repository.h"
#include "misc/kadu-paths.h"
#include "misc/misc.h"
-#include "notify/chat-notification.h"
+#include "notify/notification/aggregate-notification.h"
+#include "notify/notification/new-message-notification.h"
#include "notify/notification-manager.h"
#include "activate.h"
#include "debug.h"
@@ -42,15 +44,37 @@
-int LedNotify::init( bool firstLoad )
+bool LedNotify::init( bool firstLoad )
{
Q_UNUSED( firstLoad );
- return 0;
+ kdebugf();
+ // register configuration
+ MainConfigurationWindow::registerUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/lednotify.ui" );
+ // init setup
+ config_file.addVariable( "LedNotify", "LEDdiode", LedDriver::DiodeScrollLock );
+ config_file.addVariable( "LedNotify", "LEDdelay", 500 );
+ config_file.addVariable( "LedNotify", "LEDcount", 3 );
+ NotificationManager::instance()->registerNotifier( this );
+ connect( Core::instance()->unreadMessageRepository(), SIGNAL(unreadMessageRemoved(Message)) , this, SLOT(messageReceived(Message)) );
+ connect( ChatManager::instance() , SIGNAL(chatUpdated(const Chat&)) , this, SLOT(chatUpdated(const Chat&)) );
+ connect( Core::instance()->chatWidgetRepository() , SIGNAL(chatWidgetRemoved(ChatWidget*)), this, SLOT(chatWidgetRemoved(ChatWidget*)) );
+ // done
+ kdebugf2();
+ return true;
}
void LedNotify::done()
{
+ kdebugf();
+ disconnect( Core::instance()->unreadMessageRepository(), SIGNAL(unreadMessageRemoved(Message)) , this, SLOT(messageReceived(Message)) );
+ disconnect( ChatManager::instance() , SIGNAL(chatUpdated(const Chat&)) , this, SLOT(chatUpdated(const Chat&)) );
+ disconnect( Core::instance()->chatWidgetRepository() , SIGNAL(chatWidgetRemoved(ChatWidget*)), this, SLOT(chatWidgetRemoved(ChatWidget*)) );
+ // unregister configuration
+ NotificationManager::instance()->unregisterNotifier( this );
+ MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/lednotify.ui" );
+ // done
+ kdebugf2();
}
@@ -58,24 +82,11 @@
Notifier( "lednotify", QT_TRANSLATE_NOOP( "@default", "LED" ), KaduIcon( "kadu_icons/notify-led" ) ),
chatBlinking_( false ), msgBlinking_( false )
{
- config_file.addVariable( "LedNotify", "LEDdiode", LedDriver::DiodeScrollLock );
- config_file.addVariable( "LedNotify", "LEDdelay", 500 );
- config_file.addVariable( "LedNotify", "LEDcount", 3 );
- MainConfigurationWindow::registerUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/lednotify.ui" );
- NotificationManager::instance()->registerNotifier( this );
- connect( MessageManager::instance() , SIGNAL(unreadMessageRemoved(Message)) , this, SLOT(messageReceived(Message)) );
- connect( ChatManager::instance() , SIGNAL(chatUpdated(const Chat&)) , this, SLOT(chatUpdated(const Chat&)) );
- connect( ChatWidgetManager::instance(), SIGNAL(chatWidgetDestroying(ChatWidget*)), this, SLOT(chatWidgetDestroying(ChatWidget*)) );
}
LedNotify::~LedNotify()
{
- disconnect( MessageManager::instance() , SIGNAL(unreadMessageRemoved(Message)) , this, SLOT(messageReceived(Message)) );
- disconnect( ChatManager::instance() , SIGNAL(chatUpdated(const Chat&)) , this, SLOT(chatUpdated(const Chat&)) );
- disconnect( ChatWidgetManager::instance(), SIGNAL(chatWidgetDestroying(ChatWidget*)), this, SLOT(chatWidgetDestroying(ChatWidget*)) );
- NotificationManager::instance()->unregisterNotifier( this );
- MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/lednotify.ui" );
}
@@ -85,44 +96,55 @@
return 0;
}
-
+#include <typeinfo>
void LedNotify::notify( Notification *notification )
{
kdebugf();
- if( notification->type() == "NewChat" )
+ AggregateNotification *aggregatenotification = dynamic_cast( notification );
+ if( aggregatenotification != nullptr )
{
- // Don't blink, if "OpenChatOnMessage" is "true" - chat is already open
- if( ! config_file.readBoolEntry( "Chat", "OpenChatOnMessage" ) )
+ foreach( Notification *notification, aggregatenotification->notifications() )
{
- chatBlinking_ = true;
- blinker_.startInfinite();
+ notify(notification);
}
}
- else if( notification->type() == "NewMessage" )
+ else
{
- ChatNotification *chatnotification = dynamic_cast( notification );
- if( chatnotification != NULL )
+ if( notification->type() == "NewChat" )
{
- Chat chat = chatnotification->chat();
- ChatWidget* chatwidget = ChatWidgetManager::instance()->byChat( chat, false );
- if( chatwidget != NULL )
+ // Don't blink, if "OpenChatOnMessage" is "true" - chat is already open
+ if( ! config_file.readBoolEntry( "Chat", "OpenChatOnMessage" ) )
{
- if( ! _isActiveWindow( chatwidget->window() ) )
- {
- msgChats_.insert( chat );
- msgBlinking_ = true;
- blinker_.startInfinite();
- }
- else if( ! config_file.readBoolEntry( "Notify", "NewMessageOnlyIfInactive" ) )
+ chatBlinking_ = true;
+ blinker_.startInfinite();
+ }
+ }
+ else if( notification->type() == "NewMessage" )
+ {
+ MessageNotification *messagenotification = dynamic_cast( notification );
+ if( messagenotification != nullptr )
+ {
+ Chat chat = messagenotification->chat();
+ ChatWidget* chatwidget = Core::instance()->chatWidgetRepository()->widgetForChat( chat );
+ if( chatwidget != nullptr )
{
- blinker_.startFinite();
+ if( ! _isActiveWindow( chatwidget->window() ) )
+ {
+ msgChats_.insert( chat );
+ msgBlinking_ = true;
+ blinker_.startInfinite();
+ }
+ else if( ! config_file.readBoolEntry( "Notify", "NewMessageOnlyIfInactive" ) )
+ {
+ blinker_.startFinite();
+ }
}
}
}
- }
- else
- {
- blinker_.startFinite();
+ else
+ {
+ blinker_.startFinite();
+ }
}
kdebugf2();
}
@@ -133,7 +155,11 @@
Q_UNUSED( message );
kdebugf();
// Check if we can stop blinking from "NewChat" event...
- if( chatBlinking_ && ( ! MessageManager::instance()->hasUnreadMessages() ) )
+ if(
+ chatBlinking_ &&
+ message.messageChat().unreadMessagesCount() == 0 &&
+ ( ! Core::instance()->unreadMessageRepository()->hasUnreadMessages() )
+ )
{
chatBlinking_ = false;
// ...and make sure "NewMessage" blinking is not running
@@ -148,12 +174,14 @@
{
kdebugf();
if( chat.unreadMessagesCount() == 0 )
+ {
chatRead( chat );
+ }
kdebugf2();
}
-void LedNotify::chatWidgetDestroying( ChatWidget *chatwidget )
+void LedNotify::chatWidgetRemoved( ChatWidget *chatwidget )
{
kdebugf();
chatRead( chatwidget->chat() );
@@ -179,4 +207,6 @@
+#include "moc_lednotify.cpp"
+
Q_EXPORT_PLUGIN2( lednotify, LedNotify )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lednotify/lednotify.desc new/lednotify/lednotify.desc
--- old/lednotify/lednotify.desc 2012-06-24 17:48:51.000000000 +0200
+++ new/lednotify/lednotify.desc 2014-08-16 00:11:07.000000000 +0200
@@ -11,4 +11,4 @@
Conflicts=
Replaces=
LoadByDefault=false
-Version=0.12-33
+Version=1.0-34
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lednotify/lednotify.h new/lednotify/lednotify.h
--- old/lednotify/lednotify.h 2011-11-24 12:12:11.000000000 +0100
+++ new/lednotify/lednotify.h 2014-08-16 00:11:07.000000000 +0200
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2011 *
+ * Copyright (C) 2008-2014 *
* Michał Małek michalm@jabster.pl *
* Piotr Dąbrowski ultr@ultr.pl *
* *
@@ -27,21 +27,22 @@
#include <QSet>
#include "message/message.h"
-#include "gui/widgets/chat-widget.h"
+#include "gui/widgets/chat-widget/chat-widget.h"
#include "gui/windows/main-configuration-window.h"
-#include "notify/notification.h"
+#include "notify/notification/notification.h"
#include "notify/notifier.h"
-#include "plugins/generic-plugin.h"
+#include "plugin/plugin-root-component.h"
#include "ledblinker.h"
-class LedNotify : public Notifier, public GenericPlugin
+class LedNotify : public Notifier, public PluginRootComponent
{
Q_OBJECT
- Q_INTERFACES( GenericPlugin )
+ Q_INTERFACES( PluginRootComponent )
+ Q_PLUGIN_METADATA( IID "im.kadu.PluginRootComponent" )
public:
- virtual int init( bool firstLoad );
+ virtual bool init( bool firstLoad );
virtual void done();
LedNotify();
~LedNotify();
@@ -55,17 +56,17 @@
bool msgBlinking_;
private slots:
/**
- * Checks if all new messages are received so we could stop blinking
+ * Checks if all new messages are received so we could stop blinking
*/
void messageReceived( Message messaget );
/**
- * Checks if messages in all chats have been read so we could stop blinking
+ * Checks if messages in all chats have been read so we could stop blinking
*/
void chatUpdated( const Chat &chat );
/**
- * Checks if messages in all chats have been read so we could stop blinking
+ * Checks if messages in all chats have been read so we could stop blinking
*/
- void chatWidgetDestroying( ChatWidget *chatwidget );
+ void chatWidgetRemoved( ChatWidget *chatwidget );
};
++++++ messagessplitter-0.12-5.tar.gz -> messagessplitter-1.0-6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/messagessplitter/CMakeLists.txt new/messagessplitter/CMakeLists.txt
--- old/messagessplitter/CMakeLists.txt 2011-06-03 18:40:12.000000000 +0200
+++ new/messagessplitter/CMakeLists.txt 2014-08-16 00:11:20.000000000 +0200
@@ -1,37 +1,20 @@
project( messagessplitter )
cmake_minimum_required( VERSION 2.8 )
-set( QT_MIN_VERSION "4.7.0" )
-set( CMAKE_MIN_VERSION "2.8.0" )
+set( QT_MIN_VERSION "4.8.0" )
-set( KADU_FIND_REQUIRED true )
-include( FindKadu )
-
-include_directories( ${KADU_INCLUDE_DIR} )
-include_directories( ${KADU_INCLUDE_DIR}/kadu-core )
+find_package( Kadu REQUIRED CONFIG )
set( SOURCES
messagessplitter.cpp
)
-set( MOC_SOURCES
- messagessplitter.h
-)
-
-set( TRANSLATION_SOURCES
- translations/messagessplitter_en.ts
- translations/messagessplitter_cs.ts
- translations/messagessplitter_pl.ts
-)
-
set( CONFIGURATION_FILES
configuration/messagessplitter.ui
)
kadu_plugin( messagessplitter
PLUGIN_SOURCES ${SOURCES}
- PLUGIN_MOC_SOURCES ${MOC_SOURCES}
- PLUGIN_TRANSLATION_SOURCES ${TRANSLATION_SOURCES}
PLUGIN_CONFIGURATION_FILES ${CONFIGURATION_FILES}
PLUGIN_DEPENDENCIES gadu_protocol encryption_ng
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/messagessplitter/changelog new/messagessplitter/changelog
--- old/messagessplitter/changelog 2012-02-14 20:03:09.000000000 +0100
+++ new/messagessplitter/changelog 2014-08-16 00:11:20.000000000 +0200
@@ -1,3 +1,8 @@
+0.12-5 => 1.0-6
+* Plugin dostosowany do Kadu 1.0.
+* Drobne zmiany dla C++11.
+
+
0.11-4 => 0.12-5
* Plugin dostosowany do Kadu 0.12.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/messagessplitter/messagessplitter.cpp new/messagessplitter/messagessplitter.cpp
--- old/messagessplitter/messagessplitter.cpp 2012-03-17 19:27:53.000000000 +0100
+++ new/messagessplitter/messagessplitter.cpp 2014-08-16 00:11:20.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* MessagesSplitter plugin for Kadu *
-* Copyright (C) 2011-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2011-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -28,8 +28,9 @@
#include "accounts/account.h"
#include "configuration/configuration-file.h"
+#include "core/core.h"
#include "gui/widgets/chat-edit-box.h"
-#include "gui/widgets/chat-widget-manager.h"
+#include "gui/widgets/chat-widget/chat-widget-repository.h"
#include "gui/widgets/custom-input.h"
#include "misc/kadu-paths.h"
#include "misc/misc.h"
@@ -46,20 +47,42 @@
-int MessagesSplitter::init( bool firstLoad )
+bool MessagesSplitter::init( bool firstLoad )
{
Q_UNUSED( firstLoad );
kdebugf();
+ // register configuration
MainConfigurationWindow::registerUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/messagessplitter.ui" );
+ MainConfigurationWindow::registerUiHandler( this );
+ // configuration handling
+ createDefaultConfiguration();
+ // read the configuration and force its usage
+ configurationUpdated();
+ // connect chat widgets events and handle opened ones
+ connect( Core::instance()->chatWidgetRepository(), SIGNAL(chatWidgetAdded(ChatWidget*)) , this, SLOT(chatWidgetAdded(ChatWidget*)) );
+ connect( Core::instance()->chatWidgetRepository(), SIGNAL(chatWidgetRemoved(ChatWidget*)), this, SLOT(chatWidgetRemoved(ChatWidget*)) );
+ for( ChatWidgetRepository::Iterator ichatwidget = Core::instance()->chatWidgetRepository()->begin();
+ ichatwidget != Core::instance()->chatWidgetRepository()->end();
+ ++ichatwidget
+ ) {
+ chatWidgetAdded( *ichatwidget );
+ }
+ // done
kdebugf2();
- return 0;
+ return true;
}
void MessagesSplitter::done()
{
kdebugf();
+ // disconnect chat widgets events
+ disconnect( Core::instance()->chatWidgetRepository(), SIGNAL(chatWidgetAdded(ChatWidget*)) , this, SLOT(chatWidgetAdded(ChatWidget*)) );
+ disconnect( Core::instance()->chatWidgetRepository(), SIGNAL(chatWidgetRemoved(ChatWidget*)), this, SLOT(chatWidgetRemoved(ChatWidget*)) );
+ // unregister configuration
+ MainConfigurationWindow::unregisterUiHandler( this );
MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/messagessplitter.ui" );
+ // done
kdebugf2();
}
@@ -67,23 +90,11 @@
MessagesSplitter::MessagesSplitter()
{
partssendinglock = false;
- // configuration handling
- createDefaultConfiguration();
- // read the configuration and force its usage
- configurationUpdated();
- // connect chat widgets events and handle opened ones
- connect( ChatWidgetManager::instance(), SIGNAL(chatWidgetCreated(ChatWidget*)) , this, SLOT(chatCreated(ChatWidget*)) );
- connect( ChatWidgetManager::instance(), SIGNAL(chatWidgetDestroying(ChatWidget*)), this, SLOT(chatDestroying(ChatWidget*)) );
- foreach( ChatWidget *chatwidget, ChatWidgetManager::instance()->chats() )
- chatCreated( chatwidget );
}
MessagesSplitter::~MessagesSplitter()
{
- // disconnect chat widgets events
- disconnect( ChatWidgetManager::instance(), SIGNAL(chatWidgetCreated(ChatWidget*)) , this, SLOT(chatCreated(ChatWidget*)) );
- disconnect( ChatWidgetManager::instance(), SIGNAL(chatWidgetDestroying(ChatWidget*)), this, SLOT(chatDestroying(ChatWidget*)) );
}
@@ -106,13 +117,13 @@
}
-void MessagesSplitter::chatCreated( ChatWidget *chatwidget )
+void MessagesSplitter::chatWidgetAdded( ChatWidget *chatwidget )
{
connect( chatwidget, SIGNAL( messageSendRequested( ChatWidget* ) ), this, SLOT( messageSendRequested( ChatWidget* ) ) );
}
-void MessagesSplitter::chatDestroying( ChatWidget *chatwidget )
+void MessagesSplitter::chatWidgetRemoved( ChatWidget *chatwidget )
{
disconnect( chatwidget, SIGNAL( messageSendRequested( ChatWidget* ) ), this, SLOT( messageSendRequested( ChatWidget* ) ) );
}
@@ -273,4 +284,6 @@
+#include "moc_messagessplitter.cpp"
+
Q_EXPORT_PLUGIN2( messagessplitter, MessagesSplitter )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/messagessplitter/messagessplitter.desc new/messagessplitter/messagessplitter.desc
--- old/messagessplitter/messagessplitter.desc 2012-06-24 17:48:54.000000000 +0200
+++ new/messagessplitter/messagessplitter.desc 2014-08-16 00:11:20.000000000 +0200
@@ -11,4 +11,4 @@
Conflicts=
Replaces=
LoadByDefault=false
-Version=0.12-5
+Version=1.0-6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/messagessplitter/messagessplitter.h new/messagessplitter/messagessplitter.h
--- old/messagessplitter/messagessplitter.h 2012-02-04 01:18:39.000000000 +0100
+++ new/messagessplitter/messagessplitter.h 2014-08-16 00:11:20.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* MessagesSplitter plugin for Kadu *
-* Copyright (C) 2011-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2011-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -25,27 +25,28 @@
#include <QObject>
-#include "gui/widgets/chat-widget.h"
+#include "gui/widgets/chat-widget/chat-widget.h"
#include "gui/windows/main-configuration-window.h"
#include "configuration/configuration-aware-object.h"
-#include "plugins/generic-plugin.h"
+#include "plugin/plugin-root-component.h"
-class MessagesSplitter : public ConfigurationUiHandler, public ConfigurationAwareObject, public GenericPlugin
+class MessagesSplitter : public ConfigurationUiHandler, public ConfigurationAwareObject, public PluginRootComponent
{
Q_OBJECT
- Q_INTERFACES( GenericPlugin )
+ Q_INTERFACES( PluginRootComponent )
+ Q_PLUGIN_METADATA( IID "im.kadu.PluginRootComponent" )
public:
- virtual int init( bool firstLoad );
+ virtual bool init( bool firstLoad );
virtual void done();
MessagesSplitter();
~MessagesSplitter();
- void mainConfigurationWindowCreated( MainConfigurationWindow *mainConfigurationWindow );
+ virtual void mainConfigurationWindowCreated( MainConfigurationWindow *mainConfigurationWindow );
protected:
void configurationUpdated();
private slots:
- void chatCreated( ChatWidget *chatwidget );
- void chatDestroying( ChatWidget *chatwidget );
+ void chatWidgetAdded( ChatWidget *chatwidget );
+ void chatWidgetRemoved( ChatWidget *chatwidget );
void messageSendRequested( ChatWidget *chatwidget );
private:
void createDefaultConfiguration();
++++++ mime_tex-0.12.0-2.tar.bz2 -> mime_tex-1.0-3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mime_tex/CMakeLists.txt new/mime_tex/CMakeLists.txt
--- old/mime_tex/CMakeLists.txt 2012-06-19 23:49:53.000000000 +0200
+++ new/mime_tex/CMakeLists.txt 2014-07-30 23:48:25.000000000 +0200
@@ -2,11 +2,10 @@
# minimal required versions
cmake_minimum_required (VERSION 2.8)
-set (QT_MIN_VERSION "4.7.0")
+set (QT_MIN_VERSION "4.8.0")
set (CMAKE_MIN_VERSION "2.8.0")
-set (KADU_FIND_REQUIRED true)
-include (FindKadu)
+find_package (Kadu REQUIRED CONFIG)
add_subdirectory (mimetex)
set (SOURCES
@@ -17,18 +16,6 @@
tex_formula_dialog.cpp
)
-set (MOC_SOURCES
- formula_view.h
- formula_widget.h
- mime_tex.h
- mime_tex_plugin.h
- tex_formula_dialog.h
-)
-
-set (TRANSLATION_SOURCES
- translations/mime_tex_pl.ts
-)
-
set (CONFIGURATION_FILES
configuration/mime_tex.ui)
@@ -189,15 +176,13 @@
kadu_plugin (mime_tex
PLUGIN_SOURCES ${SOURCES}
- PLUGIN_MOC_SOURCES ${MOC_SOURCES}
- PLUGIN_TRANSLATION_SOURCES ${TRANSLATION_SOURCES}
PLUGIN_CONFIGURATION_FILES ${CONFIGURATION_FILES}
)
install (FILES ${DATA_FILES}
- DESTINATION ${KADU_PLUGINS_DIR}/data/mime_tex)
+ DESTINATION ${KADU_INSTALL_PLUGINS_DATA_DIR}/data/mime_tex)
install (FILES ${DATA_FILES_EDITOR_ICONS}
- DESTINATION ${KADU_PLUGINS_DIR}/data/mime_tex/editor_icons)
+ DESTINATION ${KADU_INSTALL_PLUGINS_DATA_DIR}/data/mime_tex/editor_icons)
install (FILES ${DATA_FILES_MIME_TEX_ICONS}
- DESTINATION ${KADU_PLUGINS_DIR}/data/mime_tex/mime_tex_icons)
+ DESTINATION ${KADU_INSTALL_PLUGINS_DATA_DIR}/data/mime_tex/mime_tex_icons)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mime_tex/formula_view.cpp new/mime_tex/formula_view.cpp
--- old/mime_tex/formula_view.cpp 2012-06-19 23:49:53.000000000 +0200
+++ new/mime_tex/formula_view.cpp 2014-07-30 23:48:25.000000000 +0200
@@ -34,3 +34,4 @@
kdebugf2();
}
+#include "moc_formula_view.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mime_tex/formula_widget.cpp new/mime_tex/formula_widget.cpp
--- old/mime_tex/formula_widget.cpp 2012-06-19 23:49:53.000000000 +0200
+++ new/mime_tex/formula_widget.cpp 2014-07-30 23:48:25.000000000 +0200
@@ -76,3 +76,5 @@
fillView(p);
kdebugf2();
}
+
+#include "moc_formula_widget.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mime_tex/mime_tex.cpp new/mime_tex/mime_tex.cpp
--- old/mime_tex/mime_tex.cpp 2012-06-19 23:49:53.000000000 +0200
+++ new/mime_tex/mime_tex.cpp 2014-07-30 23:48:25.000000000 +0200
@@ -20,11 +20,12 @@
#include "kadu-core/contacts/contact-set.h"
#include "kadu-core/configuration/configuration-file.h"
#include "kadu-core/icons/icons-manager.h"
-#include "kadu-core/gui/widgets/chat-widget-manager.h"
-#include "kadu-core/gui/widgets/chat-widget.h"
+#include "kadu-core/gui/widgets/chat-widget/chat-widget.h"
+#include "kadu-core/gui/widgets/chat-widget/chat-widget-repository.h"
#include "kadu-core/gui/windows/main-window.h"
#include "kadu-core/misc/kadu-paths.h"
#include "kadu-core/debug.h"
+#include
MimeTeX::MimeTeX * MimeTeX::MimeTeX::Instance = 0;
@@ -49,9 +50,9 @@
: QObject(parent)
{
kdebugf();
-
+
config_file.addVariable("MimeTeX", "mimetex_font_size", MimeTeX::defaultFontSize());
-
+
TeXActionDescription = new ActionDescription(
this,
ActionDescription::TypeChat,
@@ -60,7 +61,7 @@
SLOT(TeXActionActivated(QAction *, bool)),
KaduIcon(KaduPaths::instance()->dataPath() + "plugins/data/mime_tex/mime_tex_icons/tex_icon.png"),
tr("Insert TeX formula"));
-
+
kdebugf2();
}
@@ -90,7 +91,7 @@
Chat chat = qobject_cast(action)->context()->chat();
- ChatWidget *chatWidget = ChatWidgetManager::instance()->byChat(chat, false);
+ ChatWidget *chatWidget = Core::instance()->chatWidgetRepository()->widgetForChat(chat);
if (!chatWidget)
return;
TeXFormulaDialog *formulaDialog = new TeXFormulaDialog(chatWidget);
@@ -104,3 +105,5 @@
kdebugf();
return 4; // \Large
}
+
+#include "moc_mime_tex.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mime_tex/mime_tex_plugin.cpp new/mime_tex/mime_tex_plugin.cpp
--- old/mime_tex/mime_tex_plugin.cpp 2012-06-19 23:49:53.000000000 +0200
+++ new/mime_tex/mime_tex_plugin.cpp 2014-07-30 23:48:25.000000000 +0200
@@ -18,14 +18,14 @@
{
}
-int MimeTeX::MimeTeXPlugin::init(bool firstLoad)
+bool MimeTeX::MimeTeXPlugin::init(bool firstLoad)
{
Q_UNUSED(firstLoad)
MainConfigurationWindow::registerUiFile(KaduPaths::instance()->dataPath() + "plugins/configuration/mime_tex.ui");
MimeTeX::createInstance();
- return 0;
+ return true;
}
void MimeTeX::MimeTeXPlugin::done()
@@ -35,3 +35,5 @@
}
Q_EXPORT_PLUGIN2(mime_tex, MimeTeX::MimeTeXPlugin)
+
+#include "moc_mime_tex_plugin.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mime_tex/mime_tex_plugin.h new/mime_tex/mime_tex_plugin.h
--- old/mime_tex/mime_tex_plugin.h 2012-06-19 23:49:53.000000000 +0200
+++ new/mime_tex/mime_tex_plugin.h 2014-07-30 23:48:25.000000000 +0200
@@ -3,18 +3,19 @@
#include
-#include "plugins/generic-plugin.h"
+#include "plugin/plugin-root-component.h"
namespace MimeTeX {
- class MimeTeXPlugin : public QObject, public GenericPlugin
+ class MimeTeXPlugin : public QObject, public PluginRootComponent
{
- Q_OBJECT
- Q_INTERFACES(GenericPlugin)
+ Q_OBJECT
+ Q_INTERFACES(PluginRootComponent)
+ Q_PLUGIN_METADATA(IID "im.kadu.PluginRootComponent")
public:
virtual ~MimeTeXPlugin();
- virtual int init(bool firstLoad);
+ virtual bool init(bool firstLoad);
virtual void done();
};
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mime_tex/mimetex/CMakeLists.txt new/mime_tex/mimetex/CMakeLists.txt
--- old/mime_tex/mimetex/CMakeLists.txt 2012-06-19 23:49:53.000000000 +0200
+++ new/mime_tex/mimetex/CMakeLists.txt 2014-07-30 23:48:25.000000000 +0200
@@ -6,10 +6,10 @@
# Original mimetex has a lot of compilation warnings. We have to remove
# -Werror to let it build even though there are warnings.
-STRING(REGEX REPLACE "-Werror(=.*\ )?" " " CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
+STRING(REGEX REPLACE "-Werror(=.*\ )?" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
add_executable(mimetex ${SOURCES})
if (NOT MSVC)
target_link_libraries(mimetex m)
endif (NOT MSVC)
-install (TARGETS mimetex DESTINATION ${KADU_PLUGINS_LIBDIR}/bin/mime_tex)
+install (TARGETS mimetex DESTINATION ${KADU_INSTALL_PLUGINS_LIB_DIR}/bin/mime_tex)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mime_tex/tex_formula_dialog.cpp new/mime_tex/tex_formula_dialog.cpp
--- old/mime_tex/tex_formula_dialog.cpp 2012-06-19 23:49:53.000000000 +0200
+++ new/mime_tex/tex_formula_dialog.cpp 2014-07-30 23:48:25.000000000 +0200
@@ -24,7 +24,7 @@
#include "formula_view.h"
#include "mime_tex.h"
-#include "kadu-core/gui/widgets/chat-widget.h"
+#include "kadu-core/gui/widgets/chat-widget/chat-widget.h"
#include "kadu-core/configuration/configuration-file.h"
#include "kadu-core/gui/widgets/custom-input.h"
#include "kadu-core/misc/kadu-paths.h"
@@ -38,9 +38,9 @@
: QDialog(parent, f)
{
kdebugf();
-
+
chat = parent;
-
+
setAttribute(Qt::WA_DeleteOnClose);
// Check if .kadu/tex directory exists. Create one if not.
QDir TeXDir(KaduPaths::instance()->profilePath() + "tex");
@@ -48,7 +48,7 @@
if(TeXDir.mkdir(KaduPaths::instance()->profilePath() + "tex")) {
kdebugm(KDEBUG_INFO, "Error creating directory %s\n", QString(KaduPaths::instance()->profilePath() + "tex").toLatin1().constData());
}
-
+
QDateTime curTime = QDateTime::currentDateTime();
tmpFileName = KaduPaths::instance()->profilePath() + QString("tex/formula_%1.gif").arg(curTime.toString("yyyy-MM-dd_hh-mm"));
if(QFile(tmpFileName).exists())
@@ -72,7 +72,7 @@
upperLayout->addLayout(formulaLayout);
QVBoxLayout *componentsLayout = new QVBoxLayout();
upperLayout->addLayout(componentsLayout);
-
+
QLabel *formulaLabel = new QLabel(tr("Formula image"), this);
formulaLayout->addWidget(formulaLabel);
QLabel *componentsLabel = new QLabel(tr("Components"), this);
@@ -80,7 +80,7 @@
formulaView = new FormulaView(tmpFileName, this);
formulaLayout->addWidget(formulaView);
formulaLayout->addStretch();
-
+
QTabWidget *componentsView = new QTabWidget(this);
componentsLayout->addWidget(componentsView);
QListWidget *relationsView = new QListWidget(componentsView);
@@ -88,7 +88,7 @@
QListWidget *arrowsView = new QListWidget(componentsView);
QListWidget *delimitersView = new QListWidget(componentsView);
QListWidget *symbolsView = new QListWidget(componentsView);
-
+
relationsView->setMinimumWidth(componentsViewMinWidht);
relationsView->setViewMode(QListWidget::IconMode);
greekLettersView->setMinimumWidth(componentsViewMinWidht);
@@ -99,8 +99,8 @@
delimitersView->setViewMode(QListWidget::IconMode);
symbolsView->setMinimumWidth(componentsViewMinWidht);
symbolsView->setViewMode(QListWidget::IconMode);
-
- componentsView->addTab(relationsView,
+
+ componentsView->addTab(relationsView,
QPixmap(KaduPaths::instance()->dataPath() + "plugins/data/mime_tex/mime_tex_icons/relations_tab_icon.png"),
tr("&Relations"));
componentsView->addTab(greekLettersView,
@@ -115,13 +115,13 @@
componentsView->addTab(symbolsView,
QPixmap(KaduPaths::instance()->dataPath() + "plugins/data/mime_tex/mime_tex_icons/symbols_tab_icon.png"),
tr("&Symbols"));
-
+
connect(relationsView, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(insertComponentSlot(QListWidgetItem *)));
connect(greekLettersView, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(insertComponentSlot(QListWidgetItem *)));
connect(arrowsView, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(insertComponentSlot(QListWidgetItem *)));
connect(delimitersView, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(insertComponentSlot(QListWidgetItem *)));
connect(symbolsView, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(insertComponentSlot(QListWidgetItem *)));
-
+
kdebugm(KDEBUG_INFO, "%s\n", KaduPaths::instance()->dataPath().toLocal8Bit().constData());
kdebugm(KDEBUG_INFO, "%s\n", QString(KaduPaths::instance()->dataPath() + "plugins/data/mime_tex/mime_tex_icons/relations_tab_frac.png").toLocal8Bit().constData());
// Filling Relations tab
@@ -239,7 +239,7 @@
(void) new QListWidgetItem(QIcon(QPixmap(
KaduPaths::instance()->dataPath() + "plugins/data/mime_tex/mime_tex_icons/relations_tab_lim.png")),
"\\lim_{}{}", relationsView);
-
+
// Filling Greek Letters tab
(void) new QListWidgetItem(QIcon(QPixmap(
KaduPaths::instance()->dataPath() + "plugins/data/mime_tex/mime_tex_icons/greek_letters_tab_alpha.png")),
@@ -545,19 +545,19 @@
KaduPaths::instance()->dataPath() + "plugins/data/mime_tex/mime_tex_icons/symbols_tab_forall.png")),
"\\forall", symbolsView);
-
+
undoButton = new QPushButton(QIcon(QPixmap(KaduPaths::instance()->dataPath() + "plugins/data/mime_tex/editor_icons/undo.png")),
tr("&Undo"), this);
redoButton = new QPushButton(QIcon(QPixmap(KaduPaths::instance()->dataPath() + "plugins/data/mime_tex/editor_icons/redo.png")),
tr("&Redo"), this);
QPushButton *okButton = new QPushButton(tr("&Ok"), this);
QPushButton *cancelButton = new QPushButton(tr("&Cancel"), this);
-
+
formulaTextEdit = new QTextEdit(this);
formulaTextEdit->setMinimumHeight(formulaTextEditMinimunHeight);
mainLayout->addWidget(formulaTextEdit);
connect(&timer, SIGNAL(timeout()), this, SLOT(timeoutSlot()));
-
+
QHBoxLayout *buttonsLayout = new QHBoxLayout();
mainLayout->addLayout(buttonsLayout);
buttonsLayout->addWidget(undoButton);
@@ -565,7 +565,7 @@
buttonsLayout->addStretch();
buttonsLayout->addWidget(okButton);
buttonsLayout->addWidget(cancelButton);
-
+
connect(undoButton, SIGNAL(clicked()), formulaTextEdit, SLOT(undo()));
connect(redoButton, SIGNAL(clicked()), formulaTextEdit, SLOT(redo()));
connect(okButton, SIGNAL(clicked()), this, SLOT(okClickedSlot()));
@@ -577,10 +577,10 @@
undoButton->setEnabled(false);
redoButton->setEnabled(false);
-
+
timer.start(config_file.readNumEntry("MimeTeX", "mimetex_refreshment_interval", 2000));
formulaTextEdit->setFocus();
-
+
kdebugf2();
}
MimeTeX::TeXFormulaDialog::~TeXFormulaDialog()
@@ -592,11 +592,11 @@
{
kdebugf();
timer.stop();
-
+
QFile file(tmpFileName);
if(file.exists())
- chat->edit()->insertPlainText(QString("[IMAGE %1]").arg(tmpFileName));
-
+ chat->edit()->insertHtml(QString("<img src='%1' />").arg(Qt::escape(tmpFileName)));
+
accept();
kdebugf2();
}
@@ -658,3 +658,5 @@
}
int MimeTeX::TeXFormulaDialog::tmpFileNumber = 0;
+
+#include "moc_tex_formula_dialog.cpp"
++++++ networkping-0.12-4.tar.gz -> networkping-1.0-5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkping/CMakeLists.txt new/networkping/CMakeLists.txt
--- old/networkping/CMakeLists.txt 2011-05-17 18:19:58.000000000 +0200
+++ new/networkping/CMakeLists.txt 2014-08-16 00:11:33.000000000 +0200
@@ -1,35 +1,19 @@
project( networkping )
cmake_minimum_required( VERSION 2.8 )
-set( QT_MIN_VERSION "4.7.0" )
-set( CMAKE_MIN_VERSION "2.8.0" )
+set( QT_MIN_VERSION "4.8.0" )
-set( KADU_FIND_REQUIRED true )
-include( FindKadu )
-
-include_directories( ${KADU_INCLUDE_DIR} )
-include_directories( ${KADU_INCLUDE_DIR}/kadu-core )
+find_package( Kadu REQUIRED CONFIG )
set( SOURCES
networkping.cpp
)
-set( MOC_SOURCES
- networkping.h
-)
-
-set( TRANSLATION_SOURCES
- translations/networkping_en.ts
- translations/networkping_pl.ts
-)
-
set( CONFIGURATION_FILES
configuration/networkping.ui
)
kadu_plugin( networkping
PLUGIN_SOURCES ${SOURCES}
- PLUGIN_MOC_SOURCES ${MOC_SOURCES}
- PLUGIN_TRANSLATION_SOURCES ${TRANSLATION_SOURCES}
PLUGIN_CONFIGURATION_FILES ${CONFIGURATION_FILES}
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkping/changelog new/networkping/changelog
--- old/networkping/changelog 2012-02-14 20:01:19.000000000 +0100
+++ new/networkping/changelog 2014-08-16 00:11:33.000000000 +0200
@@ -1,3 +1,10 @@
+0.12-4 => 1.0-5
+* Poprawiony błąd odczytu konfiguracji hosta i portu.
+* Deaktywacja pół dla niewybranych opcji w konfiguracji pluginu.
+* Plugin dostosowany do Kadu 1.0.
+* Drobne zmiany dla C++11.
+
+
0.11-3 => 0.12-4
* Plugin dostosowany do Kadu 0.12.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkping/configuration/networkping.ui new/networkping/configuration/networkping.ui
--- old/networkping/configuration/networkping.ui 2011-05-18 09:20:42.000000000 +0200
+++ new/networkping/configuration/networkping.ui 2014-08-16 00:11:33.000000000 +0200
@@ -1,5 +1,5 @@
<configuration-ui>
- <section name="Kadu">
+ <section name="General">
<tab name="Advanced">
<group-box name="Network ping">
dataPath() + "plugins/configuration/networkping.ui" );
- kdebugf2();
- return 0;
-}
-
-
-void NetworkPing::done()
-{
- kdebugf();
- MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/networkping.ui" );
- kdebugf2();
-}
-
-
-NetworkPing::NetworkPing()
-{
+ MainConfigurationWindow::registerUiHandler( this );
// default configuration
createDefaultConfiguration();
// is online
isonline = NetworkManager::instance()->isOnline();
connect( NetworkManager::instance(), SIGNAL(offline()), this, SLOT(networkManagerOffline()) );
connect( NetworkManager::instance(), SIGNAL(online()) , this, SLOT(networkManagerOnline()) );
-
// PING
pingtimer = new QTimer( this );
connect( pingtimer, SIGNAL(timeout()), this, SLOT(ping()) );
@@ -67,22 +54,39 @@
// ping timeout timer
pingtimeouttimer = new QTimer( this );
connect( pingtimeouttimer, SIGNAL(timeout()), this, SLOT(processPing()) );
-
// CHECK IP
checkiptimer = new QTimer( this );
connect( checkiptimer, SIGNAL(timeout()), this, SLOT(checkIP()) );
// network access manager
networkaccessmanager = new QNetworkAccessManager( this );
- networkreply = NULL;
+ networkreply = nullptr;
// ping timeout timer
checkiptimeouttimer = new QTimer( this );
connect( checkiptimeouttimer, SIGNAL(timeout()), this, SLOT(processCheckIP()) );
-
// connect to NetworkManager
connect( this, SIGNAL(signalOffline()), NetworkManager::instance(), SIGNAL(offline()) );
connect( this, SIGNAL(signalOnline()) , NetworkManager::instance(), SIGNAL(online()) );
// update configuration and start timer(s)
configurationUpdated();
+ // done
+ kdebugf2();
+ return true;
+}
+
+
+void NetworkPing::done()
+{
+ kdebugf();
+ // unregister configuration
+ MainConfigurationWindow::unregisterUiHandler( this );
+ MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/networkping.ui" );
+ // done
+ kdebugf2();
+}
+
+
+NetworkPing::NetworkPing()
+{
}
@@ -91,6 +95,14 @@
}
+void NetworkPing::mainConfigurationWindowCreated( MainConfigurationWindow *mainConfigurationWindow )
+{
+ connect( mainConfigurationWindow->widget()->widgetById("networkPing/checkIp"), SIGNAL(toggled(bool)), mainConfigurationWindow->widget()->widgetById("networkPing/ipAddressChecker"), SLOT(setEnabled(bool)) );
+ connect( mainConfigurationWindow->widget()->widgetById("networkPing/checkIp"), SIGNAL(toggled(bool)), mainConfigurationWindow->widget()->widgetById("networkPing/checkIpInterval") , SLOT(setEnabled(bool)) );
+ connect( mainConfigurationWindow->widget()->widgetById("networkPing/checkIp"), SIGNAL(toggled(bool)), mainConfigurationWindow->widget()->widgetById("networkPing/checkIpTimeout") , SLOT(setEnabled(bool)) );
+}
+
+
void NetworkPing::createDefaultConfiguration()
{
config_file.addVariable( "NetworkPing", "PingInterval" , NETWORKPING_DEFAULT_PINGINTERVAL );
@@ -168,8 +180,8 @@
if( tcpsocket->state() != QAbstractSocket::UnconnectedState )
return;
resetPing();
- QString host = config_file.readEntry( "NetworkPing", "Host", NETWORKPING_DEFAULT_PINGHOST );
- int port = config_file.readNumEntry( "NetworkPing", "Port", NETWORKPING_DEFAULT_PINGPORT );
+ QString host = config_file.readEntry( "NetworkPing", "PingHost", NETWORKPING_DEFAULT_PINGHOST );
+ int port = config_file.readNumEntry( "NetworkPing", "PingPort", NETWORKPING_DEFAULT_PINGPORT );
tcpsocket->connectToHost( host, port );
pingtimeouttimer->start();
}
@@ -189,7 +201,7 @@
{
pingtimeouttimer->stop();
bool online = false;
- if( dynamic_cast( sender() ) != NULL )
+ if( dynamic_cast( sender() ) != nullptr )
online = false;
else if( tcpsocket->state() == QAbstractSocket::ConnectedState )
online = true;
@@ -214,7 +226,7 @@
return;
if( ! isonline )
return;
- if( ( networkreply != NULL ) && networkreply->isRunning() )
+ if( ( networkreply != nullptr ) && networkreply->isRunning() )
return;
QString url = config_file.readEntry( "NetworkPing", "IPAddressChecker", NETWORKPING_DEFAULT_IPADDRESSCHECKER );
networkreply = networkaccessmanager->get( QNetworkRequest( QUrl( url ) ) );
@@ -226,11 +238,11 @@
{
checkiptimeouttimer->stop();
networkaccessmanager->disconnect();
- if( networkreply != NULL )
+ if( networkreply != nullptr )
{
networkreply->abort();
networkreply->deleteLater();
- networkreply = NULL;
+ networkreply = nullptr;
}
connect( networkaccessmanager, SIGNAL(finished(QNetworkReply*)), this, SLOT(processCheckIP()) );
}
@@ -240,9 +252,9 @@
{
checkiptimeouttimer->stop();
QString ip;
- if( dynamic_cast( sender() ) == NULL )
+ if( dynamic_cast( sender() ) == nullptr )
{
- if( networkreply != NULL )
+ if( networkreply != nullptr )
{
if( networkreply->isFinished() )
{
@@ -271,4 +283,6 @@
+#include "moc_networkping.cpp"
+
Q_EXPORT_PLUGIN2( networkping, NetworkPing )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkping/networkping.desc new/networkping/networkping.desc
--- old/networkping/networkping.desc 2012-06-24 17:48:56.000000000 +0200
+++ new/networkping/networkping.desc 2014-08-16 00:11:33.000000000 +0200
@@ -11,4 +11,4 @@
Conflicts=
Replaces=
LoadByDefault=false
-Version=0.12-4
+Version=1.0-5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkping/networkping.h new/networkping/networkping.h
--- old/networkping/networkping.h 2011-10-02 15:48:14.000000000 +0200
+++ new/networkping/networkping.h 2014-08-16 00:11:33.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* NetworkPing plugin for Kadu *
-* Copyright (C) 2011 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2011-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -33,26 +33,28 @@
#define NETWORKPING_DEFAULT_IPADDRESSCHECKER "http://checkip.dyndns.com/"
-#include <QObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QTcpSocket>
#include <QTimer>
#include "configuration/configuration-aware-object.h"
+#include "gui/windows/main-configuration-window.h"
#include "network/network-manager.h"
-#include "plugins/generic-plugin.h"
+#include "plugin/plugin-root-component.h"
-class NetworkPing : public QObject, public ConfigurationAwareObject, public GenericPlugin
+class NetworkPing : public ConfigurationUiHandler, public ConfigurationAwareObject, public PluginRootComponent
{
Q_OBJECT
- Q_INTERFACES( GenericPlugin )
+ Q_INTERFACES( PluginRootComponent )
+ Q_PLUGIN_METADATA( IID "im.kadu.PluginRootComponent" )
public:
- virtual int init( bool firstLoad );
+ virtual bool init( bool firstLoad );
virtual void done();
NetworkPing();
~NetworkPing();
+ virtual void mainConfigurationWindowCreated( MainConfigurationWindow *mainConfigurationWindow );
signals:
void signalOffline();
void signalOnline();
++++++ nextinfo-0.12-9.tar.gz -> nextinfo-1.0-10.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/CMakeLists.txt new/nextinfo/CMakeLists.txt
--- old/nextinfo/CMakeLists.txt 2012-06-09 19:23:55.000000000 +0200
+++ new/nextinfo/CMakeLists.txt 2014-08-16 00:11:44.000000000 +0200
@@ -1,33 +1,17 @@
project( nextinfo )
cmake_minimum_required( VERSION 2.8 )
-set( QT_MIN_VERSION "4.7.0" )
-set( CMAKE_MIN_VERSION "2.8.0" )
+set( QT_MIN_VERSION "4.8.0" )
-set( KADU_FIND_REQUIRED true )
-include( FindKadu )
-
-include_directories( ${KADU_INCLUDE_DIR} )
-include_directories( ${KADU_INCLUDE_DIR}/kadu-core )
+find_package( Kadu REQUIRED CONFIG )
set( SOURCES
nextinfo.cpp
buddynextinfodata.cpp
- extendedinformationwidgets.cpp
- photowidget.cpp
-)
-
-set( MOC_SOURCES
- nextinfo.h
- extendedinformationwidgets.h
- photowidget.h
-)
-
-set( TRANSLATION_SOURCES
- translations/nextinfo_en.ts
- translations/nextinfo_cs.ts
- translations/nextinfo_fr.ts
- translations/nextinfo_pl.ts
+ extendedinformationwidget.cpp
+ extendedinformationwidgetfactory.cpp
+ noteswidget.cpp
+ noteswidgetfactory.cpp
)
set( CONFIGURATION_FILES
@@ -39,9 +23,6 @@
kadu_plugin( nextinfo
PLUGIN_SOURCES ${SOURCES}
- PLUGIN_MOC_SOURCES ${MOC_SOURCES}
- PLUGIN_TRANSLATION_SOURCES ${TRANSLATION_SOURCES}
PLUGIN_CONFIGURATION_FILES ${CONFIGURATION_FILES}
+ PLUGIN_LIBRARIES ${QT_QTSCRIPT_LIBRARY}
)
-
-target_link_libraries( nextinfo ${QT_QTSCRIPT_LIBRARY} )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/changelog new/nextinfo/changelog
--- old/nextinfo/changelog 2012-06-09 19:32:07.000000000 +0200
+++ new/nextinfo/changelog 2014-08-16 00:11:44.000000000 +0200
@@ -1,3 +1,8 @@
+0.12-9 => 1.0-10
+* Plugin dostosowany do Kadu 1.0.
+* Drobne zmiany dla C++11.
+
+
0.11-8 => 0.12-9
* Dodane pole Drugie Imię.
* Dodanie tłumaczenia na język francuski (Stéphane 'LkpPo' Aulery).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/configuration/nextinfo.ui new/nextinfo/configuration/nextinfo.ui
--- old/nextinfo/configuration/nextinfo.ui 2011-06-03 17:35:23.000000000 +0200
+++ new/nextinfo/configuration/nextinfo.ui 2014-08-16 00:11:44.000000000 +0200
@@ -1,5 +1,5 @@
<configuration-ui>
- <section name="Buddies">
+ <section name="Buddies list">
<tab name="Extended information">
<group-box name="Notifications">
<check-box caption="Enable notifications" config-section="NExtInfo" config-item="EnableNotifications" id="nextinfo/enableNotifications" />
@@ -14,7 +14,6 @@
<group-box name="Data">
<action-button caption="Import data from ext_info module" id="nextinfo/importDataFromExtInfo" />
</group-box>
-
</tab>
</section>
</configuration-ui>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/extendedinformationwidget.cpp new/nextinfo/extendedinformationwidget.cpp
--- old/nextinfo/extendedinformationwidget.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/nextinfo/extendedinformationwidget.cpp 2014-08-16 00:11:44.000000000 +0200
@@ -0,0 +1,413 @@
+/****************************************************************************
+* *
+* NExtInfo plugin for Kadu *
+* Copyright (C) 2014 Piotr Dąbrowski ultr@ultr.pl *
+* *
+* 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 3 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 "extendedinformationwidget.h"
+
+#include <QCoreApplication>
+
+#include "buddynextinfodata.h"
+
+
+
+
+ExtendedInformationWidget::ExtendedInformationWidget(const Buddy &buddy, QWidget *parent) :
+ BuddyConfigurationWidget( buddy, parent ),
+ StateNotifier( new SimpleConfigurationValueStateNotifier( this ) )
+{
+ setWindowTitle( tr( "Extended Information" ) );
+ createGui();
+ configurationUpdated();
+ loadValues();
+}
+
+
+ExtendedInformationWidget::~ExtendedInformationWidget()
+{
+}
+
+
+void ExtendedInformationWidget::createGui()
+{
+ layout_extinfotab = new QVBoxLayout( this );
+ layout_extinfotab->setMargin( 5 );
+ layout_extinfotab->setSpacing( 3 );
+
+ extinfotab_separator1 = new QWidget( this );
+ extinfotab_separator1->setMinimumHeight( NEXTINFO_FIELDSEPARATORSHEIGHT );
+ extinfotab_separator1->resize( 1, NEXTINFO_FIELDSEPARATORSHEIGHT );
+ layout_extinfotab->addWidget( extinfotab_separator1 );
+
+ layout_firstname = new QHBoxLayout( 0 );
+ layout_firstname->setMargin( 0 );
+ layout_firstname->setSpacing( 6 );
+ label_firstname = new QLabel( this );
+ label_firstname->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::AlignVCenter | Qt::AlignVCenter );
+ layout_firstname->addWidget( label_firstname );
+ field_firstname = new QLineEdit( this );
+ layout_firstname->addWidget( field_firstname );
+ layout_extinfotab->addLayout( layout_firstname );
+ layout_middlename = new QHBoxLayout( 0 );
+ layout_middlename->setMargin( 0 );
+ layout_middlename->setSpacing( 6 );
+ label_middlename = new QLabel( this );
+ label_middlename->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_middlename->addWidget( label_middlename );
+ field_middlename = new QLineEdit( this );
+ layout_middlename->addWidget( field_middlename );
+ layout_extinfotab->addLayout( layout_middlename );
+ layout_lastname = new QHBoxLayout( 0 );
+ layout_lastname->setMargin( 0 );
+ layout_lastname->setSpacing( 6 );
+ label_lastname = new QLabel( this );
+ label_lastname->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_lastname->addWidget( label_lastname );
+ field_lastname = new QLineEdit( this );
+ layout_lastname->addWidget( field_lastname );
+ layout_extinfotab->addLayout( layout_lastname );
+ layout_nickname = new QHBoxLayout( 0 );
+ layout_nickname->setMargin( 0 );
+ layout_nickname->setSpacing( 6 );
+ label_nickname = new QLabel( this );
+ label_nickname->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_nickname->addWidget( label_nickname );
+ field_nickname = new QLineEdit( this );
+ layout_nickname->addWidget( field_nickname );
+ layout_extinfotab->addLayout( layout_nickname );
+
+ extinfotab_separator2 = new QWidget( this );
+ extinfotab_separator2->setMinimumHeight( NEXTINFO_FIELDSEPARATORSHEIGHT );
+ extinfotab_separator2->resize( 1, NEXTINFO_FIELDSEPARATORSHEIGHT );
+ layout_extinfotab->addWidget( extinfotab_separator2 );
+
+ layout_gender = new QHBoxLayout( 0 );
+ layout_gender->setMargin( 0 );
+ layout_gender->setSpacing( 6 );
+ label_gender = new QLabel( this );
+ label_gender->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_gender->addWidget( label_gender );
+ field_gender = new QComboBox( this );
+ field_gender->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+ layout_gender->addWidget( field_gender );
+ layout_extinfotab->addLayout( layout_gender );
+
+ extinfotab_separator3 = new QWidget( this );
+ extinfotab_separator3->setMinimumHeight( NEXTINFO_FIELDSEPARATORSHEIGHT );
+ extinfotab_separator3->resize( 1, NEXTINFO_FIELDSEPARATORSHEIGHT );
+ layout_extinfotab->addWidget( extinfotab_separator3 );
+
+ layout_address = new QHBoxLayout( 0 );
+ layout_address->setMargin( 0 );
+ layout_address->setSpacing( 6 );
+ label_address = new QLabel( this );
+ label_address->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_address->addWidget( label_address );
+ field_address = new QLineEdit( this );
+ layout_address->addWidget( field_address );
+ layout_extinfotab->addLayout( layout_address );
+ layout_city = new QHBoxLayout( 0 );
+ layout_city->setMargin( 0 );
+ layout_city->setSpacing( 6 );
+ label_city = new QLabel( this );
+ label_city->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_city->addWidget( label_city );
+ field_city = new QLineEdit( this );
+ layout_city->addWidget( field_city );
+ layout_extinfotab->addLayout( layout_city );
+
+ extinfotab_separator4 = new QWidget( this );
+ extinfotab_separator4->setMinimumHeight( NEXTINFO_FIELDSEPARATORSHEIGHT );
+ extinfotab_separator4->resize( 1, NEXTINFO_FIELDSEPARATORSHEIGHT );
+ layout_extinfotab->addWidget( extinfotab_separator4 );
+
+ layout_phone = new QHBoxLayout( 0 );
+ layout_phone->setMargin( 0 );
+ layout_phone->setSpacing( 6 );
+ label_phone = new QLabel( this );
+ label_phone->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_phone->addWidget( label_phone );
+ field_phone = new QLineEdit( this );
+ layout_phone->addWidget( field_phone );
+ layout_extinfotab->addLayout( layout_phone );
+ layout_mobile = new QHBoxLayout( 0 );
+ layout_mobile->setMargin( 0 );
+ layout_mobile->setSpacing( 6 );
+ label_mobile = new QLabel( this );
+ label_mobile->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_mobile->addWidget( label_mobile );
+ field_mobile = new QLineEdit( this );
+ layout_mobile->addWidget( field_mobile );
+ layout_extinfotab->addLayout( layout_mobile );
+
+ extinfotab_separator5 = new QWidget( this );
+ extinfotab_separator5->setMinimumHeight( NEXTINFO_FIELDSEPARATORSHEIGHT );
+ extinfotab_separator5->resize( 1, NEXTINFO_FIELDSEPARATORSHEIGHT );
+ layout_extinfotab->addWidget( extinfotab_separator5 );
+
+ layout_email = new QHBoxLayout( 0 );
+ layout_email->setMargin( 0 );
+ layout_email->setSpacing( 6 );
+ label_email = new QLabel( this );
+ label_email->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_email->addWidget( label_email );
+ field_email = new QLineEdit( this );
+ layout_email->addWidget( field_email );
+ layout_extinfotab->addLayout( layout_email );
+ layout_email2 = new QHBoxLayout( 0 );
+ layout_email2->setMargin( 0 );
+ layout_email2->setSpacing( 6 );
+ label_email2 = new QLabel( this );
+ label_email2->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_email2->addWidget( label_email2 );
+ field_email2 = new QLineEdit( this );
+ layout_email2->addWidget( field_email2 );
+ layout_extinfotab->addLayout( layout_email2 );
+ layout_www = new QHBoxLayout( 0 );
+ layout_www->setMargin( 0 );
+ layout_www->setSpacing( 6 );
+ label_www = new QLabel( this );
+ label_www->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_www->addWidget( label_www );
+ field_www = new QLineEdit( this );
+ layout_www->addWidget( field_www );
+ layout_extinfotab->addLayout( layout_www );
+
+ extinfotab_separator6 = new QWidget( this );
+ extinfotab_separator6->setMinimumHeight( NEXTINFO_FIELDSEPARATORSHEIGHT );
+ extinfotab_separator6->resize( 1, NEXTINFO_FIELDSEPARATORSHEIGHT );
+ layout_extinfotab->addWidget( extinfotab_separator6 );
+
+ layout_birthday = new QHBoxLayout( 0 );
+ layout_birthday->setMargin( 0 );
+ layout_birthday->setSpacing( 6 );
+ label_birthday = new QLabel( this );
+ label_birthday->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_birthday->addWidget( label_birthday );
+ field_birthday = new QLineEdit( this );
+ layout_birthday->addWidget( field_birthday );
+ layout_extinfotab->addLayout( layout_birthday );
+ layout_nameday = new QHBoxLayout( 0 );
+ layout_nameday->setMargin( 0 );
+ layout_nameday->setSpacing( 6 );
+ label_nameday = new QLabel( this );
+ label_nameday->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ layout_nameday->addWidget( label_nameday );
+ field_nameday = new QLineEdit( this );
+ layout_nameday->addWidget( field_nameday );
+ layout_extinfotab->addLayout( layout_nameday );
+
+ extinfotab_separator7 = new QWidget( this );
+ extinfotab_separator7->setMinimumHeight( NEXTINFO_FIELDSEPARATORSHEIGHT );
+ extinfotab_separator7->resize( 1, NEXTINFO_FIELDSEPARATORSHEIGHT );
+ layout_extinfotab->addWidget( extinfotab_separator7 );
+
+ extinfotab_spacer = new QSpacerItem( 20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ layout_extinfotab->addItem( extinfotab_spacer );
+
+ updateWidgets();
+}
+
+
+void ExtendedInformationWidget::updateWidgets()
+{
+ // labels: set texts
+ label_firstname->setText( QCoreApplication::translate( "@nextinfo", "First name" ) + ":" );
+ label_middlename->setText( QCoreApplication::translate( "@nextinfo", "Middle name" ) + ":" );
+ label_lastname->setText( QCoreApplication::translate( "@nextinfo", "Last name" ) + ":" );
+ label_nickname->setText( QCoreApplication::translate( "@nextinfo", "Nickname" ) + ":" );
+ label_gender->setText( QCoreApplication::translate( "@nextinfo", "Gender" ) + ":" );
+ label_address->setText( QCoreApplication::translate( "@nextinfo", "Address" ) + ":" );
+ label_city->setText( QCoreApplication::translate( "@nextinfo", "City" ) + ":" );
+ label_phone->setText( QCoreApplication::translate( "@nextinfo", "Phone" ) + ":" );
+ label_mobile->setText( QCoreApplication::translate( "@nextinfo", "Mobile" ) + ":" );
+ label_email->setText( QCoreApplication::translate( "@nextinfo", "e-mail" ) + ":" );
+ label_email2->setText( QCoreApplication::translate( "@nextinfo", "Alternative e-mail" ) + ":" );
+ label_www->setText( QCoreApplication::translate( "@nextinfo", "Website" ) + ":" );
+ label_birthday->setText( QCoreApplication::translate( "@nextinfo", "Birthday (DD.MM.YYYY)" ) + ":" );
+ label_nameday->setText( QCoreApplication::translate( "@nextinfo", "Name-day (DD.MM)" ) + ":" );
+ // set gender combobox items
+ field_gender->addItem( "" , 0 );
+ field_gender->addItem( QCoreApplication::translate( "@nextinfo", "female" ), 1 );
+ field_gender->addItem( QCoreApplication::translate( "@nextinfo", "male" ), 2 );
+ // labels: set new sizes
+ label_firstname->adjustSize();
+ label_middlename->adjustSize();
+ label_lastname->adjustSize();
+ label_nickname->adjustSize();
+ label_gender->adjustSize();
+ label_address->adjustSize();
+ label_city->adjustSize();
+ label_phone->adjustSize();
+ label_mobile->adjustSize();
+ label_email->adjustSize();
+ label_email2->adjustSize();
+ label_www->adjustSize();
+ label_birthday->adjustSize();
+ label_nameday->adjustSize();
+ // labels: get maximum width
+ int labels_width = 1; // px
+ if( label_firstname->width() > labels_width ) { labels_width = label_firstname->width(); }
+ if( label_middlename->width() > labels_width ) { labels_width = label_middlename->width(); }
+ if( label_lastname->width() > labels_width ) { labels_width = label_lastname->width(); }
+ if( label_nickname->width() > labels_width ) { labels_width = label_nickname->width(); }
+ if( label_gender->width() > labels_width ) { labels_width = label_gender->width(); }
+ if( label_address->width() > labels_width ) { labels_width = label_address->width(); }
+ if( label_city->width() > labels_width ) { labels_width = label_city->width(); }
+ if( label_phone->width() > labels_width ) { labels_width = label_phone->width(); }
+ if( label_mobile->width() > labels_width ) { labels_width = label_mobile->width(); }
+ if( label_email->width() > labels_width ) { labels_width = label_email->width(); }
+ if( label_email2->width() > labels_width ) { labels_width = label_email2->width(); }
+ if( label_www->width() > labels_width ) { labels_width = label_www->width(); }
+ if( label_birthday->width() > labels_width ) { labels_width = label_birthday->width(); }
+ if( label_nameday->width() > labels_width ) { labels_width = label_nameday->width(); }
+ // labels: set width of each label to the maximum width
+ label_firstname->setMinimumWidth( labels_width );
+ label_middlename->setMinimumWidth( labels_width );
+ label_lastname->setMinimumWidth( labels_width );
+ label_nickname->setMinimumWidth( labels_width );
+ label_gender->setMinimumWidth( labels_width );
+ label_address->setMinimumWidth( labels_width );
+ label_city->setMinimumWidth( labels_width );
+ label_phone->setMinimumWidth( labels_width );
+ label_mobile->setMinimumWidth( labels_width );
+ label_email->setMinimumWidth( labels_width );
+ label_email2->setMinimumWidth( labels_width );
+ label_www->setMinimumWidth( labels_width );
+ label_birthday->setMinimumWidth( labels_width );
+ label_nameday->setMinimumWidth( labels_width );
+ // labels: update labels' geometry
+ label_firstname->updateGeometry();
+ label_middlename->updateGeometry();
+ label_lastname->updateGeometry();
+ label_nickname->updateGeometry();
+ label_gender->updateGeometry();
+ label_address->updateGeometry();
+ label_city->updateGeometry();
+ label_phone->updateGeometry();
+ label_mobile->updateGeometry();
+ label_email->updateGeometry();
+ label_email2->updateGeometry();
+ label_www->updateGeometry();
+ label_birthday->updateGeometry();
+ label_nameday->updateGeometry();
+ // read only
+ QFont labelfont = label_phone->font();
+ labelfont.setItalic( true );
+ QFont fieldfont = field_phone->font();
+ fieldfont.setItalic( true );
+ field_phone->setReadOnly( true );
+ field_phone->setFont( fieldfont );
+ label_phone->setFont( labelfont );
+ field_mobile->setReadOnly( true );
+ field_mobile->setFont( fieldfont );
+ label_mobile->setFont( labelfont );
+ field_email->setReadOnly( true );
+ field_email->setFont( fieldfont );
+ label_email->setFont( labelfont );
+ field_www->setReadOnly( true );
+ field_www->setFont( fieldfont );
+ label_www->setFont( labelfont );
+}
+
+
+void ExtendedInformationWidget::configurationUpdated()
+{
+}
+
+
+void ExtendedInformationWidget::loadValues()
+{
+ // load standard information
+ field_firstname->setText( buddy().firstName() );
+ field_middlename->setText( BuddyNExtInfoData::middleName( buddy() ) );
+ field_lastname->setText( buddy().lastName() );
+ field_nickname->setText( buddy().nickName() );
+ // load standard read-only information
+ field_phone->setText( buddy().homePhone() );
+ field_mobile->setText( buddy().mobile() );
+ field_email->setText( buddy().email() );
+ field_www->setText( buddy().website() );
+ // load gender
+ field_gender->setCurrentIndex( buddy().gender() );
+ // load extended information
+ field_address->setText( BuddyNExtInfoData::address( buddy() ) );
+ field_city->setText( BuddyNExtInfoData::city( buddy() ) );
+ field_email2->setText( BuddyNExtInfoData::email2( buddy() ) );
+ field_birthday->setText( BuddyNExtInfoData::birthday( buddy() ) );
+ field_nameday->setText( BuddyNExtInfoData::nameday( buddy() ) );
+ // set state notifier
+ StateNotifier->setState(StateNotChanged);
+}
+
+
+void ExtendedInformationWidget::updateState()
+{
+ StateNotifier->setState( StateChangedDataValid );
+}
+
+
+const ConfigurationValueStateNotifier * ExtendedInformationWidget::stateNotifier() const
+{
+ return StateNotifier;
+}
+
+
+void ExtendedInformationWidget::apply()
+{
+ // check birthday format
+ if( ! field_birthday->text().contains( QRegExp( NEXTINFO_REGEXPBIRTHDAY ) ) ) // if bad format
+ field_birthday->setText( "" );
+ // check name-day format
+ if( ! field_nameday->text().contains( QRegExp( NEXTINFO_REGEXPNAMEDAY ) ) ) // if bad format
+ field_nameday->setText( "" );
+ // save standard information
+ buddy().setFirstName( field_firstname->text() );
+ buddy().setLastName( field_lastname->text() );
+ buddy().setNickName( field_nickname->text() );
+ // save gender
+ int gender = field_gender->currentIndex();
+ if( ( gender < 0 ) || ( gender > 2 ) )
+ gender = 0;
+ buddy().setGender( (BuddyGender)gender );
+ // save extended information
+ BuddyNExtInfoData::setMiddleName( buddy(), field_middlename->text() );
+ BuddyNExtInfoData::setAddress( buddy(), field_address->text() );
+ BuddyNExtInfoData::setCity( buddy(), field_city->text() );
+ BuddyNExtInfoData::setEmail2( buddy(), field_email2->text() );
+ BuddyNExtInfoData::setBirthday( buddy(), field_birthday->text() );
+ BuddyNExtInfoData::setNameday( buddy(), field_nameday->text() );
+ // set state notifier
+ StateNotifier->setState(StateNotChanged);
+ // reload values later (ex. to update standard information)
+ QMetaObject::invokeMethod( this, "loadValues", Qt::QueuedConnection );
+}
+
+
+void ExtendedInformationWidget::cancel()
+{
+ loadValues();
+}
+
+
+
+
+#include "moc_extendedinformationwidget.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/extendedinformationwidget.h new/nextinfo/extendedinformationwidget.h
--- old/nextinfo/extendedinformationwidget.h 1970-01-01 01:00:00.000000000 +0100
+++ new/nextinfo/extendedinformationwidget.h 2014-08-16 00:11:44.000000000 +0200
@@ -0,0 +1,92 @@
+/****************************************************************************
+* *
+* NExtInfo plugin for Kadu *
+* Copyright (C) 2014 Piotr Dąbrowski ultr@ultr.pl *
+* *
+* 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 3 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/. *
+* *
+****************************************************************************/
+
+
+#ifndef EXTENDED_INFORMATION_WIDGET_H
+ #define EXTENDED_INFORMATION_WIDGET_H
+
+
+#undef None
+
+#include <QComboBox>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QObject>
+#include <QPointer>
+#include <QPushButton>
+#include <QScrollArea>
+#include <QTabWidget>
+#include <QTextEdit>
+#include <QVariant>
+#include <QWidget>
+
+#include "configuration/configuration-aware-object.h"
+#include "gui/widgets/buddy-configuration-widget.h"
+#include "gui/widgets/simple-configuration-value-state-notifier.h"
+
+#include "defines.h"
+
+
+class ExtendedInformationWidget : public BuddyConfigurationWidget, ConfigurationAwareObject
+{
+ Q_OBJECT
+ public:
+ explicit ExtendedInformationWidget(const Buddy &buddy, QWidget *parent = nullptr);
+ virtual ~ExtendedInformationWidget();
+ virtual const ConfigurationValueStateNotifier *stateNotifier() const;
+ virtual void apply();
+ virtual void cancel();
+ protected:
+ virtual void configurationUpdated();
+ private slots:
+ void updateState();
+ void updateWidgets();
+ void loadValues();
+ private:
+ SimpleConfigurationValueStateNotifier *StateNotifier;
+ void createGui();
+ QVBoxLayout* layout_extinfotab;
+ QWidget* extinfotab_separator1;
+ QHBoxLayout* layout_firstname; QLabel* label_firstname; QLineEdit* field_firstname;
+ QHBoxLayout* layout_middlename; QLabel* label_middlename; QLineEdit* field_middlename;
+ QHBoxLayout* layout_lastname; QLabel* label_lastname; QLineEdit* field_lastname;
+ QHBoxLayout* layout_nickname; QLabel* label_nickname; QLineEdit* field_nickname;
+ QWidget* extinfotab_separator2;
+ QHBoxLayout* layout_gender; QLabel* label_gender; QComboBox* field_gender;
+ QWidget* extinfotab_separator3;
+ QHBoxLayout* layout_address; QLabel* label_address; QLineEdit* field_address;
+ QHBoxLayout* layout_city; QLabel* label_city; QLineEdit* field_city;
+ QWidget* extinfotab_separator4;
+ QHBoxLayout* layout_phone; QLabel* label_phone; QLineEdit* field_phone;
+ QHBoxLayout* layout_mobile; QLabel* label_mobile; QLineEdit* field_mobile;
+ QWidget* extinfotab_separator5;
+ QHBoxLayout* layout_email; QLabel* label_email; QLineEdit* field_email;
+ QHBoxLayout* layout_email2; QLabel* label_email2; QLineEdit* field_email2;
+ QHBoxLayout* layout_www; QLabel* label_www; QLineEdit* field_www;
+ QWidget* extinfotab_separator6;
+ QHBoxLayout* layout_birthday; QLabel* label_birthday; QLineEdit* field_birthday;
+ QHBoxLayout* layout_nameday; QLabel* label_nameday; QLineEdit* field_nameday;
+ QWidget* extinfotab_separator7;
+ QSpacerItem* extinfotab_spacer;
+};
+
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/extendedinformationwidgetfactory.cpp new/nextinfo/extendedinformationwidgetfactory.cpp
--- old/nextinfo/extendedinformationwidgetfactory.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/nextinfo/extendedinformationwidgetfactory.cpp 2014-08-16 00:11:44.000000000 +0200
@@ -0,0 +1,39 @@
+/****************************************************************************
+* *
+* NExtInfo plugin for Kadu *
+* Copyright (C) 2014 Piotr Dąbrowski ultr@ultr.pl *
+* *
+* 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 3 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 "extendedinformationwidgetfactory.h"
+
+#include "extendedinformationwidget.h"
+
+
+
+
+ExtendedInformationWidgetFactory::~ExtendedInformationWidgetFactory()
+{
+}
+
+
+BuddyConfigurationWidget * ExtendedInformationWidgetFactory::createWidget(const Buddy &buddy, QWidget *parent)
+{
+ return new ExtendedInformationWidget(buddy, parent);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/extendedinformationwidgetfactory.h new/nextinfo/extendedinformationwidgetfactory.h
--- old/nextinfo/extendedinformationwidgetfactory.h 1970-01-01 01:00:00.000000000 +0100
+++ new/nextinfo/extendedinformationwidgetfactory.h 2014-08-16 00:11:44.000000000 +0200
@@ -0,0 +1,37 @@
+/****************************************************************************
+* *
+* NExtInfo plugin for Kadu *
+* Copyright (C) 2014 Piotr Dąbrowski ultr@ultr.pl *
+* *
+* 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 3 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/. *
+* *
+****************************************************************************/
+
+
+#ifndef EXTENDED_INFORMATION_WIDGET_FACTORY_H
+ #define EXTENDED_INFORMATION_WIDGET_FACTORY_H
+
+
+#include "gui/widgets/buddy-configuration-widget-factory.h"
+
+
+class ExtendedInformationWidgetFactory : public BuddyConfigurationWidgetFactory
+{
+ public:
+ virtual ~ExtendedInformationWidgetFactory();
+ virtual BuddyConfigurationWidget *createWidget(const Buddy &buddy, QWidget *parent);
+};
+
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/extendedinformationwidgets.cpp new/nextinfo/extendedinformationwidgets.cpp
--- old/nextinfo/extendedinformationwidgets.cpp 2012-06-09 19:20:38.000000000 +0200
+++ new/nextinfo/extendedinformationwidgets.cpp 2014-08-16 00:11:44.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* NExtInfo plugin for Kadu *
-* Copyright (C) 2008-2011 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -58,7 +58,7 @@
ExtendedInformationWidgets::ExtendedInformationWidgets( BuddyDataWindow* owner ) : QObject( owner )
{
- if( owner == NULL )
+ if( owner == nullptr )
{
deleteLater();
return;
@@ -299,7 +299,7 @@
ExtendedInformationWidgets::~ExtendedInformationWidgets()
{
BuddyDataWindow *buddydatawindow = dynamic_cast( parent() );
- if( buddydatawindow != NULL )
+ if( buddydatawindow != nullptr )
{
disconnect( buddydatawindow, SIGNAL(save()), this, SLOT(saveBuddy()) );
disconnect( buddydatawindow, SIGNAL(save()), this, SLOT(loadBuddy()) );
@@ -493,3 +493,8 @@
pw->setBuddy( buddy );
pw->show();
}
+
+
+
+
+#include "moc_extendedinformationwidgets.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/nextinfo.cpp new/nextinfo/nextinfo.cpp
--- old/nextinfo/nextinfo.cpp 2012-06-09 19:20:38.000000000 +0200
+++ new/nextinfo/nextinfo.cpp 2014-08-16 00:11:44.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* NExtInfo plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -43,11 +43,12 @@
#include "contacts/contact-manager.h"
#include "core/core.h"
#include "gui/actions/action.h"
+#include "gui/menu/menu-inventory.h"
+#include "gui/widgets/buddy-configuration-widget-factory-repository.h"
#include "gui/widgets/configuration/configuration-widget.h"
#include "gui/windows/kadu-window.h"
-#include "gui/widgets/talkable-menu-manager.h"
#include "misc/kadu-paths.h"
-#include "notify/notification.h"
+#include "notify/notification/notification.h"
#include "notify/notification-manager.h"
#include "parser/parser.h"
#include "activate.h"
@@ -56,34 +57,18 @@
#include "nextinfo.h"
#include "buddynextinfodata.h"
-#include "extendedinformationwidgets.h"
#include "gettags.h"
-int NExtInfo::init( bool firstLoad )
+bool NExtInfo::init( bool firstLoad )
{
Q_UNUSED( firstLoad );
kdebugf();
+ // register configuration
MainConfigurationWindow::registerUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/nextinfo.ui" );
MainConfigurationWindow::registerUiHandler( this );
- kdebugf2();
- return 0;
-}
-
-
-void NExtInfo::done()
-{
- kdebugf();
- MainConfigurationWindow::unregisterUiHandler( this );
- MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/nextinfo.ui" );
- kdebugf2();
-}
-
-
-NExtInfo::NExtInfo()
-{
// data format and update
int dataformatversion = config_file.readNumEntry( "NExtInfo", "DataFormatVersion", 0 );
if( dataformatversion < NEXTINFO_DATAFORMATVERSION )
@@ -104,14 +89,14 @@
KaduIcon( "external_modules/nextinfo-birthday" ), qApp->translate( "@nextinfo", "Birthday notifications" ),
true, NExtInfo::updateActionBirthday
);
- TalkableMenuManager::instance()->addListActionDescription( actionbirthday, TalkableMenuItem::CategoryManagement, 200 );
+ MenuInventory::instance()->menu("buddy-list")->addAction( actionbirthday, KaduMenu::SectionActions, 200 );
connect( actionbirthday, SIGNAL(actionCreated(Action*)), this, SLOT(actionBirthdayCreated(Action*)) );
actionnameday = new ActionDescription(
this, ActionDescription::TypeUser, "nextinfo_namedayinform", this, SLOT(actionNamedayTriggered(QAction*,bool)),
KaduIcon( "external_modules/nextinfo-nameday" ), qApp->translate( "@nextinfo", "Name-day notifications" ),
true, NExtInfo::updateActionNameday
);
- TalkableMenuManager::instance()->addListActionDescription( actionnameday, TalkableMenuItem::CategoryManagement, 200 );
+ MenuInventory::instance()->menu("buddy-list")->addAction( actionnameday, KaduMenu::SectionActions, 200 );
connect( actionnameday, SIGNAL(actionCreated(Action*)), this, SLOT(actionNamedayCreated(Action*)) );
// register parser tags
Parser::registerTag( "nextinfo_middleName", getTag_middleName );
@@ -122,35 +107,44 @@
Parser::registerTag( "nextinfo_nameday" , getTag_nameday );
Parser::registerTag( "nextinfo_interests" , getTag_interests );
Parser::registerTag( "nextinfo_notes" , getTag_notes );
+ // register BuddyConfigurationWidgetFactor-ies
+ extendedinformationwidgetfactory = new ExtendedInformationWidgetFactory();
+ noteswidgetfactory = new NotesWidgetFactory();
+ Core::instance()->buddyConfigurationWidgetFactoryRepository()->registerFactory( extendedinformationwidgetfactory );
+ Core::instance()->buddyConfigurationWidgetFactoryRepository()->registerFactory( noteswidgetfactory );
// register the notification
notifyevent = new NotifyEvent( "NExtInfo", NotifyEvent::CallbackNotRequired, QT_TRANSLATE_NOOP( "@default", "Birthday/name-day notification" ) );
NotificationManager::instance()->registerNotifyEvent( notifyevent );
- // add widgets to already opened BuddyDataWindow-s
- triggerAllBuddyDataWindowsCreated();
// check birthdays and name-days at startup
QTimer::singleShot( NEXTINFO_INITIALNOTIFYBIRTHDAYNAMEDAYINTERVAL, this, SLOT(notifyBirthdayNameday()) );
// start the birthdaynamedaytimer timer
birthdaynamedaytimer->start( config_file.readNumEntry( "NExtInfo", "DelayBetweenNotifications" ) * 1000 );
+ // done
+ kdebugf2();
+ return true;
}
-NExtInfo::~NExtInfo()
+void NExtInfo::done()
{
+ kdebugf();
// stop the birthdaynamedaytimer timer
birthdaynamedaytimer->stop();
- // delete all instances of ExtendedInformationWidgets
- foreach( ExtendedInformationWidgets* widgets, ExtendedInformationWidgets::instances() )
- widgets->deleteLater();
// unregister the notification
NotificationManager::instance()->unregisterNotifyEvent( notifyevent );
delete notifyevent;
// remove NExtInfo actions from Talkable's context menu
disconnect( actionbirthday );
disconnect( actionnameday );
- TalkableMenuManager::instance()->removeListActionDescription( actionbirthday );
- TalkableMenuManager::instance()->removeListActionDescription( actionnameday );
+ MenuInventory::instance()->menu("buddy-list")->removeAction( actionbirthday );
+ MenuInventory::instance()->menu("buddy-list")->removeAction( actionnameday );
actionbirthday->deleteLater();
actionnameday->deleteLater();
+ // unregister BuddyConfigurationWidgetFactor-ies
+ Core::instance()->buddyConfigurationWidgetFactoryRepository()->unregisterFactory( extendedinformationwidgetfactory );
+ Core::instance()->buddyConfigurationWidgetFactoryRepository()->unregisterFactory( noteswidgetfactory );
+ delete extendedinformationwidgetfactory;
+ delete noteswidgetfactory;
// unregister parser tags
Parser::unregisterTag( "nextinfo_middleName");
Parser::unregisterTag( "nextinfo_address" );
@@ -160,6 +154,21 @@
Parser::unregisterTag( "nextinfo_nameday" );
Parser::unregisterTag( "nextinfo_interests" );
Parser::unregisterTag( "nextinfo_notes" );
+ // unregister configuration
+ MainConfigurationWindow::unregisterUiHandler( this );
+ MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/nextinfo.ui" );
+ // done
+ kdebugf2();
+}
+
+
+NExtInfo::NExtInfo()
+{
+}
+
+
+NExtInfo::~NExtInfo()
+{
}
@@ -409,7 +418,7 @@
void NExtInfo::updateActionBirthdayMenu( Action *action )
{
- if( action->menu() == NULL )
+ if( action->menu() == nullptr )
return ;
// buddy
Buddy buddy = action->context()->buddies().toBuddy();
@@ -429,7 +438,7 @@
void NExtInfo::updateActionNamedayMenu( Action *action )
{
- if( action->menu() == NULL )
+ if( action->menu() == nullptr )
return ;
// buddy
Buddy buddy = action->context()->buddies().toBuddy();
@@ -739,15 +748,11 @@
#endif
-void NExtInfo::buddyDataWindowCreated( BuddyDataWindow *buddydatawindow )
+BuddyConfigurationWidget *NExtInfo::createWidget( const Buddy &buddy, QWidget *parent )
{
- new ExtendedInformationWidgets( buddydatawindow );
-}
-
-
-void NExtInfo::buddyDataWindowDestroyed( BuddyDataWindow *buddydatawindow )
-{
- Q_UNUSED( buddydatawindow );
+ Q_UNUSED(buddy);
+ Q_UNUSED(parent);
+ return 0; /// new BuddyConfigurationWidget(); /// TODO
}
@@ -755,7 +760,7 @@
{
int imported = 0;
// QFileDialog
- QString extinfopath = QFileDialog::getOpenFileName( NULL, qApp->translate( "@nextinfo", "Select ext_info data file to import" ), QDir::homePath() );
+ QString extinfopath = QFileDialog::getOpenFileName( nullptr, qApp->translate( "@nextinfo", "Select ext_info data file to import" ), QDir::homePath() );
if( ! extinfopath.isNull() )
{
if( extinfopath != "" )
@@ -1124,4 +1129,6 @@
+#include "moc_nextinfo.cpp"
+
Q_EXPORT_PLUGIN2( nextinfo, NExtInfo )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/nextinfo.desc new/nextinfo/nextinfo.desc
--- old/nextinfo/nextinfo.desc 2012-06-24 17:48:58.000000000 +0200
+++ new/nextinfo/nextinfo.desc 2014-08-16 00:11:44.000000000 +0200
@@ -11,4 +11,4 @@
Conflicts=
Replaces=
LoadByDefault=false
-Version=0.12-9
+Version=1.0-10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/nextinfo.h new/nextinfo/nextinfo.h
--- old/nextinfo/nextinfo.h 2012-03-17 20:15:00.000000000 +0100
+++ new/nextinfo/nextinfo.h 2014-08-16 00:11:44.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* NExtInfo plugin for Kadu *
-* Copyright (C) 2008-2011 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -31,12 +31,14 @@
#include "buddies/buddy.h"
#include "configuration/configuration-aware-object.h"
#include "gui/actions/action-description.h"
-#include "gui/windows/buddy-data-window-aware-object.h"
+#include "gui/widgets/buddy-configuration-widget-factory.h"
#include "gui/windows/main-configuration-window.h"
#include "notify/notify-event.h"
-#include "plugins/generic-plugin.h"
+#include "plugin/plugin-root-component.h"
#include "defines.h"
+#include "extendedinformationwidgetfactory.h"
+#include "noteswidgetfactory.h"
enum RemindTime
@@ -48,12 +50,13 @@
};
-class NExtInfo : public ConfigurationUiHandler, public ConfigurationAwareObject, public BuddyDataWindowAwareObject, public GenericPlugin
+class NExtInfo : public ConfigurationUiHandler, public ConfigurationAwareObject, public BuddyConfigurationWidgetFactory, public PluginRootComponent
{
Q_OBJECT
- Q_INTERFACES( GenericPlugin )
+ Q_INTERFACES( PluginRootComponent )
+ Q_PLUGIN_METADATA( IID "im.kadu.PluginRootComponent" )
public:
- virtual int init( bool firstLoad );
+ virtual bool init( bool firstLoad );
virtual void done();
NExtInfo();
~NExtInfo();
@@ -68,6 +71,7 @@
static bool checkBirthdayRemind( Buddy buddy );
static bool checkNamedayRemind( Buddy buddy );
public:
+ virtual BuddyConfigurationWidget *createWidget( const Buddy &buddy, QWidget *parent );
virtual void mainConfigurationWindowCreated( MainConfigurationWindow *mainConfigurationWindow );
void updateActionsBirthday();
void updateActionsNameday();
@@ -88,8 +92,6 @@
void importDataFromExtInfo();
protected:
virtual void configurationUpdated();
- virtual void buddyDataWindowCreated( BuddyDataWindow *buddydatawindow );
- virtual void buddyDataWindowDestroyed( BuddyDataWindow *buddydatawindow );
private slots:
void notifyBirthdayNameday();
private:
@@ -98,6 +100,8 @@
void setNamedayRemind( Buddy buddy, RemindTime time );
void importOldData( int olddataformatversion );
QString ordinal( QString code, int n );
+ ExtendedInformationWidgetFactory *extendedinformationwidgetfactory;
+ NotesWidgetFactory *noteswidgetfactory;
ActionDescription *actionbirthday, *actionnameday;
QTimer *birthdaynamedaytimer;
ActionDescription *nextinfoaction;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/noteswidget.cpp new/nextinfo/noteswidget.cpp
--- old/nextinfo/noteswidget.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/nextinfo/noteswidget.cpp 2014-08-16 00:11:44.000000000 +0200
@@ -0,0 +1,142 @@
+/****************************************************************************
+* *
+* NExtInfo plugin for Kadu *
+* Copyright (C) 2014 Piotr Dąbrowski ultr@ultr.pl *
+* *
+* 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 3 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 "noteswidget.h"
+
+#include <QCoreApplication>
+
+#include "buddynextinfodata.h"
+
+
+
+
+NotesWidget::NotesWidget(const Buddy &buddy, QWidget *parent) :
+ BuddyConfigurationWidget( buddy, parent ),
+ StateNotifier( new SimpleConfigurationValueStateNotifier( this ) )
+{
+ setWindowTitle( tr( "Notes" ) );
+ createGui();
+ configurationUpdated();
+ loadValues();
+}
+
+
+NotesWidget::~NotesWidget()
+{
+}
+
+
+void NotesWidget::createGui()
+{
+ layout_notestab = new QVBoxLayout( this );
+ layout_notestab->setMargin( 5 );
+ layout_notestab->setSpacing( 3 );
+
+ notestab_separator1 = new QWidget( this );
+ notestab_separator1->setMinimumHeight( NEXTINFO_FIELDSEPARATORSHEIGHT );
+ notestab_separator1->resize( 1, NEXTINFO_FIELDSEPARATORSHEIGHT );
+ layout_notestab->addWidget( notestab_separator1 );
+
+ label_interests = new QLabel( this );
+ layout_notestab->addWidget( label_interests );
+ field_interests = new QTextEdit( this );
+ field_interests->setMaximumSize( QSize( 32767, NEXTINFO_FIELDINTERESTSHEIGHT ) );
+ field_interests->setTabChangesFocus( true );
+ layout_notestab->addWidget( field_interests );
+
+ notestab_separator2 = new QWidget( this );
+ notestab_separator2->setMinimumHeight( NEXTINFO_FIELDSEPARATORSHEIGHT );
+ notestab_separator2->resize( 1, NEXTINFO_FIELDSEPARATORSHEIGHT );
+ layout_notestab->addWidget( notestab_separator2 );
+
+ label_notes = new QLabel( this );
+ layout_notestab->addWidget( label_notes );
+ field_notes = new QTextEdit( this );
+ field_notes->setTabChangesFocus( true );
+ layout_notestab->addWidget( field_notes );
+
+ notestab_separator3 = new QWidget( this );
+ notestab_separator3->setMinimumHeight( NEXTINFO_FIELDSEPARATORSHEIGHT );
+ notestab_separator3->resize( 1, NEXTINFO_FIELDSEPARATORSHEIGHT );
+ layout_notestab->addWidget( notestab_separator3 );
+
+ updateWidgets();
+}
+
+
+void NotesWidget::updateWidgets()
+{
+ // notes
+ label_interests->setText( QCoreApplication::translate( "@nextinfo", "Interests" ) + ":" );
+ label_notes->setText( QCoreApplication::translate( "@nextinfo", "Notes" ) + ":" );
+}
+
+
+void NotesWidget::configurationUpdated()
+{
+}
+
+
+void NotesWidget::loadValues()
+{
+ // load extended information
+ field_interests->setText( BuddyNExtInfoData::interests( buddy() ) );
+ field_notes->setText( BuddyNExtInfoData::notes( buddy() ) );
+ // set state notifier
+ StateNotifier->setState(StateNotChanged);
+}
+
+
+void NotesWidget::updateState()
+{
+ StateNotifier->setState( StateChangedDataValid );
+}
+
+
+const ConfigurationValueStateNotifier * NotesWidget::stateNotifier() const
+{
+ return StateNotifier;
+}
+
+
+void NotesWidget::apply()
+{
+ // save extended information
+ BuddyNExtInfoData::setInterests( buddy(), field_interests->toPlainText() );
+ BuddyNExtInfoData::setNotes( buddy(), field_notes->toPlainText() );
+ // set state notifier
+ StateNotifier->setState(StateNotChanged);
+ // reload values later (ex. to update standard information)
+ QMetaObject::invokeMethod( this, "loadValues", Qt::QueuedConnection );
+}
+
+
+void NotesWidget::cancel()
+{
+ loadValues();
+}
+
+
+
+
+#include "moc_noteswidget.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/noteswidget.h new/nextinfo/noteswidget.h
--- old/nextinfo/noteswidget.h 1970-01-01 01:00:00.000000000 +0100
+++ new/nextinfo/noteswidget.h 2014-08-16 00:11:44.000000000 +0200
@@ -0,0 +1,75 @@
+/****************************************************************************
+* *
+* NExtInfo plugin for Kadu *
+* Copyright (C) 2014 Piotr Dąbrowski ultr@ultr.pl *
+* *
+* 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 3 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/. *
+* *
+****************************************************************************/
+
+
+#ifndef NOTES_WIDGET_H
+ #define NOTES_WIDGET_H
+
+
+#undef None
+
+#include <QComboBox>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QObject>
+#include <QPointer>
+#include <QPushButton>
+#include <QScrollArea>
+#include <QTabWidget>
+#include <QTextEdit>
+#include <QVariant>
+#include <QWidget>
+
+#include "configuration/configuration-aware-object.h"
+#include "gui/widgets/buddy-configuration-widget.h"
+#include "gui/widgets/simple-configuration-value-state-notifier.h"
+
+#include "defines.h"
+
+
+class NotesWidget : public BuddyConfigurationWidget, ConfigurationAwareObject
+{
+ Q_OBJECT
+ public:
+ explicit NotesWidget(const Buddy &buddy, QWidget *parent = nullptr);
+ virtual ~NotesWidget();
+ virtual const ConfigurationValueStateNotifier *stateNotifier() const;
+ virtual void apply();
+ virtual void cancel();
+ protected:
+ virtual void configurationUpdated();
+ private slots:
+ void updateState();
+ void updateWidgets();
+ void loadValues();
+ private:
+ SimpleConfigurationValueStateNotifier *StateNotifier;
+ void createGui();
+ QVBoxLayout* layout_notestab;
+ QWidget* notestab_separator1;
+ QLabel* label_interests; QTextEdit* field_interests;
+ QWidget* notestab_separator2;
+ QLabel* label_notes; QTextEdit* field_notes;
+ QWidget* notestab_separator3;
+};
+
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/noteswidgetfactory.cpp new/nextinfo/noteswidgetfactory.cpp
--- old/nextinfo/noteswidgetfactory.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/nextinfo/noteswidgetfactory.cpp 2014-08-16 00:11:44.000000000 +0200
@@ -0,0 +1,39 @@
+/****************************************************************************
+* *
+* NExtInfo plugin for Kadu *
+* Copyright (C) 2014 Piotr Dąbrowski ultr@ultr.pl *
+* *
+* 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 3 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 "noteswidgetfactory.h"
+
+#include "noteswidget.h"
+
+
+
+
+NotesWidgetFactory::~NotesWidgetFactory()
+{
+}
+
+
+BuddyConfigurationWidget * NotesWidgetFactory::createWidget(const Buddy &buddy, QWidget *parent)
+{
+ return new NotesWidget(buddy, parent);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/noteswidgetfactory.h new/nextinfo/noteswidgetfactory.h
--- old/nextinfo/noteswidgetfactory.h 1970-01-01 01:00:00.000000000 +0100
+++ new/nextinfo/noteswidgetfactory.h 2014-08-16 00:11:44.000000000 +0200
@@ -0,0 +1,37 @@
+/****************************************************************************
+* *
+* NExtInfo plugin for Kadu *
+* Copyright (C) 2014 Piotr Dąbrowski ultr@ultr.pl *
+* *
+* 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 3 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/. *
+* *
+****************************************************************************/
+
+
+#ifndef NOTES_WIDGET_FACTORY_H
+ #define NOTES_WIDGET_FACTORY_H
+
+
+#include "gui/widgets/buddy-configuration-widget-factory.h"
+
+
+class NotesWidgetFactory : public BuddyConfigurationWidgetFactory
+{
+ public:
+ virtual ~NotesWidgetFactory();
+ virtual BuddyConfigurationWidget *createWidget(const Buddy &buddy, QWidget *parent);
+};
+
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/photowidget.cpp new/nextinfo/photowidget.cpp
--- old/nextinfo/photowidget.cpp 2011-06-03 17:35:23.000000000 +0200
+++ new/nextinfo/photowidget.cpp 2014-08-16 00:11:44.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* NExtInfo plugin for Kadu *
-* Copyright (C) 2008-2011 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -66,3 +66,8 @@
photo.adjustSize();
return true;
}
+
+
+
+
+#include "moc_photowidget.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/translations/nextinfo_cs.ts new/nextinfo/translations/nextinfo_cs.ts
--- old/nextinfo/translations/nextinfo_cs.ts 2012-06-09 19:20:38.000000000 +0200
+++ new/nextinfo/translations/nextinfo_cs.ts 2014-08-16 00:11:44.000000000 +0200
@@ -320,7 +320,21 @@
</message>
<message>
<source>Middle name</source>
- <translation type="unfinished"></translation>
+ <translation>Druhé jméno</translation>
+ </message>
+</context>
+<context>
+ <name>ExtendedInformationWidget</name>
+ <message>
+ <source>Extended Information</source>
+ <translation>Rozšířené informace</translation>
+ </message>
+</context>
+<context>
+ <name>NotesWidget</name>
+ <message>
+ <source>Notes</source>
+ <translation>Poznámky</translation>
</message>
</context>
</TS>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/translations/nextinfo_en.ts new/nextinfo/translations/nextinfo_en.ts
--- old/nextinfo/translations/nextinfo_en.ts 2012-06-09 19:20:38.000000000 +0200
+++ new/nextinfo/translations/nextinfo_en.ts 2014-08-16 00:11:44.000000000 +0200
@@ -339,4 +339,18 @@
<translation>Middle name</translation>
</message>
</context>
+<context>
+ <name>ExtendedInformationWidget</name>
+ <message>
+ <source>Extended Information</source>
+ <translation>Extended information</translation>
+ </message>
+</context>
+<context>
+ <name>NotesWidget</name>
+ <message>
+ <source>Notes</source>
+ <translation>Notes</translation>
+ </message>
+</context>
</TS>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/translations/nextinfo_fr.ts new/nextinfo/translations/nextinfo_fr.ts
--- old/nextinfo/translations/nextinfo_fr.ts 2012-06-09 19:23:41.000000000 +0200
+++ new/nextinfo/translations/nextinfo_fr.ts 2014-08-16 00:11:44.000000000 +0200
@@ -327,4 +327,18 @@
<translation>Second nom</translation>
</message>
</context>
+<context>
+ <name>ExtendedInformationWidget</name>
+ <message>
+ <source>Extended Information</source>
+ <translation>Informations étendues</translation>
+ </message>
+</context>
+<context>
+ <name>NotesWidget</name>
+ <message>
+ <source>Notes</source>
+ <translation>Remarques</translation>
+ </message>
+</context>
</TS>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nextinfo/translations/nextinfo_pl.ts new/nextinfo/translations/nextinfo_pl.ts
--- old/nextinfo/translations/nextinfo_pl.ts 2012-06-09 19:20:38.000000000 +0200
+++ new/nextinfo/translations/nextinfo_pl.ts 2014-08-16 00:11:44.000000000 +0200
@@ -342,4 +342,18 @@
<translation>Drugie imię</translation>
</message>
</context>
+<context>
+ <name>ExtendedInformationWidget</name>
+ <message>
+ <source>Extended Information</source>
+ <translation>Rozszerzone informacje</translation>
+ </message>
+</context>
+<context>
+ <name>NotesWidget</name>
+ <message>
+ <source>Notes</source>
+ <translation>Notatki</translation>
+ </message>
+</context>
</TS>
++++++ panelkadu-0.12-10.tar.gz -> panelkadu-1.0-11.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/panelkadu/CMakeLists.txt new/panelkadu/CMakeLists.txt
--- old/panelkadu/CMakeLists.txt 2011-06-03 18:43:47.000000000 +0200
+++ new/panelkadu/CMakeLists.txt 2014-08-16 00:12:00.000000000 +0200
@@ -1,39 +1,27 @@
project( panelkadu )
cmake_minimum_required( VERSION 2.8 )
-set( QT_MIN_VERSION "4.7.0" )
-set( CMAKE_MIN_VERSION "2.8.0" )
+set( QT_MIN_VERSION "4.8.0" )
-set( KADU_FIND_REQUIRED true )
-include( FindKadu )
-
-include_directories( ${KADU_INCLUDE_DIR} )
-include_directories( ${KADU_INCLUDE_DIR}/kadu-core )
+find_package( Kadu REQUIRED CONFIG )
set( SOURCES
panelkadu.cpp
)
-set( MOC_SOURCES
- panelkadu.h
-)
-
-set( TRANSLATION_SOURCES
- translations/panelkadu_en.ts
- translations/panelkadu_cs.ts
- translations/panelkadu_es_ES.ts
- translations/panelkadu_pl.ts
-)
-
set( CONFIGURATION_FILES
configuration/panelkadu.ui
)
+include( FindPkgConfig )
+pkg_search_module (LIBX11 REQUIRED x11)
+include_directories( ${LIBX11_INCLUDE_DIRS} )
+link_directories( ${LIBX11_LIBRARY_DIRS} )
+
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing" )
kadu_plugin( panelkadu
PLUGIN_SOURCES ${SOURCES}
- PLUGIN_MOC_SOURCES ${MOC_SOURCES}
- PLUGIN_TRANSLATION_SOURCES ${TRANSLATION_SOURCES}
PLUGIN_CONFIGURATION_FILES ${CONFIGURATION_FILES}
+ PLUGIN_LIBRARIES ${LIBX11_LIBRARIES}
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/panelkadu/changelog new/panelkadu/changelog
--- old/panelkadu/changelog 2012-02-14 20:06:28.000000000 +0100
+++ new/panelkadu/changelog 2014-08-16 00:12:00.000000000 +0200
@@ -1,3 +1,10 @@
+0.12-10 => 1.0-11
+* Naprawiona animacja panelu przy prawej i dolnej krawędzi ekranu.
+* Zmiana nazwy karty w konfiguracji na 'Panel'.
+* Plugin dostosowany do Kadu 1.0.
+* Drobne zmiany dla C++11.
+
+
0.11-9 => 0.12-10
* Plugin dostosowany do Kadu 0.12.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/panelkadu/configuration/panelkadu.ui new/panelkadu/configuration/panelkadu.ui
--- old/panelkadu/configuration/panelkadu.ui 2011-06-03 17:35:47.000000000 +0200
+++ new/panelkadu/configuration/panelkadu.ui 2014-08-16 00:12:00.000000000 +0200
@@ -1,6 +1,6 @@
<configuration-ui>
<section name="Look">
- <tab name="PanelKadu">
+ <tab name="Panel">
<group-box name="Geometry">
<combo-box caption="Side" config-section="PanelKadu" config-item="Side" id="panelkadu/side">
<item value="0" caption="Right" />
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/panelkadu/panelkadu.cpp new/panelkadu/panelkadu.cpp
--- old/panelkadu/panelkadu.cpp 2012-02-16 23:11:41.000000000 +0100
+++ new/panelkadu/panelkadu.cpp 2014-08-16 00:12:00.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* PanelKadu plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -45,28 +45,13 @@
#include
-
-
-int PanelKadu::init( bool firstLoad )
+bool PanelKadu::init( bool firstLoad )
{
Q_UNUSED( firstLoad );
kdebugf();
+ // register configuration
MainConfigurationWindow::registerUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/panelkadu.ui" );
- kdebugf2();
- return 0;
-}
-
-
-void PanelKadu::done()
-{
- kdebugf();
- MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/panelkadu.ui" );
- kdebugf2();
-}
-
-
-PanelKadu::PanelKadu()
-{
+ MainConfigurationWindow::registerUiHandler( this );
// reparenting handling
connect( Core::instance()->kaduWindow(), SIGNAL(parentChanged(QWidget*)), this, SLOT(kaduParentChanged(QWidget*)) );
// configuration handling
@@ -75,11 +60,15 @@
oldGeometry = Core::instance()->kaduWindow()->window()->geometry();
// panelize
panelize( Core::instance()->kaduWindow()->window() );
+ // done
+ kdebugf2();
+ return true;
}
-PanelKadu::~PanelKadu()
+void PanelKadu::done()
{
+ kdebugf();
// remove reparenting handling
disconnect( Core::instance()->kaduWindow(), SIGNAL(parentChanged(QWidget*)), this, SLOT(kaduParentChanged(QWidget*)) );
// remove the event filter (just in case)
@@ -95,6 +84,21 @@
delete hidingTimer;
// depanelize
depanelize( Core::instance()->kaduWindow()->window() );
+ // unregister configuration
+ MainConfigurationWindow::unregisterUiHandler( this );
+ MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/panelkadu.ui" );
+ // done
+ kdebugf2();
+}
+
+
+PanelKadu::PanelKadu()
+{
+}
+
+
+PanelKadu::~PanelKadu()
+{
}
@@ -407,25 +411,23 @@
// set atom
Atom kdeslide = XInternAtom( QX11Info::display(), "_KDE_SLIDE", False );
QVarLengthArray data(2);
+ data[0] = 0;
switch( side )
{
case PANELKADU_SIDE_LEFT:
- data[0] = Core::instance()->kaduWindow()->window()->geometry().left();
- data[1] = 0;
- break;
+ data[1] = 0;
+ break;
case PANELKADU_SIDE_TOP:
- data[0] = Core::instance()->kaduWindow()->window()->geometry().top();
- data[1] = 1;
- break;
+ data[1] = 1;
+ break;
case PANELKADU_SIDE_RIGHT:
- data[0] = Core::instance()->kaduWindow()->window()->geometry().right();
- data[1] = 2;
- break;
+ data[1] = 2;
+ break;
case PANELKADU_SIDE_BOTTOM:
- data[0] = Core::instance()->kaduWindow()->window()->geometry().bottom();
- data[1] = 3;
+ data[1] = 3;
+ break;
default:
- break;
+ data[1] = -1;
}
if( isCompositingManagerRunning() )
XChangeProperty( QX11Info::display(), Core::instance()->kaduWindow()->window()->winId(), kdeslide, kdeslide, 32, PropModeReplace, reinterpret_cast(data.data()), data.size() );
@@ -446,7 +448,7 @@
void PanelKadu::kaduParentChanged( QWidget *oldParent )
{
- if( oldParent != NULL )
+ if( oldParent != nullptr )
depanelize( oldParent->window() );
else
depanelize( Core::instance()->kaduWindow() );
@@ -510,7 +512,7 @@
// restore window's decoration, revoke always-on-top and remove taskbar and pager skipping
window->setWindowFlags( window->windowFlags() & ~Qt::X11BypassWindowManagerHint & ~Qt::FramelessWindowHint & ~Qt::WindowStaysOnTopHint );
Atom win_state = XInternAtom( QX11Info::display(), "_NET_WM_STATE", False );
- XChangeProperty( QX11Info::display(), window->winId(), win_state, XA_ATOM, 32, PropModeReplace, NULL, 0 );
+ XChangeProperty( QX11Info::display(), window->winId(), win_state, XA_ATOM, 32, PropModeReplace, nullptr, 0 );
// change window type back to normal
Atom atomproperty = XInternAtom( QX11Info::display(), "_NET_WM_WINDOW_TYPE", False );
Atom atomvalue = XInternAtom( QX11Info::display(), "_NET_WM_WINDOW_TYPE_NORMAL", False );
@@ -549,4 +551,6 @@
+#include "moc_panelkadu.cpp"
+
Q_EXPORT_PLUGIN2( panelkadu, PanelKadu )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/panelkadu/panelkadu.desc new/panelkadu/panelkadu.desc
--- old/panelkadu/panelkadu.desc 2012-06-24 17:49:00.000000000 +0200
+++ new/panelkadu/panelkadu.desc 2014-08-16 00:12:00.000000000 +0200
@@ -11,4 +11,4 @@
Conflicts=
Replaces=
LoadByDefault=false
-Version=0.12-10
+Version=1.0-11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/panelkadu/panelkadu.h new/panelkadu/panelkadu.h
--- old/panelkadu/panelkadu.h 2011-10-02 15:50:27.000000000 +0200
+++ new/panelkadu/panelkadu.h 2014-08-16 00:12:00.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* PanelKadu plugin for Kadu *
-* Copyright (C) 2008-2011 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -28,7 +28,7 @@
#include "configuration/configuration-aware-object.h"
#include "gui/windows/main-configuration-window.h"
-#include "plugins/generic-plugin.h"
+#include "plugin/plugin-root-component.h"
#include "panelkadu.h"
@@ -55,16 +55,17 @@
};
-class PanelKadu : public ConfigurationUiHandler, public ConfigurationAwareObject, public GenericPlugin
+class PanelKadu : public ConfigurationUiHandler, public ConfigurationAwareObject, public PluginRootComponent
{
Q_OBJECT
- Q_INTERFACES( GenericPlugin )
+ Q_INTERFACES( PluginRootComponent )
+ Q_PLUGIN_METADATA( IID "im.kadu.PluginRootComponent" )
public:
- virtual int init( bool firstLoad );
+ virtual bool init( bool firstLoad );
virtual void done();
PanelKadu();
~PanelKadu();
- void mainConfigurationWindowCreated( MainConfigurationWindow *mainConfigurationWindow );
+ virtual void mainConfigurationWindowCreated( MainConfigurationWindow *mainConfigurationWindow );
static QWidget *topLevel();
protected:
void configurationUpdated();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/panelkadu/translations/panelkadu_cs.ts new/panelkadu/translations/panelkadu_cs.ts
--- old/panelkadu/translations/panelkadu_cs.ts 2011-07-07 18:16:48.000000000 +0200
+++ new/panelkadu/translations/panelkadu_cs.ts 2014-08-16 00:12:00.000000000 +0200
@@ -8,8 +8,8 @@
<translation>Vzhled</translation>
</message>
<message>
- <source>PanelKadu</source>
- <translation>Panel Kadu</translation>
+ <source>Panel</source>
+ <translation>Panel</translation>
</message>
<message>
<source>Geometry</source>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/panelkadu/translations/panelkadu_en.ts new/panelkadu/translations/panelkadu_en.ts
--- old/panelkadu/translations/panelkadu_en.ts 2011-07-07 18:16:48.000000000 +0200
+++ new/panelkadu/translations/panelkadu_en.ts 2014-08-16 00:12:00.000000000 +0200
@@ -8,8 +8,8 @@
<translation>Look</translation>
</message>
<message>
- <source>PanelKadu</source>
- <translation>PanelKadu</translation>
+ <source>Panel</source>
+ <translation>Panel</translation>
</message>
<message>
<source>Geometry</source>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/panelkadu/translations/panelkadu_es_ES.ts new/panelkadu/translations/panelkadu_es_ES.ts
--- old/panelkadu/translations/panelkadu_es_ES.ts 2011-07-07 18:16:48.000000000 +0200
+++ new/panelkadu/translations/panelkadu_es_ES.ts 2014-08-16 00:12:00.000000000 +0200
@@ -8,8 +8,8 @@
<translation>Aspecto</translation>
</message>
<message>
- <source>PanelKadu</source>
- <translation>PanelKadu</translation>
+ <source>Panel</source>
+ <translation>Panel</translation>
</message>
<message>
<source>Geometry</source>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/panelkadu/translations/panelkadu_pl.ts new/panelkadu/translations/panelkadu_pl.ts
--- old/panelkadu/translations/panelkadu_pl.ts 2011-07-07 18:16:48.000000000 +0200
+++ new/panelkadu/translations/panelkadu_pl.ts 2014-08-16 00:12:00.000000000 +0200
@@ -8,8 +8,8 @@
<translation>Wygląd</translation>
</message>
<message>
- <source>PanelKadu</source>
- <translation>PanelKadu</translation>
+ <source>Panel</source>
+ <translation>Panel</translation>
</message>
<message>
<source>Geometry</source>
++++++ senthistory-0.12-11.tar.gz -> senthistory-1.0-12.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/senthistory/CMakeLists.txt new/senthistory/CMakeLists.txt
--- old/senthistory/CMakeLists.txt 2011-06-03 18:45:11.000000000 +0200
+++ new/senthistory/CMakeLists.txt 2014-08-16 00:12:11.000000000 +0200
@@ -1,37 +1,19 @@
project( senthistory )
cmake_minimum_required( VERSION 2.8 )
-set( QT_MIN_VERSION "4.7.0" )
-set( CMAKE_MIN_VERSION "2.8.0" )
+set( QT_MIN_VERSION "4.8.0" )
-set( KADU_FIND_REQUIRED true )
-include( FindKadu )
-
-include_directories( ${KADU_INCLUDE_DIR} )
-include_directories( ${KADU_INCLUDE_DIR}/kadu-core )
+find_package( Kadu REQUIRED CONFIG )
set( SOURCES
senthistory.cpp
)
-set( MOC_SOURCES
- senthistory.h
-)
-
-set( TRANSLATION_SOURCES
- translations/senthistory_en.ts
- translations/senthistory_cs.ts
- translations/senthistory_pl.ts
- translations/senthistory_tr.ts
-)
-
set( CONFIGURATION_FILES
configuration/senthistory.ui
)
kadu_plugin( senthistory
PLUGIN_SOURCES ${SOURCES}
- PLUGIN_MOC_SOURCES ${MOC_SOURCES}
- PLUGIN_TRANSLATION_SOURCES ${TRANSLATION_SOURCES}
PLUGIN_CONFIGURATION_FILES ${CONFIGURATION_FILES}
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/senthistory/changelog new/senthistory/changelog
--- old/senthistory/changelog 2012-02-14 20:08:45.000000000 +0100
+++ new/senthistory/changelog 2014-08-16 00:12:11.000000000 +0200
@@ -1,3 +1,8 @@
+0.12-11 => 1.0-12
+* Plugin dostosowany do Kadu 1.0.
+* Drobne zmiany dla C++11.
+
+
0.11-10 => 0.12-11
* Plugin dostosowany do Kadu 0.12.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/senthistory/configuration/senthistory.ui new/senthistory/configuration/senthistory.ui
--- old/senthistory/configuration/senthistory.ui 2011-06-03 17:35:36.000000000 +0200
+++ new/senthistory/configuration/senthistory.ui 2014-08-16 00:12:11.000000000 +0200
@@ -1,6 +1,6 @@
<configuration-ui>
- <section name="Shortcuts">
- <tab name="Chat Window">
+ <section name="Behavior">
+ <tab name="Shortcuts">
<group-box name="Sent messages' history">
<hot-key-edit caption="Previous message" config-section="SentHistory" config-item="PreviousMessage" id="senthistory/previousMessage" />
<hot-key-edit caption="Next message" config-section="SentHistory" config-item="NextMessage" id="senthistory/nextMessage" />
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/senthistory/senthistory.cpp new/senthistory/senthistory.cpp
--- old/senthistory/senthistory.cpp 2012-02-16 23:15:26.000000000 +0100
+++ new/senthistory/senthistory.cpp 2014-08-16 00:12:11.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* SentHistory plugin for Kadu *
-* Copyright (C) 2008-2012 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -24,8 +24,9 @@
#include "chat/chat.h"
#include "chat/chat-manager.h"
#include "configuration/configuration-file.h"
+#include "core/core.h"
#include "gui/widgets/chat-edit-box.h"
-#include "gui/widgets/chat-widget-manager.h"
+#include "gui/widgets/chat-widget/chat-widget-repository.h"
#include "gui/windows/kadu-window.h"
#include "gui/windows/main-configuration-window.h"
#include "gui/hot-key.h"
@@ -38,20 +39,40 @@
-int SentHistory::init( bool firstLoad )
+bool SentHistory::init( bool firstLoad )
{
Q_UNUSED( firstLoad );
kdebugf();
+ // register configuration
MainConfigurationWindow::registerUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/senthistory.ui" );
+ // configuration handling
+ createDefaultConfiguration();
+ // read the configuration and force its usage
+ configurationUpdated();
+ // connect chat widgets events and handle opened ones
+ connect( Core::instance()->chatWidgetRepository(), SIGNAL(chatWidgetAdded(ChatWidget*)) , this, SLOT(chatWidgetAdded(ChatWidget*)) );
+ connect( Core::instance()->chatWidgetRepository(), SIGNAL(chatWidgetRemoved(ChatWidget*)), this, SLOT(chatWidgetRemoved(ChatWidget*)) );
+ for( ChatWidgetRepository::Iterator ichatwidget = Core::instance()->chatWidgetRepository()->begin();
+ ichatwidget != Core::instance()->chatWidgetRepository()->end();
+ ++ichatwidget
+ ) {
+ chatWidgetAdded( *ichatwidget );
+ }
+ // done
kdebugf2();
- return 0;
+ return true;
}
void SentHistory::done()
{
kdebugf();
+ // disconnect chat widgets events
+ disconnect( Core::instance()->chatWidgetRepository(), SIGNAL(chatWidgetAdded(ChatWidget*)) , this, SLOT(chatWidgetAdded(ChatWidget*)) );
+ disconnect( Core::instance()->chatWidgetRepository(), SIGNAL(chatWidgetRemoved(ChatWidget*)), this, SLOT(chatWidgetRemoved(ChatWidget*)) );
+ // unregister configuration
MainConfigurationWindow::unregisterUiFile( KaduPaths::instance()->dataPath() + "plugins/configuration/senthistory.ui" );
+ // done
kdebugf2();
}
@@ -61,23 +82,11 @@
SentHistory::SentHistory()
{
- // configuration handling
- createDefaultConfiguration();
- // read the configuration and force its usage
- configurationUpdated();
- // connect chat widgets events and handle opened ones
- connect( ChatWidgetManager::instance(), SIGNAL(chatWidgetCreated(ChatWidget*)) , this, SLOT(chatCreated(ChatWidget*)) );
- connect( ChatWidgetManager::instance(), SIGNAL(chatWidgetDestroying(ChatWidget*)), this, SLOT(chatDestroying(ChatWidget*)) );
- foreach( ChatWidget *chatwidget, ChatWidgetManager::instance()->chats() )
- chatCreated( chatwidget );
}
SentHistory::~SentHistory()
{
- // disconnect chat widgets events
- disconnect( ChatWidgetManager::instance(), SIGNAL(chatWidgetCreated(ChatWidget*)) , this, SLOT(chatCreated(ChatWidget*)) );
- disconnect( ChatWidgetManager::instance(), SIGNAL(chatWidgetDestroying(ChatWidget*)), this, SLOT(chatDestroying(ChatWidget*)) );
}
@@ -95,22 +104,28 @@
}
-void SentHistory::chatCreated( ChatWidget *chatwidget )
+void SentHistory::chatWidgetAdded( ChatWidget *chatwidget )
{
// connect new chat's events
connect( chatwidget , SIGNAL( messageSendRequested( ChatWidget* ) ) , this, SLOT( messageSendRequested( ChatWidget* ) ) );
connect( chatwidget->getChatEditBox(), SIGNAL( keyPressed( QKeyEvent*, CustomInput*, bool& ) ), this, SLOT( editKeyPressed( QKeyEvent*, CustomInput*, bool& ) ) );
Chat chat = chatwidget->chat();
if( ! messagen.contains( chat ) )
+ {
messagen[chat] = 0;
+ }
if( ! thischatonly.contains( chat ) )
+ {
thischatonly[chat] = true;
+ }
if( ! currentmessage.contains( chat ) )
+ {
currentmessage[chat] = QString();
+ }
}
-void SentHistory::chatDestroying( ChatWidget *chatwidget )
+void SentHistory::chatWidgetRemoved( ChatWidget *chatwidget )
{
// disconnect chat's events
disconnect( chatwidget , SIGNAL( messageSendRequested( ChatWidget* ) ) , this, SLOT( messageSendRequested( ChatWidget* ) ) );
@@ -149,7 +164,7 @@
{
Q_UNUSED( custominput );
ChatEditBox *chateditbox = dynamic_cast( sender() );
- if( chateditbox == NULL )
+ if( chateditbox == nullptr )
return;
ChatWidget *chatwidget = chateditbox->chatWidget();
Chat chat = chatwidget->chat();
@@ -157,9 +172,13 @@
if( HotKey::shortCut( e, "SentHistory", "PreviousMessage") )
{
if( messagen[chat] == 0 )
+ {
currentmessage[chat] = chatwidget->edit()->toHtml();
+ }
if( thischatonly[chat] == false )
+ {
messagen[chat] = 0; // start from the begining
+ }
thischatonly[chat] = true;
messagen[chat]++; // previous message ( 1 is first )
inputMessage( chatwidget );
@@ -168,8 +187,14 @@
}
if( HotKey::shortCut( e, "SentHistory", "NextMessage") )
{
+ if( messagen[chat] == 0 )
+ {
+ currentmessage[chat] = chatwidget->edit()->toHtml();
+ }
if( thischatonly[chat] == false )
+ {
messagen[chat] = 0; // start from the begining
+ }
thischatonly[chat] = true;
messagen[chat]--; // next message
inputMessage( chatwidget );
@@ -180,9 +205,13 @@
if( HotKey::shortCut( e, "SentHistory", "PreviousMessageFromAllChats") )
{
if( messagen[chat] == 0 )
+ {
currentmessage[chat] = chatwidget->edit()->toHtml();
+ }
if( thischatonly[chat] == true )
+ {
messagen[chat] = 0; // start from the begining
+ }
thischatonly[chat] = false;
messagen[chat]++; // previous message ( 1 is first )
inputMessage( chatwidget );
@@ -191,8 +220,14 @@
}
if( HotKey::shortCut( e, "SentHistory", "NextMessageFromAllChats") )
{
+ if( messagen[chat] == 0 )
+ {
+ currentmessage[chat] = chatwidget->edit()->toHtml();
+ }
if( thischatonly[chat] == true )
+ {
messagen[chat] = 0; // start from the begining
+ }
thischatonly[chat] = false;
messagen[chat]--; // next message
inputMessage( chatwidget );
@@ -255,4 +290,6 @@
+#include "moc_senthistory.cpp"
+
Q_EXPORT_PLUGIN2( senthistory, SentHistory )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/senthistory/senthistory.desc new/senthistory/senthistory.desc
--- old/senthistory/senthistory.desc 2012-06-24 17:49:02.000000000 +0200
+++ new/senthistory/senthistory.desc 2014-08-16 00:12:11.000000000 +0200
@@ -11,4 +11,4 @@
Conflicts=
Replaces=
LoadByDefault=false
-Version=0.12-11
+Version=1.0-12
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/senthistory/senthistory.h new/senthistory/senthistory.h
--- old/senthistory/senthistory.h 2012-05-28 12:34:09.000000000 +0200
+++ new/senthistory/senthistory.h 2014-08-16 00:12:11.000000000 +0200
@@ -1,7 +1,7 @@
/****************************************************************************
* *
* SentHistory plugin for Kadu *
-* Copyright (C) 2008-2011 Piotr Dąbrowski ultr@ultr.pl *
+* Copyright (C) 2008-2014 Piotr Dąbrowski ultr@ultr.pl *
* *
* 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 *
@@ -27,9 +27,9 @@
#include "chat/chat.h"
#include "configuration/configuration-aware-object.h"
-#include "gui/widgets/chat-widget.h"
+#include "gui/widgets/chat-widget/chat-widget.h"
#include "gui/widgets/custom-input.h"
-#include "plugins/generic-plugin.h"
+#include "plugin/plugin-root-component.h"
#define SENTHISTORY_DEFAULTSHORTCUT_PREVIOUSMESSAGE "Ctrl+Up"
@@ -38,20 +38,21 @@
#define SENTHISTORY_DEFAULTSHORTCUT_NEXTMESSAGEFROMALLCHATS "Ctrl+Alt+Down"
-class SentHistory : public QObject, public ConfigurationAwareObject, public GenericPlugin
+class SentHistory : public QObject, public ConfigurationAwareObject, public PluginRootComponent
{
Q_OBJECT
- Q_INTERFACES( GenericPlugin )
+ Q_INTERFACES( PluginRootComponent )
+ Q_PLUGIN_METADATA( IID "im.kadu.PluginRootComponent" )
public:
- virtual int init( bool firstLoad );
+ virtual bool init( bool firstLoad );
virtual void done();
SentHistory();
~SentHistory();
protected:
void configurationUpdated();
private slots:
- void chatCreated( ChatWidget *chatwidget );
- void chatDestroying( ChatWidget *chatwidget );
+ void chatWidgetAdded( ChatWidget *chatwidget );
+ void chatWidgetRemoved( ChatWidget *chatwidget );
void messageSendRequested( ChatWidget *chatwidget );
void editKeyPressed( QKeyEvent* e, CustomInput* custominput, bool &handled );
private:
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org