summaryrefslogtreecommitdiff
path: root/gtk/gtkprintunixdialog.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-08-31 22:45:18 -0400
committerMatthias Clasen <mclasen@redhat.com>2012-08-31 22:50:29 -0400
commitadcd3a039e2d3aae65fda7c4579128b2a8566589 (patch)
tree286dd99149f426a3da1f22eeca3becf8c3b9579b /gtk/gtkprintunixdialog.c
parent97ee5efb4bb98b272eebd5b3f5569f13016cba11 (diff)
downloadgtk+-adcd3a039e2d3aae65fda7c4579128b2a8566589.tar.gz
Fix positioning of file format radios
When the file name changes, the file format radios were dancing around. This commit keeps them flush right.
Diffstat (limited to 'gtk/gtkprintunixdialog.c')
-rw-r--r--gtk/gtkprintunixdialog.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index f2948f5f4f..21fd5c2c75 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -1206,10 +1206,10 @@ add_option_to_extension_point (GtkPrinterOption *option,
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
gtk_widget_show (hbox);
- gtk_box_pack_start (GTK_BOX (extension_point), hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (extension_point), hbox, TRUE, TRUE, 0);
}
else
- gtk_box_pack_start (GTK_BOX (extension_point), widget, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (extension_point), widget, TRUE, TRUE, 0);
}
static gint
@@ -1387,6 +1387,7 @@ update_dialog_from_settings (GtkPrintUnixDialog *dialog)
GtkWidget *table, *frame;
gboolean has_advanced, has_job;
guint nrows;
+ GList *children;
if (priv->current_printer == NULL)
{
@@ -1440,6 +1441,16 @@ update_dialog_from_settings (GtkPrintUnixDialog *dialog)
add_option_to_extension_point,
priv->extension_point);
+ /* A bit of a hack, keep the last option flush right.
+ * This keeps the file format radios from moving as the
+ * filename changes.
+ */
+ children = gtk_container_get_children (GTK_CONTAINER (priv->extension_point));
+ l = g_list_last (children);
+ if (l && l != children)
+ gtk_widget_set_halign (GTK_WIDGET (l->data), GTK_ALIGN_END);
+ g_list_free (children);
+
/* Put the rest of the groups in the advanced page */
groups = gtk_printer_option_set_get_groups (priv->options);