Added simple toaster for download complete.

Added new icon in MainWindow and systray icon for existing completed downloads.
You can enable/disable the toaster and the systray icon in NotifyPage.
Recompile of the GUI needed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3868 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-11-25 00:20:25 +00:00
parent e7813892bc
commit fc08d1171f
22 changed files with 656 additions and 70 deletions

View File

@ -55,6 +55,8 @@
#include "pqi/p3connmgr.h"
#include "pqi/pqinotify.h"
#include "retroshare/rsiface.h"
#include "serialiser/rsconfigitems.h"
#include <stdio.h>
#include <sstream>
@ -733,11 +735,13 @@ bool ftController::completeFile(std::string hash)
{
/* variables... so we can drop mutex later */
std::string path;
std::string name;
uint64_t size = 0;
uint32_t state = 0;
uint32_t period = 0;
uint32_t flags = 0;
uint32_t extraflags = 0;
uint32_t completeCount = 0;
{
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
@ -814,6 +818,7 @@ bool ftController::completeFile(std::string hash)
/* for extralist additions */
path = fc->mDestination;
name = fc->mName;
//hash = fc->mHash;
size = fc->mSize;
state = fc->mState;
@ -831,8 +836,10 @@ bool ftController::completeFile(std::string hash)
/* switch map */
if (!(fc->mFlags & RS_FILE_HINTS_CACHE)) /* clean up completed cache files automatically */
{
mCompleted[fc->mHash] = fc;
else
completeCount = mCompleted.size();
} else
delete fc ;
mDownloads.erase(it);
@ -903,6 +910,16 @@ bool ftController::completeFile(std::string hash)
#endif
}
/* Notify GUI */
if ((flags & RS_FILE_HINTS_CACHE) == 0) {
pqiNotify *notify = getPqiNotify();
if (notify) {
notify->AddPopupMessage(RS_POPUP_DOWNLOAD, hash, name, "");
}
rsicontrol->getNotify().notifyDownloadComplete(hash);
rsicontrol->getNotify().notifyDownloadCompleteCount(completeCount);
}
IndicateConfigChanged(); /* completed transfer -> save */
return true;
@ -1431,14 +1448,18 @@ bool ftController::FileClearCompleted()
#ifdef CONTROL_DEBUG
std::cerr << "ftController::FileClearCompleted()" <<std::endl;
#endif
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
{
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
for(std::map<std::string, ftFileControl*>::iterator it(mCompleted.begin());it!=mCompleted.end();++it)
delete it->second ;
for(std::map<std::string, ftFileControl*>::iterator it(mCompleted.begin());it!=mCompleted.end();++it)
delete it->second ;
mCompleted.clear();
mCompleted.clear();
IndicateConfigChanged();
IndicateConfigChanged();
} /******* UNLOCKED ********/
rsicontrol->getNotify().notifyDownloadCompleteCount(0);
return false;
}

View File

@ -200,6 +200,8 @@ class NotifyBase
virtual void notifyPeerStatusChangedSummary() {}
virtual void notifyChannelMsgReadSatusChanged(const std::string& /* channelId */, const std::string& /* msgId */, uint32_t /* status */) {}
virtual void notifyDiscInfoChanged() {}
virtual void notifyDownloadComplete(const std::string& /* fileHash */) {};
virtual void notifyDownloadCompleteCount(uint32_t /* count */) {};
virtual std::string askForPassword(const std::string& /* key_details */ ,bool /* prev_is_bad */ ) { return "" ;}
};

View File

@ -45,6 +45,7 @@ const uint32_t RS_POPUP_CHAT = 0x0002;
const uint32_t RS_POPUP_CALL = 0x0004;
const uint32_t RS_POPUP_CONNECT = 0x0008;
const uint32_t RS_SYSTRAY_GROUP_MSG = 0x0010;
const uint32_t RS_POPUP_DOWNLOAD = 0x0020;
/* CHAT flags are here - so they are in the same place as
* other Notify flags... not used by libretroshare though

View File

@ -274,6 +274,7 @@ HEADERS += rshare.h \
gui/toaster/MessageToaster.h \
gui/toaster/OnlineToaster.h \
gui/toaster/ChatToaster.h \
gui/toaster/DownloadToaster.h \
gui/toaster/CallToaster.h \
gui/toaster/QtToaster.h \
gui/toaster/IQtToaster.h \
@ -380,6 +381,7 @@ FORMS += gui/StartDialog.ui \
gui/toaster/ChatToaster.ui \
gui/toaster/MessageToaster.ui \
gui/toaster/OnlineToaster.ui \
gui/toaster/DownloadToaster.ui \
gui/advsearch/AdvancedSearchDialog.ui \
gui/advsearch/expressionwidget.ui \
gui/NewsFeed.ui \
@ -514,6 +516,7 @@ SOURCES += main.cpp \
gui/statusbar/hashingstatus.cpp \
gui/toaster/ChatToaster.cpp \
gui/toaster/MessageToaster.cpp \
gui/toaster/DownloadToaster.cpp \
gui/toaster/CallToaster.cpp \
gui/toaster/OnlineToaster.cpp \
gui/toaster/QtToaster.cpp \

View File

@ -211,7 +211,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
ui.stackPages->add(transfersDialog = new TransfersDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_TRANSFERS), tr("Transfers"), grp));
transferAction = createPageAction(QIcon(IMAGE_TRANSFERS), tr("Transfers"), grp));
ui.stackPages->add(sharedfilesDialog = new SharedFilesDialog(ui.stackPages),
@ -409,6 +409,11 @@ void MainWindow::createTrayIcon()
trayIconChat = new QSystemTrayIcon(this);
trayIconChat->setIcon(QIcon(":/images/chat.png"));
connect(trayIconChat, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayIconChatClicked(QSystemTrayIcon::ActivationReason)));
// Create the tray icon for transfers
trayIconTransfers = new QSystemTrayIcon(this);
trayIconTransfers->setIcon(QIcon(":/images/ktorrent32.png"));
connect(trayIconTransfers, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayIconTransfersClicked(QSystemTrayIcon::ActivationReason)));
}
/*static*/ void MainWindow::installGroupChatNotifier()
@ -501,6 +506,26 @@ void MainWindow::updateChannels(int type)
}
}
void MainWindow::updateTransfers(int count)
{
if (count) {
transferAction->setIcon(QIcon(":/images/transfers_new32.png")) ;
} else {
transferAction->setIcon(QIcon(IMAGE_TRANSFERS)) ;
}
if (count && (Settings->getTrayNotifyFlags() & TRAYNOTIFY_TRANSFERS)) {
if (count > 1) {
trayIconTransfers->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 completed downloads").arg(count));
} else {
trayIconTransfers->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 completed download").arg(count));
}
trayIconTransfers->show();
} else {
trayIconTransfers->hide();
}
}
void MainWindow::updateStatus()
{
// This call is essential to remove locks due to QEventLoop re-entrance while asking gpg passwds. Dont' remove it!
@ -935,6 +960,13 @@ void MainWindow::trayIconChatClicked(QSystemTrayIcon::ActivationReason e)
}
}
void MainWindow::trayIconTransfersClicked(QSystemTrayIcon::ActivationReason e)
{
if(e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick) {
showWindow(MainWindow::Transfers);
}
}
void MainWindow::toggleVisibilitycontextmenu()
{
if (isVisible())

View File

@ -145,6 +145,7 @@ public slots:
void updateMessages();
void updateForums();
void updateChannels(int type);
void updateTransfers(int count);
void privateChatChanged(int list, int type);
protected:
@ -167,6 +168,7 @@ private slots:
void trayIconForumsClicked(QSystemTrayIcon::ActivationReason e);
void trayIconChannelsClicked(QSystemTrayIcon::ActivationReason e);
void trayIconChatClicked(QSystemTrayIcon::ActivationReason e);
void trayIconTransfersClicked(QSystemTrayIcon::ActivationReason e);
/** Toolbar fns. */
void addFriend();
@ -233,6 +235,7 @@ private:
QSystemTrayIcon *trayIconForums;
QSystemTrayIcon *trayIconChannels;
QSystemTrayIcon *trayIconChat;
QSystemTrayIcon *trayIconTransfers;
QAction *toggleVisibilityAction, *toolAct;
QMenu *trayMenu;
@ -246,6 +249,7 @@ private:
QAction *messageAction;
QAction *forumAction;
QAction *channelAction;
QAction *transferAction;
/* Status */
std::set <QObject*> m_apStatusObjects; // added objects for status

View File

@ -380,6 +380,7 @@
<file>images/tab-undock.png</file>
<file>images/tag24.png</file>
<file>images/transferupdown.png</file>
<file>images/transfers_new32.png</file>
<file>images/tools_wizard.png</file>
<file>images/typing.png</file>
<file>images/trustsettings.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -17,6 +17,7 @@
#include "gui/toaster/MessageToaster.h"
#include "gui/toaster/ChatToaster.h"
#include "gui/toaster/CallToaster.h"
#include "gui/toaster/DownloadToaster.h"
#endif // MINIMAL_RSGUI
#include "gui/settings/rsharesettings.h"
@ -78,6 +79,21 @@ void NotifyQt::notifyDiscInfoChanged()
emit discInfoChanged() ;
}
void NotifyQt::notifyDownloadComplete(const std::string& fileHash)
{
std::cerr << "Notifyqt::notifyDownloadComplete notified that a download is completed" << std::endl;
emit downloadComplete(QString::fromStdString(fileHash));
}
void NotifyQt::notifyDownloadCompleteCount(uint32_t count)
{
std::cerr << "Notifyqt::notifyDownloadCompleteCount " << count << std::endl;
emit downloadCompleteCountChanged(count);
}
void NotifyQt::notifyDiskFull(uint32_t loc,uint32_t size_in_mb)
{
std::cerr << "Notifyqt:: notified that disk is full" << std::endl ;
@ -352,14 +368,21 @@ void NotifyQt::UpdateGUI()
uint32_t sysid;
uint32_t type;
std::string title, id, msg;
if (rsNotify->NotifyPopupMessage(type, id, title, msg))
{
uint popupflags = Settings->getNotifyFlags();
/* id the name */
std::string name = rsPeers->getPeerName(id);
std::string realmsg = "<strong>" + name + "</strong>";
std::string name;
std::string realmsg;
if (RS_POPUP_DOWNLOAD == RS_POPUP_DOWNLOAD) {
/* id = file hash */
} else {
name = rsPeers->getPeerName(id);
realmsg = "<strong>" + name + "</strong>";
}
unsigned char *data = NULL;
int size = 0 ;
@ -419,8 +442,14 @@ void NotifyQt::UpdateGUI()
onlineToaster->play();
}
break;
case RS_POPUP_DOWNLOAD:
if (popupflags & RS_POPUP_DOWNLOAD)
{
DownloadToaster *downloadToaster = new DownloadToaster();
downloadToaster->displayPopup(id, QString::fromUtf8(title.c_str()));
}
break;
}
}
if (rsNotify->NotifySysMessage(sysid, type, title, msg))

View File

@ -47,6 +47,8 @@ class NotifyQt: public QObject, public NotifyBase
virtual void notifyChannelMsgReadSatusChanged(const std::string& channelId, const std::string& msgId, uint32_t status);
virtual void notifyDiscInfoChanged() ;
virtual void notifyDownloadComplete(const std::string& fileHash);
virtual void notifyDownloadCompleteCount(uint32_t count);
virtual std::string askForPassword(const std::string& key_details,bool prev_is_bad) ;
/* Notify from GUI */
@ -82,6 +84,8 @@ class NotifyQt: public QObject, public NotifyBase
void privateChatChanged(int list, int type) const ;
void groupsChanged(int type) const ;
void discInfoChanged() const ;
void downloadComplete(const QString& /* fileHash */);
void downloadCompleteCountChanged(int /* count */);
void channelMsgReadSatusChanged(const QString& channelId, const QString& msgId, int status);
/* Notify from GUI */

View File

@ -71,9 +71,10 @@ NotifyPage::save(QString &errmsg)
if (ui.popup_Connect->isChecked())
notifyflags |= RS_POPUP_CONNECT;
if (ui.popup_NewMsg->isChecked())
notifyflags |= RS_POPUP_MSG;
if (ui.popup_DownloadFinished->isChecked())
notifyflags |= RS_POPUP_DOWNLOAD;
//if (ui.popup_NewChat->isChecked())
notifyflags |= RS_POPUP_CHAT;
@ -81,7 +82,6 @@ NotifyPage::save(QString &errmsg)
//if (ui.popup_Call->isChecked())
// notifyflags |= RS_POPUP_CALL;
if (ui.notify_Peers->isChecked())
newsflags |= RS_FEED_TYPE_PEER;
if (ui.notify_Channels->isChecked())
@ -112,6 +112,8 @@ NotifyPage::save(QString &errmsg)
traynotifyflags |= TRAYNOTIFY_CHANNELS;
if (ui.trayNotify_Forums->isChecked())
traynotifyflags |= TRAYNOTIFY_FORUMS;
if (ui.trayNotify_Transfer->isChecked())
traynotifyflags |= TRAYNOTIFY_TRANSFERS;
Settings->setNotifyFlags(notifyflags);
Settings->setTrayNotifyFlags(traynotifyflags);
@ -139,6 +141,7 @@ void NotifyPage::load()
ui.popup_Connect->setChecked(notifyflags & RS_POPUP_CONNECT);
ui.popup_NewMsg->setChecked(notifyflags & RS_POPUP_MSG);
ui.popup_DownloadFinished->setChecked(notifyflags & RS_POPUP_DOWNLOAD);
//ui.popup_NewChat->setChecked(notifyflags & RS_POPUP_CHAT);
//ui.popup_Call->setChecked(notifyflags & RS_POPUP_CALL);
@ -160,6 +163,7 @@ void NotifyPage::load()
ui.trayNotify_Messages->setChecked(traynotifyflags & TRAYNOTIFY_MESSAGES);
ui.trayNotify_Channels->setChecked(traynotifyflags & TRAYNOTIFY_CHANNELS);
ui.trayNotify_Forums->setChecked(traynotifyflags & TRAYNOTIFY_FORUMS);
ui.trayNotify_Transfer->setChecked(traynotifyflags & TRAYNOTIFY_TRANSFERS);
ui.addFeedsAtEnd->setChecked(Settings->getAddFeedsAtEnd());
}

View File

@ -609,6 +609,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="trayNotify_Transfer">
<property name="text">
<string>Download completed</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -655,6 +662,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_DownloadFinished">
<property name="text">
<string>Download completed</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@ -36,7 +36,8 @@
#define TRAYNOTIFY_MESSAGES 0x02
#define TRAYNOTIFY_CHANNELS 0x04
#define TRAYNOTIFY_FORUMS 0x08
#define TRAYNOTIFY_ALL 0x0F
#define TRAYNOTIFY_TRANSFERS 0x10
#define TRAYNOTIFY_ALL 0x1F
//Forward declaration.
class QWidget;

View File

@ -0,0 +1,129 @@
/****************************************************************
* This file is distributed under the following license:
*
* Copyright (C) 2007 - 2010 Xesc & Technology
* Copyright (c) 2010 RetroShare Team
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*************************************************************************/
#include <QTimer>
#include <QDesktopWidget>
#include <QDesktopServices>
#include <QMessageBox>
#include <QFileInfo>
#include "DownloadToaster.h"
#include <retroshare/rsfiles.h>
DownloadToaster::DownloadToaster(QWidget * parent, Qt::WFlags flags)
: QWidget(parent, flags)
{
setupUi(this);
/* set window flags */
QWidget::setWindowFlags(Qt::ToolTip | Qt::WindowStaysOnTopHint);
/* init the timer */
displayTimer = new QTimer(this);
connect(displayTimer, SIGNAL(timeout()), this, SLOT(displayTimerOnTimer()));
/* connect buttons */
connect(spbClose, SIGNAL(clicked()), this, SLOT(closeClicked()));
connect(startButton, SIGNAL(clicked()), this, SLOT(play()));
/* init state */
displayState = dsInactive;
}
DownloadToaster::~DownloadToaster()
{
delete displayTimer;
}
void DownloadToaster::displayTimerOnTimer()
{
if (!isVisible()) return;
QDesktopWidget *desktop = QApplication::desktop();
QRect availableGeometry = desktop->availableGeometry(this);
// display popup animation
if (displayState == dsShowing)
if (pos().x() > availableGeometry.width() - size().width())// - 15)
move(pos().x() - 2, pos().y());
else
{
displayState = dsWaiting;
displayTimer->start(5000);
}
// hide popup animation
else if (displayState == dsHiding)
if (pos().x() < availableGeometry.width())
move(pos().x() + 2, pos().y());
else
{
displayState = dsWaiting;
displayTimer->stop();
hide();
}
else if (displayState == dsWaiting)
{
displayState = dsHiding;
displayTimer->start(2);
}
}
void DownloadToaster::displayPopup(const std::string &hash, const QString &name)
{
fileHash = hash;
labelTitle->setText(name);
QDesktopWidget *desktop = QApplication::desktop();
QRect availableGeometry = desktop->availableGeometry(this);
move(desktop->width(), availableGeometry.height() - size().height());
show();
displayState = dsShowing;
displayTimer->start(2);
}
void DownloadToaster::closeClicked()
{
displayState = dsHiding;
displayTimer->start(2);
}
void DownloadToaster::play()
{
/* look up path */
FileInfo fi;
if (!rsFiles->FileDetails(fileHash, RS_FILE_HINTS_EXTRA | RS_FILE_HINTS_DOWNLOAD | RS_FILE_HINTS_SPEC_ONLY, fi)) {
return;
}
std::string filename = fi.path + "/" + fi.fname;
/* open file with a suitable application */
QFileInfo qinfo;
qinfo.setFile(filename.c_str());
if (qinfo.exists()) {
QDesktopServices::openUrl(QUrl::fromLocalFile(qinfo.absoluteFilePath()));
}else{
QMessageBox::information(this, "RetroShare", tr("File %1 does not exist at location.").arg(fi.path.c_str()));
}
}

View File

@ -0,0 +1,50 @@
/****************************************************************
* This file is distributed under the following license:
*
* Copyright (C) 2007 - 2010 Xesc & Technology
* Copyright (c) 2010 RetroShare Team
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*************************************************************************/
#ifndef DOWNLOADTOASTER_H
#define DOWNLOADTOASTER_H
#include "MessageToaster.h" // for DisplayState
#include "ui_DownloadToaster.h"
class DownloadToaster : public QWidget, public Ui::DownloadToaster
{
Q_OBJECT
public:
DownloadToaster(QWidget *parent = 0, Qt::WFlags f = 0);
~DownloadToaster();
void displayPopup(const std::string &hash, const QString &name);
private slots:
void displayTimerOnTimer();
void closeClicked();
void play();
private:
QTimer *displayTimer;
std::string fileHash;
DisplayState displayState;
};
#endif

View File

@ -0,0 +1,226 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DownloadToaster</class>
<widget class="QWidget" name="DownloadToaster">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>100</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string/>
</property>
<widget class="QLabel" name="labelTitle">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>241</width>
<height>61</height>
</rect>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>247</green>
<blue>221</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>247</green>
<blue>221</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>117</red>
<green>116</green>
<blue>118</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>247</green>
<blue>221</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
<widget class="QToolButton" name="startButton">
<property name="geometry">
<rect>
<x>260</x>
<y>43</y>
<width>31</width>
<height>31</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Start file</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/player_play.png</normaloff>:/images/player_play.png</iconset>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="lblTitle">
<property name="geometry">
<rect>
<x>28</x>
<y>1</y>
<width>248</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>&lt;b&gt;Download completed&lt;/b&gt;</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>4</x>
<y>3</y>
<width>16</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/accepted16.png</pixmap>
</property>
</widget>
<widget class="QToolButton" name="spbClose">
<property name="geometry">
<rect>
<x>279</x>
<y>1</y>
<width>20</width>
<height>20</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Close</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/closenormal.png</normaloff>:/images/closenormal.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>100</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/finished_background.png</pixmap>
</property>
</widget>
<zorder>label_2</zorder>
<zorder>labelTitle</zorder>
<zorder>startButton</zorder>
<zorder>lblTitle</zorder>
<zorder>label</zorder>
<zorder>spbClose</zorder>
</widget>
<tabstops>
<tabstop>startButton</tabstop>
<tabstop>spbClose</tabstop>
</tabstops>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -93,8 +93,6 @@ void MessageToaster::displayPopup()
move(desktop->width(), availableGeometry.height() - size().height());
this->show();
alpha = 0;
displayState = dsShowing;
displayTimer->start(2);
}

View File

@ -51,8 +51,6 @@ Q_OBJECT
private:
QTimer *displayTimer;
QString videoFile;
DisplayState displayState;
double alpha;
};
#endif

View File

@ -41,7 +41,9 @@ QtToaster::QtToaster(QObject *master, QWidget * toaster, QFrame * toasterWindowF
_toaster->setAttribute ( Qt::WA_DeleteOnClose, true );
_master = master;
WidgetBackgroundImage::setBackgroundImage(toasterWindowFrame, ":images/toaster/toaster-backrs4.png", WidgetBackgroundImage::AdjustSize);
if (toasterWindowFrame) {
WidgetBackgroundImage::setBackgroundImage(toasterWindowFrame, ":images/toaster/toaster-backrs4.png", WidgetBackgroundImage::AdjustSize);
}
_toaster->resize(184, 128);
}

View File

@ -1034,7 +1034,7 @@ p, li { white-space: pre-wrap; }
<translation>Geben sie einen Suchbegriff ein</translation>
</message>
<message>
<location line="+502"/>
<location line="+504"/>
<source>Set all to read</source>
<translation>Alle als gelesen markieren</translation>
</message>
@ -1049,7 +1049,7 @@ p, li { white-space: pre-wrap; }
<translation>Abbestellen</translation>
</message>
<message>
<location line="-391"/>
<location line="-393"/>
<source>Title</source>
<translation>Titel</translation>
</message>
@ -1059,7 +1059,7 @@ p, li { white-space: pre-wrap; }
<translation>Beschreibung</translation>
</message>
<message>
<location line="+411"/>
<location line="+413"/>
<source>Subscribe To Channel</source>
<translation>Kanal abonnieren</translation>
</message>
@ -1109,7 +1109,7 @@ p, li { white-space: pre-wrap; }
<translation>Beliebtheit: %1</translation>
</message>
<message>
<location filename="../gui/ChannelFeed.ui" line="-162"/>
<location filename="../gui/ChannelFeed.ui" line="-164"/>
<location filename="../gui/ChannelFeed.cpp" line="-370"/>
<source>Post to Channel</source>
<translation>Kanalbeitrag erstellen</translation>
@ -1422,7 +1422,7 @@ p, li { white-space: pre-wrap; }
<context>
<name>ConfCertDialog</name>
<message>
<location filename="../gui/connect/ConfCertDialog.ui" line="+633"/>
<location filename="../gui/connect/ConfCertDialog.ui" line="+647"/>
<source>Cancel</source>
<translation>Abbrechen</translation>
</message>
@ -1432,7 +1432,7 @@ p, li { white-space: pre-wrap; }
<translation>OK</translation>
</message>
<message>
<location line="-582"/>
<location line="-596"/>
<source>Peer Info</source>
<translation>Nachbar Info</translation>
</message>
@ -1452,7 +1452,7 @@ p, li { white-space: pre-wrap; }
<translation>Peer ID</translation>
</message>
<message>
<location line="+73"/>
<location line="+87"/>
<source>Peer Address</source>
<translation>Adresse des Nachbarn</translation>
</message>
@ -1493,7 +1493,7 @@ p, li { white-space: pre-wrap; }
<translation>Nachbar Schlüssel ist unterzeichnet von:</translation>
</message>
<message>
<location line="-381"/>
<location line="-395"/>
<source>Last Contact</source>
<translation>Letzter Kontakt</translation>
</message>
@ -1513,7 +1513,12 @@ p, li { white-space: pre-wrap; }
<translation>Ort</translation>
</message>
<message>
<location line="+44"/>
<location line="+28"/>
<source>Status</source>
<translation type="unfinished">Status</translation>
</message>
<message>
<location line="+30"/>
<source>Local Address</source>
<translation>Lokale Adresse</translation>
</message>
@ -1555,13 +1560,13 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="../gui/connect/ConfCertDialog.cpp" line="+125"/>
<location line="+195"/>
<location line="+201"/>
<source>RetroShare</source>
<translation></translation>
</message>
<message>
<location line="-194"/>
<location line="+195"/>
<location line="-200"/>
<location line="+201"/>
<source>Error : cannot get peer details.</source>
<translation>Fehler: Kann Peer Details nicht ermitteln.</translation>
</message>
@ -1638,7 +1643,7 @@ und meinen GPG Schlüssel nicht unterzeichnet</translation>
<translation>Zeige Hilfe</translation>
</message>
<message>
<location line="-319"/>
<location line="-333"/>
<source>RetroShare ID</source>
<translation></translation>
</message>
@ -1648,7 +1653,7 @@ und meinen GPG Schlüssel nicht unterzeichnet</translation>
<translation>Kopiere Nachbar</translation>
</message>
<message>
<location filename="../gui/connect/ConfCertDialog.ui" line="+475"/>
<location filename="../gui/connect/ConfCertDialog.ui" line="+489"/>
<source>Certificate</source>
<translation>Zertifikat</translation>
</message>
@ -2874,6 +2879,49 @@ Das ist nützlich, wenn Du eine externe Festplatte freigibst und die Datei nicht
<translation>Eingehende Ordner automatisch freigeben</translation>
</message>
</context>
<context>
<name>DownloadToaster</name>
<message>
<source>Play video</source>
<translation type="obsolete">Video abspielen</translation>
</message>
<message>
<source>Play button</source>
<translation type="obsolete">Abspielen Knopf</translation>
</message>
<message>
<source>Play the downloaded video</source>
<translation type="obsolete">Spiele das heruntergeladene Video ab</translation>
</message>
<message>
<location filename="../gui/toaster/DownloadToaster.ui" line="+121"/>
<source>Start file</source>
<translation>Starte Datei</translation>
</message>
<message>
<location line="+29"/>
<source>&lt;b&gt;Download completed&lt;/b&gt;</source>
<translation>&lt;b&gt;Download fertig&lt;/b&gt;</translation>
</message>
<message>
<location line="+32"/>
<source>Close</source>
<translation>Schliessen</translation>
</message>
<message>
<source>Download completed</source>
<translation type="obsolete">Download fertig</translation>
</message>
<message>
<source>Play File</source>
<translation type="obsolete">Datei abspielen</translation>
</message>
<message>
<location filename="../gui/toaster/DownloadToaster.cpp" line="+127"/>
<source>File %1 does not exist at location.</source>
<translation>Datei %1 existiert nicht.</translation>
</message>
</context>
<context>
<name>EditChanDetails</name>
<message>
@ -5082,7 +5130,17 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished">Blogs</translation>
</message>
<message>
<location line="+318"/>
<location line="+290"/>
<source>You have %1 completed downloads</source>
<translation>Du hast %1 fertige Downloads</translation>
</message>
<message>
<location line="+2"/>
<source>You have %1 completed download</source>
<translation>Du hast %1 fertigen Download</translation>
</message>
<message>
<location line="+51"/>
<source>Down: %1 (kB/s)</source>
<translation>Runter: %1 (kB/s)</translation>
</message>
@ -5097,7 +5155,7 @@ p, li { white-space: pre-wrap; }
<translation>%1 Freunde verbunden</translation>
</message>
<message>
<location line="+648"/>
<location line="+655"/>
<source>It seems to be an old RetroShare link. Please use copy instead.</source>
<translation>Es scheint ein alter RetroShare Link zu sein. Bitte kopiere den Link stattdessen.</translation>
</message>
@ -5107,7 +5165,7 @@ p, li { white-space: pre-wrap; }
<translation>Link ist fehlerhaft.</translation>
</message>
<message>
<location line="-656"/>
<location line="-663"/>
<source>%1 friend connected</source>
<translation>%1 Freund verbunden</translation>
</message>
@ -5133,13 +5191,15 @@ p, li { white-space: pre-wrap; }
<translation>Zeigen</translation>
</message>
<message>
<location line="-493"/>
<location line="+60"/>
<location line="-518"/>
<location line="+65"/>
<location line="+2"/>
<location line="+22"/>
<location line="+2"/>
<location line="+22"/>
<location line="+2"/>
<location line="+18"/>
<location line="+2"/>
<location line="+51"/>
<source>RetroShare</source>
<translation></translation>
@ -5171,7 +5231,7 @@ p, li { white-space: pre-wrap; }
<translation>Schnellstart Assistent</translation>
</message>
<message>
<location filename="../gui/MainWindow.cpp" line="-337"/>
<location filename="../gui/MainWindow.cpp" line="-362"/>
<source>Search</source>
<translation>Suchen</translation>
</message>
@ -5196,7 +5256,7 @@ p, li { white-space: pre-wrap; }
<translation>&amp;Schliessen</translation>
</message>
<message>
<location line="+65"/>
<location line="+70"/>
<location line="+24"/>
<location line="+24"/>
<source>You have %1 new messages</source>
@ -5210,7 +5270,7 @@ p, li { white-space: pre-wrap; }
<translation>Du hast %1 neue Nachricht</translation>
</message>
<message>
<location line="+310"/>
<location line="+330"/>
<source>Bandwidth Graph</source>
<translation>Bandbreiten-Graph</translation>
</message>
@ -5225,7 +5285,7 @@ p, li { white-space: pre-wrap; }
<translation>Schliessen</translation>
</message>
<message>
<location filename="../gui/MainWindow.cpp" line="-431"/>
<location filename="../gui/MainWindow.cpp" line="-456"/>
<source>Minimize</source>
<translation>Minimieren</translation>
</message>
@ -5250,7 +5310,7 @@ p, li { white-space: pre-wrap; }
<translation></translation>
</message>
<message>
<location filename="../gui/MainWindow.cpp" line="+564"/>
<location filename="../gui/MainWindow.cpp" line="+589"/>
<source>Help</source>
<translation>Hilfe</translation>
</message>
@ -5260,7 +5320,7 @@ p, li { white-space: pre-wrap; }
<translation>Über</translation>
</message>
<message>
<location filename="../gui/MainWindow.cpp" line="-585"/>
<location filename="../gui/MainWindow.cpp" line="-610"/>
<source>Forums</source>
<translation>Foren</translation>
</message>
@ -5270,7 +5330,7 @@ p, li { white-space: pre-wrap; }
<translation>RetroShare %1 eine sichere und dezentralisierte Kommunikationsplattform</translation>
</message>
<message>
<location line="+651"/>
<location line="+676"/>
<source>Open Messages</source>
<translation>Öffne Nachrichten</translation>
</message>
@ -5280,12 +5340,12 @@ p, li { white-space: pre-wrap; }
<translation>Anwendungen</translation>
</message>
<message>
<location line="-572"/>
<location line="-597"/>
<source>Plugins</source>
<translation></translation>
</message>
<message>
<location line="+588"/>
<location line="+613"/>
<source>Do you really want to exit RetroShare ?</source>
<translation>Willst Du RetroShare wirklich beenden?</translation>
</message>
@ -5295,7 +5355,7 @@ p, li { white-space: pre-wrap; }
<translation>Wirklich beenden?</translation>
</message>
<message>
<location line="-482"/>
<location line="-507"/>
<source>Low disk space warning</source>
<translation>Wenig Festplatenspeicher</translation>
</message>
@ -6956,7 +7016,13 @@ p, li { white-space: pre-wrap; }
<translation>Forumbeitrag</translation>
</message>
<message>
<location line="+27"/>
<location line="+7"/>
<location line="+53"/>
<source>Download completed</source>
<translation>Download fertig</translation>
</message>
<message>
<location line="-26"/>
<source>Toasters</source>
<translation></translation>
</message>
@ -6971,7 +7037,7 @@ p, li { white-space: pre-wrap; }
<translation>Neue Nachricht</translation>
</message>
<message>
<location line="+10"/>
<location line="+17"/>
<source>Private Chat</source>
<translation>Privater Chat</translation>
</message>
@ -7001,7 +7067,7 @@ p, li { white-space: pre-wrap; }
<translation>Zeige Systemabschnitts-Nachricht an</translation>
</message>
<message>
<location line="-129"/>
<location line="-143"/>
<source>Add feeds at end</source>
<translation>Feeds am Ende anfügen</translation>
</message>
@ -7009,7 +7075,7 @@ p, li { white-space: pre-wrap; }
<context>
<name>NotifyQt</name>
<message>
<location filename="../gui/notifyqt.cpp" line="+65"/>
<location filename="../gui/notifyqt.cpp" line="+67"/>
<source>GPG key passphrase</source>
<translation>GPG Schlüssel Passwort</translation>
</message>
@ -7024,7 +7090,7 @@ p, li { white-space: pre-wrap; }
<translation>Bitte geben Sie das Passwort ein um folgenden GPG Schlüssel freizuschalten:</translation>
</message>
<message>
<location line="+103"/>
<location line="+118"/>
<source>Examining shared files...</source>
<translation>Prüfe freigegebene Dateien...</translation>
</message>
@ -7042,7 +7108,7 @@ p, li { white-space: pre-wrap; }
<context>
<name>OnlineToaster</name>
<message>
<location filename="../gui/toaster/OnlineToaster.ui" line="+152"/>
<location filename="../gui/toaster/OnlineToaster.ui" line="+160"/>
<source>Friend Online</source>
<translation type="unfinished">Freund Online</translation>
</message>
@ -7899,7 +7965,7 @@ p, li { white-space: pre-wrap; }
<translation>Avatar zeigen</translation>
</message>
<message>
<location line="+308"/>
<location line="+315"/>
<source>File not found or file name not accepted.</source>
<translation>Datei nicht gefunden oder Dateiname nicht akzeptiert.</translation>
</message>
@ -7972,12 +8038,12 @@ p, li { white-space: pre-wrap; }
<translation>Durchgestrichen</translation>
</message>
<message>
<location filename="../gui/chat/PopupChatDialog.cpp" line="-254"/>
<location filename="../gui/chat/PopupChatDialog.cpp" line="-261"/>
<source>Add Extra File</source>
<translation>Zusätzlich eine Datei hinzufügen</translation>
</message>
<message>
<location line="+158"/>
<location line="+165"/>
<location line="+6"/>
<source>Drop file error.</source>
<translation>Dateifehler bei Drag&apos;n&apos;Drop.</translation>
@ -8009,7 +8075,7 @@ p, li { white-space: pre-wrap; }
<translation>Text Datei (*.txt );;Alle Dateien (*)</translation>
</message>
<message>
<location line="-712"/>
<location line="-719"/>
<source>Your Friend is offline
Do you want to send them a Message instead</source>
<translation>Dein Freund ist Offline willst du ihm stattdessen eine Nachricht senden</translation>
@ -8020,7 +8086,7 @@ Do you want to send them a Message instead</source>
<translation>Bild anhängen</translation>
</message>
<message>
<location filename="../gui/chat/PopupChatDialog.cpp" line="+754"/>
<location filename="../gui/chat/PopupChatDialog.cpp" line="+761"/>
<source>is Idle and may not reply</source>
<translation>antwortet möglicherweise nicht, da der Status auf &quot;Untätig&quot; gesetzt wurde</translation>
</message>
@ -8040,7 +8106,7 @@ Do you want to send them a Message instead</source>
<translation>ist Offline.</translation>
</message>
<message>
<location line="-712"/>
<location line="-719"/>
<source>Paste RetroShare Link</source>
<translation>RetroShare Link einfügen</translation>
</message>
@ -8531,18 +8597,18 @@ p, li { white-space: pre-wrap; }
<name>QObject</name>
<message>
<location filename="../main.cpp" line="+83"/>
<location line="+119"/>
<location line="+112"/>
<source>RetroShare</source>
<translation>RetroShare</translation>
</message>
<message>
<location line="-113"/>
<location line="-106"/>
<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"/>
<location line="+101"/>
<source>An unexpected error occured. Please report &apos;RsInit::InitRetroShare unexpected return code %1&apos;.</source>
<translation>Ein unerwarteter Fehler ist aufgetreten. Bitte melde &apos;RsInit::InitRetroShare unexpected return code %1&apos;.</translation>
</message>
@ -9942,22 +10008,22 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="../gui/SharedFilesDialog.cpp" line="-80"/>
<location line="+503"/>
<location line="+492"/>
<source>Open File</source>
<translation>Datei öffnen</translation>
</message>
<message>
<location line="-501"/>
<location line="-490"/>
<source>Open Folder</source>
<translation>Ordner öffnen</translation>
</message>
<message>
<location line="+510"/>
<location line="+499"/>
<source>Set command for opening this file</source>
<translation>Setze eine Regel zum Öffnen dieser Datei</translation>
</message>
<message>
<location line="-427"/>
<location line="-416"/>
<source>Copy retroshare Link</source>
<translation>Kopiere RetroShare Link</translation>
</message>
@ -10008,19 +10074,19 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location line="+98"/>
<location line="+387"/>
<location line="+376"/>
<source>Recommend in a message to</source>
<translation>Empfehle in einer Nachricht an</translation>
</message>
<message>
<location line="-261"/>
<location line="-250"/>
<location line="+23"/>
<location line="+24"/>
<source>RetroShare Link</source>
<translation>RetroShare Link</translation>
</message>
<message>
<location line="+91"/>
<location line="+80"/>
<location line="+1"/>
<location line="+23"/>
<location line="+1"/>

View File

@ -247,6 +247,7 @@ int main(int argc, char *argv[])
QObject::connect(notify,SIGNAL(messagesChanged()) ,w ,SLOT(updateMessages() )) ;
QObject::connect(notify,SIGNAL(forumsChanged()) ,w ,SLOT(updateForums() ), Qt::QueuedConnection);
QObject::connect(notify,SIGNAL(channelsChanged(int)) ,w ,SLOT(updateChannels(int) ), Qt::QueuedConnection);
QObject::connect(notify,SIGNAL(downloadCompleteCountChanged(int)) ,w ,SLOT(updateTransfers(int) ));
QObject::connect(notify,SIGNAL(chatStatusChanged(const QString&,const QString&,bool)),w->peersDialog,SLOT(updatePeerStatusString(const QString&,const QString&,bool)));
QObject::connect(notify,SIGNAL(peerHasNewAvatar(const QString&)),w->peersDialog,SLOT(updatePeersAvatar(const QString&)));