Make the range entry insensitive if another range option is selected.

2006-05-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprintunixdialog.c (create_main_page): Make
	the range entry insensitive if another range option
	is selected.  (#342783, Caolan McNamara)
This commit is contained in:
Matthias Clasen 2006-05-24 18:21:12 +00:00 committed by Matthias Clasen
parent 15eef255e3
commit b86d879e22

View File

@ -1375,6 +1375,14 @@ gtk_print_unix_dialog_style_set (GtkWidget *widget,
} }
} }
static void
update_range_sensitivity (GtkWidget *button,
GtkWidget *range)
{
gtk_widget_set_sensitive (range,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)));
}
static void static void
create_main_page (GtkPrintUnixDialog *dialog) create_main_page (GtkPrintUnixDialog *dialog)
{ {
@ -1496,6 +1504,8 @@ create_main_page (GtkPrintUnixDialog *dialog)
gtk_table_attach (GTK_TABLE (table), entry, gtk_table_attach (GTK_TABLE (table), entry,
1, 2, 2, 3, GTK_FILL, 0, 1, 2, 2, 3, GTK_FILL, 0,
0, 0); 0, 0);
g_signal_connect (radio, "toggled", G_CALLBACK (update_range_sensitivity), entry);
update_range_sensitivity (radio, entry);
table = gtk_table_new (3, 2, FALSE); table = gtk_table_new (3, 2, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_row_spacings (GTK_TABLE (table), 6);