Index: program/steps/addressbook/edit.inc
===================================================================
--- program/steps/addressbook/edit.inc	(revision 5b3ac324154b0d29e6e14db2b06fbc3636a3e708)
+++ program/steps/addressbook/edit.inc	(revision da89cf293753cfbfbe1f6cedcbb5a5d22aed45db)
@@ -55,5 +55,5 @@
 
 $SOURCE_ID = $source;
-
+rcmail_set_sourcename($CONTACTS);
 
 function rcmail_get_edit_record()
Index: program/steps/addressbook/func.inc
===================================================================
--- program/steps/addressbook/func.inc	(revision 71e8cc3bce5053ca986a95ef119101d15317ddc6)
+++ program/steps/addressbook/func.inc	(revision da89cf293753cfbfbe1f6cedcbb5a5d22aed45db)
@@ -161,4 +161,18 @@
 }
 
+function rcmail_set_sourcename($abook)
+{
+    global $OUTPUT;
+    
+    // get address book name (for display)
+    if ($abook && $_SESSION['addressbooks_count'] > 1) {
+        $name = $abook->get_name();
+        if (!$name && $source == 0) {
+            $name = rcube_label('personaladrbook');
+        }
+        $OUTPUT->set_env('sourcename', $name);
+    }
+}
+
 
 function rcmail_directory_list($attrib)
Index: program/steps/addressbook/show.inc
===================================================================
--- program/steps/addressbook/show.inc	(revision c3dabfad7ac668cb9bdcbf8ccf221d82fadd9c9c)
+++ program/steps/addressbook/show.inc	(revision da89cf293753cfbfbe1f6cedcbb5a5d22aed45db)
@@ -35,11 +35,5 @@
 
 // get address book name (for display)
-if ($_SESSION['addressbooks_count'] > 1) {
-    $name = $CONTACTS->get_name();
-    if (!$name && $source == 0) {
-        $name = rcube_label('personaladrbook');
-    }
-    $OUTPUT->set_env('sourcename', $name);
-}
+rcmail_set_sourcename($CONTACTS);
 
 // return raw photo of the given contact
Index: skins/default/addressbook.css
===================================================================
--- skins/default/addressbook.css	(revision 24f812dc9c77106c68497a9a7c7cab5c1dfe7565)
+++ skins/default/addressbook.css	(revision da89cf293753cfbfbe1f6cedcbb5a5d22aed45db)
@@ -391,4 +391,4 @@
   color: #666;
   font-size: 10px;
-  margin-left: 2px;
-}
+  margin: -5px 0 8px 2px;
+}
Index: skins/default/templates/contactadd.html
===================================================================
--- skins/default/templates/contactadd.html	(revision 5b3ac324154b0d29e6e14db2b06fbc3636a3e708)
+++ skins/default/templates/contactadd.html	(revision da89cf293753cfbfbe1f6cedcbb5a5d22aed45db)
@@ -11,7 +11,7 @@
 <div id="contact-details" class="boxcontent">
 <form name="editform" method="post" action="./">
-  <div id="sourcename" style="height: 20px">
-    <roundcube:label name="addressbook" />: <roundcube:object name="sourceselector" class="hint" id="sourceselect" />
-  </div>
+  <roundcube:if condition="strlen(env:sourcename)" />
+    <div id="sourcename"><roundcube:label name="addressbook" />: <roundcube:object name="sourceselector" class="hint" id="sourceselect" /></div>
+  <roundcube:endif />
   <div id="contactphoto">
     <roundcube:object name="contactphoto" id="contactpic" placeholder="/images/contactpic.png" />
Index: skins/default/templates/contactedit.html
===================================================================
--- skins/default/templates/contactedit.html	(revision 0501b637a3177cce441166b5fcfe27c9bd9fbe0f)
+++ skins/default/templates/contactedit.html	(revision da89cf293753cfbfbe1f6cedcbb5a5d22aed45db)
@@ -11,4 +11,7 @@
 <div id="contact-details" class="boxcontent">
 <form name="editform" method="post" action="./">
+  <roundcube:if condition="strlen(env:sourcename)" />
+    <div id="sourcename"><roundcube:label name="addressbook" />: <roundcube:var name="env:sourcename" /></div>
+  <roundcube:endif />
   <div id="contactphoto">
     <roundcube:object name="contactphoto" id="contactpic" placeholder="/images/contactpic.png" />
