aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/progress_dlg.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-07-03 19:42:36 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-07-03 19:42:36 +0000
commit30b726845a651cce949eb137227367744d2c3513 (patch)
treed962d3ca75b3fd6e1e0f1eda52d445b825425b67 /gtk/progress_dlg.c
parentc82ff8f18174c0672128efff9b13bccddb716eb7 (diff)
GtkLabel is a subclass of GtkMisc, so it has alignment and padding
parameters and doesn't have to be stuffed into a GtkAlignment to align it on the left. (Alas, GtkButton *isn't* a subclass of GtkMisc, so we have to stuff the Cancel button into an alignment to keep it from growing to the width of the window.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2105 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/progress_dlg.c')
-rw-r--r--gtk/progress_dlg.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gtk/progress_dlg.c b/gtk/progress_dlg.c
index e3f016e81e..63c0b694b1 100644
--- a/gtk/progress_dlg.c
+++ b/gtk/progress_dlg.c
@@ -1,7 +1,7 @@
/* progress_dlg.c
* Routines for progress-bar (modal) dialog
*
- * $Id: progress_dlg.c,v 1.1 2000/07/03 08:36:52 guy Exp $
+ * $Id: progress_dlg.c,v 1.2 2000/07/03 19:42:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -59,8 +59,8 @@ static void cancel_cb(GtkWidget *w, gpointer data);
void *
create_progress_dlg(gchar *title, gboolean *stop_flag)
{
- GtkWidget *dlg_w, *main_vb, *title_al, *title_lb, *prog_bar,
- *cancel_al, *cancel_bt;
+ GtkWidget *dlg_w, *main_vb, *title_lb, *prog_bar, *cancel_al,
+ *cancel_bt;
dlg_w = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(dlg_w), title);
@@ -75,15 +75,14 @@ create_progress_dlg(gchar *title, gboolean *stop_flag)
/*
* Put the title here as a label indicating what we're
- * doing; stick it on the left, by putting it inside a
- * GtkAlignment.
+ * doing; set its alignment and padding so it's aligned on the
+ * left.
*/
- title_al = gtk_alignment_new(0.0, 0.0, 0.0, 0.0);
title_lb = gtk_label_new(title);
- gtk_container_add(GTK_CONTAINER(title_al), title_lb);
- gtk_box_pack_start(GTK_BOX(main_vb), title_al, FALSE, TRUE, 3);
+ gtk_box_pack_start(GTK_BOX(main_vb), title_lb, FALSE, TRUE, 3);
+ gtk_misc_set_alignment(GTK_MISC(title_lb), 0.0, 0.0);
+ gtk_misc_set_padding(GTK_MISC(title_lb), 0.0, 0.0);
gtk_widget_show(title_lb);
- gtk_widget_show(title_al);
/*
* The progress bar.