[gtk/matthiasc/for-master: 4/11] print dialog: Fix frame <> box confusion
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 4/11] print dialog: Fix frame <> box confusion
- Date: Mon, 11 May 2020 12:17:03 +0000 (UTC)
commit 3a5cf61a4d3dac8a0e35166180f220833a8b5623
Author: Matthias Clasen <mclasen redhat com>
Date: Sun May 10 13:18:22 2020 -0400
print dialog: Fix frame <> box confusion
It is a bad idea to have a GtkBox called frame, event
if it started out its existence as a GtkFrame.
gtk/gtkprintunixdialog.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 90ba3c5f50..1830b455b6 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -1278,7 +1278,7 @@ static GtkWidget *
wrap_in_frame (const gchar *label,
GtkWidget *child)
{
- GtkWidget *frame, *label_widget;
+ GtkWidget *box, *label_widget;
gchar *bold_text;
label_widget = gtk_label_new (NULL);
@@ -1290,18 +1290,16 @@ wrap_in_frame (const gchar *label,
gtk_label_set_markup (GTK_LABEL (label_widget), bold_text);
g_free (bold_text);
- frame = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- gtk_frame_set_child (GTK_FRAME (frame), label_widget);
+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_container_add (GTK_CONTAINER (box), label_widget);
gtk_widget_set_margin_start (child, 12);
gtk_widget_set_halign (child, GTK_ALIGN_FILL);
gtk_widget_set_valign (child, GTK_ALIGN_FILL);
- gtk_frame_set_child (GTK_FRAME (frame), child);
+ gtk_container_add (GTK_CONTAINER (box), child);
- gtk_widget_show (frame);
-
- return frame;
+ return box;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]