[Commits] vcard-extension.c 1.5 1.6
miras at claws-mail.org
miras at claws-mail.org
Mon Mar 26 00:55:15 CEST 2012
Update of /home/claws-mail/contacts/extensions/vcard/src
In directory srv:/tmp/cvs-serv12090/extensions/vcard/src
Modified Files:
vcard-extension.c
Log Message:
2012-03-25 [mir] 0.6.0cvs80
* extensions/vcard/src/vcard-extension.c
* libversit/Makefile.am
* libversit/vcard-utils.c
* libversit/vcard-utils.h
* src/utils.c
* src/utils.h
* src/dbus/Makefile.am
* src/dbus/claws-contacts.xml
* src/dbus/server-object.c
* src/dbus/server-object.h
* xmllib/parser.c
A bunch of changes and enhancements. Also added feature
to allow users to create a vCard for each account which
is to be used for optionally added a vCard to every
send email.
Index: vcard-extension.c
===================================================================
RCS file: /home/claws-mail/contacts/extensions/vcard/src/vcard-extension.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- vcard-extension.c 5 Jan 2012 01:38:30 -0000 1.5
+++ vcard-extension.c 25 Mar 2012 22:55:13 -0000 1.6
@@ -91,6 +91,7 @@
MenuItem* item = (MenuItem *) user_data;
gchar* msg = g_strdup_printf("vCard parser: %s", s);
+ debug_print("%s\n", msg);
show_message(item->mainwindow->window, GTK_UTIL_MESSAGE_WARNING, msg);
g_free(msg);
}
@@ -268,15 +269,15 @@
static void vcard_create(GtkWidget* widget, gpointer data) {
MenuItem* item = (MenuItem *) data;
- VObject* vcard;
+ //gchar* vcard;
gchar* error = NULL;
- FILE* fp;
+ //FILE* fp;
- vcard = personal_vcard(&error);
+ personal_vcard_make(item->mainwindow, &error);
if (error) {
show_message(item->mainwindow->window, GTK_UTIL_MESSAGE_ERROR, error);
}
- else if (vcard) {
+/* else if (vcard) {
gchar* file = vcard_file_chooser(item, GTK_FILE_CHOOSER_ACTION_SAVE);
if (! file)
return;
@@ -287,12 +288,15 @@
return;
}
g_free(file);
- writeVObject(fp, vcard);
+ size_t chars = fwrite(vcard, sizeof(gchar), strlen(vcard), fp);
+ if (chars < strlen(vcard))
+ show_message(item->mainwindow->window, GTK_UTIL_MESSAGE_ERROR,
+ "%s: Write failed", vcard);
fclose(fp);
}
if (vcard) {
- cleanVObject(vcard);
- }
+ g_free(vcard);
+ }*/
}
static void setup(const MainWindow* mainwindow, gpointer object) {
More information about the Commits
mailing list