diff options
author | Marek Kasik <mkasik@redhat.com> | 2009-08-11 09:24:18 +0200 |
---|---|---|
committer | Marek Kasik <mkasik@redhat.com> | 2009-08-11 09:24:18 +0200 |
commit | 70efa7331100df0743bd8a1b85231dc3ec67c24d (patch) | |
tree | edd61f2d2b6c5cee9755b33a732253831de3a22f /gtk/gtkprinteroption.c | |
parent | 527e0937a82729edc7d856c5730967b491a5403d (diff) | |
download | gtk+-70efa7331100df0743bd8a1b85231dc3ec67c24d.tar.gz |
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.
Diffstat (limited to 'gtk/gtkprinteroption.c')
-rw-r--r-- | gtk/gtkprinteroption.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gtk/gtkprinteroption.c b/gtk/gtkprinteroption.c index 983dc65d56..47fcd32755 100644 --- a/gtk/gtkprinteroption.c +++ b/gtk/gtkprinteroption.c @@ -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" |