void plugin_load(void)
{
	debug_print("autoenc plug-in loaded!\n");

	syl_init_gettext(GETTEXT_PACKAGE, LOCALEDIR);

	syl_plugin_add_menuitem("/Configuration", NULL, NULL, NULL);
	syl_plugin_add_menuitem("/Configuration", _("Configure automatic attachment encryption"), autoenc_setting, NULL);

	g_signal_connect_after(syl_app_get(), "init-done", G_CALLBACK(init_done_cb), NULL);
	autoenc_app_exit_handler_id =
		g_signal_connect(syl_app_get(), "app-exit", G_CALLBACK(app_exit_cb), NULL);
	syl_plugin_signal_connect("compose-created",
				  G_CALLBACK(compose_created_cb), NULL);
	syl_plugin_signal_connect("compose-destroy",
				  G_CALLBACK(compose_destroy_cb), NULL);
	syl_plugin_signal_connect("compose-send",
				  G_CALLBACK(compose_send_cb), NULL);
	syl_plugin_signal_connect("compose-toolbar-changed",
				  G_CALLBACK(compose_toolbar_changed_cb), NULL);
	syl_plugin_signal_connect("compose-attach-changed",
				  G_CALLBACK(compose_attach_changed_cb), NULL);

	/* load config */
	read_config();

	if (is_dir_exist(get_autoenc_tmp_dir())) {
		remove_all_files(get_autoenc_tmp_dir());
	}

	debug_print("autoenc plug-in loading done\n");
}
Example #2
0
void plugin_load(void)
{
  gpointer mainwin;

  SYLPF_START_FUNC;

  syl_init_gettext(MSG2CLIP, "lib/locale");
  
  syl_plugin_add_menuitem("/Tools", NULL, NULL, NULL);
  syl_plugin_add_menuitem("/Tools", _("Msg2Clip [msg2clip]"), exec_msg2clip_menu_cb, NULL);

  mainwin = syl_plugin_main_window_get();
  g_print("mainwin: %p\n", mainwin);
  syl_plugin_main_window_popup(mainwin);

  g_signal_connect_after(syl_app_get(), "init-done", G_CALLBACK(init_done_cb),
                         NULL);
  app_exit_handler_id =
	g_signal_connect(syl_app_get(), "app-exit", G_CALLBACK(app_exit_cb),
                     NULL);

  syl_plugin_signal_connect("messageview-show",
                            G_CALLBACK(messageview_show_cb), NULL);
  
  SYLPF_END_FUNC;
}
Example #3
0
void plugin_load(void)
{
  gpointer mainwin;

  syl_init_gettext(HTMLVIEW, "lib/locale");
  g_print("HtmlView plug-in loaded!\n");

  syl_plugin_add_menuitem("/Tools", NULL, NULL, NULL);
  syl_plugin_add_menuitem("/Tools", _("HtmlView [htmlview]"), exec_htmlview_menu_cb, NULL);

  mainwin = syl_plugin_main_window_get();
  syl_plugin_main_window_popup(mainwin);

  g_signal_connect_after(syl_app_get(), "init-done", G_CALLBACK(init_done_cb),
                         NULL);
  g_signal_connect(syl_app_get(), "app-exit", G_CALLBACK(app_exit_cb), NULL);

  syl_plugin_signal_connect("messageview-show",
                            G_CALLBACK(messageview_show_cb), NULL);

  load_option_from_rcfile();

  SYLPF_OPTION.is_show_attach_tab = SYLPF_GET_RC_SHOW_ATTACH_TAB;

  g_print("htmlview plug-in loading done\n");
}
Example #4
0
void plugin_load(void)
{
#define SYLPF_FUNC_NAME "plugin_load"

  grn_rc init_status;
  gchar *message;

  SYLPF_START_FUNC;

  syl_plugin_add_menuitem("/Tools", NULL, NULL, NULL);
  syl_plugin_add_menuitem("/Tools", "SylSearch settings [sylsearch]",
                          create_config_window, NULL);

  g_signal_connect_after(syl_app_get(), "init-done", G_CALLBACK(init_done_cb),
			 NULL);
  syl_plugin_signal_connect("folderview-menu-popup",
                            G_CALLBACK(folderview_menu_popup_cb), NULL);
  syl_plugin_signal_connect("summaryview-menu-popup",
                            G_CALLBACK(summaryview_menu_popup_cb), NULL);
  syl_plugin_signal_connect("textview-menu-popup",
                            G_CALLBACK(textview_menu_popup_cb), NULL);
  syl_plugin_signal_connect("messageview-show",
                            G_CALLBACK(messageview_show_cb), NULL);
  syl_plugin_signal_connect("inc-mail-start",
                            G_CALLBACK(inc_start_cb), NULL);
  syl_plugin_signal_connect("inc-mail-finished",
                            G_CALLBACK(inc_finished_cb), NULL);

  init_status = grn_init();
  if (init_status != GRN_SUCCESS) {
    message = g_strdup_printf("failed to call grn_init(): %d",
                              init_status);
    SYLPF_ERR_MSG(message);
    g_free(message);
  }

  SYLPF_END_FUNC;
#undef SYLPF_FUNC_NAME
}