~ubuntu-branches/ubuntu/quantal/psi/quantal

« back to all changes in this revision

Viewing changes to src/ui_tip.ui.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-04-14 18:57:30 UTC
  • mfrom: (2.1.9 hardy)
  • Revision ID: james.westby@ubuntu.com-20080414185730-528re3zp0m2hdlhi
Tags: 0.11-8
* added CONFIG -= link_prl to .pro files and removed dependencies
  which are made unnecessary by this change
* Fix segfault when closing last chat tab with qt4.4
  (This is from upstream svn, rev. 1101) (Closes: Bug#476122)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
** ui.h extension file, included from the uic-generated form implementation.
3
 
**
4
 
** If you wish to add, delete or rename functions or slots use
5
 
** Qt Designer which will update this file, preserving your code. Create an
6
 
** init() function in place of a constructor, and a destroy() function in
7
 
** place of a destructor.
8
 
*****************************************************************************/
9
 
#include "common.h"
10
 
 
11
 
void TipUI::init()
12
 
{
13
 
#ifdef Q_WS_MAC
14
 
        lb_icon->setIcon(0);
15
 
#endif
16
 
 
17
 
        setCaption( CAP(caption()) );
18
 
        //ck_showTips->hide();
19
 
 
20
 
        // add useful tips here
21
 
        addTip( tr("Hello! Thank you for downloading Psi!\nWe hope that you will enjoy using it as we have enjoyed making it!\n"
22
 
                   "<br><br>If you want to download another language translation, iconset or a new version of Psi, then you need to visit the <a href=\"http://psi.affinix.com\">Psi HomePage</a>.\n"
23
 
                   "<br><br>If you think, that you have found a bug or you just want to chat with other Psi users, then visit the <a href=\"http://psi.affinix.com/forums/\">Psi Forums</a>.\n"
24
 
                   "<br><br><div align=\"right\"><i>the Psi Team</i></div>"), "" );
25
 
        addTip( tr("You can select multiple emoticon iconsets, and assign them priorities using the options dialog."), "" );
26
 
        addTip( tr("You can use multiple useful shortcuts while typing chat messages:<br>\n"
27
 
                   "<ul>\n"
28
 
                   "<li>Ctrl+Enter to send message</li>\n"
29
 
                   "<li>Ctrl+M to add newline character</li>\n"
30
 
                   "<li>Ctrl+H to display message history dialog</li>\n"
31
 
                   "<li>Alt+S to send message</li>\n"
32
 
                   "<li>Ctrl+U to clear edit buffer</li>\n"
33
 
                   "<li>Ctrl+PgUp/PgDn to scroll chat view</li>\n"
34
 
                   "</ul>"), "" );
35
 
        addTip( tr("You can type these special commands in chat and groupchat dialogs:\n"
36
 
                   "<ul>\n"
37
 
                   "<li>\"/clear\" to clear chat view</li>\n"
38
 
                   "<li>\"/me &lt;message&gt;\" '/me' is replaced by your nick</li>\n"
39
 
                   "</ul>\n"
40
 
                   "And these work only in groupchat dialog:\n"
41
 
                   "<ul>\n"
42
 
                   "<li>\"/nick &lt;new_nickname&gt;\" to change your nickname</li>\n"
43
 
                   "</ul>"), "" );
44
 
        addTip( tr("Did you know that you can register multiple Jabber accounts with Psi? If you like to separate your work from your personal account, you can.  If you are a power user who wants to test the latest Jabber features on an unstable server, you can do that -- without running a second client to connect to your stable server.  Just click Add in the Account Setup screen."),
45
 
                "Hal Rottenberg" );
46
 
        addTip( tr("Do you chat on third-party IM networks such as AIM and ICQ?  Try enabling the \"transport-specific icons\" option.  This will allow you to quickly see at a glance which network your buddy is using.  Then you can convince him to switch to Jabber. <icon name=\"psi/smile\">"),
47
 
                "Hal Rottenberg" );
48
 
        addTip( tr("Did you know that you can use checkboxes in Account Setup dialog to enable/disable accounts? This may be useful in the case of an account that you use rarely, so it will not clutter your roster."),
49
 
                "Iain MacDonnell" );
50
 
        addTip( tr("Don't like the buttons where they are?  Want a shortcut button to change your status to Away?  Check out the Configure Toolbars window, it's available through toolbars' context menu.  You can even make a toolbar that floats!"),
51
 
                "Hal Rottenberg" );
52
 
        addTip( tr("Did you know that Psi is one of the only Jabber clients that allows you to connect to multiple servers at the same time?  You can be known as \"mrcool@jabber.org\" to your friends, and \"John.J.Smith_the_fourth@mycompany.com\" to business associates."),
53
 
                "Hal Rottenberg" );
54
 
        addTip( tr("Have you converted over from Gadu-Gadu or Trillian and you miss the cool emoticons?  Fear not, we have you covered!  Check out <a href=\"http://jisp.netflint.net\">http://jisp.netflint.net</a> for tons of \"Iconsets\" that can be added to Psi to make it look the way you like!"),
55
 
                "Hal Rottenberg" );
56
 
        addTip( tr("Did you know that a middle-click (the middle mouse button on a 3-button mouse) will \"perform the default action\" on many objects within Psi?  Try middle-clicking on a contact or a popup."),
57
 
                "Hal Rottenberg" );
58
 
        addTip( tr("In order to add contacts from different IM networks, you need to add a corresponding agent from your Jabber server. Take a look at Psi Menu -> Service Discovery."),
59
 
                "Philipp Droessler" );
60
 
        addTip( tr("You can right-click on the server name in your roster to perform several different actions.  You can change status, modify account settings, perform administrative options (if you have permission), and more."),
61
 
                "Hal Rottenberg" );
62
 
        addTip( tr("Looking for a transport or chatroom, but your server provides nothing appropriate? Use Psi Menu -> Service Discovery to look on <i>any</i> Jabber Server for nice services by typing its domain in the address field.\n<br><br>\nNote: Some server may disable transport registration to users from different servers, but that's not common yet."),
63
 
                "Patrick Hanft" );
64
 
 
65
 
        // this MUST be the last tip
66
 
        addTip( tr("This is the last tip.\n<br><br>If you want to contribute your own \"tip of the day\", please publish it on the <a href=\"http://psi.affinix.com/forums\">Psi Forums</a> (or mail it to the one of the developers), and we'll be happy to integrate it for the next release."), "" );
67
 
 
68
 
        updateTip();
69
 
        ck_showTips->setChecked( option.showTips );
70
 
}
71
 
 
72
 
 
73
 
void TipUI::updateTip()
74
 
{
75
 
        if ( option.tipNum < 0 )
76
 
                option.tipNum = tips.count() - 1;
77
 
        if ( option.tipNum >= (int)tips.count() )
78
 
                option.tipNum = 0;
79
 
 
80
 
        tv_psi->setText( tips[option.tipNum] );
81
 
 
82
 
        option.tipNum++;
83
 
}
84
 
 
85
 
 
86
 
void TipUI::next()
87
 
{
88
 
        updateTip();
89
 
}
90
 
 
91
 
 
92
 
void TipUI::previous()
93
 
{
94
 
        option.tipNum -= 2;
95
 
        updateTip();
96
 
}
97
 
 
98
 
 
99
 
void TipUI::showTipsChanged( bool e )
100
 
{
101
 
        option.showTips = e;
102
 
}
103
 
 
104
 
 
105
 
void TipUI::addTip( QString tip, QString author )
106
 
{
107
 
        QString t = tip;
108
 
        if ( !author.isEmpty() )
109
 
                t += "<br><br><i>" + tr("Contributed by") + " " + author + "</i>";
110
 
 
111
 
        tips += t;
112
 
}