void gtkut_widget_set_app_icon(GtkWidget *widget)
{
-#include "pixmaps/claws-mail.xpm"
- static GdkPixmap *sylpheedclawsxpm;
- static GdkBitmap *sylpheedclawsxpmmask;
+ static GdkPixbuf *icon = NULL;
g_return_if_fail(widget != NULL);
g_return_if_fail(widget->window != NULL);
- if (!sylpheedclawsxpm) {
- PIXMAP_CREATE(widget, sylpheedclawsxpm, sylpheedclawsxpmmask,
- claws_mail_xpm);
+ if (!icon) {
+ stock_pixbuf_gdk(widget, STOCK_PIXMAP_CLAWS_MAIL_ICON, &icon);
}
- gdk_window_set_icon(widget->window, NULL, sylpheedclawsxpm, sylpheedclawsxpmmask);
+ if (icon)
+ gtk_window_set_icon(GTK_WINDOW(widget), icon);
}
void gtkut_widget_set_composer_icon(GtkWidget *widget)
{
- static GdkPixmap *xpm;
- static GdkBitmap *bmp;
-
+ static GdkPixbuf *icon = NULL;
+
g_return_if_fail(widget != NULL);
g_return_if_fail(widget->window != NULL);
- if (!xpm) {
- stock_pixmap_gdk(widget, STOCK_PIXMAP_MAIL_COMPOSE, &xpm, &bmp);
- }
- gdk_window_set_icon(widget->window, NULL, xpm, bmp);
+ if (!icon) {
+ stock_pixbuf_gdk(widget, STOCK_PIXMAP_MAIL_COMPOSE, &icon);
+ }
+ if (icon)
+ gtk_window_set_icon(GTK_WINDOW(widget), icon);
}
static gboolean move_bar = FALSE;
return gui_manager;
}
-#ifdef G_OS_UNIX
#define READ_CONDITION (G_IO_IN | G_IO_HUP | G_IO_ERR)
#define WRITE_CONDITION (G_IO_OUT | G_IO_ERR)
#define EXCEPTION_CONDITION (G_IO_PRI)
claws_input_add (gint source,
GdkInputCondition condition,
GdkInputFunction function,
- gpointer data)
+ gpointer data,
+ gboolean is_sock)
{
guint result;
ClawsIOClosure *closure = g_new (ClawsIOClosure, 1);
if (condition & GDK_INPUT_EXCEPTION)
cond |= EXCEPTION_CONDITION;
+#ifndef G_OS_WIN32
channel = g_io_channel_unix_new (source);
+#else
+ if (is_sock)
+ channel = g_io_channel_win32_new_socket(source);
+ else
+ channel = g_io_channel_win32_new_fd(source);
+#endif
result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond,
claws_io_invoke,
closure, claws_io_destroy);
return result;
}
-
-#endif