comparison gtk/plugins/gevolution/new_person_dialog.c @ 14667:70f68b34b311

[gaim-migrate @ 17413] Only de-sensitize the Add button if no username is set committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 01 Oct 2006 15:05:45 +0000
parents 009db0b357b5
children
comparison
equal deleted inserted replaced
14666:877b6d5ddf26 14667:70f68b34b311
410 G_CALLBACK(cancel_cb), dialog); 410 G_CALLBACK(cancel_cb), dialog);
411 411
412 /* Add button */ 412 /* Add button */
413 button = gtk_button_new_from_stock(GTK_STOCK_ADD); 413 button = gtk_button_new_from_stock(GTK_STOCK_ADD);
414 dialog->add_button = button; 414 dialog->add_button = button;
415 gtk_widget_set_sensitive(button, FALSE); 415 if (username == NULL || *username == '\0')
416 gtk_widget_set_sensitive(button, FALSE);
416 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); 417 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
417 gtk_widget_show(button); 418 gtk_widget_show(button);
418 419
419 g_signal_connect(G_OBJECT(button), "clicked", 420 g_signal_connect(G_OBJECT(button), "clicked",
420 G_CALLBACK(add_cb), dialog); 421 G_CALLBACK(add_cb), dialog);