update view button

enabled for some strings translation to use (tr)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1145 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-04-29 17:48:25 +00:00
parent 88fa2715d5
commit 34c8e5108b
3 changed files with 34 additions and 6 deletions

View File

@ -119,18 +119,21 @@ NetworkDialog::NetworkDialog(QWidget *parent)
layout->setSpacing( 0 );
layout->setMargin( 0 );
ui.networkTab->addTab(new TrustView(),QString("Trust matrix"));
ui.networkTab->addTab(new TrustView(),QString(tr("Trust matrix")));
// Set Log infos
setLogInfo(tr("RetroShare %1 started.", "e.g: RetroShare v0.x started.").arg(retroshareVersion()));
setLogInfo(tr("Welcome to RetroShare."), QString::fromUtf8("blue"));
QMenu *menu = new QMenu("View");
QMenu *menu = new QMenu(tr("View"));
menu->addAction(ui.actionTabsright);
menu->addAction(ui.actionTabswest);
menu->addAction(ui.actionTabssouth);
menu->addAction(ui.actionTabsnorth);
menu->addAction(ui.actionTabsnorth);
menu->addSeparator();
menu->addAction(ui.actionTabsTriangular);
menu->addAction(ui.actionTabsRounded);
ui.viewButton->setMenu(menu);
@ -352,16 +355,16 @@ void NetworkDialog::insertConnect()
item -> setText(1, tr("Denied"));
if (rsPeers->isTrustingMe(detail.id) || detail.lastConnect>0)
item -> setText(2,QString("Is trusting me"));
item -> setText(2, tr("Is trusting me"));
else
item -> setText(2,QString("Unknown"));
item -> setText(2, tr("Unknown"));
/* (3) Last Connect */
{
std::ostringstream out;
// Show anouncement if a friend never was connected.
if (detail.lastConnect==0 )
item -> setText(3, QString("Never seen"));
item -> setText(3, tr("Never seen"));
else
{
// Dont Show a timestamp in RS calculate the day
@ -610,3 +613,15 @@ void NetworkDialog::on_actionTabswest_activated()
{
ui.networkTab->setTabPosition(QTabWidget::West);
}
void NetworkDialog::on_actionTabsTriangular_activated()
{
ui.networkTab->setTabShape(QTabWidget::Triangular);
ui.tabBottom->setTabShape(QTabWidget::Triangular);
}
void NetworkDialog::on_actionTabsRounded_activated()
{
ui.networkTab->setTabShape(QTabWidget::Rounded);
ui.tabBottom->setTabShape(QTabWidget::Rounded);
}

View File

@ -74,6 +74,9 @@ private slots:
void on_actionTabssouth_activated();
void on_actionTabswest_activated();
void on_actionTabsRounded_activated();
void on_actionTabsTriangular_activated();
private:

View File

@ -258,6 +258,16 @@ p, li { white-space: pre-wrap; }
<string>Set Tabs Left</string>
</property>
</action>
<action name="actionTabsRounded" >
<property name="text" >
<string>Set Tabs Rounded</string>
</property>
</action>
<action name="actionTabsTriangular" >
<property name="text" >
<string>Set Tabs Triangular</string>
</property>
</action>
</widget>
<resources/>
<connections/>