Optimized columns of the channel tree.

Fixed german translation.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3666 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-10-11 22:39:47 +00:00
parent 76f51d05b3
commit d687019d01
5 changed files with 58 additions and 32 deletions

View File

@ -73,25 +73,22 @@ ChannelFeed::ChannelFeed(QWidget *parent)
connect(treeView, SIGNAL(customContextMenuRequested( QPoint ) ), this, SLOT( channelListCustomPopupMenu( QPoint ) ) ); connect(treeView, SIGNAL(customContextMenuRequested( QPoint ) ), this, SLOT( channelListCustomPopupMenu( QPoint ) ) );
mChannelId.clear(); mChannelId.clear();
model = new QStandardItemModel(0, 2, this);
model = new QStandardItemModel(0, COLUMN_COUNT, this);
model->setHeaderData(COLUMN_NAME, Qt::Horizontal, tr("Name"), Qt::DisplayRole); model->setHeaderData(COLUMN_NAME, Qt::Horizontal, tr("Name"), Qt::DisplayRole);
model->setHeaderData(COLUMN_POPULARITY, Qt::Horizontal, tr("Popularity"), Qt::DisplayRole); model->setHeaderData(COLUMN_POPULARITY, Qt::Horizontal, tr("Popularity"), Qt::DisplayRole);
treeView->setModel(model); treeView->setModel(model);
treeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
treeView->setItemDelegate(new ChanGroupDelegate()); treeView->setItemDelegate(new ChanGroupDelegate());
treeView->setRootIsDecorated(true);
connect(treeView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), this, SLOT(selectChannel(QModelIndex))); connect(treeView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), this, SLOT(selectChannel(QModelIndex)));
// hide header and id column
treeView->setHeaderHidden(true);
/* Set header resize modes and initial section sizes TreeView*/ /* Set header resize modes and initial section sizes TreeView*/
QHeaderView * _header = treeView->header () ; QHeaderView * _header = treeView->header () ;
_header->setResizeMode ( COLUMN_POPULARITY, QHeaderView::Custom); _header->setResizeMode ( COLUMN_NAME, QHeaderView::Stretch);
_header->resizeSection ( COLUMN_NAME, 190 ); _header->setResizeMode ( COLUMN_POPULARITY, QHeaderView::Fixed);
_header->resizeSection ( COLUMN_POPULARITY, 25 );
// set ChannelList Font // set ChannelList Font
itemFont = QFont("ARIAL", 10); itemFont = QFont("ARIAL", 10);

View File

@ -254,12 +254,27 @@ p, li { white-space: pre-wrap; }
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum> <enum>Qt::CustomContextMenu</enum>
</property> </property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>19</width> <width>19</width>
<height>19</height> <height>19</height>
</size> </size>
</property> </property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<attribute name="headerStretchLastSection">
<bool>false</bool>
</attribute>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<attribute name="headerStretchLastSection">
<bool>false</bool>
</attribute>
</widget> </widget>
</item> </item>
</layout> </layout>

View File

@ -58,7 +58,7 @@ void PeerStatus::getPeerStatus(unsigned int nFriendCount, unsigned int nOnlineCo
if (statusPeers) if (statusPeers)
statusPeers -> setText( tr("<strong>Friends:</strong>") + " " + QString::fromStdString(out.str()) + " | " + tr("<span style=\"color:#0000FF\"><strong>Online:</strong></span>") + " " + QString::fromStdString(out2.str()) ); statusPeers -> setText( "<strong>" + tr("Friends") + ":</strong> " + QString::fromStdString(out.str()) + " | <span style=\"color:#0000FF\"><strong>" + tr("Online") + ":</strong></span> " + QString::fromStdString(out2.str()) );
if (nOnlineCount > 0) if (nOnlineCount > 0)
{ {

View File

@ -856,7 +856,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>ChanMsgItem</name> <name>ChanMsgItem</name>
<message> <message>
<location filename="../gui/feeds/ChanMsgItem.ui" line="+229"/> <location filename="../gui/feeds/ChanMsgItem.ui" line="+235"/>
<source>Remove Item</source> <source>Remove Item</source>
<translation>Eintrag entfernen</translation> <translation>Eintrag entfernen</translation>
</message> </message>
@ -877,12 +877,21 @@ p, li { white-space: pre-wrap; }
<translation>Abspielen</translation> <translation>Abspielen</translation>
</message> </message>
<message> <message>
<location line="+62"/> <location line="+33"/>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Sans&apos;; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Toggle Message Read Status&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">Gelesen Status umschalten</translation>
</message>
<message>
<location line="+36"/>
<source>New</source> <source>New</source>
<translation>Neu</translation> <translation>Neu</translation>
</message> </message>
<message> <message>
<location line="-149"/> <location line="-156"/>
<source>Unsubscribe From Channel</source> <source>Unsubscribe From Channel</source>
<translation>Kanal abbestellen</translation> <translation>Kanal abbestellen</translation>
</message> </message>
@ -1005,9 +1014,9 @@ p, li { white-space: pre-wrap; }
<translation>Hinzufügen</translation> <translation>Hinzufügen</translation>
</message> </message>
<message> <message>
<location line="+340"/> <location line="+355"/>
<source>Set all to read</source> <source>Set all to read</source>
<translation type="unfinished"></translation> <translation>Alle als gelesen markieren</translation>
</message> </message>
<message> <message>
<location line="+100"/> <location line="+100"/>
@ -1035,7 +1044,7 @@ p, li { white-space: pre-wrap; }
<translation>Kanal abbestellen</translation> <translation>Kanal abbestellen</translation>
</message> </message>
<message> <message>
<location filename="../gui/ChannelFeed.cpp" line="+77"/> <location filename="../gui/ChannelFeed.cpp" line="+78"/>
<source>Name</source> <source>Name</source>
<translation>Name</translation> <translation>Name</translation>
</message> </message>
@ -1045,7 +1054,7 @@ p, li { white-space: pre-wrap; }
<translation>Beliebtheit</translation> <translation>Beliebtheit</translation>
</message> </message>
<message> <message>
<location line="+22"/> <location line="+18"/>
<source>Own Channels</source> <source>Own Channels</source>
<translation>Meine Kanäle</translation> <translation>Meine Kanäle</translation>
</message> </message>
@ -1065,7 +1074,7 @@ p, li { white-space: pre-wrap; }
<translation>Andere Kanäle</translation> <translation>Andere Kanäle</translation>
</message> </message>
<message> <message>
<location filename="../gui/ChannelFeed.ui" line="-147"/> <location filename="../gui/ChannelFeed.ui" line="-162"/>
<location filename="../gui/ChannelFeed.cpp" line="+37"/> <location filename="../gui/ChannelFeed.cpp" line="+37"/>
<source>Post to Channel</source> <source>Post to Channel</source>
<translation>Kanalbeitrag erstellen</translation> <translation>Kanalbeitrag erstellen</translation>
@ -1100,12 +1109,12 @@ Abgeholt: %2
Verfügbar: %3</translation> Verfügbar: %3</translation>
</message> </message>
<message> <message>
<location line="+134"/> <location line="+125"/>
<source>No Channel Selected</source> <source>No Channel Selected</source>
<translation>Keinen Kanal gewählt</translation> <translation>Keinen Kanal gewählt</translation>
</message> </message>
<message> <message>
<location line="-376"/> <location line="-367"/>
<source>Restore Publish Rights for Channel</source> <source>Restore Publish Rights for Channel</source>
<translation>Stelle Veröffentlichungsrechte für Kanal wieder her</translation> <translation>Stelle Veröffentlichungsrechte für Kanal wieder her</translation>
</message> </message>
@ -2089,6 +2098,11 @@ Möchten Sie die Änderungen speichern?</translation>
</message> </message>
<message> <message>
<location line="+12"/> <location line="+12"/>
<source>Key recipients can publish to restricted-type channels, and can view and publish for private-type channels </source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Share Private Publish Key</source> <source>Share Private Publish Key</source>
<translation>Verteile privaten Schlüssel</translation> <translation>Verteile privaten Schlüssel</translation>
</message> </message>
@ -4947,7 +4961,7 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished">Blogs</translation> <translation type="unfinished">Blogs</translation>
</message> </message>
<message> <message>
<location line="+562"/> <location line="+542"/>
<source>Internal Error</source> <source>Internal Error</source>
<translation>Interener Fehler</translation> <translation>Interener Fehler</translation>
</message> </message>
@ -5005,7 +5019,7 @@ p, li { white-space: pre-wrap; }
<translation>Schnellstart Assistent</translation> <translation>Schnellstart Assistent</translation>
</message> </message>
<message> <message>
<location filename="../gui/MainWindow.cpp" line="-298"/> <location filename="../gui/MainWindow.cpp" line="-278"/>
<source>Search</source> <source>Search</source>
<translation>Suchen</translation> <translation>Suchen</translation>
</message> </message>
@ -5020,7 +5034,7 @@ p, li { white-space: pre-wrap; }
<translation>Messenger</translation> <translation>Messenger</translation>
</message> </message>
<message> <message>
<location filename="../gui/MainWindow.cpp" line="+156"/> <location filename="../gui/MainWindow.cpp" line="+136"/>
<source>Show/Hide</source> <source>Show/Hide</source>
<translation>Anzeigen/Verbergen</translation> <translation>Anzeigen/Verbergen</translation>
</message> </message>
@ -5069,7 +5083,7 @@ p, li { white-space: pre-wrap; }
<translation>Maximieren</translation> <translation>Maximieren</translation>
</message> </message>
<message> <message>
<location line="-154"/> <location line="-134"/>
<source>Links Cloud</source> <source>Links Cloud</source>
<translation>Verknüpfungs-Wolke</translation> <translation>Verknüpfungs-Wolke</translation>
</message> </message>
@ -5084,7 +5098,7 @@ p, li { white-space: pre-wrap; }
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../gui/MainWindow.cpp" line="+509"/> <location filename="../gui/MainWindow.cpp" line="+489"/>
<source>Help</source> <source>Help</source>
<translation>Hilfe</translation> <translation>Hilfe</translation>
</message> </message>
@ -5094,7 +5108,7 @@ p, li { white-space: pre-wrap; }
<translation>Über</translation> <translation>Über</translation>
</message> </message>
<message> <message>
<location filename="../gui/MainWindow.cpp" line="-530"/> <location filename="../gui/MainWindow.cpp" line="-510"/>
<source>Forums</source> <source>Forums</source>
<translation>Foren</translation> <translation>Foren</translation>
</message> </message>
@ -5104,7 +5118,7 @@ p, li { white-space: pre-wrap; }
<translation>RetroShare %1 eine sichere und dezentralisierte Kommunikationsplattform</translation> <translation>RetroShare %1 eine sichere und dezentralisierte Kommunikationsplattform</translation>
</message> </message>
<message> <message>
<location line="+593"/> <location line="+573"/>
<source>Open Messages</source> <source>Open Messages</source>
<translation>Öffne Nachrichten</translation> <translation>Öffne Nachrichten</translation>
</message> </message>
@ -5114,12 +5128,12 @@ p, li { white-space: pre-wrap; }
<translation>Anwendungen</translation> <translation>Anwendungen</translation>
</message> </message>
<message> <message>
<location line="-517"/> <location line="-497"/>
<source>Plugins</source> <source>Plugins</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location line="+533"/> <location line="+513"/>
<source>Do you really want to exit RetroShare ?</source> <source>Do you really want to exit RetroShare ?</source>
<translation>Wollen Sie RetroShare wirklich beenden?</translation> <translation>Wollen Sie RetroShare wirklich beenden?</translation>
</message> </message>
@ -7086,13 +7100,13 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location line="+20"/> <location line="+20"/>
<source>&lt;strong&gt;Friends:&lt;/strong&gt;</source> <source>Friends</source>
<translation type="unfinished"></translation> <translation>Freunde</translation>
</message> </message>
<message> <message>
<location line="+0"/> <location line="+0"/>
<source>&lt;span style=&quot;color:#0000FF&quot;&gt;&lt;strong&gt;Online:&lt;/strong&gt;&lt;/span&gt;</source> <source>Online</source>
<translation>&lt;span style=&quot;color:#0000FF&quot;&gt;&lt;strong&gt;Online:&lt;/strong&gt;&lt;/span&gt;</translation> <translation>Online</translation>
</message> </message>
</context> </context>
<context> <context>