printing: Avoid a crash
authorMatthias Clasen <mclasen@redhat.com>
Sat, 28 Mar 2020 19:22:13 +0000 (15:22 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 28 Mar 2020 19:36:15 +0000 (15:36 -0400)
When no printer has been selected (e.g. because we don't
find any printers), the 'print at' radio group should be
insensitive, except for the 'now' choice. Selecting another
option in this situation will lead to a crash.

gtk/ui/gtkprintunixdialog.ui

index 35f2589583ea439943bab4bf60a1db8b36213086..eccba317b2c96c40dc06964343e62d07d2de1859 100644 (file)
                                 </child>
                                 <child>
                                   <object class="GtkRadioButton" id="print_at_radio">
+                                    <property name="sensitive">0</property>
                                     <property name="label" translatable="yes" comments="this is one of the choices for the print at option in the print dialog. It also serves as the label for an entry that allows the user to enter a time.">A_t:</property>
                                     <property name="can-focus">1</property>
                                     <property name="has-tooltip">1</property>
                                 </child>
                                 <child>
                                   <object class="GtkRadioButton" id="print_hold_radio">
+                                    <property name="sensitive">0</property>
                                     <property name="label" translatable="yes" comments="this is one of the choices for the print at option in the print dialog. It means that the print job will not be printed until it explicitly gets &apos;released&apos;.">On _hold</property>
                                     <property name="can-focus">1</property>
                                     <property name="has-tooltip">1</property>