Changeset 13796


Ignore:
Timestamp:
Jan 16, 2013, 9:42:03 PM (8 years ago)
Author:
jordan
Message:

re-sync the GTK+ and Qt clients' prefs dialogs.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr-prefs.c

    r13759 r13796  
    257257
    258258static GtkWidget*
    259 downloadPage (GObject * core)
    260 {
    261     GtkWidget * t;
    262     GtkWidget * w;
    263     GtkWidget * l;
    264     const char * s;
    265     guint row = 0;
    266 
    267     t = hig_workarea_create ();
    268 
    269     hig_workarea_add_section_title (t, &row, _("Location"));
     259downloadingPage (GObject * core)
     260{
     261  GtkWidget * t;
     262  GtkWidget * w;
     263  GtkWidget * l;
     264  const char * s;
     265  guint row = 0;
     266
     267  t = hig_workarea_create ();
     268  hig_workarea_add_section_title (t, &row, C_("Gerund", "Adding"));
     269
     270    s = _("Automatically add .torrent files _from:");
     271    l = new_check_button (s, TR_KEY_watch_dir_enabled, core);
     272    w = new_path_chooser_button (TR_KEY_watch_dir, core);
     273    gtk_widget_set_sensitive (GTK_WIDGET (w), gtr_pref_flag_get (TR_KEY_watch_dir_enabled));
     274    g_signal_connect (l, "toggled", G_CALLBACK (target_cb), w);
     275    hig_workarea_add_row_w (t, &row, l, w, NULL);
     276
     277    s = _("Show the Torrent Options _dialog");
     278    w = new_check_button (s, TR_KEY_show_options_window, core);
     279    hig_workarea_add_wide_control (t, &row, w);
     280
     281    s = _("_Start added torrents");
     282    w = new_check_button (s, TR_KEY_start_added_torrents, core);
     283    hig_workarea_add_wide_control (t, &row, w);
     284
     285    s = _("Mo_ve .torrent file to the trash");
     286    w = new_check_button (s, TR_KEY_trash_original_torrent_files, core);
     287    hig_workarea_add_wide_control (t, &row, w);
    270288
    271289    w = new_path_chooser_button (TR_KEY_download_dir, core);
    272290    hig_workarea_add_row (t, &row, _("Save to _Location:"), w, NULL);
    273291
    274     hig_workarea_add_section_divider (t, &row);
    275     hig_workarea_add_section_title (t, &row, _("Queue"));
    276 
    277     s = _("Maximum active _downloads:");
     292  hig_workarea_add_section_divider (t, &row);
     293  hig_workarea_add_section_title (t, &row, _("Download Queue"));
     294
     295    s = _("Ma_ximum active downloads:");
    278296    w = new_spin_button (TR_KEY_download_queue_size, core, 0, INT_MAX, 1);
    279297    hig_workarea_add_row (t, &row, s, w, NULL);
    280298
    281     s = _("Downloads sharing data in the last N minutes are _active:");
     299    s = _("Downloads sharing data in the last _N minutes are active:");
    282300    w = new_spin_button (TR_KEY_queue_stalled_minutes, core, 1, INT_MAX, 15);
    283301    hig_workarea_add_row (t, &row, s, w, NULL);
    284302
    285     hig_workarea_add_section_divider (t, &row);
    286     hig_workarea_add_section_title (t, &row, _("Incomplete"));
     303  hig_workarea_add_section_divider (t, &row);
     304  hig_workarea_add_section_title (t, &row, _("Incomplete"));
    287305
    288306    s = _("Append \"._part\" to incomplete files' names");
     
    297315    hig_workarea_add_row_w (t, &row, l, w, NULL);
    298316
    299     s = _("Call _script when torrent is completed:");
     317    s = _("Call scrip_t when torrent is completed:");
    300318    l = new_check_button (s, TR_KEY_script_torrent_done_enabled, core);
    301319    w = new_file_chooser_button (TR_KEY_script_torrent_done_filename, core);
     
    304322    hig_workarea_add_row_w (t, &row, l, w, NULL);
    305323
    306     return t;
     324  return t;
    307325}
    308326
     
    312330
    313331static GtkWidget*
    314 torrentPage (GObject * core)
    315 {
    316     const char * s;
    317     GtkWidget *  t;
    318     GtkWidget *  w;
    319     GtkWidget *  w2;
    320     GtkWidget *  l;
    321     guint row = 0;
    322 
    323     t = hig_workarea_create ();
    324     hig_workarea_add_section_title (t, &row, C_("Gerund", "Adding"));
    325 
    326     s = _("_Start when added");
    327     w = new_check_button (s, TR_KEY_start_added_torrents, core);
    328     hig_workarea_add_wide_control (t, &row, w);
    329 
    330     s = _("Show _options dialog");
    331     w = new_check_button (s, TR_KEY_show_options_window, core);
    332     hig_workarea_add_wide_control (t, &row, w);
    333 
    334     s = _("Mo_ve .torrent file to the trash");
    335     w = new_check_button (s, TR_KEY_trash_original_torrent_files, core);
    336     hig_workarea_add_wide_control (t, &row, w);
    337 
    338     s = _("Automatically _add torrents from:");
    339     l = new_check_button (s, TR_KEY_watch_dir_enabled, core);
    340     w = new_path_chooser_button (TR_KEY_watch_dir, core);
    341     gtk_widget_set_sensitive (GTK_WIDGET (w), gtr_pref_flag_get (TR_KEY_watch_dir_enabled));
    342     g_signal_connect (l, "toggled", G_CALLBACK (target_cb), w);
    343     hig_workarea_add_row_w (t, &row, l, w, NULL);
    344 
    345     hig_workarea_add_section_divider (t, &row);
    346     hig_workarea_add_section_title (t, &row, C_("Gerund", "Seeding"));
     332seedingPage (GObject * core)
     333{
     334  GtkWidget * t;
     335  GtkWidget * w;
     336  GtkWidget * w2;
     337  const char * s;
     338  guint row = 0;
     339
     340  t = hig_workarea_create ();
     341  hig_workarea_add_section_title (t, &row, _("Limits"));
    347342
    348343    s = _("Stop seeding at _ratio:");
     
    360355    hig_workarea_add_row_w (t, &row, w, w2, NULL);
    361356
    362     return t;
     357  return t;
    363358}
    364359
     
    520515privacyPage (GObject * core)
    521516{
    522     const char * s;
    523     GtkWidget * t;
    524     GtkWidget * w;
    525     GtkWidget * b;
    526     GtkWidget * h;
    527     GtkWidget * e;
    528     struct blocklist_data * data;
    529     guint row = 0;
    530 
    531     data = g_new0 (struct blocklist_data, 1);
    532     data->core = TR_CORE (core);
    533 
    534     t = hig_workarea_create ();
    535     hig_workarea_add_section_title (t, &row, _("Blocklist"));
     517  const char * s;
     518  GtkWidget * t;
     519  GtkWidget * w;
     520  GtkWidget * b;
     521  GtkWidget * h;
     522  GtkWidget * e;
     523  struct blocklist_data * data;
     524  guint row = 0;
     525
     526  data = g_new0 (struct blocklist_data, 1);
     527  data->core = TR_CORE (core);
     528
     529  t = hig_workarea_create ();
     530  hig_workarea_add_section_title (t, &row, _("Privacy"));
     531
     532    s = _("_Encryption mode:");
     533    w = new_encryption_combo (core, TR_KEY_encryption);
     534    hig_workarea_add_row (t, &row, s, w, NULL);
     535
     536  hig_workarea_add_section_divider (t, &row);
     537  hig_workarea_add_section_title (t, &row, _("Blocklist"));
    536538
    537539    b = new_check_button (_("Enable _blocklist:"), TR_KEY_blocklist_enabled, core);
     
    564566    g_signal_connect (data->check, "toggled", G_CALLBACK (target_cb), w); target_cb (data->check, w);
    565567
    566     hig_workarea_add_section_divider (t, &row);
    567     hig_workarea_add_section_title (t, &row, _("Privacy"));
    568 
    569     s = _("_Encryption mode:");
    570     w = new_encryption_combo (core, TR_KEY_encryption);
    571     hig_workarea_add_row (t, &row, s, w, NULL);
    572 
    573     s = _("Use PE_X to find more peers");
    574     w = new_check_button (s, TR_KEY_pex_enabled, core);
    575     s = _("PEX is a tool for exchanging peer lists with the peers you're connected to.");
    576     gtk_widget_set_tooltip_text (w, s);
    577     hig_workarea_add_wide_control (t, &row, w);
    578 
    579     s = _("Use _DHT to find more peers");
    580     w = new_check_button (s, TR_KEY_dht_enabled, core);
    581     s = _("DHT is a tool for finding peers without a tracker.");
    582     gtk_widget_set_tooltip_text (w, s);
    583     hig_workarea_add_wide_control (t, &row, w);
    584 
    585     s = _("Use _Local Peer Discovery to find more peers");
    586     w = new_check_button (s, TR_KEY_lpd_enabled, core);
    587     s = _("LPD is a tool for finding peers on your local network.");
    588     gtk_widget_set_tooltip_text (w, s);
    589     hig_workarea_add_wide_control (t, &row, w);
    590 
    591     g_object_weak_ref (G_OBJECT (t), privacyPageDestroyed, data);
    592     return t;
     568  g_object_weak_ref (G_OBJECT (t), privacyPageDestroyed, data);
     569  return t;
    593570}
    594571
    595572/****
    596 *****  Web Tab
     573*****  Remote Tab
    597574****/
    598575
     
    788765
    789766static GtkWidget*
    790 webPage (GObject * core)
     767remotePage (GObject * core)
    791768{
    792769    GtkWidget * t;
     
    802779    g_object_set_data_full (G_OBJECT (t), "page", page, remotePageFree);
    803780
    804     hig_workarea_add_section_title (t, &row, _("Web Client"));
     781    hig_workarea_add_section_title (t, &row, _("Remote Control"));
    805782
    806783    /* "enabled" checkbutton */
    807     s = _("_Enable web client");
     784    s = _("Allow _remote access");
    808785    w = new_check_button (s, TR_KEY_rpc_enabled, core);
    809786    page->rpc_tb = GTK_TOGGLE_BUTTON (w);
     
    847824
    848825    /* require authentication */
    849     s = _("Only allow these IP a_ddresses to connect:");
     826    s = _("Only allow these IP a_ddresses:");
    850827    w = new_check_button (s, TR_KEY_rpc_whitelist_enabled, core);
    851828    hig_workarea_add_wide_control (t, &row, w);
     
    10241001
    10251002static void
    1026 bandwidthPageFree (gpointer gpage)
     1003speedPageFree (gpointer gpage)
    10271004{
    10281005    struct BandwidthPage * page = gpage;
     
    10331010
    10341011static GtkWidget*
    1035 bandwidthPage (GObject * core)
     1012speedPage (GObject * core)
    10361013{
    10371014    const char * s;
     
    10641041    hig_workarea_add_section_divider (t, &row);
    10651042    h = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, GUI_PAD);
    1066     w = gtk_image_new_from_stock ("alt-speed-on", -1);
    1067     gtk_box_pack_start (GTK_BOX (h), w, FALSE, FALSE, 0);
    10681043    g_snprintf (buf, sizeof (buf), "<b>%s</b>", _("Alternative Speed Limits"));
    10691044    w = gtk_label_new (buf);
     
    10711046    gtk_label_set_use_markup (GTK_LABEL (w), TRUE);
    10721047    gtk_box_pack_start (GTK_BOX (h), w, FALSE, FALSE, 0);
     1048    w = gtk_image_new_from_stock ("alt-speed-on", -1);
     1049    gtk_box_pack_start (GTK_BOX (h), w, FALSE, FALSE, 0);
    10731050    hig_workarea_add_section_title_widget (t, &row, h);
    10741051
     
    10771054        w = gtk_label_new (buf);
    10781055        gtk_label_set_use_markup (GTK_LABEL (w), TRUE);
    1079         gtk_misc_set_alignment (GTK_MISC (w), 0.5f, 0.5f);
     1056        gtk_misc_set_alignment (GTK_MISC (w), 0.0f, 0.5f);
    10801057        hig_workarea_add_wide_control (t, &row, w);
    10811058
     
    11101087        page->sched_widgets = g_slist_prepend (page->sched_widgets, w);
    11111088
    1112     g_object_set_data_full (G_OBJECT (t), "page", page, bandwidthPageFree);
     1089    g_object_set_data_full (G_OBJECT (t), "page", page, speedPageFree);
    11131090
    11141091    refreshSchedSensitivity (page);
     
    12411218#endif
    12421219
     1220  s = _("Use PE_X to find more peers");
     1221  w = new_check_button (s, TR_KEY_pex_enabled, core);
     1222  s = _("PEX is a tool for exchanging peer lists with the peers you're connected to.");
     1223  gtk_widget_set_tooltip_text (w, s);
     1224  hig_workarea_add_wide_control (t, &row, w);
     1225
     1226  s = _("Use _DHT to find more peers");
     1227  w = new_check_button (s, TR_KEY_dht_enabled, core);
     1228  s = _("DHT is a tool for finding peers without a tracker.");
     1229  gtk_widget_set_tooltip_text (w, s);
     1230  hig_workarea_add_wide_control (t, &row, w);
     1231
     1232  s = _("Use _Local Peer Discovery to find more peers");
     1233  w = new_check_button (s, TR_KEY_lpd_enabled, core);
     1234  s = _("LPD is a tool for finding peers on your local network.");
     1235  gtk_widget_set_tooltip_text (w, s);
     1236  hig_workarea_add_wide_control (t, &row, w);
     1237
    12431238  return t;
    12441239}
     
    12661261  gtk_container_set_border_width (GTK_CONTAINER (n), GUI_PAD);
    12671262
    1268   gtk_notebook_append_page (GTK_NOTEBOOK (n),
    1269                             torrentPage (core),
    1270                             gtk_label_new (_("Torrents")));
    1271   gtk_notebook_append_page (GTK_NOTEBOOK (n),
    1272                             downloadPage (core),
     1263  gtk_notebook_append_page (GTK_NOTEBOOK (n), speedPage (core),
     1264                            gtk_label_new (_("Speed")));
     1265  gtk_notebook_append_page (GTK_NOTEBOOK (n), downloadingPage (core),
    12731266                            gtk_label_new (C_("Gerund", "Downloading")));
    1274     gtk_notebook_append_page (GTK_NOTEBOOK (n),
    1275                               bandwidthPage (core),
    1276                               gtk_label_new (_("Speed")));
    1277     gtk_notebook_append_page (GTK_NOTEBOOK (n),
    1278                               privacyPage (core),
    1279                               gtk_label_new (_("Privacy")));
    1280     gtk_notebook_append_page (GTK_NOTEBOOK (n),
    1281                               networkPage (core),
    1282                               gtk_label_new (_("Network")));
    1283     gtk_notebook_append_page (GTK_NOTEBOOK (n),
    1284                               desktopPage (core),
    1285                               gtk_label_new (_("Desktop")));
    1286     gtk_notebook_append_page (GTK_NOTEBOOK (n),
    1287                               webPage (core),
    1288                               gtk_label_new (_("Web")));
    1289 
    1290     g_signal_connect (d, "response", G_CALLBACK (response_cb), core);
    1291     gtr_dialog_set_content (GTK_DIALOG (d), n);
    1292     return d;
    1293 }
    1294 
     1267  gtk_notebook_append_page (GTK_NOTEBOOK (n), seedingPage (core),
     1268                            gtk_label_new (C_("Gerund", "Seeding")));
     1269  gtk_notebook_append_page (GTK_NOTEBOOK (n), privacyPage (core),
     1270                            gtk_label_new (_("Privacy")));
     1271  gtk_notebook_append_page (GTK_NOTEBOOK (n), networkPage (core),
     1272                            gtk_label_new (_("Network")));
     1273  gtk_notebook_append_page (GTK_NOTEBOOK (n), desktopPage (core),
     1274                            gtk_label_new (_("Desktop")));
     1275  gtk_notebook_append_page (GTK_NOTEBOOK (n), remotePage (core),
     1276                            gtk_label_new (_("Remote")));
     1277
     1278  g_signal_connect (d, "response", G_CALLBACK (response_cb), core);
     1279  gtr_dialog_set_content (GTK_DIALOG (d), n);
     1280  return d;
     1281}
     1282
  • trunk/qt/prefs-dialog.cc

    r13724 r13796  
    170170
    171171QWidget *
    172 PrefsDialog :: createWebTab( Session& session )
     172PrefsDialog :: createRemoteTab( Session& session )
    173173{
    174174    HIG * hig = new HIG( this );
    175     hig->addSectionTitle( tr( "Web Client" ) );
     175    hig->addSectionTitle( tr( "Remote Control" ) );
    176176    QWidget * w;
    177177    QHBoxLayout * h = new QHBoxLayout( );
     
    179179    connect( b, SIGNAL(clicked()), &session, SLOT(launchWebInterface()) );
    180180    h->addWidget( b, 0, Qt::AlignRight );
    181     QWidget * l = checkBoxNew( tr( "&Enable web client" ), Prefs::RPC_ENABLED );
     181    QWidget * l = checkBoxNew( tr( "Allow &remote access" ), Prefs::RPC_ENABLED );
    182182    myUnsupportedWhenRemote << l;
    183183    hig->addRow( l, h, 0 );
    184     l = hig->addRow( tr( "Listening &port:" ), w = spinBoxNew( Prefs::RPC_PORT, 0, 65535, 1 ) );
     184    l = hig->addRow( tr( "HTTP &port:" ), w = spinBoxNew( Prefs::RPC_PORT, 0, 65535, 1 ) );
    185185    myWebWidgets << l << w;
    186186    hig->addWideControl( w = checkBoxNew( tr( "Use &authentication" ), Prefs::RPC_AUTH_REQUIRED ) );
     
    190190    l = hig->addRow( tr( "Pass&word:" ), w = lineEditNew( Prefs::RPC_PASSWORD, QLineEdit::Password ) );
    191191    myWebAuthWidgets << l << w;
    192     hig->addWideControl( w = checkBoxNew( tr( "Only allow these IP a&ddresses to connect:" ), Prefs::RPC_WHITELIST_ENABLED ) );
     192    hig->addWideControl( w = checkBoxNew( tr( "Only allow these IP a&ddresses:" ), Prefs::RPC_WHITELIST_ENABLED ) );
    193193    myWebWidgets << w;
    194194    l = hig->addRow( tr( "Addresses:" ), w = lineEditNew( Prefs::RPC_WHITELIST ) );
     
    219219    const QString speed_K_str = Formatter::unitStr( Formatter::SPEED, Formatter::KB );
    220220
    221         l = checkBoxNew( tr( "Limit &download speed (%1):" ).arg( speed_K_str ), Prefs::DSPEED_ENABLED );
    222         r = spinBoxNew( Prefs::DSPEED, 0, INT_MAX, 5 );
     221        l = checkBoxNew( tr( "&Upload (%1):" ).arg( speed_K_str ), Prefs::USPEED_ENABLED );
     222        r = spinBoxNew( Prefs::USPEED, 0, INT_MAX, 5 );
    223223        hig->addRow( l, r );
    224224        enableBuddyWhenChecked( qobject_cast<QCheckBox*>(l), r );
    225225
    226         l = checkBoxNew( tr( "Limit &upload speed (%1):" ).arg( speed_K_str ), Prefs::USPEED_ENABLED );
    227         r = spinBoxNew( Prefs::USPEED, 0, INT_MAX, 5 );
     226        l = checkBoxNew( tr( "&Download (%1):" ).arg( speed_K_str ), Prefs::DSPEED_ENABLED );
     227        r = spinBoxNew( Prefs::DSPEED, 0, INT_MAX, 5 );
    228228        hig->addRow( l, r );
    229229        enableBuddyWhenChecked( qobject_cast<QCheckBox*>(l), r );
     
    245245        hig->addWideControl( new QLabel( s ) );
    246246
    247         s = tr( "Limit do&wnload speed (%1):" ).arg( speed_K_str );
     247        s = tr( "U&pload (%1):" ).arg( speed_K_str );
     248        r = spinBoxNew( Prefs :: ALT_SPEED_LIMIT_UP, 0, INT_MAX, 5 );
     249        hig->addRow( s, r );
     250
     251        s = tr( "Do&wnload (%1):" ).arg( speed_K_str );
    248252        r = spinBoxNew( Prefs :: ALT_SPEED_LIMIT_DOWN, 0, INT_MAX, 5 );
    249         hig->addRow( s, r );
    250 
    251         s = tr( "Limit u&pload speed (%1):" ).arg( speed_K_str );
    252         r = spinBoxNew( Prefs :: ALT_SPEED_LIMIT_UP, 0, INT_MAX, 5 );
    253253        hig->addRow( s, r );
    254254
     
    353353
    354354    hig->addSectionDivider( );
    355     hig->addSectionTitle( tr( "Limits" ) );
     355    hig->addSectionTitle( tr( "Peer Limits" ) );
    356356    hig->addRow( tr( "Maximum peers per &torrent:" ), spinBoxNew( Prefs::PEER_LIMIT_TORRENT, 1, FD_SETSIZE, 5 ) );
    357357    hig->addRow( tr( "Maximum peers &overall:" ), spinBoxNew( Prefs::PEER_LIMIT_GLOBAL, 1, FD_SETSIZE, 5 ) );
     
    363363    hig->addWideControl( w = checkBoxNew( tr( "Enable &uTP for peer connections" ), Prefs::UTP_ENABLED ) );
    364364    w->setToolTip( tr( "uTP is a tool for reducing network congestion." ) );
     365    hig->addWideControl( w = checkBoxNew( tr( "Use PE&X to find more peers" ), Prefs::PEX_ENABLED ) );
     366    w->setToolTip( tr( "PEX is a tool for exchanging peer lists with the peers you're connected to." ) );
     367    hig->addWideControl( w = checkBoxNew( tr( "Use &DHT to find more peers" ), Prefs::DHT_ENABLED ) );
     368    w->setToolTip( tr( "DHT is a tool for finding peers without a tracker." ) );
     369    hig->addWideControl( w = checkBoxNew( tr( "Use &Local Peer Discovery to find more peers" ), Prefs::LPD_ENABLED ) );
     370    w->setToolTip( tr( "LPD is a tool for finding peers on your local network." ) );
    365371
    366372    hig->finish( );
     
    421427    HIG * hig = new HIG( this );
    422428
     429    hig->addSectionTitle( tr( "Encryption" ) );
     430
     431    QComboBox * box = new QComboBox( );
     432    box->addItem( tr( "Allow encryption" ), 0 );
     433    box->addItem( tr( "Prefer encryption" ), 1 );
     434    box->addItem( tr( "Require encryption" ), 2 );
     435    myWidgets.insert( Prefs :: ENCRYPTION, box );
     436    connect( box, SIGNAL(activated(int)), this, SLOT(encryptionEdited(int)));
     437
     438    hig->addRow( tr( "&Encryption mode:" ), box );
     439
     440    hig->addSectionDivider( );
    423441    hig->addSectionTitle( tr( "Blocklist" ) );
    424442
     
    443461    hig->addWideControl( l );
    444462
    445     hig->addSectionDivider( );
    446     hig->addSectionTitle( tr( "Privacy" ) );
    447 
    448     QComboBox * box = new QComboBox( );
    449     box->addItem( tr( "Allow encryption" ), 0 );
    450     box->addItem( tr( "Prefer encryption" ), 1 );
    451     box->addItem( tr( "Require encryption" ), 2 );
    452     myWidgets.insert( Prefs :: ENCRYPTION, box );
    453     connect( box, SIGNAL(activated(int)), this, SLOT(encryptionEdited(int)));
    454 
    455     hig->addRow( tr( "&Encryption mode:" ), box );
    456     hig->addWideControl( w = checkBoxNew( tr( "Use PE&X to find more peers" ), Prefs::PEX_ENABLED ) );
    457     w->setToolTip( tr( "PEX is a tool for exchanging peer lists with the peers you're connected to." ) );
    458     hig->addWideControl( w = checkBoxNew( tr( "Use &DHT to find more peers" ), Prefs::DHT_ENABLED ) );
    459     w->setToolTip( tr( "DHT is a tool for finding peers without a tracker." ) );
    460     hig->addWideControl( w = checkBoxNew( tr( "Use &Local Peer Discovery to find more peers" ), Prefs::LPD_ENABLED ) );
    461     w->setToolTip( tr( "LPD is a tool for finding peers on your local network." ) );
    462 
    463463    hig->finish( );
    464464    updateBlocklistLabel( );
     
    521521
    522522QWidget *
    523 PrefsDialog :: createTorrentsTab( )
     523PrefsDialog :: createSeedingTab( )
    524524{
    525525    const int iconSize( style( )->pixelMetric( QStyle :: PM_SmallIconSize ) );
     
    532532    QWidget *l, *r;
    533533    HIG * hig = new HIG( this );
    534     hig->addSectionTitle( tr( "Adding" ) );
    535 
    536         hig->addWideControl( checkBoxNew( tr( "Show &options dialog" ), Prefs::OPTIONS_PROMPT ) );
    537         hig->addWideControl( checkBoxNew( tr( "&Start when added" ), Prefs::START ) );
    538         hig->addWideControl( checkBoxNew( tr( "Mo&ve .torrent file to the trash" ), Prefs::TRASH_ORIGINAL ) );
    539 
    540         l = checkBoxNew( tr( "Automatically &add torrents from:" ), Prefs::DIR_WATCH_ENABLED );
    541         QPushButton * b = myWatchButton = new QPushButton;
    542         b->setIcon( folderPixmap );
    543         b->setStyleSheet( QString::fromAscii( "text-align: left; padding-left: 5; padding-right: 5" ) );
    544         connect( b, SIGNAL(clicked(bool)), this, SLOT(onWatchClicked(void)) );
    545         hig->addRow( l, b );
    546         enableBuddyWhenChecked( qobject_cast<QCheckBox*>(l), b );
    547 
    548     hig->addSectionDivider( );
    549     hig->addSectionTitle( tr( "Seeding Limits" ) );
     534    hig->addSectionTitle( tr( "Limits" ) );
    550535
    551536        l = checkBoxNew( tr( "Stop seeding at &ratio:" ), Prefs::RATIO_ENABLED );
     
    564549
    565550QWidget *
    566 PrefsDialog :: createDownloadTab( )
     551PrefsDialog :: createDownloadingTab( )
    567552{
    568553    const int iconSize( style( )->pixelMetric( QStyle :: PM_SmallIconSize ) );
     
    573558    const QPixmap filePixmap = fileIcon.pixmap( iconSize );
    574559
    575     QWidget *l;
     560    QWidget * l;
     561    QPushButton * b;
    576562    HIG * hig = new HIG( this );
    577     hig->addSectionTitle( tr( "Location" ) );
    578 
    579         QPushButton * b = myDestinationButton = new QPushButton;
     563    hig->addSectionTitle( tr( "Adding" ) );
     564
     565        l = checkBoxNew( tr( "Automatically add .torrent files &from:" ), Prefs::DIR_WATCH_ENABLED );
     566        b = myWatchButton = new QPushButton;
     567        b->setIcon( folderPixmap );
     568        b->setStyleSheet( QString::fromAscii( "text-align: left; padding-left: 5; padding-right: 5" ) );
     569        connect( b, SIGNAL(clicked(bool)), this, SLOT(onWatchClicked(void)) );
     570        hig->addRow( l, b );
     571        enableBuddyWhenChecked( qobject_cast<QCheckBox*>(l), b );
     572
     573        hig->addWideControl( checkBoxNew( tr( "Show the Torrent Options &dialog" ), Prefs::OPTIONS_PROMPT ) );
     574
     575        hig->addWideControl( checkBoxNew( tr( "&Start added torrents" ), Prefs::START ) );
     576
     577        hig->addWideControl( checkBoxNew( tr( "Mo&ve the .torrent file to the trash" ), Prefs::TRASH_ORIGINAL ) );
     578
     579        b = myDestinationButton = new QPushButton;
    580580        b->setIcon( folderPixmap );
    581581        b->setStyleSheet( QString::fromAscii( "text-align: left; padding-left: 5; padding-right: 5" ) );
     
    584584
    585585    hig->addSectionDivider( );
    586     hig->addSectionTitle( tr( "Queue" ) );
     586    hig->addSectionTitle( tr( "Download Queue" ) );
    587587   
    588         hig->addRow( tr( "Maximum active &downloads:" ), spinBoxNew( Prefs::DOWNLOAD_QUEUE_SIZE, 1, INT_MAX, 1 ) );
    589         hig->addRow( tr( "Downloads sharing data in the last N minutes are &active:" ), spinBoxNew( Prefs::QUEUE_STALLED_MINUTES, 1, INT_MAX, 10 ) );
     588        hig->addRow( tr( "Ma&ximum active downloads:" ), spinBoxNew( Prefs::DOWNLOAD_QUEUE_SIZE, 1, INT_MAX, 1 ) );
     589        hig->addRow( tr( "Downloads sharing data in the last &N minutes are active:" ), spinBoxNew( Prefs::QUEUE_STALLED_MINUTES, 1, INT_MAX, 10 ) );
    590590
    591591    hig->addSectionDivider( );
     
    628628
    629629    QTabWidget * t = new QTabWidget( this );
    630     t->addTab( createTorrentsTab( ),     tr( "Torrents" ) );
    631     t->addTab( createDownloadTab( ),     tr( "Download" ) );
    632630    t->addTab( createSpeedTab( ),        tr( "Speed" ) );
     631    t->addTab( createDownloadingTab( ),  tr( "Downloading" ) );
     632    t->addTab( createSeedingTab( ),      tr( "Seeding" ) );
    633633    t->addTab( createPrivacyTab( ),      tr( "Privacy" ) );
    634634    t->addTab( createNetworkTab( ),      tr( "Network" ) );
    635635    t->addTab( createDesktopTab( ),      tr( "Desktop" ) );
    636     t->addTab( createWebTab( session ),  tr( "Web" ) );
     636    t->addTab( createRemoteTab(session), tr( "Remote" ) );
    637637    myLayout->addWidget( t );
    638638
  • trunk/qt/prefs-dialog.h

    r12607 r13796  
    7878        void setPref( int key, const QVariant& v );
    7979        bool isAllowed( int key ) const;
    80         QWidget * createTorrentsTab( );
    81         QWidget * createDownloadTab( );
     80        QWidget * createDownloadingTab( );
     81        QWidget * createSeedingTab( );
    8282        QWidget * createSpeedTab( );
    8383        QWidget * createPrivacyTab( );
    8484        QWidget * createNetworkTab( );
    8585        QWidget * createDesktopTab( );
    86         QWidget * createWebTab( Session& );
     86        QWidget * createRemoteTab( Session& );
    8787
    8888    private:
Note: See TracChangeset for help on using the changeset viewer.