#include "gdkinternals.h"
#include "gdkdeviceprivate.h"
#include <gdk/gdktextureprivate.h>
+#include "gdk-private.h"
#include <glib.h>
#include <glib/gprintf.h>
if (broadway_display->idle_flush_id == 0)
{
broadway_display->idle_flush_id = g_idle_add (flush_idle, g_object_ref (display));
- g_source_set_name_by_id (broadway_display->idle_flush_id, "[gtk] flush_idle");
+ gdk_source_set_static_name_by_id (broadway_display->idle_flush_id, "[gtk] flush_idle");
}
}
# define g_memdup2(mem,size) g_memdup((mem),(size))
#endif
+void gdk_source_set_static_name_by_id (guint tag,
+ const char *name);
+
+#if !GLIB_CHECK_VERSION(2, 69, 1)
+#define g_source_set_static_name(source, name) g_source_set_name ((source), (name))
+#endif
+
#endif /* __GDK__PRIVATE_H__ */
return dir;
}
+void
+gdk_source_set_static_name_by_id (guint tag,
+ const char *name)
+{
+ GSource *source;
+
+ g_return_if_fail (tag > 0);
+
+ source = g_main_context_find_source_by_id (NULL, tag);
+ if (source == NULL)
+ return;
+
+ g_source_set_static_name (source, name);
+}
#include "gdkinternals.h"
#include "gdkframeclockprivate.h"
#include "gdk.h"
+#include "gdk-private.h"
#include "gdkprofilerprivate.h"
#ifdef G_OS_WIN32
if (priv->flush_idle_id == 0 && RUN_FLUSH_IDLE (priv))
{
+ GSource *source;
+
priv->flush_idle_id = g_timeout_add_full (GDK_PRIORITY_EVENTS + 1,
min_interval,
gdk_frame_clock_flush_idle,
g_object_ref (clock_idle),
(GDestroyNotify) g_object_unref);
- g_source_set_name_by_id (priv->flush_idle_id, "[gtk] gdk_frame_clock_flush_idle");
+ source = g_main_context_find_source_by_id (NULL, priv->flush_idle_id);
+ g_source_set_static_name (source, "[gtk] gdk_frame_clock_flush_idle");
}
if (!priv->in_paint_idle &&
gdk_frame_clock_paint_idle,
g_object_ref (clock_idle),
(GDestroyNotify) g_object_unref);
- g_source_set_name_by_id (priv->paint_idle_id, "[gtk] gdk_frame_clock_paint_idle");
+ gdk_source_set_static_name_by_id (priv->paint_idle_id, "[gtk] gdk_frame_clock_paint_idle");
}
}
}
gdk_display_link_source_frame_cb,
source);
- g_source_set_name (source, "[gdk] quartz frame clock");
+ g_source_set_static_name (source, "[gdk] quartz frame clock");
return source;
}
#include "gdkdeviceprivate.h"
#include "gdkintl.h"
+#include "gdk-private.h"
#include "gdkmacosdevice-private.h"
#include "gdkmacoscursor-private.h"
gdk_macos_zoomback_timeout,
zb,
(GDestroyNotify) gdk_macos_zoomback_destroy);
- g_source_set_name_by_id (id, "[gtk] gdk_macos_zoomback_timeout");
+ gdk_source_set_static_name_by_id (id, "[gtk] gdk_macos_zoomback_timeout");
g_object_unref (drag);
}
event_poll_fd.fd = -1;
source = g_source_new (&event_funcs, sizeof (GdkMacosEventSource));
- g_source_set_name (source, "GDK Quartz event source");
+ g_source_set_static_name (source, "GDK Quartz event source");
g_source_add_poll (source, &event_poll_fd);
g_source_set_priority (source, GDK_PRIORITY_EVENTS);
g_source_set_can_recurse (source, TRUE);
pointer->cursor_timeout_id == 0)
{
guint id;
+ GSource *source;
gdk_wayland_pointer_stop_cursor_animation (pointer);
id = g_timeout_add (next_image_delay,
(GSourceFunc) gdk_wayland_device_update_surface_cursor,
device);
- g_source_set_name_by_id (id, "[gtk] gdk_wayland_device_update_surface_cursor");
+ source = g_main_context_find_source_by_id (NULL, id);
+ g_source_set_static_name (source, "[gtk] gdk_wayland_device_update_surface_cursor");
pointer->cursor_timeout_id = id;
}
else
timeout = (seat->repeat_deadline - now) / 1000L;
seat->repeat_timer = g_timeout_add (timeout, keyboard_repeat, seat);
- g_source_set_name_by_id (seat->repeat_timer, "[gtk] keyboard_repeat");
+ gdk_source_set_static_name_by_id (seat->repeat_timer, "[gtk] keyboard_repeat");
}
static void
#include "config.h"
#include <string.h>
+#include "gdk-private.h"
+
#include <io.h>
#include <fcntl.h>
#include <math.h>
id = g_timeout_add_full (G_PRIORITY_DEFAULT, 17,
gdk_drag_anim_timeout, anim,
(GDestroyNotify) gdk_drag_anim_destroy);
- g_source_set_name_by_id (id, "[gtk] gdk_drag_anim_timeout");
+ gdk_source_set_static_name_by_id (id, "[gtk] gdk_drag_anim_timeout");
}
static gboolean
#include "gdkdisplay-win32.h"
//#include "gdkselection-win32.h"
#include "gdkdragprivate.h"
+#include "gdk-private.h"
#include <windowsx.h>
#endif
source = g_source_new (&event_funcs, sizeof (GdkWin32EventSource));
- g_source_set_name (source, "GDK Win32 event source");
+ g_source_set_static_name (source, "GDK Win32 event source");
g_source_set_priority (source, GDK_PRIORITY_EVENTS);
event_source = (GdkWin32EventSource *)source;
#include "gdkintl.h"
#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"
+#include "gdk-private.h"
#include <glib.h>
#ifdef HAVE_DESKTOPAPPINFO
std->timeout_id = 0;
else {
std->timeout_id = g_timeout_add_seconds ((min_timeout + 500)/1000, startup_timeout, std);
- g_source_set_name_by_id (std->timeout_id, "[gtk] startup_timeout");
+ gdk_source_set_static_name_by_id (std->timeout_id, "[gtk] startup_timeout");
}
/* always remove this one, but we may have reinstalled another one. */
if (data->timeout_id == 0) {
data->timeout_id = g_timeout_add_seconds (STARTUP_TIMEOUT_LENGTH_SECONDS,
startup_timeout, data);
- g_source_set_name_by_id (data->timeout_id, "[gtk] startup_timeout");
+ gdk_source_set_static_name_by_id (data->timeout_id, "[gtk] startup_timeout");
}
}
#include "gdkasync.h"
#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"
+#include "gdk-private.h"
#include <X11/Xlibint.h>
{
guint id;
id = g_idle_add (callback_idle, state);
- g_source_set_name_by_id (id, "[gtk] callback_idle");
+ gdk_source_set_static_name_by_id (id, "[gtk] callback_idle");
}
DeqAsyncHandler(state->dpy, &state->async);
{
guint id;
id = g_idle_add (roundtrip_callback_idle, state);
- g_source_set_name_by_id (id, "[gtk] roundtrip_callback_idle");
+ gdk_source_set_static_name_by_id (id, "[gtk] roundtrip_callback_idle");
}
DeqAsyncHandler(state->dpy, &state->async);
id = g_timeout_add_full (G_PRIORITY_DEFAULT, 17,
gdk_drag_anim_timeout, anim,
(GDestroyNotify) gdk_drag_anim_destroy);
- g_source_set_name_by_id (id, "[gtk] gdk_drag_anim_timeout");
+ gdk_source_set_static_name_by_id (id, "[gtk] gdk_drag_anim_timeout");
g_object_unref (drag);
}
#include "gtkdebug.h"
#include "gtkwindow.h"
+#include "gtkprivate.h"
#include "a11y/atspi/atspi-accessible.h"
#include "a11y/atspi/atspi-application.h"
return;
self->register_id = g_idle_add (root_register, self);
- g_source_set_name_by_id (self->register_id, "[gtk] ATSPI root registration");
+ gdk_source_set_static_name_by_id (self->register_id, "[gtk] ATSPI root registration");
}
void
if (gtk_widget_get_realized (widget) && !priv->activate_timeout)
{
priv->activate_timeout = g_timeout_add (ACTIVATE_TIMEOUT, button_activate_timeout, button);
- g_source_set_name_by_id (priv->activate_timeout, "[gtk] button_activate_timeout");
+ gdk_source_set_static_name_by_id (priv->activate_timeout, "[gtk] button_activate_timeout");
gtk_widget_add_css_class (GTK_WIDGET (button), "keyboard-activating");
priv->button_down = TRUE;
populate_recent_section (chooser);
chooser->populate_idle = g_idle_add (populate_emoji_chooser, chooser);
- g_source_set_name_by_id (chooser->populate_idle, "[gtk] populate_emoji_chooser");
+ gdk_source_set_static_name_by_id (chooser->populate_idle, "[gtk] populate_emoji_chooser");
}
static void
g_timeout_add (COMPLETION_TIMEOUT,
gtk_entry_completion_timeout,
completion);
- g_source_set_name_by_id (completion->completion_timeout, "[gtk] gtk_entry_completion_timeout");
+ gdk_source_set_static_name_by_id (completion->completion_timeout, "[gtk] gtk_entry_completion_timeout");
}
static gboolean
g_cclosure_new_object (G_CALLBACK (check_completion_callback),
G_OBJECT (completion)));
g_source_attach (completion->check_completion_idle, NULL);
- g_source_set_name (completion->check_completion_idle, "[gtk] check_completion_callback");
+ g_source_set_static_name (completion->check_completion_idle, "[gtk] check_completion_callback");
}
}
if (!expander->expanded && !expander->expand_timer)
{
expander->expand_timer = g_timeout_add (TIMEOUT_EXPAND, (GSourceFunc) expand_timeout, expander);
- g_source_set_name_by_id (expander->expand_timer, "[gtk] expand_timeout");
+ gdk_source_set_static_name_by_id (expander->expand_timer, "[gtk] expand_timeout");
}
}
impl->location_changed_id = g_timeout_add (LOCATION_CHANGED_TIMEOUT,
location_changed_timeout_cb,
impl);
- g_source_set_name_by_id (impl->location_changed_id, "[gtk] location_changed_timeout_cb");
+ gdk_source_set_static_name_by_id (impl->location_changed_id, "[gtk] location_changed_timeout_cb");
}
}
g_assert (impl->load_state != LOAD_PRELOAD);
impl->load_timeout_id = g_timeout_add (MAX_LOADING_TIME, load_timeout_cb, impl);
- g_source_set_name_by_id (impl->load_timeout_id, "[gtk] load_timeout_cb");
+ gdk_source_set_static_name_by_id (impl->load_timeout_id, "[gtk] load_timeout_cb");
impl->load_state = LOAD_PRELOAD;
}
#include "gtktreednd.h"
#include "gtktreemodel.h"
#include "gtkfilter.h"
+#include "gtkprivate.h"
/*** Structure: how GtkFileSystemModel works
*
thaw_func,
model,
NULL);
- g_source_set_name_by_id (model->dir_thaw_source, "[gtk] thaw_func");
+ gdk_source_set_static_name_by_id (model->dir_thaw_source, "[gtk] thaw_func");
}
for (walk = files; walk; walk = walk->next)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PENDING]);
g_assert (self->pending_cb == 0);
self->pending_cb = g_idle_add (gtk_filter_list_model_run_filter_cb, self);
- g_source_set_name_by_id (self->pending_cb, "[gtk] gtk_filter_list_model_run_filter_cb");
+ gdk_source_set_static_name_by_id (self->pending_cb, "[gtk] gtk_filter_list_model_run_filter_cb");
}
static void
g_object_get (settings, "gtk-double-click-time", &double_click_time, NULL);
priv->double_click_timeout_id = g_timeout_add (double_click_time, _double_click_timeout_cb, gesture);
- g_source_set_name_by_id (priv->double_click_timeout_id, "[gtk] _double_click_timeout_cb");
+ gdk_source_set_static_name_by_id (priv->double_click_timeout_id, "[gtk] _double_click_timeout_cb");
}
static gboolean
gtk_gesture_get_point (gesture, sequence,
&priv->initial_x, &priv->initial_y);
priv->timeout_id = g_timeout_add (delay, _gtk_gesture_long_press_timeout, gesture);
- g_source_set_name_by_id (priv->timeout_id, "[gtk] _gtk_gesture_long_press_timeout");
+ gdk_source_set_static_name_by_id (priv->timeout_id, "[gtk] _gtk_gesture_long_press_timeout");
}
static void
theme_changed_idle__mainthread_unlocked,
gtk_icon_theme_ref_ref (self->ref),
(GDestroyNotify)gtk_icon_theme_ref_unref);
- g_source_set_name_by_id (self->theme_changed_idle, "[gtk] theme_changed_idle");
+ gdk_source_set_static_name_by_id (self->theme_changed_idle, "[gtk] theme_changed_idle");
}
}
if (icon_view->priv->scroll_timeout_id == 0) {
icon_view->priv->scroll_timeout_id = g_timeout_add (30, rubberband_scroll_timeout, icon_view);
- g_source_set_name_by_id (icon_view->priv->scroll_timeout_id, "[gtk] rubberband_scroll_timeout");
+ gdk_source_set_static_name_by_id (icon_view->priv->scroll_timeout_id, "[gtk] rubberband_scroll_timeout");
}
}
else
if (icon_view->priv->scroll_timeout_id == 0)
{
icon_view->priv->scroll_timeout_id = g_timeout_add (50, drag_scroll_timeout, icon_view);
- g_source_set_name_by_id (icon_view->priv->scroll_timeout_id, "[gtk] drag_scroll_timeout");
+ gdk_source_set_static_name_by_id (icon_view->priv->scroll_timeout_id, "[gtk] drag_scroll_timeout");
}
if (target == GTK_TYPE_TREE_ROW_DATA)
store.store_loop = g_main_loop_new (NULL, TRUE);
store.timeout_id = g_timeout_add_seconds (10, (GSourceFunc) sync_timed_out_cb, &store);
- g_source_set_name_by_id (store.timeout_id, "[gtk] gtk_main_sync clipboard store timeout");
+ gdk_source_set_static_name_by_id (store.timeout_id, "[gtk] gtk_main_sync clipboard store timeout");
if (g_main_loop_is_running (store.store_loop))
g_main_loop_run (store.store_loop);
#include "gtkbuiltiniconprivate.h"
#include "gtkgizmoprivate.h"
#include "gtkbinlayout.h"
+#include "gtkprivate.h"
typedef GtkBoxClass GtkMenuSectionBoxClass;
box->separator_sync_idle = g_idle_add_full (G_PRIORITY_HIGH_IDLE, /* before resize... */
gtk_menu_section_box_handle_sync_separators,
box, NULL);
- g_source_set_name_by_id (box->separator_sync_idle, "[gtk] menu section box handle sync separators");
+ gdk_source_set_static_name_by_id (box->separator_sync_idle, "[gtk] menu section box handle sync separators");
}
}
#include "gtkshortcutcontroller.h"
#include "gtkshortcut.h"
#include "gtkaccessibleprivate.h"
+#include "gtkprivate.h"
/*< private >
* GtkModelButton:
return;
button->open_timeout = g_timeout_add (OPEN_TIMEOUT, open_submenu, button);
- g_source_set_name_by_id (button->open_timeout, "[gtk] open_submenu");
+ gdk_source_set_static_name_by_id (button->open_timeout, "[gtk] open_submenu");
}
static void
notebook->dnd_timer = g_timeout_add (TIMEOUT_REPEAT * SCROLL_DELAY_FACTOR,
scroll_notebook_timer,
notebook);
- g_source_set_name_by_id (notebook->dnd_timer, "[gtk] scroll_notebook_timer");
+ gdk_source_set_static_name_by_id (notebook->dnd_timer, "[gtk] scroll_notebook_timer");
}
}
else
notebook->switch_page = page;
notebook->switch_page_timer = g_timeout_add (TIMEOUT_EXPAND, gtk_notebook_switch_page_timeout, notebook);
- g_source_set_name_by_id (notebook->switch_page_timer, "[gtk] gtk_notebook_switch_page_timeout");
+ gdk_source_set_static_name_by_id (notebook->switch_page_timer, "[gtk] gtk_notebook_switch_page_timeout");
}
static void
notebook->timer = g_timeout_add (TIMEOUT_REPEAT * SCROLL_DELAY_FACTOR,
(GSourceFunc) gtk_notebook_timer,
notebook);
- g_source_set_name_by_id (notebook->timer, "[gtk] gtk_notebook_timer");
+ gdk_source_set_static_name_by_id (notebook->timer, "[gtk] gtk_notebook_timer");
}
else
retval = TRUE;
notebook->timer = g_timeout_add (TIMEOUT_INITIAL,
(GSourceFunc) gtk_notebook_timer,
notebook);
- g_source_set_name_by_id (notebook->timer, "[gtk] gtk_notebook_timer");
+ gdk_source_set_static_name_by_id (notebook->timer, "[gtk] gtk_notebook_timer");
notebook->need_timer = TRUE;
}
}
priv->mnemonics_display_timeout_id =
g_timeout_add (MNEMONICS_DELAY, schedule_mnemonics_visible_cb, popover);
- g_source_set_name_by_id (priv->mnemonics_display_timeout_id, "[gtk] popover_schedule_mnemonics_visible_cb");
+ gdk_source_set_static_name_by_id (priv->mnemonics_display_timeout_id, "[gtk] popover_schedule_mnemonics_visible_cb");
}
static void
op_win32->timeout_id = g_timeout_add (STATUS_POLLING_TIME,
(GSourceFunc)win32_poll_status_timeout,
op);
- g_source_set_name_by_id (op_win32->timeout_id, "[gtk] win32_poll_status_timeout");
+ gdk_source_set_static_name_by_id (op_win32->timeout_id, "[gtk] win32_poll_status_timeout");
}
g_object_unref (op);
return FALSE;
op_win32->timeout_id = g_timeout_add (STATUS_POLLING_TIME,
(GSourceFunc)win32_poll_status_timeout,
op);
- g_source_set_name_by_id (op_win32->timeout_id, "[gtk] win32_poll_status_timeout");
+ gdk_source_set_static_name_by_id (op_win32->timeout_id, "[gtk] win32_poll_status_timeout");
}
else
/* Dunno what happened, pretend its finished */
preview_print_idle,
pop,
preview_print_idle_done);
- g_source_set_name_by_id (id, "[gtk] preview_print_idle");
+ gdk_source_set_static_name_by_id (id, "[gtk] preview_print_idle");
}
g_timeout_add (SHOW_PROGRESS_TIME,
(GSourceFunc) show_progress_timeout,
data);
- g_source_set_name_by_id (priv->show_progress_timeout_id, "[gtk] show_progress_timeout");
+ gdk_source_set_static_name_by_id (priv->show_progress_timeout_id, "[gtk] show_progress_timeout");
data->progress = progress;
}
print_pages_idle,
data,
print_pages_idle_done);
- g_source_set_name_by_id (priv->print_pages_idle_id, "[gtk] print_pages_idle");
+ gdk_source_set_static_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)
return;
dialog->mark_conflicts_id = g_idle_add (mark_conflicts_callback, dialog);
- g_source_set_name_by_id (dialog->mark_conflicts_id, "[gtk] mark_conflicts_callback");
+ gdk_source_set_static_name_by_id (dialog->mark_conflicts_id, "[gtk] mark_conflicts_callback");
}
static void
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
priv->timer->timeout_id = g_timeout_add (TIMEOUT_REPEAT, second_timeout, range);
- g_source_set_name_by_id (priv->timer->timeout_id, "[gtk] second_timeout");
+ gdk_source_set_static_name_by_id (priv->timer->timeout_id, "[gtk] second_timeout");
return G_SOURCE_REMOVE;
}
priv->timer = g_new (GtkRangeStepTimer, 1);
priv->timer->timeout_id = g_timeout_add (TIMEOUT_INITIAL, initial_timeout, range);
- g_source_set_name_by_id (priv->timer->timeout_id, "[gtk] initial_timeout");
+ gdk_source_set_static_name_by_id (priv->timer->timeout_id, "[gtk] initial_timeout");
priv->timer->step = step;
gtk_range_scroll (range, priv->timer->step);
if (manager->priv->changed_timeout == 0)
{
manager->priv->changed_timeout = g_timeout_add (250, emit_manager_changed, manager);
- g_source_set_name_by_id (manager->priv->changed_timeout, "[gtk] emit_manager_changed");
+ gdk_source_set_static_name_by_id (manager->priv->changed_timeout, "[gtk] emit_manager_changed");
}
else
{
else if (indicator_close && !on_other_scrollbar)
{
indicator->over_timeout_id = g_timeout_add (30, enable_over_timeout_cb, indicator);
- g_source_set_name_by_id (indicator->over_timeout_id, "[gtk] enable_over_timeout_cb");
+ gdk_source_set_static_name_by_id (indicator->over_timeout_id, "[gtk] enable_over_timeout_cb");
}
else
indicator_set_over (indicator, FALSE);
{
priv->scroll_events_overshoot_id =
g_timeout_add (50, start_scroll_deceleration_cb, scrolled_window);
- g_source_set_name_by_id (priv->scroll_events_overshoot_id,
- "[gtk] start_scroll_deceleration_cb");
+ gdk_source_set_static_name_by_id (priv->scroll_events_overshoot_id,
+ "[gtk] start_scroll_deceleration_cb");
}
}
if (visible && indicator->conceil_timer == 0)
{
indicator->conceil_timer = g_timeout_add (INDICATOR_FADE_OUT_TIME, maybe_hide_indicator, indicator);
- g_source_set_name_by_id (indicator->conceil_timer, "[gtk] maybe_hide_indicator");
+ gdk_source_set_static_name_by_id (indicator->conceil_timer, "[gtk] maybe_hide_indicator");
}
if (!visible && indicator->conceil_timer != 0)
{
return;
model->idle = g_idle_add (do_search, engine);
- g_source_set_name_by_id (model->idle, "[gtk] gtk_search_engine_model_start");
+ gdk_source_set_static_name_by_id (model->idle, "[gtk] gtk_search_engine_model_start");
}
static void
entry->delayed_changed_id = g_timeout_add (DELAYED_TIMEOUT_ID,
gtk_search_entry_changed_timeout_cb,
entry);
- g_source_set_name_by_id (entry->delayed_changed_id, "[gtk] gtk_search_entry_changed_timeout_cb");
+ gdk_source_set_static_name_by_id (entry->delayed_changed_id, "[gtk] gtk_search_entry_changed_timeout_cb");
}
static void
spin->timer = g_timeout_add (TIMEOUT_INITIAL,
(GSourceFunc) gtk_spin_button_timer,
(gpointer) spin);
- g_source_set_name_by_id (spin->timer, "[gtk] gtk_spin_button_timer");
+ gdk_source_set_static_name_by_id (spin->timer, "[gtk] gtk_spin_button_timer");
}
gtk_spin_button_real_spin (spin, click_child == spin->up_button ? step : -step);
}
spin_button->timer = g_timeout_add (TIMEOUT_REPEAT,
(GSourceFunc) gtk_spin_button_timer,
spin_button);
- g_source_set_name_by_id (spin_button->timer, "[gtk] gtk_spin_button_timer");
+ gdk_source_set_static_name_by_id (spin_button->timer, "[gtk] gtk_spin_button_timer");
}
else
{
guint switch_timer = g_timeout_add (TIMEOUT_EXPAND,
gtk_stack_switcher_switch_timeout,
button);
- g_source_set_name_by_id (switch_timer, "[gtk] gtk_stack_switcher_switch_timeout");
+ gdk_source_set_static_name_by_id (switch_timer, "[gtk] gtk_stack_switcher_switch_timeout");
g_object_set_data_full (G_OBJECT (button), "-gtk-switch-timer", GUINT_TO_POINTER (switch_timer), clear_timer);
}
}
password_hint->source_id = g_timeout_add (password_hint_timeout,
(GSourceFunc)gtk_text_remove_password_hint,
self);
- g_source_set_name_by_id (password_hint->source_id, "[gtk] gtk_text_remove_password_hint");
+ gdk_source_set_static_name_by_id (password_hint->source_id, "[gtk] gtk_text_remove_password_hint");
}
}
}
priv->selection_bubble_timeout_id =
g_timeout_add (50, gtk_text_selection_bubble_popup_show, self);
- g_source_set_name_by_id (priv->selection_bubble_timeout_id, "[gtk] gtk_text_selection_bubble_popup_cb");
+ gdk_source_set_static_name_by_id (priv->selection_bubble_timeout_id, "[gtk] gtk_text_selection_bubble_popup_cb");
}
static void
#include "gtktextbufferprivate.h"
#include "gtktextiterprivate.h"
#include "gtktextlinedisplaycacheprivate.h"
+#include "gtkprivate.h"
#define DEFAULT_MRU_SIZE 250
#define BLOW_CACHE_TIMEOUT_SEC 20
gtk_text_line_display_cache_blow_cb,
cache);
cache->evict_source = g_main_context_find_source_by_id (NULL, tag);
- g_source_set_name (cache->evict_source, "[gtk+] gtk_text_line_display_cache_blow_cb");
+ g_source_set_static_name (cache->evict_source, "[gtk+] gtk_text_line_display_cache_blow_cb");
}
}
if (!priv->scroll_timeout)
{
priv->scroll_timeout = g_timeout_add (100, gtk_text_view_drop_motion_scroll_timeout, self);
- g_source_set_name_by_id (priv->scroll_timeout, "[gtk] gtk_text_view_drop_motion_scroll_timeout");
+ gdk_source_set_static_name_by_id (priv->scroll_timeout, "[gtk] gtk_text_view_drop_motion_scroll_timeout");
}
}
do_update_im_spot_location,
text_view,
NULL);
- g_source_set_name_by_id (priv->im_spot_idle, "[gtk] do_update_im_spot_location");
+ gdk_source_set_static_name_by_id (priv->im_spot_idle, "[gtk] do_update_im_spot_location");
}
}
if (!priv->first_validate_idle)
{
priv->first_validate_idle = g_idle_add_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");
+ gdk_source_set_static_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));
}
if (!priv->incremental_validate_idle)
{
priv->incremental_validate_idle = g_idle_add_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");
+ gdk_source_set_static_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));
}
g_source_remove (text_view->priv->scroll_timeout);
text_view->priv->scroll_timeout = g_timeout_add (50, selection_scan_timeout, text_view);
- g_source_set_name_by_id (text_view->priv->scroll_timeout, "[gtk] selection_scan_timeout");
+ gdk_source_set_static_name_by_id (text_view->priv->scroll_timeout, "[gtk] selection_scan_timeout");
gtk_text_view_selection_bubble_popup_unset (text_view);
g_source_remove (priv->selection_bubble_timeout_id);
priv->selection_bubble_timeout_id = g_timeout_add (50, gtk_text_view_selection_bubble_popup_show, text_view);
- g_source_set_name_by_id (priv->selection_bubble_timeout_id, "[gtk] gtk_text_view_selection_bubble_popup_cb");
+ gdk_source_set_static_name_by_id (priv->selection_bubble_timeout_id, "[gtk] gtk_text_view_selection_bubble_popup_cb");
}
/* Child GdkSurfaces */
#include "gtkwindowprivate.h"
#include "gtkwidgetprivate.h"
#include "gtknative.h"
+#include "gtkprivate.h"
/**
* GtkTooltip:
tooltip_browse_mode_expired,
g_object_ref (tooltip),
g_object_unref);
- g_source_set_name_by_id (tooltip->browse_mode_timeout_id, "[gtk] tooltip_browse_mode_expired");
+ gdk_source_set_static_name_by_id (tooltip->browse_mode_timeout_id, "[gtk] tooltip_browse_mode_expired");
}
if (tooltip->window)
tooltip_popup_timeout,
g_object_ref (display),
g_object_unref);
- g_source_set_name_by_id (tooltip->timeout_id, "[gtk] tooltip_popup_timeout");
+ gdk_source_set_static_name_by_id (tooltip->timeout_id, "[gtk] tooltip_popup_timeout");
}
void
#include "gtkgestureclick.h"
#include "gtkintl.h"
#include "gtktreelistmodel.h"
+#include "gtkprivate.h"
/**
* GtkTreeExpander:
!self->expand_timer)
{
self->expand_timer = g_timeout_add (TIMEOUT_EXPAND, (GSourceFunc) gtk_tree_expander_expand_timeout, self);
- g_source_set_name_by_id (self->expand_timer, "[gtk] gtk_tree_expander_expand_timeout");
+ gdk_source_set_static_name_by_id (self->expand_timer, "[gtk] gtk_tree_expander_expand_timeout");
}
}
{
priv->auto_expand_timeout =
g_timeout_add (AUTO_EXPAND_TIMEOUT, auto_expand_timeout, tree_view);
- g_source_set_name_by_id (priv->auto_expand_timeout, "[gtk] auto_expand_timeout");
+ gdk_source_set_static_name_by_id (priv->auto_expand_timeout, "[gtk] auto_expand_timeout");
}
}
{
priv->validate_rows_timer =
g_idle_add_full (GTK_TREE_VIEW_PRIORITY_VALIDATE, (GSourceFunc) validate_rows, tree_view, NULL);
- g_source_set_name_by_id (priv->validate_rows_timer, "[gtk] validate_rows");
+ gdk_source_set_static_name_by_id (priv->validate_rows_timer, "[gtk] validate_rows");
}
}
{
priv->scroll_sync_timer =
g_idle_add_full (GTK_TREE_VIEW_PRIORITY_SCROLL_SYNC, (GSourceFunc) scroll_sync_handler, tree_view, NULL);
- g_source_set_name_by_id (priv->scroll_sync_timer, "[gtk] scroll_sync_handler");
+ gdk_source_set_static_name_by_id (priv->scroll_sync_timer, "[gtk] scroll_sync_handler");
}
}
if (priv->scroll_timeout == 0)
{
priv->scroll_timeout = g_timeout_add (150, scroll_row_timeout, tree_view);
- g_source_set_name_by_id (priv->scroll_timeout, "[gtk] scroll_row_timeout");
+ gdk_source_set_static_name_by_id (priv->scroll_timeout, "[gtk] scroll_row_timeout");
}
}
{
priv->open_dest_timeout =
g_timeout_add (AUTO_EXPAND_TIMEOUT, open_row_timeout, tree_view);
- g_source_set_name_by_id (priv->open_dest_timeout, "[gtk] open_row_timeout");
+ gdk_source_set_static_name_by_id (priv->open_dest_timeout, "[gtk] open_row_timeout");
}
else
{
g_timeout_add (GTK_TREE_VIEW_SEARCH_DIALOG_TIMEOUT,
(GSourceFunc) gtk_tree_view_search_entry_flush_timeout,
tree_view);
- g_source_set_name_by_id (priv->typeselect_flush_timeout, "[gtk] gtk_tree_view_search_entry_flush_timeout");
+ gdk_source_set_static_name_by_id (priv->typeselect_flush_timeout, "[gtk] gtk_tree_view_search_entry_flush_timeout");
/* search first matching iter */
gtk_tree_view_search_init (priv->search_entry, tree_view);
g_timeout_add (GTK_TREE_VIEW_SEARCH_DIALOG_TIMEOUT,
(GSourceFunc) gtk_tree_view_search_entry_flush_timeout,
tree_view);
- g_source_set_name_by_id (priv->typeselect_flush_timeout, "[gtk] gtk_tree_view_search_entry_flush_timeout");
+ gdk_source_set_static_name_by_id (priv->typeselect_flush_timeout, "[gtk] gtk_tree_view_search_entry_flush_timeout");
}
}
g_timeout_add (GTK_TREE_VIEW_SEARCH_DIALOG_TIMEOUT,
(GSourceFunc) gtk_tree_view_search_entry_flush_timeout,
tree_view);
- g_source_set_name_by_id (priv->typeselect_flush_timeout, "[gtk] gtk_tree_view_search_entry_flush_timeout");
+ gdk_source_set_static_name_by_id (priv->typeselect_flush_timeout, "[gtk] gtk_tree_view_search_entry_flush_timeout");
}
return GDK_EVENT_STOP;
g_timeout_add (GTK_TREE_VIEW_SEARCH_DIALOG_TIMEOUT,
(GSourceFunc) gtk_tree_view_search_entry_flush_timeout,
tree_view);
- g_source_set_name_by_id (priv->typeselect_flush_timeout, "[gtk] gtk_tree_view_search_entry_flush_timeout");
+ gdk_source_set_static_name_by_id (priv->typeselect_flush_timeout, "[gtk] gtk_tree_view_search_entry_flush_timeout");
}
if (!retval)
g_timeout_add (GTK_TREE_VIEW_SEARCH_DIALOG_TIMEOUT,
(GSourceFunc) gtk_tree_view_search_entry_flush_timeout,
tree_view);
- g_source_set_name_by_id (priv->typeselect_flush_timeout, "[gtk] gtk_tree_view_search_entry_flush_timeout");
+ gdk_source_set_static_name_by_id (priv->typeselect_flush_timeout, "[gtk] gtk_tree_view_search_entry_flush_timeout");
}
if (*text == '\0')
if (!priv->keys_changed_handler)
{
priv->keys_changed_handler = g_idle_add (handle_keys_changed, window);
- g_source_set_name_by_id (priv->keys_changed_handler, "[gtk] handle_keys_changed");
+ gdk_source_set_static_name_by_id (priv->keys_changed_handler, "[gtk] handle_keys_changed");
}
}
priv->mnemonics_display_timeout_id =
g_timeout_add (MNEMONICS_DELAY, schedule_mnemonics_visible_cb, window);
- g_source_set_name_by_id (priv->mnemonics_display_timeout_id, "[gtk] schedule_mnemonics_visible_cb");
+ gdk_source_set_static_name_by_id (priv->mnemonics_display_timeout_id, "[gtk] schedule_mnemonics_visible_cb");
}
/**
#include "gtkcupssecretsutils.h"
#include <gtkprintutils.h>
+#include "gtkprivate.h"
#ifdef HAVE_COLORD
#include <colord.h>
dispatch = (GtkPrintCupsDispatchWatch *) g_source_new (&_cups_dispatch_watch_funcs,
sizeof (GtkPrintCupsDispatchWatch));
- g_source_set_name (&dispatch->source, "GTK CUPS backend");
+ g_source_set_static_name (&dispatch->source, "GTK CUPS backend");
GTK_NOTE (PRINTING,
g_print ("CUPS Backend: %s <source %p> - Executing cups request on server '%s' and resource '%s'\n", G_STRFUNC, dispatch, request->server, request->resource));