if (tor)
{
if (myPrefs->getBool (Prefs::SHOW_NOTIFICATION_ON_COMPLETE))
- notify (tr ("Torrent Completed"), tor->name ());
+ notifyApp (tr ("Torrent Completed"), tor->name ());
if (myPrefs->getBool (Prefs::COMPLETE_SOUND_ENABLED))
{
{
const int age_secs = tor->dateAdded ().secsTo (QDateTime::currentDateTime ());
if (age_secs < 30)
- notify (tr ("Torrent Added"), tor->name ());
+ notifyApp (tr ("Torrent Added"), tor->name ());
disconnect (tor, SIGNAL (torrentChanged (int)), this, SLOT (onNewTorrentChanged (int)));
}
bool
-MyApp :: notify (const QString& title, const QString& body) const
+MyApp :: notifyApp (const QString& title, const QString& body) const
{
const QString dbusServiceName = QString::fromUtf8 ("org.freedesktop.Notifications");
const QString dbusInterfaceName = QString::fromUtf8 ("org.freedesktop.Notifications");
public:
void raise ();
- bool notify (const QString& title, const QString& body) const;
+ bool notifyApp (const QString& title, const QString& body) const;
public:
Favicons favicons;
return icon;
}
-namespace
-{
- QSize calculateTextButtonSizeHint (QPushButton * button)
- {
- QStyleOptionButton opt;
- opt.initFrom (button);
- QString s (button->text ());
- if (s.isEmpty ())
- s = QString::fromLatin1 ("XXXX");
- QFontMetrics fm = button->fontMetrics ();
- QSize sz = fm.size (Qt::TextShowMnemonic, s);
- return button->style ()->sizeFromContents (QStyle::CT_PushButton, &opt, sz, button).expandedTo (QApplication::globalStrut ());
- }
-}
-
-
TrMainWindow :: TrMainWindow (Session& session, Prefs& prefs, TorrentModel& model, bool minimized):
myLastFullUpdateTime (0),
mySessionDialog (new SessionDialog (session, prefs, this)),
void
TrMainWindow :: openTorrent ()
{
+std::cerr << __FILE__ << ':' << __LINE__ << std::endl;
QFileDialog * d;
d = new QFileDialog (this,
tr ("Open Torrent"),
man.path = /share/man/man1/
man.files = transmission-qt.1
-CONFIG += qt thread debug link_pkgconfig c++11
+CONFIG += qt thread debug link_pkgconfig c++11 warn_on
QT += network dbus
PKGCONFIG = fontconfig libcurl openssl libevent