> Has anyone done an icon for Ethereal? I'm particularly interested in one
> suitable for use by KDE (e.g. a 32x32 xpm and a 16x16 xpm).
The only one I've seen is the one in "image/icon-ethereal.xpm", but it's
66x63. I cooked up a change to set the top-level windows icon to that
icon, but it looks somewhat ugly when shrunk to whatever the Win32
"small icon" size is by (I presume) Exceed, although it looked somewhat
better when I tried it on a friend's machine with Afterstep (I don't
know if it resized it or just clipped the edges off). I don't know how
well it'll work on, say, a black-and-white or gray-scale display.
Here's the change:
Index: ethereal.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/ethereal.c,v
retrieving revision 1.34
diff -c -r1.34 ethereal.c
*** ethereal.c 1999/05/12 06:04:46 1.34
--- ethereal.c 1999/05/18 04:02:47
***************
*** 80,85 ****
--- 80,87 ----
#include "util.h"
#include "gtkpacket.h"
+ #include "image/icon-ethereal.xpm"
+
static void file_save_ok_cb(GtkWidget *w, GtkFileSelection *fs);
static void file_save_as_ok_cb(GtkWidget *w, GtkFileSelection *fs);
***************
*** 543,551 ****
{
int opt, i;
extern char *optarg;
! GtkWidget *window, *main_vbox, *menubar, *u_pane, *l_pane,
*bv_table, *bv_hscroll, *bv_vscroll, *stat_hbox,
*tv_scrollw, *filter_bt, *filter_te;
GtkStyle *pl_style;
#ifdef GTK_HAVE_FEATURES_1_1_0
GtkAccelGroup *accel;
--- 545,557 ----
{
int opt, i;
extern char *optarg;
! GtkWidget *window, *icon_pm, *main_vbox, *menubar, *u_pane, *l_pane,
*bv_table, *bv_hscroll, *bv_vscroll, *stat_hbox,
*tv_scrollw, *filter_bt, *filter_te;
+ GdkBitmap *mask;
+ GtkStyle *style;
+ GdkColormap *cmap;
+ GdkPixmap *pixmap;
GtkStyle *pl_style;
#ifdef GTK_HAVE_FEATURES_1_1_0
GtkAccelGroup *accel;
***************
*** 884,889 ****
--- 890,903 ----
ethereal_proto_init(); /* Init anything that needs initializing */
gtk_widget_show(window);
+
+ gtk_widget_realize(window);
+ style = gtk_widget_get_style(window);
+ cmap = gdk_colormap_get_system();
+ pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, cmap, &mask,
+ &style->bg[GTK_STATE_NORMAL], icon_ethereal_xpm);
+ icon_pm = gtk_pixmap_new(pixmap, mask);
+ gdk_window_set_icon(window->window, NULL, pixmap, mask);
gtk_main();