~ubuntu-branches/ubuntu/maverick/psi/maverick

« back to all changes in this revision

Viewing changes to src/common.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2006-01-20 00:20:36 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060120002036-7nw6yo6totip0ee5
Tags: 0.10-2
* Added upstream changelog (Closes: Bug#327748)
* Mention --no-gpg and --no-gpg-agent in manpage (Closes: Bug#204416)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include"psievent.h"
27
27
 
28
28
QString PROG_NAME = "Psi";
29
 
//QString PROG_VERSION = "0.10-CVS" " (" __DATE__ ")"; //CVS Builds are dated
30
 
QString PROG_VERSION = "0.9.3";
 
29
//QString PROG_VERSION = "0.11-dev" " (" __DATE__ ")"; //CVS Builds are dated
 
30
QString PROG_VERSION = "0.10";
31
31
 
32
32
#ifdef HAVE_CONFIG
33
 
#include"config.h"
 
33
#include "config.h"
34
34
#endif
35
35
 
36
 
#ifndef LIBDIR
37
 
#define LIBDIR "/usr/local/share/psi"
 
36
#ifndef PSI_DATADIR
 
37
#define PSI_DATADIR "/usr/local/share/psi"
38
38
#endif
39
39
 
40
40
#include<qregexp.h>
66
66
#include <CoreServices/CoreServices.h>
67
67
#endif
68
68
 
69
 
#include <sys/wait.h>
70
 
 
71
69
QString activeProfile;
72
70
 
73
 
QStringList dtcp_hostList;
74
 
int dtcp_port;
75
 
QString dtcp_proxy;
76
 
bool link_test = false;
 
71
//QStringList dtcp_hostList;
 
72
//int dtcp_port;
 
73
//QString dtcp_proxy;
 
74
//bool link_test = false;
77
75
bool use_gpg = true;
78
76
bool no_gpg_agent = false;
79
77
uint psi_dialog_flags = (Qt::WStyle_SysMenu | Qt::WStyle_MinMax);
751
749
                        trans = "msn";
752
750
                else if (type == "yahoo")
753
751
                        trans = "yahoo";
754
 
                else if (type == "gadugadu" || type == "x-gadugadu")
 
752
                else if (type == "gadu-gadu" || type == "x-gadugadu")
755
753
                        trans = "gadugadu";
756
754
                else if (type == "sms")
757
755
                        trans = "sms";
1139
1137
                LinuxSuSE,
1140
1138
                LinuxConectiva,
1141
1139
                LinuxCaldera,
 
1140
                LinuxLFS,
1142
1141
 
1143
1142
                LinuxASP, // Russian Linux distros
1144
1143
                LinuxALT,
1167
1166
                { LinuxPLD,             OsUseFile,      "/etc/pld-release",             "PLD Linux"             },
1168
1167
                { LinuxAurox,           OsUseName,      "/etc/aurox-release",           "Aurox Linux"           },
1169
1168
                { LinuxArch,            OsUseFile,      "/etc/arch-release",            "Arch Linux"            },
 
1169
                { LinuxLFS,             OsAppendFile,   "/etc/lfs-release",             "LFS Linux"             },
1170
1170
 
1171
1171
                // untested
1172
1172
                { LinuxSuSE,            OsUseFile,      "/etc/SuSE-release",            "SuSE Linux"            },
1206
1206
                }
1207
1207
        }
1208
1208
#elif defined(Q_WS_MAC)
1209
 
        os_str = "MacOS X";
 
1209
        os_str = "Mac OS X";
1210
1210
#endif
1211
1211
 
1212
1212
#if defined(Q_WS_WIN)
1280
1280
#ifdef Q_WS_X11
1281
1281
QString getResourcesDir()
1282
1282
{
1283
 
        return LIBDIR;
 
1283
        return PSI_DATADIR;
1284
1284
}
1285
1285
 
1286
1286
QString getHomeDir()
1453
1453
        return TRUE;
1454
1454
}
1455
1455
 
1456
 
#ifdef Q_WS_MAC
1457
 
static bool isDockTileBouncing = false;
1458
 
static NMRec bounceRec;
1459
 
 
1460
 
void stopDockTileBounce()
1461
 
{
1462
 
        if(isDockTileBouncing) {
1463
 
                NMRemove(&bounceRec);
1464
 
                isDockTileBouncing = false;
1465
 
        }
1466
 
}
1467
 
 
1468
 
void bounceDockTile()
1469
 
{
1470
 
        stopDockTileBounce();
1471
 
        bounceRec.qType = nmType;
1472
 
        bounceRec.nmMark = 1;
1473
 
        NMInstall(&bounceRec);
1474
 
        isDockTileBouncing = true;
1475
 
}
1476
 
#endif
1477
1456
 
1478
1457
void soundPlay(const QString &str)
1479
1458
{