summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-12 11:25:27 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-12 11:25:27 +0000
commit03f0d32dee2e717ac3cf1fa1ca1563110403934e (patch)
tree4ba8c706f5f4c4a74bb35187c757bdb73c1c1b67
parent42eddac0e9f0216175fef223fd9b1023ed502a6e (diff)
introduce a 0.35 second sleep between acknowledgement of an interactive action and requesting a full update. Transmission seems to have a small lag before a pause takes effect.
-rw-r--r--aclocal.m446
-rw-r--r--src/Makefile.am2
-rw-r--r--src/trg-main-window.c9
3 files changed, 10 insertions, 47 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 9de218d..aecd922 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -19,51 +19,6 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
-dnl AM_GCONF_SOURCE_2
-dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
-dnl (i.e. pass to gconftool-2
-dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
-dnl you should install foo.schemas files
-dnl
-
-AC_DEFUN([AM_GCONF_SOURCE_2],
-[
- if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
- GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
- else
- GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
- fi
-
- AC_ARG_WITH([gconf-source],
- AC_HELP_STRING([--with-gconf-source=sourceaddress],
- [Config database for installing schema files.]),
- [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
-
- AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
- AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
-
- if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
- GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
- fi
-
- AC_ARG_WITH([gconf-schema-file-dir],
- AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
- [Directory for installing schema files.]),
- [GCONF_SCHEMA_FILE_DIR="$withval"],)
-
- AC_SUBST(GCONF_SCHEMA_FILE_DIR)
- AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
-
- AC_ARG_ENABLE(schemas-install,
- AC_HELP_STRING([--disable-schemas-install],
- [Disable the schemas installation]),
- [case ${enableval} in
- yes|no) ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
- esac])
- AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
-])
-
# nls.m4 serial 5 (gettext-0.18)
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
dnl Inc.
@@ -1089,6 +1044,7 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+m4_include([m4/gconf-2.m4])
m4_include([m4/intltool.m4])
m4_include([m4/libcurl.m4])
m4_include([m4/libtool.m4])
diff --git a/src/Makefile.am b/src/Makefile.am
index aef0496..ecb6b3b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,7 +23,7 @@ schemadir = @GCONF_SCHEMA_FILE_DIR@
schema_DATA = transmission-remote-gtk.schemas
bin_PROGRAMS = transmission-remote-gtk
-INCLUDES = --pedantic -Wall -I.. -O2 -DTRGLICENSE=\""$(trglicense)"\" -DTRGLOCALEDIR=\""$(trglocaledir)"\" $(jsonglib_CFLAGS) $(gthread_CFLAGS) $(gtk_CFLAGS) $(gconf_CFLAGS) $(gio_CFLAGS) $(unique_CFLAGS) $(notify_CFLAGS) -std=c99
+INCLUDES = --pedantic -Wall -I.. -O2 -DTRGLICENSE=\""$(trglicense)"\" -DTRGLOCALEDIR=\""$(trglocaledir)"\" $(jsonglib_CFLAGS) $(gthread_CFLAGS) $(gtk_CFLAGS) $(gconf_CFLAGS) $(gio_CFLAGS) $(unique_CFLAGS) $(notify_CFLAGS)
transmission_remote_gtk_SOURCES = main.c \
requests.c \
diff --git a/src/trg-main-window.c b/src/trg-main-window.c
index b1c78d8..52b5bc5 100644
--- a/src/trg-main-window.c
+++ b/src/trg-main-window.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <glib.h>
#include <glib/gprintf.h>
#include <glib/gstdio.h>
@@ -1157,9 +1158,15 @@ on_generic_interactive_action(JsonObject * response, int status,
trg_dialog_error_handler(TRG_MAIN_WINDOW(data), response, status);
gdk_threads_leave();
- if (status == CURLE_OK || status == FAIL_RESPONSE_UNSUCCESSFUL)
+ if (status == CURLE_OK || status == FAIL_RESPONSE_UNSUCCESSFUL) {
+ struct timespec ts;
+ ts.tv_sec = 0;
+ ts.tv_nsec = 350000000;
+ nanosleep(&ts, NULL);
+
dispatch_async(priv->client, torrent_get(FALSE),
on_torrent_get_interactive, data);
+ }
}
response_unref(response);