You can't add a user if no country has been selected

This commit is contained in:
gunnar_g 2008-12-17 12:35:12 +00:00
parent 5b042932f7
commit 822deda761
3 changed files with 9 additions and 1 deletions

View File

@ -307,7 +307,7 @@
<child>
<widget class="GtkButton" id="button_add_player">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="sensitive">False</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_button_add_player_clicked" last_modification_time="Fri, 25 Feb 2005 16:22:19 GMT"/>

View File

@ -372,6 +372,11 @@ on_combo_country_changed (GtkComboBox *combobox,
{
gtk_tree_model_get(gtk_combo_box_get_model(combobox), &iter, 1, &buf, -1);
misc_callback_show_team_list(GTK_WIDGET(combobox), buf);
gtk_widget_set_sensitive(lookup_widget(window.startup, "button_add_player"), TRUE);
} else {
gtk_widget_set_sensitive(lookup_widget(window.startup, "button_add_player"), FALSE);
}
g_free(buf);
}

View File

@ -1,6 +1,7 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@ -172,6 +173,8 @@ create_window_startup (void)
button_add_player = gtk_button_new ();
gtk_widget_show (button_add_player);
gtk_box_pack_start (GTK_BOX (vbox2), button_add_player, FALSE, FALSE, 0);
gtk_widget_set_sensitive (button_add_player, FALSE);
GTK_WIDGET_UNSET_FLAGS (button_add_player, GTK_CAN_FOCUS);
alignment19 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment19);