Changeset 11978


Ignore:
Timestamp:
Feb 19, 2011, 9:02:39 AM (11 years ago)
Author:
jordan
Message:

(trunk gtk) #4038 "Prefs dialog's blocklist section allows the 'update' button to be clicked when no blocklist is specified" -- fixed.

File:
1 edited

Legend:

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

    r11976 r11978  
    458458
    459459static void
     460on_blocklist_url_changed( GtkEditable * e, gpointer gbutton )
     461{
     462    gchar * url = gtk_editable_get_chars( e, 0, -1 );
     463    const gboolean err = tr_urlParse( url, -1, NULL, NULL, NULL, NULL );
     464    gtk_widget_set_sensitive( GTK_WIDGET( gbutton ), !err );
     465    g_free( url );
     466}
     467
     468static void
    460469onIntComboChanged( GtkComboBox * combo_box, gpointer core )
    461470{
     
    517526    g_signal_connect( data->check, "toggled", G_CALLBACK( target_cb ), w ); target_cb( data->check, w );
    518527    hig_workarea_add_wide_control( t, &row, h );
     528    g_signal_connect( e, "changed", G_CALLBACK( on_blocklist_url_changed ), data->updateBlocklistButton );
     529    on_blocklist_url_changed( GTK_EDITABLE( e ), data->updateBlocklistButton );
    519530
    520531    s = _( "Enable _automatic updates" );
Note: See TracChangeset for help on using the changeset viewer.