Print when Enter pressed in certain GtkEntries of the print dialog
Print when Enter pressed in Name entry or Command Line entry in the print dialog (#564695). Add gtk_printer_option_set_activates_default() function and gtk_printer_option_get_activates_default() function to control behaviour of GtkPrinterOptionWidget.
This commit is contained in:
		| @ -63,6 +63,7 @@ static void | ||||
| gtk_printer_option_init (GtkPrinterOption *option) | ||||
| { | ||||
|   option->value = g_strdup (""); | ||||
|   option->activates_default = FALSE; | ||||
| } | ||||
|  | ||||
| static void | ||||
| @ -215,6 +216,23 @@ gtk_printer_option_has_choice (GtkPrinterOption     *option, | ||||
|   return FALSE; | ||||
| } | ||||
|  | ||||
| void | ||||
| gtk_printer_option_set_activates_default (GtkPrinterOption *option, | ||||
| 					  gboolean          activates) | ||||
| { | ||||
|   g_return_if_fail (GTK_IS_PRINTER_OPTION (option)); | ||||
|  | ||||
|   option->activates_default = activates; | ||||
| } | ||||
|  | ||||
| gboolean | ||||
| gtk_printer_option_get_activates_default (GtkPrinterOption *option) | ||||
| { | ||||
|   g_return_val_if_fail (GTK_IS_PRINTER_OPTION (option), FALSE); | ||||
|  | ||||
|   return option->activates_default; | ||||
| } | ||||
|  | ||||
|  | ||||
| #define __GTK_PRINTER_OPTION_C__ | ||||
| #include "gtkaliasdef.c" | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Marek Kasik
					Marek Kasik