diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2016-07-19 09:03:55 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2016-07-19 09:03:55 +0000 |
commit | ba0ad9333b529e6a240890ee7f4b64410afecd9c (patch) | |
tree | d70656b6d812d68994cf1696d4e5b798f40c595a /src | |
parent | 27375ea78942fd6d515c86a4965420494c99cd4c (diff) |
added compose-attach-changed signal.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3518 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/compose.c | 8 | ||||
-rw-r--r-- | src/plugin.c | 11 | ||||
-rw-r--r-- | src/plugin.h | 3 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/compose.c b/src/compose.c index 708a57e8..edbff207 100644 --- a/src/compose.c +++ b/src/compose.c @@ -2350,6 +2350,8 @@ void compose_attach_append(Compose *compose, const gchar *file, COL_NAME, ainfo->name, COL_ATTACH_INFO, ainfo, -1); + + syl_plugin_signal_emit("compose-attach-changed", compose); } static void compose_attach_parts(Compose *compose, MsgInfo *msginfo) @@ -6487,6 +6489,8 @@ static void compose_attach_remove_selected(Compose *compose) } g_list_free(rows); + + syl_plugin_signal_emit("compose-attach-changed", compose); } void compose_attach_remove_all(Compose *compose) @@ -6506,6 +6510,8 @@ void compose_attach_remove_all(Compose *compose) } while (gtk_tree_model_iter_next(model, &iter) == TRUE); gtk_list_store_clear(GTK_LIST_STORE(model)); + + syl_plugin_signal_emit("compose-attach-changed", compose); } GSList *compose_get_attach_list(Compose *compose) @@ -8108,6 +8114,8 @@ static void compose_toggle_attach_cb(gpointer data, guint action, gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(compose->attach_toggle), compose->use_attach); #endif + + syl_plugin_signal_emit("compose-attach-changed", compose); } static void compose_customize_toolbar_cb(gpointer data, guint action, diff --git a/src/plugin.c b/src/plugin.c index 725495b7..52fbc5d0 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -48,6 +48,7 @@ enum { PLUGIN_MANAGER_OPEN, MAIN_WINDOW_TOOLBAR_CHANGED, COMPOSE_TOOLBAR_CHANGED, + COMPOSE_ATTACH_CHANGED, LAST_SIGNAL }; @@ -315,6 +316,16 @@ static void syl_plugin_class_init(SylPluginClass *klass) G_TYPE_NONE, 1, G_TYPE_POINTER); + plugin_signals[COMPOSE_TOOLBAR_CHANGED] = + g_signal_new("compose-attach-changed", + G_TYPE_FROM_CLASS(gobject_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET(SylPluginClass, compose_attach_changed), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, + 1, + G_TYPE_POINTER); } void syl_plugin_signal_connect(const gchar *name, GCallback callback, diff --git a/src/plugin.h b/src/plugin.h index 7d988309..9b28dc5e 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -109,8 +109,9 @@ struct _SylPluginClass void (* plugin_manager_open) (GObject *obj, GtkWidget *window); - void (* compose_toolbar_changed) (GObject *obj, gpointer compose); void (* main_window_toolbar_changed) (GObject *obj); + void (* compose_toolbar_changed) (GObject *obj, gpointer compose); + void (* compose_attach_changed) (GObject *obj, gpointer compose); }; struct _SylPluginInfo |