added additional checks

Change-Id: Ie0562bd12398311e5166235c6fc6ddf6798e3701
AddDataSourcePanel now closes when new data source is added.

Change-Id: Ib799da069afcf5dee37bfb3b0d0698528c3e2d17
"Nested unlink" button is now disabled when it can't be used.

Change-Id: Ieb1cd14d5c03237a566e58d9cfd4a2fd6da071ac