*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
guint info,
guint time,
void *pdata);
+static void addressbook_list_menu_setup( void );
static GtkTargetEntry addressbook_drag_types[] =
{
gtk_sctree_select( GTK_SCTREE(ctree), addrbook.opened);
addrbook_set_dirty(abf, TRUE);
addressbook_export_to_file();
+ addressbook_list_menu_setup();
return;
}
else if( pobj->type == ADDR_ITEM_GROUP ) {
gtk_sctree_select( GTK_SCTREE(ctree), addrbook.opened);
addrbook_set_dirty(abf, TRUE);
addressbook_export_to_file();
+ addressbook_list_menu_setup();
return;
}
}
else if( aio->type == ADDR_ITEM_GROUP ) {
ItemGroup *group = ( ItemGroup * ) aio;
+ AddressDataSource *ds = NULL;
+ AddressBookFile *abf = NULL;
GList *nodeMail = group->listEMail;
+ if (nodeMail == NULL) {
+ if(addrbook.treeSelected ) {
+ ds = addressbook_find_datasource( addrbook.treeSelected );
+ abf = ds->rawDataSource;
+ if( abf != NULL )
+ nodeMail = addrbook_get_available_email_list( abf, group );
+ }
+ }
while( nodeMail ) {
ItemEMail *email = nodeMail->data;
/* Enable edit */
menu_set_sensitive( addrbook.menu_factory, "/Address/Edit", canEdit );
- menu_set_sensitive( addrbook.menu_factory, "/Address/Delete", canEdit );
+ menu_set_sensitive( addrbook.menu_factory, "/Address/Delete", canDelete );
gtk_widget_set_sensitive( addrbook.edit_btn, canEdit );
gtk_widget_set_sensitive( addrbook.del_btn, canDelete );
addressbook_menuitem_set_sensitive( obj, node );
addressbook_list_select_clear();
-
+ addressbook_list_menu_setup();
return FALSE;
}
if( GTK_CLIST(clist)->selection && GTK_CLIST(clist)->selection->next ) {
canEdit = FALSE;
canBrowse = FALSE;
- canDelete = canEdit;
}
/* Now go finalize menu items */
if( ! iface->readOnly ) {
canEdit = TRUE;
canDelete = TRUE;
- menu_set_sensitive( addrbook.tree_factory, "/New Address", TRUE );
+ menu_set_sensitive( addrbook.list_factory, "/New Address", TRUE );
gtk_widget_set_sensitive( addrbook.reg_btn, TRUE );
}
}