aboutsummaryrefslogtreecommitdiff
path: root/src/addressadd.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-20 08:16:57 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-20 08:16:57 +0000
commit9284b3b9a8936ac973589bef2c3d791dae10efcf (patch)
treee1a8c138b93ed22f6f99143b06b25c619883be43 /src/addressadd.c
parent2ddca31aaa249de33cf057487420f0ff56cb11a0 (diff)
added 'Add to address book' to the context menu of textview.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@352 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/addressadd.c')
-rw-r--r--src/addressadd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/addressadd.c b/src/addressadd.c
index 0f17eb30..a9997d2f 100644
--- a/src/addressadd.c
+++ b/src/addressadd.c
@@ -50,6 +50,7 @@
#include "addritem.h"
#include "addrbook.h"
#include "addrindex.h"
+#include "editaddress.h"
#include "manage_window.h"
typedef struct {
@@ -392,7 +393,12 @@ gboolean addressadd_selection( AddressIndex *addrIndex, const gchar *name, const
if( addressadd_dlg.fiSelected ) {
FolderInfo *fi = addressadd_dlg.fiSelected;
person = addrbook_add_contact( fi->book, fi->folder, name, address, remarks );
- if( person ) retVal = TRUE;
+ if( person ) {
+ if( addressbook_edit_person( fi->book, NULL, person, FALSE ) == NULL )
+ addrbook_remove_person( fi->book, person );
+ else
+ retVal = TRUE;
+ }
}
}