diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-08-25 08:59:29 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-08-25 08:59:29 +0000 |
commit | 6ad7a25609f029689823d6f188560116080e8a75 (patch) | |
tree | 6b702806e67e16a1bb7e4ac75975d0ffa6b3e83d /src | |
parent | 1003322f977add069c7ec91546274ffe22de493e (diff) |
fixed refresh of addressbook folder contents.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@512 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/addressbook.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/addressbook.c b/src/addressbook.c index a8c500ac..ce049c32 100644 --- a/src/addressbook.c +++ b/src/addressbook.c @@ -427,6 +427,7 @@ void addressbook_refresh(void) { if (addrbook.window) { if (addrbook.treeSelected) { + addrbook.treeSelected = NULL; gtk_ctree_select(GTK_CTREE(addrbook.ctree), addrbook.treeSelected); } @@ -882,7 +883,8 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data) } } addressbook_list_select_clear(); - gtk_ctree_select( ctree, addrbook.opened); + addrbook.treeSelected = NULL; + gtk_ctree_select( ctree, addrbook.opened ); return; } else if( pobj->type == ADDR_ITEM_GROUP ) { @@ -904,7 +906,8 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data) } } addressbook_list_select_clear(); - gtk_ctree_select( ctree, addrbook.opened); + addrbook.treeSelected = NULL; + gtk_ctree_select( ctree, addrbook.opened ); return; } @@ -1409,8 +1412,10 @@ static gboolean addressbook_tree_button_released(GtkWidget *ctree, GdkEventButton *event, gpointer data) { +#if 0 gtk_ctree_select(GTK_CTREE(addrbook.ctree), addrbook.opened); gtkut_ctree_set_focus_row(GTK_CTREE(addrbook.ctree), addrbook.opened); +#endif return FALSE; } @@ -1615,6 +1620,7 @@ static void addressbook_treenode_edit_cb(gpointer data, guint action, addressbook_change_node_name( node, name ); gtk_ctree_sort_node(ctree, parentNode); gtk_ctree_expand( ctree, node ); + addrbook.treeSelected = NULL; gtk_ctree_select( ctree, node ); } } @@ -1748,6 +1754,7 @@ static void addressbook_new_address_cb( gpointer data, guint action, GtkWidget * ItemPerson *person = addressbook_edit_person( abf, NULL, NULL, FALSE ); if( person ) { if( addrbook.treeSelected == addrbook.opened ) { + addrbook.treeSelected = NULL; gtk_ctree_select( GTK_CTREE(addrbook.ctree), addrbook.opened ); } } @@ -1759,6 +1766,7 @@ static void addressbook_new_address_cb( gpointer data, guint action, GtkWidget * ItemPerson *person = addressbook_edit_person( abf, folder, NULL, FALSE ); if( person ) { if (addrbook.treeSelected == addrbook.opened) { + addrbook.treeSelected = NULL; gtk_ctree_select( GTK_CTREE(addrbook.ctree), addrbook.opened ); } } @@ -1770,6 +1778,7 @@ static void addressbook_new_address_cb( gpointer data, guint action, GtkWidget * if (addrbook.treeSelected == addrbook.opened) { /* Change node name in tree. */ addressbook_change_node_name( addrbook.treeSelected, ADDRITEM_NAME(group) ); + addrbook.treeSelected = NULL; gtk_ctree_select( GTK_CTREE(addrbook.ctree), addrbook.opened ); } } @@ -1873,6 +1882,7 @@ static void addressbook_edit_address_cb( gpointer data, guint action, GtkWidget /* Edit person - email page */ person = ( ItemPerson * ) ADDRITEM_PARENT(email); if( addressbook_edit_person( abf, NULL, person, TRUE ) == NULL ) return; + addrbook.treeSelected = NULL; gtk_ctree_select( ctree, addrbook.opened ); invalidate_address_completion(); return; @@ -1882,6 +1892,7 @@ static void addressbook_edit_address_cb( gpointer data, guint action, GtkWidget /* Edit person - basic page */ ItemPerson *person = ( ItemPerson * ) obj; if( addressbook_edit_person( abf, NULL, person, FALSE ) == NULL ) return; + addrbook.treeSelected = NULL; gtk_ctree_select( ctree, addrbook.opened ); invalidate_address_completion(); return; @@ -1901,6 +1912,7 @@ static void addressbook_edit_address_cb( gpointer data, guint action, GtkWidget if( node == NULL ) return; addressbook_change_node_name( node, name ); gtk_ctree_sort_node( ctree, parentNode ); + addrbook.treeSelected = NULL; gtk_ctree_select( ctree, addrbook.opened ); } @@ -2827,6 +2839,7 @@ static void addressbook_new_book_cb( gpointer data, guint action, GtkWidget *wid if( ads ) { addressbook_add_object( addrbook.treeSelected, ADDRESS_OBJECT(ads) ); if( addrbook.treeSelected == addrbook.opened ) { + addrbook.treeSelected = NULL; gtk_ctree_select( GTK_CTREE(addrbook.ctree), addrbook.opened ); } } @@ -2843,6 +2856,7 @@ static void addressbook_new_vcard_cb( gpointer data, guint action, GtkWidget *wi if( ads ) { addressbook_add_object( addrbook.treeSelected, ADDRESS_OBJECT(ads) ); if( addrbook.treeSelected == addrbook.opened ) { + addrbook.treeSelected = NULL; gtk_ctree_select( GTK_CTREE(addrbook.ctree), addrbook.opened ); } } @@ -2878,6 +2892,7 @@ static void addressbook_new_jpilot_cb( gpointer data, guint action, GtkWidget *w if( ads ) { addressbook_add_object( addrbook.treeSelected, ADDRESS_OBJECT(ads) ); if( addrbook.treeSelected == addrbook.opened ) { + addrbook.treeSelected = NULL; gtk_ctree_select( GTK_CTREE(addrbook.ctree), addrbook.opened ); } } @@ -2914,6 +2929,7 @@ static void addressbook_new_ldap_cb( gpointer data, guint action, GtkWidget *wid if( ads ) { addressbook_add_object( addrbook.treeSelected, ADDRESS_OBJECT(ads) ); if( addrbook.treeSelected == addrbook.opened ) { + addrbook.treeSelected = NULL; gtk_ctree_select( GTK_CTREE(addrbook.ctree), addrbook.opened ); } } @@ -3493,6 +3509,7 @@ static void addressbook_import_ldif_cb() { addressbook_ads_set_name( ads, abf->name ); newNode = addressbook_add_object( adapter->treeNode, ADDRESS_OBJECT(ads) ); if ( newNode ) { + addrbook.treeSelected = NULL; gtk_ctree_select( GTK_CTREE(addrbook.ctree), newNode ); addrbook.treeSelected = newNode; } |