summaryrefslogtreecommitdiff
path: root/mate-dictionary/libgdict
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-03-03 12:37:29 +0300
committermonsta <[email protected]>2016-03-03 12:37:29 +0300
commit21e988a811f0db61fb77a02be9b901dc031963e5 (patch)
tree5aa3f0caf64613131ae5d6660968e0723e22015b /mate-dictionary/libgdict
parent78a1b75ac35d045d8cfd7bc71dce0322ac8f8ff2 (diff)
downloadmate-utils-21e988a811f0db61fb77a02be9b901dc031963e5.tar.bz2
mate-utils-21e988a811f0db61fb77a02be9b901dc031963e5.tar.xz
use g_timeout_add_seconds for multi-second timeouts
from https://git.gnome.org/browse/gnome-dictionary/commit/?id=597ff92a28f42ed187adc9727d91cef2e226a383
Diffstat (limited to 'mate-dictionary/libgdict')
-rw-r--r--mate-dictionary/libgdict/gdict-client-context.c8
-rw-r--r--mate-dictionary/libgdict/gdict-defbox.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/mate-dictionary/libgdict/gdict-client-context.c b/mate-dictionary/libgdict/gdict-client-context.c
index 65e72a23..118a0d91 100644
--- a/mate-dictionary/libgdict/gdict-client-context.c
+++ b/mate-dictionary/libgdict/gdict-client-context.c
@@ -136,7 +136,7 @@ typedef struct
#define HOSTNAME_LOOKUP_EXPIRE 300
/* wait 30 seconds between connection and receiving data on the line */
-#define CONNECTION_TIMEOUT 30
+#define CONNECTION_TIMEOUT_SEC 30
enum
{
@@ -1990,9 +1990,9 @@ gdict_client_context_connect (GdictClientContext *context,
return FALSE;
}
- priv->timeout_id = g_timeout_add (CONNECTION_TIMEOUT * 1000,
- check_for_connection,
- context);
+ priv->timeout_id = g_timeout_add_seconds (CONNECTION_TIMEOUT_SEC,
+ check_for_connection,
+ context);
/* XXX - remember that g_io_add_watch() increases the reference count
* of the GIOChannel we are using.
diff --git a/mate-dictionary/libgdict/gdict-defbox.c b/mate-dictionary/libgdict/gdict-defbox.c
index 14972698..c71c6921 100644
--- a/mate-dictionary/libgdict/gdict-defbox.c
+++ b/mate-dictionary/libgdict/gdict-defbox.c
@@ -1145,7 +1145,7 @@ find_prev_clicked_cb (GtkWidget *widget,
if (priv->hide_timeout)
{
g_source_remove (priv->hide_timeout);
- priv->hide_timeout = g_timeout_add (5000, hide_find_pane, defbox);
+ priv->hide_timeout = g_timeout_add_seconds (5, hide_find_pane, defbox);
}
}
@@ -1239,7 +1239,7 @@ find_next_clicked_cb (GtkWidget *widget,
if (priv->hide_timeout)
{
g_source_remove (priv->hide_timeout);
- priv->hide_timeout = g_timeout_add (5000, hide_find_pane, defbox);
+ priv->hide_timeout = g_timeout_add_seconds (5, hide_find_pane, defbox);
}
}
@@ -1275,7 +1275,7 @@ find_entry_changed_cb (GtkWidget *widget,
if (priv->hide_timeout)
{
g_source_remove (priv->hide_timeout);
- priv->hide_timeout = g_timeout_add (5000, hide_find_pane, defbox);
+ priv->hide_timeout = g_timeout_add_seconds (5, hide_find_pane, defbox);
}
}
@@ -1755,7 +1755,7 @@ gdict_defbox_real_show_find (GdictDefbox *defbox)
gtk_widget_grab_focus (defbox->priv->find_entry);
- defbox->priv->hide_timeout = g_timeout_add (5000, hide_find_pane, defbox);
+ defbox->priv->hide_timeout = g_timeout_add_seconds (5, hide_find_pane, defbox);
}
static void
@@ -2128,7 +2128,7 @@ gdict_defbox_set_show_find (GdictDefbox *defbox,
gtk_widget_grab_focus (priv->find_entry);
if (!priv->hide_timeout)
- priv->hide_timeout = g_timeout_add (5000, hide_find_pane, defbox);
+ priv->hide_timeout = g_timeout_add_seconds (5, hide_find_pane, defbox);
}
else
{