~ubuntu-branches/ubuntu/jaunty/psi/jaunty

« back to all changes in this revision

Viewing changes to src/xmlconsole.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-08-28 18:46:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080828184652-iiik12dl91nq7cdi
Tags: 0.12-2
Uploading to unstable (Closes: Bug#494352)

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        connect(ui_.pb_clear, SIGNAL(clicked()), SLOT(clear()));
62
62
        connect(ui_.pb_input, SIGNAL(clicked()), SLOT(insertXml()));
63
63
        connect(ui_.pb_close, SIGNAL(clicked()), SLOT(close()));
 
64
        connect(ui_.pb_dumpRingbuf, SIGNAL(clicked()), SLOT(dumpRingbuf()));
64
65
        connect(ui_.ck_enable, SIGNAL(clicked(bool)), ui_.gb_filter, SLOT(setEnabled(bool)));
65
66
 
66
67
        resize(560,400);
117
118
        return true;
118
119
}
119
120
 
 
121
void XmlConsole::dumpRingbuf()
 
122
{
 
123
        QList<PsiAccount::xmlRingElem> buf = pa->dumpRingbuf();
 
124
        bool enablesave = ui_.ck_enable->isChecked();
 
125
        ui_.ck_enable->setChecked(true);
 
126
        QString stamp;
 
127
        foreach (PsiAccount::xmlRingElem el, buf) {
 
128
                stamp = "<!-- TS:" + el.time.toString(Qt::ISODate) + "-->";
 
129
                if (el.type == PsiAccount::RingXmlOut) {
 
130
                        client_xmlOutgoing(stamp + el.xml);
 
131
                } else {
 
132
                        client_xmlIncoming(stamp + el.xml);
 
133
                }
 
134
        }
 
135
        ui_.ck_enable->setChecked(enablesave);
 
136
}
 
137
 
120
138
void XmlConsole::client_xmlIncoming(const QString &str)
121
139
{
122
140
        if (!filtered(str)) {