summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2014-03-22 12:44:01 +0100
committerMatthias Clasen <mclasen@redhat.com>2014-03-26 20:09:30 -0400
commitf71f7215ab31a85bdcc124b1ac6d6c9ca8a6acf1 (patch)
tree60eaf90866b9c3485115452b2d133f6b986e9bd8 /gtk
parent454c485ebe9b2d262d2e84d1f16b86c00980e5b9 (diff)
downloadgtk+-f71f7215ab31a85bdcc124b1ac6d6c9ca8a6acf1.tar.gz
all: Name more idles and timeouts
Following up from 438cd857c49242244dda2923ac447f36464b9e72, name more timeouts and idles. The original grep was missing checking for gdk_threads_add_*() functions (at least for some of the files). https://bugzilla.gnome.org/show_bug.cgi?id=726870
Diffstat (limited to 'gtk')
-rw-r--r--gtk/a11y/gtkaccessibility.c1
-rw-r--r--gtk/a11y/gtkiconviewaccessible.c5
-rw-r--r--gtk/deprecated/gtkuimanager.c1
-rw-r--r--gtk/gtkcombobox.c12
-rw-r--r--gtk/gtkdnd.c11
-rw-r--r--gtk/gtkentry.c1
-rw-r--r--gtk/gtkfilechooserwidget.c1
-rw-r--r--gtk/gtkicontheme.c9
-rw-r--r--gtk/gtkprintoperation.c12
-rw-r--r--gtk/gtkprintunixdialog.c1
-rw-r--r--gtk/gtkrecentchooserdefault.c1
-rw-r--r--gtk/gtkrecentchoosermenu.c1
-rw-r--r--gtk/gtksearchenginesimple.c10
-rw-r--r--gtk/gtktextview.c13
-rw-r--r--gtk/gtktoolbar.c5
-rw-r--r--gtk/gtktreeview.c2
-rw-r--r--gtk/gtkwidget.c5
-rw-r--r--gtk/gtkwindow.c6
18 files changed, 73 insertions, 24 deletions
diff --git a/gtk/a11y/gtkaccessibility.c b/gtk/a11y/gtkaccessibility.c
index 1238b4f02b..5f2e4942a9 100644
--- a/gtk/a11y/gtkaccessibility.c
+++ b/gtk/a11y/gtkaccessibility.c
@@ -603,6 +603,7 @@ gail_focus_notify_when_idle (GtkWidget *widget)
}
focus_notify_handler = gdk_threads_add_idle (gail_focus_idle_handler, widget);
+ g_source_set_name_by_id (focus_notify_handler, "[gtk+] gail_focus_idle_handler");
}
static gboolean
diff --git a/gtk/a11y/gtkiconviewaccessible.c b/gtk/a11y/gtkiconviewaccessible.c
index 82c50f931d..a6468705bf 100644
--- a/gtk/a11y/gtkiconviewaccessible.c
+++ b/gtk/a11y/gtkiconviewaccessible.c
@@ -112,7 +112,10 @@ gtk_icon_view_item_accessible_do_action (AtkAction *action,
return FALSE;
if (!item->action_idle_handler)
- item->action_idle_handler = gdk_threads_add_idle (idle_do_action, item);
+ {
+ item->action_idle_handler = gdk_threads_add_idle (idle_do_action, item);
+ g_source_set_name_by_id (item->action_idle_handler, "[gtk+] idle_do_action");
+ }
return TRUE;
}
diff --git a/gtk/deprecated/gtkuimanager.c b/gtk/deprecated/gtkuimanager.c
index 35da0dbc16..b8ecb8ab95 100644
--- a/gtk/deprecated/gtkuimanager.c
+++ b/gtk/deprecated/gtkuimanager.c
@@ -3155,6 +3155,7 @@ queue_update (GtkUIManager *manager)
manager->private_data->update_tag = gdk_threads_add_idle (
(GSourceFunc)do_updates_idle,
manager);
+ g_source_set_name_by_id (manager->private_data->update_tag, "[gtk+] do_updates_idle");
}
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 61891773f3..10b6575da2 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -3428,8 +3428,11 @@ gtk_combo_box_list_popup_resize (GtkComboBox *combo_box)
GtkComboBoxPrivate *priv = combo_box->priv;
if (!priv->resize_idle_id)
- priv->resize_idle_id =
- gdk_threads_add_idle (list_popup_resize_idle, combo_box);
+ {
+ priv->resize_idle_id =
+ gdk_threads_add_idle (list_popup_resize_idle, combo_box);
+ g_source_set_name_by_id (priv->resize_idle_id, "[gtk+] list_popup_resize_idle");
+ }
}
static void
@@ -4931,7 +4934,9 @@ static void
popdown_handler (GtkWidget *widget,
gpointer data)
{
- gdk_threads_add_idle (popdown_idle, g_object_ref (data));
+ guint id;
+ id = gdk_threads_add_idle (popdown_idle, g_object_ref (data));
+ g_source_set_name_by_id (id, "[gtk+] popdown_idle");
}
static gboolean
@@ -5005,6 +5010,7 @@ gtk_combo_box_start_editing (GtkCellEditable *cell_editable,
combo_box->priv->popup_idle_id =
gdk_threads_add_idle (popup_idle, combo_box);
+ g_source_set_name_by_id (combo_box->priv->popup_idle_id, "[gtk+] popup_idle");
}
}
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 308e146f32..46644dd15b 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -4186,10 +4186,13 @@ gtk_drag_add_update_idle (GtkDragSourceInfo *info)
* from the last move can catch up before we move again.
*/
if (!info->update_idle)
- info->update_idle = gdk_threads_add_idle_full (GDK_PRIORITY_REDRAW + 5,
- gtk_drag_update_idle,
- info,
- NULL);
+ {
+ info->update_idle = gdk_threads_add_idle_full (GDK_PRIORITY_REDRAW + 5,
+ gtk_drag_update_idle,
+ info,
+ NULL);
+ g_source_set_name_by_id (info->update_idle, "[gtk+] gtk_drag_update_idle");
+ }
}
/**
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index f27a98c0c7..dc9756fe98 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -6118,6 +6118,7 @@ gtk_entry_recompute (GtkEntry *entry)
{
priv->recompute_idle = gdk_threads_add_idle_full (G_PRIORITY_HIGH_IDLE + 15, /* between resize and redraw */
recompute_idle_func, entry, NULL);
+ g_source_set_name_by_id (priv->recompute_idle, "[gtk+] recompute_idle_func");
}
}
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 173f7f8bc3..26732ab22c 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -6685,6 +6685,7 @@ recent_start_loading (GtkFileChooserWidget *impl)
recent_idle_load,
load_data,
recent_idle_cleanup);
+ g_source_set_name_by_id (priv->load_recent_id, "[gtk+] recent_idle_load");
}
static void
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 7b22921c81..a5aa468509 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -801,9 +801,12 @@ queue_theme_changed (GtkIconTheme *icon_theme)
GtkIconThemePrivate *priv = icon_theme->priv;
if (!priv->theme_changed_idle)
- priv->theme_changed_idle =
- gdk_threads_add_idle_full (GTK_PRIORITY_RESIZE - 2,
- theme_changed_idle, icon_theme, NULL);
+ {
+ priv->theme_changed_idle =
+ gdk_threads_add_idle_full (GTK_PRIORITY_RESIZE - 2,
+ theme_changed_idle, icon_theme, NULL);
+ g_source_set_name_by_id (priv->theme_changed_idle, "[gtk+] theme_changed_idle");
+ }
}
static void
diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c
index 245908087d..a7aa2d7802 100644
--- a/gtk/gtkprintoperation.c
+++ b/gtk/gtkprintoperation.c
@@ -631,14 +631,17 @@ preview_ready (GtkPrintOperationPreview *preview,
GtkPrintContext *context,
PreviewOp *pop)
{
+ guint id;
+
pop->print_context = context;
g_object_ref (preview);
- gdk_threads_add_idle_full (G_PRIORITY_DEFAULT_IDLE + 10,
- preview_print_idle,
- pop,
- preview_print_idle_done);
+ id = gdk_threads_add_idle_full (G_PRIORITY_DEFAULT_IDLE + 10,
+ preview_print_idle,
+ pop,
+ preview_print_idle_done);
+ g_source_set_name_by_id (id, "[gtk+] preview_print_idle");
}
@@ -3053,6 +3056,7 @@ print_pages (GtkPrintOperation *op,
print_pages_idle,
data,
print_pages_idle_done);
+ g_source_set_name_by_id (priv->print_pages_idle_id, "[gtk+] print_pages_idle");
/* Recursive main loop to make sure we don't exit on sync operations */
if (priv->is_sync)
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 4761878b4a..c9836a2f97 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -1927,6 +1927,7 @@ schedule_idle_mark_conflicts (GtkPrintUnixDialog *dialog)
priv->mark_conflicts_id = gdk_threads_add_idle (mark_conflicts_callback,
dialog);
+ g_source_set_name_by_id (priv->mark_conflicts_id, "[gtk+] mark_conflicts_callback");
}
static void
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c
index 5282f93bdf..61f04ab4a2 100644
--- a/gtk/gtkrecentchooserdefault.c
+++ b/gtk/gtkrecentchooserdefault.c
@@ -833,6 +833,7 @@ reload_recent_items (GtkRecentChooserDefault *impl)
load_recent_items,
impl,
cleanup_after_load);
+ g_source_set_name_by_id (impl->priv->load_id, "[gtk+] load_recent_items");
}
/* taken form gtkfilechooserdialog.c */
diff --git a/gtk/gtkrecentchoosermenu.c b/gtk/gtkrecentchoosermenu.c
index 75c6cbf07c..f70e795eb2 100644
--- a/gtk/gtkrecentchoosermenu.c
+++ b/gtk/gtkrecentchoosermenu.c
@@ -1103,6 +1103,7 @@ gtk_recent_chooser_menu_populate (GtkRecentChooserMenu *menu)
idle_populate_func,
pdata,
idle_populate_clean_up);
+ g_source_set_name_by_id (priv->populate_id, "[gtk+] idle_populate_func");
}
/* bounce activate signal from the recent menu item widget
diff --git a/gtk/gtksearchenginesimple.c b/gtk/gtksearchenginesimple.c
index 1b6aee496e..355ba9227c 100644
--- a/gtk/gtksearchenginesimple.c
+++ b/gtk/gtksearchenginesimple.c
@@ -182,11 +182,14 @@ send_batch (SearchThreadData *data)
if (data->uri_hits)
{
+ guint id;
+
hits = g_new (SearchHits, 1);
hits->uris = data->uri_hits;
hits->thread_data = data;
- gdk_threads_add_idle (search_thread_add_hits_idle, hits);
+ id = gdk_threads_add_idle (search_thread_add_hits_idle, hits);
+ g_source_set_name_by_id (id, "[gtk+] search_thread_add_hits_idle");
}
data->uri_hits = NULL;
@@ -269,6 +272,8 @@ search_visit_func (const char *fpath,
static gpointer
search_thread_func (gpointer user_data)
{
+ guint id;
+
#ifdef HAVE_FTW_H
SearchThreadData *data;
@@ -284,7 +289,8 @@ search_thread_func (gpointer user_data)
send_batch (data);
- gdk_threads_add_idle (search_thread_done_idle, data);
+ id = gdk_threads_add_idle (search_thread_done_idle, data);
+ g_source_set_name_by_id (id, "[gtk+] search_thread_done_idle");
#endif /* HAVE_FTW_H */
return NULL;
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 6dffa38e77..7b9efb7204 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -2386,10 +2386,13 @@ queue_update_im_spot_location (GtkTextView *text_view)
/* Use priority a little higher than GTK_TEXT_VIEW_PRIORITY_VALIDATE,
* so we don't wait until the entire buffer has been validated. */
if (!priv->im_spot_idle)
- priv->im_spot_idle = gdk_threads_add_idle_full (GTK_TEXT_VIEW_PRIORITY_VALIDATE - 1,
- do_update_im_spot_location,
- text_view,
- NULL);
+ {
+ priv->im_spot_idle = gdk_threads_add_idle_full (GTK_TEXT_VIEW_PRIORITY_VALIDATE - 1,
+ do_update_im_spot_location,
+ text_view,
+ NULL);
+ g_source_set_name_by_id (priv->im_spot_idle, "[gtk+] do_update_im_spot_location");
+ }
}
static void
@@ -4047,6 +4050,7 @@ gtk_text_view_invalidate (GtkTextView *text_view)
if (!priv->first_validate_idle)
{
priv->first_validate_idle = gdk_threads_add_idle_full (GTK_PRIORITY_RESIZE - 2, first_validate_callback, text_view, NULL);
+ g_source_set_name_by_id (priv->first_validate_idle, "[gtk+] first_validate_callback");
DV (g_print (G_STRLOC": adding first validate idle %d\n",
priv->first_validate_idle));
}
@@ -4054,6 +4058,7 @@ gtk_text_view_invalidate (GtkTextView *text_view)
if (!priv->incremental_validate_idle)
{
priv->incremental_validate_idle = gdk_threads_add_idle_full (GTK_TEXT_VIEW_PRIORITY_VALIDATE, incremental_validate_callback, text_view, NULL);
+ g_source_set_name_by_id (priv->incremental_validate_idle, "[gtk+] incremental_validate_callback");
DV (g_print (G_STRLOC": adding incremental validate idle %d\n",
priv->incremental_validate_idle));
}
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index c4e55819a1..c5729248fb 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -1282,7 +1282,10 @@ gtk_toolbar_begin_sliding (GtkToolbar *toolbar)
priv->is_sliding = TRUE;
if (!priv->idle_id)
- priv->idle_id = gdk_threads_add_idle (slide_idle_handler, toolbar);
+ {
+ priv->idle_id = gdk_threads_add_idle (slide_idle_handler, toolbar);
+ g_source_set_name_by_id (priv->idle_id, "[gtk+] slide_idle_handler");
+ }
gtk_widget_get_allocation (widget, &allocation);
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index bf2c1b19d8..9bec668fd8 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -6922,6 +6922,7 @@ install_presize_handler (GtkTreeView *tree_view)
{
tree_view->priv->validate_rows_timer =
gdk_threads_add_idle_full (GTK_TREE_VIEW_PRIORITY_VALIDATE, (GSourceFunc) validate_rows, tree_view, NULL);
+ g_source_set_name_by_id (tree_view->priv->validate_rows_timer, "[gtk+] validate_rows");
}
}
@@ -6950,6 +6951,7 @@ install_scroll_sync_handler (GtkTreeView *tree_view)
{
tree_view->priv->scroll_sync_timer =
gdk_threads_add_idle_full (GTK_TREE_VIEW_PRIORITY_SCROLL_SYNC, (GSourceFunc) scroll_sync_handler, tree_view, NULL);
+ g_source_set_name_by_id (tree_view->priv->scroll_sync_timer, "[gtk+] scroll_sync_handler");
}
}
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b82819a852..de1a3ef44d 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -14708,7 +14708,10 @@ gtk_widget_queue_tooltip_query (GtkWidget *widget)
tooltip_query_displays = g_slist_prepend (tooltip_query_displays, g_object_ref (display));
if (tooltip_query_id == 0)
- tooltip_query_id = gdk_threads_add_idle (tooltip_query_idle, NULL);
+ {
+ tooltip_query_id = gdk_threads_add_idle (tooltip_query_idle, NULL);
+ g_source_set_name_by_id (tooltip_query_id, "[gtk+] tooltip_query_idle");
+ }
}
/**
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 83964b3199..afd4c0271b 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1330,6 +1330,7 @@ gtk_window_close (GtkWindow *window)
return;
window->priv->delete_event_handler = gdk_threads_add_idle (send_delete_event, window);
+ g_source_set_name_by_id (window->priv->delete_event_handler, "[gtk+] send_delete_event");
}
static void
@@ -2275,7 +2276,10 @@ _gtk_window_notify_keys_changed (GtkWindow *window)
GtkWindowPrivate *priv = window->priv;
if (!priv->keys_changed_handler)
- priv->keys_changed_handler = gdk_threads_add_idle (handle_keys_changed, window);
+ {
+ priv->keys_changed_handler = gdk_threads_add_idle (handle_keys_changed, window);
+ g_source_set_name_by_id (priv->keys_changed_handler, "[gtk+] handle_keys_changed");
+ }
}
/**