[gedit/wip/timeout-scroll] tab: timeout after idle
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/timeout-scroll] tab: timeout after idle
- Date: Mon, 25 Jul 2022 20:12:43 +0000 (UTC)
commit 7d58463703cae70812d441c97e7693d97ce11445
Author: Sébastien Wilmet <swilmet informatique-libre be>
Date: Mon Jul 25 22:08:49 2022 +0200
tab: timeout after idle
gedit/gedit-tab.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 4896f92bf..5f9d1fba4 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -1036,7 +1036,7 @@ should_show_progress_info (GTimer **timer,
}
static gboolean
-scroll_to_cursor (GeditTab *tab)
+scroll_timeout_cb (GeditTab *tab)
{
//GeditView *view;
@@ -1054,6 +1054,11 @@ scroll_idle_cb (GeditTab *tab)
{
g_message ("%s()", G_STRFUNC);
+ if (tab->scroll_timeout == 0)
+ {
+ tab->scroll_timeout = g_timeout_add (250, (GSourceFunc)scroll_timeout_cb, tab);
+ }
+
tab->scroll_idle = 0;
return G_SOURCE_REMOVE;
}
@@ -1703,10 +1708,6 @@ goto_line (GTask *loading_task)
* an idle as after the document is loaded the textview is still
* redrawing and relocating its internals.
*/
- if (data->tab->scroll_timeout == 0)
- {
- data->tab->scroll_timeout = g_timeout_add (250, (GSourceFunc)scroll_to_cursor, data->tab);
- }
if (data->tab->scroll_idle == 0)
{
data->tab->scroll_idle = g_idle_add ((GSourceFunc)scroll_idle_cb, data->tab);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]