Lines 121-127
create_pixmap (GtkWidget *widget,
Link Here
|
121 |
#ifdef HAVE_GTK_2 |
121 |
#ifdef HAVE_GTK_2 |
122 |
|
122 |
|
123 |
typedef struct stm_pixbuf_t { |
123 |
typedef struct stm_pixbuf_t { |
124 |
char **xpm_ptr; /* pixmap ptr */ |
124 |
const char **xpm_ptr; /* pixmap ptr */ |
125 |
GdkPixbuf *pixbuf; /* pixbuf */ |
125 |
GdkPixbuf *pixbuf; /* pixbuf */ |
126 |
struct stm_pixbuf_t *next; |
126 |
struct stm_pixbuf_t *next; |
127 |
} stm_pixbuf; |
127 |
} stm_pixbuf; |
Lines 141-153
create_pixbuf_from_xpm_data (const char **xpm_ptr)
Link Here
|
141 |
} |
141 |
} |
142 |
|
142 |
|
143 |
for ( pixbuf_list = &Stm_pixbuf_top; NULL != pixbuf_list; pixbuf_list = pixbuf_list->next ) { |
143 |
for ( pixbuf_list = &Stm_pixbuf_top; NULL != pixbuf_list; pixbuf_list = pixbuf_list->next ) { |
144 |
if ( ( NULL != pixbuf_list->xpm_ptr ) && ( pixbuf_list->xpm_ptr == (char **)xpm_ptr ) ) { |
144 |
if ( ( NULL != pixbuf_list->xpm_ptr ) && ( pixbuf_list->xpm_ptr == xpm_ptr ) ) { |
145 |
return pixbuf_list->pixbuf; |
145 |
return pixbuf_list->pixbuf; |
146 |
} |
146 |
} |
147 |
} |
147 |
} |
148 |
|
148 |
|
149 |
/* pixbuf = gdk_pixbuf_new_from_file (pathname, &error); */ |
149 |
/* pixbuf = gdk_pixbuf_new_from_file (pathname, &error); */ |
150 |
pixbuf = gdk_pixbuf_new_from_xpm_data((const char**)xpm_ptr); |
150 |
pixbuf = gdk_pixbuf_new_from_xpm_data(xpm_ptr); |
151 |
|
151 |
|
152 |
if (!pixbuf) |
152 |
if (!pixbuf) |
153 |
{ |
153 |
{ |