+2011-10-17 [colin] 3.7.10cvs31
+
+ * src/action.c
+ * src/main.c
+ * src/gtk/gtkutils.c
+ * src/gtk/gtkutils.h
+ Undeprecate GIO/GdkCondition
+
2011-10-16 [mones] 3.7.10cvs30
* src/main.c
( cvs diff -u -r 1.382.2.584 -r 1.382.2.585 src/compose.c; ) > 3.7.10cvs28.patchset
( cvs diff -u -r 1.1.2.57 -r 1.1.2.58 manual/advanced.xml; ) > 3.7.10cvs29.patchset
( cvs diff -u -r 1.115.2.239 -r 1.115.2.240 src/main.c; ) > 3.7.10cvs30.patchset
+( cvs diff -u -r 1.12.2.69 -r 1.12.2.70 src/action.c; cvs diff -u -r 1.115.2.240 -r 1.115.2.241 src/main.c; cvs diff -u -r 1.5.2.98 -r 1.5.2.99 src/gtk/gtkutils.c; cvs diff -u -r 1.4.2.60 -r 1.4.2.61 src/gtk/gtkutils.h; ) > 3.7.10cvs31.patchset
MICRO_VERSION=10
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=30
+EXTRA_VERSION=31
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
static void catch_output (gpointer data,
gint source,
- GdkInputCondition cond);
+ GIOCondition cond);
static void catch_input (gpointer data,
gint source,
- GdkInputCondition cond);
+ GIOCondition cond);
static void catch_status (gpointer data,
gint source,
- GdkInputCondition cond);
+ GIOCondition cond);
static gchar *get_user_string (const gchar *action,
ActionType type);
child_info->data = data;
child_info->tag_status =
claws_input_add(child_info->chld_status,
- GDK_INPUT_READ,
+ G_IO_IN | G_IO_HUP | G_IO_ERR,
catch_status, child_info,
FALSE);
}
child_info->chld_err = chld_err[0];
child_info->chld_status = chld_status[0];
child_info->tag_in = -1;
- child_info->tag_out = claws_input_add(chld_out[0], GDK_INPUT_READ,
+ child_info->tag_out = claws_input_add(chld_out[0], G_IO_IN | G_IO_HUP | G_IO_ERR,
catch_output, child_info, FALSE);
- child_info->tag_err = claws_input_add(chld_err[0], GDK_INPUT_READ,
+ child_info->tag_err = claws_input_add(chld_err[0], G_IO_IN | G_IO_HUP | G_IO_ERR,
catch_output, child_info, FALSE);
if (!(children->action_type &
ChildInfo *child_info = (ChildInfo *) children->list->data;
child_info->tag_in = claws_input_add(child_info->chld_in,
- GDK_INPUT_WRITE,
+ G_IO_OUT | G_IO_ERR,
catch_input, children, FALSE);
}
gtk_widget_show(dialog);
}
-static void catch_status(gpointer data, gint source, GdkInputCondition cond)
+static void catch_status(gpointer data, gint source, GIOCondition cond)
{
ChildInfo *child_info = (ChildInfo *)data;
gchar buf;
wait_for_children(child_info->children);
}
-static void catch_input(gpointer data, gint source, GdkInputCondition cond)
+static void catch_input(gpointer data, gint source, GIOCondition cond)
{
Children *children = (Children *)data;
ChildInfo *child_info = (ChildInfo *)children->list->data;
gssize by_read = 0, by_written = 0;
debug_print("Sending input to grand child.\n");
- if (!(cond & GDK_INPUT_WRITE))
+ if (!(cond & (G_IO_OUT | G_IO_ERR)))
return;
gtk_widget_set_sensitive(children->input_hbox, FALSE);
debug_print("Input to grand child sent.\n");
}
-static void catch_output(gpointer data, gint source, GdkInputCondition cond)
+static void catch_output(gpointer data, gint source, GIOCondition cond)
{
ChildInfo *child_info = (ChildInfo *)data;
gint c;
return gui_manager;
}
-#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)
typedef struct _ClawsIOClosure ClawsIOClosure;
struct _ClawsIOClosure
{
- GdkInputFunction function;
- GdkInputCondition condition;
+ ClawsIOFunc function;
+ GIOCondition condition;
GDestroyNotify notify;
gpointer data;
};
static gboolean
claws_io_invoke (GIOChannel *source,
- GIOCondition condition,
- gpointer data)
+ GIOCondition condition,
+ gpointer data)
{
ClawsIOClosure *closure = data;
- GdkInputCondition gdk_cond = 0;
- if (condition & READ_CONDITION)
- gdk_cond |= GDK_INPUT_READ;
- if (condition & WRITE_CONDITION)
- gdk_cond |= GDK_INPUT_WRITE;
- if (condition & EXCEPTION_CONDITION)
- gdk_cond |= GDK_INPUT_EXCEPTION;
-
- if (closure->condition & gdk_cond)
- closure->function (closure->data, g_io_channel_unix_get_fd (source), gdk_cond);
+ if (closure->condition & condition)
+ closure->function (closure->data, g_io_channel_unix_get_fd (source),
+ condition);
return TRUE;
}
gint
claws_input_add (gint source,
- GdkInputCondition condition,
- GdkInputFunction function,
+ GIOCondition condition,
+ ClawsIOFunc function,
gpointer data,
gboolean is_sock)
{
guint result;
ClawsIOClosure *closure = g_new (ClawsIOClosure, 1);
GIOChannel *channel;
- GIOCondition cond = 0;
closure->function = function;
closure->condition = condition;
closure->notify = NULL;
closure->data = data;
- if (condition & GDK_INPUT_READ)
- cond |= READ_CONDITION;
- if (condition & GDK_INPUT_WRITE)
- cond |= WRITE_CONDITION;
- if (condition & GDK_INPUT_EXCEPTION)
- cond |= EXCEPTION_CONDITION;
-
#ifndef G_OS_WIN32
channel = g_io_channel_unix_new (source);
#else
else
channel = g_io_channel_win32_new_fd(source);
#endif
- result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond,
+ result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, condition,
claws_io_invoke,
closure, claws_io_destroy);
g_io_channel_unref (channel);
GdkPixbuf *claws_load_pixbuf_fitting(GdkPixbuf *pixbuf, int box_width,
int box_height);
+
+typedef void (*ClawsIOFunc)(gpointer data, gint source, GIOCondition condition);
gint
claws_input_add (gint source,
- GdkInputCondition condition,
- GdkInputFunction function,
+ GIOCondition condition,
+ ClawsIOFunc function,
gpointer data,
gboolean is_sock);
+
#if GTK_CHECK_VERSION(2,12,0)
#define CLAWS_TIP_DECL() {}
#define CLAWS_SET_TIP(widget,tip) { \
static gint lock_socket_remove (void);
static void lock_socket_input_cb (gpointer data,
gint source,
- GdkInputCondition condition);
+ GIOCondition condition);
static void open_compose_new (const gchar *address,
GPtrArray *attach_files);
(*sc_ice_installed_handler) (connection);
}
static gboolean sc_process_ice_messages (GIOChannel *source,
- GIOCondition condition,
- gpointer data)
+ GIOCondition condition,
+ gpointer data)
{
IceConn connection = (IceConn) data;
IceProcessMessagesStatus status;
/* register the callback of unix domain socket input */
lock_socket_tag = claws_input_add(lock_socket,
- GDK_INPUT_READ | GDK_INPUT_EXCEPTION,
+ G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI,
lock_socket_input_cb,
mainwin, TRUE);
static void lock_socket_input_cb(gpointer data,
gint source,
- GdkInputCondition condition)
+ GIOCondition condition)
{
MainWindow *mainwin = (MainWindow *)data;
gint sock;