Changeset 9506


Ignore:
Timestamp:
Nov 9, 2009, 9:27:01 PM (13 years ago)
Author:
charles
Message:

(trunk gtk) #2570: "Select right radio button when changing ratio spin entry"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/details.c

    r9504 r9506  
    434434{
    435435    torrent_set_real( di, "seedRatioLimit", gtk_spin_button_get_value( s ) );
     436    gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( di->seedCustomRadio ), TRUE );
    436437}
    437438
     
    500501    int row;
    501502    const char *s;
    502     GSList *group;
    503503    GtkWidget *t, *w, *tb, *h;
    504504
     
    542542    hig_workarea_add_section_title( t, &row, _( "Seed-Until Ratio" ) );
    543543
    544     group = NULL;
    545544    s = _( "Use _global settings" );
    546     w = gtk_radio_button_new_with_mnemonic( group, s );
    547     group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( w ) );
     545    w = gtk_radio_button_new_with_mnemonic( NULL, s );
    548546    hig_workarea_add_wide_control( t, &row, w );
    549547    g_object_set_data( G_OBJECT( w ), RATIO_KEY, GINT_TO_POINTER( TR_RATIOLIMIT_GLOBAL ) );
     
    552550    d->seedGlobalRadioTag = tag;
    553551
    554     w = gtk_radio_button_new_with_mnemonic( group, _( "Seed _regardless of ratio" ) );
    555     group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( w ) );
     552    s = _( "Seed _regardless of ratio" );
     553    w = gtk_radio_button_new_with_mnemonic_from_widget( GTK_RADIO_BUTTON( w ), s );
    556554    hig_workarea_add_wide_control( t, &row, w );
    557555    g_object_set_data( G_OBJECT( w ), RATIO_KEY, GINT_TO_POINTER( TR_RATIOLIMIT_UNLIMITED ) );
     
    562560    h = gtk_hbox_new( FALSE, GUI_PAD );
    563561    s = _( "_Seed torrent until its ratio reaches:" );
    564     w = gtk_radio_button_new_with_mnemonic( group, s );
     562    w = gtk_radio_button_new_with_mnemonic_from_widget( GTK_RADIO_BUTTON( w ), s );
    565563    d->seedCustomRadio = w;
    566564    g_object_set_data( G_OBJECT( w ), RATIO_KEY, GINT_TO_POINTER( TR_RATIOLIMIT_SINGLE ) );
    567565    tag = g_signal_connect( w, "toggled", G_CALLBACK( ratio_mode_changed_cb ), d );
    568566    d->seedCustomRadioTag = tag;
    569     group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( w ) );
    570567    gtk_box_pack_start( GTK_BOX( h ), w, FALSE, FALSE, 0 );
    571568    w = gtk_spin_button_new_with_range( 0, INT_MAX, .05 );
Note: See TracChangeset for help on using the changeset viewer.