aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-07-07 07:01:37 +0000
committerGuy Harris <guy@alum.mit.edu>2004-07-07 07:01:37 +0000
commit081f3ca151683218745626f50b41301679383153 (patch)
treef556034f77acf9642bf99b8344ecae1e5a55c7b7 /gtk
parenta54ce518c87f030c72594b4076aea94dfe1f2d83 (diff)
Realize the splash screen window right after creating it, rather than
doing a "show all" followed by a "hide"; that way we don't get a tiny window that pops up briefly and disappears. Get rid of the additional positioning of the splash screen - "splash_window_new()" does that for us. Expand some comments. svn path=/trunk/; revision=11331
Diffstat (limited to 'gtk')
-rw-r--r--gtk/about_dlg.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gtk/about_dlg.c b/gtk/about_dlg.c
index 5d71285909..94783d2512 100644
--- a/gtk/about_dlg.c
+++ b/gtk/about_dlg.c
@@ -1,6 +1,6 @@
/* about_dlg.c
*
- * $Id: about_dlg.c,v 1.22 2004/07/07 05:36:10 guy Exp $
+ * $Id: about_dlg.c,v 1.23 2004/07/07 07:01:37 guy Exp $
*
* Ulf Lamping <ulf.lamping@web.de>
*
@@ -95,22 +95,23 @@ splash_new(char *message)
win = splash_window_new();
+ /* When calling about_ethereal(), we must realize the top-level
+ widget for the window, otherwise GTK will throw a warning
+ because we don't have a colormap associated with that window and
+ can't handle the pixmap. */
+ gtk_widget_realize(win);
+
main_vb = gtk_vbox_new(FALSE, 6);
gtk_container_border_width(GTK_CONTAINER(main_vb), 24);
gtk_container_add(GTK_CONTAINER(win), main_vb);
- /* when calling about_ethereal(), we must have a visible window, */
- /* otherwise GTK will throw a warning */
- gtk_widget_show_all(win);
about_ethereal(win, main_vb, "Ethereal - Network Protocol Analyzer");
- gtk_widget_hide(win);
main_lb = gtk_label_new(message);
gtk_container_add(GTK_CONTAINER(main_vb), main_lb);
OBJECT_SET_DATA(win, "splash_label", main_lb);
gtk_widget_show_all(win);
- gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER);
splash_update(win, message);
@@ -127,7 +128,8 @@ splash_update(GtkWidget *win, char *message)
main_lb = OBJECT_GET_DATA(win, "splash_label");
gtk_label_set_text(GTK_LABEL(main_lb), message);
- /* process all pending GUI events before continue */
+ /* Process all pending GUI events before continuing, so that
+ the splash screen window gets updated. */
while (gtk_events_pending()) gtk_main_iteration();
}