]> www.fi.muni.cz Git - evince.git/commitdiff
Do not connect selection changed signal more than once. Fixes bug #349433.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 1 Jul 2007 08:45:11 +0000 (08:45 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sun, 1 Jul 2007 08:45:11 +0000 (08:45 +0000)
2007-07-01  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-sidebar-links.c: (job_finished_callback):
Do not connect selection changed signal more than once. Fixes bug
#349433.

svn path=/trunk/; revision=2531

ChangeLog
shell/ev-sidebar-links.c

index c8d60d243724c1ee9eedb7dec5309ea48bcbc015..d75c200d1ac1ef8688458bba0ecb0a8d814245f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-01  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-sidebar-links.c: (job_finished_callback):
+
+       Do not connect selection changed signal more than once. Fixes bug
+       #349433.
+       
 2007-06-29  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-window.c: (ev_window_view_sidebar_cb):
index 5d3469543e12bb49030165b8c7a76a6208c60c50..cbe19b1bce2e0a9a21f8981d71e058f8ba97a59c 100644 (file)
@@ -593,7 +593,7 @@ row_activated_callback (GtkTreeView       *treeview,
                        GtkTreePath       *arg1,
                        GtkTreeViewColumn *arg2,
                        gpointer           user_data)
-{      
+{
        if (gtk_tree_view_row_expanded (GTK_TREE_VIEW (treeview), arg1)) {
                gtk_tree_view_collapse_row (GTK_TREE_VIEW (treeview), arg1);
        } else {
@@ -648,18 +648,26 @@ job_finished_callback (EvJobLinks     *job,
 
        selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree_view));
        gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
-       priv->selection_id = g_signal_connect (selection, "changed",
-                                              G_CALLBACK (selection_changed_callback),
-                                              sidebar_links);
-       priv->page_changed_id = g_signal_connect (priv->page_cache, "page-changed",
+       
+       if (priv->selection_id <= 0) {
+               priv->selection_id =
+                       g_signal_connect (selection, "changed",
+                                         G_CALLBACK (selection_changed_callback),
+                                         sidebar_links);
+       }
+       priv->page_changed_id = g_signal_connect (priv->page_cache, "page-changed",
                                                  G_CALLBACK (update_page_callback),
                                                  sidebar_links);
-       priv->row_activated_id = g_signal_connect (G_OBJECT (priv->tree_view), "row-activated",
-                                                   G_CALLBACK (row_activated_callback), sidebar_links);
+       if (priv->row_activated_id <= 0) {
+               priv->row_activated_id =
+                       g_signal_connect (G_OBJECT (priv->tree_view), "row-activated",
+                                         G_CALLBACK (row_activated_callback),
+                                         sidebar_links);
+       }
+       
        update_page_callback (priv->page_cache,
                              ev_page_cache_get_current_page (priv->page_cache),
                              sidebar_links);
-
 }
 
 static void