diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2004-07-04 12:15:41 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2004-07-04 12:15:41 +0000 |
commit | 176646edbf6de26e4fb2e7faa2c921c506aea0c9 (patch) | |
tree | c3a40c6e4ad666ec0833d16f30d24f9b750f7ac8 /gtk/ui_util.c | |
parent | 466eaf20f0f613c37e449f9a4d915c7a2729ccdf (diff) |
added a splash screen while Ethereal is started
svn path=/trunk/; revision=11310
Diffstat (limited to 'gtk/ui_util.c')
-rw-r--r-- | gtk/ui_util.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gtk/ui_util.c b/gtk/ui_util.c index d8aa31c871..d70099d883 100644 --- a/gtk/ui_util.c +++ b/gtk/ui_util.c @@ -1,7 +1,7 @@ /* ui_util.c * UI utility routines * - * $Id: ui_util.c,v 1.27 2004/05/30 11:54:37 ulfl Exp $ + * $Id: ui_util.c,v 1.28 2004/07/04 12:15:41 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -493,15 +493,15 @@ window_destroy(GtkWidget *win) } -/* convert an xpm to a GtkWidget, using the top_level window settings */ -/* (be sure that the top_level window is already being displayed) */ -GtkWidget *xpm_to_widget(const char ** xpm) { +/* convert an xpm to a GtkWidget, using the window settings from it's parent */ +/* (be sure that the parent window is already being displayed) */ +GtkWidget *xpm_to_widget_from_parent(GtkWidget *parent, const char ** xpm) { #if GTK_MAJOR_VERSION < 2 GdkPixmap *icon; GdkBitmap * mask; - icon = gdk_pixmap_create_from_xpm_d(top_level->window, &mask, &top_level->style->white, (char **) xpm); + icon = gdk_pixmap_create_from_xpm_d(parent->window, &mask, &parent->style->white, (char **) xpm); return gtk_pixmap_new(icon, mask); #else GdkPixbuf * pixbuf; @@ -510,13 +510,20 @@ GtkWidget *xpm_to_widget(const char ** xpm) { pixbuf = gdk_pixbuf_new_from_xpm_data(xpm); - gdk_pixbuf_render_pixmap_and_mask_for_colormap (pixbuf, gtk_widget_get_colormap(top_level), &pixmap, &bitmap, 128); + gdk_pixbuf_render_pixmap_and_mask_for_colormap (pixbuf, gtk_widget_get_colormap(parent), &pixmap, &bitmap, 128); return gtk_image_new_from_pixmap (pixmap, bitmap); #endif } +/* convert an xpm to a GtkWidget, using the top_level window settings */ +/* (be sure that the top_level window is already being displayed) */ +GtkWidget *xpm_to_widget(const char ** xpm) { + return xpm_to_widget_from_parent(top_level, xpm); +} + + /* Set the name of the top-level window and its icon to the specified string. */ void |