From 92c7c30c497d727c40de91ae37206104f420f70c Mon Sep 17 00:00:00 2001 From: Lucas Adam M Paul Date: Sun, 30 Nov 2008 13:36:57 -0700 Subject: [PATCH] OTHER: TODO Enable reconnect to xmms2d Done If Promoe loses its connection with xmms2d, it will now ask if you want to try reconnecting. --- AUTHORS | 4 ++++ src/application.cpp | 15 +++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/AUTHORS b/AUTHORS index 668c616..9ff7c41 100644 --- a/AUTHORS +++ b/AUTHORS @@ -24,6 +24,10 @@ N: Jonne Lehtinen E: jonne.lehtinen@tut.fi D: Lots of fixes. +N: Lucas Adam M Paul +E: reilithion@gmail.com +D: Some fixes + N: Tobias Rundström E: tru@xmms.org W: http://tobi.nu/ diff --git a/src/application.cpp b/src/application.cpp index 1f68016..8c127e5 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -94,13 +94,20 @@ Application::handleDisconnected () if (closingDown ()) return; - // TODO: enable reconnect - QMessageBox::critical( NULL, "xmms2 daemon disconnected", + int pressed = + QMessageBox::warning( NULL, "xmms2 daemon disconnected", "The xmms2 deamon has disconnected\n" "This could be because the server crashed\n" "or because another client has shut down the sever.", - "Quit Promoe"); - QApplication::quit (); + "Reconnect", "Quit Promoe"); + switch (pressed) + { + case 0: + m_xmms2_client->connect (); + break; + default: + QApplication::quit (); + } } int