Changeset 6744


Ignore:
Timestamp:
Sep 14, 2008, 7:39:07 PM (13 years ago)
Author:
charles
Message:

(gtk) make the per-torrent speed limit gui controls' behavior match that of the preference dialgo's speed limit gui controls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/details.c

    r6634 r6744  
    10921092  row = 0;
    10931093  t = hig_workarea_create ();
    1094   hig_workarea_add_section_title (t, &row, _("Bandwidth") );
     1094  hig_workarea_add_section_title (t, &row, _("Limits") );
    10951095
    10961096    tb = gtk_check_button_new_with_mnemonic (_("Limit _download speed (KB/s):"));
     
    11001100
    11011101    i = tr_torrentGetSpeedLimit( tor, TR_DOWN );
    1102     a = (GtkAdjustment*) gtk_adjustment_new (i, 0.0, G_MAXDOUBLE, 1, 1, 1);
    1103     w = gtk_spin_button_new (a, 1, 0);
     1102    w = gtk_spin_button_new_with_range( 1, INT_MAX, 5 );
     1103    gtk_spin_button_set_value( GTK_SPIN_BUTTON( w ), i );
     1104
    11041105    g_signal_connect (w, "value-changed", G_CALLBACK(dl_speed_spun_cb), gtor);
    11051106    g_signal_connect (tb, "toggled", G_CALLBACK(sensitize_from_check_cb), w);
     
    11131114
    11141115    i = tr_torrentGetSpeedLimit( tor, TR_UP );
    1115     a = (GtkAdjustment*) gtk_adjustment_new (i, 0.0, G_MAXDOUBLE, 1, 1, 1);
    1116     w = gtk_spin_button_new (a, 1, 0);
     1116    w = gtk_spin_button_new_with_range( 1, INT_MAX, 5 );
     1117    gtk_spin_button_set_value( GTK_SPIN_BUTTON( w ), i );
     1118
    11171119    g_signal_connect (w, "value-changed", G_CALLBACK(ul_speed_spun_cb), gtor);
    11181120    g_signal_connect (tb, "toggled", G_CALLBACK(sensitize_from_check_cb), w);
Note: See TracChangeset for help on using the changeset viewer.