pkgsrc/chat/ickle/patches/patch-ab
hubertf 3a594413c7 Add ickle-0.3.2: Simplistic gtk+ icq client
ickle is an ICQ2000 Client using the GTK+ graphical toolkit. It aims to
bring all the useful features of ICQ2000 to non-windows users, such as
SMS messaging.

Contributed by blef@users.sourceforge.net via pkgsrc-wip.
2003-04-30 00:00:18 +00:00

132 lines
4.2 KiB
Text

$NetBSD: patch-ab,v 1.1.1.1 2003/04/30 00:00:19 hubertf Exp $
--- ickle/IckleClient.cpp.orig Fri Apr 11 22:32:26 2003
+++ ickle/IckleClient.cpp Fri Apr 11 22:34:32 2003
@@ -162,7 +162,7 @@
void IckleClient::loadContactList() {
Dir dir;
- dir.list( CONTACT_DIR + "*.user" );
+ dir.list( CONTACT_DIR + "/*.user" );
Dir::iterator dirit = dir.begin();
while( dirit != dir.end() ) {
@@ -190,7 +190,7 @@
exit(0);
break;
case 'b': // base dir
- BASE_DIR = string(optarg) + "/";
+ BASE_DIR = string(optarg);
break;
}
}
@@ -201,18 +201,18 @@
if (dir == NULL) dir = getenv("PWD");
if (dir != NULL) {
- BASE_DIR = string(dir) + "/.ickle/";
+ BASE_DIR = string(dir) + "/.ickle";
} else {
- BASE_DIR = ".ickle/";
+ BASE_DIR = ".ickle";
}
}
- CONTACT_DIR = BASE_DIR + "contacts/";
- DATA_DIR = string(PKGDATADIR) + "/";
- TRANSLATIONS_DIR = DATA_DIR + "translations/";
- ICONS_DIR = DATA_DIR + "icons/";
- PID_FILENAME = BASE_DIR + "ickle.pid";
+ CONTACT_DIR = BASE_DIR + "/contacts";
+ DATA_DIR = string(PKGDATADIR);
+ TRANSLATIONS_DIR = DATA_DIR + "/translations";
+ ICONS_DIR = DATA_DIR + "/icons";
+ PID_FILENAME = BASE_DIR + "/ickle.pid";
}
void IckleClient::usageInstructions(const char* progname) {
@@ -232,10 +232,10 @@
void IckleClient::loadSettings() {
// load in settings
try {
- g_settings.load(BASE_DIR + "ickle.conf");
+ g_settings.load(BASE_DIR + "/ickle.conf");
} catch (runtime_error& e) {
ostringstream ostr;
- ostr << "Couldn't open " << BASE_DIR << "ickle.conf, using default settings" << endl
+ ostr << "Couldn't open " << BASE_DIR << "/ickle.conf, using default settings" << endl
<< "This is probably the first time you've run ickle.";
SignalLog(ICQ2000::LogEvent::WARN, ostr.str());
}
@@ -401,7 +401,7 @@
if (!mkdir_BASE_DIR()) return;
- string ickle_conf = BASE_DIR + "ickle.conf";
+ string ickle_conf = BASE_DIR + "/ickle.conf";
// set umask to secure value, so that if ickle.conf doesn't exist, and is created it will be safe.
mode_t old_umask = umask(0077);
@@ -410,7 +410,7 @@
g_settings.save(ickle_conf);
} catch(runtime_error& e) {
ostringstream ostr;
- ostr << "Couldn't save " << BASE_DIR << "ickle.conf";
+ ostr << "Couldn't save " << BASE_DIR << "/ickle.conf";
SignalLog(ICQ2000::LogEvent::ERROR, ostr.str());
}
@@ -553,7 +553,7 @@
}
void IckleClient::logger_file_cb(const string& msg) {
- string log_file = BASE_DIR + "messages.log";
+ string log_file = BASE_DIR + "/messages.log";
// set umask to secure value, so that if ickle.conf doesn't exist, and is created it will be safe.
mode_t old_umask = umask(0077);
@@ -923,7 +923,7 @@
if (m_settingsmap.count(c->getUIN()) > 0) return;
ostringstream ostr;
- ostr << CONTACT_DIR << c->getUIN() << ".user";
+ ostr << CONTACT_DIR << "/" << c->getUIN() << ".user";
int n = 0;
struct stat fs;
@@ -934,7 +934,7 @@
while ( stat( filename.c_str(), &fs ) == 0 ) {
ostringstream ostr;
n++;
- ostr << CONTACT_DIR << c->getUIN() << "-" << n << ".user";
+ ostr << CONTACT_DIR << "/" << c->getUIN() << "-" << n << ".user";
filename = ostr.str();
}
m_settingsmap[c->getUIN()] = filename;
@@ -965,7 +965,7 @@
// remove history file for mobile users as well, we will not be able to correctly
// reuse this history file if the same user is added anyway
if( !c->isICQContact() )
- unlink( string(CONTACT_DIR + m_histmap[c->getUIN()]->getFilename()).c_str() );
+ unlink( string(CONTACT_DIR + "/" + m_histmap[c->getUIN()]->getFilename()).c_str() );
m_histmap.erase(c->getUIN());
m_settingsmap.erase(c->getUIN());
@@ -1035,7 +1035,7 @@
void IckleClient::saveSelfContact()
{
- saveContact( icqclient.getSelfContact(), BASE_DIR + "self.user", true );
+ saveContact( icqclient.getSelfContact(), BASE_DIR + "/" + "self.user", true );
}
void IckleClient::loadContact(const string& s, bool self)
@@ -1132,7 +1132,7 @@
void IckleClient::loadSelfContact()
{
try {
- loadContact( BASE_DIR + "self.user", true );
+ loadContact( BASE_DIR + "/" + "self.user", true );
} catch(runtime_error& e) {
// ignore
}