From 3a6935a2a0232102be4fe45723b1101ebb775d08 Mon Sep 17 00:00:00 2001 From: Alexander Kurilo Date: Sun, 13 Aug 2017 11:49:33 +0300 Subject: Add define to enable GeoIP Fixes #57 --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 300ef38..ce88266 100644 --- a/configure.ac +++ b/configure.ac @@ -84,6 +84,7 @@ have_geoip=no AS_IF([test x$with_libgeoip != xno], [ PKG_CHECK_MODULES([GEOIP], [geoip], [ have_geoip="yes" + AC_DEFINE(HAVE_GEOIP, 1, [Define if GeoIP is available]) ], [ AC_MSG_WARN([libgeoip not found]) ]) -- cgit v1.2.3 From 63f113b776d5c8152813aace78859e61ae14a587 Mon Sep 17 00:00:00 2001 From: si Date: Fri, 13 Apr 2018 18:51:34 +1000 Subject: Add alt-days to remote preferences Closes #67 --- configure.ac | 14 ++++++++++ src/trg-remote-prefs-dialog.c | 61 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index ce88266..8dda21d 100644 --- a/configure.ac +++ b/configure.ac @@ -139,6 +139,19 @@ AS_IF([test x$with_libappindicator != xno], [ ]) ]) +AC_ARG_ENABLE([nl_langinfo], + AC_HELP_STRING([--disable-nl_langinfo], [disable nl_langinfo (for day names)]), + [enable_nl_langinfo=no], + [enable_nl_langinfo=yes]) +AS_IF([test x$enable_nl_langinfo != xno], [ + AC_CHECK_FUNC(nl_langinfo,[ + enable_nl_langinfo=yes + AC_DEFINE(ENABLE_NL_LANGINFO, 1, [Define if nl_langinfo is available]) + AC_SUBST(ENABLE_NL_LANGINFO) + ], [ + AC_MSG_WARN([nl_langinfo not available]) + ]) +]) dnl ---- build flags ---- AX_APPEND_COMPILE_FLAGS([ \ @@ -201,4 +214,5 @@ echo " libmrss .......: $have_libmrss libproxy ......: $have_libproxy libappindicator: $have_libappindicator + nl_langinfo....: $enable_nl_langinfo " diff --git a/src/trg-remote-prefs-dialog.c b/src/trg-remote-prefs-dialog.c index 8149753..e524f53 100644 --- a/src/trg-remote-prefs-dialog.c +++ b/src/trg-remote-prefs-dialog.c @@ -26,6 +26,9 @@ #include #include #include +#ifdef ENABLE_NL_LANGINFO +#include +#endif #include "trg-main-window.h" #include "trg-remote-prefs-dialog.h" @@ -296,6 +299,60 @@ static GtkWidget *trg_rprefs_alt_speed_spin_new(GList ** wl, return w; } +static void +trg_rprefs_alt_days_savefunc(GtkWidget * grid, JsonObject * obj, + gchar * key) +{ + guint64 days = 0; + + for(gint i = 0, x = 1; i < 7; i++, x<<=1) { + GtkWidget *w = gtk_grid_get_child_at (GTK_GRID(grid), i, 0); + if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) + days += x; + } + + json_object_set_int_member(obj, key, days); +} + +static GtkWidget *trg_rprefs_alt_days(GList ** wl, + JsonObject * Obj, + const gchar * key, + GtkWidget *alt_time_check) +{ +#ifdef ENABLE_NL_LANGINFO + nl_item abdays[] = {ABDAY_1, ABDAY_2, ABDAY_3, ABDAY_4, ABDAY_5, ABDAY_6, ABDAY_7}; +#else + gchar *abdays[] = {_("Sun"), _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat")}; +#endif + GtkWidget *grid = gtk_grid_new(); + gtk_grid_set_column_homogeneous (GTK_GRID(grid), TRUE); + g_signal_connect(G_OBJECT(alt_time_check), "toggled", + G_CALLBACK(toggle_active_arg_is_sensitive), grid); + + guint64 days = json_object_get_int_member(Obj, key); + + for(gint i = 0, x = 1; i < 7; i++, x<<=1) { +#ifdef ENABLE_NL_LANGINFO + GtkWidget *w = gtk_check_button_new_with_label (nl_langinfo(abdays[i])); +#else + GtkWidget *w = gtk_check_button_new_with_label (abdays[i]); +#endif + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), (days & x) == x); + gtk_grid_attach(GTK_GRID(grid), w, i, 0, 1, 1); + } + + gtk_widget_set_sensitive(grid, + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(alt_time_check))); + + trg_json_widget_desc *wd = g_new0(trg_json_widget_desc, 1); + wd->key = g_strdup(key); + wd->widget = grid; + wd->saveFunc = trg_rprefs_alt_days_savefunc; + *wl = g_list_append(*wl, wd); + + return grid; +} + static GtkWidget *trg_rprefs_bandwidthPage(TrgRemotePrefsDialog * win, JsonObject * json) { @@ -338,6 +395,10 @@ static GtkWidget *trg_rprefs_bandwidthPage(TrgRemotePrefsDialog * win, w = trg_rprefs_time_begin_end_new(&priv->widgets, json, tb); hig_workarea_add_row_w(t, &row, tb, w, NULL); + w = trg_rprefs_alt_days(&priv->widgets, json, + SGET_ALT_SPEED_TIME_DAY, priv->alt_time_check); + hig_workarea_add_row(t, &row, _("Alternate days"), w, NULL); + w = trg_rprefs_alt_speed_spin_new(&priv->widgets, json, SGET_ALT_SPEED_DOWN, priv->alt_check, tb); -- cgit v1.2.3 From bccf38ab8a7cbb10ded3c7cf4cade5a4b1d8d1d3 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Fri, 2 Nov 2018 17:16:17 -0400 Subject: build: Drop intltool for gettext --- .gitignore | 8 ++- Makefile.am | 9 +-- autogen.sh | 1 - configure.ac | 3 +- data/Makefile.am | 10 ++- .../io.github.TransmissionRemoteGtk.appdata.xml.in | 16 ++--- data/io.github.TransmissionRemoteGtk.desktop.in | 4 +- po/Makevars | 78 ++++++++++++++++++++++ po/POTFILES.in | 4 +- 9 files changed, 108 insertions(+), 25 deletions(-) create mode 100644 po/Makevars (limited to 'configure.ac') diff --git a/.gitignore b/.gitignore index cef1612..b2643dd 100644 --- a/.gitignore +++ b/.gitignore @@ -40,9 +40,15 @@ __pycache__/ /po/POTFILES /po/stamp-it -/po/.intltool-merge-cache /po/*.pot /po/*.gmo +/ABOUT-NLS +/po/Rules-quot +/po/*.sed +/po/*.sin +/po/*.header +/po/Makevars.template +/po/stamp-po /docs/*.signals /docs/*.types diff --git a/Makefile.am b/Makefile.am index bdade72..dc8f3b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,12 +20,7 @@ ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = foreign DISTCHECK_CONFIGURE_FLAGS = --disable-desktop-database-update -SUBDIRS = extern src po data +SUBDIRS = extern src data po -EXTRA_DIST = README.md - -DISTCLEANFILES = \ - intltool-extract \ - intltool-merge \ - intltool-update +EXTRA_DIST = config.rpath README.md diff --git a/autogen.sh b/autogen.sh index f06f1a6..cfdc230 100755 --- a/autogen.sh +++ b/autogen.sh @@ -11,7 +11,6 @@ test -z "$srcdir" && srcdir=. aclocal --install -I m4 || exit 1 libtoolize --quiet --copy || exit 1 -intltoolize --copy --automake || exit 1 autoreconf --install -Wno-portability || exit 1 if [ "$NOCONFIGURE" = "" ]; then diff --git a/configure.ac b/configure.ac index 8dda21d..1e27ff8 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,8 @@ AC_PATH_PROG([POD2MAN], [pod2man]) LT_PREREQ([2.2.0]) LT_INIT LT_LIB_M -IT_PROG_INTLTOOL([0.50.1]) +AM_GNU_GETTEXT_VERSION([0.19.6]) +AM_GNU_GETTEXT([external]) PKG_PROG_PKG_CONFIG([0.28]) DESKTOP_FILE APPSTREAM_XML diff --git a/data/Makefile.am b/data/Makefile.am index 2bddf1c..ad5c5cd 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,15 +1,19 @@ SUBDIRS = icons +%.desktop: %.desktop.in + $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@ + desktop_in_files = io.github.TransmissionRemoteGtk.desktop.in desktop_FILES = $(desktop_in_files:.desktop.in=.desktop) -@INTLTOOL_DESKTOP_RULE@ @DESKTOP_FILE_RULES@ +%.appdata.xml: %.appdata.xml.in + $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ + appstream_in_files = io.github.TransmissionRemoteGtk.appdata.xml.in appstream_XML = $(appstream_in_files:.xml.in=.xml) -@INTLTOOL_XML_RULE@ @APPSTREAM_XML_RULES@ EXTRA_DIST = $(desktop_in_files) $(appstream_in_files) -DISTCLEANFILES = $(desktop_FILES) $(appstream_XML) +CLEANFILES = $(desktop_FILES) $(appstream_XML) diff --git a/data/io.github.TransmissionRemoteGtk.appdata.xml.in b/data/io.github.TransmissionRemoteGtk.appdata.xml.in index c15279f..b1340e3 100644 --- a/data/io.github.TransmissionRemoteGtk.appdata.xml.in +++ b/data/io.github.TransmissionRemoteGtk.appdata.xml.in @@ -6,20 +6,20 @@ GPL-2.0+ transmission-remote-gtk Transmission Remote - <_developer_name>Transmission Remote Gtk Team + Transmission Remote Gtk Team Remotely manage the Transmission BitTorrent client https://github.com/transmission-remote-gtk/transmission-remote-gtk https://github.com/transmission-remote-gtk/transmission-remote-gtk/issues - <_p> +

Transmission Remote Gtk allows you to remotely manage the Transmission BitTorrent client using its RPC interface. - - <_p>Features: +

+

Features:

    - <_li>Remotely add (file/url), start, stop, remove, remove and delete, verify, reannounce torrents - <_li>Works as a .torrent handler (eg. from a web browser) - <_li>Set torrent properties such as speed, seed, peer limits, file priorities, add/edit/remove trackers - <_li>Change remote settings like global limits, download directory, and connectivity preferences +
  • Remotely add (file/url), start, stop, remove, remove and delete, verify, reannounce torrents
  • +
  • Works as a .torrent handler (eg. from a web browser)
  • +
  • Set torrent properties such as speed, seed, peer limits, file priorities, add/edit/remove trackers
  • +
  • Change remote settings like global limits, download directory, and connectivity preferences
diff --git a/data/io.github.TransmissionRemoteGtk.desktop.in b/data/io.github.TransmissionRemoteGtk.desktop.in index 776a6f7..d52cd80 100644 --- a/data/io.github.TransmissionRemoteGtk.desktop.in +++ b/data/io.github.TransmissionRemoteGtk.desktop.in @@ -1,6 +1,6 @@ [Desktop Entry] -_Name=Transmission Remote -_Comment=Remotely manage the Transmission BitTorrent client +Name=Transmission Remote +Comment=Remotely manage the Transmission BitTorrent client Exec=transmission-remote-gtk %U Icon=transmission-remote-gtk Terminal=false diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000..a75f13e --- /dev/null +++ b/po/Makevars @@ -0,0 +1,78 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = + +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no + +# These options get passed to msgmerge. +# Useful options are in particular: +# --previous to keep previous msgids of translated messages, +# --quiet to reduce the verbosity. +MSGMERGE_OPTIONS = + +# These options get passed to msginit. +# If you want to disable line wrapping when writing PO files, add +# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and +# MSGINIT_OPTIONS. +MSGINIT_OPTIONS = + +# This tells whether or not to regenerate a PO file when $(DOMAIN).pot +# has changed. Possible values are "yes" and "no". Set this to no if +# the POT file is checked in the repository and the version control +# program ignores timestamps. +PO_DEPENDS_ON_POT = yes + +# This tells whether or not to forcibly update $(DOMAIN).pot and +# regenerate PO files on "make dist". Possible values are "yes" and +# "no". Set this to no if the POT file and PO files are maintained +# externally. +DIST_DEPENDS_ON_UPDATE_PO = no diff --git a/po/POTFILES.in b/po/POTFILES.in index 6d10454..0fca016 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,5 +1,5 @@ -[type: gettext/ini]data/io.github.TransmissionRemoteGtk.desktop.in -[type: gettext/xml]data/io.github.TransmissionRemoteGtk.appdata.xml.in +data/io.github.TransmissionRemoteGtk.desktop.in +data/io.github.TransmissionRemoteGtk.appdata.xml.in src/bencode.c src/hig.c src/json.c -- cgit v1.2.3 From cc02e478dd5fb15c1a59db3b9cce35a336cef4ba Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Fri, 2 Nov 2018 17:21:34 -0400 Subject: Bump version to 1.4.0 --- ChangeLog | 2 ++ configure.ac | 2 +- data/io.github.TransmissionRemoteGtk.appdata.xml.in | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/ChangeLog b/ChangeLog index ef7234a..726f6a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +* All future changelogs are now maintained in the appdata file + * Fri Aug 12 2016 1.3.1 - Fix build error on 32bit - Fix installing appdata file diff --git a/configure.ac b/configure.ac index 1e27ff8..69de224 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ dnl AC_PREREQ([2.69]) -AC_INIT([transmission-remote-gtk], [1.3.1], +AC_INIT([transmission-remote-gtk], [1.4.0], [https://github.com/transmission-remote-gtk/transmission-remote-gtk/issues]) AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_HEADERS([config.h]) diff --git a/data/io.github.TransmissionRemoteGtk.appdata.xml.in b/data/io.github.TransmissionRemoteGtk.appdata.xml.in index b1340e3..2d70e76 100644 --- a/data/io.github.TransmissionRemoteGtk.appdata.xml.in +++ b/data/io.github.TransmissionRemoteGtk.appdata.xml.in @@ -27,6 +27,22 @@ http://eth0.org.uk/~alan/transmission-remote-gtk-1.1.1.png + + + +

This is a minor release with some improvements:

+
    +
  • Rename app-id to io.github.TransmissionRemoteGtk
  • +
  • Add configuration of alternate speed days to preferences
  • +
  • Add menu option to copy magnet links
  • +
  • Add Ctrl+q keybinding to quit
  • +
  • Fix building with GeoIP support
  • +
  • Fix setting speeds in preferences
  • +
  • Improve search behavior in file view
  • +
+
+
+
io.github.TransmissionRemoteGtk.desktop uk.org.eth0.transmission-remote-gtk.desktop -- cgit v1.2.3