diff options
author | Peter Volkov <pva@gentoo.org> | 2009-08-17 11:16:37 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2009-08-17 11:16:37 +0000 |
commit | 94541a49ee90b104ecf6c0064d5fcb10dd5e496a (patch) | |
tree | 56cd8a1c64b43e95f74c7a69d1b896ce156977a5 /net-im/psi | |
parent | app-editors/gedit-plugins: add ~x86 keyword, fixes bug #281750 (diff) | |
download | gentoo-2-94541a49ee90b104ecf6c0064d5fcb10dd5e496a.tar.gz gentoo-2-94541a49ee90b104ecf6c0064d5fcb10dd5e496a.tar.bz2 gentoo-2-94541a49ee90b104ecf6c0064d5fcb10dd5e496a.zip |
Updated translations, thank Rion for report. Updated psi+ patchset. Backported two patches from git to make psi+ patchset apliable.
(Portage version: 2.2_rc38/cvs/Linux i686)
Diffstat (limited to 'net-im/psi')
-rw-r--r-- | net-im/psi/ChangeLog | 10 | ||||
-rw-r--r-- | net-im/psi/files/psi-0.13-psi+muc-kickban-reasons.patch | 381 | ||||
-rw-r--r-- | net-im/psi/files/psi-0.13-psi+options-coloring-in-chat-dialog.patch | 272 | ||||
-rw-r--r-- | net-im/psi/psi-0.13-r1.ebuild | 130 |
4 files changed, 792 insertions, 1 deletions
diff --git a/net-im/psi/ChangeLog b/net-im/psi/ChangeLog index fb07b2f23ac4..261a80f36837 100644 --- a/net-im/psi/ChangeLog +++ b/net-im/psi/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-im/psi # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/psi/ChangeLog,v 1.166 2009/08/02 14:50:45 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/psi/ChangeLog,v 1.167 2009/08/17 11:16:37 pva Exp $ + +*psi-0.13-r1 (17 Aug 2009) + + 17 Aug 2009; Peter Volkov <pva@gentoo.org> +psi-0.13-r1.ebuild, + +files/psi-0.13-psi+muc-kickban-reasons.patch, + +files/psi-0.13-psi+options-coloring-in-chat-dialog.patch: + Updated translations, thank Rion for report. Updated psi+ patchset. + Backported two patches from git to make psi+ patchset apliable. 02 Aug 2009; Jeroen Roovers <jer@gentoo.org> psi-0.13.ebuild: Marked ~hppa (bug #279676). diff --git a/net-im/psi/files/psi-0.13-psi+muc-kickban-reasons.patch b/net-im/psi/files/psi-0.13-psi+muc-kickban-reasons.patch new file mode 100644 index 000000000000..15d2da44ea2c --- /dev/null +++ b/net-im/psi/files/psi-0.13-psi+muc-kickban-reasons.patch @@ -0,0 +1,381 @@ +commit 3614141a6e94ea1820dd731f2bb37f33371a4fcb +Author: Justin Karneges <justin@affinix.com> +Date: Thu Aug 6 20:45:40 2009 -0700 + + 020-psi-muc-kickban-reasons.diff from psi+, with adjustment + +diff --git a/options/default.xml b/options/default.xml +index 988589e..74021f2 100644 +--- a/options/default.xml ++++ b/options/default.xml +@@ -51,6 +51,7 @@ + <jids type="QStringList" /> + <maximum comment="The maximum number of recently joined rooms that should be remembered" type="int">10</maximum> + </recent-joins> ++ <reasons type="QStringList" /> + </muc> + <pgp comment="PGP encryption options"> + <enable comment="Enable PGP globally" type="bool">true</enable> +diff --git a/src/gcuserview.cpp b/src/gcuserview.cpp +index 810feb2..8962425 100644 +--- a/src/gcuserview.cpp ++++ b/src/gcuserview.cpp +@@ -335,10 +335,34 @@ void GCUserView::qlv_contextMenuRequested(Q3ListViewItem *i, const QPoint &pos, + pm->insertItem(IconsetFactory::icon("psi/sendMessage").icon(), tr("Send &Message"), 0); + pm->insertItem(IconsetFactory::icon("psi/start-chat").icon(), tr("Open &Chat Window"), 1); + pm->insertSeparator(); +- pm->insertItem(tr("&Kick"),10); +- pm->setItemEnabled(10, MUCManager::canKick(c->s.mucItem(),lvi->s.mucItem())); +- pm->insertItem(tr("&Ban"),11); +- pm->setItemEnabled(11, MUCManager::canBan(c->s.mucItem(),lvi->s.mucItem())); ++ ++ // Kick and Ban submenus ++ QStringList reasons = PsiOptions::instance()->getOption("options.muc.reasons").toStringList(); ++ int cntReasons=reasons.count(); ++ if (cntReasons>99) cntReasons=99; // Only first 99 reasons ++ ++ Q3PopupMenu *kickMenu = new Q3PopupMenu(pm); ++ kickMenu->insertItem(tr("No reason"),10); ++ kickMenu->insertItem(tr("Custom reason"),100); ++ kickMenu->insertSeparator(); ++ bool canKick=MUCManager::canKick(c->s.mucItem(),lvi->s.mucItem()); ++ for (int i=0; i<cntReasons; ++i) ++ kickMenu->insertItem(reasons[i], 101+i); ++ kickMenu->setEnabled(canKick); ++ ++ Q3PopupMenu *banMenu = new Q3PopupMenu(pm); ++ banMenu->insertItem(tr("No reason"),11); ++ banMenu->insertItem(tr("Custom reason"),200); ++ banMenu->insertSeparator(); ++ bool canBan=MUCManager::canBan(c->s.mucItem(),lvi->s.mucItem()); ++ for (int i=0; i<cntReasons; ++i) ++ banMenu->insertItem(reasons[i], 201+i); ++ banMenu->setEnabled(canBan); ++ ++ pm->insertItem(tr("&Kick"), kickMenu); ++ pm->setItemEnabled(10, canKick); ++ pm->insertItem(tr("&Ban"), banMenu); ++ pm->setItemEnabled(11, canBan); + + Q3PopupMenu* rm = new Q3PopupMenu(pm); + rm->insertItem(tr("Visitor"),12); +@@ -372,7 +396,7 @@ void GCUserView::qlv_contextMenuRequested(Q3ListViewItem *i, const QPoint &pos, + pm->insertItem(tr("Check &Status"), 2); + pm->insertItem(IconsetFactory::icon("psi/vCard").icon(), tr("User &Info"), 3); + int x = pm->exec(pos); +- bool enabled = pm->isItemEnabled(x) || rm->isItemEnabled(x); ++ bool enabled = pm->isItemEnabled(x) || rm->isItemEnabled(x) || kickMenu->isItemEnabled(x) || banMenu->isItemEnabled(x); + delete pm; + + if(x == -1 || !enabled || lvi.isNull()) +diff --git a/src/groupchatdlg.cpp b/src/groupchatdlg.cpp +index 1397af3..baed25b 100644 +--- a/src/groupchatdlg.cpp ++++ b/src/groupchatdlg.cpp +@@ -76,6 +76,7 @@ + #include "psicontactlist.h" + #include "accountlabel.h" + #include "gcuserview.h" ++#include "mucreasonseditor.h" + #include "mcmdmanager.h" + + #include "mcmdsimplesite.h" +@@ -1712,6 +1713,32 @@ void GCMainDlg::lv_action(const QString &nick, const Status &s, int x) + if (contact->s.mucItem().role() != MUCItem::Moderator) + d->mucManager->setRole(nick, MUCItem::Moderator); + } ++ else if(x >= 100 && x<300) { ++ // Kick || Ban with reason ++ QString reason; ++ QStringList reasons = PsiOptions::instance()->getOption("options.muc.reasons").toStringList(); ++ if (x==100 || x==200) { ++ // Show custom reason dialog ++ MUCReasonsEditor *editor=new MUCReasonsEditor(this); ++ if (editor->exec()) ++ reason=editor->reason(); ++ delete editor; ++ } else { ++ int idx = (x<200) ? x-101 : x-201; ++ if (idx<reasons.count()) ++ reason=reasons[idx]; ++ } ++ if (!reason.isEmpty()) { ++ if (x<200) ++ d->mucManager->kick(nick, reason); ++ else { ++ GCUserViewItem *contact = (GCUserViewItem*) ui_.lv_users->findEntry(nick); ++ if (!contact) return; ++ d->mucManager->ban(contact->s.mucItem().jid(), reason); ++ } ++ } ++ ++ } + /*else if(x == 15) { + GCUserViewItem *contact = (GCUserViewItem*) ui_.lv_users->findEntry(nick); + if (contact->s.mucItem().affiliation() != MUCItem::NoAffiliation) +diff --git a/src/mucreasonseditor.cpp b/src/mucreasonseditor.cpp +new file mode 100644 +index 0000000..54117ba +--- /dev/null ++++ b/src/mucreasonseditor.cpp +@@ -0,0 +1,44 @@ ++#include "mucreasonseditor.h" ++#include "common.h" ++#include "psioptions.h" ++ ++ ++MUCReasonsEditor::MUCReasonsEditor(QWidget* parent) ++ : QDialog(parent) ++{ ++ ui_.setupUi(this); ++ ui_.lstReasons->addItems(PsiOptions::instance()->getOption("options.muc.reasons").toStringList()); ++} ++ ++MUCReasonsEditor::~MUCReasonsEditor() ++{ ++} ++ ++void MUCReasonsEditor::accept() ++{ ++ QStringList reasons; ++ int cnt=ui_.lstReasons->count(); ++ for (int i=0; i<cnt; ++i) ++ reasons.append(ui_.lstReasons->item(i)->text()); ++ PsiOptions::instance()->setOption("options.muc.reasons", reasons); ++ reason_=ui_.txtReason->text(); ++ QDialog::accept(); ++} ++ ++void MUCReasonsEditor::on_btnAdd_clicked() ++{ ++ reason_=ui_.txtReason->text().trimmed(); ++ if (reason_.isEmpty()) ++ return; ++ ui_.lstReasons->addItem(reason_); ++} ++ ++void MUCReasonsEditor::on_btnRemove_clicked() ++{ ++ int idx=ui_.lstReasons->currentRow(); ++ if (idx>=0) { ++ QListWidgetItem *item =ui_.lstReasons->takeItem(idx); ++ if (item) delete item; ++ } ++} ++ +diff --git a/src/mucreasonseditor.h b/src/mucreasonseditor.h +new file mode 100644 +index 0000000..765fb2e +--- /dev/null ++++ b/src/mucreasonseditor.h +@@ -0,0 +1,25 @@ ++#ifndef MUCREASONSEDITOR_H ++#define MUCREASONSEDITOR_H ++ ++#include <QDialog> ++ ++#include "ui_mucreasonseditor.h" ++ ++class MUCReasonsEditor: public QDialog ++{ ++ Q_OBJECT ++public: ++ MUCReasonsEditor(QWidget* parent = 0); ++ ~MUCReasonsEditor(); ++ QString reason() const { return reason_; } ++private: ++ Ui::MUCReasonsEditor ui_; ++ QString reason_; ++private slots: ++ void on_btnAdd_clicked(); ++ void on_btnRemove_clicked(); ++protected slots: ++ void accept(); ++}; ++ ++#endif +diff --git a/src/mucreasonseditor.ui b/src/mucreasonseditor.ui +new file mode 100644 +index 0000000..b1d9b8a +--- /dev/null ++++ b/src/mucreasonseditor.ui +@@ -0,0 +1,151 @@ ++<ui version="4.0" > ++ <class>MUCReasonsEditor</class> ++ <widget class="QDialog" name="MUCReasonsEditor" > ++ <property name="geometry" > ++ <rect> ++ <x>0</x> ++ <y>0</y> ++ <width>400</width> ++ <height>300</height> ++ </rect> ++ </property> ++ <property name="windowTitle" > ++ <string>Reason editor</string> ++ </property> ++ <layout class="QVBoxLayout" > ++ <property name="margin" > ++ <number>9</number> ++ </property> ++ <property name="spacing" > ++ <number>6</number> ++ </property> ++ <item> ++ <widget class="QGroupBox" name="groupBox" > ++ <property name="title" > ++ <string>Reasons</string> ++ </property> ++ <layout class="QVBoxLayout" > ++ <property name="margin" > ++ <number>9</number> ++ </property> ++ <property name="spacing" > ++ <number>6</number> ++ </property> ++ <item> ++ <widget class="QLineEdit" name="txtReason" > ++ <property name="text" > ++ <string/> ++ </property> ++ </widget> ++ </item> ++ <item> ++ <widget class="QListWidget" name="lstReasons" /> ++ </item> ++ <item> ++ <layout class="QHBoxLayout" > ++ <property name="margin" > ++ <number>0</number> ++ </property> ++ <property name="spacing" > ++ <number>6</number> ++ </property> ++ <item> ++ <widget class="QPushButton" name="btnAdd" > ++ <property name="text" > ++ <string>Add</string> ++ </property> ++ </widget> ++ </item> ++ <item> ++ <widget class="QPushButton" name="btnRemove" > ++ <property name="text" > ++ <string>Remove</string> ++ </property> ++ </widget> ++ </item> ++ </layout> ++ </item> ++ </layout> ++ </widget> ++ </item> ++ <item> ++ <layout class="QHBoxLayout" > ++ <property name="margin" > ++ <number>0</number> ++ </property> ++ <property name="spacing" > ++ <number>6</number> ++ </property> ++ <item> ++ <spacer> ++ <property name="orientation" > ++ <enum>Qt::Horizontal</enum> ++ </property> ++ <property name="sizeHint" > ++ <size> ++ <width>40</width> ++ <height>20</height> ++ </size> ++ </property> ++ </spacer> ++ </item> ++ <item> ++ <widget class="QPushButton" name="btnOk" > ++ <property name="text" > ++ <string>Ok</string> ++ </property> ++ <property name="autoDefault" > ++ <bool>false</bool> ++ </property> ++ <property name="default" > ++ <bool>true</bool> ++ </property> ++ </widget> ++ </item> ++ <item> ++ <widget class="QPushButton" name="btnCancel" > ++ <property name="text" > ++ <string>Cancel</string> ++ </property> ++ </widget> ++ </item> ++ </layout> ++ </item> ++ </layout> ++ </widget> ++ <resources/> ++ <connections> ++ <connection> ++ <sender>btnOk</sender> ++ <signal>clicked()</signal> ++ <receiver>MUCReasonsEditor</receiver> ++ <slot>accept()</slot> ++ <hints> ++ <hint type="sourcelabel" > ++ <x>265</x> ++ <y>271</y> ++ </hint> ++ <hint type="destinationlabel" > ++ <x>-2</x> ++ <y>287</y> ++ </hint> ++ </hints> ++ </connection> ++ <connection> ++ <sender>btnCancel</sender> ++ <signal>clicked()</signal> ++ <receiver>MUCReasonsEditor</receiver> ++ <slot>reject()</slot> ++ <hints> ++ <hint type="sourcelabel" > ++ <x>341</x> ++ <y>283</y> ++ </hint> ++ <hint type="destinationlabel" > ++ <x>81</x> ++ <y>272</y> ++ </hint> ++ </hints> ++ </connection> ++ </connections> ++</ui> +diff --git a/src/src.pri b/src/src.pri +index 2487038..1562bab 100644 +--- a/src/src.pri ++++ b/src/src.pri +@@ -190,6 +190,7 @@ HEADERS += \ + $$PWD/mucaffiliationsmodel.h \ + $$PWD/mucaffiliationsproxymodel.h \ + $$PWD/mucaffiliationsview.h \ ++ $$PWD/mucreasonseditor.h \ + $$PWD/rosteritemexchangetask.h \ + $$PWD/mood.h \ + $$PWD/moodcatalog.h \ +@@ -308,6 +309,7 @@ SOURCES += \ + $$PWD/mucaffiliationsmodel.cpp \ + $$PWD/mucaffiliationsproxymodel.cpp \ + $$PWD/mucaffiliationsview.cpp \ ++ $$PWD/mucreasonseditor.cpp \ + $$PWD/rosteritemexchangetask.cpp \ + $$PWD/mood.cpp \ + $$PWD/moodcatalog.cpp \ +@@ -411,6 +413,7 @@ INTERFACES += \ + $$PWD/optioneditor.ui \ + $$PWD/passphrase.ui \ + $$PWD/mucconfig.ui \ ++ $$PWD/mucreasonseditor.ui \ + $$PWD/xmlconsole.ui \ + $$PWD/disco.ui \ + $$PWD/tip.ui \ diff --git a/net-im/psi/files/psi-0.13-psi+options-coloring-in-chat-dialog.patch b/net-im/psi/files/psi-0.13-psi+options-coloring-in-chat-dialog.patch new file mode 100644 index 000000000000..30a50944f1d6 --- /dev/null +++ b/net-im/psi/files/psi-0.13-psi+options-coloring-in-chat-dialog.patch @@ -0,0 +1,272 @@ +commit 6e89fff225084fa685fe49438f4b7b4505dbf075 +Author: Martin H <textshell-I1QKlO@neutronstar.dyndns.org> +Date: Sun Aug 16 18:16:00 2009 +0200 + + Add new options for coloring in chat dialog and system messages in muc. + Based on patches from psi+ and Prados. + Spooled messages and system messages share the same color, because the color difference was almost unnoticable and it's not worth adding yet another option. + fixes #454 + +diff --git a/options/default.xml b/options/default.xml +index 74021f2..7b696bd 100644 +--- a/options/default.xml ++++ b/options/default.xml +@@ -244,6 +244,11 @@ + <item>Red</item> + </nick-colors> + </muc> ++ <messages comment="Message coloring."> ++ <received type="QColor" comment="Color used to indicate received messages.">#0000ff</received> ++ <sent type="QColor" comment="Color used to indicate sent messages.">#ff0000</sent> ++ <informational type="QColor" comment="Color used to indicate informational (status change, spooled) messages.">#008000</informational> ++ </messages> + <passive-popup> + <border type="QColor">#5297f9</border> + </passive-popup> +diff --git a/src/groupchatdlg.cpp b/src/groupchatdlg.cpp +index baed25b..8e0114d 100644 +--- a/src/groupchatdlg.cpp ++++ b/src/groupchatdlg.cpp +@@ -1458,7 +1458,7 @@ void GCMainDlg::updateLastMsgTime(QDateTime t) + bool doInsert = t.date() != lastMsgTime_.date(); + lastMsgTime_ = t; + if (doInsert) { +- QString color = "#00A000"; ++ QString color = PsiOptions::instance()->getOption("options.ui.look.colors.messages.informational").toString(); + ui_.log->appendText(QString("<font color=\"%1\">*** %2</font>").arg(color).arg(t.date().toString(Qt::ISODate))); + } + } +@@ -1477,7 +1477,8 @@ void GCMainDlg::appendSysMsg(const QString &str, bool alert, const QDateTime &ts + + updateLastMsgTime(time); + QString timestr = ui_.log->formatTimeStamp(time); +- ui_.log->appendText(QString("<font color=\"#00A000\">[%1]").arg(timestr) + QString(" *** %1</font>").arg(Qt::escape(str))); ++ QString color = PsiOptions::instance()->getOption("options.ui.look.colors.messages.informational").toString(); ++ ui_.log->appendText(QString("<font color=\"%1\">[%2]").arg(color, timestr) + QString(" *** %1</font>").arg(Qt::escape(str))); + + if(alert) + doAlert(); +@@ -1535,8 +1536,9 @@ void GCMainDlg::appendMessage(const Message &m, bool alert) + alerttagso = "<b>"; + alerttagsc = "</b>"; + } +- if(m.spooled()) +- nickcolor = "#008000"; //color = "#008000"; ++ if(m.spooled()) { ++ nickcolor = PsiOptions::instance()->getOption("options.ui.look.colors.messages.informational").toString(); ++ } + + QString timestr = ui_.log->formatTimeStamp(m.timeStamp()); + +diff --git a/src/historydlg.cpp b/src/historydlg.cpp +index 63b3b4f..eb1fb3f 100644 +--- a/src/historydlg.cpp ++++ b/src/historydlg.cpp +@@ -755,9 +755,13 @@ void HistoryViewItem::paintCell(QPainter *p, const QColorGroup & cg, int column, + { + QColorGroup mycg = cg; + if(e->originLocal()) +- mycg.setColor(QColorGroup::Text, Qt::red); ++{ ++ mycg.setColor(QColorGroup::Text, PsiOptions::instance()->getOption("options.ui.look.colors.messages.sent").toString() ); ++} + else +- mycg.setColor(QColorGroup::Text, Qt::blue); ++{ ++ mycg.setColor(QColorGroup::Text,PsiOptions::instance()->getOption("options.ui.look.colors.messages.received").toString() ); ++} + + if(column == 3) { + QBrush br; +diff --git a/src/options/opt_appearance.cpp b/src/options/opt_appearance.cpp +index b407824..b7e5c9d 100644 +--- a/src/options/opt_appearance.cpp ++++ b/src/options/opt_appearance.cpp +@@ -215,6 +215,9 @@ QWidget *OptionsTabAppearanceGeneral::widget() + bg_color->insert(d->pb_cAnimFront); + bg_color->insert(d->pb_cAnimBack); + bg_color->insert(d->pb_cStatus); ++ bg_color->insert(d->pb_cMessageSent); ++ bg_color->insert(d->pb_cMessageReceived); ++ bg_color->insert(d->pb_cSysMsg); + connect(bg_color, SIGNAL(buttonClicked(QAbstractButton*)), SLOT(chooseColor(QAbstractButton*))); + + QString s = tr("Specifies the text color for a contact name in the main window when that user is \"%1\"."); +@@ -238,6 +241,12 @@ QWidget *OptionsTabAppearanceGeneral::widget() + tr("Specifies the foreground animation color for nicks.")); + QWhatsThis::add(d->pb_cAnimBack, + tr("Specifies the background animation color for nicks.")); ++ QWhatsThis::add(d->pb_cMessageSent, ++ tr("Specifies the color for sent messages in chat and history windows.")); ++ QWhatsThis::add(d->pb_cMessageReceived, ++ tr("Specifies the color for received messages in chat and history windows.")); ++ QWhatsThis::add(d->pb_cSysMsg, ++ tr("Specifies the color for informational Messages in chat windows, like status changes and offline messages.")); + + // Avatars + //QWhatsThis::add(d->ck_avatarsChatdlg, +@@ -282,6 +291,9 @@ void OptionsTabAppearanceGeneral::applyOptions() + PsiOptions::instance()->setOption("options.ui.look.contactlist.status-change-animation.color1", getColor(d->pb_cAnimFront)); + PsiOptions::instance()->setOption("options.ui.look.contactlist.status-change-animation.color2", getColor(d->pb_cAnimBack)); + PsiOptions::instance()->setOption("options.ui.look.colors.contactlist.status-messages", getColor(d->pb_cStatus)); ++ PsiOptions::instance()->setOption("options.ui.look.colors.messages.received", getColor(d->pb_cMessageReceived)); ++ PsiOptions::instance()->setOption("options.ui.look.colors.messages.sent", getColor(d->pb_cMessageSent)); ++ PsiOptions::instance()->setOption("options.ui.look.colors.messages.informational", getColor(d->pb_cSysMsg)); + } + + static void restoreColor(QToolButton *button, QColor c) +@@ -315,6 +327,9 @@ void OptionsTabAppearanceGeneral::restoreOptions() + restoreColor(d->pb_cAnimFront, PsiOptions::instance()->getOption("options.ui.look.contactlist.status-change-animation.color1").value<QColor>()); + restoreColor(d->pb_cAnimBack, PsiOptions::instance()->getOption("options.ui.look.contactlist.status-change-animation.color2").value<QColor>()); + restoreColor(d->pb_cStatus, PsiOptions::instance()->getOption("options.ui.look.colors.contactlist.status-messages").value<QColor>()); ++ restoreColor(d->pb_cMessageReceived, PsiOptions::instance()->getOption("options.ui.look.colors.messages.received").value<QColor>()); ++ restoreColor(d->pb_cMessageSent, PsiOptions::instance()->getOption("options.ui.look.colors.messages.sent").value<QColor>()); ++ restoreColor(d->pb_cSysMsg, PsiOptions::instance()->getOption("options.ui.look.colors.messages.informational").value<QColor>()); + } + + void OptionsTabAppearanceGeneral::setData(PsiCon *, QWidget *parentDialog) +diff --git a/src/options/opt_appearance.ui b/src/options/opt_appearance.ui +index ed86f7e..306dc58 100644 +--- a/src/options/opt_appearance.ui ++++ b/src/options/opt_appearance.ui +@@ -165,6 +165,69 @@ + <string/> + </property> + </widget> ++ </item> ++ <item row="6" column="1" > ++ <widget class="QToolButton" name="pb_cMessageSent" > ++ <property name="sizePolicy" > ++ <sizepolicy> ++ <hsizetype>0</hsizetype> ++ <vsizetype>0</vsizetype> ++ <horstretch>0</horstretch> ++ <verstretch>0</verstretch> ++ </sizepolicy> ++ </property> ++ <property name="maximumSize" > ++ <size> ++ <width>20</width> ++ <height>20</height> ++ </size> ++ </property> ++ <property name="text" > ++ <string/> ++ </property> ++ </widget> ++ </item> ++ <item row="7" column="1"> ++ <widget class="QToolButton" name="pb_cMessageReceived" > ++ <property name="sizePolicy" > ++ <sizepolicy> ++ <hsizetype>0</hsizetype> ++ <vsizetype>0</vsizetype> ++ <horstretch>0</horstretch> ++ <verstretch>0</verstretch> ++ </sizepolicy> ++ </property> ++ <property name="maximumSize" > ++ <size> ++ <width>20</width> ++ <height>20</height> ++ </size> ++ </property> ++ <property name="text" > ++ <string/> ++ </property> ++ </widget> ++ </item> ++ <item row="8" column="1"> ++ <widget class="QToolButton" name="pb_cSysMsg"> ++ <property name="sizePolicy" > ++ <sizepolicy> ++ <hsizetype>0</hsizetype> ++ <vsizetype>0</vsizetype> ++ <horstretch>0</horstretch> ++ <verstretch>0</verstretch> ++ </sizepolicy> ++ </property> ++ <property name="maximumSize" > ++ <size> ++ <width>20</width> ++ <height>20</height> ++ </size> ++ </property> ++ <property name="text" > ++ <string/> ++ </property> ++ </widget> + </item> + <item row="1" column="1" > + <widget class="QToolButton" name="pb_cProfileBack" > +@@ -284,6 +347,27 @@ + <string>Nick animation background:</string> + </property> + </widget> ++ </item> ++ <item row="6" column="0"> ++ <widget class="QLabel" name="tl_cMessageSent" > ++ <property name="text" > ++ <string>Sent message foreground:</string> ++ </property> ++ </widget> ++ </item> ++ <item row="7" column="0"> ++ <widget class="QLabel" name="tl_cMessageReceived" > ++ <property name="text" > ++ <string>Received message foreground:</string> ++ </property> ++ </widget> ++ </item> ++ <item row="8" column="0"> ++ <widget class="QLabel" name="tl_cSysMsg"> ++ <property name="text"> ++ <string>Informational messages in chats:</string> ++ </property> ++ </widget> + </item> + <item row="0" column="0" > + <widget class="QLabel" name="tl_cProfileFore" > +@@ -498,6 +582,9 @@ + <tabstop>pb_cGroupBack</tabstop> + <tabstop>pb_cAnimFront</tabstop> + <tabstop>pb_cAnimBack</tabstop> ++ <tabstop>pb_cMessageSent</tabstop> ++ <tabstop>pb_cMessageReceived</tabstop> ++ <tabstop>pb_cSysMsg</tabstop> + <tabstop>pb_cOnline</tabstop> + <tabstop>pb_cAway</tabstop> + <tabstop>pb_cDND</tabstop> +diff --git a/src/psichatdlg.cpp b/src/psichatdlg.cpp +index cb5dc2e..8d35935 100644 +--- a/src/psichatdlg.cpp ++++ b/src/psichatdlg.cpp +@@ -532,20 +532,22 @@ void PsiChatDlg::appendSysMsg(const QString &str) + QDateTime t = QDateTime::currentDateTime(); + updateLastMsgTime(t); + QString timestr = chatView()->formatTimeStamp(t); +- QString color = "#00A000"; ++ QString color = PsiOptions::instance()->getOption("options.ui.look.colors.messages.informational").toString(); + + chatView()->appendText(QString("<font color=\"%1\">[%2]").arg(color, timestr) + QString(" *** %1</font>").arg(str)); + } + + QString PsiChatDlg::colorString(bool local, ChatDlg::SpooledType spooled) const + { +- if (spooled == ChatDlg::Spooled_OfflineStorage) +- return "#008000"; ++ if (spooled == ChatDlg::Spooled_OfflineStorage) { ++ return PsiOptions::instance()->getOption("options.ui.look.colors.messages.informational").toString(); ++ } + +- if (local) +- return "#FF0000"; ++ if (local) { ++ return PsiOptions::instance()->getOption("options.ui.look.colors.messages.sent").toString(); ++ } + +- return "#0000FF"; ++ return PsiOptions::instance()->getOption("options.ui.look.colors.messages.received").toString(); + } + + ChatView* PsiChatDlg::chatView() const diff --git a/net-im/psi/psi-0.13-r1.ebuild b/net-im/psi/psi-0.13-r1.ebuild new file mode 100644 index 000000000000..b520d66fd7a7 --- /dev/null +++ b/net-im/psi/psi-0.13-r1.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/psi/psi-0.13-r1.ebuild,v 1.1 2009/08/17 11:16:37 pva Exp $ + +EAPI="2" + +inherit eutils qt4 multilib + +MY_P="${P/_rc/-rc}" + +DESCRIPTION="Qt4 Jabber client, with Licq-like interface" +HOMEPAGE="http://psi-im.org/" +# Langpack: +# http://lists.affinix.com/pipermail/psi-devel-affinix.com/2009-August/008798.html +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2 + mirror://gentoo/${P}-20090817_langpack_for_packagers.zip + extras? ( mirror://gentoo/${PN}-extra-patches-r927.tar.bz2 + mirror://gentoo/${PN}-extra-iconsets-r927.tar.bz2 )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86 ~x86-fbsd" +IUSE="crypt dbus debug doc extras jingle spell ssl xscreensaver" +RESTRICT="test" + +LANGS="de es fr it mk pl pt_BR ru sv uk ur_PK zh_TW" +for LNG in ${LANGS}; do + IUSE="${IUSE} linguas_${LNG}" + #SRC_URI="${SRC_URI} http://psi-im.org/download/lang/psi_${LNG/ur_PK/ur_pk}.qm" +done + +RDEPEND=">=x11-libs/qt-gui-4.4:4[qt3support,dbus?] + >=app-crypt/qca-2.0.2:2 + spell? ( app-text/aspell ) + xscreensaver? ( x11-libs/libXScrnSaver )" + +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen )" + +PDEPEND="crypt? ( app-crypt/qca-gnupg:2 ) + jingle? ( net-im/psimedia ) + ssl? ( app-crypt/qca-ossl:2 )" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}/psi-0.13-psi+muc-kickban-reasons.patch" + epatch "${FILESDIR}/psi-0.13-psi+options-coloring-in-chat-dialog.patch" + + if use extras; then + # some patches from psi+ project http://code.google.com/p/psi-dev + ewarn "You're about to build heavily patched version of Psi called Psi+." + ewarn "It has really nice features but still is under heavy development." + ewarn "Take a look at homepage for more info: http://code.google.com/p/psi-dev" + ewarn "If you wish to disable some patches just put" + ewarn "MY_EPATCH_EXCLUDE=\"list of patches\"" + ewarn "into /etc/portage/env/${CATEGORY}/${PN} file." + ewarn + ewarn "Note: some patches depend on other. So if you disabled some patch" + ewarn "and other started to fail to apply, you'll have to disable patches" + ewarn "that fail too." + ebeep + + EPATCH_EXCLUDE="${MY_EPATCH_EXCLUDE} 270-psi-application-info.diff" \ + EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch + sed -e 's/\(^#define PROG_CAPS_NODE \).*/\1"http:\/\/psi-dev.googlecode.com\/caps";/' \ + -e 's:\(^#define PROG_NAME "Psi\):\1+:' \ + -i src/applicationinfo.cpp || die + fi + + rm -rf third-party/qca # We use system libraries. +} + +src_configure() { + # unable to use econf because of non-standard configure script + # disable growl as it is a MacOS X extension only + local confcmd="./configure + --prefix=/usr + --qtdir=/usr + --disable-bundled-qca + --disable-growl + $(use dbus || echo '--disable-qdbus') + $(use debug && echo '--enable-debug') + $(use spell || echo '--disable-aspell') + $(use xscreensaver || echo '--disable-xss')" + + echo ${confcmd} + ${confcmd} || die "configure failed" +} + +src_compile() { + eqmake4 + + emake || die "emake failed" + + if use doc; then + cd doc + mkdir -p api # 259632 + make api_public || die "make api_public failed" + fi +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die "emake install failed" + rm "${D}"/usr/share/psi/{COPYING,README} + + # this way the docs will be installed in the standard gentoo dir + newdoc iconsets/roster/README README.roster || die + newdoc iconsets/system/README README.system || die + newdoc certs/README README.certs || die + dodoc README || die + + if use doc; then + cd doc + dohtml -r api || die "dohtml failed" + fi + + # install translations + cd "${WORKDIR}" + insinto /usr/share/${PN}/ + for LNG in ${LANGS}; do + if use linguas_${LNG}; then + doins ${LNG}/${PN}_${LNG}.qm || die + fi + done + + if use extras; then + cp -a "${WORKDIR}"/iconsets/* "${D}"/usr/share/${PN}/iconsets/ || die + fi +} |