[prev in list] [next in list] [prev in thread] [next in thread]
List: kopete-devel
Subject: Re: Review Request: Kopete: Automatically logout and login with
From: Pali_Rohár <pali.rohar () gmail ! com>
Date: 2011-02-23 11:22:37
Message-ID: 20110223112237.30960.68714 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6511/#review9903
-----------------------------------------------------------
/branches/KDE/4.6/kdenetwork/kopete/libkopete/kopeteaccountmanager.cpp
<http://svn.reviewboard.kde.org/r/6511/#comment11067>
>> Kopete::StatusMessage statusMessage( i18n( "Offline" ), "");
I think this is bad idea. User can configure own status title and message in \
kopete configuration dialog.
Some protocols (skype) support status message (on server) when account is \
disconnected.
So we may respect user settings.
This code (was in original file) try to find if user has own status title/message \
for offline status:
QList <Kopete::Status::StatusItem *> statusList = \
Kopete::StatusManager::self()->getRootGroup()->childList(); QString message, title;
bool found = false;
//find first Status for OnlineStatus
for ( QList <Kopete::Status::StatusItem *>::ConstIterator it = \
statusList.constBegin(); it != statusList.constEnd(); ++it ) {
if ( ! (*it)->isGroup() && (*it)->category() == \
Kopete::OnlineStatusManager::Offline ) { title = (*it)->title();
message = (static_cast <Kopete::Status::Status*> (*it))->message(); //if it \
is not group, it status found = true;
break;
}
}
- Pali
On Feb. 23, 2011, 1:55 a.m., alter_schwede wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6511/
> -----------------------------------------------------------
>
> (Updated Feb. 23, 2011, 1:55 a.m.)
>
>
> Review request for Kopete.
>
>
> Summary
> -------
>
> I already posted this patch here:
> https://bugs.kde.org/show_bug.cgi?id=149544
>
> This patch logs off each account when PC is suspended and restores the online state \
> of each account on resume. This patch also addresses another problem of kopete: \
> When the user was setting kopete to "Offline" and the network connection was lost \
> and recovered kopete would reset all accounts to "Online".
>
> This addresses bug 149544.
> https://bugs.kde.org/show_bug.cgi?id=149544
>
>
> Diffs
> -----
>
> /branches/KDE/4.6/kdenetwork/kopete/kopete/kopetedbusinterface.h 1219275
> /branches/KDE/4.6/kdenetwork/kopete/kopete/kopetedbusinterface.cpp 1219275
> /branches/KDE/4.6/kdenetwork/kopete/kopete/org.kde.Kopete.xml 1219275
> /branches/KDE/4.6/kdenetwork/kopete/libkopete/kopeteaccount.h 1219275
> /branches/KDE/4.6/kdenetwork/kopete/libkopete/kopeteaccount.cpp 1219275
> /branches/KDE/4.6/kdenetwork/kopete/libkopete/kopeteaccountmanager.h 1219275
> /branches/KDE/4.6/kdenetwork/kopete/libkopete/kopeteaccountmanager.cpp 1219275
>
> Diff: http://svn.reviewboard.kde.org/r/6511/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> alter_schwede
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://svn.reviewboard.kde.org/r/6511/">http://svn.reviewboard.kde.org/r/6511/</a>
</td>
</tr>
</table>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="http://svn.reviewboard.kde.org/r/6511/diff/3/?file=45187#file45187line166" \
style="color: black; font-weight: bold; text-decoration: \
underline;">/branches/KDE/4.6/kdenetwork/kopete/libkopete/kopeteaccountmanager.cpp</a>
<span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td> <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">void AccountManager::suspend()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">166</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="n">Kopete</span><span class="o">::</span><span class="n">StatusMessage</span> \
<span class="n">statusMessage</span><span class="p">(</span> <span \
class="n">i18n</span><span class="p">(</span> <span \
class="s">"Offline"</span> <span class="p">),</span> <span \
class="s">""</span><span class="p">);</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">>> \
Kopete::StatusMessage statusMessage( i18n( "Offline" ), "");
I think this is bad idea. User can configure own status title and message in kopete \
configuration dialog.
Some protocols (skype) support status message (on server) when account is \
disconnected.
So we may respect user settings.
This code (was in original file) try to find if user has own status title/message for \
offline status:
QList <Kopete::Status::StatusItem *> statusList = \
Kopete::StatusManager::self()->getRootGroup()->childList(); QString message, \
title; bool found = false;
//find first Status for OnlineStatus
for ( QList <Kopete::Status::StatusItem *>::ConstIterator it = \
statusList.constBegin(); it != statusList.constEnd(); ++it ) { if ( ! \
(*it)->isGroup() && (*it)->category() == \
Kopete::OnlineStatusManager::Offline ) { title = (*it)->title();
message = (static_cast <Kopete::Status::Status*> (*it))->message(); //if \
it is not group, it status found = true;
break;
}
}</pre>
</div>
<br />
<p>- Pali</p>
<br />
<p>On February 23rd, 2011, 1:55 a.m., alter_schwede wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Kopete.</div>
<div>By alter_schwede.</div>
<p style="color: grey;"><i>Updated Feb. 23, 2011, 1:55 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">I already posted this patch here: \
https://bugs.kde.org/show_bug.cgi?id=149544
This patch logs off each account when PC is suspended and restores the online state \
of each account on resume. This patch also addresses another problem of kopete: When \
the user was setting kopete to "Offline" and the network connection was \
lost and recovered kopete would reset all accounts to "Online". </pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=149544">149544</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/KDE/4.6/kdenetwork/kopete/kopete/kopetedbusinterface.h <span \
style="color: grey">(1219275)</span></li>
<li>/branches/KDE/4.6/kdenetwork/kopete/kopete/kopetedbusinterface.cpp <span \
style="color: grey">(1219275)</span></li>
<li>/branches/KDE/4.6/kdenetwork/kopete/kopete/org.kde.Kopete.xml <span \
style="color: grey">(1219275)</span></li>
<li>/branches/KDE/4.6/kdenetwork/kopete/libkopete/kopeteaccount.h <span \
style="color: grey">(1219275)</span></li>
<li>/branches/KDE/4.6/kdenetwork/kopete/libkopete/kopeteaccount.cpp <span \
style="color: grey">(1219275)</span></li>
<li>/branches/KDE/4.6/kdenetwork/kopete/libkopete/kopeteaccountmanager.h <span \
style="color: grey">(1219275)</span></li>
<li>/branches/KDE/4.6/kdenetwork/kopete/libkopete/kopeteaccountmanager.cpp <span \
style="color: grey">(1219275)</span></li>
</ul>
<p><a href="http://svn.reviewboard.kde.org/r/6511/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic