4 /* vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: */
7 * Virtual folder plugin for claws-mail
9 * Claws Mail is Copyright (C) 1999-2012 by the Claws Mail Team
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
33 #include "common/claws.h"
34 #include "common/version.h"
38 #include "alertpanel.h"
39 #include "statusbar.h"
42 #include "vfolder_gtk.h"
44 #define PLUGIN_NAME (_("VFolder"))
46 static GtkActionEntry vfolder_main_menu
[] = {{
48 NULL
, N_("Create virtual folder..."),
49 "<Control>v", N_("Create a virtual folder"),
50 G_CALLBACK(vfolder_new_folder_cb
)
53 static gint main_menu_id
= 0;
55 gint
plugin_init(gchar
** error
) {
57 MainWindow
*mainwin
= mainwindow_get_mainwindow();
60 bindtextdomain(TEXTDOMAIN
, LOCALEDIR
);
62 bindtextdomain(TEXTDOMAIN
, get_locale_dir());
64 bind_textdomain_codeset(TEXTDOMAIN
, "UTF-8");
66 if (!check_plugin_version(MAKE_NUMERIC_VERSION(0,0,1,0),
67 VERSION_NUMERIC
, PLUGIN_NAME
, error
))
70 gtk_action_group_add_actions(mainwin
->action_group
, vfolder_main_menu
,
71 1, (gpointer
)mainwin
);
72 MENUITEM_ADDUI_ID_MANAGER(mainwin
->ui_manager
, "/Menu/View", "CreateVfolder",
73 "View/CreateVfolder", GTK_UI_MANAGER_MENUITEM
,
76 if (! vfolder_init()) {
77 debug_print("vfolder plugin unloading due to init errors\n");
82 debug_print("vfolder plugin loaded\n");
87 gboolean
plugin_done(void) {
88 MainWindow
*mainwin
= mainwindow_get_mainwindow();
95 MENUITEM_REMUI_MANAGER(mainwin
->ui_manager
,mainwin
->action_group
, "View/CreateVfolder", main_menu_id
);
98 debug_print("vfolder plugin unloaded\n");
100 debug_set_mode(FALSE
);
104 const gchar
* plugin_licence(void) {
108 const gchar
* plugin_version(void) {
109 return PLUGINVERSION
;
112 const gchar
* plugin_type(void) {
116 const gchar
* plugin_name(void) {
120 const gchar
* plugin_desc(void) {
121 return _("This plugin adds virtual folder support to Claws Mail.\n"
123 "1) Select one or more mail folder(s) to use as the basic mail pool\n"
124 "2) Define a filter\n"
125 "3) Specify name for virtual folder\n"
126 "4) Press create and wait until the scanning of the mail pool finishes\n"
128 "The VFolder will be updated periodically and when claws-mail is initially opened\n"
129 "Manual update is available from the context menu of the VFolder.\n"
131 "The supported folder types are MH and IMAP.\n"
132 "Messages in a VFolder cannot be updated.\n"
134 "To activate the archiving feature go to /View/Create virtual folder\n"
136 "Default options can be set in /Configuration/Preferences/Plugins"
141 struct PluginFeature
* plugin_provides(void) {
142 static struct PluginFeature features
[] =
143 { {PLUGIN_UTILITY
, N_("VFolder")},
144 {PLUGIN_FOLDERCLASS
, N_("VFolder")},
145 {PLUGIN_NOTHING
, NULL
} };