aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-04-09 02:22:46 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-04-09 02:22:46 +0000
commit09957b4811e82e4aac8daa4049af572c811d5710 (patch)
treefe5622cd7ad5c0a9d184222cd6a1ffd89ef9dddb
parent542de44ef8e5a9db37de993bfcc0d556e4da8cd7 (diff)
also load plug-ins from user plug-in directory.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2534 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog6
-rw-r--r--libsylph/defs.h1
-rw-r--r--libsylph/sylmain.c3
-rw-r--r--src/main.c19
4 files changed, 21 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index f871955b..8b5b6a63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-09
+
+ * libsylph/sylmain.c
+ libsylph/defs.h
+ src/main.c: also load plug-ins from user plug-in directory.
+
2010-04-07
* libsylph/defs.h
diff --git a/libsylph/defs.h b/libsylph/defs.h
index e80ce08c..0b39d778 100644
--- a/libsylph/defs.h
+++ b/libsylph/defs.h
@@ -65,6 +65,7 @@
#define TEMPLATE_DIR "templates"
#define TMP_DIR "tmp"
#define UIDL_DIR "uidl"
+#define PLUGIN_DIR "plugins"
#define NEWSGROUP_LIST ".newsgroup_list"
#define ADDRESS_BOOK "addressbook.xml"
#define MANUAL_HTML_INDEX "sylpheed.html"
diff --git a/libsylph/sylmain.c b/libsylph/sylmain.c
index 6e8ccb80..97e078dd 100644
--- a/libsylph/sylmain.c
+++ b/libsylph/sylmain.c
@@ -1,6 +1,6 @@
/*
* LibSylph -- E-Mail client library
- * Copyright (C) 1999-2009 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2010 Hiroyuki Yamamoto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -299,6 +299,7 @@ gint syl_setup_rc_dir(void)
MAKE_DIR_IF_NOT_EXIST(get_mime_tmp_dir());
MAKE_DIR_IF_NOT_EXIST(get_tmp_dir());
MAKE_DIR_IF_NOT_EXIST(UIDL_DIR);
+ MAKE_DIR_IF_NOT_EXIST(PLUGIN_DIR);
/* remove temporary files */
remove_all_files(get_tmp_dir());
diff --git a/src/main.c b/src/main.c
index 71d91bd2..f3a7fc4f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1099,6 +1099,7 @@ static void register_system_events(void)
static void plugin_init(void)
{
MainWindow *mainwin;
+ gchar *path;
mainwin = main_window_get();
@@ -1171,17 +1172,21 @@ static void plugin_init(void)
syl_plugin_signal_connect("plugin-load", G_CALLBACK(load_cb), NULL);
+ /* loading plug-ins from user plug-in directory */
+ path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, PLUGIN_DIR, NULL);
+ syl_plugin_load_all(path);
+ g_free(path);
+
+ /* loading plug-ins from system plug-in directory */
#ifdef G_OS_WIN32
- {
- gchar *path;
- path = g_strconcat(get_startup_dir(), G_DIR_SEPARATOR_S,
- "plugins", NULL);
- syl_plugin_load_all(path);
- g_free(path);
- }
+ path = g_strconcat(get_startup_dir(), G_DIR_SEPARATOR_S, PLUGIN_DIR,
+ NULL);
+ syl_plugin_load_all(path);
+ g_free(path);
#else
syl_plugin_load_all(PLUGINDIR);
#endif
+
STATUSBAR_POP(mainwin);
}