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:
Marek Kasik
2009-08-11 09:24:18 +02:00
parent 527e0937a8
commit 70efa73311
6 changed files with 49 additions and 18 deletions

View File

@ -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"