By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1525
Collapse All | Expand All

(-)trinity-tdepim-3.5.13.2~pre23+6c74b892/kmail/CMakeLists.txt.ORI (-2 / +2 lines)
Lines 178-184 Link Here
178
  localsubscriptiondialog.cpp editorwatcher.cpp favoritefolderview.cpp
178
  localsubscriptiondialog.cpp editorwatcher.cpp favoritefolderview.cpp
179
  foldertreebase.cpp snippetdlgbase.ui snippetwidget.cpp snippetconfig.cpp
179
  foldertreebase.cpp snippetdlgbase.ui snippetwidget.cpp snippetconfig.cpp
180
  snippetdlg.cpp snippetitem.cpp snippetsettings.cpp snippetsettingsbase.ui
180
  snippetdlg.cpp snippetitem.cpp snippetsettings.cpp snippetsettingsbase.ui
181
  messageactions.cpp korghelper.cpp foldersetselector.cpp stringutil.cpp
181
  messageactions.cpp korghelper.cpp kmnetworkmonitor.cpp foldersetselector.cpp stringutil.cpp
182
  treebase.cpp backupjob.cpp importjob.cpp folderutil.cpp archivefolderdialog.cpp
182
  treebase.cpp backupjob.cpp importjob.cpp folderutil.cpp archivefolderdialog.cpp
183
  importarchivedialog.cpp ${CMAKE_SOURCE_DIR}/korganizer/kcalendariface.stub
183
  importarchivedialog.cpp ${CMAKE_SOURCE_DIR}/korganizer/kcalendariface.stub
184
  ${CMAKE_SOURCE_DIR}/korganizer/korganizeriface.stub )
184
  ${CMAKE_SOURCE_DIR}/korganizer/korganizeriface.stub )
Lines 192-198 Link Here
192
  SOURCES ${${target}_SRCS}
192
  SOURCES ${${target}_SRCS}
193
  LINK
193
  LINK
194
    emailfunctions-static kmime-shared kpgp-shared kdepim-shared kpimidentities-shared
194
    emailfunctions-static kmime-shared kpgp-shared kdepim-shared kpimidentities-shared
195
    mimelib-shared ksieve-shared khtml-shared ${INDEX_LIBRARY}
195
    mimelib-shared ksieve-shared khtml-shared kdedbus-shared ${INDEX_LIBRARY}
196
  DESTINATION ${LIB_INSTALL_DIR}
196
  DESTINATION ${LIB_INSTALL_DIR}
197
)
197
)
198
198
(-)trinity-tdepim-3.5.13.2~pre23+6c74b892/kmail/kmkernel.cpp.ORI (+13 lines)
Lines 72-77 Link Here
72
#include <kwallet.h>
72
#include <kwallet.h>
73
using KWallet::Wallet;
73
using KWallet::Wallet;
74
#include "actionscheduler.h"
74
#include "actionscheduler.h"
75
#include "kmnetworkmonitor.h" 
75
76
76
#include <qutf7codec.h>
77
#include <qutf7codec.h>
77
#include <tqvbox.h>
78
#include <tqvbox.h>
Lines 169-174 Link Here
169
170
170
  connectDCOPSignal( 0, 0, "kmailSelectFolder(TQString)",
171
  connectDCOPSignal( 0, 0, "kmailSelectFolder(TQString)",
171
                     "selectFolder(TQString)", false );
172
                     "selectFolder(TQString)", false );
173
174
  networkMonitor = new KMNetworkMonitor(this, "KMNetworkMonitor");
175
  connect(networkMonitor, TQT_SIGNAL(stateChanged(bool)), TQT_SLOT(slotNetworkStateChanged(bool)));
172
}
176
}
173
177
174
KMKernel::~KMKernel ()
178
KMKernel::~KMKernel ()
Lines 2056-2061 Link Here
2056
  mPutJobs.remove(it);
2060
  mPutJobs.remove(it);
2057
}
2061
}
2058
2062
2063
void KMKernel::slotNetworkStateChanged(bool state)
2064
{
2065
  if(state) {
2066
    resumeNetworkJobs();
2067
  } else {
2068
    stopNetworkJobs();
2069
  }
2070
}
2071
2059
void KMKernel::slotRequestConfigSync() {
2072
void KMKernel::slotRequestConfigSync() {
2060
  // ### FIXME: delay as promised in the kdoc of this function ;-)
2073
  // ### FIXME: delay as promised in the kdoc of this function ;-)
2061
  KMKernel::config()->sync();
2074
  KMKernel::config()->sync();
(-)trinity-tdepim-3.5.13.2~pre23+6c74b892/kmail/kmkernel.h.ORI (+5 lines)
Lines 28-33 Link Here
28
  class Wallet;
28
  class Wallet;
29
}
29
}
30
30
31
class KMNetworkMonitor; 
32
31
/** The KMail namespace contains classes used for KMail.
33
/** The KMail namespace contains classes used for KMail.
32
* This is to keep them out of the way from all the other
34
* This is to keep them out of the way from all the other
33
* un-namespaced classes in libs and the rest of PIM.
35
* un-namespaced classes in libs and the rest of PIM.
Lines 434-439 Link Here
434
protected slots:
436
protected slots:
435
  void slotDataReq(KIO::Job*,TQByteArray&);
437
  void slotDataReq(KIO::Job*,TQByteArray&);
436
  void slotResult(KIO::Job*);
438
  void slotResult(KIO::Job*);
439
  void slotNetworkStateChanged(bool);
437
440
438
signals:
441
signals:
439
  void configChanged();
442
  void configChanged();
Lines 517-522 Link Here
517
  KPIM::ThreadWeaver::WeaverThreadLogger *the_weaverLogger;
520
  KPIM::ThreadWeaver::WeaverThreadLogger *the_weaverLogger;
518
521
519
  KWallet::Wallet *mWallet;
522
  KWallet::Wallet *mWallet;
523
  
524
  KMNetworkMonitor *networkMonitor; 
520
525
521
  // variables used by dcopAddMessage()
526
  // variables used by dcopAddMessage()
522
  TQStringList mAddMessageMsgIds;
527
  TQStringList mAddMessageMsgIds;
(-) (+45 lines)
Added Link Here
1
/*
2
   This file is part of the KDE3 Fork Project
3
   Copyright (c) 2013 Serghei Amelian <serghei.amelian@gmail.com>
4
5
   This library is free software; you can redistribute it and/or
6
   modify it under the terms of the GNU Library General Public
7
   License version 2 as published by the Free Software Foundation.
8
9
   This library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Library General Public License for more details.
13
14
   You should have received a copy of the GNU Library General Public License
15
   along with this library; see the file COPYING.LIB.  If not, write to
16
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
   Boston, MA 02110-1301, USA.
18
*/
19
#ifndef _KMNETWORKMONITOR_H_
20
#define _KMNETWORKMONITOR_H_
21
22
#include <tqobject.h>
23
24
class KMNetworkMonitorPrivate;
25
26
27
class KMNetworkMonitor : public TQObject {
28
29
    TQ_OBJECT
30
31
    friend class KMNetworkMonitorPrivate;
32
33
public:
34
    KMNetworkMonitor(TQObject *parent = 0, const char *name = 0);
35
    ~KMNetworkMonitor();
36
37
signals:
38
    void stateChanged(bool);
39
40
private:
41
    KMNetworkMonitorPrivate *d;
42
};
43
44
45
#endif
(-) (+116 lines)
Added Link Here
1
/*
2
   This file is part of the KDE3 Fork Project
3
   Copyright (c) 2013 Serghei Amelian <serghei.amelian@gmail.com>
4
5
   This library is free software; you can redistribute it and/or
6
   modify it under the terms of the GNU Library General Public
7
   License version 2 as published by the Free Software Foundation.
8
9
   This library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Library General Public License for more details.
13
14
   You should have received a copy of the GNU Library General Public License
15
   along with this library; see the file COPYING.LIB.  If not, write to
16
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
   Boston, MA 02110-1301, USA.
18
*/
19
20
#include <TQTime.h>
21
22
#include <dbus/TQDBusConnection.h>
23
#include <dbus/qdbuserror.h>
24
#include <dbus/TQDBusMessage.h>
25
#include <dbus/qdbusproxy.h>
26
27
#include <kdebug.h>
28
29
#include "kmnetworkmonitor.h"
30
31
32
class KMNetworkMonitorPrivate : public TQDBusProxy {
33
34
    TQ_OBJECT
35
36
public:
37
    KMNetworkMonitorPrivate(KMNetworkMonitor *parent)
38
        : TQDBusProxy(parent, "KMNetworkMonitorPrivate"), lastStatus(-1)
39
    {
40
        setService("org.freedesktop.NetworkManager");
41
        setPath("/org/freedesktop/NetworkManager");
42
        setInterface("org.freedesktop.NetworkManager");
43
44
        TQTime::singleShot(0, this, TQT_SLOT(initialize()));
45
    }
46
47
protected slots:
48
    void initialize()
49
    {
50
        // connect to DBUS
51
        TQDBusConnection dbus = TQDBusConnection::systemBus();
52
        if(!dbus.isConnected()) {
53
            kdDebug() << "Unable to connect to DBus: " << dbus.lastError().message() << endl;
54
            return;
55
        }
56
        setConnection(dbus);
57
58
        // check for current status
59
        int rc = sendWithAsyncReply("state", TQValueList<TQDBusData>());
60
        if(0 == rc) {
61
            kdDebug() << "Unable to send \"state\" command to DBus" << endl;
62
            return;
63
        }
64
    }
65
66
    void handleDBusSignal(const TQDBusMessage &message)
67
    {
68
        // the message is for us
69
        if(path() == message.path() && interface() == message.interface() && "StateChanged" == message.member())
70
            handleMessage(message);
71
    }
72
73
    void handleAsyncReply(const TQDBusMessage &message)
74
    {
75
        handleMessage(message);
76
    }
77
78
    void handleMessage(const TQDBusMessage &message)
79
    {
80
        bool ok;
81
        TQ_UINT32 state = message[0].toUInt32(&ok);
82
83
        if(!ok) {
84
            kdDebug() << "KMNetworkMonitor: received unexpected type for state (" << message[0].typeName() << ")" << endl;
85
            return;
86
        }
87
88
        int currStatus = (50 < state ? 1 : 0);
89
90
        if(lastStatus != currStatus) {
91
            emit static_cast<KMNetworkMonitor*>(parent())->stateChanged(1 == currStatus);
92
            lastStatus = currStatus;
93
        }
94
    }
95
96
private:
97
    // -1 = unitialized, 0 = offline, 1 = online
98
    int lastStatus;
99
};
100
101
102
KMNetworkMonitor::KMNetworkMonitor(TQObject *parent, const char *name)
103
    : TQObject(parent, name)
104
{
105
    d = new KMNetworkMonitorPrivate(this);
106
}
107
108
109
KMNetworkMonitor::~KMNetworkMonitor()
110
{
111
    delete d;
112
}
113
114
115
#include "kmnetworkmonitor.moc"
116
#include "kmnetworkmonitor.cpp.moc"

Return to bug 1525