mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
Replace uses of gtk_timeout_* and gtk_idle_* by their non-deprecated
GLib counterparts. Fully deprecate gtk_timeout_* and gtk_idle_*.
This commit is contained in:
parent
5fbf845d5c
commit
b414adc897
22
ChangeLog
22
ChangeLog
@ -1,3 +1,25 @@
|
||||
2003-02-06 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkclist.c:
|
||||
* gtk/gtkctree.c:
|
||||
* gtk/gtkcontainer.c:
|
||||
* gtk/gtkdnd.c:
|
||||
* gtk/gtkentry.c:
|
||||
* gtk/gtklist.c:
|
||||
* gtk/gtkmenu.c:
|
||||
* gtk/gtkmenuitem.c:
|
||||
* gtk/gtknotebook.c:
|
||||
* gtk/gtkselection.c:
|
||||
* gtk/gtkspinbutton.c:
|
||||
* gtk/gtktext.c:
|
||||
* gtk/gtktextview.c:
|
||||
* gtk/gtktooltips.c:
|
||||
* gtk/gtktreeview.c:
|
||||
* gtk/gtkwindow.c: Replace uses of gtk_timeout_* and gtk_idle_* by
|
||||
their non-deprecated GLib counterparts.
|
||||
|
||||
* gtk/gtkmain.h: Fully deprecate gtk_timeout_* and gtk_idle_*.
|
||||
|
||||
Sun Feb 2 16:45:57 GMT 2003 Tony Gale <gale@gtk.org>
|
||||
|
||||
* docs/tutorial/gtk-tut.sgml: cleanups from
|
||||
|
@ -1,3 +1,25 @@
|
||||
2003-02-06 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkclist.c:
|
||||
* gtk/gtkctree.c:
|
||||
* gtk/gtkcontainer.c:
|
||||
* gtk/gtkdnd.c:
|
||||
* gtk/gtkentry.c:
|
||||
* gtk/gtklist.c:
|
||||
* gtk/gtkmenu.c:
|
||||
* gtk/gtkmenuitem.c:
|
||||
* gtk/gtknotebook.c:
|
||||
* gtk/gtkselection.c:
|
||||
* gtk/gtkspinbutton.c:
|
||||
* gtk/gtktext.c:
|
||||
* gtk/gtktextview.c:
|
||||
* gtk/gtktooltips.c:
|
||||
* gtk/gtktreeview.c:
|
||||
* gtk/gtkwindow.c: Replace uses of gtk_timeout_* and gtk_idle_* by
|
||||
their non-deprecated GLib counterparts.
|
||||
|
||||
* gtk/gtkmain.h: Fully deprecate gtk_timeout_* and gtk_idle_*.
|
||||
|
||||
Sun Feb 2 16:45:57 GMT 2003 Tony Gale <gale@gtk.org>
|
||||
|
||||
* docs/tutorial/gtk-tut.sgml: cleanups from
|
||||
|
@ -1,3 +1,25 @@
|
||||
2003-02-06 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkclist.c:
|
||||
* gtk/gtkctree.c:
|
||||
* gtk/gtkcontainer.c:
|
||||
* gtk/gtkdnd.c:
|
||||
* gtk/gtkentry.c:
|
||||
* gtk/gtklist.c:
|
||||
* gtk/gtkmenu.c:
|
||||
* gtk/gtkmenuitem.c:
|
||||
* gtk/gtknotebook.c:
|
||||
* gtk/gtkselection.c:
|
||||
* gtk/gtkspinbutton.c:
|
||||
* gtk/gtktext.c:
|
||||
* gtk/gtktextview.c:
|
||||
* gtk/gtktooltips.c:
|
||||
* gtk/gtktreeview.c:
|
||||
* gtk/gtkwindow.c: Replace uses of gtk_timeout_* and gtk_idle_* by
|
||||
their non-deprecated GLib counterparts.
|
||||
|
||||
* gtk/gtkmain.h: Fully deprecate gtk_timeout_* and gtk_idle_*.
|
||||
|
||||
Sun Feb 2 16:45:57 GMT 2003 Tony Gale <gale@gtk.org>
|
||||
|
||||
* docs/tutorial/gtk-tut.sgml: cleanups from
|
||||
|
@ -1,3 +1,25 @@
|
||||
2003-02-06 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkclist.c:
|
||||
* gtk/gtkctree.c:
|
||||
* gtk/gtkcontainer.c:
|
||||
* gtk/gtkdnd.c:
|
||||
* gtk/gtkentry.c:
|
||||
* gtk/gtklist.c:
|
||||
* gtk/gtkmenu.c:
|
||||
* gtk/gtkmenuitem.c:
|
||||
* gtk/gtknotebook.c:
|
||||
* gtk/gtkselection.c:
|
||||
* gtk/gtkspinbutton.c:
|
||||
* gtk/gtktext.c:
|
||||
* gtk/gtktextview.c:
|
||||
* gtk/gtktooltips.c:
|
||||
* gtk/gtktreeview.c:
|
||||
* gtk/gtkwindow.c: Replace uses of gtk_timeout_* and gtk_idle_* by
|
||||
their non-deprecated GLib counterparts.
|
||||
|
||||
* gtk/gtkmain.h: Fully deprecate gtk_timeout_* and gtk_idle_*.
|
||||
|
||||
Sun Feb 2 16:45:57 GMT 2003 Tony Gale <gale@gtk.org>
|
||||
|
||||
* docs/tutorial/gtk-tut.sgml: cleanups from
|
||||
|
@ -1,3 +1,25 @@
|
||||
2003-02-06 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkclist.c:
|
||||
* gtk/gtkctree.c:
|
||||
* gtk/gtkcontainer.c:
|
||||
* gtk/gtkdnd.c:
|
||||
* gtk/gtkentry.c:
|
||||
* gtk/gtklist.c:
|
||||
* gtk/gtkmenu.c:
|
||||
* gtk/gtkmenuitem.c:
|
||||
* gtk/gtknotebook.c:
|
||||
* gtk/gtkselection.c:
|
||||
* gtk/gtkspinbutton.c:
|
||||
* gtk/gtktext.c:
|
||||
* gtk/gtktextview.c:
|
||||
* gtk/gtktooltips.c:
|
||||
* gtk/gtktreeview.c:
|
||||
* gtk/gtkwindow.c: Replace uses of gtk_timeout_* and gtk_idle_* by
|
||||
their non-deprecated GLib counterparts.
|
||||
|
||||
* gtk/gtkmain.h: Fully deprecate gtk_timeout_* and gtk_idle_*.
|
||||
|
||||
Sun Feb 2 16:45:57 GMT 2003 Tony Gale <gale@gtk.org>
|
||||
|
||||
* docs/tutorial/gtk-tut.sgml: cleanups from
|
||||
|
@ -5287,7 +5287,7 @@ gtk_clist_motion (GtkWidget *widget,
|
||||
if (clist->htimer)
|
||||
return FALSE;
|
||||
|
||||
clist->htimer = gtk_timeout_add
|
||||
clist->htimer = g_timeout_add
|
||||
(SCROLL_TIME, (GtkFunction) horizontal_timeout, clist);
|
||||
|
||||
if (!((x < 0 && clist->hadjustment->value == 0) ||
|
||||
@ -5319,8 +5319,8 @@ gtk_clist_motion (GtkWidget *widget,
|
||||
if (clist->vtimer)
|
||||
return FALSE;
|
||||
|
||||
clist->vtimer = gtk_timeout_add (SCROLL_TIME,
|
||||
(GtkFunction) vertical_timeout, clist);
|
||||
clist->vtimer = g_timeout_add (SCROLL_TIME,
|
||||
(GtkFunction) vertical_timeout, clist);
|
||||
|
||||
if (clist->drag_button &&
|
||||
((y < 0 && clist->focus_row == 0) ||
|
||||
@ -7101,13 +7101,13 @@ remove_grab (GtkCList *clist)
|
||||
|
||||
if (clist->htimer)
|
||||
{
|
||||
gtk_timeout_remove (clist->htimer);
|
||||
g_source_remove (clist->htimer);
|
||||
clist->htimer = 0;
|
||||
}
|
||||
|
||||
if (clist->vtimer)
|
||||
{
|
||||
gtk_timeout_remove (clist->vtimer);
|
||||
g_source_remove (clist->vtimer);
|
||||
clist->vtimer = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1143,9 +1143,9 @@ _gtk_container_queue_resize (GtkContainer *container)
|
||||
{
|
||||
GTK_PRIVATE_SET_FLAG (resize_container, GTK_RESIZE_PENDING);
|
||||
if (container_resize_queue == NULL)
|
||||
gtk_idle_add_priority (GTK_PRIORITY_RESIZE,
|
||||
gtk_container_idle_sizer,
|
||||
NULL);
|
||||
g_idle_add_full (GTK_PRIORITY_RESIZE,
|
||||
gtk_container_idle_sizer,
|
||||
NULL, NULL);
|
||||
container_resize_queue = g_slist_prepend (container_resize_queue, resize_container);
|
||||
}
|
||||
break;
|
||||
|
@ -4777,13 +4777,13 @@ remove_grab (GtkCList *clist)
|
||||
|
||||
if (clist->htimer)
|
||||
{
|
||||
gtk_timeout_remove (clist->htimer);
|
||||
g_source_remove (clist->htimer);
|
||||
clist->htimer = 0;
|
||||
}
|
||||
|
||||
if (clist->vtimer)
|
||||
{
|
||||
gtk_timeout_remove (clist->vtimer);
|
||||
g_source_remove (clist->vtimer);
|
||||
clist->vtimer = 0;
|
||||
}
|
||||
}
|
||||
|
10
gtk/gtkdnd.c
10
gtk/gtkdnd.c
@ -2749,7 +2749,7 @@ gtk_drag_drop_finished (GtkDragSourceInfo *info,
|
||||
* to respond really late, we still are OK.
|
||||
*/
|
||||
gtk_drag_clear_source_info (info->context);
|
||||
gtk_timeout_add (ANIM_STEP_TIME, gtk_drag_anim_timeout, anim);
|
||||
g_timeout_add (ANIM_STEP_TIME, gtk_drag_anim_timeout, anim);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2823,9 +2823,9 @@ gtk_drag_drop (GtkDragSourceInfo *info,
|
||||
gtk_widget_hide (info->icon_window);
|
||||
|
||||
gdk_drag_drop (info->context, time);
|
||||
info->drop_timeout = gtk_timeout_add (DROP_ABORT_TIME,
|
||||
gtk_drag_abort_timeout,
|
||||
info);
|
||||
info->drop_timeout = g_timeout_add (DROP_ABORT_TIME,
|
||||
gtk_drag_abort_timeout,
|
||||
info);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3101,7 +3101,7 @@ gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
|
||||
g_object_unref (info->context);
|
||||
|
||||
if (info->drop_timeout)
|
||||
gtk_timeout_remove (info->drop_timeout);
|
||||
g_source_remove (info->drop_timeout);
|
||||
|
||||
g_free (info);
|
||||
}
|
||||
|
@ -4307,16 +4307,16 @@ blink_cb (gpointer data)
|
||||
if (entry->cursor_visible)
|
||||
{
|
||||
hide_cursor (entry);
|
||||
entry->blink_timeout = gtk_timeout_add (get_cursor_time (entry) * CURSOR_OFF_MULTIPLIER,
|
||||
blink_cb,
|
||||
entry);
|
||||
entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_OFF_MULTIPLIER,
|
||||
blink_cb,
|
||||
entry);
|
||||
}
|
||||
else
|
||||
{
|
||||
show_cursor (entry);
|
||||
entry->blink_timeout = gtk_timeout_add (get_cursor_time (entry) * CURSOR_ON_MULTIPLIER,
|
||||
blink_cb,
|
||||
entry);
|
||||
entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_ON_MULTIPLIER,
|
||||
blink_cb,
|
||||
entry);
|
||||
}
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
@ -4332,9 +4332,9 @@ gtk_entry_check_cursor_blink (GtkEntry *entry)
|
||||
{
|
||||
if (!entry->blink_timeout)
|
||||
{
|
||||
entry->blink_timeout = gtk_timeout_add (get_cursor_time (entry) * CURSOR_ON_MULTIPLIER,
|
||||
blink_cb,
|
||||
entry);
|
||||
entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_ON_MULTIPLIER,
|
||||
blink_cb,
|
||||
entry);
|
||||
show_cursor (entry);
|
||||
}
|
||||
}
|
||||
@ -4342,7 +4342,7 @@ gtk_entry_check_cursor_blink (GtkEntry *entry)
|
||||
{
|
||||
if (entry->blink_timeout)
|
||||
{
|
||||
gtk_timeout_remove (entry->blink_timeout);
|
||||
g_source_remove (entry->blink_timeout);
|
||||
entry->blink_timeout = 0;
|
||||
}
|
||||
|
||||
@ -4357,11 +4357,11 @@ gtk_entry_pend_cursor_blink (GtkEntry *entry)
|
||||
if (cursor_blinks (entry))
|
||||
{
|
||||
if (entry->blink_timeout != 0)
|
||||
gtk_timeout_remove (entry->blink_timeout);
|
||||
g_source_remove (entry->blink_timeout);
|
||||
|
||||
entry->blink_timeout = gtk_timeout_add (get_cursor_time (entry) * CURSOR_PEND_MULTIPLIER,
|
||||
blink_cb,
|
||||
entry);
|
||||
entry->blink_timeout = g_timeout_add (get_cursor_time (entry) * CURSOR_PEND_MULTIPLIER,
|
||||
blink_cb,
|
||||
entry);
|
||||
show_cursor (entry);
|
||||
}
|
||||
}
|
||||
|
@ -552,7 +552,7 @@ gtk_list_motion_notify (GtkWidget *widget,
|
||||
{
|
||||
if (list->htimer == 0)
|
||||
{
|
||||
list->htimer = gtk_timeout_add
|
||||
list->htimer = g_timeout_add
|
||||
(SCROLL_TIME, (GtkFunction) gtk_list_horizontal_timeout, widget);
|
||||
|
||||
if (!((x < adj->value && adj->value <= 0) ||
|
||||
@ -600,9 +600,9 @@ gtk_list_motion_notify (GtkWidget *widget,
|
||||
|
||||
if (!((y < 0 && focus_row == 0) ||
|
||||
(y > widget->allocation.height && focus_row >= length - 1)))
|
||||
list->vtimer = gtk_timeout_add (SCROLL_TIME,
|
||||
(GtkFunction) gtk_list_vertical_timeout,
|
||||
list);
|
||||
list->vtimer = g_timeout_add (SCROLL_TIME,
|
||||
(GtkFunction) gtk_list_vertical_timeout,
|
||||
list);
|
||||
|
||||
if (row != focus_row)
|
||||
gtk_widget_grab_focus (item);
|
||||
@ -1591,12 +1591,12 @@ gtk_list_end_drag_selection (GtkList *list)
|
||||
|
||||
if (list->htimer)
|
||||
{
|
||||
gtk_timeout_remove (list->htimer);
|
||||
g_source_remove (list->htimer);
|
||||
list->htimer = 0;
|
||||
}
|
||||
if (list->vtimer)
|
||||
{
|
||||
gtk_timeout_remove (list->vtimer);
|
||||
g_source_remove (list->vtimer);
|
||||
list->vtimer = 0;
|
||||
}
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ guint gtk_quit_add_full (guint main_level,
|
||||
GtkDestroyNotify destroy);
|
||||
void gtk_quit_remove (guint quit_handler_id);
|
||||
void gtk_quit_remove_by_data (gpointer data);
|
||||
#if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
guint gtk_timeout_add (guint32 interval,
|
||||
GtkFunction function,
|
||||
gpointer data);
|
||||
@ -188,7 +188,7 @@ guint gtk_input_add_full (gint source,
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy);
|
||||
void gtk_input_remove (guint input_handler_id);
|
||||
#endif /* !GTK_DISABLE_DEPRECATED || GTK_COMPILATION */
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
|
||||
guint gtk_key_snooper_install (GtkKeySnoopFunc snooper,
|
||||
gpointer func_data);
|
||||
|
@ -2407,7 +2407,7 @@ gtk_menu_stop_navigating_submenu (GtkMenu *menu)
|
||||
|
||||
if (menu->navigation_timeout)
|
||||
{
|
||||
gtk_timeout_remove (menu->navigation_timeout);
|
||||
g_source_remove (menu->navigation_timeout);
|
||||
menu->navigation_timeout = 0;
|
||||
}
|
||||
}
|
||||
@ -2618,8 +2618,8 @@ gtk_menu_set_submenu_navigation_region (GtkMenu *menu,
|
||||
"gtk-menu-popdown-delay", &popdown_delay,
|
||||
NULL);
|
||||
|
||||
menu->navigation_timeout = gtk_timeout_add (popdown_delay,
|
||||
gtk_menu_stop_navigating_submenu_cb, menu);
|
||||
menu->navigation_timeout = g_timeout_add (popdown_delay,
|
||||
gtk_menu_stop_navigating_submenu_cb, menu);
|
||||
|
||||
#ifdef DRAW_STAY_UP_TRIANGLE
|
||||
draw_stay_up_triangle (gdk_get_default_root_window(),
|
||||
|
@ -744,7 +744,7 @@ gtk_real_menu_item_select (GtkItem *item)
|
||||
gint popup_delay;
|
||||
|
||||
if (menu_item->timer)
|
||||
gtk_timeout_remove (menu_item->timer);
|
||||
g_source_remove (menu_item->timer);
|
||||
|
||||
popup_delay = get_popup_delay (menu_item);
|
||||
|
||||
@ -752,9 +752,9 @@ gtk_real_menu_item_select (GtkItem *item)
|
||||
{
|
||||
GdkEvent *event = gtk_get_current_event ();
|
||||
|
||||
menu_item->timer = gtk_timeout_add (popup_delay,
|
||||
gtk_menu_item_select_timeout,
|
||||
menu_item);
|
||||
menu_item->timer = g_timeout_add (popup_delay,
|
||||
gtk_menu_item_select_timeout,
|
||||
menu_item);
|
||||
if (event &&
|
||||
event->type != GDK_BUTTON_PRESS &&
|
||||
event->type != GDK_ENTER_NOTIFY)
|
||||
@ -786,7 +786,7 @@ gtk_real_menu_item_deselect (GtkItem *item)
|
||||
{
|
||||
if (menu_item->timer)
|
||||
{
|
||||
gtk_timeout_remove (menu_item->timer);
|
||||
g_source_remove (menu_item->timer);
|
||||
menu_item->timer = 0;
|
||||
}
|
||||
else
|
||||
@ -898,7 +898,7 @@ gtk_menu_item_popup_submenu (gpointer data)
|
||||
menu_item = GTK_MENU_ITEM (widget);
|
||||
|
||||
if (menu_item->timer)
|
||||
gtk_timeout_remove (menu_item->timer);
|
||||
g_source_remove (menu_item->timer);
|
||||
menu_item->timer = 0;
|
||||
|
||||
if (GTK_WIDGET_IS_SENSITIVE (menu_item->submenu))
|
||||
|
@ -573,6 +573,15 @@ gtk_notebook_class_init (GtkNotebookClass *class)
|
||||
"change_current_page", 1,
|
||||
G_TYPE_INT, 1);
|
||||
|
||||
gtk_binding_entry_add_signal (binding_set,
|
||||
GDK_Page_Up, GDK_CONTROL_MASK|GDK_MOD1_MASK,
|
||||
"change_current_page", 1,
|
||||
G_TYPE_INT, -1);
|
||||
gtk_binding_entry_add_signal (binding_set,
|
||||
GDK_Page_Down, GDK_CONTROL_MASK|GDK_MOD1_MASK,
|
||||
"change_current_page", 1,
|
||||
G_TYPE_INT, 1);
|
||||
|
||||
add_arrow_bindings (binding_set, GDK_Up, GTK_DIR_UP);
|
||||
add_arrow_bindings (binding_set, GDK_Down, GTK_DIR_DOWN);
|
||||
add_arrow_bindings (binding_set, GDK_Left, GTK_DIR_LEFT);
|
||||
@ -1537,9 +1546,9 @@ gtk_notebook_arrow_button_press (GtkNotebook *notebook,
|
||||
|
||||
if (!notebook->timer)
|
||||
{
|
||||
notebook->timer = gtk_timeout_add
|
||||
(NOTEBOOK_INIT_SCROLL_DELAY,
|
||||
(GtkFunction) gtk_notebook_timer, (gpointer) notebook);
|
||||
notebook->timer = g_timeout_add (NOTEBOOK_INIT_SCROLL_DELAY,
|
||||
(GtkFunction) gtk_notebook_timer,
|
||||
(gpointer) notebook);
|
||||
notebook->need_timer = TRUE;
|
||||
}
|
||||
}
|
||||
@ -1675,7 +1684,7 @@ gtk_notebook_button_release (GtkWidget *widget,
|
||||
|
||||
if (notebook->timer)
|
||||
{
|
||||
gtk_timeout_remove (notebook->timer);
|
||||
g_source_remove (notebook->timer);
|
||||
notebook->timer = 0;
|
||||
notebook->need_timer = FALSE;
|
||||
}
|
||||
@ -2312,9 +2321,9 @@ gtk_notebook_timer (GtkNotebook *notebook)
|
||||
if (notebook->need_timer)
|
||||
{
|
||||
notebook->need_timer = FALSE;
|
||||
notebook->timer = gtk_timeout_add (NOTEBOOK_SCROLL_DELAY,
|
||||
(GtkFunction) gtk_notebook_timer,
|
||||
(gpointer) notebook);
|
||||
notebook->timer = g_timeout_add (NOTEBOOK_SCROLL_DELAY,
|
||||
(GtkFunction) gtk_notebook_timer,
|
||||
(gpointer) notebook);
|
||||
}
|
||||
else
|
||||
retval = TRUE;
|
||||
|
@ -744,7 +744,7 @@ gtk_selection_convert (GtkWidget *widget,
|
||||
|
||||
current_retrievals = g_list_append (current_retrievals, info);
|
||||
gdk_selection_convert (widget->window, selection, target, time);
|
||||
gtk_timeout_add (1000, (GtkFunction) gtk_selection_retrieval_timeout, info);
|
||||
g_timeout_add (1000, (GtkFunction) gtk_selection_retrieval_timeout, info);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -1249,7 +1249,7 @@ _gtk_selection_request (GtkWidget *widget,
|
||||
gdk_window_get_events (info->requestor) |
|
||||
GDK_PROPERTY_CHANGE_MASK);
|
||||
current_incrs = g_list_append (current_incrs, info);
|
||||
gtk_timeout_add (1000, (GtkFunction)gtk_selection_incr_timeout, info);
|
||||
g_timeout_add (1000, (GtkFunction)gtk_selection_incr_timeout, info);
|
||||
}
|
||||
|
||||
/* If it was a MULTIPLE request, set the property to indicate which
|
||||
|
@ -996,7 +996,7 @@ gtk_spin_button_stop_spinning (GtkSpinButton *spin)
|
||||
{
|
||||
if (spin->timer)
|
||||
{
|
||||
gtk_timeout_remove (spin->timer);
|
||||
g_source_remove (spin->timer);
|
||||
spin->timer = 0;
|
||||
spin->timer_calls = 0;
|
||||
spin->need_timer = FALSE;
|
||||
@ -1022,8 +1022,9 @@ start_spinning (GtkSpinButton *spin,
|
||||
{
|
||||
spin->timer_step = step;
|
||||
spin->need_timer = TRUE;
|
||||
spin->timer = gtk_timeout_add (SPIN_BUTTON_INITIAL_TIMER_DELAY,
|
||||
(GtkFunction) gtk_spin_button_timer, (gpointer) spin);
|
||||
spin->timer = g_timeout_add (SPIN_BUTTON_INITIAL_TIMER_DELAY,
|
||||
(GtkFunction) gtk_spin_button_timer,
|
||||
(gpointer) spin);
|
||||
}
|
||||
|
||||
spin_button_redraw (spin);
|
||||
@ -1175,9 +1176,9 @@ gtk_spin_button_timer (GtkSpinButton *spin_button)
|
||||
if (spin_button->need_timer)
|
||||
{
|
||||
spin_button->need_timer = FALSE;
|
||||
spin_button->timer = gtk_timeout_add
|
||||
(SPIN_BUTTON_TIMER_DELAY, (GtkFunction) gtk_spin_button_timer,
|
||||
(gpointer) spin_button);
|
||||
spin_button->timer = g_timeout_add (SPIN_BUTTON_TIMER_DELAY,
|
||||
(GtkFunction) gtk_spin_button_timer,
|
||||
(gpointer) spin_button);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1255,7 +1255,7 @@ gtk_text_destroy (GtkObject *object)
|
||||
|
||||
if (text->timer)
|
||||
{
|
||||
gtk_timeout_remove (text->timer);
|
||||
g_source_remove (text->timer);
|
||||
text->timer = 0;
|
||||
}
|
||||
|
||||
@ -1795,7 +1795,7 @@ gtk_text_button_release (GtkWidget *widget,
|
||||
|
||||
if (text->timer)
|
||||
{
|
||||
gtk_timeout_remove (text->timer);
|
||||
g_source_remove (text->timer);
|
||||
text->timer = 0;
|
||||
}
|
||||
|
||||
@ -1873,9 +1873,9 @@ gtk_text_motion_notify (GtkWidget *widget,
|
||||
{
|
||||
if (text->timer == 0)
|
||||
{
|
||||
text->timer = gtk_timeout_add (SCROLL_TIME,
|
||||
gtk_text_scroll_timeout,
|
||||
text);
|
||||
text->timer = g_timeout_add (SCROLL_TIME,
|
||||
gtk_text_scroll_timeout,
|
||||
text);
|
||||
|
||||
if (y < 0)
|
||||
scroll_int (text, y/2);
|
||||
|
@ -4331,13 +4331,13 @@ blink_cb (gpointer data)
|
||||
visible = gtk_text_layout_get_cursor_visible (text_view->layout);
|
||||
|
||||
if (visible)
|
||||
text_view->blink_timeout = gtk_timeout_add (get_cursor_time (text_view) * CURSOR_OFF_MULTIPLIER,
|
||||
blink_cb,
|
||||
text_view);
|
||||
text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_OFF_MULTIPLIER,
|
||||
blink_cb,
|
||||
text_view);
|
||||
else
|
||||
text_view->blink_timeout = gtk_timeout_add (get_cursor_time (text_view) * CURSOR_ON_MULTIPLIER,
|
||||
blink_cb,
|
||||
text_view);
|
||||
text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_ON_MULTIPLIER,
|
||||
blink_cb,
|
||||
text_view);
|
||||
|
||||
gtk_text_layout_set_cursor_visible (text_view->layout,
|
||||
!visible);
|
||||
@ -4354,7 +4354,7 @@ gtk_text_view_stop_cursor_blink (GtkTextView *text_view)
|
||||
{
|
||||
if (text_view->blink_timeout)
|
||||
{
|
||||
gtk_timeout_remove (text_view->blink_timeout);
|
||||
g_source_remove (text_view->blink_timeout);
|
||||
text_view->blink_timeout = 0;
|
||||
}
|
||||
}
|
||||
@ -4372,9 +4372,9 @@ gtk_text_view_check_cursor_blink (GtkTextView *text_view)
|
||||
{
|
||||
gtk_text_layout_set_cursor_visible (text_view->layout, TRUE);
|
||||
|
||||
text_view->blink_timeout = gtk_timeout_add (get_cursor_time (text_view) * CURSOR_OFF_MULTIPLIER,
|
||||
blink_cb,
|
||||
text_view);
|
||||
text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_OFF_MULTIPLIER,
|
||||
blink_cb,
|
||||
text_view);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -4396,15 +4396,15 @@ gtk_text_view_pend_cursor_blink(GtkTextView *text_view)
|
||||
{
|
||||
if (text_view->blink_timeout != 0)
|
||||
{
|
||||
gtk_timeout_remove (text_view->blink_timeout);
|
||||
g_source_remove (text_view->blink_timeout);
|
||||
text_view->blink_timeout = 0;
|
||||
}
|
||||
|
||||
gtk_text_layout_set_cursor_visible (text_view->layout, TRUE);
|
||||
|
||||
text_view->blink_timeout = gtk_timeout_add (get_cursor_time (text_view) * CURSOR_PEND_MULTIPLIER,
|
||||
blink_cb,
|
||||
text_view);
|
||||
text_view->blink_timeout = g_timeout_add (get_cursor_time (text_view) * CURSOR_PEND_MULTIPLIER,
|
||||
blink_cb,
|
||||
text_view);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5244,10 +5244,10 @@ selection_motion_event_handler (GtkTextView *text_view, GdkEventMotion *event, g
|
||||
* and we'll need to scroll again.
|
||||
*/
|
||||
if (text_view->scroll_timeout != 0) /* reset on every motion event */
|
||||
gtk_timeout_remove (text_view->scroll_timeout);
|
||||
g_source_remove (text_view->scroll_timeout);
|
||||
|
||||
text_view->scroll_timeout =
|
||||
gtk_timeout_add (50, selection_scan_timeout, text_view);
|
||||
g_timeout_add (50, selection_scan_timeout, text_view);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -5313,7 +5313,7 @@ gtk_text_view_end_selection_drag (GtkTextView *text_view, GdkEventButton *event)
|
||||
|
||||
if (text_view->scroll_timeout != 0)
|
||||
{
|
||||
gtk_timeout_remove (text_view->scroll_timeout);
|
||||
g_source_remove (text_view->scroll_timeout);
|
||||
text_view->scroll_timeout = 0;
|
||||
}
|
||||
|
||||
@ -5649,7 +5649,7 @@ gtk_text_view_drag_leave (GtkWidget *widget,
|
||||
gtk_text_mark_set_visible (text_view->dnd_mark, FALSE);
|
||||
|
||||
if (text_view->scroll_timeout != 0)
|
||||
gtk_timeout_remove (text_view->scroll_timeout);
|
||||
g_source_remove (text_view->scroll_timeout);
|
||||
|
||||
text_view->scroll_timeout = 0;
|
||||
}
|
||||
@ -5748,10 +5748,10 @@ gtk_text_view_drag_motion (GtkWidget *widget,
|
||||
DND_SCROLL_MARGIN, FALSE, 0.0, 0.0);
|
||||
|
||||
if (text_view->scroll_timeout != 0) /* reset on every motion event */
|
||||
gtk_timeout_remove (text_view->scroll_timeout);
|
||||
g_source_remove (text_view->scroll_timeout);
|
||||
|
||||
text_view->scroll_timeout =
|
||||
gtk_timeout_add (50, drag_scan_timeout, text_view);
|
||||
g_timeout_add (50, drag_scan_timeout, text_view);
|
||||
|
||||
/* TRUE return means don't propagate the drag motion to parent
|
||||
* widgets that may also be drop sites.
|
||||
@ -5773,7 +5773,7 @@ gtk_text_view_drag_drop (GtkWidget *widget,
|
||||
text_view = GTK_TEXT_VIEW (widget);
|
||||
|
||||
if (text_view->scroll_timeout != 0)
|
||||
gtk_timeout_remove (text_view->scroll_timeout);
|
||||
g_source_remove (text_view->scroll_timeout);
|
||||
|
||||
text_view->scroll_timeout = 0;
|
||||
|
||||
|
@ -189,7 +189,7 @@ gtk_tooltips_destroy (GtkObject *object)
|
||||
|
||||
if (tooltips->timer_tag)
|
||||
{
|
||||
gtk_timeout_remove (tooltips->timer_tag);
|
||||
g_source_remove (tooltips->timer_tag);
|
||||
tooltips->timer_tag = 0;
|
||||
}
|
||||
|
||||
@ -478,7 +478,7 @@ gtk_tooltips_set_active_widget (GtkTooltips *tooltips,
|
||||
}
|
||||
if (tooltips->timer_tag)
|
||||
{
|
||||
gtk_timeout_remove (tooltips->timer_tag);
|
||||
g_source_remove (tooltips->timer_tag);
|
||||
tooltips->timer_tag = 0;
|
||||
}
|
||||
|
||||
@ -607,9 +607,9 @@ gtk_tooltips_start_delay (GtkTooltips *tooltips,
|
||||
delay = STICKY_DELAY;
|
||||
else
|
||||
delay = tooltips->delay;
|
||||
tooltips->timer_tag = gtk_timeout_add (delay,
|
||||
gtk_tooltips_timeout,
|
||||
(gpointer) tooltips);
|
||||
tooltips->timer_tag = g_timeout_add (delay,
|
||||
gtk_tooltips_timeout,
|
||||
(gpointer) tooltips);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1370,37 +1370,37 @@ gtk_tree_view_unrealize (GtkWidget *widget)
|
||||
|
||||
if (tree_view->priv->scroll_timeout != 0)
|
||||
{
|
||||
gtk_timeout_remove (tree_view->priv->scroll_timeout);
|
||||
g_source_remove (tree_view->priv->scroll_timeout);
|
||||
tree_view->priv->scroll_timeout = 0;
|
||||
}
|
||||
|
||||
if (tree_view->priv->open_dest_timeout != 0)
|
||||
{
|
||||
gtk_timeout_remove (tree_view->priv->open_dest_timeout);
|
||||
g_source_remove (tree_view->priv->open_dest_timeout);
|
||||
tree_view->priv->open_dest_timeout = 0;
|
||||
}
|
||||
|
||||
if (tree_view->priv->expand_collapse_timeout != 0)
|
||||
{
|
||||
gtk_timeout_remove (tree_view->priv->expand_collapse_timeout);
|
||||
g_source_remove (tree_view->priv->expand_collapse_timeout);
|
||||
tree_view->priv->expand_collapse_timeout = 0;
|
||||
}
|
||||
|
||||
if (tree_view->priv->presize_handler_timer != 0)
|
||||
{
|
||||
gtk_timeout_remove (tree_view->priv->presize_handler_timer);
|
||||
g_source_remove (tree_view->priv->presize_handler_timer);
|
||||
tree_view->priv->presize_handler_timer = 0;
|
||||
}
|
||||
|
||||
if (tree_view->priv->validate_rows_timer != 0)
|
||||
{
|
||||
gtk_timeout_remove (tree_view->priv->validate_rows_timer);
|
||||
g_source_remove (tree_view->priv->validate_rows_timer);
|
||||
tree_view->priv->validate_rows_timer = 0;
|
||||
}
|
||||
|
||||
if (tree_view->priv->scroll_sync_timer != 0)
|
||||
{
|
||||
gtk_timeout_remove (tree_view->priv->scroll_sync_timer);
|
||||
g_source_remove (tree_view->priv->scroll_sync_timer);
|
||||
tree_view->priv->scroll_sync_timer = 0;
|
||||
}
|
||||
|
||||
@ -4717,7 +4717,7 @@ remove_scroll_timeout (GtkTreeView *tree_view)
|
||||
{
|
||||
if (tree_view->priv->scroll_timeout != 0)
|
||||
{
|
||||
gtk_timeout_remove (tree_view->priv->scroll_timeout);
|
||||
g_source_remove (tree_view->priv->scroll_timeout);
|
||||
tree_view->priv->scroll_timeout = 0;
|
||||
}
|
||||
}
|
||||
@ -4750,7 +4750,7 @@ remove_open_timeout (GtkTreeView *tree_view)
|
||||
{
|
||||
if (tree_view->priv->open_dest_timeout != 0)
|
||||
{
|
||||
gtk_timeout_remove (tree_view->priv->open_dest_timeout);
|
||||
g_source_remove (tree_view->priv->open_dest_timeout);
|
||||
tree_view->priv->open_dest_timeout = 0;
|
||||
}
|
||||
}
|
||||
@ -5212,12 +5212,12 @@ gtk_tree_view_drag_motion (GtkWidget *widget,
|
||||
pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE))
|
||||
{
|
||||
tree_view->priv->open_dest_timeout =
|
||||
gtk_timeout_add (500, open_row_timeout, tree_view);
|
||||
g_timeout_add (500, open_row_timeout, tree_view);
|
||||
}
|
||||
else if (tree_view->priv->scroll_timeout == 0)
|
||||
{
|
||||
tree_view->priv->scroll_timeout =
|
||||
gtk_timeout_add (150, scroll_row_timeout, tree_view);
|
||||
g_timeout_add (150, scroll_row_timeout, tree_view);
|
||||
}
|
||||
|
||||
if (target == gdk_atom_intern ("GTK_TREE_MODEL_ROW", FALSE))
|
||||
@ -6250,7 +6250,7 @@ gtk_tree_view_row_deleted (GtkTreeModel *model,
|
||||
/* If we have a node expanded/collapsed timeout, remove it */
|
||||
if (tree_view->priv->expand_collapse_timeout != 0)
|
||||
{
|
||||
gtk_timeout_remove (tree_view->priv->expand_collapse_timeout);
|
||||
g_source_remove (tree_view->priv->expand_collapse_timeout);
|
||||
tree_view->priv->expand_collapse_timeout = 0;
|
||||
|
||||
/* Reset node */
|
||||
@ -9175,7 +9175,7 @@ gtk_tree_view_real_expand_row (GtkTreeView *tree_view,
|
||||
|
||||
if (tree_view->priv->expand_collapse_timeout)
|
||||
{
|
||||
gtk_timeout_remove (tree_view->priv->expand_collapse_timeout);
|
||||
g_source_remove (tree_view->priv->expand_collapse_timeout);
|
||||
tree_view->priv->expand_collapse_timeout = 0;
|
||||
}
|
||||
|
||||
@ -9189,7 +9189,7 @@ gtk_tree_view_real_expand_row (GtkTreeView *tree_view,
|
||||
|
||||
if (animate)
|
||||
{
|
||||
tree_view->priv->expand_collapse_timeout = gtk_timeout_add (50, expand_collapse_timeout, tree_view);
|
||||
tree_view->priv->expand_collapse_timeout = g_timeout_add (50, expand_collapse_timeout, tree_view);
|
||||
tree_view->priv->expanded_collapsed_node = node;
|
||||
tree_view->priv->expanded_collapsed_tree = tree;
|
||||
|
||||
@ -9364,7 +9364,7 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
|
||||
|
||||
if (tree_view->priv->expand_collapse_timeout)
|
||||
{
|
||||
gtk_timeout_remove (tree_view->priv->expand_collapse_timeout);
|
||||
g_source_remove (tree_view->priv->expand_collapse_timeout);
|
||||
tree_view->priv->expand_collapse_timeout = 0;
|
||||
}
|
||||
|
||||
@ -9378,7 +9378,7 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
|
||||
|
||||
if (animate)
|
||||
{
|
||||
tree_view->priv->expand_collapse_timeout = gtk_timeout_add (50, expand_collapse_timeout, tree_view);
|
||||
tree_view->priv->expand_collapse_timeout = g_timeout_add (50, expand_collapse_timeout, tree_view);
|
||||
tree_view->priv->expanded_collapsed_node = node;
|
||||
tree_view->priv->expanded_collapsed_tree = tree;
|
||||
|
||||
|
@ -1217,7 +1217,7 @@ handle_keys_changed (gpointer data)
|
||||
|
||||
if (window->keys_changed_handler)
|
||||
{
|
||||
gtk_idle_remove (window->keys_changed_handler);
|
||||
g_source_remove (window->keys_changed_handler);
|
||||
window->keys_changed_handler = 0;
|
||||
}
|
||||
|
||||
@ -1231,7 +1231,7 @@ static void
|
||||
gtk_window_notify_keys_changed (GtkWindow *window)
|
||||
{
|
||||
if (!window->keys_changed_handler)
|
||||
window->keys_changed_handler = gtk_idle_add (handle_keys_changed, window);
|
||||
window->keys_changed_handler = g_idle_add (handle_keys_changed, window);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3445,7 +3445,7 @@ gtk_window_finalize (GObject *object)
|
||||
|
||||
if (window->keys_changed_handler)
|
||||
{
|
||||
gtk_idle_remove (window->keys_changed_handler);
|
||||
g_source_remove (window->keys_changed_handler);
|
||||
window->keys_changed_handler = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user