mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-10 15:20:25 -04:00
Added new return codes to RsInit::InitRetroShare to know, what failed.
Show error box when gpg initialization failed. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3744 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
89f448d282
commit
0e41211f3c
6 changed files with 208 additions and 112 deletions
|
@ -1193,7 +1193,7 @@ Verfügbar: %3</translation>
|
|||
<message>
|
||||
<location filename="../gui/settings/ChatPage.ui" line="+522"/>
|
||||
<source>Chat Settings</source>
|
||||
<translation>Chat EInstellungen</translation>
|
||||
<translation>Chat Einstellungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+6"/>
|
||||
|
@ -4225,7 +4225,7 @@ Fill in your GPG password when asked, to sign your new key.</source>
|
|||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+208"/>
|
||||
<location line="+222"/>
|
||||
<source>Click and drag the nodes around, and zoom with the mouse wheel or the '+' and '-' keys</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -6493,29 +6493,29 @@ Rechtsklick und als Freund hinzufügen um zu verbinden.</translation>
|
|||
<message>
|
||||
<location filename="../gui/NetworkDialog.ui" line="+111"/>
|
||||
<location line="+168"/>
|
||||
<location line="+235"/>
|
||||
<location line="+238"/>
|
||||
<source>Name</source>
|
||||
<translation>Name</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-398"/>
|
||||
<location line="+403"/>
|
||||
<location line="-401"/>
|
||||
<location line="+406"/>
|
||||
<source>Did I authenticated peer</source>
|
||||
<translation>Habe ich den Peer authentifiziert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-400"/>
|
||||
<location line="-403"/>
|
||||
<source>Did I sign his gpg key</source>
|
||||
<translation>Habe ich seinen GPG Schlüssel unterzeichnet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+10"/>
|
||||
<location line="+400"/>
|
||||
<location line="+403"/>
|
||||
<source>Cert Id</source>
|
||||
<translation>ID des Zertifikates</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-316"/>
|
||||
<location line="-319"/>
|
||||
<source>Search Network</source>
|
||||
<translation>Netzwerksuche</translation>
|
||||
</message>
|
||||
|
@ -6553,7 +6553,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Externer IP Adressen Finder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+121"/>
|
||||
<location line="+124"/>
|
||||
<source>Add Friend</source>
|
||||
<translation>Freund hinzufügen</translation>
|
||||
</message>
|
||||
|
@ -6583,18 +6583,18 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Willkommen bei RetroShare.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/NetworkDialog.ui" line="-566"/>
|
||||
<location filename="../gui/NetworkDialog.ui" line="-569"/>
|
||||
<source>Network</source>
|
||||
<translation>Netzwerk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+88"/>
|
||||
<location line="+400"/>
|
||||
<location line="+403"/>
|
||||
<source>Did peer authenticated me</source>
|
||||
<translation>Hat mich der Peer authentifiziert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-232"/>
|
||||
<location line="-235"/>
|
||||
<source>Show keys that are not validated by the GPG web of trust</source>
|
||||
<translation>Zeige Schlüssel, die nicht vom web of trust bestätigt sind</translation>
|
||||
</message>
|
||||
|
@ -6604,7 +6604,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Log</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+194"/>
|
||||
<location line="+197"/>
|
||||
<source>Clear</source>
|
||||
<translation>Leeren</translation>
|
||||
</message>
|
||||
|
@ -6704,16 +6704,29 @@ p, li { white-space: pre-wrap; }
|
|||
</message>
|
||||
<message>
|
||||
<location line="+4"/>
|
||||
<source>UPNP NOT FOUND.</source>
|
||||
<translation>UPNP wurde nicht gefunden.</translation>
|
||||
<source>UPNP not found or not enabled.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<source>DHT OK.</source>
|
||||
<translation>DHT OK.</translation>
|
||||
<source>DHT is running.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<location line="+4"/>
|
||||
<source>DHT is off.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>UPNP NOT FOUND.</source>
|
||||
<translation type="obsolete">UPNP wurde nicht gefunden.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>DHT OK.</source>
|
||||
<translation type="obsolete">DHT OK.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<source>Stun external address detection is working.</source>
|
||||
<translation>Stun externe Adresserkennung arbeitet.</translation>
|
||||
</message>
|
||||
|
@ -6743,17 +6756,16 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Externer IP Adress-Finder hat nichts gefunden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-27"/>
|
||||
<source>DHT is not working (down).</source>
|
||||
<translation>DHT läuft nicht.</translation>
|
||||
<translation type="obsolete">DHT läuft nicht.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/NetworkDialog.ui" line="-162"/>
|
||||
<location filename="../gui/NetworkDialog.ui" line="-165"/>
|
||||
<source>Network Status</source>
|
||||
<translation>Netzwerk-Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+167"/>
|
||||
<location line="+170"/>
|
||||
<source>Set Tabs Right</source>
|
||||
<translation>Setze Tabs nach Rechts</translation>
|
||||
</message>
|
||||
|
@ -6783,7 +6795,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Setze Tabs Form Dreieck</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-384"/>
|
||||
<location line="-387"/>
|
||||
<source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
|
@ -6801,7 +6813,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Peer ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/NetworkDialog.cpp" line="-90"/>
|
||||
<location filename="../gui/NetworkDialog.cpp" line="-117"/>
|
||||
<source>Sorry, create certificate failed</source>
|
||||
<translation>Zertifikat-Datei konnte nicht erstellt werden</translation>
|
||||
</message>
|
||||
|
@ -6819,54 +6831,69 @@ p, li { white-space: pre-wrap; }
|
|||
<context>
|
||||
<name>NetworkView</name>
|
||||
<message>
|
||||
<location filename="../gui/NetworkView.cpp" line="+306"/>
|
||||
<source>Hide Settings</source>
|
||||
<translation>Einstellungen verbergen</translation>
|
||||
<translation type="obsolete">Einstellungen verbergen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+4"/>
|
||||
<source>Show Settings</source>
|
||||
<translation>Einstellungen anzeigen</translation>
|
||||
<translation type="obsolete">Einstellungen anzeigen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/NetworkView.ui" line="+13"/>
|
||||
<location filename="../gui/NetworkView.ui" line="+14"/>
|
||||
<source>Form</source>
|
||||
<translation>Formular</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+38"/>
|
||||
<location line="+15"/>
|
||||
<source>background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 lightgray, stop:1 darkgray);</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<source>Refresh</source>
|
||||
<translation>Erneuern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+21"/>
|
||||
<source>Basic</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<source>Friends</source>
|
||||
<translation type="unfinished">Freunde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<source>Extended</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+8"/>
|
||||
<source>Display mode:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+17"/>
|
||||
<source>Friends level:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+20"/>
|
||||
<source>Edge length:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Settings</source>
|
||||
<translation>Einstellungen</translation>
|
||||
<translation type="obsolete">Einstellungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+35"/>
|
||||
<source>Show Friends of Friends</source>
|
||||
<translation>Zeige Freunde von Freunden</translation>
|
||||
<translation type="obsolete">Zeige Freunde von Freunden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+18"/>
|
||||
<source>Draw Friend Connections</source>
|
||||
<translation>Zeichne Verbindungen zwischen Freunden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-87"/>
|
||||
<source>background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
||||
stop:0 lightgray, stop:1 darkgray);
|
||||
|
||||
|
||||
|
||||
</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+76"/>
|
||||
<source>Connect Signature</source>
|
||||
<translation></translation>
|
||||
<translation type="obsolete">Zeichne Verbindungen zwischen Freunden</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -8541,7 +8568,24 @@ p, li { white-space: pre-wrap; }
|
|||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="+151"/>
|
||||
<location filename="../main.cpp" line="+75"/>
|
||||
<location line="+119"/>
|
||||
<source>RetroShare</source>
|
||||
<translation>RetroShare</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-113"/>
|
||||
<source>Inititialize failed. Wrong or missing installation of gpg.</source>
|
||||
<translation>Initialisierung fehlgeschlagen. GPG fehlt oder es ist eine falsche Version installiert.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<location line="+108"/>
|
||||
<source>An unexpected error occured. Please report 'RsInit::InitRetroShare unexpected return code %1'.</source>
|
||||
<translation>Ein unerwarteter Fehler ist aufgetreten. Bitte melde 'RsInit::InitRetroShare unexpected return code %1'.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-21"/>
|
||||
<location line="+6"/>
|
||||
<source>Multiple instances</source>
|
||||
<translation>Mehrere Instanzen</translation>
|
||||
|
@ -10127,12 +10171,12 @@ p, li { white-space: pre-wrap; }
|
|||
<context>
|
||||
<name>SplashScreen</name>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="-29"/>
|
||||
<location filename="../main.cpp" line="-28"/>
|
||||
<source>Load profile</source>
|
||||
<translation>Lade Profil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+35"/>
|
||||
<location line="+41"/>
|
||||
<source>Load configuration</source>
|
||||
<translation>Lade Konfiguration</translation>
|
||||
</message>
|
||||
|
|
|
@ -67,7 +67,28 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* RetroShare Core Objects */
|
||||
RsInit::InitRsConfig();
|
||||
bool okStart = RsInit::InitRetroShare(argc, argv);
|
||||
int initResult = RsInit::InitRetroShare(argc, argv);
|
||||
|
||||
if (initResult < 0) {
|
||||
/* Error occured */
|
||||
QApplication dummyApp (argc, argv); // needed for QMessageBox
|
||||
QMessageBox mb(QMessageBox::Critical, QObject::tr("RetroShare"), "", QMessageBox::Ok);
|
||||
mb.setWindowIcon(QIcon(":/images/rstray3.png"));
|
||||
|
||||
switch (initResult) {
|
||||
case RS_INIT_AUTH_FAILED:
|
||||
std::cerr << "RsInit::InitRetroShare AuthGPG::InitAuth failed" << std::endl;
|
||||
mb.setText(QObject::tr("Inititialize failed. Wrong or missing installation of gpg."));
|
||||
break;
|
||||
default:
|
||||
/* Unexpected return code */
|
||||
std::cerr << "RsInit::InitRetroShare unexpected return code " << initResult << std::endl;
|
||||
mb.setText(QObject::tr("An unexpected error occured. Please report 'RsInit::InitRetroShare unexpected return code %1'.").arg(initResult));
|
||||
break;
|
||||
}
|
||||
mb.exec();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* create global settings object
|
||||
path maybe wrong, when no profile exist
|
||||
|
@ -87,62 +108,63 @@ int main(int argc, char *argv[])
|
|||
|
||||
QSplashScreen splashScreen(QPixmap(":/images/splash.png")/* , Qt::WindowStaysOnTopHint*/);
|
||||
|
||||
/* Login Dialog */
|
||||
if (!okStart)
|
||||
{
|
||||
/* check for existing Certificate */
|
||||
std::string userName;
|
||||
|
||||
StartDialog *sd = NULL;
|
||||
bool genCert = false;
|
||||
std::list<std::string> accountIds;
|
||||
if (RsInit::getAccountIds(accountIds) && (accountIds.size() > 0))
|
||||
switch (initResult) {
|
||||
case RS_INIT_OK:
|
||||
{
|
||||
sd = new StartDialog();
|
||||
sd->show();
|
||||
/* Login Dialog */
|
||||
/* check for existing Certificate */
|
||||
std::string userName;
|
||||
|
||||
while(sd -> isVisible())
|
||||
StartDialog *sd = NULL;
|
||||
bool genCert = false;
|
||||
std::list<std::string> accountIds;
|
||||
if (RsInit::getAccountIds(accountIds) && (accountIds.size() > 0))
|
||||
{
|
||||
rshare.processEvents();
|
||||
sd = new StartDialog();
|
||||
sd->show();
|
||||
|
||||
while(sd -> isVisible())
|
||||
{
|
||||
rshare.processEvents();
|
||||
#ifdef WIN32
|
||||
Sleep(10);
|
||||
Sleep(10);
|
||||
#else // __LINUX__
|
||||
usleep(10000);
|
||||
usleep(10000);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* if we're logged in */
|
||||
genCert = sd->requestedNewCert();
|
||||
delete (sd);
|
||||
}
|
||||
else
|
||||
{
|
||||
genCert = true;
|
||||
}
|
||||
|
||||
/* if we're logged in */
|
||||
genCert = sd->requestedNewCert();
|
||||
delete (sd);
|
||||
if (genCert)
|
||||
{
|
||||
GenCertDialog gd;
|
||||
gd.exec ();
|
||||
}
|
||||
|
||||
splashScreen.show();
|
||||
}
|
||||
else
|
||||
break;
|
||||
case RS_INIT_HAVE_ACCOUNT:
|
||||
{
|
||||
genCert = true;
|
||||
}
|
||||
splashScreen.show();
|
||||
splashScreen.showMessage(rshare.translate("SplashScreen", "Load profile"), Qt::AlignHCenter | Qt::AlignBottom);
|
||||
|
||||
if (genCert)
|
||||
{
|
||||
GenCertDialog gd;
|
||||
gd.exec ();
|
||||
}
|
||||
std::string preferredId, gpgId, gpgName, gpgEmail, sslName;
|
||||
RsInit::getPreferedAccountId(preferredId);
|
||||
|
||||
splashScreen.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
splashScreen.show();
|
||||
splashScreen.showMessage(rshare.translate("SplashScreen", "Load profile"), Qt::AlignHCenter | Qt::AlignBottom);
|
||||
if (RsInit::getAccountDetails(preferredId, gpgId, gpgName, gpgEmail, sslName))
|
||||
{
|
||||
RsInit::SelectGPGAccount(gpgId);
|
||||
}
|
||||
|
||||
std::string preferredId, gpgId, gpgName, gpgEmail, sslName;
|
||||
RsInit::getPreferedAccountId(preferredId);
|
||||
|
||||
if (RsInit::getAccountDetails(preferredId,
|
||||
gpgId, gpgName, gpgEmail, sslName))
|
||||
{
|
||||
RsInit::SelectGPGAccount(gpgId);
|
||||
}
|
||||
|
||||
// true: note auto-login is active
|
||||
// true: note auto-login is active
|
||||
int retVal = RsInit::LockAndLoadCertificates(true);
|
||||
switch(retVal)
|
||||
{
|
||||
|
@ -164,6 +186,13 @@ int main(int argc, char *argv[])
|
|||
return 1;
|
||||
default: std::cerr << "StartDialog::loadCertificates() unexpected switch value " << retVal << std::endl;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* Unexpected return code */
|
||||
std::cerr << "RsInit::InitRetroShare unexpected return code " << initResult << std::endl;
|
||||
QMessageBox::warning(0, QObject::tr("RetroShare"), QObject::tr("An unexpected error occured. Please report 'RsInit::InitRetroShare unexpected return code %1'.").arg(initResult));
|
||||
return 1;
|
||||
}
|
||||
|
||||
splashScreen.showMessage(rshare.translate("SplashScreen", "Load configuration"), Qt::AlignHCenter | Qt::AlignBottom);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue