Revision: 1545
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1545&view=rev
Author:   nadvornik
Date:     2009-03-15 22:46:25 +0000 (Sun, 15 Mar 2009)

Log Message:
-----------
call the notify function just once when the keywords are pushed to the
textarea

Modified Paths:
--------------
    trunk/src/bar_keywords.c

Modified: trunk/src/bar_keywords.c
===================================================================
--- trunk/src/bar_keywords.c    2009-03-15 20:16:20 UTC (rev 1544)
+++ trunk/src/bar_keywords.c    2009-03-15 22:46:25 UTC (rev 1545)
@@ -53,6 +53,7 @@
        return list;
 }
 
+/* the "changed" signal should be blocked before calling this */
 static void keyword_list_push(GtkWidget *textview, GList *list)
 {
        GtkTextBuffer *buffer;
@@ -279,6 +280,8 @@
        GtkTreeIter child_iter;
        GtkTreeModel *keyword_tree;
        
+       GtkTextBuffer *keyword_buffer = 
gtk_text_view_get_buffer(GTK_TEXT_VIEW(pkd->keyword_view));
+
        model = gtk_tree_view_get_model(GTK_TREE_VIEW(pkd->keyword_treeview));
 
        tpath = gtk_tree_path_new_from_string(path);
@@ -297,11 +300,16 @@
                keyword_tree_set(keyword_tree, &child_iter, &list);
        else
                keyword_tree_reset(keyword_tree, &child_iter, &list);
-               
+       
+       g_signal_handlers_block_by_func(keyword_buffer, 
bar_pane_keywords_changed, pkd);
        keyword_list_push(pkd->keyword_view, list);
        string_list_free(list);
+       g_signal_handlers_unblock_by_func(keyword_buffer, 
bar_pane_keywords_changed, pkd);
+
+       /* call this just once in the end */
+       bar_pane_keywords_changed(keyword_buffer, pkd);
        /*
-         keyword_list_push triggers bar_pane_keywords_change which calls 
bar_keyword_tree_sync, no need to do it again
+         bar_pane_keywords_change calls bar_keyword_tree_sync, no need to do 
it again
        bar_keyword_tree_sync(pkd);
        */
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to