+2005-08-24 [paul] 1.9.13cvs56
+
+ * src/imap.c
+ * src/etpan/imap-thread.c
+ * src/etpan/imap-thread.h
+ fix bug 789 'IMAP CRAM-MD5 and ssl broken in 1.9.13'
+ Patch by Colin
+ * src/gtk/sylpheed-marshal.c ** REMOVED **
+ * src/gtk/sylpheed-marshal.h ** REMOVED **
+ remove autogenerated files
+ * tools/kdeservicemenu/README
+ * tools/kdeservicemenu/install.sh
+ * tools/kdeservicemenu/template_sylpheed-attach-files.desktop
+ * tools/kdeservicemenu/template_sylpheed-compress-attach.desktop
+ use Claws icon, use 'Sylpheed-Claws' in menu,
+ use kdialog, and other cleanups
+
2005-08-23 [paul] 1.9.13cvs55
* src/compose.c
( cvs diff -u -r 1.60.2.27 -r 1.60.2.28 src/addressbook.c; cvs diff -u -r 1.14.2.9 -r 1.14.2.10 src/editaddress.c; ) > 1.9.13cvs53.patchset
( cvs diff -u -r 1.115.2.50 -r 1.115.2.51 src/main.c; ) > 1.9.13cvs54.patchset
( cvs diff -u -r 1.382.2.154 -r 1.382.2.155 src/compose.c; ) > 1.9.13cvs55.patchset
+( cvs diff -u -r 1.179.2.59 -r 1.179.2.60 src/imap.c; cvs diff -u -r 1.1.4.16 -r 1.1.4.17 src/etpan/imap-thread.c; cvs diff -u -r 1.1.4.3 -r 1.1.4.4 src/etpan/imap-thread.h; cvs diff -u -r -1.1.2.1 -r -1.1.2.2 src/gtk/sylpheed-marshal.c; cvs diff -u -r -1.1.2.1 -r -1.1.2.2 src/gtk/sylpheed-marshal.h; cvs diff -u -r 1.2.2.5 -r 1.2.2.6 tools/kdeservicemenu/README; cvs diff -u -r 1.2.2.2 -r 1.2.2.3 tools/kdeservicemenu/install.sh; cvs diff -u -r 1.3.2.4 -r 1.3.2.5 tools/kdeservicemenu/template_sylpheed-attach-files.desktop; cvs diff -u -r 1.3.2.4 -r 1.3.2.5 tools/kdeservicemenu/template_sylpheed-compress-attach.desktop; ) > 1.9.13cvs56.patchset
MICRO_VERSION=13
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=55
+EXTRA_VERSION=56
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
mailimap * imap;
const char * login;
const char * password;
+ const char * type;
};
struct login_result {
old_debug = mailstream_debug;
mailstream_debug = 0;
#endif
-
- r = mailimap_login(param->imap,
+ if (!strcmp(param->type, "LOGIN"))
+ r = mailimap_login(param->imap,
param->login, param->password);
-
+ else
+ r = mailimap_authenticate(param->imap,
+ param->type, NULL, NULL, NULL,
+ param->login, param->login,
+ param->password, NULL);
#ifdef DISABLE_LOG_DURING_LOGIN
mailstream_debug = old_debug;
#endif
}
int imap_threaded_login(Folder * folder,
- const char * login, const char * password)
+ const char * login, const char * password,
+ const char * type)
{
struct login_param param;
struct login_result result;
param.imap = get_imap(folder);
param.login = login;
param.password = password;
-
+ param.type = type;
+
threaded_run(folder, ¶m, &result, login_run);
debug_print("imap login - end\n");
const char * wildcard,
clist ** p_result);
int imap_threaded_login(Folder * folder,
- const char * login, const char * password);
+ const char * login, const char * password,
+ const char * type);
int imap_threaded_status(Folder * folder, const char * mb,
struct mailimap_mailbox_data_status ** data_status);
+++ /dev/null
-
-#include <glib-object.h>
-
-
-#ifdef G_ENABLE_DEBUG
-#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
-#define g_marshal_value_peek_char(v) g_value_get_char (v)
-#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
-#define g_marshal_value_peek_int(v) g_value_get_int (v)
-#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
-#define g_marshal_value_peek_long(v) g_value_get_long (v)
-#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
-#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
-#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
-#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
-#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
-#define g_marshal_value_peek_float(v) g_value_get_float (v)
-#define g_marshal_value_peek_double(v) g_value_get_double (v)
-#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
-#define g_marshal_value_peek_param(v) g_value_get_param (v)
-#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
-#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
-#define g_marshal_value_peek_object(v) g_value_get_object (v)
-#else /* !G_ENABLE_DEBUG */
-/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
- * Do not access GValues directly in your code. Instead, use the
- * g_value_get_*() functions
- */
-#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
-#define g_marshal_value_peek_char(v) (v)->data[0].v_int
-#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
-#define g_marshal_value_peek_int(v) (v)->data[0].v_int
-#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
-#define g_marshal_value_peek_long(v) (v)->data[0].v_long
-#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
-#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
-#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
-#define g_marshal_value_peek_enum(v) (v)->data[0].v_int
-#define g_marshal_value_peek_flags(v) (v)->data[0].v_uint
-#define g_marshal_value_peek_float(v) (v)->data[0].v_float
-#define g_marshal_value_peek_double(v) (v)->data[0].v_double
-#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
-#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
-#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
-#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
-#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
-#endif /* !G_ENABLE_DEBUG */
-
-
-/* NONE:POINTER (sylpheed-marshal.list:1) */
-
-/* NONE:INT,POINTER (sylpheed-marshal.list:2) */
-void
-sylpheed_marshal_VOID__INT_POINTER (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data)
-{
- typedef void (*GMarshalFunc_VOID__INT_POINTER) (gpointer data1,
- gint arg_1,
- gpointer arg_2,
- gpointer data2);
- register GMarshalFunc_VOID__INT_POINTER callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
-
- g_return_if_fail (n_param_values == 3);
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
- callback = (GMarshalFunc_VOID__INT_POINTER) (marshal_data ? marshal_data : cc->callback);
-
- callback (data1,
- g_marshal_value_peek_int (param_values + 1),
- g_marshal_value_peek_pointer (param_values + 2),
- data2);
-}
-
+++ /dev/null
-
-#ifndef __sylpheed_marshal_MARSHAL_H__
-#define __sylpheed_marshal_MARSHAL_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-/* NONE:POINTER (sylpheed-marshal.list:1) */
-#define sylpheed_marshal_VOID__POINTER g_cclosure_marshal_VOID__POINTER
-#define sylpheed_marshal_NONE__POINTER sylpheed_marshal_VOID__POINTER
-
-/* NONE:INT,POINTER (sylpheed-marshal.list:2) */
-extern void sylpheed_marshal_VOID__INT_POINTER (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data);
-#define sylpheed_marshal_NONE__INT_POINTER sylpheed_marshal_VOID__INT_POINTER
-
-G_END_DECLS
-
-#endif /* __sylpheed_marshal_MARSHAL_H__ */
-
/* low-level IMAP4rev1 commands */
static gint imap_cmd_login (IMAPSession *session,
const gchar *user,
- const gchar *pass);
+ const gchar *pass,
+ const gchar *type);
static gint imap_cmd_logout (IMAPSession *session);
static gint imap_cmd_noop (IMAPSession *session);
#if USE_OPENSSL
IMAPAuthType type)
{
gint ok;
-
- ok = imap_cmd_login(session, user, pass);
+ /* TODO: implement Automatic mode */
+
+ switch(type) {
+ case IMAP_AUTH_CRAM_MD5:
+ ok = imap_cmd_login(session, user, pass, "CRAM-MD5");
+ break;
+ case IMAP_AUTH_LOGIN:
+ default:
+ ok = imap_cmd_login(session, user, pass, "LOGIN");
+ break;
+ }
if (ok == IMAP_SUCCESS)
session->authenticated = TRUE;
#endif
static gint imap_cmd_login(IMAPSession *session,
- const gchar *user, const gchar *pass)
+ const gchar *user, const gchar *pass,
+ const gchar *type)
{
int r;
gint ok;
static time_t last_login_err = 0;
log_print("IMAP4> Logging in to %s\n", SESSION(session)->server);
- r = imap_threaded_login(session->folder, user, pass);
+ r = imap_threaded_login(session->folder, user, pass, type);
if (r != MAILIMAP_NO_ERROR) {
+ gchar *ext_info = NULL;
+
+ if (strcmp(type, "CRAM-MD5") == 0) {
+ ext_info = _("\n\nCRAM-MD5 logins only work if libetpan has been "
+ "compiled with SASL support and the "
+ "CRAM-MD5 SASL plugin is installed.");
+ } else {
+ ext_info = "";
+ }
+
if (time(NULL) - last_login_err > 10) {
- alertpanel_error(_("Connection to %s failed: login refused."),
- SESSION(session)->server);
+ alertpanel_error(_("Connection to %s failed: login refused.%s"),
+ SESSION(session)->server, ext_info);
}
last_login_err = time(NULL);
log_error("IMAP4< Error logging in to %s\n",
sylpheed-kdeservicemenu.pl
-Version: 1.2
-Sylpheed servicemenu for Konqueror
+Version: 1.3
+Sylpheed-Claws servicemenu for Konqueror
FILES
o README You're reading it
the archive to a new compose window.
Adds the following right-click menu item to Konqueror:
-/Sylpheed/Attach file(s)
-/Sylpheed/Attach as GZip File(s)
-/Sylpheed/Attach as BZip File(s)
-/Sylpheed/Attach as Tar Archive
-/Sylpheed/Attach as Bzipped Tar Archive
-/Sylpheed/Attach as Gzipped Tar Archive
-/Sylpheed/Attach as Zip Archive
+/Sylpheed-Claws/Attach file(s)
+/Sylpheed-Claws/Attach as GZip File(s)
+/Sylpheed-Claws/Attach as BZip File(s)
+/Sylpheed-Claws/Attach as Tar Archive
+/Sylpheed-Claws/Attach as Bzipped Tar Archive
+/Sylpheed-Claws/Attach as Gzipped Tar Archive
+/Sylpheed-Claws/Attach as Zip Archive
+OPERATION
All outputted files are created in /tmp
Original files are preserved when creating [FILE].gz and [FILE].bz2
INSTALL
o cd sylpheed-claws/tools/kdeservicemenu
+o ./install.sh (for kdialog prompt)
+ -or-
o ./install.sh --global
./install.sh --local
(systemwide or home directory installation)
UNINSTALL
o cd sylpheed-claws/tools/kdeservicemenu
+o ./install.sh (for kdialog prompt)
+ -or-
o ./install.sh --uninstall-global
./install.sh --uninstall-local
(systemwide or home directory uninstallation)
GNU GENERAL PUBLIC LICENSE
THANKS
-install.sh was written by Dylan Schrader <dschrader@conception.edu>
-and is released under the GPL. It was originally part of his
-'Attach to email' service Menu for Konqueror, version 0.6.13
-<http://themes.kde.org/content/show.php?content=11234> and has been
-adapted for Sylpheed servicemenu for Konqueror
+install.sh was originally based on the install.sh script written by Dylan
+Schrader <dschrader@conception.edu>, and released under the GPL, as part
+of his 'Attach to email' service Menu for Konqueror, version 0.6.13
+<http://themes.kde.org/content/show.php?content=11234>, it has since been
+heavily adapted.
Translators:
[de] Thomas Gilgin <thg@karate-muellheim.de>
[sk] Andrej Kacian <andrej@kacian.sk>
LINKS
-Sylpheed-Claws <http://sylpheed-claws.sourceforge.net/>
+Sylpheed-Claws <http://claws.sylpheed.org/>
Perl <http://www.perl.org>
KDE <http://www.kde.org>
SERVICEMENU_DIR="share/apps/konqueror/servicemenus"
function check_environ {
-#Check to see if we can coax kde-config into the PATH
echo "Checking for kde-config..."
-if [ -z "$(type 'kde-config' 2> /dev/null)" ]; then #Odd way of checking if kde-config is in $PATH
+if [ -z "$(type 'kde-config' 2> /dev/null)" ]; then
echo "kde-config not found, checking for \$KDEDIR to compensate..."
if [ ! -z $KDEDIR ]; then
export PATH=$PATH:$KDEDIR/bin
else
- echo "***"
- echo "***$0 cannot figure out where KDE is installed."
- echo "***kde-config is not in \$PATH, and \$KDEDIR is not set."
- echo "***To fix this, manually change \$PATH to add the KDE executables."
- echo "***E.g. export PATH=\$PATH:/opt/kde/bin"
- echo "***It would also be a good idea to add this line to your shell login/profile."
- echo "***"
- echo
- echo "Nothing was installed or removed."
- exit 1
+ KDEDIR=$(kdialog --title "Where is KDE installed?" --getexistingdirectory / )
+ test -z $KDEDIR && exit 1
+ export PATH=$PATH:$KDEDIR/bin
fi
fi
echo "Okay."
}
function install_all {
-#Go ahead and install
echo "Generating $DESKTOP_ONE ..."
-SED_PREFIX=${PREFIX//\//\\\/} #Replace forward slashes in $PREFIX with \/ so that sed doesn't freak out
+SED_PREFIX=${PREFIX//\//\\\/}
sed "s/SCRIPT_PATH/$SED_PREFIX\\/bin\\/$PERL_SCRIPT/" $DESKTOP_TEMPLATE_ONE > $DESKTOP_ONE
echo "Installing $PREFIX/$SERVICEMENU_DIR/$DESKTOP_ONE"
mv -f $DESKTOP_ONE $PREFIX/$SERVICEMENU_DIR/$DESKTOP_ONE
echo "Generating $DESKTOP_TWO ..."
-SED_PREFIX=${PREFIX//\//\\\/} #Replace forward slashes in $PREFIX with \/ so that sed doesn't freak out
+SED_PREFIX=${PREFIX//\//\\\/}
sed "s/SCRIPT_PATH/$SED_PREFIX\\/bin\\/$PERL_SCRIPT/" $DESKTOP_TEMPLATE_TWO > $DESKTOP_TWO
echo "Installing $PREFIX/$SERVICEMENU_DIR/$DESKTOP_TWO"
mv -f $DESKTOP_TWO $PREFIX/$SERVICEMENU_DIR/$DESKTOP_TWO
chmod 0644 $PREFIX/$SERVICEMENU_DIR/$DESKTOP_ONE
chmod 0644 $PREFIX/$SERVICEMENU_DIR/$DESKTOP_TWO
chmod 0755 $PREFIX/bin/$PERL_SCRIPT
+echo "Finished installation."
+kdialog --msgbox "Finished installation."
}
function uninstall_all {
echo "Removing $PREFIX/bin/$PERL_SCRIPT"
rm $PREFIX/bin/$PERL_SCRIPT
echo "Finished uninstall."
+kdialog --msgbox "Finished uninstall."
}
-case $1 in
+function show_help {
+ echo "Usage: $0 [--global|--local|--uninstall-global|--uninstall-local]"
+ echo
+ echo " --global attempts a system-wide installation."
+ echo " --local attempts to install in your home directory."
+ echo " --uninstall-global attempts a system-wide uninstallation."
+ echo " --uninstall-local attempts to uninstall in your home directory."
+ echo
+ exit 0
+}
+
+if [ -z $1 ]
+ then option="--$(kdialog --menu "Please select installation type" \
+ local "install for you only" \
+ global "install for all users" \
+ uninstall-local "uninstall for you only" \
+ uninstall-global "uninstall for all users" 2> /dev/null)"
+ else option=$1
+fi
+
+case $option in
"--global" )
check_environ
PREFIX=$(kde-config --prefix)
echo "Uninstalling in $PREFIX ..."
uninstall_all
;;
- * )
- echo "Usage: $0 [--global|--local|--uninstall-global|--uninstall-local]"
- echo
- echo " --global attempts a system-wide installation."
- echo " --local attempts to install in your home directory."
- echo " --uninstall-global attempts a system-wide uninstallation."
- echo " --uninstall-local attempts to uninstall in your home directory."
- echo
- exit 0
+ "-h" )
+ show_help
+ ;;
+ "--help" )
+ show_help
;;
+ * )
+ show_help
esac
echo "Done."
Encoding=UTF8
Name=Sylpheed compress and attach files
Comment=kde service menu for compressing and attaching files to Sylpheed
-X-KDE-Submenu=Sylpheed
+X-KDE-Submenu=Sylpheed-Claws
X-KDE-Priority=TopLevel
ServiceTypes=all/allfiles
Name[fr]=Joindre le(s) Fichier(s)
Name[it]=Allega file
Name[pt_BR]=Anexar arquivo(s)
-Name[sk]=Pripojiť súbor(y)
-Icon=sylpheed
+Name[sk]=Pripoji» súbor(y)
+Icon=sylpheed-claws
Exec=SCRIPT_PATH attachfile %F
[Desktop Action GZipAndAttach]
Name[fr]=Joindre comme Fichier(s) GZip
Name[it]=Allega come file .gz
Name[pt_BR]=Anexar como arquivo(s) GZip
-Name[sk]=Pripojiť ako súbor(y) GZip
-Icon=sylpheed
+Name[sk]=Pripoji» ako súbor(y) GZip
+Icon=sylpheed-claws
Exec=SCRIPT_PATH gz %F
[Desktop Action BZipAndAttach]
Name[fr]=Joindre comme Fichier(s) Bzip
Name[it]=Allega come file .bz
Name[pt_BR]=Anexar como arquivo(s) BZip
-Name[sk]=Pripojiť ako súbor(y) Bzip
-Icon=sylpheed
+Name[sk]=Pripoji» ako súbor(y) Bzip
+Icon=sylpheed-claws
Exec=SCRIPT_PATH bz2 %F
Encoding=UTF8
Name=Sylpheed compress and attach files/dirs
Comment=kde service menu for compressing and attaching files/dirs to Sylpheed
-X-KDE-Submenu=Sylpheed
+X-KDE-Submenu=Sylpheed-Claws
X-KDE-Priority=TopLevel
ServiceTypes=all/all
Name[it]=Allega come file tar
Name[pt_BR]=Anexar como arquivo Tar
Name[sk]=Pripoji» ako archív Tar
-Icon=sylpheed
+Icon=sylpheed-claws
Exec=SCRIPT_PATH tar %F
[Desktop Action TarBzipAndAttach]
Name[it]=Allega come file tar.bz
Name[pt_BR]=Anexar como arquivo Tar compactado com BZip
Name[sk]=Pripoji» ako Bzip-om komprimovaný archív Tar
-Icon=sylpheed
+Icon=sylpheed-claws
Exec=SCRIPT_PATH tar.bz2 %F
[Desktop Action TarGzipAndAttach]
Name[it]=Allega come file tar.gz
Name[pt_BR]=Anexar como arquivo Tar compactado com GZip
Name[sk]=Pripoji» ako Gzip-om komprimovaný archív Tar
-Icon=sylpheed
+Icon=sylpheed-claws
Exec=SCRIPT_PATH tar.gz %F
[Desktop Action ZipAndAttach]
Name[it]=Allega come file zip
Name[pt_BR]=Anexar como arquivo Zip
Name[sk]=Pripoji» ako archív Zip
-Icon=sylpheed
+Icon=sylpheed-claws
Exec=SCRIPT_PATH zip %F