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

« back to all changes in this revision

Viewing changes to src/widgets/urlobject.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-08-28 18:46:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080828184652-iiik12dl91nq7cdi
Tags: 0.12-2
Uploading to unstable (Closes: Bug#494352)

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
        Q_OBJECT
33
33
public:
34
34
        QString link;
35
 
        IconAction *act_mailto, *act_browser, *act_add_to_roster, *act_copy;
 
35
        IconAction *act_mailto, *act_join_groupchat, *act_send_message, *act_browser, *act_add_to_roster, *act_copy;
36
36
        URLObject *urlObject;
37
37
 
38
38
        Private(URLObject *parent)
53
53
                act_add_to_roster = new IconAction(tr, "psi/addContact", tr, 0, this);
54
54
                connect(act_add_to_roster, SIGNAL(activated()), SLOT(popupAction()));
55
55
 
 
56
                tr = qApp->translate("URLLabel", "Send massage to");
 
57
                act_send_message = new IconAction(tr, "psi/message", tr, 0, this);
 
58
                connect(act_send_message, SIGNAL(activated()), SLOT(popupAction()));
 
59
 
 
60
                tr = qApp->translate("URLLabel", "Join groupchat");
 
61
                act_join_groupchat = new IconAction(tr, "psi/groupChat", tr, 0, this);
 
62
                connect(act_join_groupchat, SIGNAL(activated()), SLOT(popupAction()));
 
63
 
56
64
                tr = qApp->translate("URLLabel", "Copy location");
57
65
                act_copy = new IconAction(tr, tr, 0, this);
58
66
                connect(act_copy, SIGNAL(activated()), SLOT(popupCopy()));
67
75
                        colon = 0;
68
76
                QString service = l.left( colon );
69
77
 
70
 
                if ( service == "mailto" || service == "jabber" || service == "jid" || service == "xmpp" ) {
 
78
                if ( service == "mailto" || service == "jabber" || service == "jid" || service == "xmpp" || service == "atstyle") {
71
79
                        if ( colon > -1 )
72
80
                                l = l.mid( colon + 1 );
73
81
 
141
149
 
142
150
        QMenu *m = new QMenu;
143
151
        
144
 
        if ( service == "mailto" ) {
 
152
        if ( service == "mailto" || service == "atstyle") {
145
153
                m->addAction(d->act_mailto);
146
154
        }
147
 
        else if ( service == "jabber" || service == "jid" || service == "xmpp" ) {
 
155
        else if ( service == "jabber" || service == "jid" || service == "xmpp" || service == "atstyle") {
148
156
                // TODO: need more actions to jabber item. Ex: "add to roster", "send message"
149
157
                m->addAction(d->act_add_to_roster);
 
158
                m->addAction(d->act_send_message);
 
159
                m->addAction(d->act_join_groupchat);
150
160
        }
151
161
        else { //if ( service == "http" || service == "https" || service.isEmpty() ) {
152
162
                m->addAction(d->act_browser);