Changeset 5947


Ignore:
Timestamp:
May 27, 2008, 5:47:39 PM (14 years ago)
Author:
charles
Message:

remove dead code

Location:
trunk/gtk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/details.c

    r5922 r5947  
    979979
    980980
    981 #if 0
    982 static void
    983 seeding_cap_toggled_cb (GtkToggleButton *tb, gpointer gtor)
    984 {
    985   tr_torrent_set_seeding_cap_enabled (TR_TORRENT(gtor),
    986                                       gtk_toggle_button_get_active(tb));
    987 }
    988 #endif
    989 
    990981static void
    991982sensitize_from_check_cb (GtkToggleButton *toggle, gpointer w)
     
    10121003  setSpeedLimit( spin, gtor, TR_DOWN );
    10131004}
    1014 
    1015 #if 0
    1016 static void
    1017 seeding_ratio_spun_cb (GtkSpinButton *spin, gpointer gtor)
    1018 {
    1019   tr_torrent_set_seeding_cap_ratio (TR_TORRENT(gtor),
    1020                                     gtk_spin_button_get_value(spin));
    1021 }
    1022 #endif
    10231005
    10241006static void
     
    10771059    hig_workarea_add_row( t, &row, _( "_Maximum peers:" ), w, w );
    10781060    g_signal_connect( w, "value-changed", G_CALLBACK( max_peers_spun_cb ), gtor );
    1079 
    1080 #if 0
    1081     tb = gtk_check_button_new_with_mnemonic (_("_Stop seeding at ratio:"));
    1082     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tb), gtor->seeding_cap_enabled);
    1083     g_signal_connect (tb, "toggled", G_CALLBACK(seeding_cap_toggled_cb), gtor);
    1084     a = (GtkAdjustment*) gtk_adjustment_new (gtor->seeding_cap, 0.0, G_MAXDOUBLE, 1, 1, 1);
    1085     w = gtk_spin_button_new (a, 1, 1);
    1086     g_signal_connect (w, "value-changed", G_CALLBACK(seeding_ratio_spun_cb), gtor);
    1087     g_signal_connect (tb, "toggled", G_CALLBACK(sensitize_from_check_cb), w);
    1088     sensitize_from_check_cb (GTK_TOGGLE_BUTTON(tb), w);
    1089     hig_workarea_add_row_w (t, &row, tb, w, NULL);
    1090 #endif
    10911061
    10921062  hig_workarea_finish (t, &row);
  • trunk/gtk/main.c

    r5930 r5947  
    10121012                     gpointer       data UNUSED)
    10131013{
    1014     TrTorrent * tor = NULL;
    1015     gtk_tree_model_get( model, iter, MC_TORRENT, &tor, -1 );
    1016     tr_torrent_start( tor );
    1017     g_object_unref( G_OBJECT( tor ) );
     1014    tr_torrent * tor = NULL;
     1015    gtk_tree_model_get( model, iter, MC_TORRENT_RAW, &tor, -1 );
     1016    tr_torrentStart( tor );
    10181017}
    10191018
     
    10241023                    gpointer       data UNUSED)
    10251024{
    1026     TrTorrent * tor = NULL;
    1027     gtk_tree_model_get( model, iter, MC_TORRENT, &tor, -1 );
    1028     tr_torrent_stop( tor );
    1029     g_object_unref( G_OBJECT( tor ) );
     1025    tr_torrent * tor = NULL;
     1026    gtk_tree_model_get( model, iter, MC_TORRENT_RAW, &tor, -1 );
     1027    tr_torrentStop( tor );
    10301028}
    10311029
     
    10361034                      gpointer       data UNUSED)
    10371035{
    1038     TrTorrent * tor = NULL;
    1039     gtk_tree_model_get( model, iter, MC_TORRENT, &tor, -1 );
    1040     tr_torrentManualUpdate( tr_torrent_handle( tor ) );
    1041     g_object_unref( G_OBJECT( tor ) );
     1036    tr_torrent * tor = NULL;
     1037    gtk_tree_model_get( model, iter, MC_TORRENT_RAW, &tor, -1 );
     1038    tr_torrentManualUpdate( tor );
    10421039}
    10431040
  • trunk/gtk/tr-core.c

    r5934 r5947  
    864864                            -1 );
    865865
    866     /* check the seeding cap */
    867     tr_torrent_check_seeding_cap ( gtor );
    868 
    869866    /* cleanup */
    870867    g_object_unref( gtor );
  • trunk/gtk/tr-torrent.c

    r5880 r5947  
    4141   tr_torrent * handle;
    4242   gboolean do_remove;
    43    gboolean seeding_cap_enabled;
    44    gdouble seeding_cap; /* ratio to stop seeding at */
    4543};
    4644
     
    5654                                                  struct TrTorrentPrivate );
    5755    p->handle = NULL;
    58     p->seeding_cap = 2.0;
    5956
    6057#ifdef REFDBG
     
    146143}
    147144
    148 void
    149 tr_torrent_start( TrTorrent * self )
    150 {
    151     tr_torrent * handle = tr_torrent_handle( self );
    152     if( handle )
    153         tr_torrentStart( handle );
    154 }
    155 
    156 void
    157 tr_torrent_stop( TrTorrent * self )
    158 {
    159     tr_torrent * handle = tr_torrent_handle( self );
    160     if( handle )
    161         tr_torrentStop( handle );
    162 }
    163 
    164 
    165145static gboolean
    166146notifyInMainThread( gpointer user_data )
     
    239219}
    240220
    241 void
    242 tr_torrent_check_seeding_cap ( TrTorrent *gtor)
    243 {
    244   const tr_stat * st = tr_torrent_stat( gtor );
    245   if ((gtor->priv->seeding_cap_enabled) && (st->ratio >= gtor->priv->seeding_cap))
    246     tr_torrent_stop (gtor);
    247 }
    248 void
    249 tr_torrent_set_seeding_cap_ratio ( TrTorrent *gtor, gdouble ratio )
    250 {
    251   gtor->priv->seeding_cap = ratio;
    252   tr_torrent_check_seeding_cap (gtor);
    253 }
    254 void
    255 tr_torrent_set_seeding_cap_enabled ( TrTorrent *gtor, gboolean b )
    256 {
    257   if ((gtor->priv->seeding_cap_enabled = b))
    258     tr_torrent_check_seeding_cap (gtor);
    259 }
    260 
    261221char *
    262222tr_torrent_status_str ( TrTorrent * gtor )
  • trunk/gtk/tr-torrent.h

    r5868 r5947  
    6868tr_torrent_info(TrTorrent *tor);
    6969
    70 void
    71 tr_torrent_start( TrTorrent * tor );
    72 
    73 void
    74 tr_torrent_stop( TrTorrent * tor );
    75 
    7670char*
    7771tr_torrent_status_str ( TrTorrent * tor );
     
    8276void
    8377tr_torrent_open_folder( TrTorrent * tor );
    84 
    85 void
    86 tr_torrent_check_seeding_cap ( TrTorrent* );
    87 void
    88 tr_torrent_set_seeding_cap_ratio ( TrTorrent*, gdouble ratio );
    89 void
    90 tr_torrent_set_seeding_cap_enabled ( TrTorrent*, gboolean );
    9178
    9279TrTorrent *
Note: See TracChangeset for help on using the changeset viewer.