aboutsummaryrefslogtreecommitdiff
path: root/src/folderview.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-06-10 08:11:08 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-06-10 08:11:08 +0000
commitca06cd994b09cbb500b35af30c8bd75dc3e0e5b7 (patch)
tree3474db42cb4b1c42007cfb84ec24ca8331b50dba /src/folderview.c
parent81f0f7394f9c47a30314f2884be6d4bdae302673 (diff)
merged plugin-test branch into trunk.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2164 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/folderview.c')
-rw-r--r--src/folderview.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/folderview.c b/src/folderview.c
index 17272447..1c0aeb7a 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -69,6 +69,7 @@
#include "inc.h"
#include "send_message.h"
#include "virtual.h"
+#include "plugin.h"
enum
{
@@ -1773,10 +1774,11 @@ static gboolean folderview_menu_popup(FolderView *folderview,
SET_VISIBILITY(ifactory, "/Edit search condition...",
item->stype == F_VIRTUAL);
-
#undef SET_SENS
#undef SET_VISIBILITY
+ syl_plugin_signal_emit("folderview-menu-popup", ifactory);
+
gtk_menu_popup(GTK_MENU(popup), NULL, NULL, NULL, NULL,
event->button, event->time);
@@ -2282,6 +2284,16 @@ static void folderview_new_folder_cb(FolderView *folderview, guint action,
if (!new_folder) return;
AUTORELEASE_STR(new_folder, {g_free(new_folder); return;});
+#ifdef G_OS_WIN32
+ p = strpbrk(new_folder, "\\/:*?\"<>|");
+ if ((p && FOLDER_TYPE(item->folder) != F_IMAP) || (p && *p != '/') ||
+ (p && p == '/' &&
+ FOLDER_TYPE(item->folder) == F_IMAP && *(p + 1) != '\0')) {
+ alertpanel_error(_("`%c' can't be included in folder name."),
+ *p);
+ return;
+ }
+#else
p = strchr(new_folder, G_DIR_SEPARATOR);
if ((p && FOLDER_TYPE(item->folder) != F_IMAP) ||
(p && FOLDER_TYPE(item->folder) == F_IMAP && *(p + 1) != '\0')) {
@@ -2289,6 +2301,7 @@ static void folderview_new_folder_cb(FolderView *folderview, guint action,
G_DIR_SEPARATOR);
return;
}
+#endif
name = trim_string(new_folder, 32);
AUTORELEASE_STR(name, {g_free(name); return;});