2005-10-16 [colin] 1.9.15cvs54
authorColin Leroy <colin@colino.net>
Sun, 16 Oct 2005 12:55:18 +0000 (12:55 +0000)
committerColin Leroy <colin@colino.net>
Sun, 16 Oct 2005 12:55:18 +0000 (12:55 +0000)
* src/addressbook.c
Second attempt at flicker fixing

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/addressbook.c

index db73da0ef4e2d1258bab2b750016c4eb114835dc..230d409166e76cd056a9613442fc9f67f8642f1b 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-16 [colin]     1.9.15cvs54
+
+       * src/addressbook.c
+               Second attempt at flicker fixing
+
 2005-10-16 [colin]     1.9.15cvs53
 
        * src/addressbook.c
index 6bcff12bee9f87ea4727367f277676a0ca39be64..1249e8e920b04aad7827969a9669e0d2923a00e5 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.9.2.10 -r 1.9.2.11 src/plugins/clamav/clamav_plugin_gtk.c;  cvs diff -u -r 1.23.2.13 -r 1.23.2.14 src/plugins/spamassassin/spamassassin_gtk.c;  ) > 1.9.15cvs51.patchset
 ( cvs diff -u -r 1.60.2.34 -r 1.60.2.35 src/addressbook.c;  cvs diff -u -r 1.14.2.11 -r 1.14.2.12 src/editaddress.c;  cvs diff -u -r 1.204.2.62 -r 1.204.2.63 src/prefs_common.c;  cvs diff -u -r 1.103.2.32 -r 1.103.2.33 src/prefs_common.h;  ) > 1.9.15cvs52.patchset
 ( cvs diff -u -r 1.60.2.35 -r 1.60.2.36 src/addressbook.c;  ) > 1.9.15cvs53.patchset
+( cvs diff -u -r 1.60.2.36 -r 1.60.2.37 src/addressbook.c;  ) > 1.9.15cvs54.patchset
index 7171c924fbbc58e58d4a01792ea87869b19e4159..1d79741451bff3fd2415d6919145dde5c05ece89 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=53
+EXTRA_VERSION=54
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index b63e061852937b231563d16b74389064f44df351..b3e48177ec2b5db979afb9ef9dff1c7b506dc727 100644 (file)
@@ -273,7 +273,8 @@ static void addressbook_new_ldap_cb         (gpointer        data,
                                                 GtkWidget      *widget);
 #endif
 
-static void addressbook_set_clist              (AddressObject  *obj);
+static void addressbook_set_clist              (AddressObject  *obj,
+                                                gboolean        refresh);
 
 static void addressbook_load_tree              (void);
 void addressbook_read_file                     (void);
@@ -1508,10 +1509,11 @@ static void addressbook_tree_selected(GtkCTree *ctree, GtkCTreeNode *node,
        addressbook_status_show( "" );
        if( addrbook.entry != NULL ) gtk_entry_set_text(GTK_ENTRY(addrbook.entry), "");
 
-       if( addrbook.clist ) gtk_clist_clear( GTK_CLIST(addrbook.clist) );
        if( node ) obj = gtk_ctree_node_get_row_data( ctree, node );
-       if( obj == NULL ) return;
-
+       if( obj == NULL ) {
+               addressbook_set_clist(NULL, TRUE);
+               return;
+       }
        addrbook.opened = node;
 
        if( obj->type == ADDR_DATASOURCE ) {
@@ -1559,7 +1561,7 @@ static void addressbook_tree_selected(GtkCTree *ctree, GtkCTreeNode *node,
        g_signal_handlers_block_by_func
                (G_OBJECT(ctree),
                 G_CALLBACK(addressbook_tree_selected), NULL);
-       addressbook_set_clist( obj );
+       addressbook_set_clist( obj, FALSE );
        g_signal_handlers_unblock_by_func
                (G_OBJECT(ctree),
                 G_CALLBACK(addressbook_tree_selected), NULL);
@@ -2246,7 +2248,7 @@ static void addressbook_new_folder_cb(gpointer data, guint action,
                        addrbook.treeSelected, ds, folder, ADDR_ITEM_FOLDER );
                gtk_ctree_expand( ctree, addrbook.treeSelected );
                if( addrbook.treeSelected == addrbook.opened )
-                       addressbook_set_clist(obj);
+                       addressbook_set_clist(obj, TRUE);
        }
 
 }
@@ -2285,7 +2287,7 @@ static void addressbook_new_group_cb(gpointer data, guint action,
                nn = addressbook_node_add_group( addrbook.treeSelected, ds, group );
                gtk_ctree_expand( ctree, addrbook.treeSelected );
                if( addrbook.treeSelected == addrbook.opened )
-                       addressbook_set_clist(obj);
+                       addressbook_set_clist(obj, TRUE);
        }
 
 }
@@ -3132,12 +3134,17 @@ static AddressDataSource *addressbook_find_datasource( GtkCTreeNode *node ) {
  * Load address list widget with children of specified object.
  * \param obj Parent object to be loaded.
  */
-static void addressbook_set_clist( AddressObject *obj ) {
+static void addressbook_set_clist( AddressObject *obj, gboolean refresh ) {
        GtkCTree *ctreelist = GTK_CTREE(addrbook.clist);
        GtkCList *clist = GTK_CLIST(addrbook.clist);
        AddressDataSource *ds = NULL;
        AdapterDSource *ads = NULL;
+       static AddressObject *last_obj = NULL;
+
+       if (obj == last_obj && !refresh)
+               return;
 
+       last_obj = obj;
        if( obj == NULL ) {
                gtk_clist_clear(clist);
                return;
@@ -3745,7 +3752,7 @@ static void addressbook_refresh_current( void ) {
        ctree = GTK_CTREE(addrbook.ctree);
        obj = gtk_ctree_node_get_row_data( ctree, addrbook.treeSelected );
        if( obj == NULL ) return;
-       addressbook_set_clist( obj );
+       addressbook_set_clist( obj, TRUE );
 }
 
 /**