Revision 2886 plugin/test/test.c

View differences:

test.c
51 51

  
52 52
static void compose_created_cb(GObject *obj, gpointer compose);
53 53
static void compose_destroy_cb(GObject *obj, gpointer compose);
54
static gboolean compose_send_cb(GObject *obj, gpointer compose,
55
				gint compose_mode, gint send_mode,
56
				const gchar *msg_file, GSList *to_list);
54 57

  
55 58
static void create_window(void);
56 59
static void create_folderview_sub_widget(void);
......
100 103
				  G_CALLBACK(compose_created_cb), NULL);
101 104
	syl_plugin_signal_connect("compose-destroy",
102 105
				  G_CALLBACK(compose_destroy_cb), NULL);
106
	syl_plugin_signal_connect("compose-send",
107
				  G_CALLBACK(compose_send_cb), NULL);
103 108

  
104 109
	syl_plugin_add_factory_item("<SummaryView>", "/---", NULL, NULL);
105 110
	syl_plugin_add_factory_item("<SummaryView>", "/Test Plug-in menu",
......
219 224
	g_print("test: %p: compose will be destroyed (%p)\n", obj, compose);
220 225
}
221 226

  
227
static gboolean compose_send_cb(GObject *obj, gpointer compose,
228
				gint compose_mode, gint send_mode,
229
				const gchar *msg_file, GSList *to_list)
230
{
231
	g_print("test: %p: composed message will be sent (%p)\n", obj, compose);
232
	g_print("test: compose_mode: %d, send_mode: %d, file: %s\n",
233
		compose_mode, send_mode, msg_file);
234

  
235
	return TRUE; /* return FALSE to cancel sending */
236
}
237

  
222 238
static void button_clicked(GtkWidget *widget, gpointer data)
223 239
{
224 240
	g_print("button_clicked\n");

Also available in: Unified diff