Skip to content

Commit

Permalink
Added default clients iconset. Fixed message replace in groupchat. Fi…
Browse files Browse the repository at this point in the history
…xed themes list rendering in options
  • Loading branch information
Ri0n committed May 1, 2017
1 parent 91e4e73 commit 4e8cac9
Show file tree
Hide file tree
Showing 33 changed files with 173 additions and 15 deletions.
5 changes: 0 additions & 5 deletions client_icons.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ miranda-ng nightly.miranda.im,miranda-ng.org
mirandahotcoffee hotcoffee
monal monal.im
movamessenger.sis movamessenge
msnmessenger msn,delx.net.au
nekbot sleekxmpp.com#1.1.10
nimbuzz nimbuzz
omnipresence omnipresence,home.gna.org
Expand Down Expand Up @@ -155,11 +154,7 @@ wod-xmpp weonlydo.com
wtw wtw
vacuum vacuum
vkontakte vk.com,pyvk-t,vkontakte
yaonline d18f2ed0bed0bdd0bbd0b0d0b9d0bd,online.yandex.ru
yaonlinej2me ya.online
yaonlinesymbian yandexmail
yabber yabber
yaonlinesymbian yaonline
yaxim yaxim
xabber xabber
xu6-bot xu-6.jabbrik.ru
Expand Down
24 changes: 24 additions & 0 deletions iconsets.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -351,5 +351,29 @@
<file>iconsets/affiliations/default/noaffiliation.png</file>
<file>iconsets/affiliations/default/outcast.png</file>
<file>iconsets/affiliations/default/icondef.xml</file>
<file>iconsets/clients/default/adium.png</file>
<file>iconsets/clients/default/bitlbee.png</file>
<file>iconsets/clients/default/bot.png</file>
<file>iconsets/clients/default/conversations.png</file>
<file>iconsets/clients/default/gajim.png</file>
<file>iconsets/clients/default/icondef.xml</file>
<file>iconsets/clients/default/jtalk.png</file>
<file>iconsets/clients/default/kadu.png</file>
<file>iconsets/clients/default/kopete.png</file>
<file>iconsets/clients/default/leechcraft-azoth.png</file>
<file>iconsets/clients/default/miranda-ng.png</file>
<file>iconsets/clients/default/miranda.png</file>
<file>iconsets/clients/default/pidgin.png</file>
<file>iconsets/clients/default/poezio.png</file>
<file>iconsets/clients/default/psiplus.png</file>
<file>iconsets/clients/default/psi.png</file>
<file>iconsets/clients/default/qip.png</file>
<file>iconsets/clients/default/qutim.png</file>
<file>iconsets/clients/default/sawim.png</file>
<file>iconsets/clients/default/swift.png</file>
<file>iconsets/clients/default/tkabber.png</file>
<file>iconsets/clients/default/vacuum.png</file>
<file>iconsets/clients/default/xabber.png</file>
<file>iconsets/clients/default/yaxim.png</file>
</qresource>
</RCC>
4 changes: 4 additions & 0 deletions iconsets/clients/default/.directory
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Dolphin]
PreviewsShown=true
Timestamp=2017,5,1,23,42,48
Version=4
Binary file added iconsets/clients/default/adium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/bitlbee.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/conversations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/gajim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
132 changes: 132 additions & 0 deletions iconsets/clients/default/icondef.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?xml version='1.0' encoding='UTF-8'?>
<icondef>
<meta>
<name>Psi Default Fingerprint - size 16</name>
<version>1.0</version>
<creation>2017-05-01</creation>
<home>http://psi-im.org/</home>
<author email='maksim.maj@gmail.com'>maj</author>
<author email='vladimir.shelukhin@gmail.com'>zet</author>
<author email='rion4ik@gmail.com'>zet</author>
<description>Default Clients iconpack.

Based on the huge on from Psi+ repository.
</description>
</meta>

<icon>
<x xmlns='name'>clients/adium</x>
<object mime='image/png'>adium.png</object>
</icon>

<icon>
<x xmlns='name'>clients/bitlbee</x>
<object mime='image/png'>bitlbee.png</object>
</icon>

<icon>
<x xmlns='name'>clients/bot</x>
<object mime='image/png'>bot.png</object>
</icon>

<icon>
<x xmlns='name'>clients/conversations</x>
<object mime='image/png'>conversations.png</object>
</icon>

<icon>
<x xmlns='name'>clients/gajim</x>
<object mime='image/png'>gajim.png</object>
</icon>

<icon>
<x xmlns='name'>clients/jtalk</x>
<object mime='image/png'>jtalk.png</object>
</icon>

<icon>
<x xmlns='name'>clients/kadu</x>
<object mime='image/png'>kadu.png</object>
</icon>

<icon>
<x xmlns='name'>clients/kopete</x>
<object mime='image/png'>kopete.png</object>
</icon>

<icon>
<x xmlns='name'>clients/leechcraft-azoth</x>
<object mime='image/png'>leechcraft-azoth.png</object>
</icon>

<icon>
<x xmlns='name'>clients/miranda</x>
<object mime='image/png'>miranda.png</object>
</icon>

<icon>
<x xmlns='name'>clients/miranda-ng</x>
<object mime='image/png'>miranda-ng.png</object>
</icon>

<icon>
<x xmlns='name'>clients/pidgin</x>
<object mime='image/png'>pidgin.png</object>
</icon>

<icon>
<x xmlns='name'>clients/poezio</x>
<object mime='image/png'>poezio.png</object>
</icon>

<icon>
<x xmlns='name'>clients/psi</x>
<object mime='image/png'>psi.png</object>
</icon>

<icon>
<x xmlns='name'>clients/psiplus</x>
<object mime='image/png'>psiplus.png</object>
</icon>

<icon>
<x xmlns='name'>clients/qip</x>
<object mime='image/png'>qip.png</object>
</icon>

<icon>
<x xmlns='name'>clients/qutim</x>
<object mime='image/png'>qutim.png</object>
</icon>

<icon>
<x xmlns='name'>clients/sawim</x>
<object mime='image/png'>sawim.png</object>
</icon>

<icon>
<x xmlns='name'>clients/swift</x>
<object mime='image/png'>swift.png</object>
</icon>

<icon>
<x xmlns='name'>clients/tkabber</x>
<object mime='image/png'>tkabber.png</object>
</icon>

<icon>
<x xmlns='name'>clients/vacuum</x>
<object mime='image/png'>vacuum.png</object>
</icon>

<icon>
<x xmlns='name'>clients/xabber</x>
<object mime='image/png'>xabber.png</object>
</icon>

<icon>
<x xmlns='name'>clients/yaxim</x>
<object mime='image/png'>yaxim.png</object>
</icon>

</icondef>
Binary file added iconsets/clients/default/jtalk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/kadu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/kopete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/leechcraft-azoth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/miranda-ng.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/miranda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/pidgin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/poezio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/psi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/psiplus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/qip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/qutim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/sawim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/swift.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/tkabber.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/vacuum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/xabber.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added iconsets/clients/default/yaxim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion options/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@
<moods type="QString">default</moods>
<activities type="QString">default</activities>
<affiliations type="QString">default</affiliations>
<clients type="QString"></clients>
<clients type="QString">default</clients>
</iconsets>
<messages>
<default-outgoing-message-type type="QString">chat</default-outgoing-message-type>
Expand Down
8 changes: 4 additions & 4 deletions src/options/opt_theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ QWidget *OptionsTabAppearanceTheme::widget()
themesModel = new QSortFilterProxyModel(this);
themesModel->setSourceModel(unsortedModel);
themesModel->setSortCaseSensitivity(Qt::CaseInsensitive);
themesModel->setSortRole(PsiThemeModel::TitleRole);

d->themeView->setModel(themesModel);
d->themeView->setSortingEnabled(true);
d->themeView->sortByColumn(0, Qt::AscendingOrder);

connect(d->themeView->selectionModel(),
SIGNAL(currentChanged(QModelIndex, QModelIndex)),
Expand Down Expand Up @@ -101,13 +100,14 @@ void OptionsTabAppearanceTheme::modelRowsInserted(const QModelIndex &parent, int
{
if (!parent.isValid() || !w) {
OptAppearanceThemeUI *d = (OptAppearanceThemeUI *)w;
const QSize buttonSize = QSize(21,21);
//const QSize buttonSize = QSize(21,21);
for (int i = first; i <= last; i++) {
const QModelIndex index = themesModel->index(i, 0);
const QString id = themesModel->data(index, PsiThemeModel::IdRole).toString();
if (themesModel->data(index, PsiThemeModel::IsCurrent).toBool()) {
d->themeView->setCurrentIndex(index);
}
#if 0
const QString themeName = themesModel->data(index, PsiThemeModel::TitleRole).toString();
bool isPsi = id.startsWith("psi");
const QPixmap client = isPsi ? IconsetFactory::iconPixmap("clients/psi")
Expand Down Expand Up @@ -137,8 +137,8 @@ void OptionsTabAppearanceTheme::modelRowsInserted(const QModelIndex &parent, int
//itemWidget->setAutoFillBackground(true); // from recommendation of indexWidget but does not work as expected

d->themeView->setIndexWidget(index, itemWidget);
#endif
}
themesModel->sort(0);
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/psithememodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <QPixmap>

#include "psithememanager.h"
#include "psiiconset.h"


class PsiThemeModel;
Expand Down Expand Up @@ -139,9 +140,11 @@ int PsiThemeModel::rowCount ( const QModelIndex & parent ) const
QVariant PsiThemeModel::data ( const QModelIndex & index, int role ) const
{
switch (role) {
case Qt::DecorationRole:
return IconsetFactory::icon(QString("clients/")+themesInfo[index.row()].id.section('/',0, 0)).pixmap();
case IdRole:
return themesInfo[index.row()].id;
//case Qt::DisplayRole:
case Qt::DisplayRole:
case TitleRole:
return themesInfo[index.row()].title;
case ScreenshotRole:
Expand Down
3 changes: 2 additions & 1 deletion themes/chatview/psi/classic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@
return shared.cdata.emote?"*"+nick:"&lt;"+nick+"&gt;";
},
alertedmessage : function() {
return shared.cdata.alert?"<span class='alert'>"+
var msg = shared.cdata.alert?"<span class='alert'>"+
shared.cdata.message+"</span>":shared.cdata.message;
return shared.cdata.id? util.replaceableMessage(shared.cdata.id, msg) : msg;
},
sentrec : function() {return shared.cdata.spooled?"infmsg":
(shared.cdata.local?"sent":"received");},
Expand Down
3 changes: 2 additions & 1 deletion themes/chatview/psi/new_classic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@
return shared.cdata["emote"]?"*"+nick:(shared.isMuc?"&lt;"+nick+"&gt;":nick+":");
},
alertedmessage : function() {
return shared.cdata.alert?"<span class='alert'>"+shared.cdata.message+"</span>":shared.cdata.message;
var msg = shared.cdata.alert?"<span class='alert'>"+shared.cdata.message+"</span>":shared.cdata.message;
return shared.cdata.id? util.replaceableMessage(shared.cdata.id, msg) : msg;
},
sentrec : function() {return shared.cdata.spooled?"infmsg":(shared.cdata.local?"sent":"received");},
nickcolor : function() {
Expand Down
2 changes: 0 additions & 2 deletions themes/chatview/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,13 @@ function initPsiTheme() {
appendHtml : function(dest, html) {
htmlSource.innerHTML = html;
chat.util.handleLinks(htmlSource);
//chat.util.replaceYoutube(htmlSource);
chat.util.replaceIcons(htmlSource);
while (htmlSource.firstChild) dest.appendChild(htmlSource.firstChild);
},

siblingHtml : function(dest, html) {
htmlSource.innerHTML = html;
chat.util.handleLinks(htmlSource);
//chat.util.replaceYoutube(htmlSource);
chat.util.replaceIcons(htmlSource);
while (htmlSource.firstChild) dest.parentNode.insertBefore(htmlSource.firstChild, dest);
},
Expand Down

0 comments on commit 4e8cac9

Please sign in to comment.