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/gtkprinteroptionwidget.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/gtkprinteroptionwidget.c')
-rw-r--r-- | gtk/gtkprinteroptionwidget.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c index 38cdf00801..d91b51c591 100644 --- a/gtk/gtkprinteroptionwidget.c +++ b/gtk/gtkprinteroptionwidget.c @@ -767,6 +767,8 @@ construct_widgets (GtkPrinterOptionWidget *widget) case GTK_PRINTER_OPTION_TYPE_STRING: priv->entry = gtk_entry_new (); + gtk_entry_set_activates_default (GTK_ENTRY (priv->entry), + gtk_printer_option_get_activates_default (source)); gtk_widget_show (priv->entry); gtk_box_pack_start (GTK_BOX (widget), priv->entry, TRUE, TRUE, 0); g_signal_connect (priv->entry, "changed", G_CALLBACK (entry_changed_cb), widget); @@ -792,6 +794,8 @@ construct_widgets (GtkPrinterOptionWidget *widget) GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); g_object_set (priv->combo, "local-only", FALSE, NULL); + gtk_entry_set_activates_default (GTK_ENTRY (priv->entry), + gtk_printer_option_get_activates_default (source)); label = gtk_label_new_with_mnemonic (_("_Name:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); |