]> granicus.if.org Git - transmission/commitdiff
Rework preferences dialog in Qt client to load from .ui
authorMike Gelfand <mikedld@mikedld.com>
Sun, 25 Jan 2015 15:47:03 +0000 (15:47 +0000)
committerMike Gelfand <mikedld@mikedld.com>
Sun, 25 Jan 2015 15:47:03 +0000 (15:47 +0000)
qt/CMakeLists.txt
qt/details.ui
qt/mainwin.cc
qt/mainwin.h
qt/prefs-dialog.cc
qt/prefs-dialog.h
qt/prefs-dialog.ui [new file with mode: 0644]
qt/qtr.pro

index d099d571de4e7dc1d1f66669fd0da79f827c41d4..209e6528f6ca62eba3fafa204852a928a99a9a67 100644 (file)
@@ -113,6 +113,7 @@ tr_qt_wrap_ui(${PROJECT_NAME}_UI_SOURCES
     make-dialog.ui
     make-progress-dialog.ui
     options.ui
+    prefs-dialog.ui
     relocate.ui
     session-dialog.ui
     stats-dialog.ui
index 2ed0e516f467848b2eb2c31f9150dea6d71cc7f2..bffa2138ef7097343425d598da83fd6e5696d3c0 100644 (file)
      <property name="currentIndex">
       <number>0</number>
      </property>
+     <property name="elideMode">
+      <enum>Qt::ElideNone</enum>
+     </property>
+     <property name="usesScrollButtons">
+      <bool>false</bool>
+     </property>
      <widget class="QWidget" name="infoTab">
       <attribute name="title">
        <string>Information</string>
          </item>
          <item row="0" column="2">
           <widget class="QDoubleSpinBox" name="ratioSpin">
-           <property name="minimum">
-            <double>0.500000000000000</double>
-           </property>
            <property name="maximum">
             <double>999999999.000000000000000</double>
            </property>
+           <property name="singleStep">
+            <double>0.500000000000000</double>
+           </property>
           </widget>
          </item>
         </layout>
index 383b57328f40877503347dfe039dcd3bcaa0744d..e17b7a683f797c2c0087cf98c1e82754b22aca7d 100644 (file)
@@ -82,7 +82,7 @@ TrMainWindow::getStockIcon (const QString& name, int fallback)
 TrMainWindow::TrMainWindow (Session& session, Prefs& prefs, TorrentModel& model, bool minimized):
   myLastFullUpdateTime (0),
   mySessionDialog (new SessionDialog (session, prefs, this)),
-  myPrefsDialog (0),
+  myPrefsDialog (),
   myAboutDialog (new AboutDialog (this)),
   myStatsDialog (new StatsDialog (session, this)),
   myDetailsDialog (0),
@@ -513,22 +513,20 @@ TrMainWindow::hideEvent (QHideEvent * event)
 *****
 ****/
 
-void
-TrMainWindow::onPrefsDestroyed ()
-{
-  myPrefsDialog = 0;
-}
-
 void
 TrMainWindow::openPreferences ()
 {
-  if (myPrefsDialog == 0)
+  if (myPrefsDialog.isNull ())
     {
       myPrefsDialog = new PrefsDialog (mySession, myPrefs, this);
-      connect (myPrefsDialog, SIGNAL (destroyed (QObject*)), this, SLOT (onPrefsDestroyed ()));
+      myPrefsDialog->setAttribute (Qt::WA_DeleteOnClose);
+      myPrefsDialog->show ();
+    }
+  else
+    {
+      myPrefsDialog->raise ();
+      myPrefsDialog->activateWindow ();
     }
-
-  myPrefsDialog->show ();
 }
 
 void
index da51f58593fe8b646d7d02ccad683310cae501a0..01d7b4af561c7d943b193ceb1118e877a85c8713 100644 (file)
@@ -15,6 +15,7 @@
 #include <QIcon>
 #include <QMainWindow>
 #include <QMap>
+#include <QPointer>
 #include <QPushButton>
 #include <QSet>
 #include <QSystemTrayIcon>
@@ -57,7 +58,7 @@ class TrMainWindow: public QMainWindow
   private:
     time_t myLastFullUpdateTime;
     QDialog * mySessionDialog;
-    QDialog * myPrefsDialog;
+    QPointer<QDialog> myPrefsDialog;
     QDialog * myAboutDialog;
     QDialog * myStatsDialog;
     Details * myDetailsDialog;
@@ -91,7 +92,6 @@ class TrMainWindow: public QMainWindow
     QWidgetList myHidden;
 
   private slots:
-    void onPrefsDestroyed ();
     void openPreferences ();
     void onDetailsDestroyed ();
     void showTotalRatio ();
index 0aceaef58d626d820b4339874c321e512e99075b..f11bcc2ab602aebbd0b9fd210fec8fff0bc18ba8 100644 (file)
@@ -33,6 +33,7 @@
 #include <QTimer>
 #include <QVBoxLayout>
 
+#include "column-resizer.h"
 #include "freespace-label.h"
 #include "formatter.h"
 #include "hig.h"
 namespace
 {
   const char * PREF_KEY ("pref-key");
+
+  void
+  setPrefKey (QObject * object, int key)
+  {
+    object->setProperty (PREF_KEY, key);
+  }
+
+  int
+  getPrefKey (const QObject * object)
+  {
+    return object->property (PREF_KEY).toInt ();
+  }
+
+  int
+  qtDayToTrDay (int day)
+  {
+    switch (day)
+    {
+      case Qt::Monday:
+        return TR_SCHED_MON;
+      case Qt::Tuesday:
+        return TR_SCHED_TUES;
+      case Qt::Wednesday:
+        return TR_SCHED_WED;
+      case Qt::Thursday:
+        return TR_SCHED_THURS;
+      case Qt::Friday:
+        return TR_SCHED_FRI;
+      case Qt::Saturday:
+        return TR_SCHED_SAT;
+      case Qt::Sunday:
+        return TR_SCHED_SUN;
+      default:
+        assert (0 && "Invalid day of week");
+        return 0;
+    }
+  }
+
+  QString
+  qtDayName (int day)
+  {
+    switch (day)
+    {
+      case Qt::Monday:
+        return PrefsDialog::tr ("Monday");
+      case Qt::Tuesday:
+        return PrefsDialog::tr ("Tuesday");
+      case Qt::Wednesday:
+        return PrefsDialog::tr ("Wednesday");
+      case Qt::Thursday:
+        return PrefsDialog::tr ("Thursday");
+      case Qt::Friday:
+        return PrefsDialog::tr ("Friday");
+      case Qt::Saturday:
+        return PrefsDialog::tr ("Saturday");
+      case Qt::Sunday:
+        return PrefsDialog::tr ("Sunday");
+      default:
+        assert (0 && "Invalid day of week");
+        return QString ();
+    }
+  }
 };
 
-void
-PrefsDialog::checkBoxToggled (bool checked)
-{
-  const int key (sender ()->property (PREF_KEY).toInt ());
-  setPref (key, checked);
+bool
+PrefsDialog::updateWidgetValue (QWidget * widget, int prefKey)
+{
+  if (auto w = qobject_cast<QCheckBox*> (widget))
+    w->setChecked (myPrefs.getBool (prefKey));
+  else if (auto w = qobject_cast<QSpinBox*> (widget))
+    w->setValue (myPrefs.getInt (prefKey));
+  else if (auto w = qobject_cast<QDoubleSpinBox*> (widget))
+    w->setValue (myPrefs.getDouble (prefKey));
+  else if (auto w = qobject_cast<QTimeEdit*> (widget))
+    w->setTime (QTime ().addSecs (myPrefs.getInt(prefKey) * 60));
+  else if (auto w = qobject_cast<QLineEdit*> (widget))
+    w->setText (myPrefs.getString (prefKey));
+  else
+    return false;
+
+  return true;
 }
 
-QCheckBox *
-PrefsDialog::checkBoxNew (const QString& text, int key)
+void
+PrefsDialog::linkWidgetToPref (QWidget * widget, int prefKey)
 {
-  QCheckBox * box = new QCheckBox (text);
-  box->setChecked (myPrefs.getBool (key));
-  box->setProperty (PREF_KEY, key);
-  connect (box, SIGNAL(toggled(bool)), this, SLOT(checkBoxToggled(bool)));
-  myWidgets.insert (key, box);
-  return box;
+  setPrefKey (widget, prefKey);
+  updateWidgetValue (widget, prefKey);
+  myWidgets.insert (prefKey, widget);
+
+  if (widget->inherits ("QCheckBox"))
+    connect (widget, SIGNAL (toggled (bool)), SLOT (checkBoxToggled (bool)));
+  else if (widget->inherits ("QTimeEdit"))
+    connect (widget, SIGNAL (editingFinished ()), SLOT (timeEditingFinished ()));
+  else if (widget->inherits ("QLineEdit"))
+    connect (widget, SIGNAL (editingFinished ()), SLOT (lineEditingFinished ()));
+  else if (widget->inherits ("QAbstractSpinBox"))
+    connect (widget, SIGNAL (editingFinished ()), SLOT (spinBoxEditingFinished ()));
 }
 
 void
-PrefsDialog::enableBuddyWhenChecked (QCheckBox * box, QWidget * buddy)
+PrefsDialog::checkBoxToggled (bool checked)
 {
-  connect (box, SIGNAL(toggled(bool)), buddy, SLOT(setEnabled(bool)));
-  buddy->setEnabled (box->isChecked ());
+  if (auto c = qobject_cast<QCheckBox*> (sender ()))
+    setPref (getPrefKey (c), checked);
 }
 
 void
 PrefsDialog::spinBoxEditingFinished ()
 {
   const QObject * spin = sender();
-  const int key = spin->property (PREF_KEY).toInt ();
-  const QDoubleSpinBox * d = qobject_cast<const QDoubleSpinBox*> (spin);
+  const int key = getPrefKey (spin);
 
-  if (d)
-    setPref (key, d->value ());
-  else
-    setPref (key, qobject_cast<const QSpinBox*>(spin)->value ());
-}
-
-QSpinBox *
-PrefsDialog::spinBoxNew (int key, int low, int high, int step)
-{
-  QSpinBox * spin = new QSpinBox ();
-  spin->setRange (low, high);
-  spin->setSingleStep (step);
-  spin->setValue (myPrefs.getInt (key));
-  spin->setProperty (PREF_KEY, key);
-  connect (spin, SIGNAL(editingFinished()), this, SLOT(spinBoxEditingFinished()));
-  myWidgets.insert (key, spin);
-  return spin;
-}
-
-QDoubleSpinBox *
-PrefsDialog::doubleSpinBoxNew (int key, double low, double high, double step, int decimals)
-{
-  QDoubleSpinBox * spin = new QDoubleSpinBox ();
-  spin->setRange (low, high);
-  spin->setSingleStep (step);
-  spin->setDecimals (decimals);
-  spin->setValue (myPrefs.getDouble (key));
-  spin->setProperty (PREF_KEY, key);
-  connect (spin, SIGNAL(editingFinished()), this, SLOT(spinBoxEditingFinished()));
-  myWidgets.insert (key, spin);
-  return spin;
+  if (auto e = qobject_cast<const QDoubleSpinBox*> (spin))
+    setPref (key, e->value ());
+  else if (auto e = qobject_cast<const QSpinBox*> (spin))
+    setPref (key, e->value ());
 }
 
 void
-PrefsDialog::timeEditingFinished()
-{
-  auto e = qobject_cast<QTimeEdit*>(sender());
-  if (e != nullptr)
-    {
-      const int key {e->property(PREF_KEY).toInt()};
-      const QTime t {e->time()};
-      const int minutes_after_midnight {t.hour()*60 + t.minute()};
-      setPref(key, minutes_after_midnight);
-    }
-}
-
-QTimeEdit*
-PrefsDialog::timeEditNew (int key)
+PrefsDialog::timeEditingFinished ()
 {
-  const int minutes {myPrefs.getInt(key)};
-  auto e = new QTimeEdit{};
-  e->setDisplayFormat(QString::fromUtf8("hh:mm"));
-  e->setProperty(PREF_KEY, key);
-  e->setTime(QTime{minutes/60, minutes%60});
-  myWidgets.insert(key, e);
-  connect(e, SIGNAL(editingFinished()), this, SLOT(timeEditingFinished()));
-  return e;
+  if (auto e = qobject_cast<const QTimeEdit*> (sender ()))
+    setPref(getPrefKey (e), QTime ().secsTo (e->time()) / 60);
 }
 
 void
 PrefsDialog::lineEditingFinished ()
 {
-  QLineEdit * e = qobject_cast<QLineEdit*>(sender());
-  if (e && e->isModified ())
+  if (auto e = qobject_cast<const QLineEdit*> (sender ()))
     {
-      const int key (e->property (PREF_KEY).toInt ());
-      const QString text (e->text());
-      setPref (key, text);
+      if (e->isModified ())
+        setPref (getPrefKey (e), e->text());
     }
 }
 
-QLineEdit*
-PrefsDialog::lineEditNew (int key, int echoMode)
-{
-  QLineEdit * e = new QLineEdit (myPrefs.getString (key));
-  e->setProperty (PREF_KEY, key);
-  e->setEchoMode (QLineEdit::EchoMode (echoMode));
-  myWidgets.insert (key, e);
-  connect (e, SIGNAL(editingFinished()), this, SLOT(lineEditingFinished()));
-  return e;
-}
-
 /***
 ****
 ***/
 
-QWidget *
-PrefsDialog::createRemoteTab (Session& session)
-{
-  HIG * hig = new HIG (this);
-  hig->addSectionTitle (tr ("Remote Control"));
-  QWidget * w;
-  QHBoxLayout * h = new QHBoxLayout ();
-  QPushButton * b = new QPushButton (tr ("&Open web client"));
-  connect (b, SIGNAL(clicked()), &session, SLOT(launchWebInterface()));
-  h->addWidget (b, 0, Qt::AlignRight);
-  QWidget * l = checkBoxNew (tr ("Allow &remote access"), Prefs::RPC_ENABLED);
-  myUnsupportedWhenRemote << l;
-  hig->addRow (l, h, 0);
-  l = hig->addRow (tr ("HTTP &port:"), w = spinBoxNew (Prefs::RPC_PORT, 0, 65535, 1));
-  myWebWidgets << l << w;
-  hig->addWideControl (w = checkBoxNew (tr ("Use &authentication"), Prefs::RPC_AUTH_REQUIRED));
-  myWebWidgets << w;
-  l = hig->addRow (tr ("&Username:"), w = lineEditNew (Prefs::RPC_USERNAME));
-  myWebAuthWidgets << l << w;
-  l = hig->addRow (tr ("Pass&word:"), w = lineEditNew (Prefs::RPC_PASSWORD, QLineEdit::Password));
-  myWebAuthWidgets << l << w;
-  hig->addWideControl (w = checkBoxNew (tr ("Only allow these IP a&ddresses:"), Prefs::RPC_WHITELIST_ENABLED));
-  myWebWidgets << w;
-  l = hig->addRow (tr ("Addresses:"), w = lineEditNew (Prefs::RPC_WHITELIST));
-  myWebWhitelistWidgets << l << w;
-  myUnsupportedWhenRemote << myWebWidgets << myWebAuthWidgets << myWebWhitelistWidgets;
-  hig->finish ();
-  return hig;
+void
+PrefsDialog::initRemoteTab ()
+{
+  linkWidgetToPref (ui.enableRpcCheck, Prefs::RPC_ENABLED);
+  linkWidgetToPref (ui.rpcPortSpin, Prefs::RPC_PORT);
+  linkWidgetToPref (ui.requireRpcAuthCheck, Prefs::RPC_AUTH_REQUIRED);
+  linkWidgetToPref (ui.rpcUsernameEdit, Prefs::RPC_USERNAME);
+  linkWidgetToPref (ui.rpcPasswordEdit, Prefs::RPC_PASSWORD);
+  linkWidgetToPref (ui.enableRpcWhitelistCheck, Prefs::RPC_WHITELIST_ENABLED);
+  linkWidgetToPref (ui.rpcWhitelistEdit, Prefs::RPC_WHITELIST);
+
+  myWebWidgets <<
+    ui.rpcPortLabel <<
+    ui.rpcPortSpin <<
+    ui.requireRpcAuthCheck <<
+    ui.enableRpcWhitelistCheck;
+  myWebAuthWidgets <<
+    ui.rpcUsernameLabel <<
+    ui.rpcUsernameEdit <<
+    ui.rpcPasswordLabel <<
+    ui.rpcPasswordEdit;
+  myWebWhitelistWidgets <<
+    ui.rpcWhitelistLabel <<
+    ui.rpcWhitelistEdit;
+  myUnsupportedWhenRemote <<
+    ui.enableRpcCheck <<
+    myWebWidgets <<
+    myWebAuthWidgets <<
+    myWebWhitelistWidgets;
+
+  connect (ui.openWebClientButton, SIGNAL (clicked ()), &mySession, SLOT (launchWebInterface ()));
 }
 
 /***
@@ -209,113 +233,64 @@ PrefsDialog::altSpeedDaysEdited (int i)
   setPref (Prefs::ALT_SPEED_LIMIT_TIME_DAY, value);
 }
 
-
-QWidget *
-PrefsDialog::createSpeedTab ()
+void
+PrefsDialog::initSpeedTab ()
 {
-  QWidget * l;
-  QSpinBox * r;
-  HIG * hig = new HIG (this);
-  hig->addSectionTitle (tr ("Speed Limits"));
   const QString speed_K_str = Formatter::unitStr (Formatter::SPEED, Formatter::KB);
-
-    l = checkBoxNew (tr ("&Upload:"), Prefs::USPEED_ENABLED);
-    r = spinBoxNew (Prefs::USPEED, 0, INT_MAX, 5);
-    r->setSuffix (QString::fromLatin1 (" %1").arg (speed_K_str));
-    hig->addRow (l, r);
-    enableBuddyWhenChecked (qobject_cast<QCheckBox*>(l), r);
-
-    l = checkBoxNew (tr ("&Download:"), Prefs::DSPEED_ENABLED);
-    r = spinBoxNew (Prefs::DSPEED, 0, INT_MAX, 5);
-    r->setSuffix (QString::fromLatin1 (" %1").arg (speed_K_str));
-    hig->addRow (l, r);
-    enableBuddyWhenChecked (qobject_cast<QCheckBox*>(l), r);
-
-  hig->addSectionDivider ();
-  QHBoxLayout * h = new QHBoxLayout;
-  h->setSpacing (HIG::PAD);
-  QLabel * label = new QLabel;
-  label->setPixmap (QPixmap (QString::fromUtf8 (":/icons/alt-limit-off.png")));
-  label->setAlignment (Qt::AlignLeft|Qt::AlignVCenter);
-  h->addWidget (label);
-  label = new QLabel (tr ("Alternative Speed Limits"));
-  label->setStyleSheet (QString::fromUtf8 ("font: bold"));
-  label->setAlignment (Qt::AlignLeft|Qt::AlignVCenter);
-  h->addWidget (label);
-  hig->addSectionTitle (h);
-
-    QString s = tr ("<small>Override normal speed limits manually or at scheduled times</small>");
-    hig->addWideControl (new QLabel (s));
-
-    s = tr ("U&pload:");
-    r = spinBoxNew (Prefs::ALT_SPEED_LIMIT_UP, 0, INT_MAX, 5);
-    r->setSuffix (QString::fromLatin1 (" %1").arg (speed_K_str));
-    hig->addRow (s, r);
-
-    s = tr ("Do&wnload:");
-    r = spinBoxNew (Prefs::ALT_SPEED_LIMIT_DOWN, 0, INT_MAX, 5);
-    r->setSuffix (QString::fromLatin1 (" %1").arg (speed_K_str));
-    hig->addRow (s, r);
-
-    QCheckBox * c = checkBoxNew (tr ("&Scheduled times:"), Prefs::ALT_SPEED_LIMIT_TIME_ENABLED);
-    h = new QHBoxLayout ();
-    h->setSpacing (HIG::PAD);
-    QWidget * w = timeEditNew (Prefs::ALT_SPEED_LIMIT_TIME_BEGIN);
-    h->addWidget (w, 1);
-    mySchedWidgets << w;
-    QLabel * nd = new QLabel (tr("&to"));
-    h->addWidget (nd);
-    mySchedWidgets << nd;
-    w = timeEditNew (Prefs::ALT_SPEED_LIMIT_TIME_END);
-    nd->setBuddy (w);
-    h->addWidget (w, 1);
-    mySchedWidgets << w;
-    hig->addRow (c, h, 0);
-
-    s = tr ("&On days:");
-    QComboBox * box = new QComboBox;
-    const QIcon noIcon;
-    box->addItem (noIcon, tr ("Every Day"), QVariant (TR_SCHED_ALL));
-    box->addItem (noIcon, tr ("Weekdays"),  QVariant (TR_SCHED_WEEKDAY));
-    box->addItem (noIcon, tr ("Weekends"),  QVariant (TR_SCHED_WEEKEND));
-    box->addItem (noIcon, tr ("Sunday"),    QVariant (TR_SCHED_SUN));
-    box->addItem (noIcon, tr ("Monday"),    QVariant (TR_SCHED_MON));
-    box->addItem (noIcon, tr ("Tuesday"),   QVariant (TR_SCHED_TUES));
-    box->addItem (noIcon, tr ("Wednesday"), QVariant (TR_SCHED_WED));
-    box->addItem (noIcon, tr ("Thursday"),  QVariant (TR_SCHED_THURS));
-    box->addItem (noIcon, tr ("Friday"),    QVariant (TR_SCHED_FRI));
-    box->addItem (noIcon, tr ("Saturday"),  QVariant (TR_SCHED_SAT));
-    box->setCurrentIndex (box->findData (myPrefs.getInt (Prefs::ALT_SPEED_LIMIT_TIME_DAY)));
-    connect (box, SIGNAL(activated(int)), this, SLOT(altSpeedDaysEdited(int)));
-    w = hig->addRow (s, box);
-    mySchedWidgets << w << box;
-
-  hig->finish ();
-  return hig;
+  const QLocale locale;
+
+  ui.uploadSpeedLimitSpin->setSuffix (QString::fromLatin1 (" %1").arg (speed_K_str));
+  ui.downloadSpeedLimitSpin->setSuffix (QString::fromLatin1 (" %1").arg (speed_K_str));
+  ui.altUploadSpeedLimitSpin->setSuffix (QString::fromLatin1 (" %1").arg (speed_K_str));
+  ui.altDownloadSpeedLimitSpin->setSuffix (QString::fromLatin1 (" %1").arg (speed_K_str));
+
+  ui.altSpeedLimitDaysCombo->addItem (tr ("Every Day"), QVariant (TR_SCHED_ALL));
+  ui.altSpeedLimitDaysCombo->addItem (tr ("Weekdays"),  QVariant (TR_SCHED_WEEKDAY));
+  ui.altSpeedLimitDaysCombo->addItem (tr ("Weekends"),  QVariant (TR_SCHED_WEEKEND));
+  ui.altSpeedLimitDaysCombo->insertSeparator (ui.altSpeedLimitDaysCombo->count ());
+  for (int i = locale.firstDayOfWeek (); i <= Qt::Sunday; ++i)
+    ui.altSpeedLimitDaysCombo->addItem (qtDayName (i), qtDayToTrDay (i));
+  for (int i = Qt::Monday; i < locale.firstDayOfWeek (); ++i)
+    ui.altSpeedLimitDaysCombo->addItem (qtDayName (i), qtDayToTrDay (i));
+  ui.altSpeedLimitDaysCombo->setCurrentIndex (ui.altSpeedLimitDaysCombo->findData (myPrefs.getInt (Prefs::ALT_SPEED_LIMIT_TIME_DAY)));
+
+  linkWidgetToPref (ui.uploadSpeedLimitCheck, Prefs::USPEED_ENABLED);
+  linkWidgetToPref (ui.uploadSpeedLimitSpin, Prefs::USPEED);
+  linkWidgetToPref (ui.downloadSpeedLimitCheck, Prefs::DSPEED_ENABLED);
+  linkWidgetToPref (ui.downloadSpeedLimitSpin, Prefs::DSPEED);
+  linkWidgetToPref (ui.altUploadSpeedLimitSpin, Prefs::ALT_SPEED_LIMIT_UP);
+  linkWidgetToPref (ui.altDownloadSpeedLimitSpin, Prefs::ALT_SPEED_LIMIT_DOWN);
+  linkWidgetToPref (ui.altSpeedLimitScheduleCheck, Prefs::ALT_SPEED_LIMIT_TIME_ENABLED);
+  linkWidgetToPref (ui.altSpeedLimitStartTimeEdit, Prefs::ALT_SPEED_LIMIT_TIME_BEGIN);
+  linkWidgetToPref (ui.altSpeedLimitEndTimeEdit, Prefs::ALT_SPEED_LIMIT_TIME_END);
+
+  mySchedWidgets <<
+    ui.altSpeedLimitStartTimeEdit <<
+    ui.altSpeedLimitToLabel <<
+    ui.altSpeedLimitEndTimeEdit <<
+    ui.altSpeedLimitDaysLabel <<
+    ui.altSpeedLimitDaysCombo;
+
+  ColumnResizer * cr (new ColumnResizer (this));
+  cr->addLayout (ui.speedLimitsSectionLayout);
+  cr->addLayout (ui.altSpeedLimitsSectionLayout);
+  cr->update ();
+
+  connect (ui.altSpeedLimitDaysCombo, SIGNAL (activated (int)), SLOT (altSpeedDaysEdited (int)));
 }
 
 /***
 ****
 ***/
 
-QWidget *
-PrefsDialog::createDesktopTab ()
+void
+PrefsDialog::initDesktopTab ()
 {
-  HIG * hig = new HIG (this);
-  hig->addSectionTitle (tr ("Desktop"));
-
-    hig->addWideControl (checkBoxNew (tr ("Show Transmission icon in the &notification area"), Prefs::SHOW_TRAY_ICON));
-    hig->addWideControl (checkBoxNew (tr ("Start &minimized in notification area"), Prefs::START_MINIMIZED));
-
-  hig->addSectionDivider ();
-  hig->addSectionTitle (tr ("Notification"));
-
-    hig->addWideControl (checkBoxNew (tr ("Show a notification when torrents are a&dded"), Prefs::SHOW_NOTIFICATION_ON_ADD));
-    hig->addWideControl (checkBoxNew (tr ("Show a notification when torrents &finish"), Prefs::SHOW_NOTIFICATION_ON_COMPLETE));
-    hig->addWideControl (checkBoxNew (tr ("Play a &sound when torrents finish"), Prefs::COMPLETE_SOUND_ENABLED));
-
-  hig->finish ();
-  return hig;
+  linkWidgetToPref (ui.showTrayIconCheck, Prefs::SHOW_TRAY_ICON);
+  linkWidgetToPref (ui.startMinimizedCheck, Prefs::START_MINIMIZED);
+  linkWidgetToPref (ui.notifyOnTorrentAddedCheck, Prefs::SHOW_NOTIFICATION_ON_ADD);
+  linkWidgetToPref (ui.notifyOnTorrentCompletedCheck, Prefs::SHOW_NOTIFICATION_ON_COMPLETE);
+  linkWidgetToPref (ui.playSoundOnTorrentCompletedCheck, Prefs::COMPLETE_SOUND_ENABLED);
 }
 
 /***
@@ -325,63 +300,44 @@ PrefsDialog::createDesktopTab ()
 void
 PrefsDialog::onPortTested (bool isOpen)
 {
-  myPortButton->setEnabled (true);
+  ui.testPeerPortButton->setEnabled (true);
   myWidgets[Prefs::PEER_PORT]->setEnabled (true);
-  myPortLabel->setText (isOpen ? tr ("Port is <b>open</b>")
-                               : tr ("Port is <b>closed</b>"));
+  ui.peerPortStatusLabel->setText (isOpen ? tr ("Port is <b>open</b>")
+                                          : tr ("Port is <b>closed</b>"));
 }
 
 void
 PrefsDialog::onPortTest ()
 {
-  myPortLabel->setText (tr ("Testing TCP Port..."));
-  myPortButton->setEnabled (false);
+  ui.peerPortStatusLabel->setText (tr ("Testing TCP Port..."));
+  ui.testPeerPortButton->setEnabled (false);
   myWidgets[Prefs::PEER_PORT]->setEnabled (false);
   mySession.portTest ();
 }
 
-QWidget *
-PrefsDialog::createNetworkTab ()
+void
+PrefsDialog::initNetworkTab ()
 {
-  HIG * hig = new HIG (this);
-  hig->addSectionTitle (tr ("Incoming Peers"));
-
-  QSpinBox * s = spinBoxNew (Prefs::PEER_PORT, 1, 65535, 1);
-  QHBoxLayout * h = new QHBoxLayout ();
-  QPushButton * b = myPortButton = new QPushButton (tr ("Te&st Port"));
-  QLabel * l = myPortLabel = new QLabel (tr ("Status unknown"));
-  h->addWidget (l);
-  h->addSpacing (HIG::PAD_BIG);
-  h->addWidget (b);
-  h->setStretchFactor (l, 1);
-  connect (b, SIGNAL(clicked(bool)), this, SLOT(onPortTest()));
-  connect (&mySession, SIGNAL(portTested(bool)), this, SLOT(onPortTested(bool)));
-
-  hig->addRow (tr ("&Port for incoming connections:"), s);
-  hig->addRow (QString(), h, 0);
-  hig->addWideControl (checkBoxNew (tr ("Pick a &random port every time Transmission is started"), Prefs::PEER_PORT_RANDOM_ON_START));
-  hig->addWideControl (checkBoxNew (tr ("Use UPnP or NAT-PMP port &forwarding from my router"), Prefs::PORT_FORWARDING));
-
-  hig->addSectionDivider ();
-  hig->addSectionTitle (tr ("Peer Limits"));
-  hig->addRow (tr ("Maximum peers per &torrent:"), spinBoxNew (Prefs::PEER_LIMIT_TORRENT, 1, FD_SETSIZE, 5));
-  hig->addRow (tr ("Maximum peers &overall:"), spinBoxNew (Prefs::PEER_LIMIT_GLOBAL, 1, FD_SETSIZE, 5));
+  ui.torrentPeerLimitSpin->setRange (1, FD_SETSIZE);
+  ui.globalPeerLimitSpin->setRange (1, FD_SETSIZE);
 
-  hig->addSectionDivider ();
-  hig->addSectionTitle (tr ("Options"));
+  linkWidgetToPref (ui.peerPortSpin, Prefs::PEER_PORT);
+  linkWidgetToPref (ui.randomPeerPortCheck, Prefs::PEER_PORT_RANDOM_ON_START);
+  linkWidgetToPref (ui.enablePortForwardingCheck, Prefs::PORT_FORWARDING);
+  linkWidgetToPref (ui.torrentPeerLimitSpin, Prefs::PEER_LIMIT_TORRENT);
+  linkWidgetToPref (ui.globalPeerLimitSpin, Prefs::PEER_LIMIT_GLOBAL);
+  linkWidgetToPref (ui.enableUtpCheck, Prefs::UTP_ENABLED);
+  linkWidgetToPref (ui.enablePexCheck, Prefs::PEX_ENABLED);
+  linkWidgetToPref (ui.enableDhtCheck, Prefs::DHT_ENABLED);
+  linkWidgetToPref (ui.enableLpdCheck, Prefs::LPD_ENABLED);
 
-  QWidget * w;
-  hig->addWideControl (w = checkBoxNew (tr ("Enable &uTP for peer connections"), Prefs::UTP_ENABLED));
-  w->setToolTip (tr ("uTP is a tool for reducing network congestion."));
-  hig->addWideControl (w = checkBoxNew (tr ("Use PE&X to find more peers"), Prefs::PEX_ENABLED));
-  w->setToolTip (tr ("PEX is a tool for exchanging peer lists with the peers you're connected to."));
-  hig->addWideControl (w = checkBoxNew (tr ("Use &DHT to find more peers"), Prefs::DHT_ENABLED));
-  w->setToolTip (tr ("DHT is a tool for finding peers without a tracker."));
-  hig->addWideControl (w = checkBoxNew (tr ("Use &Local Peer Discovery to find more peers"), Prefs::LPD_ENABLED));
-  w->setToolTip (tr ("LPD is a tool for finding peers on your local network."));
+  ColumnResizer * cr (new ColumnResizer (this));
+  cr->addLayout (ui.incomingPeersSectionLayout);
+  cr->addLayout (ui.peerLimitsSectionLayout);
+  cr->update ();
 
-  hig->finish ();
-  return hig;
+  connect (ui.testPeerPortButton, SIGNAL (clicked ()), SLOT (onPortTest ()));
+  connect (&mySession, SIGNAL (portTested (bool)), SLOT (onPortTested (bool)));
 }
 
 /***
@@ -431,49 +387,33 @@ PrefsDialog::encryptionEdited (int i)
   setPref (Prefs::ENCRYPTION, value);
 }
 
-QWidget *
-PrefsDialog::createPrivacyTab ()
+void
+PrefsDialog::initPrivacyTab ()
 {
-  QWidget * w;
-  HIG * hig = new HIG (this);
-
-  hig->addSectionTitle (tr ("Encryption"));
-
-  QComboBox * box = new QComboBox ();
-  box->addItem (tr ("Allow encryption"), 0);
-  box->addItem (tr ("Prefer encryption"), 1);
-  box->addItem (tr ("Require encryption"), 2);
-  myWidgets.insert (Prefs::ENCRYPTION, box);
-  connect (box, SIGNAL(activated(int)), this, SLOT(encryptionEdited(int)));
+  ui.encryptionModeCombo->addItem (tr ("Allow encryption"), 0);
+  ui.encryptionModeCombo->addItem (tr ("Prefer encryption"), 1);
+  ui.encryptionModeCombo->addItem (tr ("Require encryption"), 2);
 
-  hig->addRow (tr ("&Encryption mode:"), box);
+  linkWidgetToPref (ui.encryptionModeCombo, Prefs::ENCRYPTION);
+  linkWidgetToPref (ui.blocklistCheck, Prefs::BLOCKLIST_ENABLED);
+  linkWidgetToPref (ui.blocklistEdit, Prefs::BLOCKLIST_URL);
+  linkWidgetToPref (ui.autoUpdateBlocklistCheck, Prefs::BLOCKLIST_UPDATES_ENABLED);
 
-  hig->addSectionDivider ();
-  hig->addSectionTitle (tr ("Blocklist"));
+  myBlockWidgets <<
+    ui.blocklistEdit <<
+    ui.blocklistStatusLabel <<
+    ui.updateBlocklistButton <<
+    ui.autoUpdateBlocklistCheck;
 
-  QWidget * l = checkBoxNew (tr("Enable &blocklist:"), Prefs::BLOCKLIST_ENABLED);
-  QWidget * e = lineEditNew (Prefs::BLOCKLIST_URL);
-  myBlockWidgets << e;
-  hig->addRow (l, e);
+  ColumnResizer * cr (new ColumnResizer (this));
+  cr->addLayout (ui.encryptionSectionLayout);
+  cr->addLayout (ui.blocklistSectionLayout);
+  cr->update ();
 
-  l = myBlocklistLabel = new QLabel ();
-  myBlockWidgets << l;
-  w = new QPushButton (tr ("&Update"));
-  connect (w, SIGNAL(clicked(bool)), this, SLOT(onUpdateBlocklistClicked()));
-  myBlockWidgets << w;
-  QHBoxLayout * h = new QHBoxLayout ();
-  h->addWidget (l);
-  h->addStretch (1);
-  h->addWidget (w);
-  hig->addWideControl (h);
+  connect (ui.encryptionModeCombo, SIGNAL (activated (int)), SLOT (encryptionEdited (int)));
+  connect (ui.updateBlocklistButton, SIGNAL (clicked ()), SLOT (onUpdateBlocklistClicked ()));
 
-  l = checkBoxNew (tr ("Enable &automatic updates"), Prefs::BLOCKLIST_UPDATES_ENABLED);
-  myBlockWidgets << l;
-  hig->addWideControl (l);
-
-  hig->finish ();
   updateBlocklistLabel ();
-  return hig;
 }
 
 /***
@@ -534,127 +474,76 @@ void
 PrefsDialog::onIdleLimitChanged ()
 {
   //: Spin box suffix, "Stop seeding if idle for: [ 5 minutes ]" (includes leading space after the number, if needed)
-  const QString unitsSuffix = tr (" minute(s)", 0, myIdleLimitSpin->value ());
-  if (myIdleLimitSpin->suffix () != unitsSuffix)
-    myIdleLimitSpin->setSuffix (unitsSuffix);
+  const QString unitsSuffix = tr (" minute(s)", 0, ui.idleLimitSpin->value ());
+  if (ui.idleLimitSpin->suffix () != unitsSuffix)
+    ui.idleLimitSpin->setSuffix (unitsSuffix);
 }
 
-QWidget *
-PrefsDialog::createSeedingTab ()
+void
+PrefsDialog::initSeedingTab ()
 {
-  const int iconSize (style ()->pixelMetric (QStyle::PM_SmallIconSize));
-  const QFileIconProvider iconProvider;
-  const QIcon folderIcon = iconProvider.icon (QFileIconProvider::Folder);
-  const QPixmap folderPixmap = folderIcon.pixmap (iconSize);
-  const QIcon fileIcon = iconProvider.icon (QFileIconProvider::File);
-  const QPixmap filePixmap = fileIcon.pixmap (iconSize);
-
-  QWidget *l, *r;
-  HIG * hig = new HIG (this);
-  hig->addSectionTitle (tr ("Limits"));
-
-    l = checkBoxNew (tr ("Stop seeding at &ratio:"), Prefs::RATIO_ENABLED);
-    r = doubleSpinBoxNew (Prefs::RATIO, 0, INT_MAX, 0.5, 2);
-    hig->addRow (l, r);
-    enableBuddyWhenChecked (qobject_cast<QCheckBox*>(l), r);
+  linkWidgetToPref (ui.ratioLimitCheck, Prefs::RATIO_ENABLED);
+  linkWidgetToPref (ui.ratioLimitSpin, Prefs::RATIO);
+  linkWidgetToPref (ui.idleLimitCheck, Prefs::IDLE_LIMIT_ENABLED);
+  linkWidgetToPref (ui.idleLimitSpin, Prefs::IDLE_LIMIT);
 
-    l = checkBoxNew (tr ("Stop seedi&ng if idle for:"), Prefs::IDLE_LIMIT_ENABLED);
-    r = myIdleLimitSpin = spinBoxNew (Prefs::IDLE_LIMIT, 1, INT_MAX, 5);
-    connect (r, SIGNAL (valueChanged (int)), this, SLOT (onIdleLimitChanged ()));
-    hig->addRow (l, r);
-    enableBuddyWhenChecked (qobject_cast<QCheckBox*>(l), r);
-    onIdleLimitChanged ();
+  connect (ui.idleLimitSpin, SIGNAL (valueChanged (int)), SLOT (onIdleLimitChanged ()));
 
-  hig->finish ();
-  return hig;
+  onIdleLimitChanged ();
 }
 
 void
 PrefsDialog::onQueueStalledMinutesChanged ()
 {
   //: Spin box suffix, "Download is inactive if data sharing stopped: [ 5 minutes ago ]" (includes leading space after the number, if needed)
-  const QString unitsSuffix = tr (" minute(s) ago", 0, myQueueStalledMinutesSpin->value ());
-  if (myQueueStalledMinutesSpin->suffix () != unitsSuffix)
-    myQueueStalledMinutesSpin->setSuffix (unitsSuffix);
+  const QString unitsSuffix = tr (" minute(s) ago", 0, ui.queueStalledMinutesSpin->value ());
+  if (ui.queueStalledMinutesSpin->suffix () != unitsSuffix)
+    ui.queueStalledMinutesSpin->setSuffix (unitsSuffix);
 }
 
-QWidget *
-PrefsDialog::createDownloadingTab ()
+void
+PrefsDialog::initDownloadingTab ()
 {
-  const int iconSize (style ()->pixelMetric (QStyle::PM_SmallIconSize));
+  const QSize iconSize (QSize (1, 1) * style ()->pixelMetric (QStyle::PM_SmallIconSize));
   const QFileIconProvider iconProvider;
   const QIcon folderIcon = iconProvider.icon (QFileIconProvider::Folder);
-  const QPixmap folderPixmap = folderIcon.pixmap (iconSize);
   const QIcon fileIcon = iconProvider.icon (QFileIconProvider::File);
-  const QPixmap filePixmap = fileIcon.pixmap (iconSize);
-
-  QWidget * l;
-  QPushButton * b;
-  HIG * hig = new HIG (this);
-  hig->addSectionTitle (tr ("Adding"));
-
-    l = checkBoxNew (tr ("Automatically add .torrent files &from:"), Prefs::DIR_WATCH_ENABLED);
-    b = myWatchButton = new QPushButton;
-    b->setIcon (folderPixmap);
-    b->setStyleSheet (QString::fromUtf8 ("text-align: left; padding-left: 5; padding-right: 5"));
-    connect (b, SIGNAL(clicked(bool)), this, SLOT(onWatchClicked()));
-    hig->addRow (l, b);
-    enableBuddyWhenChecked (qobject_cast<QCheckBox*>(l), b);
-
-    hig->addWideControl (checkBoxNew (tr ("Show the Torrent Options &dialog"), Prefs::OPTIONS_PROMPT));
-
-    hig->addWideControl (checkBoxNew (tr ("&Start added torrents"), Prefs::START));
-
-    hig->addWideControl (checkBoxNew (tr ("Mo&ve the .torrent file to the trash"), Prefs::TRASH_ORIGINAL));
-
-    b = myDestinationButton = new QPushButton;
-    b->setIcon (folderPixmap);
-    b->setStyleSheet (QString::fromUtf8 ("text-align: left; padding-left: 5; padding-right: 5"));
-    connect (b, SIGNAL(clicked(bool)), this, SLOT(onDestinationClicked()));
-    hig->addRow (tr ("Save to &Location:"), b);
-
-    const QString downloadDir (myPrefs.getString(Prefs::DOWNLOAD_DIR));
-    l = myFreespaceLabel = new FreespaceLabel (this);
-    myFreespaceLabel->setSession (mySession);
-    myFreespaceLabel->setPath (downloadDir);
-    QHBoxLayout * h = new QHBoxLayout ();
-    h->addStretch (1);
-    h->addWidget (l);
-    hig->addWideControl (h);
-
-  hig->addSectionDivider ();
-  hig->addSectionTitle (tr ("Download Queue"));
-
-    hig->addRow (tr ("Ma&ximum active downloads:"), spinBoxNew (Prefs::DOWNLOAD_QUEUE_SIZE, 1, INT_MAX, 1));
-    QSpinBox * sb = myQueueStalledMinutesSpin = spinBoxNew (Prefs::QUEUE_STALLED_MINUTES, 1, INT_MAX, 10);
-    connect (sb, SIGNAL (valueChanged (int)), this, SLOT (onQueueStalledMinutesChanged ()));
-    //: Please keep this phrase as short as possible, it's curently the longest and influences dialog width
-    hig->addRow (tr ("Download is i&nactive if data sharing stopped:"), sb);
-    onQueueStalledMinutesChanged ();
-
-  hig->addSectionDivider ();
-  hig->addSectionTitle (tr ("Incomplete"));
-
-    hig->addWideControl (checkBoxNew (tr ("Append \".&part\" to incomplete files' names"), Prefs::RENAME_PARTIAL_FILES));
-
-    l = myIncompleteCheckbox = checkBoxNew (tr ("Keep &incomplete files in:"), Prefs::INCOMPLETE_DIR_ENABLED);
-    b = myIncompleteButton = new QPushButton;
-    b->setIcon (folderPixmap);
-    b->setStyleSheet (QString::fromUtf8 ("text-align: left; padding-left: 5; padding-right: 5"));
-    connect (b, SIGNAL(clicked(bool)), this, SLOT(onIncompleteClicked()));
-    hig->addRow (myIncompleteCheckbox, b);
-    enableBuddyWhenChecked (qobject_cast<QCheckBox*>(l), b);
-
-    l = myTorrentDoneScriptCheckbox = checkBoxNew (tr ("Call scrip&t when torrent is completed:"), Prefs::SCRIPT_TORRENT_DONE_ENABLED);
-    b = myTorrentDoneScriptButton = new QPushButton;
-    b->setIcon (filePixmap);
-    b->setStyleSheet (QString::fromUtf8 ("text-align: left; padding-left: 5; padding-right: 5"));
-    connect (b, SIGNAL(clicked(bool)), this, SLOT(onScriptClicked()));
-    hig->addRow (myTorrentDoneScriptCheckbox, b);
-    enableBuddyWhenChecked (qobject_cast<QCheckBox*>(l), b);
-
-  hig->finish ();
-  return hig;
+
+  ui.watchDirButton->setIcon (folderIcon);
+  ui.watchDirButton->setIconSize (iconSize);
+  ui.downloadDirButton->setIcon (folderIcon);
+  ui.downloadDirButton->setIconSize (iconSize);
+  ui.incompleteDirButton->setIcon (folderIcon);
+  ui.incompleteDirButton->setIconSize (iconSize);
+  ui.completionScriptButton->setIcon (fileIcon);
+  ui.completionScriptButton->setIconSize (iconSize);
+
+  ui.downloadDirFreeSpaceLabel->setSession (mySession);
+  ui.downloadDirFreeSpaceLabel->setPath (myPrefs.getString (Prefs::DOWNLOAD_DIR));
+
+  linkWidgetToPref (ui.watchDirCheck, Prefs::DIR_WATCH_ENABLED);
+  linkWidgetToPref (ui.showTorrentOptionsDialogCheck, Prefs::OPTIONS_PROMPT);
+  linkWidgetToPref (ui.startAddedTorrentsCheck, Prefs::START);
+  linkWidgetToPref (ui.trashTorrentFileCheck, Prefs::TRASH_ORIGINAL);
+  linkWidgetToPref (ui.downloadQueueSizeSpin, Prefs::DOWNLOAD_QUEUE_SIZE);
+  linkWidgetToPref (ui.queueStalledMinutesSpin, Prefs::QUEUE_STALLED_MINUTES);
+  linkWidgetToPref (ui.renamePartialFilesCheck, Prefs::RENAME_PARTIAL_FILES);
+  linkWidgetToPref (ui.incompleteDirCheck, Prefs::INCOMPLETE_DIR_ENABLED);
+  linkWidgetToPref (ui.completionScriptCheck, Prefs::SCRIPT_TORRENT_DONE_ENABLED);
+
+  ColumnResizer * cr (new ColumnResizer (this));
+  cr->addLayout (ui.addingSectionLayout);
+  cr->addLayout (ui.downloadQueueSectionLayout);
+  cr->addLayout (ui.incompleteSectionLayout);
+  cr->update ();
+
+  connect (ui.watchDirButton, SIGNAL (clicked ()), SLOT (onWatchClicked ()));
+  connect (ui.downloadDirButton, SIGNAL (clicked ()), SLOT (onDestinationClicked ()));
+  connect (ui.incompleteDirButton, SIGNAL (clicked ()), SLOT (onIncompleteClicked ()));
+  connect (ui.completionScriptButton, SIGNAL (clicked ()), SLOT (onScriptClicked ()));
+  connect (ui.queueStalledMinutesSpin, SIGNAL (valueChanged (int)), SLOT (onQueueStalledMinutesChanged ()));
+
+  onQueueStalledMinutesChanged ();
 }
 
 /***
@@ -665,27 +554,19 @@ PrefsDialog::PrefsDialog (Session& session, Prefs& prefs, QWidget * parent):
   QDialog (parent),
   myIsServer (session.isServer ()),
   mySession (session),
-  myPrefs (prefs),
-  myLayout (new QVBoxLayout (this))
+  myPrefs (prefs)
 {
-  setWindowTitle (tr ("Transmission Preferences"));
-
-  QTabWidget * t = new QTabWidget (this);
-  t->addTab (createSpeedTab (),        tr ("Speed"));
-  t->addTab (createDownloadingTab (),  tr ("Downloading"));
-  t->addTab (createSeedingTab (),      tr ("Seeding"));
-  t->addTab (createPrivacyTab (),      tr ("Privacy"));
-  t->addTab (createNetworkTab (),      tr ("Network"));
-  t->addTab (createDesktopTab (),      tr ("Desktop"));
-  t->addTab (createRemoteTab(session), tr ("Remote"));
-  myLayout->addWidget (t);
+  ui.setupUi (this);
 
-  QDialogButtonBox * buttons = new QDialogButtonBox (QDialogButtonBox::Close, Qt::Horizontal, this);
-  connect (buttons, SIGNAL(rejected()), this, SLOT(close())); // "close" triggers rejected
-  myLayout->addWidget (buttons);
-  QWidget::setAttribute (Qt::WA_DeleteOnClose, true);
+  initSpeedTab ();
+  initDownloadingTab ();
+  initSeedingTab ();
+  initPrivacyTab ();
+  initNetworkTab ();
+  initDesktopTab ();
+  initRemoteTab ();
 
-  connect (&mySession, SIGNAL(sessionUpdated()), this, SLOT(sessionUpdated()));
+  connect (&mySession, SIGNAL (sessionUpdated ()), SLOT (sessionUpdated ()));
 
   QList<int> keys;
   keys << Prefs::RPC_ENABLED
@@ -711,6 +592,8 @@ PrefsDialog::PrefsDialog (Session& session, Prefs& prefs, QWidget * parent):
           w->setEnabled (false);
         }
     }
+
+  adjustSize ();
 }
 
 PrefsDialog::~PrefsDialog ()
@@ -738,7 +621,7 @@ void
 PrefsDialog::updateBlocklistLabel ()
 {
   const int n = mySession.blocklistSize ();
-  myBlocklistLabel->setText (tr ("<i>Blocklist contains %Ln rule(s)</i>", 0, n));
+  ui.blocklistStatusLabel->setText (tr ("<i>Blocklist contains %Ln rule(s)</i>", 0, n));
 }
 
 void
@@ -753,61 +636,59 @@ PrefsDialog::refreshPref (int key)
           const bool enabled (myPrefs.getBool (Prefs::RPC_ENABLED));
           const bool whitelist (myPrefs.getBool (Prefs::RPC_WHITELIST_ENABLED));
           const bool auth (myPrefs.getBool (Prefs::RPC_AUTH_REQUIRED));
-          foreach (QWidget * w, myWebWhitelistWidgets)w->setEnabled (enabled && whitelist);
-          foreach (QWidget * w, myWebAuthWidgets)w->setEnabled (enabled && auth);
-          foreach (QWidget * w, myWebWidgets)w->setEnabled (enabled);
+          foreach (QWidget * w, myWebWhitelistWidgets)
+            w->setEnabled (enabled && whitelist);
+          foreach (QWidget * w, myWebAuthWidgets)
+            w->setEnabled (enabled && auth);
+          foreach (QWidget * w, myWebWidgets)
+            w->setEnabled (enabled);
           break;
         }
 
       case Prefs::ALT_SPEED_LIMIT_TIME_ENABLED:
         {
           const bool enabled = myPrefs.getBool (key);
-          foreach (QWidget * w, mySchedWidgets)w->setEnabled (enabled);
+          foreach (QWidget * w, mySchedWidgets)
+            w->setEnabled (enabled);
           break;
         }
 
       case Prefs::BLOCKLIST_ENABLED:
         {
           const bool enabled = myPrefs.getBool (key);
-          foreach (QWidget * w, myBlockWidgets)w->setEnabled (enabled);
+          foreach (QWidget * w, myBlockWidgets)
+            w->setEnabled (enabled);
           break;
         }
 
       case Prefs::DIR_WATCH:
-        myWatchButton->setText (QFileInfo(myPrefs.getString(Prefs::DIR_WATCH)).fileName());
+        ui.watchDirButton->setText (QFileInfo (myPrefs.getString (Prefs::DIR_WATCH)).fileName ());
         break;
 
       case Prefs::SCRIPT_TORRENT_DONE_FILENAME:
         {
           const QString path (myPrefs.getString (key));
-          myTorrentDoneScriptButton->setText (QFileInfo(path).fileName());
+          ui.completionScriptButton->setText (QFileInfo (path).fileName ());
           break;
         }
 
       case Prefs::PEER_PORT:
-        myPortLabel->setText (tr ("Status unknown"));
-        myPortButton->setEnabled (true);
+        ui.peerPortStatusLabel->setText (tr ("Status unknown"));
+        ui.testPeerPortButton->setEnabled (true);
         break;
 
       case Prefs::DOWNLOAD_DIR:
         {
           const QString path (myPrefs.getString (key));
-          myDestinationButton->setText (QFileInfo(path).fileName());
-          myFreespaceLabel->setPath (path);
+          ui.downloadDirButton->setText (QFileInfo (path).fileName ());
+          ui.downloadDirFreeSpaceLabel->setPath (path);
           break;
         }
 
       case Prefs::INCOMPLETE_DIR:
         {
           QString path (myPrefs.getString (key));
-          myIncompleteButton->setText (QFileInfo(path).fileName());
-          break;
-        }
-
-      case Prefs::INCOMPLETE_DIR_ENABLED:
-        {
-          const bool enabled = myPrefs.getBool (key);
-          myIncompleteButton->setEnabled (enabled);
+          ui.incompleteDirButton->setText (QFileInfo (path).fileName ());
           break;
         }
 
@@ -819,46 +700,15 @@ PrefsDialog::refreshPref (int key)
   if (it != myWidgets.end ())
     {
       QWidget * w (it.value ());
-      QCheckBox * checkBox;
-      QSpinBox * spin;
-      QDoubleSpinBox * doubleSpin;
-      QTimeEdit * timeEdit;
-      QLineEdit * lineEdit;
 
-      if ((checkBox = qobject_cast<QCheckBox*>(w)))
-        {
-          checkBox->setChecked (myPrefs.getBool (key));
-        }
-      else if ((spin = qobject_cast<QSpinBox*>(w)))
-        {
-          spin->setValue (myPrefs.getInt (key));
-        }
-      else if ((doubleSpin = qobject_cast<QDoubleSpinBox*>(w)))
-        {
-          doubleSpin->setValue (myPrefs.getDouble (key));
-        }
-      else if ((timeEdit = qobject_cast<QTimeEdit*>(w)))
+      if (!updateWidgetValue (w, key))
         {
-          const int minutes (myPrefs.getInt (key));
-          timeEdit->setTime (QTime().addSecs (minutes * 60));
-        }
-      else if ((lineEdit = qobject_cast<QLineEdit*>(w)))
-        {
-          lineEdit->setText (myPrefs.getString (key));
-        }
-      else if (key == Prefs::ENCRYPTION)
-        {
-          QComboBox * comboBox (qobject_cast<QComboBox*> (w));
-          const int index = comboBox->findData (myPrefs.getInt (key));
-          comboBox->setCurrentIndex (index);
+          if (key == Prefs::ENCRYPTION)
+            {
+              QComboBox * comboBox (qobject_cast<QComboBox*> (w));
+              const int index = comboBox->findData (myPrefs.getInt (key));
+              comboBox->setCurrentIndex (index);
+            }
         }
     }
 }
-
-bool
-PrefsDialog::isAllowed (int key) const
-{
-  Q_UNUSED (key);
-
-  return true;
-}
index 6f16a34f0f1866e88453b87ba354bd32286ead80..8c1cfb688c84085f68d1182e272b138935c7665a 100644 (file)
 #define PREFS_DIALOG_H
 
 #include <QDialog>
+#include <QMap>
 #include <QSet>
+
 #include "prefs.h"
+#include "ui_prefs-dialog.h"
 
 class QAbstractButton;
 class QCheckBox;
@@ -62,12 +65,8 @@ class PrefsDialog: public QDialog
     void onBlocklistUpdated (int n);
 
   private:
-    QDoubleSpinBox * doubleSpinBoxNew (int key, double low, double high, double step, int decimals);
-    QCheckBox * checkBoxNew (const QString& text, int key);
-    QSpinBox * spinBoxNew (int key, int low, int high, int step);
-    QTimeEdit * timeEditNew (int key);
-    QLineEdit * lineEditNew (int key, int mode = 0);
-    void enableBuddyWhenChecked (QCheckBox *, QWidget *);
+    bool updateWidgetValue (QWidget * widget, int prefKey);
+    void linkWidgetToPref (QWidget * widget, int prefKey);
     void updateBlocklistLabel ();
 
   public:
@@ -76,14 +75,14 @@ class PrefsDialog: public QDialog
 
   private:
     void setPref (int key, const QVariant& v);
-    bool isAllowed (int key) const;
-    QWidget * createDownloadingTab ();
-    QWidget * createSeedingTab ();
-    QWidget * createSpeedTab ();
-    QWidget * createPrivacyTab ();
-    QWidget * createNetworkTab ();
-    QWidget * createDesktopTab ();
-    QWidget * createRemoteTab (Session&);
+
+    void initDownloadingTab ();
+    void initSeedingTab ();
+    void initSpeedTab ();
+    void initPrivacyTab ();
+    void initNetworkTab ();
+    void initDesktopTab ();
+    void initRemoteTab ();
 
   private:
     typedef QMap<int,QWidget*> key2widget_t;
@@ -91,15 +90,6 @@ class PrefsDialog: public QDialog
     const bool myIsServer;
     Session& mySession;
     Prefs& myPrefs;
-    QVBoxLayout * myLayout;
-    QLabel * myPortLabel;
-    QPushButton * myPortButton;
-    QPushButton * myWatchButton;
-    QPushButton * myTorrentDoneScriptButton;
-    QCheckBox * myTorrentDoneScriptCheckbox;
-    QCheckBox * myIncompleteCheckbox;
-    QPushButton * myIncompleteButton;
-    QPushButton * myDestinationButton;
     QWidgetList myWebWidgets;
     QWidgetList myWebAuthWidgets;
     QWidgetList myWebWhitelistWidgets;
@@ -108,14 +98,11 @@ class PrefsDialog: public QDialog
     QWidgetList mySchedWidgets;
     QWidgetList myBlockWidgets;
     QWidgetList myUnsupportedWhenRemote;
-    FreespaceLabel * myFreespaceLabel;
-    QSpinBox * myIdleLimitSpin;
-    QSpinBox * myQueueStalledMinutesSpin;
+    Ui::PrefsDialog ui;
 
     int myBlocklistHttpTag;
     QHttp * myBlocklistHttp;
     QMessageBox * myBlocklistDialog;
-    QLabel * myBlocklistLabel;
 };
 
 #endif
diff --git a/qt/prefs-dialog.ui b/qt/prefs-dialog.ui
new file mode 100644 (file)
index 0000000..47de509
--- /dev/null
@@ -0,0 +1,1361 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PrefsDialog</class>
+ <widget class="QDialog" name="PrefsDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>545</width>
+    <height>547</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Transmission Preferences</string>
+  </property>
+  <layout class="QVBoxLayout" name="dialogLayout">
+   <item>
+    <widget class="QTabWidget" name="tabs">
+     <property name="currentIndex">
+      <number>0</number>
+     </property>
+     <property name="elideMode">
+      <enum>Qt::ElideNone</enum>
+     </property>
+     <property name="usesScrollButtons">
+      <bool>false</bool>
+     </property>
+     <widget class="QWidget" name="speedTab">
+      <attribute name="title">
+       <string>Speed</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="speedTabLayout">
+       <item>
+        <widget class="QLabel" name="speedLimitsSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Speed Limits</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="speedLimitsSectionLayout" columnstretch="0,1">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item row="0" column="0">
+          <widget class="QCheckBox" name="uploadSpeedLimitCheck">
+           <property name="text">
+            <string>&amp;Upload:</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QSpinBox" name="uploadSpeedLimitSpin">
+           <property name="maximum">
+            <number>999999999</number>
+           </property>
+           <property name="singleStep">
+            <number>5</number>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QCheckBox" name="downloadSpeedLimitCheck">
+           <property name="text">
+            <string>&amp;Download:</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QSpinBox" name="downloadSpeedLimitSpin">
+           <property name="maximum">
+            <number>999999999</number>
+           </property>
+           <property name="singleStep">
+            <number>5</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="altSpeedLimitsSectionSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeType">
+          <enum>QSizePolicy::Fixed</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>10</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="altSpeedLimitsSectionTitleLayout" stretch="0,1">
+         <property name="spacing">
+          <number>2</number>
+         </property>
+         <item>
+          <widget class="QLabel" name="altSpeedLimitsSectionIconLabel">
+           <property name="pixmap">
+            <pixmap resource="application.qrc">:/icons/alt-limit-off.png</pixmap>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="altSpeedLimitsSectionLabel">
+           <property name="styleSheet">
+            <string notr="true">font-weight:bold</string>
+           </property>
+           <property name="text">
+            <string>Alternative Speed Limits</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="altSpeedLimitsSectionLayout" columnstretch="0,1">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item row="2" column="0">
+          <widget class="QLabel" name="altDownloadSpeedLimitLabel">
+           <property name="text">
+            <string>Do&amp;wnload:</string>
+           </property>
+           <property name="buddy">
+            <cstring>altDownloadSpeedLimitSpin</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QSpinBox" name="altUploadSpeedLimitSpin">
+           <property name="maximum">
+            <number>999999999</number>
+           </property>
+           <property name="singleStep">
+            <number>5</number>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="0" colspan="2">
+          <widget class="QLabel" name="altSpeedLimitsSectionDescriptionLabel">
+           <property name="text">
+            <string>&lt;small&gt;Override normal speed limits manually or at scheduled times&lt;/small&gt;</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QSpinBox" name="altDownloadSpeedLimitSpin">
+           <property name="maximum">
+            <number>999999999</number>
+           </property>
+           <property name="singleStep">
+            <number>5</number>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <layout class="QHBoxLayout" name="altSpeedLimitScheduleLayout">
+           <item>
+            <widget class="QTimeEdit" name="altSpeedLimitStartTimeEdit">
+             <property name="displayFormat">
+              <string notr="true">hh:mm</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="altSpeedLimitToLabel">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string>&amp;to</string>
+             </property>
+             <property name="buddy">
+              <cstring>altSpeedLimitEndTimeEdit</cstring>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QTimeEdit" name="altSpeedLimitEndTimeEdit">
+             <property name="displayFormat">
+              <string notr="true">hh:mm</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="altUploadSpeedLimitLabel">
+           <property name="text">
+            <string>U&amp;pload:</string>
+           </property>
+           <property name="buddy">
+            <cstring>altUploadSpeedLimitSpin</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QCheckBox" name="altSpeedLimitScheduleCheck">
+           <property name="text">
+            <string>&amp;Scheduled times:</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="0">
+          <widget class="QLabel" name="altSpeedLimitDaysLabel">
+           <property name="text">
+            <string>&amp;On days:</string>
+           </property>
+           <property name="buddy">
+            <cstring>altSpeedLimitDaysCombo</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="1">
+          <widget class="QComboBox" name="altSpeedLimitDaysCombo"/>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="speedTabBottomSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>1</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="downloadingTab">
+      <attribute name="title">
+       <string>Downloading</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="downloadingTabLayout">
+       <item>
+        <widget class="QLabel" name="addingSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Adding</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="addingSectionLayout" columnstretch="0,1">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item row="1" column="0" colspan="2">
+          <widget class="QCheckBox" name="showTorrentOptionsDialogCheck">
+           <property name="text">
+            <string>Show the Torrent Options &amp;dialog</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0" colspan="2">
+          <widget class="QCheckBox" name="trashTorrentFileCheck">
+           <property name="text">
+            <string>Mo&amp;ve the .torrent file to the trash</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="0">
+          <widget class="QCheckBox" name="watchDirCheck">
+           <property name="text">
+            <string>Automatically add .torrent files &amp;from:</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0" colspan="2">
+          <widget class="QCheckBox" name="startAddedTorrentsCheck">
+           <property name="text">
+            <string>&amp;Start added torrents</string>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="0">
+          <widget class="QLabel" name="downloadDirLabel">
+           <property name="text">
+            <string>Save to &amp;Location:</string>
+           </property>
+           <property name="buddy">
+            <cstring>downloadDirButton</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="1">
+          <widget class="QToolButton" name="downloadDirButton">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolButtonStyle">
+            <enum>Qt::ToolButtonTextBesideIcon</enum>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QToolButton" name="watchDirButton">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolButtonStyle">
+            <enum>Qt::ToolButtonTextBesideIcon</enum>
+           </property>
+          </widget>
+         </item>
+         <item row="5" column="1">
+          <widget class="FreespaceLabel" name="downloadDirFreeSpaceLabel">
+           <property name="text">
+            <string notr="true">...</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="downloadQueueSectionSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeType">
+          <enum>QSizePolicy::Fixed</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>10</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="downloadQueueSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Download Queue</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="downloadQueueSectionLayout" columnstretch="0,1">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="downloadQueueSizeLabel">
+           <property name="text">
+            <string>Ma&amp;ximum active downloads:</string>
+           </property>
+           <property name="buddy">
+            <cstring>downloadQueueSizeSpin</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QSpinBox" name="downloadQueueSizeSpin"/>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="queueStalledMinutesLabel">
+           <property name="text">
+            <string extracomment="Please keep this phrase as short as possible, it's curently the longest and influences dialog width">Download is i&amp;nactive if data sharing stopped:</string>
+           </property>
+           <property name="buddy">
+            <cstring>queueStalledMinutesSpin</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QSpinBox" name="queueStalledMinutesSpin">
+           <property name="suffix">
+            <string notr="true"> minute(s) ago</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="incompleteSectionSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeType">
+          <enum>QSizePolicy::Fixed</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>10</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="incompleteSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Incomplete</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="incompleteSectionLayout" columnstretch="0,1">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item row="0" column="0" colspan="2">
+          <widget class="QCheckBox" name="renamePartialFilesCheck">
+           <property name="text">
+            <string>Append &quot;.&amp;part&quot; to incomplete files' names</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QToolButton" name="incompleteDirButton">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolButtonStyle">
+            <enum>Qt::ToolButtonTextBesideIcon</enum>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QCheckBox" name="incompleteDirCheck">
+           <property name="text">
+            <string>Keep &amp;incomplete files in:</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QCheckBox" name="completionScriptCheck">
+           <property name="text">
+            <string>Call scrip&amp;t when torrent is completed:</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QToolButton" name="completionScriptButton">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolButtonStyle">
+            <enum>Qt::ToolButtonTextBesideIcon</enum>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="downloadingTabBottomSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>1</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="seedingTab">
+      <attribute name="title">
+       <string>Seeding</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="seedingTabLayout">
+       <item>
+        <widget class="QLabel" name="limitsSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Limits</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="limitsSectionLayout" columnstretch="0,1">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item row="0" column="0">
+          <widget class="QCheckBox" name="ratioLimitCheck">
+           <property name="text">
+            <string>Stop seeding at &amp;ratio:</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QDoubleSpinBox" name="ratioLimitSpin">
+           <property name="maximum">
+            <double>999999999.000000000000000</double>
+           </property>
+           <property name="singleStep">
+            <double>0.500000000000000</double>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QCheckBox" name="idleLimitCheck">
+           <property name="text">
+            <string>Stop seedi&amp;ng if idle for:</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QSpinBox" name="idleLimitSpin">
+           <property name="suffix">
+            <string notr="true"> minute(s)</string>
+           </property>
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>9999</number>
+           </property>
+           <property name="singleStep">
+            <number>5</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="seedingTabBottomSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>1</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="privacyTab">
+      <attribute name="title">
+       <string>Privacy</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="privacyTabLayout">
+       <item>
+        <widget class="QLabel" name="encryptionSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Encryption</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="encryptionSectionLayout" columnstretch="0,1">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="encryptionModeLabel">
+           <property name="text">
+            <string>&amp;Encryption mode:</string>
+           </property>
+           <property name="buddy">
+            <cstring>encryptionModeCombo</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QComboBox" name="encryptionModeCombo"/>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="blocklistSectionSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeType">
+          <enum>QSizePolicy::Fixed</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>10</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="blocklistSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Blocklist</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="blocklistSectionLayout" columnstretch="0,1,0">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item row="0" column="1" colspan="2">
+          <widget class="QLineEdit" name="blocklistEdit"/>
+         </item>
+         <item row="1" column="2">
+          <widget class="QPushButton" name="updateBlocklistButton">
+           <property name="text">
+            <string>&amp;Update</string>
+           </property>
+           <property name="autoDefault">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="0">
+          <widget class="QCheckBox" name="blocklistCheck">
+           <property name="text">
+            <string>Enable &amp;blocklist:</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0" colspan="3">
+          <widget class="QCheckBox" name="autoUpdateBlocklistCheck">
+           <property name="text">
+            <string>Enable &amp;automatic updates</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0" colspan="2">
+          <widget class="QLabel" name="blocklistStatusLabel">
+           <property name="text">
+            <string notr="true">...</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="privacyTabBottomSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>1</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="networkTab">
+      <attribute name="title">
+       <string>Network</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="networkTabLayout">
+       <item>
+        <widget class="QLabel" name="incomingPeersSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Incoming Peers</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="incomingPeersSectionLayout" columnstretch="0,1,0">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item row="1" column="2">
+          <widget class="QPushButton" name="testPeerPortButton">
+           <property name="text">
+            <string>Te&amp;st Port</string>
+           </property>
+           <property name="autoDefault">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0" colspan="3">
+          <widget class="QCheckBox" name="randomPeerPortCheck">
+           <property name="text">
+            <string>Pick a &amp;random port every time Transmission is started</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="0">
+          <widget class="QLabel" name="peerPortLabel">
+           <property name="text">
+            <string>&amp;Port for incoming connections:</string>
+           </property>
+           <property name="buddy">
+            <cstring>peerPortSpin</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1" colspan="2">
+          <widget class="QSpinBox" name="peerPortSpin">
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>65535</number>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLabel" name="peerPortStatusLabel">
+           <property name="text">
+            <string>Status unknown</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0" colspan="3">
+          <widget class="QCheckBox" name="enablePortForwardingCheck">
+           <property name="text">
+            <string>Use UPnP or NAT-PMP port &amp;forwarding from my router</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="peerLimitsSectionSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeType">
+          <enum>QSizePolicy::Fixed</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>10</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="peerLimitsSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Peer Limits</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="peerLimitsSectionLayout" columnstretch="0,1">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="torrentPeerLimitLabel">
+           <property name="text">
+            <string>Maximum peers per &amp;torrent:</string>
+           </property>
+           <property name="buddy">
+            <cstring>torrentPeerLimitSpin</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QSpinBox" name="torrentPeerLimitSpin">
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>1024</number>
+           </property>
+           <property name="singleStep">
+            <number>5</number>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="globalPeerLimitLabel">
+           <property name="text">
+            <string>Maximum peers &amp;overall:</string>
+           </property>
+           <property name="buddy">
+            <cstring>globalPeerLimitSpin</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QSpinBox" name="globalPeerLimitSpin">
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>1024</number>
+           </property>
+           <property name="singleStep">
+            <number>5</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="optionsSectionSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeType">
+          <enum>QSizePolicy::Fixed</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>10</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="optionsSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Options</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QVBoxLayout" name="optionsSectionLayout">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item>
+          <widget class="QCheckBox" name="enableUtpCheck">
+           <property name="toolTip">
+            <string>uTP is a tool for reducing network congestion.</string>
+           </property>
+           <property name="text">
+            <string>Enable &amp;uTP for peer connections</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="enablePexCheck">
+           <property name="toolTip">
+            <string>PEX is a tool for exchanging peer lists with the peers you're connected to.</string>
+           </property>
+           <property name="text">
+            <string>Use PE&amp;X to find more peers</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="enableDhtCheck">
+           <property name="toolTip">
+            <string>DHT is a tool for finding peers without a tracker.</string>
+           </property>
+           <property name="text">
+            <string>Use &amp;DHT to find more peers</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="enableLpdCheck">
+           <property name="toolTip">
+            <string>LPD is a tool for finding peers on your local network.</string>
+           </property>
+           <property name="text">
+            <string>Use &amp;Local Peer Discovery to find more peers</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="networkTabBottomSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>1</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="desktopTab">
+      <attribute name="title">
+       <string>Desktop</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="desktopTabLayout">
+       <item>
+        <widget class="QLabel" name="desktopSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Desktop</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QVBoxLayout" name="desktopSectionLayout">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item>
+          <widget class="QCheckBox" name="showTrayIconCheck">
+           <property name="text">
+            <string>Show Transmission icon in the &amp;notification area</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="startMinimizedCheck">
+           <property name="text">
+            <string>Start &amp;minimized in notification area</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="notificationSectionSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeType">
+          <enum>QSizePolicy::Fixed</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>10</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="notificationSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Notification</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QVBoxLayout" name="notificationSectionLayout">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item>
+          <widget class="QCheckBox" name="notifyOnTorrentAddedCheck">
+           <property name="text">
+            <string>Show a notification when torrents are a&amp;dded</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="notifyOnTorrentCompletedCheck">
+           <property name="text">
+            <string>Show a notification when torrents &amp;finish</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QCheckBox" name="playSoundOnTorrentCompletedCheck">
+           <property name="text">
+            <string>Play a &amp;sound when torrents finish</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="desktopTabBottomSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>1</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="remoteTab">
+      <attribute name="title">
+       <string>Remote</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="remoteTabLayout">
+       <item>
+        <widget class="QLabel" name="remoteControlSectionLabel">
+         <property name="styleSheet">
+          <string notr="true">font-weight:bold</string>
+         </property>
+         <property name="text">
+          <string>Remote Control</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QGridLayout" name="remoteControlSectionLayout" columnstretch="0,1,0">
+         <property name="leftMargin">
+          <number>18</number>
+         </property>
+         <item row="3" column="0">
+          <widget class="QLabel" name="rpcUsernameLabel">
+           <property name="text">
+            <string>&amp;Username:</string>
+           </property>
+           <property name="buddy">
+            <cstring>rpcUsernameEdit</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="5" column="0" colspan="3">
+          <widget class="QCheckBox" name="enableRpcWhitelistCheck">
+           <property name="text">
+            <string>Only allow these IP a&amp;ddresses:</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="2">
+          <widget class="QPushButton" name="openWebClientButton">
+           <property name="text">
+            <string>&amp;Open web client</string>
+           </property>
+           <property name="autoDefault">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1" colspan="2">
+          <widget class="QSpinBox" name="rpcPortSpin">
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>65535</number>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0" colspan="3">
+          <widget class="QCheckBox" name="requireRpcAuthCheck">
+           <property name="text">
+            <string>Use &amp;authentication</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="0">
+          <widget class="QLabel" name="rpcPasswordLabel">
+           <property name="text">
+            <string>Pass&amp;word:</string>
+           </property>
+           <property name="buddy">
+            <cstring>rpcPasswordEdit</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="0" colspan="2">
+          <widget class="QCheckBox" name="enableRpcCheck">
+           <property name="text">
+            <string>Allow &amp;remote access</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1" colspan="2">
+          <widget class="QLineEdit" name="rpcUsernameEdit"/>
+         </item>
+         <item row="4" column="1" colspan="2">
+          <widget class="QLineEdit" name="rpcPasswordEdit">
+           <property name="echoMode">
+            <enum>QLineEdit::Password</enum>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="rpcPortLabel">
+           <property name="text">
+            <string>HTTP &amp;port:</string>
+           </property>
+           <property name="buddy">
+            <cstring>rpcPortSpin</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="6" column="0">
+          <widget class="QLabel" name="rpcWhitelistLabel">
+           <property name="text">
+            <string>Addresses:</string>
+           </property>
+           <property name="buddy">
+            <cstring>rpcWhitelistEdit</cstring>
+           </property>
+          </widget>
+         </item>
+         <item row="6" column="1" colspan="2">
+          <widget class="QLineEdit" name="rpcWhitelistEdit"/>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="remoteTabBottomSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>1</width>
+           <height>1</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="dialogButtons">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Close</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>FreespaceLabel</class>
+   <extends>QLabel</extends>
+   <header>freespace-label.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources>
+  <include location="application.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>dialogButtons</sender>
+   <signal>rejected()</signal>
+   <receiver>PrefsDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>uploadSpeedLimitCheck</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>uploadSpeedLimitSpin</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>94</x>
+     <y>79</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>323</x>
+     <y>79</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>downloadSpeedLimitCheck</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>downloadSpeedLimitSpin</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>94</x>
+     <y>113</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>323</x>
+     <y>113</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>ratioLimitCheck</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>ratioLimitSpin</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>129</x>
+     <y>79</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>359</x>
+     <y>79</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>idleLimitCheck</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>idleLimitSpin</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>129</x>
+     <y>113</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>359</x>
+     <y>113</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>watchDirCheck</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>watchDirButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>167</x>
+     <y>80</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>392</x>
+     <y>80</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>incompleteDirCheck</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>incompleteDirButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>169</x>
+     <y>411</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>395</x>
+     <y>411</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>completionScriptCheck</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>completionScriptButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>169</x>
+     <y>447</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>395</x>
+     <y>447</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index 92a3c8a94ade70b66a9e36245abfb07e5f799ce1..2c0d81e03ee1c153f45092329f6030fc3cb1e3d3 100644 (file)
@@ -55,6 +55,7 @@ FORMS += about.ui \
          make-dialog.ui \
          make-progress-dialog.ui \
          options.ui \
+         prefs-dialog.ui \
          relocate.ui \
          session-dialog.ui \
          stats-dialog.ui