aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-13 11:56:42 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-13 11:59:37 -0700
commitcb2f70f631bea638f8557758e4c88aa1c5d7a058 (patch)
treeabe890c4bb73f8558b4bc97bea5b1e382baeb786
parent5a47bdc9c422603c94212adda77d47b3a47c8172 (diff)
downloadsubsurface-cb2f70f631bea638f8557758e4c88aa1c5d7a058.tar.gz
Always pack the widgets into boxes, not frames
Let's try to be consistent about this. Make the parent of each widget be a box. Maybe the frames come with boxes, but since I have no clue about gtk, I'm going to just always create them by hand. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--equipment.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/equipment.c b/equipment.c
index 4e2b292e4..407cb3d14 100644
--- a/equipment.c
+++ b/equipment.c
@@ -286,25 +286,22 @@ static void nitrox_cb(GtkToggleButton *button, gpointer data)
static void cylinder_widget(GtkWidget *box, int nr, GtkListStore *model)
{
- GtkWidget *frame, *hbox;
+ GtkWidget *frame, *hbox, *hbox2;
GtkWidget *widget;
char buffer[80];
hbox = gtk_hbox_new(FALSE, 3);
gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0);
- snprintf(buffer, sizeof(buffer), "Cylinder %d", nr);
+ snprintf(buffer, sizeof(buffer), "Cylinder %d", nr+1);
frame = gtk_frame_new(buffer);
gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, TRUE, 0);
- hbox = gtk_hbox_new(FALSE, 3);
- gtk_container_add(GTK_CONTAINER(frame), hbox);
-
- frame = gtk_frame_new("Description");
- gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, TRUE, 0);
+ hbox2 = gtk_hbox_new(FALSE, 3);
+ gtk_container_add(GTK_CONTAINER(frame), hbox2);
widget = gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(model), 0);
- gtk_container_add(GTK_CONTAINER(frame), widget);
+ gtk_box_pack_start(GTK_BOX(hbox2), widget, FALSE, TRUE, 0);
cylinder_description = GTK_COMBO_BOX(widget);
g_signal_connect(widget, "changed", G_CALLBACK(cylinder_cb), NULL);