[epiphany] Add names to all the timeouts



commit a09a8f0a41b0ea55f8229301f95fd915c2644a60
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Oct 24 00:33:07 2013 +0200

    Add names to all the timeouts
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710765

 embed/ephy-embed.c                       |    7 +++++--
 embed/ephy-file-monitor.c                |    1 +
 embed/ephy-find-toolbar.c                |    1 +
 lib/widgets/ephy-location-entry.c        |    1 +
 lib/widgets/ephy-node-view.c             |    1 +
 lib/widgets/ephy-overview-store.c        |    4 +++-
 lib/widgets/totem-glow-button.c          |    1 +
 src/bookmarks/ephy-bookmark-properties.c |    1 +
 src/bookmarks/ephy-bookmarks.c           |    1 +
 src/ephy-navigation-history-action.c     |    1 +
 10 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 849a2a0..4446f35 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -299,6 +299,7 @@ ephy_embed_entering_fullscreen (EphyEmbed *embed)
   embed->priv->fullscreen_message_id = g_timeout_add_seconds (5,
                                                               (GSourceFunc)fullscreen_message_label_hide,
                                                               embed);
+  g_source_set_name_by_id (embed->priv->fullscreen_message_id, "[epiphany] fullscreen_message_label_hide");
 }
 
 void
@@ -556,6 +557,7 @@ status_message_notify_cb (EphyWebView *view, GParamSpec *pspec, EphyEmbed *embed
       over a series of links, the overlay widget doesn't flicker on and off. */
     if (priv->pop_statusbar_later_source_id == 0) {
       priv->pop_statusbar_later_source_id = g_timeout_add (250, pop_statusbar_later_cb, embed);
+      g_source_set_name_by_id (priv->pop_statusbar_later_source_id, "[epiphany] pop_statusbar_later_cb");
     }
   }
 }
@@ -613,11 +615,12 @@ progress_update (EphyWebView *view, GParamSpec *pspec, EphyEmbed *embed)
   progress = webkit_web_view_get_estimated_load_progress (priv->web_view);
   loading = ephy_web_view_is_loading (EPHY_WEB_VIEW (priv->web_view));
 
-  if (progress == 1.0 || !loading)
+  if (progress == 1.0 || !loading) {
     priv->clear_progress_source_id = g_timeout_add (500,
                                                     (GSourceFunc)clear_progress_cb,
                                                     embed);
-  else
+    g_source_set_name_by_id (priv->clear_progress_source_id, "[epiphany] clear_progress_cb");
+  } else
     gtk_widget_show (priv->progress);
 
   gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (priv->progress),
diff --git a/embed/ephy-file-monitor.c b/embed/ephy-file-monitor.c
index 3580e3d..79e32a0 100644
--- a/embed/ephy-file-monitor.c
+++ b/embed/ephy-file-monitor.c
@@ -154,6 +154,7 @@ ephy_file_monitor_changed_cb (GFileMonitor *monitor,
       priv->reload_scheduled_id =
         g_timeout_add (RELOAD_DELAY,
                        (GSourceFunc)ephy_file_monitor_reload_cb, file_monitor);
+      g_source_set_name_by_id (ephy_file_monitor_reload_cb, "[epiphany] file_monitor");
     }
   }
 }
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c
index 41956a8..819f4fd 100644
--- a/embed/ephy-find-toolbar.c
+++ b/embed/ephy-find-toolbar.c
@@ -277,6 +277,7 @@ update_find_string (EphyFindToolbar *toolbar)
        }
 
        priv->find_source_id = g_timeout_add (300, (GSourceFunc)do_search, toolbar);
+       g_source_set_name_by_id (priv->find_source_id, "[epiphany] do_search");
 }
 
 static gboolean
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 0814acc..883d7e5 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -997,6 +997,7 @@ schedule_dns_prefetch (EphyLocationEntry *entry, guint interval, const gchar *ur
                g_timeout_add_full (G_PRIORITY_DEFAULT, interval,
                                    (GSourceFunc) do_dns_prefetch, helper,
                                    (GDestroyNotify) free_prefetch_helper);
+       g_source_set_name_by_id (entry->priv->dns_prefetch_handler, "[epiphany] do_dns_prefetch");
 }
 
 static gboolean
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index 53830e1..c45240d 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -348,6 +348,7 @@ drag_motion_cb (GtkWidget *widget,
                        g_timeout_add (150, 
                                       scroll_timeout, 
                                       GTK_TREE_VIEW (view));
+               g_source_set_name_by_id (view->priv->scroll_id, "[epiphany] scroll_timeout");
        }
 
        gdk_drag_status (context, action, time);
diff --git a/lib/widgets/ephy-overview-store.c b/lib/widgets/ephy-overview-store.c
index b63a176..dd81915 100644
--- a/lib/widgets/ephy-overview-store.c
+++ b/lib/widgets/ephy-overview-store.c
@@ -606,6 +606,7 @@ ephy_overview_store_animated_remove (EphyOverviewStore *store,
   GtkTreePath *path;
   GtkTreeIter iter;
   AnimRemoveContext *ctx = g_slice_new0 (AnimRemoveContext);
+  guint id;
 
   ctx->ref = ref;
   ctx->callback = callback;
@@ -619,7 +620,8 @@ ephy_overview_store_animated_remove (EphyOverviewStore *store,
                       EPHY_OVERVIEW_STORE_CLOSE_BUTTON_RENDER_POLICY,
                       EPHY_REMOVABLE_PIXBUF_RENDER_NEVER, -1);
 
-  g_timeout_add (40, (GSourceFunc) animated_remove_func, ctx);
+  id = g_timeout_add (40, (GSourceFunc) animated_remove_func, ctx);
+  g_source_set_name_by_id (id, "[epiphany] animated_remove_func");
 }
 
 gboolean
diff --git a/lib/widgets/totem-glow-button.c b/lib/widgets/totem-glow-button.c
index 9a0b3fd..f260345 100644
--- a/lib/widgets/totem-glow-button.c
+++ b/lib/widgets/totem-glow-button.c
@@ -302,6 +302,7 @@ totem_glow_button_set_timeout (TotemGlowButton *button, gboolean set_timeout)
                                            100,
                                            (GSourceFunc) totem_glow_button_glow, button,
                                            (GDestroyNotify) totem_glow_button_clear_glow_start_timeout_id);
+               g_source_set_name_by_id (button->button_glow, "[epiphany] totem_glow_button_glow");
        } else {
                if (button->button_glow > 0) {
                        g_source_remove (button->button_glow);
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index bd7542d..92d1571 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -102,6 +102,7 @@ update_warning_idle (EphyBookmarkProperties *properties)
        
        priv->duplicate_idle = g_timeout_add 
          (500, (GSourceFunc)update_warning, properties);
+       g_source_set_name_by_id (priv->duplicate_idle, "[epiphany] update_warning");
 }
 
 static void
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 066ede2..5cd0d1e 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -221,6 +221,7 @@ ephy_bookmarks_save_delayed (EphyBookmarks *bookmarks, int delay)
                                g_timeout_add_seconds (BOOKMARKS_SAVE_DELAY,
                                               (GSourceFunc) save_bookmarks_delayed,
                                               bookmarks);
+                       g_source_set_name_by_id (bookmarks->priv->save_timeout_id, "[epiphany] 
save_bookmarks_delayed");
                }
                else
                {
diff --git a/src/ephy-navigation-history-action.c b/src/ephy-navigation-history-action.c
index 46742f2..2d07155 100644
--- a/src/ephy-navigation-history-action.c
+++ b/src/ephy-navigation-history-action.c
@@ -490,6 +490,7 @@ tool_button_press_event_cb (GtkButton *button,
                                                      (GSourceFunc) menu_timeout_cb,
                                                      data,
                                                      (GDestroyNotify) g_free);
+    g_source_set_name_by_id (action->priv->menu_timeout, "[epiphany] menu_timeout_cb");
   } else if (event->button == 3) {
     popup_history_menu (action, GTK_WIDGET (button), event);
     return TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]